summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrbuj <[email protected]>2020-11-18 15:51:30 +0100
committerraveit65 <[email protected]>2020-12-06 00:12:31 +0100
commite285d049120f48284b6e71cdb34a6fe477db043d (patch)
tree71322b479dff220682524adb59da248e68e25bdf
parent6418e67d690828f9ba908237a3c4c6e71231cef7 (diff)
downloadmate-panel-e285d049120f48284b6e71cdb34a6fe477db043d.tar.bz2
mate-panel-e285d049120f48284b6e71cdb34a6fe477db043d.tar.xz
panel-applets-manager: Boilerplate
-rw-r--r--mate-panel/panel-applets-manager.h88
1 files changed, 31 insertions, 57 deletions
diff --git a/mate-panel/panel-applets-manager.h b/mate-panel/panel-applets-manager.h
index d2c5e2e8..8c24d8eb 100644
--- a/mate-panel/panel-applets-manager.h
+++ b/mate-panel/panel-applets-manager.h
@@ -28,16 +28,10 @@
#include "panel-applet-frame.h"
#include "panel-applet-info.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
+G_BEGIN_DECLS
-#define PANEL_TYPE_APPLETS_MANAGER (mate_panel_applets_manager_get_type ())
-#define MATE_PANEL_APPLETS_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PANEL_TYPE_APPLETS_MANAGER, MatePanelAppletsManager))
-#define MATE_PANEL_APPLETS_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PANEL_TYPE_APPLETS_MANAGER, MatePanelAppletsManagerClass))
-#define PANEL_IS_APPLETS_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PANEL_TYPE_APPLETS_MANAGER))
-#define PANEL_IS_APPLETS_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PANEL_TYPE_APPLETS_MANAGER))
-#define MATE_PANEL_APPLETS_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PANEL_TYPE_APPLETS_MANAGER, MatePanelAppletsManagerClass))
+#define PANEL_TYPE_APPLETS_MANAGER mate_panel_applets_manager_get_type ()
+G_DECLARE_DERIVABLE_TYPE (MatePanelAppletsManager, mate_panel_applets_manager, MATE_PANEL, APPLETS_MANAGER, GObject)
/**
* MATE_PANEL_APPLETS_MANAGER_EXTENSION_POINT_NAME:
@@ -46,56 +40,36 @@ extern "C" {
**/
#define MATE_PANEL_APPLETS_MANAGER_EXTENSION_POINT_NAME "mate-panel-applets-manager"
-typedef struct _MatePanelAppletsManager MatePanelAppletsManager;
-typedef struct _MatePanelAppletsManagerClass MatePanelAppletsManagerClass;
-
struct _MatePanelAppletsManagerClass {
- GObjectClass parent_class;
-
- GList * (*get_applets) (MatePanelAppletsManager *manager);
-
- gboolean (*factory_activate) (MatePanelAppletsManager *manager,
- const gchar *iid);
- gboolean (*factory_deactivate) (MatePanelAppletsManager *manager,
- const gchar *iid);
-
- MatePanelAppletInfo * (*get_applet_info) (MatePanelAppletsManager *manager,
- const gchar *iid);
-
- MatePanelAppletInfo * (*get_applet_info_from_old_id) (MatePanelAppletsManager *manager,
- const gchar *iid);
-
- gboolean (*load_applet) (MatePanelAppletsManager *manager,
- const gchar *iid,
- MatePanelAppletFrameActivating *frame_act);
-
- GtkWidget * (*get_applet_widget) (MatePanelAppletsManager *manager,
- const gchar *iid,
- guint uid);
+ GObjectClass parent_class;
+
+ GList * (*get_applets) (MatePanelAppletsManager *manager);
+ gboolean (*factory_activate) (MatePanelAppletsManager *manager,
+ const gchar *iid);
+ gboolean (*factory_deactivate) (MatePanelAppletsManager *manager,
+ const gchar *iid);
+ MatePanelAppletInfo * (*get_applet_info) (MatePanelAppletsManager *manager,
+ const gchar *iid);
+ MatePanelAppletInfo * (*get_applet_info_from_old_id) (MatePanelAppletsManager *manager,
+ const gchar *iid);
+ gboolean (*load_applet) (MatePanelAppletsManager *manager,
+ const gchar *iid,
+ MatePanelAppletFrameActivating *frame_act);
+ GtkWidget * (*get_applet_widget) (MatePanelAppletsManager *manager,
+ const gchar *iid,
+ guint uid);
};
-struct _MatePanelAppletsManager {
- GObject parent;
-};
-
-GType mate_panel_applets_manager_get_type (void);
-
-GList *mate_panel_applets_manager_get_applets (void);
-
-gboolean mate_panel_applets_manager_factory_activate (const gchar *iid);
-void mate_panel_applets_manager_factory_deactivate (const gchar *iid);
-
-MatePanelAppletInfo *mate_panel_applets_manager_get_applet_info (const gchar *iid);
-MatePanelAppletInfo *mate_panel_applets_manager_get_applet_info_from_old_id (const gchar *iid);
-
-gboolean mate_panel_applets_manager_load_applet (const gchar *iid,
- MatePanelAppletFrameActivating *frame_act);
-
-GtkWidget *mate_panel_applets_manager_get_applet_widget (const gchar *iid,
- guint uid);
-
-#ifdef __cplusplus
-}
-#endif
+GList *mate_panel_applets_manager_get_applets (void);
+gboolean mate_panel_applets_manager_factory_activate (const gchar *iid);
+void mate_panel_applets_manager_factory_deactivate (const gchar *iid);
+MatePanelAppletInfo *mate_panel_applets_manager_get_applet_info (const gchar *iid);
+MatePanelAppletInfo *mate_panel_applets_manager_get_applet_info_from_old_id (const gchar *iid);
+gboolean mate_panel_applets_manager_load_applet (const gchar *iid,
+ MatePanelAppletFrameActivating *frame_act);
+GtkWidget *mate_panel_applets_manager_get_applet_widget (const gchar *iid,
+ guint uid);
+
+G_END_DECLS
#endif /* __PANEL_APPLETS_MANAGER_H__ */