From f577f3b17ff60cc54ef28e7c449e9f0739147bb3 Mon Sep 17 00:00:00 2001 From: rbuj Date: Wed, 18 Nov 2020 14:10:53 +0100 Subject: mate-panel-applet: Boilerplate --- libmate-panel-applet/mate-panel-applet.h | 30 +++++------------------------- 1 file changed, 5 insertions(+), 25 deletions(-) (limited to 'libmate-panel-applet/mate-panel-applet.h') diff --git a/libmate-panel-applet/mate-panel-applet.h b/libmate-panel-applet/mate-panel-applet.h index 4f1b4cf5..05017f84 100644 --- a/libmate-panel-applet/mate-panel-applet.h +++ b/libmate-panel-applet/mate-panel-applet.h @@ -31,9 +31,10 @@ #include #include -#ifdef __cplusplus -extern "C" { -#endif +G_BEGIN_DECLS + +#define PANEL_TYPE_APPLET mate_panel_applet_get_type () +G_DECLARE_DERIVABLE_TYPE (MatePanelApplet, mate_panel_applet, MATE_PANEL, APPLET, GtkEventBox) typedef enum { MATE_PANEL_APPLET_ORIENT_UP, @@ -44,13 +45,6 @@ typedef enum { #define MATE_PANEL_APPLET_ORIENT_LAST MATE_PANEL_APPLET_ORIENT_RIGHT } MatePanelAppletOrient; -#define PANEL_TYPE_APPLET (mate_panel_applet_get_type ()) -#define MATE_PANEL_APPLET(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PANEL_TYPE_APPLET, MatePanelApplet)) -#define MATE_PANEL_APPLET_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), PANEL_TYPE_APPLET, MatePanelAppletClass)) -#define PANEL_IS_APPLET(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PANEL_TYPE_APPLET)) -#define PANEL_IS_APPLET_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), PANEL_TYPE_APPLET)) -#define MATE_PANEL_APPLET_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PANEL_TYPE_APPLET, MatePanelAppletClass)) - typedef enum { PANEL_NO_BACKGROUND, PANEL_COLOR_BACKGROUND, @@ -65,18 +59,8 @@ typedef enum { #define MATE_PANEL_APPLET_FLAGS_ALL (MATE_PANEL_APPLET_EXPAND_MAJOR|MATE_PANEL_APPLET_EXPAND_MINOR|MATE_PANEL_APPLET_HAS_HANDLE) } MatePanelAppletFlags; -typedef struct _MatePanelApplet MatePanelApplet; -typedef struct _MatePanelAppletClass MatePanelAppletClass; -typedef struct _MatePanelAppletPrivate MatePanelAppletPrivate; - typedef gboolean (*MatePanelAppletFactoryCallback) (MatePanelApplet* applet, const gchar *iid, gpointer user_data); -struct _MatePanelApplet { - GtkEventBox event_box; - - MatePanelAppletPrivate* priv; -}; - struct _MatePanelAppletClass { GtkEventBoxClass event_box_class; @@ -89,8 +73,6 @@ struct _MatePanelAppletClass { void (*move_focus_out_of_applet) (MatePanelApplet* frame, GtkDirectionType direction); }; -GType mate_panel_applet_get_type(void) G_GNUC_CONST; - GtkWidget* mate_panel_applet_new(void); MatePanelAppletOrient mate_panel_applet_get_orient(MatePanelApplet* applet); @@ -191,8 +173,6 @@ return mate_panel_applet_factory_setup_in_process (factory_id, type, callback, data); \ } -#ifdef __cplusplus -} -#endif +G_END_DECLS #endif /* __MATE_PANEL_APPLET_H__ */ -- cgit v1.2.1