diff --git a/include/gui.h b/include/gui.h
index 4662a71bfb63c6aa9a3c0c61024cbfd538e7a7ea..6bbf2c793335c120f41971e53f60c5ce0c5564d2 100644 (file)
--- a/include/gui.h
+++ b/include/gui.h
\r
#include <gtk/gtk.h>\r
#include <gst/gst.h>\r
+#include "config.h"\r
/******************************************************************************\r
+ \r
+ Structure Definitions\r
+ \r
+*****************************************************************************/\r
+\r
+/**\r
* @brief This structure defines all the components and the signals\r
* for a Dual-Decode GUI window. There will be two such\r
* windows when the application is running \r
- ******************************************************************************/\r
+ */\r
typedef struct{\r
\r
/*The Window and its delete-event signal handler*/\r
GtkWidget *openButton;\r
gulong openSignal;\r
\r
- /*media control buttons and clicked signal handlers*/\r
+ /*Media control buttons and clicked signal handlers*/\r
GtkWidget *playButton;\r
gulong playSignal;\r
GtkWidget *pauseButton;\r
gint modeFlag;\r
} GUIWindow;\r
\r
+\r
+\r
+/******************************************************************************\r
+\r
+ Macros\r
+\r
+ *****************************************************************************/\r
/*To index the static GUIWindow and Pipeline structures */\r
/*There are two of them, since it is a dual-decode application */\r
#define DECODER_INDEX_SINGLE 0\r
#define TIMER_INTERVAL 1000\r
#define TIMER_SIGNAL_NONE 0\r
\r
-/******************************************************************************\r
- * @brief initialises GTK if X is present\r
- *\r
- * @param[in,out] argc number of command line arguments\r
- * @param[in,out] argv command line arguments\r
- *\r
- * @return TRUE if X present, FALSE otherwise \r
- *\r
- * Called From main()\r
- ******************************************************************************/\r
-gboolean DualDecode_initGUI(gint *argc, char **argv[]);\r
\r
/******************************************************************************\r
- * @brief start the application\r
- *\r
- * Called From main()\r
- ******************************************************************************/\r
-void DualDecode_startApplication();\r
-\r
-/******************************************************************************\r
- * @brief stop the application and return to main()\r
- *\r
- * Called From delete-event handlers of the windows\r
- ******************************************************************************/\r
-void DualDecode_exitApplication();\r
+ \r
+ Statically used variables per GUI component file\r
\r
-/*The glade file to import widgets from*/\r
-#define GLADE_FILE "res/gui.xml"\r
+ *****************************************************************************/\r
\r
-/*statically used variables per GUI component file*/\r
static GError *error = NULL;\r
static GtkBuilder *builder = NULL;\r
\r
-/*report and then free the error, if error is not NULL*/\r
-/*This function is called when a NULL is returned from*/\r
-/*an allocation function */\r
+/******************************************************************************\r
+ \r
+ Static Inline functions\r
+ \r
+*****************************************************************************/\r
+\r
+/**\r
+ * Report and then free the error, if error is not NULL\r
+ *This function is called when a NULL is returned from\r
+ *an allocation function\r
+ */ \r
static inline void DualDecode_checkError(){\r
if(NULL == error){\r
g_printerr("GError Report : Unknown error\n");\r
}\r
static inline void DualDecode_builderCreate() {\r
builder = gtk_builder_new();\r
- if(0 == gtk_builder_add_from_file(builder,GLADE_FILE,&error)){\r
+ if(0 == gtk_builder_add_from_file (builder,GUI_XML,&error)){\r
DualDecode_checkError();\r
DualDecode_builderClose();\r
}\r
return retWidget;\r
}\r
\r
-/* get a widget exclusively from the builder */\r
-/* this will let the application create two instances */\r
-/* of a widget defined in the glade file. */\r
-/* */\r
-/* For example : this macro can be used like - */\r
-/* */\r
-/* widget0 = DualDecode_getWidgetExclusive("applicationWindow") */\r
-/* widget1 = DualDecode_getWidgetExclusive("applicationWindow") */\r
-/* */\r
-/* this will create two different widgets with the same */\r
-/* look and feel */\r
+/**\r
+ * Get a widget exclusively from the builder \r
+ * this will let the application create two instances \r
+ * of a widget defined in the glade file. \r
+ * \r
+ * For example : this macro can be used like - \r
+ * \r
+ * widget0 = DualDecode_getWidgetExclusive("applicationWindow") \r
+ * widget1 = DualDecode_getWidgetExclusive("applicationWindow") \r
+ * \r
+ * this will create two different widgets with the same \r
+ * look and feel \r
+ */\r
\r
static inline GtkWidget *DualDecode_getWidgetExclusive(const char *widget) {\r
GtkWidget *retWidget = NULL;\r
DualDecode_builderClose();\r
return retWidget;\r
}\r
+\r
+/******************************************************************************\r
+ \r
+ Public functions declarations\r
+ \r
+******************************************************************************/\r
+\r
+/**\r
+ * @brief initialises GTK if X is present\r
+ *\r
+ * @param[in,out] argc number of command line arguments\r
+ * @param[in,out] argv command line arguments\r
+ *\r
+ * @return TRUE if X present, FALSE otherwise \r
+ *\r
+ * Called From main()\r
+ */\r
+gboolean DualDecode_initGUI(gint *argc, char **argv[]);\r
+\r
+/**\r
+ * @brief start the application\r
+ *\r
+ * Called From main()\r
+ */\r
+void DualDecode_startApplication();\r
+\r
+/**\r
+ * @brief stop the application and return to main()\r
+ *\r
+ * Called From delete-event handlers of the windows\r
+ */\r
+void DualDecode_exitApplication();\r
+\r
+\r
#endif /*__GUI_H__*/\r