libgnt/libgnt
Clone
Summary
Browse
Changes
Graph
Use G_DECLARE_DERIVABLE_TYPE for GntWM.
2019-05-10, Elliott Sales de Andrade
2c1e3c534dbc
Parents
e2b603437d84
Children
70a6f838d8bf
Use G_DECLARE_DERIVABLE_TYPE for GntWM.
1 files changed, 6 insertions(+), 32 deletions(-)
+6
-32
gntwm.h
--- a/gntwm.h Fri May 10 23:31:00 2019 +0000
+++ b/gntwm.h Fri May 10 04:32:02 2019 -0400
@@ -37,12 +37,7 @@
#include <panel.h>
#include <time.h>
-#define GNT_TYPE_WM (gnt_wm_get_type())
-#define GNT_WM(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GNT_TYPE_WM, GntWM))
-#define GNT_WM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GNT_TYPE_WM, GntWMClass))
-#define GNT_IS_WM(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GNT_TYPE_WM))
-#define GNT_IS_WM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_WM))
-#define GNT_WM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_WM, GntWMClass))
+#define GNT_TYPE_WM gnt_wm_get_type()
typedef struct _GntNode GntNode;
@@ -56,8 +51,6 @@
GntWS *ws;
};
-typedef struct _GntWM GntWM;
-
typedef struct _GntPosition
{
int x;
@@ -75,24 +68,14 @@
void (*callback)(void);
} GntAction;
+G_BEGIN_DECLS
+
/**
- * GntWM:
+ * gnt_wm_get_type:
*
- * Access to any fields is deprecated. See inline comments for replacements.
- *
+ * Returns: GType for GntWM.
*/
-struct _GntWM
-{
- GntBindable inherit;
-
- /*< private >*/
- void *res1;
- void *res2;
- void *res3;
- void *res4;
-};
-
-typedef struct _GntWMClass GntWMClass;
+G_DECLARE_DERIVABLE_TYPE(GntWM, gnt_wm, GNT, WM, GntBindable)
struct _GntWMClass
{
@@ -149,15 +132,6 @@
void (*res3)(void);
};
-G_BEGIN_DECLS
-
-/**
- * gnt_wm_get_type:
- *
- * Returns: GType for GntWM.
- */
-GType gnt_wm_get_type(void);
-
/**
* gnt_wm_get_current_workspace:
* @wm: The window-manager.