diff options
author | yetist <[email protected]> | 2018-11-12 23:06:26 +0800 |
---|---|---|
committer | raveit65 <[email protected]> | 2018-11-26 12:58:58 +0100 |
commit | 6934f934da478bb23fc85cf83d8ba5d620ec7995 (patch) | |
tree | 426cf700dd00a74a5f188ed82e8d3bfb28a0bbe0 /egg/eggsmclient.h | |
parent | 582bcbad9587c34247689947f098647977545ba1 (diff) | |
download | mate-session-manager-6934f934da478bb23fc85cf83d8ba5d620ec7995.tar.bz2 mate-session-manager-6934f934da478bb23fc85cf83d8ba5d620ec7995.tar.xz |
Avoid compile warning for g_type_class_add_private
Fixes the issue with GLib >= 2.58, list of modified files:
- egg/eggsmclient.c
- egg/eggsmclient.h
Diffstat (limited to 'egg/eggsmclient.h')
-rw-r--r-- | egg/eggsmclient.h | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/egg/eggsmclient.h b/egg/eggsmclient.h index 124f325..1721bfd 100644 --- a/egg/eggsmclient.h +++ b/egg/eggsmclient.h @@ -22,20 +22,10 @@ #include <glib-object.h> -#ifdef __cplusplus -extern "C" { -#endif +G_BEGIN_DECLS #define EGG_TYPE_SM_CLIENT (egg_sm_client_get_type ()) -#define EGG_SM_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EGG_TYPE_SM_CLIENT, EggSMClient)) -#define EGG_SM_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EGG_TYPE_SM_CLIENT, EggSMClientClass)) -#define EGG_IS_SM_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EGG_TYPE_SM_CLIENT)) -#define EGG_IS_SM_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EGG_TYPE_SM_CLIENT)) -#define EGG_SM_CLIENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EGG_TYPE_SM_CLIENT, EggSMClientClass)) - -typedef struct _EggSMClient EggSMClient; -typedef struct _EggSMClientClass EggSMClientClass; -typedef struct _EggSMClientPrivate EggSMClientPrivate; +G_DECLARE_DERIVABLE_TYPE (EggSMClient, egg_sm_client, EGG, SM_CLIENT, GObject) typedef enum { EGG_SM_CLIENT_END_SESSION_DEFAULT, @@ -50,12 +40,6 @@ typedef enum { EGG_SM_CLIENT_MODE_NORMAL } EggSMClientMode; -struct _EggSMClient -{ - GObject parent; - -}; - struct _EggSMClientClass { GObjectClass parent_class; @@ -113,8 +97,6 @@ void egg_sm_client_will_quit (EggSMClient *client, gboolean egg_sm_client_end_session (EggSMClientEndStyle style, gboolean request_confirmation); -#ifdef __cplusplus -} -#endif +G_END_DECLS #endif /* __EGG_SM_CLIENT_H__ */ |