1 #include "openbox/actions.h"
2 #include "openbox/client.h"
9 static gpointer setup_on_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
10 static gpointer setup_off_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
11 static gpointer setup_toggle_func(ObParseInst *i,
12 xmlDocPtr doc, xmlNodePtr node);
13 static void free_func(gpointer options);
14 static gboolean run_func(ObActionsData *data, gpointer options);
16 void action_shade_startup()
18 actions_register("Shade",
23 actions_register("Unshade",
28 actions_register("ToggleShade",
35 static gpointer setup_on_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
37 Options *o = g_new0(Options, 1);
42 static gpointer setup_off_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
44 Options *o = g_new0(Options, 1);
49 static gpointer setup_toggle_func(ObParseInst *i,
50 xmlDocPtr doc, xmlNodePtr node)
52 Options *o = g_new0(Options, 1);
57 static void free_func(gpointer options)
64 /* Always return FALSE because its not interactive */
65 static gboolean run_func(ObActionsData *data, gpointer options)
70 actions_client_move(data, TRUE);
72 client_shade(data->client, !data->client->shaded);
74 client_shade(data->client, o->on);
75 actions_client_move(data, FALSE);