diff options
Diffstat (limited to 'rcm-client-main.h')
-rw-r--r-- | rcm-client-main.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/rcm-client-main.h b/rcm-client-main.h index f48be19..49c96b4 100644 --- a/rcm-client-main.h +++ b/rcm-client-main.h @@ -11,4 +11,39 @@ create_header_button(GtkHeaderBar *header, const gchar *tooltip, const gchar *icon_name, gboolean end, GCallback callback, gpointer user_data); +gulong _g_signal_replace(gpointer instance, const gchar *detailed_signal, GCallback c_handler, gpointer data, GConnectFlags flags); + +static inline gulong +g_signal_replace(gpointer instance, const gchar *detailed_signal, GCallback c_handler, gpointer data) +{ + return _g_signal_replace(instance, detailed_signal, c_handler, data, 0); +} + +static inline gulong +g_signal_replace_swapped(gpointer instance, const gchar *detailed_signal, GCallback c_handler, gpointer data) +{ + return _g_signal_replace(instance, detailed_signal, c_handler, data, G_CONNECT_SWAPPED); +} + +gulong _g_signal_replace_id(const gchar *widget_id, const gchar *detailed_signal, GCallback c_handler, gpointer data, GConnectFlags flags); + +static inline gulong +g_signal_replace_id(const gchar *widget_id, const gchar *detailed_signal, GCallback c_handler, gpointer data) +{ + return _g_signal_replace_id(widget_id, detailed_signal, c_handler, data, 0); +} + +static inline gulong +g_signal_replace_id_swapped(const gchar *widget_id, const gchar *detailed_signal, GCallback c_handler, gpointer data) +{ + return _g_signal_replace_id(widget_id, detailed_signal, c_handler, data, G_CONNECT_SWAPPED); +} + extern struct global_variables *global; + +static inline GObject * +get_object(const gchar *object_id) +{ + return gtk_builder_get_object(global->builder, object_id); +} + |