[easytag] Use G_BEGIN_DECLS in more headers



commit 12a6ef9c339a87b229da5c05d1377d990a6c3bce
Author: David King <amigadave amigadave com>
Date:   Fri Mar 28 22:44:14 2014 +0000

    Use G_BEGIN_DECLS in more headers
    
    This makes it easier to test the C++ TagLib API for reading MP4 tags.

 src/charset.h |    5 ++---
 src/et_core.h |   22 ++++++++++------------
 src/log.h     |    4 ++--
 src/misc.h    |    6 +++---
 src/mp4_tag.h |    8 +++-----
 5 files changed, 20 insertions(+), 25 deletions(-)
---
diff --git a/src/charset.h b/src/charset.h
index 201b601..a5c629d 100644
--- a/src/charset.h
+++ b/src/charset.h
@@ -24,9 +24,7 @@
 
 #include <gtk/gtk.h>
 
-/***************
- * Declaration *
- ***************/
+G_BEGIN_DECLS
 
 typedef struct
 {
@@ -61,5 +59,6 @@ gchar *Charset_Get_Name_From_Title (const gchar *charset_title);
 void Charset_Insert_Locales_Init    (void);
 void Charset_Insert_Locales_Destroy (void);
 
+G_END_DECLS
 
 #endif /* __CHARSET_H__ */
diff --git a/src/et_core.h b/src/et_core.h
index c9dc610..9d3fa11 100644
--- a/src/et_core.h
+++ b/src/et_core.h
@@ -27,21 +27,18 @@
 #include <gdk/gdk.h>
 #include <config.h> // For definition of ENABLE_OGG, ...
 
-
-/***************
- * Declaration *
- ***************/
+G_BEGIN_DECLS
 
 /*
  * Colors Used (see declaration into et_core.c)
  */
-GdkColor LIGHT_BLUE;
-GdkColor RED;
-GdkColor LIGHT_RED;
-GdkColor GREY;
-GdkColor LIGHT_GREY;
-GdkColor YELLOW;
-GdkColor BLACK;
+extern GdkColor LIGHT_BLUE;
+extern GdkColor RED;
+extern GdkColor LIGHT_RED;
+extern GdkColor GREY;
+extern GdkColor LIGHT_GREY;
+extern GdkColor YELLOW;
+extern GdkColor BLACK;
 
 
 /*
@@ -332,7 +329,7 @@ struct _ET_Core
     GList *ETHistoryFileList;           // History list of files changes for undo/redo actions
 };
 
-ET_Core *ETCore;    // Main pointer to structure needed by EasyTAG
+extern ET_Core *ETCore; /* Main pointer to structure needed by EasyTAG. */
 
 
 
@@ -446,5 +443,6 @@ gint ET_Comp_Func_Sort_File_By_Descending_File_Bitrate    (ET_File *ETFile1, ET_
 gint ET_Comp_Func_Sort_File_By_Ascending_File_Samplerate  (ET_File *ETFile1, ET_File *ETFile2);
 gint ET_Comp_Func_Sort_File_By_Descending_File_Samplerate (ET_File *ETFile1, ET_File *ETFile2);
 
+G_END_DECLS
 
 #endif /* __ET_CORE_H__ */
diff --git a/src/log.h b/src/log.h
index 6aea0be..743f246 100644
--- a/src/log.h
+++ b/src/log.h
@@ -24,8 +24,7 @@
 
 #include <gtk/gtk.h>
 
-//#include "et_core.h"
-
+G_BEGIN_DECLS
 
 /*
  * Types of errors
@@ -51,5 +50,6 @@ void       Log_Clean_Log_List   (void);
 void Log_Print (Log_Error_Type error_type,
                 gchar const *format, ...) G_GNUC_PRINTF (2, 3);
 
+G_END_DECLS
 
 #endif /* __LOG_H__ */
diff --git a/src/misc.h b/src/misc.h
index 1885d3b..2ca216d 100644
--- a/src/misc.h
+++ b/src/misc.h
@@ -24,9 +24,7 @@
 
 #include <gtk/gtk.h>
 
-/***************
- * Declaration *
- ***************/
+G_BEGIN_DECLS
 
 GtkWidget *playlist_use_mask_name;
 GtkWidget *playlist_use_dir_name;
@@ -110,4 +108,6 @@ gchar * et_track_number_to_string (const guint track_number);
 
 void et_on_child_exited (GPid pid, gint status, gpointer user_data);
 
+G_END_DECLS
+
 #endif /* __MISC_H__ */
diff --git a/src/mp4_tag.h b/src/mp4_tag.h
index 2b426c2..9c6c948 100644
--- a/src/mp4_tag.h
+++ b/src/mp4_tag.h
@@ -26,11 +26,7 @@
 
 #include "et_core.h"
 
-/****************
- * Declarations *
- ****************/
-
-
+G_BEGIN_DECLS
 
 /**************
  * Prototypes *
@@ -38,4 +34,6 @@
 gboolean Mp4tag_Read_File_Tag  (gchar *filename, File_Tag *FileTag);
 gboolean Mp4tag_Write_File_Tag (ET_File *ETFile);
 
+G_END_DECLS
+
 #endif /* __MP4_TAG_H__ */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]