summarylogtreecommitdiffstats
path: root/gtkrc-reload.c
diff options
context:
space:
mode:
authorNathan Isom2016-01-19 21:32:56 -0600
committerNathan Isom2016-01-19 21:32:56 -0600
commit052c60b3b81c2f245d505c848d17e7b966218a1b (patch)
tree58ace0935ed7789f607270fdcd425679f131d32a /gtkrc-reload.c
downloadaur-052c60b3b81c2f245d505c848d17e7b966218a1b.tar.gz
initial.
Diffstat (limited to 'gtkrc-reload.c')
-rw-r--r--gtkrc-reload.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/gtkrc-reload.c b/gtkrc-reload.c
new file mode 100644
index 00000000000..bbca5ce0da4
--- /dev/null
+++ b/gtkrc-reload.c
@@ -0,0 +1,44 @@
+/*
+ * An utility to reload the gtkrc configuration at runtime
+ *
+ * Copyright (C) 2010 speps <dreamspepser at yahoo dot it>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+/* Version 0.0.1 */
+
+#include <gdk/gdk.h>
+
+static void reload();
+
+int main(int argc, char *argv[]) {
+
+ gdk_init(&argc,&argv);
+ reload();
+}
+
+static void reload()
+{
+ GdkEventClient event;
+ event.type = GDK_CLIENT_EVENT;
+ event.send_event = TRUE;
+ event.window = NULL;
+
+ event.message_type = gdk_atom_intern("_GTK_READ_RCFILES", FALSE);
+
+ event.data_format = 8;
+ gdk_event_send_clientmessage_toall((GdkEvent *)&event);
+}