Modified in accordance to coding guidelines for header and C files.
[glsdk/dual-decode.git] / include / gui.h
index f9374c11fb0a4fdd88b24096b821c3f6cc81e32a..b5aaddd587ba70519129e5cda23e1ce2b03f7f28 100644 (file)
 #include <gtk/gtk.h>\r
 #include <gst/gst.h>\r
 \r
 #include <gtk/gtk.h>\r
 #include <gst/gst.h>\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
  \r
                          Structure Definitions\r
 /******************************************************************************\r
  \r
                          Structure Definitions\r
@@ -151,6 +119,47 @@ typedef struct{
 \r
 \r
 \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 DECODER_INDEX_DOUBLE 1\r
+\r
+/*ratio of screen size per window*/\r
+#define SCREEN_WIDTH_FACTOR 3\r
+#define SCREEN_HEIGHT_FACTOR 2\r
+\r
+/*Whether the control buttons are active*/\r
+#define CONTROL_MODE_ACTIVE TRUE\r
+#define CONTROL_MODE_INACTIVE FALSE\r
+\r
+#define CONTROL_MODE_STOPPED 0\r
+#define CONTROL_MODE_PLAYING 1\r
+#define CONTROL_MODE_PAUSED 2\r
+#define CONTROL_MODE_NO_FILE 4\r
+\r
+#define LABEL_TEXT_NO_FILE "No File"\r
+#define LABEL_TEXT_PLAYING "Playing"\r
+#define LABEL_TEXT_STOPPED "Stopped"\r
+#define LABEL_TEXT_PAUSED "Paused"\r
+\r
+#define TIME_LABEL_ORIGIN "--:--:--/--:--:--"\r
+\r
+#define FORWARD 3000000000\r
+#define REWIND 3000000000\r
+#define SWITCH_TEXT_SINGLE "Single Decode"\r
+#define SWITCH_TEXT_DUAL "Dual Decode"\r
+\r
+#define TIMER_INTERVAL 1000\r
+#define TIMER_SIGNAL_NONE 0\r
+\r
+/*The glade file to import widgets from*/\r
+#define GLADE_FILE "res/gui.xml"\r
+\r
 /******************************************************************************\r
  \r
               Statically used variables per GUI component file\r
 /******************************************************************************\r
  \r
               Statically used variables per GUI component file\r
@@ -188,7 +197,7 @@ static inline void DualDecode_builderClose() {
 }\r
 static inline void DualDecode_builderCreate() {\r
        builder = gtk_builder_new();\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,GLADE_FILE,&error)){\r
                DualDecode_checkError();\r
                DualDecode_builderClose();\r
        }\r
                DualDecode_checkError();\r
                DualDecode_builderClose();\r
        }\r
@@ -226,46 +235,38 @@ static inline GtkWidget *DualDecode_getWidgetExclusive(const char *widget) {
        DualDecode_builderClose();\r
        return retWidget;\r
 }\r
        DualDecode_builderClose();\r
        return retWidget;\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 DECODER_INDEX_DOUBLE 1\r
-\r
-/*ratio of screen size per window*/\r
-#define SCREEN_WIDTH_FACTOR 3\r
-#define SCREEN_HEIGHT_FACTOR 2\r
 \r
 \r
-/*Whether the control buttons are active*/\r
-#define CONTROL_MODE_ACTIVE TRUE\r
-#define CONTROL_MODE_INACTIVE FALSE\r
-\r
-#define CONTROL_MODE_STOPPED 0\r
-#define CONTROL_MODE_PLAYING 1\r
-#define CONTROL_MODE_PAUSED 2\r
-#define CONTROL_MODE_NO_FILE 4\r
-\r
-#define LABEL_TEXT_NO_FILE "No File"\r
-#define LABEL_TEXT_PLAYING "Playing"\r
-#define LABEL_TEXT_STOPPED "Stopped"\r
-#define LABEL_TEXT_PAUSED "Paused"\r
-\r
-#define TIME_LABEL_ORIGIN "--:--:--/--:--:--"\r
+/******************************************************************************\r
\r
+                        Public functions declarations\r
\r
+******************************************************************************/\r
 \r
 \r
-#define FORWARD 3000000000\r
-#define REWIND 3000000000\r
-#define SWITCH_TEXT_SINGLE "Single Decode"\r
-#define SWITCH_TEXT_DUAL "Dual Decode"\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
-#define TIMER_INTERVAL 1000\r
-#define TIMER_SIGNAL_NONE 0\r
+/**\r
+ *     @brief                  start the application\r
+ *\r
+ *     Called From             main()\r
+ */\r
+void DualDecode_startApplication();\r
 \r
 \r
-/*The glade file to import widgets from*/\r
-#define GLADE_FILE "res/gui.xml"\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
 \r
 \r
 #endif /*__GUI_H__*/\r