summaryrefslogtreecommitdiff
path: root/libmate-panel-applet/mate-panel-applet.h
diff options
context:
space:
mode:
authorrbuj <[email protected]>2020-11-18 14:10:53 +0100
committerraveit65 <[email protected]>2020-12-04 22:08:40 +0100
commitf577f3b17ff60cc54ef28e7c449e9f0739147bb3 (patch)
tree5b5aebb76746af8c967b43ae92758b7d3afd0cbd /libmate-panel-applet/mate-panel-applet.h
parent772a237b471b8a3a6d7e0dceaec5561fb81b3583 (diff)
downloadmate-panel-f577f3b17ff60cc54ef28e7c449e9f0739147bb3.tar.bz2
mate-panel-f577f3b17ff60cc54ef28e7c449e9f0739147bb3.tar.xz
mate-panel-applet: Boilerplate
Diffstat (limited to 'libmate-panel-applet/mate-panel-applet.h')
-rw-r--r--libmate-panel-applet/mate-panel-applet.h30
1 files changed, 5 insertions, 25 deletions
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 <cairo.h>
#include <cairo-gobject.h>
-#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__ */