summaryrefslogtreecommitdiff
path: root/mate-session/mdm-signal-handler.h
diff options
context:
space:
mode:
authoryetist <[email protected]>2018-11-10 22:44:20 +0800
committerraveit65 <[email protected]>2018-11-26 12:55:28 +0100
commit851d9fedf02a501c8567ab03f35a0cabd7b4a2d1 (patch)
treec3724c64b995eecfe41dbf644235cf1b30d01088 /mate-session/mdm-signal-handler.h
parent7df5759ff520c502314205bc2887f6467058fbfc (diff)
downloadmate-session-manager-851d9fedf02a501c8567ab03f35a0cabd7b4a2d1.tar.bz2
mate-session-manager-851d9fedf02a501c8567ab03f35a0cabd7b4a2d1.tar.xz
Avoid compile warning for g_type_class_add_private
Fixes the issue with GLib >= 2.58, list of modified files: - mate-session/mdm-signal-handler.c - mate-session/mdm-signal-handler.h
Diffstat (limited to 'mate-session/mdm-signal-handler.h')
-rw-r--r--mate-session/mdm-signal-handler.h39
1 files changed, 4 insertions, 35 deletions
diff --git a/mate-session/mdm-signal-handler.h b/mate-session/mdm-signal-handler.h
index f9c2d4b..dd4dc04 100644
--- a/mate-session/mdm-signal-handler.h
+++ b/mate-session/mdm-signal-handler.h
@@ -23,28 +23,10 @@
#include <glib-object.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define MDM_TYPE_SIGNAL_HANDLER \
- (mdm_signal_handler_get_type())
-
-#define MDM_SIGNAL_HANDLER(o) \
- (G_TYPE_CHECK_INSTANCE_CAST((o), MDM_TYPE_SIGNAL_HANDLER, MdmSignalHandler))
-
-#define MDM_SIGNAL_HANDLER_CLASS(k) \
- (G_TYPE_CHECK_CLASS_CAST((k), MDM_TYPE_SIGNAL_HANDLER, MdmSignalHandlerClass))
-
-#define MDM_IS_SIGNAL_HANDLER(o) \
- (G_TYPE_CHECK_INSTANCE_TYPE((o), MDM_TYPE_SIGNAL_HANDLER))
-
-#define MDM_IS_SIGNAL_HANDLER_CLASS(k) \
- (G_TYPE_CHECK_CLASS_TYPE((k), MDM_TYPE_SIGNAL_HANDLER))
-
-#define MDM_SIGNAL_HANDLER_GET_CLASS(o) \
- (G_TYPE_INSTANCE_GET_CLASS((o), MDM_TYPE_SIGNAL_HANDLER, MdmSignalHandlerClass))
+G_BEGIN_DECLS
+#define MDM_TYPE_SIGNAL_HANDLER (mdm_signal_handler_get_type())
+G_DECLARE_FINAL_TYPE (MdmSignalHandler, mdm_signal_handler, MDM, SIGNAL_HANDLER, GObject)
typedef gboolean (*MdmSignalHandlerFunc)(int signal, gpointer data);
@@ -52,17 +34,6 @@ typedef void (*MdmShutdownHandlerFunc)(gpointer data);
typedef struct MdmSignalHandlerPrivate MdmSignalHandlerPrivate;
-typedef struct {
- GObject parent;
- MdmSignalHandlerPrivate* priv;
-} MdmSignalHandler;
-
-typedef struct {
- GObjectClass parent_class;
-} MdmSignalHandlerClass;
-
-GType mdm_signal_handler_get_type(void);
-
MdmSignalHandler* mdm_signal_handler_new(void);
void mdm_signal_handler_set_fatal_func(MdmSignalHandler* handler, MdmShutdownHandlerFunc func, gpointer user_data);
@@ -71,8 +42,6 @@ guint mdm_signal_handler_add(MdmSignalHandler* handler, int signal_number, MdmSi
void mdm_signal_handler_remove(MdmSignalHandler* handler, guint id);
void mdm_signal_handler_remove_func(MdmSignalHandler* handler, guint signal_number, MdmSignalHandlerFunc callback, gpointer data);
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
#endif /* __MDM_SIGNAL_HANDLER_H */