summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormbkma <[email protected]>2021-02-12 23:04:26 +0100
committerraveit65 <[email protected]>2021-03-02 22:19:58 +0100
commit6c2603da88635f3d3098eee7f72205bdbb52a641 (patch)
treeef6e71a455b728c263da122779a2002f9ef90fc2
parentc7101aa8603f288065ad9ed8150623d0270feb68 (diff)
downloadpluma-6c2603da88635f3d3098eee7f72205bdbb52a641.tar.bz2
pluma-6c2603da88635f3d3098eee7f72205bdbb52a641.tar.xz
pluma-activatable-interfaces: use G_DECLARE_INTERFACE
-rw-r--r--pluma/pluma-app-activatable.h13
-rw-r--r--pluma/pluma-view-activatable.h10
-rw-r--r--pluma/pluma-window-activatable.h10
3 files changed, 9 insertions, 24 deletions
diff --git a/pluma/pluma-app-activatable.h b/pluma/pluma-app-activatable.h
index 36072ada..882a3b26 100644
--- a/pluma/pluma-app-activatable.h
+++ b/pluma/pluma-app-activatable.h
@@ -26,14 +26,9 @@
G_BEGIN_DECLS
-/*
- * Type checking and casting macros
- */
-#define PLUMA_TYPE_APP_ACTIVATABLE (pluma_app_activatable_get_type ())
-#define PLUMA_APP_ACTIVATABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PLUMA_TYPE_APP_ACTIVATABLE, PlumaAppActivatable))
-#define PLUMA_APP_ACTIVATABLE_IFACE(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), PLUMA_TYPE_APP_ACTIVATABLE, PlumaAppActivatableInterface))
-#define PLUMA_IS_APP_ACTIVATABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PLUMA_TYPE_APP_ACTIVATABLE))
-#define PLUMA_APP_ACTIVATABLE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), PLUMA_TYPE_APP_ACTIVATABLE, PlumaAppActivatableInterface))
+#define PLUMA_TYPE_APP_ACTIVATABLE (pluma_app_activatable_get_type ())
+
+G_DECLARE_INTERFACE (PlumaAppActivatable, pluma_app_activatable, PLUMA, APP_ACTIVATABLE, GObject)
typedef struct _PlumaAppActivatable PlumaAppActivatable; /* dummy typedef */
typedef struct _PlumaAppActivatableInterface PlumaAppActivatableInterface;
@@ -50,8 +45,6 @@ struct _PlumaAppActivatableInterface
/*
* Public methods
*/
-GType pluma_app_activatable_get_type (void) G_GNUC_CONST;
-
void pluma_app_activatable_activate (PlumaAppActivatable *activatable);
void pluma_app_activatable_deactivate (PlumaAppActivatable *activatable);
diff --git a/pluma/pluma-view-activatable.h b/pluma/pluma-view-activatable.h
index 5a6635b9..f5f3f203 100644
--- a/pluma/pluma-view-activatable.h
+++ b/pluma/pluma-view-activatable.h
@@ -28,11 +28,9 @@ G_BEGIN_DECLS
/*
* Type checking and casting macros
*/
-#define PLUMA_TYPE_VIEW_ACTIVATABLE (pluma_view_activatable_get_type ())
-#define PLUMA_VIEW_ACTIVATABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PLUMA_TYPE_VIEW_ACTIVATABLE, PlumaViewActivatable))
-#define PLUMA_VIEW_ACTIVATABLE_IFACE(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), PLUMA_TYPE_VIEW_ACTIVATABLE, PlumaViewActivatableInterface))
-#define PLUMA_IS_VIEW_ACTIVATABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PLUMA_TYPE_VIEW_ACTIVATABLE))
-#define PLUMA_VIEW_ACTIVATABLE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), PLUMA_TYPE_VIEW_ACTIVATABLE, PlumaViewActivatableInterface))
+#define PLUMA_TYPE_VIEW_ACTIVATABLE (pluma_view_activatable_get_type ())
+
+G_DECLARE_INTERFACE (PlumaViewActivatable, pluma_view_activatable, PLUMA, VIEW_ACTIVATABLE, GObject)
typedef struct _PlumaViewActivatable PlumaViewActivatable; /* dummy typedef */
typedef struct _PlumaViewActivatableInterface PlumaViewActivatableInterface;
@@ -49,8 +47,6 @@ struct _PlumaViewActivatableInterface
/*
* Public methods
*/
-GType pluma_view_activatable_get_type (void) G_GNUC_CONST;
-
void pluma_view_activatable_activate (PlumaViewActivatable *activatable);
void pluma_view_activatable_deactivate (PlumaViewActivatable *activatable);
diff --git a/pluma/pluma-window-activatable.h b/pluma/pluma-window-activatable.h
index 9646507c..4ed780a4 100644
--- a/pluma/pluma-window-activatable.h
+++ b/pluma/pluma-window-activatable.h
@@ -28,11 +28,9 @@ G_BEGIN_DECLS
/*
* Type checking and casting macros
*/
-#define PLUMA_TYPE_WINDOW_ACTIVATABLE (pluma_window_activatable_get_type ())
-#define PLUMA_WINDOW_ACTIVATABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PLUMA_TYPE_WINDOW_ACTIVATABLE, PlumaWindowActivatable))
-#define PLUMA_WINDOW_ACTIVATABLE_IFACE(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), PLUMA_TYPE_WINDOW_ACTIVATABLE, PlumaWindowActivatableInterface))
-#define PLUMA_IS_WINDOW_ACTIVATABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PLUMA_TYPE_WINDOW_ACTIVATABLE))
-#define PLUMA_WINDOW_ACTIVATABLE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), PLUMA_TYPE_WINDOW_ACTIVATABLE, PlumaWindowActivatableInterface))
+#define PLUMA_TYPE_WINDOW_ACTIVATABLE (pluma_window_activatable_get_type ())
+
+G_DECLARE_INTERFACE (PlumaWindowActivatable, pluma_window_activatable, PLUMA, WINDOW_ACTIVATABLE, GObject)
typedef struct _PlumaWindowActivatable PlumaWindowActivatable; /* dummy typedef */
typedef struct _PlumaWindowActivatableInterface PlumaWindowActivatableInterface;
@@ -50,8 +48,6 @@ struct _PlumaWindowActivatableInterface
/*
* Public methods
*/
-GType pluma_window_activatable_get_type (void) G_GNUC_CONST;
-
void pluma_window_activatable_activate (PlumaWindowActivatable *activatable);
void pluma_window_activatable_deactivate (PlumaWindowActivatable *activatable);
void pluma_window_activatable_update_state (PlumaWindowActivatable *activatable);