summaryrefslogtreecommitdiff
path: root/rcm-client-main.h
blob: 5592554d61c7f4b2d95b703dafb716cbba2d8bbc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
void poke_objects();

struct global_variables {
	GtkWindow *window;
	GtkStack *stack;
	GtkBuilder *builder;
};

GtkWidget *
create_header_button(GtkHeaderBar *header, const gchar *tooltip,
		     const gchar *icon_name, gboolean end, GCallback callback,
		     gpointer user_data);

void cbox_add_all_protocols(GtkComboBoxText *cbox);

void cbox_add_all_keycodes(GtkComboBoxText *cbox);

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);
}