From 05b19376eab0550595c1f27647d028074c8f739a Mon Sep 17 00:00:00 2001 From: rbuj Date: Wed, 25 Nov 2020 15:16:24 +0100 Subject: Use G_BEGIN_DECLS/G_END_DECLS macros --- capplets/common/file-transfer-dialog.h | 9 +++------ capplets/keybindings/eggaccelerators.h | 10 +++------- capplets/keybindings/eggcellrendererkeys.h | 11 +++-------- capplets/keyboard/mate-keyboard-properties-xkb.h | 13 ++++++------- libslab/app-resizer.h | 9 +++------ libslab/app-shell.h | 9 +++------ libslab/application-tile.h | 12 +++++------- libslab/bookmark-agent.h | 11 ++++------- libslab/double-click-detector.h | 10 ++++------ libslab/libslab-utils.h | 10 +++------- libslab/mate-utils.h | 10 ++++------ libslab/nameplate-tile.h | 12 +++++------- libslab/search-bar.h | 10 ++++------ libslab/shell-window.h | 9 +++------ libslab/slab-mate-util.h | 9 +++------ libslab/slab-section.h | 9 +++------ libslab/themed-icon.h | 9 +++------ libslab/tile.h | 11 ++++------- libwindow-settings/mate-window-manager.h | 10 +++------- typing-break/drw-break-window.h | 9 +++------ 20 files changed, 72 insertions(+), 130 deletions(-) diff --git a/capplets/common/file-transfer-dialog.h b/capplets/common/file-transfer-dialog.h index 140b1510..530d1cce 100644 --- a/capplets/common/file-transfer-dialog.h +++ b/capplets/common/file-transfer-dialog.h @@ -24,11 +24,10 @@ #ifndef __FILE_TRANSFER_DIALOG_H__ #define __FILE_TRANSFER_DIALOG_H__ +#include #include -#ifdef __cplusplus -extern "C" { -#endif +G_BEGIN_DECLS #define FILE_TRANSFER_DIALOG(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, file_transfer_dialog_get_type (), FileTransferDialog) #define FILE_TRANSFER_DIALOG_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, file_transfer_dialog_get_type (), FileTransferDialogClass) @@ -66,8 +65,6 @@ void file_transfer_dialog_copy_async (FileTransferDialog *dlg, int priority); -#ifdef __cplusplus -} -#endif +G_END_DECLS #endif /* __FILE_TRANSFER_DIALOG_H__ */ diff --git a/capplets/keybindings/eggaccelerators.h b/capplets/keybindings/eggaccelerators.h index 4f503d6b..794879b8 100644 --- a/capplets/keybindings/eggaccelerators.h +++ b/capplets/keybindings/eggaccelerators.h @@ -21,12 +21,11 @@ #ifndef __EGG_ACCELERATORS_H__ #define __EGG_ACCELERATORS_H__ +#include #include #include -#ifdef __cplusplus -extern "C" { -#endif +G_BEGIN_DECLS /* Where a value is also in GdkModifierType we coincide, * otherwise we don't overlap. @@ -91,9 +90,6 @@ gchar* egg_virtual_accelerator_label (guint accelerator_key, guint keycode, EggVirtualModifierType accelerator_mods); -#ifdef __cplusplus -} -#endif - +G_END_DECLS #endif /* __EGG_ACCELERATORS_H__ */ diff --git a/capplets/keybindings/eggcellrendererkeys.h b/capplets/keybindings/eggcellrendererkeys.h index 1b5f4262..061bd07a 100644 --- a/capplets/keybindings/eggcellrendererkeys.h +++ b/capplets/keybindings/eggcellrendererkeys.h @@ -20,12 +20,11 @@ #ifndef __EGG_CELL_RENDERER_KEYS_H__ #define __EGG_CELL_RENDERER_KEYS_H__ +#include #include #include "eggaccelerators.h" -#ifdef __cplusplus -extern "C" { -#endif +G_BEGIN_DECLS #define EGG_TYPE_CELL_RENDERER_KEYS (egg_cell_renderer_keys_get_type ()) #define EGG_CELL_RENDERER_KEYS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EGG_TYPE_CELL_RENDERER_KEYS, EggCellRendererKeys)) @@ -84,10 +83,6 @@ void egg_cell_renderer_keys_get_accelerator (EggCellRendererKeys void egg_cell_renderer_keys_set_accel_mode (EggCellRendererKeys *keys, EggCellRendererKeysMode accel_mode); - -#ifdef __cplusplus -} -#endif - +G_END_DECLS #endif /* __GTK_CELL_RENDERER_KEYS_H__ */ diff --git a/capplets/keyboard/mate-keyboard-properties-xkb.h b/capplets/keyboard/mate-keyboard-properties-xkb.h index 55827e12..9e80eba0 100644 --- a/capplets/keyboard/mate-keyboard-properties-xkb.h +++ b/capplets/keyboard/mate-keyboard-properties-xkb.h @@ -24,13 +24,13 @@ #ifndef __MATE_KEYBOARD_PROPERTY_XKB_H #define __MATE_KEYBOARD_PROPERTY_XKB_H +#include #include #include "libmatekbd/matekbd-keyboard-config.h" -#ifdef __cplusplus -extern "C" { -#endif +G_BEGIN_DECLS + #define CWID(s) GTK_WIDGET (gtk_builder_get_object (chooser_dialog, s)) extern XklEngine *engine; extern XklConfigRegistry *config_registry; @@ -91,7 +91,6 @@ extern void xkb_save_default_group (gint group_no); extern gint xkb_get_default_group (void); -#ifdef __cplusplus -} -#endif -#endif /* __MATE_KEYBOARD_PROPERTY_XKB_H */ +G_END_DECLS + +#endif /* __MATE_KEYBOARD_PROPERTY_XKB_H */ diff --git a/libslab/app-resizer.h b/libslab/app-resizer.h index 57411ec6..652ab712 100644 --- a/libslab/app-resizer.h +++ b/libslab/app-resizer.h @@ -26,9 +26,7 @@ #include "app-shell.h" -#ifdef __cplusplus -extern "C" { -#endif +G_BEGIN_DECLS #define INITIAL_NUM_COLS 3 #define APP_RESIZER_TYPE (app_resizer_get_type ()) @@ -69,7 +67,6 @@ void app_resizer_set_table_cache (AppResizer * widget, GList * cache_list); void app_resizer_layout_table_default (AppResizer * widget, GtkTable * table, GList * element_list); void app_resizer_set_vadjustment_value (GtkWidget * widget, gdouble value); -#ifdef __cplusplus -} -#endif +G_END_DECLS + #endif /* __APP_RESIZER_H__ */ diff --git a/libslab/app-shell.h b/libslab/app-shell.h index 9db7a9d1..97e22b60 100644 --- a/libslab/app-shell.h +++ b/libslab/app-shell.h @@ -31,9 +31,7 @@ #include "slab-section.h" #include "tile.h" -#ifdef __cplusplus -extern "C" { -#endif +G_BEGIN_DECLS #define GROUP_POSITION_NUMBER_KEY "Unique Group Position Number" #define APP_ACTION_KEY "Unique Application Action Key" @@ -139,7 +137,6 @@ void hide_shell (AppShellData * app_data); void show_shell (AppShellData * app_data); -#ifdef __cplusplus -} -#endif +G_END_DECLS + #endif /* __APP_SHELL_H__ */ diff --git a/libslab/application-tile.h b/libslab/application-tile.h index 4a06da50..dea0bde9 100644 --- a/libslab/application-tile.h +++ b/libslab/application-tile.h @@ -23,11 +23,10 @@ #include "nameplate-tile.h" +#include #include -#ifdef __cplusplus -extern "C" { -#endif +G_BEGIN_DECLS #define APPLICATION_TILE_TYPE (application_tile_get_type ()) #define APPLICATION_TILE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), APPLICATION_TILE_TYPE, ApplicationTile)) @@ -63,7 +62,6 @@ GtkWidget *application_tile_new_full (const gchar * desktop_item_id, MateDesktopItem *application_tile_get_desktop_item (ApplicationTile * tile); -#ifdef __cplusplus -} -#endif -#endif +G_END_DECLS + +#endif /* __APPLICATION_TILE_H__ */ diff --git a/libslab/bookmark-agent.h b/libslab/bookmark-agent.h index 077bbc72..d33db808 100644 --- a/libslab/bookmark-agent.h +++ b/libslab/bookmark-agent.h @@ -22,11 +22,10 @@ #define __BOOKMARK_AGENT_H__ #include +#include #include -#ifdef __cplusplus -extern "C" { -#endif +G_BEGIN_DECLS #define BOOKMARK_AGENT_TYPE (bookmark_agent_get_type ()) #define BOOKMARK_AGENT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), BOOKMARK_AGENT_TYPE, BookmarkAgent)) @@ -87,8 +86,6 @@ void bookmark_agent_purge_items (BookmarkAgent *this); void bookmark_item_free (BookmarkItem *item); -#ifdef __cplusplus -} -#endif +G_END_DECLS -#endif +#endif /* __BOOKMARK_AGENT_H__ */ diff --git a/libslab/double-click-detector.h b/libslab/double-click-detector.h index 57a0a7a2..4a745d8e 100644 --- a/libslab/double-click-detector.h +++ b/libslab/double-click-detector.h @@ -21,11 +21,10 @@ #ifndef __DOUBLE_CLICK_DETECTOR_H__ #define __DOUBLE_CLICK_DETECTOR_H__ +#include #include -#ifdef __cplusplus -extern "C" { -#endif +G_BEGIN_DECLS #define DOUBLE_CLICK_DETECTOR_TYPE (double_click_detector_get_type ()) #define DOUBLE_CLICK_DETECTOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), DOUBLE_CLICK_DETECTOR_TYPE, DoubleClickDetector)) @@ -54,7 +53,6 @@ DoubleClickDetector *double_click_detector_new (void); gboolean double_click_detector_is_double_click (DoubleClickDetector * detector, guint32 event_time, gboolean auto_update); -#ifdef __cplusplus -} -#endif +G_END_DECLS + #endif /* __DOUBLE_CLICK_DETECTOR_H__ */ diff --git a/libslab/libslab-utils.h b/libslab/libslab-utils.h index e41e8852..0aef150c 100644 --- a/libslab/libslab-utils.h +++ b/libslab/libslab-utils.h @@ -5,17 +5,13 @@ #include #include -#ifdef __cplusplus -extern "C" { -#endif +G_BEGIN_DECLS MateDesktopItem *libslab_mate_desktop_item_new_from_unknown_id (const gchar *id); gint libslab_strcmp (const gchar *a, const gchar *b); GdkScreen *libslab_get_current_screen (void); -#ifdef __cplusplus -} -#endif +G_END_DECLS -#endif +#endif /* __LIBSLAB_UTILS_H__ */ diff --git a/libslab/mate-utils.h b/libslab/mate-utils.h index cf2f315e..0fa4cd3f 100644 --- a/libslab/mate-utils.h +++ b/libslab/mate-utils.h @@ -21,16 +21,14 @@ #ifndef __MATE_UTILS_H__ #define __MATE_UTILS_H__ +#include #include -#ifdef __cplusplus -extern "C" { -#endif +G_BEGIN_DECLS gboolean load_image_by_id (GtkImage * image, GtkIconSize size, const gchar * image_id); -#ifdef __cplusplus -} -#endif +G_END_DECLS + #endif /* __MATE_UTILS_H__ */ diff --git a/libslab/nameplate-tile.h b/libslab/nameplate-tile.h index 8e8d0cff..d51ff40f 100644 --- a/libslab/nameplate-tile.h +++ b/libslab/nameplate-tile.h @@ -23,11 +23,10 @@ #include "tile.h" +#include #include -#ifdef __cplusplus -extern "C" { -#endif +G_BEGIN_DECLS #define NAMEPLATE_TILE_TYPE (nameplate_tile_get_type ()) #define NAMEPLATE_TILE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), NAMEPLATE_TILE_TYPE, NameplateTile)) @@ -53,7 +52,6 @@ GType nameplate_tile_get_type (void); GtkWidget *nameplate_tile_new (const gchar * uri, GtkWidget * image, GtkWidget * header, GtkWidget * subheader); -#ifdef __cplusplus -} -#endif -#endif +G_END_DECLS + +#endif /* __NAMEPLATE_TILE_H__ */ diff --git a/libslab/search-bar.h b/libslab/search-bar.h index 65d0aba7..fca5216d 100644 --- a/libslab/search-bar.h +++ b/libslab/search-bar.h @@ -21,11 +21,10 @@ #ifndef __NLD_SEARCH_BAR_H__ #define __NLD_SEARCH_BAR_H__ +#include #include -#ifdef __cplusplus -extern "C" { -#endif +G_BEGIN_DECLS #define NLD_TYPE_SEARCH_BAR (nld_search_bar_get_type ()) #define NLD_SEARCH_BAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NLD_TYPE_SEARCH_BAR, NldSearchBar)) @@ -62,7 +61,6 @@ void nld_search_bar_set_search_timeout (NldSearchBar * search_bar, int search_ti const char *nld_search_bar_get_text (NldSearchBar * search_bar); void nld_search_bar_set_text (NldSearchBar * search_bar, const char *text, gboolean activate); -#ifdef __cplusplus -} -#endif +G_END_DECLS + #endif /* __NLD_SEARCH_BAR_H__ */ diff --git a/libslab/shell-window.h b/libslab/shell-window.h index 3dae6f7f..2aa51e3f 100644 --- a/libslab/shell-window.h +++ b/libslab/shell-window.h @@ -26,9 +26,7 @@ #include "app-shell.h" -#ifdef __cplusplus -extern "C" { -#endif +G_BEGIN_DECLS #define SHELL_WINDOW_TYPE (shell_window_get_type ()) #define SHELL_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SHELL_WINDOW_TYPE, ShellWindow)) @@ -62,7 +60,6 @@ void shell_window_set_contents (ShellWindow * window, GtkWidget * left_pane, GtkWidget * right_pane); void shell_window_clear_resize_handler (ShellWindow * win); -#ifdef __cplusplus -} -#endif +G_END_DECLS + #endif /* __SHELL_WINDOW_H__ */ diff --git a/libslab/slab-mate-util.h b/libslab/slab-mate-util.h index abe5c0d2..211e76c4 100644 --- a/libslab/slab-mate-util.h +++ b/libslab/slab-mate-util.h @@ -25,9 +25,7 @@ #include #include -#ifdef __cplusplus -extern "C" { -#endif +G_BEGIN_DECLS MateDesktopItem *load_desktop_item_from_unknown (const gchar * id); @@ -36,7 +34,6 @@ gboolean open_desktop_item_help (MateDesktopItem * desktop_item); void copy_file (const gchar * src_uri, const gchar * dst_uri); -#ifdef __cplusplus -} -#endif +G_END_DECLS + #endif /* __SLAB_MATE_UTIL_H__ */ diff --git a/libslab/slab-section.h b/libslab/slab-section.h index 45868818..04288a87 100644 --- a/libslab/slab-section.h +++ b/libslab/slab-section.h @@ -24,9 +24,7 @@ #include #include -#ifdef __cplusplus -extern "C" { -#endif +G_BEGIN_DECLS #define SLAB_SECTION_TYPE (slab_section_get_type ()) #define SLAB_SECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SLAB_SECTION_TYPE, SlabSection)) @@ -69,7 +67,6 @@ void slab_section_set_title (SlabSection * section, const gchar * title); void slab_section_set_contents (SlabSection * section, GtkWidget * contents); void slab_section_set_selected (SlabSection * section, gboolean selected); -#ifdef __cplusplus -} -#endif +G_END_DECLS + #endif /* __SLAB_SECTION_H__ */ diff --git a/libslab/themed-icon.h b/libslab/themed-icon.h index 1ddad004..d4604430 100644 --- a/libslab/themed-icon.h +++ b/libslab/themed-icon.h @@ -24,9 +24,7 @@ #include #include -#ifdef __cplusplus -extern "C" { -#endif +G_BEGIN_DECLS #define THEMED_ICON_TYPE (themed_icon_get_type ()) #define THEMED_ICON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), THEMED_ICON_TYPE, ThemedIcon)) @@ -51,7 +49,6 @@ typedef struct GType themed_icon_get_type (void); GtkWidget *themed_icon_new (const gchar * id, GtkIconSize size); -#ifdef __cplusplus -} -#endif +G_END_DECLS + #endif /* __THEMED_ICON_H__ */ diff --git a/libslab/tile.h b/libslab/tile.h index 985b876c..9c8d3f2a 100644 --- a/libslab/tile.h +++ b/libslab/tile.h @@ -24,9 +24,7 @@ #include #include -#ifdef __cplusplus -extern "C" { -#endif +G_BEGIN_DECLS #define TILE_TYPE (tile_get_type ()) #define TILE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TILE_TYPE, Tile)) @@ -124,7 +122,6 @@ TileAction *tile_action_new (Tile * tile, TileActionFunc func, const gchar * men void tile_action_set_menu_item_label (TileAction * action, const gchar * markup); GtkMenuItem *tile_action_get_menu_item (TileAction * action); -#ifdef __cplusplus -} -#endif -#endif +G_END_DECLS + +#endif /* __TILE_H__ */ diff --git a/libwindow-settings/mate-window-manager.h b/libwindow-settings/mate-window-manager.h index 6abc2b96..0bc2fc24 100644 --- a/libwindow-settings/mate-window-manager.h +++ b/libwindow-settings/mate-window-manager.h @@ -26,8 +26,8 @@ #ifndef MATE_WINDOW_MANAGER_H #define MATE_WINDOW_MANAGER_H +#include #include - #include /* Increment if backward-incompatible changes are made, so we get a clean @@ -87,9 +87,7 @@ typedef struct } MateWMSettings; -#ifdef __cplusplus -extern "C" { -#endif +G_BEGIN_DECLS #define MATE_WINDOW_MANAGER(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, mate_window_manager_get_type (), MateWindowManager) #define MATE_WINDOW_MANAGER_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, mate_window_manager_get_type (), MateWindowManagerClass) @@ -168,8 +166,6 @@ void mate_window_manager_get_double_click_actions (MateWindowManager MateWMSettings *mate_wm_settings_copy (MateWMSettings *settings); void mate_wm_settings_free (MateWMSettings *settings); -#ifdef __cplusplus -} -#endif +G_END_DECLS #endif /* MATE_WINDOW_MANAGER_H */ diff --git a/typing-break/drw-break-window.h b/typing-break/drw-break-window.h index 5a45977c..f9925df7 100644 --- a/typing-break/drw-break-window.h +++ b/typing-break/drw-break-window.h @@ -22,11 +22,10 @@ #ifndef __DRW_BREAK_WINDOW_H__ #define __DRW_BREAK_WINDOW_H__ +#include #include -#ifdef __cplusplus -extern "C" { -#endif +G_BEGIN_DECLS #define DRW_TYPE_BREAK_WINDOW (drw_break_window_get_type ()) #define DRW_BREAK_WINDOW(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), DRW_TYPE_BREAK_WINDOW, DrwBreakWindow)) @@ -52,8 +51,6 @@ struct _DrwBreakWindowClass { GType drw_break_window_get_type (void) G_GNUC_CONST; GtkWidget * drw_break_window_new (void); -#ifdef __cplusplus -} -#endif +G_END_DECLS #endif /* __DRW_BREAK_WINDOW_H__ */ -- cgit v1.2.1