summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Ratajsky <[email protected]>2014-06-23 12:36:57 +0200
committerMichal Ratajsky <[email protected]>2014-06-23 12:36:57 +0200
commit8197f71e2a50b9a74b99315bb481274f612b83b3 (patch)
tree8d13e65e5f411df3d5da1a1da83cafbec446e7be
parent2ced78e503c3b55f89bc02aab828ed559dd8dec1 (diff)
downloadmate-desktop-8197f71e2a50b9a74b99315bb481274f612b83b3.tar.bz2
mate-desktop-8197f71e2a50b9a74b99315bb481274f612b83b3.tar.xz
Use G_{BEGIN,END}_DECLS instead of #ifdef __cplusplus in header files and make sure to include glib.h for these macros
-rw-r--r--libmate-desktop/mate-aboutdialog.h1
-rw-r--r--libmate-desktop/mate-bg-crossfade.h9
-rw-r--r--libmate-desktop/mate-bg.h9
-rw-r--r--libmate-desktop/mate-colorbutton.h1
-rw-r--r--libmate-desktop/mate-colorsel.h1
-rw-r--r--libmate-desktop/mate-colorseldialog.h1
-rw-r--r--libmate-desktop/mate-desktop-item.h8
-rw-r--r--libmate-desktop/mate-desktop-thumbnail.h8
-rw-r--r--libmate-desktop/mate-desktop-utils.h8
-rw-r--r--libmate-desktop/private.h10
10 files changed, 20 insertions, 36 deletions
diff --git a/libmate-desktop/mate-aboutdialog.h b/libmate-desktop/mate-aboutdialog.h
index d2e788d..2fbd950 100644
--- a/libmate-desktop/mate-aboutdialog.h
+++ b/libmate-desktop/mate-aboutdialog.h
@@ -29,6 +29,7 @@
#ifndef __MATE_ABOUT_DIALOG_H__
#define __MATE_ABOUT_DIALOG_H__
+#include <glib.h>
#include <gtk/gtk.h>
G_BEGIN_DECLS
diff --git a/libmate-desktop/mate-bg-crossfade.h b/libmate-desktop/mate-bg-crossfade.h
index 28c1e28..f4674fd 100644
--- a/libmate-desktop/mate-bg-crossfade.h
+++ b/libmate-desktop/mate-bg-crossfade.h
@@ -29,12 +29,11 @@
#error MateBGCrossfade is unstable API. You must define MATE_DESKTOP_USE_UNSTABLE_API before including mate-bg-crossfade.h
#endif
+#include <glib.h>
#include <gdk/gdk.h>
#include <gtk/gtk.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
+G_BEGIN_DECLS
#define MATE_TYPE_BG_CROSSFADE (mate_bg_crossfade_get_type ())
#define MATE_BG_CROSSFADE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MATE_TYPE_BG_CROSSFADE, MateBGCrossfade))
@@ -82,8 +81,6 @@ void mate_bg_crossfade_start (MateBGCrossfade *fade,
gboolean mate_bg_crossfade_is_started (MateBGCrossfade *fade);
void mate_bg_crossfade_stop (MateBGCrossfade *fade);
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
#endif
diff --git a/libmate-desktop/mate-bg.h b/libmate-desktop/mate-bg.h
index f69454d..65152cd 100644
--- a/libmate-desktop/mate-bg.h
+++ b/libmate-desktop/mate-bg.h
@@ -31,14 +31,13 @@
#error MateBG is unstable API. You must define MATE_DESKTOP_USE_UNSTABLE_API before including mate-bg.h
#endif
+#include <glib.h>
#include <gdk/gdk.h>
#include <gio/gio.h>
#include "mate-desktop-thumbnail.h"
#include "mate-bg-crossfade.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
+G_BEGIN_DECLS
#define MATE_TYPE_BG (mate_bg_get_type ())
#define MATE_BG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MATE_TYPE_BG, MateBG))
@@ -175,8 +174,6 @@ MateBGCrossfade *mate_bg_set_pixmap_as_root_with_crossfade (GdkScreen *sc
GdkPixmap *mate_bg_get_pixmap_from_root (GdkScreen *screen);
#endif /* GTK_CHECK_VERSION(3, 0, 0) */
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
#endif
diff --git a/libmate-desktop/mate-colorbutton.h b/libmate-desktop/mate-colorbutton.h
index cfc5e34..2eeebc1 100644
--- a/libmate-desktop/mate-colorbutton.h
+++ b/libmate-desktop/mate-colorbutton.h
@@ -32,6 +32,7 @@
#ifndef __MATE_COLOR_BUTTON_H__
#define __MATE_COLOR_BUTTON_H__
+#include <glib.h>
#include <gtk/gtk.h>
G_BEGIN_DECLS
diff --git a/libmate-desktop/mate-colorsel.h b/libmate-desktop/mate-colorsel.h
index cd5b995..b841ba9 100644
--- a/libmate-desktop/mate-colorsel.h
+++ b/libmate-desktop/mate-colorsel.h
@@ -28,6 +28,7 @@
#ifndef __MATE_COLOR_SELECTION_H__
#define __MATE_COLOR_SELECTION_H__
+#include <glib.h>
#include <gtk/gtk.h>
G_BEGIN_DECLS
diff --git a/libmate-desktop/mate-colorseldialog.h b/libmate-desktop/mate-colorseldialog.h
index 0848c90..5270352 100644
--- a/libmate-desktop/mate-colorseldialog.h
+++ b/libmate-desktop/mate-colorseldialog.h
@@ -27,6 +27,7 @@
#ifndef __MATE_COLOR_SELECTION_DIALOG_H__
#define __MATE_COLOR_SELECTION_DIALOG_H__
+#include <glib.h>
#include <gtk/gtk.h>
G_BEGIN_DECLS
diff --git a/libmate-desktop/mate-desktop-item.h b/libmate-desktop/mate-desktop-item.h
index 2f9ff9b..76f1660 100644
--- a/libmate-desktop/mate-desktop-item.h
+++ b/libmate-desktop/mate-desktop-item.h
@@ -34,9 +34,7 @@
#include <gdk/gdk.h>
#include <gtk/gtk.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
+G_BEGIN_DECLS
typedef enum {
MATE_DESKTOP_ITEM_TYPE_NULL = 0 /* This means its NULL, that is, not
@@ -305,8 +303,6 @@ void mate_desktop_item_set_launch_time (MateDesktopItem
void mate_desktop_item_clear_section (MateDesktopItem *item,
const char *section);
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
#endif /* MATE_DITEM_H */
diff --git a/libmate-desktop/mate-desktop-thumbnail.h b/libmate-desktop/mate-desktop-thumbnail.h
index 775348b..1decb4a 100644
--- a/libmate-desktop/mate-desktop-thumbnail.h
+++ b/libmate-desktop/mate-desktop-thumbnail.h
@@ -35,9 +35,7 @@
#include <time.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
+G_BEGIN_DECLS
typedef enum {
MATE_DESKTOP_THUMBNAIL_SIZE_NORMAL,
@@ -107,8 +105,6 @@ GdkPixbuf *mate_desktop_thumbnail_scale_down_pixbuf (GdkPixbuf *pixbuf,
int dest_width,
int dest_height);
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
#endif /* MATE_DESKTOP_THUMBNAIL_H */
diff --git a/libmate-desktop/mate-desktop-utils.h b/libmate-desktop/mate-desktop-utils.h
index 8bba7d3..824b11a 100644
--- a/libmate-desktop/mate-desktop-utils.h
+++ b/libmate-desktop/mate-desktop-utils.h
@@ -34,9 +34,7 @@
#include <glib.h>
#include <gdk/gdk.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
+G_BEGIN_DECLS
/* prepend the terminal command to a vector */
void mate_desktop_prepend_terminal_to_vector (int *argc, char ***argv);
@@ -44,8 +42,6 @@ void mate_desktop_prepend_terminal_to_vector (int *argc, char ***argv);
/* replace gdk_spawn_command_line_on_screen, not available in GTK3 */
gboolean mate_gdk_spawn_command_line_on_screen (GdkScreen *screen, const gchar *command, GError **error);
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
#endif /* MATE_DESKTOP_UTILS_H */
diff --git a/libmate-desktop/private.h b/libmate-desktop/private.h
index 616fe28..baa4ba7 100644
--- a/libmate-desktop/private.h
+++ b/libmate-desktop/private.h
@@ -25,14 +25,12 @@
#ifndef __MATE_DESKTOP_PRIVATE_H__
#define __MATE_DESKTOP_PRIVATE_H__
-#ifdef __cplusplus
-extern "C" {
-#endif
+#include <glib.h>
+
+G_BEGIN_DECLS
void _mate_desktop_init_i18n (void);
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
#endif