Mercurial > grim > libgnt
changeset 1286:2c1e3c534dbc
Use G_DECLARE_DERIVABLE_TYPE for GntWM.
author | Elliott Sales de Andrade <quantum.analyst@gmail.com> |
---|---|
date | Fri, 10 May 2019 04:32:02 -0400 |
parents | e2b603437d84 |
children | 70a6f838d8bf |
files | gntwm.h |
diffstat | 1 files changed, 6 insertions(+), 32 deletions(-) [+] |
line wrap: on
line diff
--- 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.