]> Dogcows Code - chaz/openbox/blob - openbox/actions/debug.c
freeze onscreen stacking order changes while a temp raise for focus cycling is occuring
[chaz/openbox] / openbox / actions / debug.c
1 #include "openbox/actions.h"
2 #include <glib.h>
3
4 typedef struct {
5 gchar *str;
6 } Options;
7
8 static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
9 static void free_func(gpointer options);
10 static gboolean run_func(ObActionsData *data, gpointer options);
11
12 void action_debug_startup(void)
13 {
14 actions_register("Debug",
15 setup_func,
16 free_func,
17 run_func,
18 NULL, NULL);
19 }
20
21 static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
22 {
23 xmlNodePtr n;
24 Options *o;
25
26 o = g_new0(Options, 1);
27
28 if ((n = parse_find_node("string", node)))
29 o->str = parse_string(doc, n);
30 return o;
31 }
32
33 static void free_func(gpointer options)
34 {
35 Options *o = options;
36
37 if (o) {
38 g_free(o->str);
39 g_free(o);
40 }
41 }
42
43 /* Always return FALSE because its not interactive */
44 static gboolean run_func(ObActionsData *data, gpointer options)
45 {
46 Options *o = options;
47
48 if (o->str) g_print("%s\n", o->str);
49
50 return FALSE;
51 }
This page took 0.034547 seconds and 4 git commands to generate.