diff options
author | yetist <[email protected]> | 2018-11-12 22:44:59 +0800 |
---|---|---|
committer | raveit65 <[email protected]> | 2018-11-26 12:57:42 +0100 |
commit | 582bcbad9587c34247689947f098647977545ba1 (patch) | |
tree | 42b09a58e3fa617c1a891680c9f50737c31a3526 /mate-session/gs-idle-monitor.h | |
parent | 851d9fedf02a501c8567ab03f35a0cabd7b4a2d1 (diff) | |
download | mate-session-manager-582bcbad9587c34247689947f098647977545ba1.tar.bz2 mate-session-manager-582bcbad9587c34247689947f098647977545ba1.tar.xz |
Avoid compile warning for g_type_class_add_private
Fixes the issue with GLib >= 2.58, list of modified files:
- mate-session/gs-idle-monitor.c
- mate-session/gs-idle-monitor.h
Diffstat (limited to 'mate-session/gs-idle-monitor.h')
-rw-r--r-- | mate-session/gs-idle-monitor.h | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/mate-session/gs-idle-monitor.h b/mate-session/gs-idle-monitor.h index 0cacb2f..932c5f0 100644 --- a/mate-session/gs-idle-monitor.h +++ b/mate-session/gs-idle-monitor.h @@ -25,29 +25,10 @@ #include <glib-object.h> -#ifdef __cplusplus -extern "C" { -#endif +G_BEGIN_DECLS #define GS_TYPE_IDLE_MONITOR (gs_idle_monitor_get_type ()) -#define GS_IDLE_MONITOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GS_TYPE_IDLE_MONITOR, GSIdleMonitor)) -#define GS_IDLE_MONITOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GS_TYPE_IDLE_MONITOR, GSIdleMonitorClass)) -#define GS_IS_IDLE_MONITOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GS_TYPE_IDLE_MONITOR)) -#define GS_IS_IDLE_MONITOR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GS_TYPE_IDLE_MONITOR)) -#define GS_IDLE_MONITOR_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GS_TYPE_IDLE_MONITOR, GSIdleMonitorClass)) - -typedef struct GSIdleMonitorPrivate GSIdleMonitorPrivate; - -typedef struct -{ - GObject parent; - GSIdleMonitorPrivate *priv; -} GSIdleMonitor; - -typedef struct -{ - GObjectClass parent_class; -} GSIdleMonitorClass; +G_DECLARE_FINAL_TYPE (GSIdleMonitor, gs_idle_monitor, GS, IDLE_MONITOR, GObject) typedef gboolean (*GSIdleMonitorWatchFunc) (GSIdleMonitor *monitor, guint id, @@ -68,8 +49,6 @@ void gs_idle_monitor_remove_watch (GSIdleMonitor *monitor, void gs_idle_monitor_reset (GSIdleMonitor *monitor); -#ifdef __cplusplus -} -#endif +G_END_DECLS #endif /* __GS_IDLE_MONITOR_H */ |