]> Dogcows Code - chaz/openbox/commitdiff
Make it possible for an action name to choose whether it is interactive or not based...
authorDana Jansens <danakj@orodu.net>
Thu, 17 Dec 2009 15:23:48 +0000 (10:23 -0500)
committerDana Jansens <danakj@orodu.net>
Thu, 17 Dec 2009 15:23:49 +0000 (10:23 -0500)
This way we can use the same name with options for an interactive action and a
non-interactive action.

Shorten the names of the ObActionsInteractive* functions to ObActionsI*

Add a ObActionsIPreFunc that is called for interactive actions
before the interactivity (key/mouse grab) is started.

Add a ObActionsIPostFunc that is called for interactive actions
after the interactiviti (key/mouse grab) has ended.

39 files changed:
openbox/actions.c
openbox/actions.h
openbox/actions/addremovedesktop.c
openbox/actions/breakchroot.c
openbox/actions/close.c
openbox/actions/cyclewindows.c
openbox/actions/debug.c
openbox/actions/decorations.c
openbox/actions/desktop.c
openbox/actions/directionalwindows.c
openbox/actions/dockautohide.c
openbox/actions/execute.c
openbox/actions/exit.c
openbox/actions/focus.c
openbox/actions/focustobottom.c
openbox/actions/fullscreen.c
openbox/actions/growtoedge.c
openbox/actions/iconify.c
openbox/actions/if.c
openbox/actions/kill.c
openbox/actions/layer.c
openbox/actions/lower.c
openbox/actions/maximize.c
openbox/actions/move.c
openbox/actions/moverelative.c
openbox/actions/moveresizeto.c
openbox/actions/movetoedge.c
openbox/actions/omnipresent.c
openbox/actions/raise.c
openbox/actions/raiselower.c
openbox/actions/reconfigure.c
openbox/actions/resize.c
openbox/actions/resizerelative.c
openbox/actions/restart.c
openbox/actions/shade.c
openbox/actions/shadelowerraise.c
openbox/actions/showdesktop.c
openbox/actions/showmenu.c
openbox/actions/unfocus.c

index 1ec53287691b6748c8f31ad127024a7925d58922..26def97809bd6153d49e2ee64173db07d9eca7ed 100644 (file)
@@ -42,17 +42,23 @@ struct _ObActionsDefinition {
 
     gchar *name;
 
-    ObActionsDataSetupFunc setup;
+    gboolean canbeinteractive;
+    union {
+        ObActionsIDataSetupFunc i;
+        ObActionsDataSetupFunc n;
+    } setup;
     ObActionsDataFreeFunc free;
     ObActionsRunFunc run;
-    ObActionsInteractiveInputFunc i_input;
-    ObActionsInteractiveCancelFunc i_cancel;
 };
 
 struct _ObActionsAct {
     guint ref;
 
     ObActionsDefinition *def;
+    ObActionsIPreFunc i_pre;
+    ObActionsIInputFunc i_input;
+    ObActionsICancelFunc i_cancel;
+    ObActionsIPostFunc i_post;
     gpointer options;
 };
 
@@ -78,37 +84,55 @@ void actions_shutdown(gboolean reconfig)
     }
 }
 
-gboolean actions_register(const gchar *name,
-                          ObActionsDataSetupFunc setup,
-                          ObActionsDataFreeFunc free,
-                          ObActionsRunFunc run,
-                          ObActionsInteractiveInputFunc i_input,
-                          ObActionsInteractiveCancelFunc i_cancel)
+ObActionsDefinition* do_register(const gchar *name,
+                                 ObActionsDataFreeFunc free,
+                                 ObActionsRunFunc run)
 {
     GSList *it;
     ObActionsDefinition *def;
 
     g_assert(run != NULL);
-    g_assert((i_input == NULL) == (i_cancel == NULL));
 
     for (it = registered; it; it = g_slist_next(it)) {
         def = it->data;
         if (!g_ascii_strcasecmp(name, def->name)) /* already registered */
-            return FALSE;
+            return NULL;
     }
 
     def = g_new(ObActionsDefinition, 1);
     def->ref = 1;
     def->name = g_strdup(name);
-    def->setup = setup;
     def->free = free;
     def->run = run;
-    def->i_input = i_input;
-    def->i_cancel = i_cancel;
 
     registered = g_slist_prepend(registered, def);
+    return def;
+}
+
+gboolean actions_register_i(const gchar *name,
+                            ObActionsIDataSetupFunc setup,
+                            ObActionsDataFreeFunc free,
+                            ObActionsRunFunc run)
+{
+    ObActionsDefinition *def = do_register(name, free, run);
+    if (def) {
+        def->canbeinteractive = TRUE;
+        def->setup.i = setup;
+    }
+    return def != NULL;
+}
 
-    return TRUE;
+gboolean actions_register(const gchar *name,
+                          ObActionsDataSetupFunc setup,
+                          ObActionsDataFreeFunc free,
+                          ObActionsRunFunc run)
+{
+    ObActionsDefinition *def = do_register(name, free, run);
+    if (def) {
+        def->canbeinteractive = FALSE;
+        def->setup.n = setup;
+    }
+    return def != NULL;
 }
 
 static void actions_definition_ref(ObActionsDefinition *def)
@@ -144,6 +168,10 @@ static ObActionsAct* actions_build_act_from_string(const gchar *name)
         act->ref = 1;
         act->def = def;
         actions_definition_ref(act->def);
+        act->i_pre = NULL;
+        act->i_input = NULL;
+        act->i_cancel = NULL;
+        act->i_post = NULL;
         act->options = NULL;
     } else
         g_message(_("Invalid action \"%s\" requested. No such action exists."),
@@ -156,9 +184,23 @@ ObActionsAct* actions_parse_string(const gchar *name)
 {
     ObActionsAct *act = NULL;
 
-    if ((act = actions_build_act_from_string(name)))
-        if (act->def->setup)
-            act->options = act->def->setup(NULL);
+    if ((act = actions_build_act_from_string(name))) {
+        if (act->def->canbeinteractive) {
+            if (act->def->setup.i) {
+                act->options = act->def->setup.i(NULL,
+                                                 &act->i_pre,
+                                                 &act->i_input,
+                                                 &act->i_cancel,
+                                                 &act->i_post);
+                g_assert(!!act->i_input == !!act->i_cancel);
+            }
+        }
+        else {
+            if (act->def->setup.n)
+                act->options = act->def->setup.n(NULL);
+        }
+    }
+                
 
     return act;
 }
@@ -169,11 +211,23 @@ ObActionsAct* actions_parse(xmlNodePtr node)
     ObActionsAct *act = NULL;
 
     if (obt_parse_attr_string(node, "name", &name)) {
-        if ((act = actions_build_act_from_string(name)))
+        if ((act = actions_build_act_from_string(name))) {
             /* there is more stuff to parse here */
-            if (act->def->setup)
-                act->options = act->def->setup(node->children);
-
+            if (act->def->canbeinteractive) {
+                if (act->def->setup.i) {
+                    act->options = act->def->setup.i(node->children,
+                                                     &act->i_pre,
+                                                     &act->i_input,
+                                                     &act->i_cancel,
+                                                     &act->i_post);
+                    g_assert(!!act->i_input == !!act->i_cancel);
+                }
+            }
+            else {
+                if (act->def->setup.n)
+                    act->options = act->def->setup.n(node->children);
+            }
+        }
         g_free(name);
     }
 
@@ -182,7 +236,7 @@ ObActionsAct* actions_parse(xmlNodePtr node)
 
 gboolean actions_act_is_interactive(ObActionsAct *act)
 {
-    return act->def->i_cancel != NULL;
+    return act->i_cancel != NULL;
 }
 
 void actions_act_ref(ObActionsAct *act)
@@ -253,6 +307,8 @@ void actions_run_acts(GSList *acts,
                 /* cancel the old one */
                 if (interactive_act)
                     actions_interactive_cancel_act();
+                if (act->i_pre)
+                    act->i_pre(act->options);
                 ok = actions_interactive_begin_act(act, state);
             }
         }
@@ -264,7 +320,7 @@ void actions_run_acts(GSList *acts,
                     actions_interactive_end_act();
             } else {
                 /* make sure its interactive if it returned TRUE */
-                g_assert(act->def->i_cancel && act->def->i_input);
+                g_assert(act->i_cancel);
 
                 /* no actions are run after the interactive one */
                 break;
@@ -281,7 +337,7 @@ gboolean actions_interactive_act_running(void)
 void actions_interactive_cancel_act(void)
 {
     if (interactive_act) {
-        interactive_act->def->i_cancel(interactive_act->options);
+        interactive_act->i_cancel(interactive_act->options);
         actions_interactive_end_act();
     }
 }
@@ -309,6 +365,9 @@ static void actions_interactive_end_act(void)
     if (interactive_act) {
         ungrab_keyboard();
 
+        if (interactive_act->i_post)
+            interactive_act->i_post(interactive_act->options);
+
         actions_act_unref(interactive_act);
         interactive_act = NULL;
     }
@@ -318,8 +377,8 @@ gboolean actions_interactive_input_event(XEvent *e)
 {
     gboolean used = FALSE;
     if (interactive_act) {
-        if (!interactive_act->def->i_input(interactive_initial_state, e,
-                                           interactive_act->options, &used))
+        if (!interactive_act->i_input(interactive_initial_state, e,
+                                      interactive_act->options, &used))
         {
             used = TRUE; /* if it cancelled the action then it has to of
                             been used */
index 7a09a665509072b58a6ef740957d6e6d45f0d3b7..de86b9e1212ca82053295a34f9b43f4b4fde0d18 100644 (file)
@@ -31,15 +31,24 @@ typedef struct _ObActionsGlobalData   ObActionsGlobalData;
 typedef struct _ObActionsClientData   ObActionsClientData;
 typedef struct _ObActionsSelectorData ObActionsSelectorData;
 
-typedef gpointer (*ObActionsDataSetupFunc)(xmlNodePtr node);
 typedef void     (*ObActionsDataFreeFunc)(gpointer options);
 typedef gboolean (*ObActionsRunFunc)(ObActionsData *data,
                                      gpointer options);
-typedef gboolean (*ObActionsInteractiveInputFunc)(guint initial_state,
+typedef gpointer (*ObActionsDataSetupFunc)(xmlNodePtr node);
+
+/* functions for interactive actions */
+typedef void     (*ObActionsIPreFunc)(gpointer options);
+typedef void     (*ObActionsIPostFunc)(gpointer options);
+typedef gboolean (*ObActionsIInputFunc)(guint initial_state,
                                                   XEvent *e,
                                                   gpointer options,
                                                   gboolean *used);
-typedef void     (*ObActionsInteractiveCancelFunc)(gpointer options);
+typedef void     (*ObActionsICancelFunc)(gpointer options);
+typedef gpointer (*ObActionsIDataSetupFunc)(xmlNodePtr node,
+                                            ObActionsIPreFunc *pre,
+                                            ObActionsIInputFunc *input,
+                                            ObActionsICancelFunc *cancel,
+                                            ObActionsIPostFunc *post);
 
 struct _ObActionsData {
     ObUserAction uact;
@@ -55,14 +64,16 @@ struct _ObActionsData {
 void actions_startup(gboolean reconfigure);
 void actions_shutdown(gboolean reconfigure);
 
-/*! If the action is interactive, then i_input and i_cancel are not NULL.
-  Otherwise, they should both be NULL. */
+/*! Use this if the actions created from this name may be interactive */
+gboolean actions_register_i(const gchar *name,
+                            ObActionsIDataSetupFunc setup,
+                            ObActionsDataFreeFunc free,
+                            ObActionsRunFunc run);
+
 gboolean actions_register(const gchar *name,
                           ObActionsDataSetupFunc setup,
                           ObActionsDataFreeFunc free,
-                          ObActionsRunFunc run,
-                          ObActionsInteractiveInputFunc i_input,
-                          ObActionsInteractiveCancelFunc i_cancel);
+                          ObActionsRunFunc run);
 
 ObActionsAct* actions_parse(xmlNodePtr node);
 ObActionsAct* actions_parse_string(const gchar *name);
index 1e7f0b57ac4b18a9e00d4e0f7d0aa40a0136b0c3..111742c1d44afd24ee53d24921c41933b01f4fba 100644 (file)
@@ -19,20 +19,17 @@ static gpointer setup_removelast_func(xmlNodePtr node);
 
 void action_addremovedesktop_startup(void)
 {
-    actions_register("AddDesktop", setup_add_func, g_free, run_func,
-                     NULL, NULL);
-    actions_register("RemoveDesktop", setup_remove_func, g_free, run_func,
-                     NULL, NULL);
+    actions_register("AddDesktop", setup_add_func, g_free, run_func);
+    actions_register("RemoveDesktop", setup_remove_func, g_free, run_func);
 
     /* 3.4-compatibility */
-    actions_register("AddDesktopLast", setup_addlast_func, g_free, run_func,
-                     NULL, NULL);
-    actions_register("RemoveDesktopLast", setup_removelast_func, g_free, run_func,
-                     NULL, NULL);
-    actions_register("AddDesktopCurrent", setup_addcurrent_func, g_free, run_func,
-                     NULL, NULL);
-    actions_register("RemoveDesktopCurrent", setup_removecurrent_func, g_free, run_func,
-                     NULL, NULL);
+    actions_register("AddDesktopLast", setup_addlast_func, g_free, run_func);
+    actions_register("RemoveDesktopLast", setup_removelast_func,
+                     g_free, run_func);
+    actions_register("AddDesktopCurrent", setup_addcurrent_func,
+                     g_free, run_func);
+    actions_register("RemoveDesktopCurrent", setup_removecurrent_func,
+                     g_free, run_func);
 }
 
 static gpointer setup_func(xmlNodePtr node)
index 9804091b43c3ea1ccc1e13891690a4cac4d50109..8c004582cc95b49fe801b94723cc002e542a4e6a 100644 (file)
@@ -7,8 +7,7 @@ void action_breakchroot_startup(void)
 {
     actions_register("BreakChroot",
                      NULL, NULL,
-                     run_func,
-                     NULL, NULL);
+                     run_func);
 }
 
 /* Always return FALSE because its not interactive */
index ab75e05da4d1578ce5bf4c983c3467c66e0ac62f..d2bc96c2166e424eacbb9c550f50d3f5bda332ce 100644 (file)
@@ -7,8 +7,7 @@ void action_close_startup(void)
 {
     actions_register("Close",
                      NULL, NULL,
-                     run_func,
-                     NULL, NULL);
+                     run_func);
 }
 
 /* Always return FALSE because its not interactive */
index 6d8478374590f6728026dd6e7db81eae0bf3bf4e..3d021bda734bf61da7d7b7644e5398da87664e6c 100644 (file)
@@ -16,13 +16,28 @@ typedef struct {
     gboolean raise;
     ObFocusCyclePopupMode dialog_mode;
     GSList *actions;
-} Options;
 
-static gboolean cycling = FALSE;
 
-static gpointer setup_func(xmlNodePtr node);
-static gpointer setup_forward_func(xmlNodePtr node);
-static gpointer setup_backward_func(xmlNodePtr node);
+    /* options for after we're done */
+    gboolean cancel; /* did the user cancel or not */
+    guint state;     /* keyboard state when finished */
+} Options;
+
+static gpointer setup_func(xmlNodePtr node,
+                           ObActionsIPreFunc *pre,
+                           ObActionsIInputFunc *in,
+                           ObActionsICancelFunc *c,
+                           ObActionsIPreFunc *post);
+static gpointer setup_forward_func(xmlNodePtr node,
+                                   ObActionsIPreFunc *pre,
+                                   ObActionsIInputFunc *in,
+                                   ObActionsICancelFunc *c,
+                                   ObActionsIPreFunc *post);
+static gpointer setup_backward_func(xmlNodePtr node,
+                                    ObActionsIPreFunc *pre,
+                                    ObActionsIInputFunc *in,
+                                    ObActionsICancelFunc *c,
+                                    ObActionsIPreFunc *post);
 static void     free_func(gpointer options);
 static gboolean run_func(ObActionsData *data, gpointer options);
 static gboolean i_input_func(guint initial_state,
@@ -30,18 +45,20 @@ static gboolean i_input_func(guint initial_state,
                              gpointer options,
                              gboolean *used);
 static void     i_cancel_func(gpointer options);
-
-static void     end_cycle(gboolean cancel, guint state, Options *o);
+static void     i_post_func(gpointer options);
 
 void action_cyclewindows_startup(void)
 {
-    actions_register("NextWindow", setup_forward_func, free_func,
-                     run_func, i_input_func, i_cancel_func);
-    actions_register("PreviousWindow", setup_backward_func, free_func,
-                     run_func, i_input_func, i_cancel_func);
+    actions_register_i("NextWindow", setup_forward_func, free_func, run_func);
+    actions_register_i("PreviousWindow", setup_backward_func, free_func,
+                       run_func);
 }
 
-static gpointer setup_func(xmlNodePtr node)
+static gpointer setup_func(xmlNodePtr node,
+                           ObActionsIPreFunc *pre,
+                           ObActionsIInputFunc *input,
+                           ObActionsICancelFunc *cancel,
+                           ObActionsIPreFunc *post)
 {
     xmlNodePtr n;
     Options *o;
@@ -88,19 +105,30 @@ static gpointer setup_func(xmlNodePtr node)
                                      actions_parse_string("Unshade"));
     }
 
+    *input = i_input_func;
+    *cancel = i_cancel_func;
+    *post = i_post_func;
     return o;
 }
 
-static gpointer setup_forward_func(xmlNodePtr node)
+static gpointer setup_forward_func(xmlNodePtr node,
+                                   ObActionsIPreFunc *pre,
+                                   ObActionsIInputFunc *input,
+                                   ObActionsICancelFunc *cancel,
+                                   ObActionsIPreFunc *post)
 {
-    Options *o = setup_func(node);
+    Options *o = setup_func(node, pre, input, cancel, post);
     o->forward = TRUE;
     return o;
 }
 
-static gpointer setup_backward_func(xmlNodePtr node)
+static gpointer setup_backward_func(xmlNodePtr node,
+                                    ObActionsIPreFunc *pre,
+                                    ObActionsIInputFunc *input,
+                                    ObActionsICancelFunc *cancel,
+                                    ObActionsIPreFunc *post)
 {
-    Options *o = setup_func(node);
+    Options *o = setup_func(node, pre, input, cancel, post);
     o->forward = FALSE;
     return o;
 }
@@ -131,7 +159,6 @@ static gboolean run_func(ObActionsData *data, gpointer options)
                      o->bar,
                      o->dialog_mode,
                      FALSE, FALSE);
-    cycling = TRUE;
 
     stacking_restore();
     if (o->raise && ft) stacking_temp_raise(CLIENT_AS_WINDOW(ft));
@@ -144,10 +171,13 @@ static gboolean i_input_func(guint initial_state,
                              gpointer options,
                              gboolean *used)
 {
+    Options *o = options;
+
     if (e->type == KeyPress) {
         /* Escape cancels no matter what */
         if (ob_keycode_match(e->xkey.keycode, OB_KEY_ESCAPE)) {
-            end_cycle(TRUE, e->xkey.state, options);
+            o->cancel = TRUE;
+            o->state = e->xkey.state;
             return FALSE;
         }
 
@@ -155,7 +185,8 @@ static gboolean i_input_func(guint initial_state,
         else if (ob_keycode_match(e->xkey.keycode, OB_KEY_RETURN) &&
                  !initial_state)
         {
-            end_cycle(FALSE, e->xkey.state, options);
+            o->cancel = FALSE;
+            o->state = e->xkey.state;
             return FALSE;
         }
     }
@@ -163,7 +194,8 @@ static gboolean i_input_func(guint initial_state,
     else if (e->type == KeyRelease && initial_state &&
              (e->xkey.state & initial_state) == 0)
     {
-        end_cycle(FALSE, e->xkey.state, options);
+        o->cancel = FALSE;
+        o->state = e->xkey.state;
         return FALSE;
     }
 
@@ -172,14 +204,14 @@ static gboolean i_input_func(guint initial_state,
 
 static void i_cancel_func(gpointer options)
 {
-    /* we get cancelled when we move focus, but we're not cycling anymore, so
-       just ignore that */
-    if (cycling)
-        end_cycle(TRUE, 0, options);
+    Options *o = options;
+    o->cancel = TRUE;
+    o->state = 0;
 }
 
-static void end_cycle(gboolean cancel, guint state, Options *o)
+static void i_post_func(gpointer options)
 {
+    Options *o = options;
     struct _ObClient *ft;
 
     ft = focus_cycle(o->forward,
@@ -190,12 +222,11 @@ static void end_cycle(gboolean cancel, guint state, Options *o)
                      TRUE,
                      o->bar,
                      o->dialog_mode,
-                     TRUE, cancel);
-    cycling = FALSE;
+                     TRUE, o->cancel);
 
     if (ft)
         actions_run_acts(o->actions, OB_USER_ACTION_KEYBOARD_KEY,
-                         state, -1, -1, 0, OB_FRAME_CONTEXT_NONE, ft);
+                         o->state, -1, -1, 0, OB_FRAME_CONTEXT_NONE, ft);
 
     stacking_restore();
 }
index 99e838a64c7dbee4a88d365cef6b6384dfcee480..3ae0901607fc698f3587d18438b43b6166858ac4 100644 (file)
@@ -11,7 +11,7 @@ static gboolean run_func(ObActionsData *data, gpointer options);
 
 void action_debug_startup(void)
 {
-    actions_register("Debug", setup_func, free_func, run_func, NULL, NULL);
+    actions_register("Debug", setup_func, free_func, run_func);
 }
 
 static gpointer setup_func(xmlNodePtr node)
index e85fb8ef1c9dbb3b22ebb4a74fedebc77ad5c6ff..f6fd2cbeb7762df6a5567a9459d959beefdc14fc 100644 (file)
@@ -7,10 +7,9 @@ static gboolean run_func_toggle(ObActionsData *data, gpointer options);
 
 void action_decorations_startup(void)
 {
-    actions_register("Decorate", NULL, NULL, run_func_on, NULL, NULL);
-    actions_register("Undecorate", NULL, NULL, run_func_off, NULL, NULL);
-    actions_register("ToggleDecorations", NULL, NULL, run_func_toggle,
-                     NULL, NULL);
+    actions_register("Decorate", NULL, NULL, run_func_on);
+    actions_register("Undecorate", NULL, NULL, run_func_off);
+    actions_register("ToggleDecorations", NULL, NULL, run_func_toggle);
 }
 
 /* Always return FALSE because its not interactive */
index 3b33afbd08e7f5394d892d1314551e0c72bb09a4..27b717b173f2e771be30264254a9b3fac5ecc2cf 100644 (file)
@@ -49,43 +49,31 @@ static gpointer setup_send_down_func(xmlNodePtr node);
 
 void action_desktop_startup(void)
 {
-    actions_register("GoToDesktop", setup_go_func, g_free, run_func,
-                     NULL, NULL);
-    actions_register("SendToDesktop", setup_send_func, g_free, run_func,
-                     NULL, NULL);
+    actions_register("GoToDesktop", setup_go_func, g_free, run_func);
+    actions_register("SendToDesktop", setup_send_func, g_free, run_func);
     /* 3.4-compatibility */
-    actions_register("DesktopLast", setup_go_last_func, g_free, run_func,
-                     NULL, NULL);
-    actions_register("SendToDesktopLast", setup_send_last_func, g_free, run_func,
-                     NULL, NULL);
-    actions_register("Desktop", setup_go_abs_func, g_free, run_func,
-                     NULL, NULL);
-    actions_register("SendToDesktop", setup_send_abs_func, g_free, run_func,
-                     NULL, NULL);
-    actions_register("DesktopNext", setup_go_next_func, g_free, run_func,
-                     NULL, NULL);
-    actions_register("SendToDesktopNext", setup_send_next_func, g_free, run_func,
-                     NULL, NULL);
-    actions_register("DesktopPrevious", setup_go_prev_func, g_free, run_func,
-                     NULL, NULL);
-    actions_register("SendToDesktopPrevious", setup_send_prev_func, g_free, run_func,
-                     NULL, NULL);
-    actions_register("DesktopLeft", setup_go_left_func, g_free, run_func,
-                     NULL, NULL);
-    actions_register("SendToDesktopLeft", setup_send_left_func, g_free, run_func,
-                     NULL, NULL);
-    actions_register("DesktopRight", setup_go_right_func, g_free, run_func,
-                     NULL, NULL);
-    actions_register("SendToDesktopRight", setup_send_right_func, g_free, run_func,
-                     NULL, NULL);
-    actions_register("DesktopUp", setup_go_up_func, g_free, run_func,
-                     NULL, NULL);
-    actions_register("SendToDesktopUp", setup_send_up_func, g_free, run_func,
-                     NULL, NULL);
-    actions_register("DesktopDown", setup_go_down_func, g_free, run_func,
-                     NULL, NULL);
-    actions_register("SendToDesktopDown", setup_send_down_func, g_free, run_func,
-                     NULL, NULL);
+    actions_register("DesktopLast", setup_go_last_func, g_free, run_func);
+    actions_register("SendToDesktopLast", setup_send_last_func,
+                     g_free, run_func);
+    actions_register("Desktop", setup_go_abs_func, g_free, run_func);
+    actions_register("SendToDesktop", setup_send_abs_func, g_free, run_func);
+    actions_register("DesktopNext", setup_go_next_func, g_free, run_func);
+    actions_register("SendToDesktopNext", setup_send_next_func,
+                     g_free, run_func);
+    actions_register("DesktopPrevious", setup_go_prev_func, g_free, run_func);
+    actions_register("SendToDesktopPrevious", setup_send_prev_func,
+                     g_free, run_func);
+    actions_register("DesktopLeft", setup_go_left_func, g_free, run_func);
+    actions_register("SendToDesktopLeft", setup_send_left_func,
+                     g_free, run_func);
+    actions_register("DesktopRight", setup_go_right_func, g_free, run_func);
+    actions_register("SendToDesktopRight", setup_send_right_func,
+                     g_free, run_func);
+    actions_register("DesktopUp", setup_go_up_func, g_free, run_func);
+    actions_register("SendToDesktopUp", setup_send_up_func, g_free, run_func);
+    actions_register("DesktopDown", setup_go_down_func, g_free, run_func);
+    actions_register("SendToDesktopDown", setup_send_down_func,
+                     g_free, run_func);
 }
 
 static gpointer setup_go_func(xmlNodePtr node)
index 3d997aef2f5e6c426481cfc8ed451b615236cb86..0d1476c7936b3c1aab7b037c89524a015f534edc 100644 (file)
@@ -21,7 +21,11 @@ typedef struct {
 static gboolean cycling = FALSE;
 
 static gpointer setup_func(xmlNodePtr node);
-static gpointer setup_cycle_func(xmlNodePtr node);
+static gpointer setup_cycle_func(xmlNodePtr node,
+                                 ObActionsIPreFunc *pre,
+                                 ObActionsIInputFunc *input,
+                                 ObActionsICancelFunc *cancel,
+                                 ObActionsIPostFunc *post);
 static gpointer setup_target_func(xmlNodePtr node);
 static void     free_func(gpointer options);
 static gboolean run_func(ObActionsData *data, gpointer options);
@@ -34,14 +38,46 @@ static void     i_cancel_func(gpointer options);
 static void     end_cycle(gboolean cancel, guint state, Options *o);
 
 /* 3.4-compatibility */
-static gpointer setup_north_cycle_func(xmlNodePtr node);
-static gpointer setup_south_cycle_func(xmlNodePtr node);
-static gpointer setup_east_cycle_func(xmlNodePtr node);
-static gpointer setup_west_cycle_func(xmlNodePtr node);
-static gpointer setup_northwest_cycle_func(xmlNodePtr node);
-static gpointer setup_northeast_cycle_func(xmlNodePtr node);
-static gpointer setup_southwest_cycle_func(xmlNodePtr node);
-static gpointer setup_southeast_cycle_func(xmlNodePtr node);
+static gpointer setup_north_cycle_func(xmlNodePtr node,
+                                       ObActionsIPreFunc *pre,
+                                       ObActionsIInputFunc *in,
+                                       ObActionsICancelFunc *c,
+                                       ObActionsIPostFunc *post);
+static gpointer setup_south_cycle_func(xmlNodePtr node,
+                                       ObActionsIPreFunc *pre,
+                                       ObActionsIInputFunc *in,
+                                       ObActionsICancelFunc *c,
+                                       ObActionsIPostFunc *post);
+static gpointer setup_east_cycle_func(xmlNodePtr node,
+                                      ObActionsIPreFunc *pre,
+                                      ObActionsIInputFunc *in,
+                                      ObActionsICancelFunc *c,
+                                      ObActionsIPostFunc *post);
+static gpointer setup_west_cycle_func(xmlNodePtr node,
+                                      ObActionsIPreFunc *pre,
+                                      ObActionsIInputFunc *in,
+                                      ObActionsICancelFunc *c,
+                                      ObActionsIPostFunc *post);
+static gpointer setup_northwest_cycle_func(xmlNodePtr node,
+                                           ObActionsIPreFunc *pre,
+                                           ObActionsIInputFunc *in,
+                                           ObActionsICancelFunc *c,
+                                           ObActionsIPostFunc *post);
+static gpointer setup_northeast_cycle_func(xmlNodePtr node,
+                                           ObActionsIPreFunc *pre,
+                                           ObActionsIInputFunc *in,
+                                           ObActionsICancelFunc *c,
+                                           ObActionsIPostFunc *post);
+static gpointer setup_southwest_cycle_func(xmlNodePtr node,
+                                           ObActionsIPreFunc *pre,
+                                           ObActionsIInputFunc *in,
+                                           ObActionsICancelFunc *c,
+                                           ObActionsIPostFunc *post);
+static gpointer setup_southeast_cycle_func(xmlNodePtr node,
+                                           ObActionsIPreFunc *pre,
+                                           ObActionsIInputFunc *in,
+                                           ObActionsICancelFunc *c,
+                                           ObActionsIPostFunc *post);
 static gpointer setup_north_target_func(xmlNodePtr node);
 static gpointer setup_south_target_func(xmlNodePtr node);
 static gpointer setup_east_target_func(xmlNodePtr node);
@@ -53,43 +89,43 @@ static gpointer setup_southeast_target_func(xmlNodePtr node);
 
 void action_directionalwindows_startup(void)
 {
-    actions_register("DirectionalCycleWindows", setup_cycle_func, free_func,
-                     run_func, i_input_func, i_cancel_func);
+    actions_register_i("DirectionalCycleWindows", setup_cycle_func, free_func,
+                       run_func);
     actions_register("DirectionalTargetWindow", setup_target_func, free_func,
-                     run_func, NULL, NULL);
+                     run_func);
     /* 3.4-compatibility */
-    actions_register("DirectionalFocusNorth", setup_north_cycle_func,
-                     free_func, run_func, i_input_func, i_cancel_func);
-    actions_register("DirectionalFocusSouth", setup_south_cycle_func,
-                     free_func, run_func, i_input_func, i_cancel_func);
-    actions_register("DirectionalFocusWest", setup_west_cycle_func,
-                     free_func, run_func, i_input_func, i_cancel_func);
-    actions_register("DirectionalFocusEast", setup_east_cycle_func,
-                     free_func, run_func, i_input_func, i_cancel_func);
-    actions_register("DirectionalFocusNorthWest", setup_northwest_cycle_func,
-                     free_func, run_func, i_input_func, i_cancel_func);
-    actions_register("DirectionalFocusNorthEast", setup_northeast_cycle_func,
-                     free_func, run_func, i_input_func, i_cancel_func);
-    actions_register("DirectionalFocusSouthWest", setup_southwest_cycle_func,
-                     free_func, run_func, i_input_func, i_cancel_func);
-    actions_register("DirectionalFocusSouthEast", setup_southeast_cycle_func,
-                     free_func, run_func, i_input_func, i_cancel_func);
+    actions_register_i("DirectionalFocusNorth", setup_north_cycle_func,
+                       free_func, run_func);
+    actions_register_i("DirectionalFocusSouth", setup_south_cycle_func,
+                       free_func, run_func);
+    actions_register_i("DirectionalFocusWest", setup_west_cycle_func,
+                       free_func, run_func);
+    actions_register_i("DirectionalFocusEast", setup_east_cycle_func,
+                       free_func, run_func);
+    actions_register_i("DirectionalFocusNorthWest", setup_northwest_cycle_func,
+                       free_func, run_func);
+    actions_register_i("DirectionalFocusNorthEast", setup_northeast_cycle_func,
+                       free_func, run_func);
+    actions_register_i("DirectionalFocusSouthWest", setup_southwest_cycle_func,
+                       free_func, run_func);
+    actions_register_i("DirectionalFocusSouthEast", setup_southeast_cycle_func,
+                       free_func, run_func);
     actions_register("DirectionalTargetNorth", setup_north_target_func,
-                     free_func, run_func, i_input_func, i_cancel_func);
+                     free_func, run_func);
     actions_register("DirectionalTargetSouth", setup_south_target_func,
-                     free_func, run_func, i_input_func, i_cancel_func);
+                     free_func, run_func);
     actions_register("DirectionalTargetWest", setup_west_target_func,
-                     free_func, run_func, i_input_func, i_cancel_func);
+                     free_func, run_func);
     actions_register("DirectionalTargetEast", setup_east_target_func,
-                     free_func, run_func, i_input_func, i_cancel_func);
+                     free_func, run_func);
     actions_register("DirectionalTargetNorthWest", setup_northwest_target_func,
-                     free_func, run_func, i_input_func, i_cancel_func);
+                     free_func, run_func);
     actions_register("DirectionalTargetNorthEast", setup_northeast_target_func,
-                     free_func, run_func, i_input_func, i_cancel_func);
+                     free_func, run_func);
     actions_register("DirectionalTargetSouthWest", setup_southwest_target_func,
-                     free_func, run_func, i_input_func, i_cancel_func);
+                     free_func, run_func);
     actions_register("DirectionalTargetSouthEast", setup_southeast_target_func,
-                     free_func, run_func, i_input_func, i_cancel_func);
+                     free_func, run_func);
 }
 
 static gpointer setup_func(xmlNodePtr node)
@@ -158,10 +194,16 @@ static gpointer setup_func(xmlNodePtr node)
     return o;
 }
 
-static gpointer setup_cycle_func(xmlNodePtr node)
+static gpointer setup_cycle_func(xmlNodePtr node,
+                                 ObActionsIPreFunc *pre,
+                                 ObActionsIInputFunc *input,
+                                 ObActionsICancelFunc *cancel,
+                                 ObActionsIPostFunc *post)
 {
     Options *o = setup_func(node);
     o->interactive = TRUE;
+    *input = i_input_func;
+    *cancel = i_cancel_func;
     return o;
 }
 
@@ -269,58 +311,90 @@ static void end_cycle(gboolean cancel, guint state, Options *o)
 }
 
 /* 3.4-compatibility */
-static gpointer setup_north_cycle_func(xmlNodePtr node)
+static gpointer setup_north_cycle_func(xmlNodePtr node,
+                                       ObActionsIPreFunc *pre,
+                                       ObActionsIInputFunc *input,
+                                       ObActionsICancelFunc *cancel,
+                                       ObActionsIPostFunc *post)
 {
-    Options *o = setup_cycle_func(node);
+    Options *o = setup_cycle_func(node, pre, input, cancel, post);
     o->direction = OB_DIRECTION_NORTH;
     return o;
 }
 
-static gpointer setup_south_cycle_func(xmlNodePtr node)
+static gpointer setup_south_cycle_func(xmlNodePtr node,
+                                       ObActionsIPreFunc *pre,
+                                       ObActionsIInputFunc *input,
+                                       ObActionsICancelFunc *cancel,
+                                       ObActionsIPostFunc *post)
 {
-    Options *o = setup_cycle_func(node);
+    Options *o = setup_cycle_func(node, pre, input, cancel, post);
     o->direction = OB_DIRECTION_SOUTH;
     return o;
 }
 
-static gpointer setup_east_cycle_func(xmlNodePtr node)
+static gpointer setup_east_cycle_func(xmlNodePtr node,
+                                      ObActionsIPreFunc *pre,
+                                      ObActionsIInputFunc *input,
+                                      ObActionsICancelFunc *cancel,
+                                      ObActionsIPostFunc *post)
 {
-    Options *o = setup_cycle_func(node);
+    Options *o = setup_cycle_func(node, pre, input, cancel, post);
     o->direction = OB_DIRECTION_EAST;
     return o;
 }
 
-static gpointer setup_west_cycle_func(xmlNodePtr node)
+static gpointer setup_west_cycle_func(xmlNodePtr node,
+                                      ObActionsIPreFunc *pre,
+                                      ObActionsIInputFunc *input,
+                                      ObActionsICancelFunc *cancel,
+                                      ObActionsIPostFunc *post)
 {
-    Options *o = setup_cycle_func(node);
+    Options *o = setup_cycle_func(node, pre, input, cancel, post);
     o->direction = OB_DIRECTION_WEST;
     return o;
 }
 
-static gpointer setup_northwest_cycle_func(xmlNodePtr node)
+static gpointer setup_northwest_cycle_func(xmlNodePtr node,
+                                           ObActionsIPreFunc *pre,
+                                           ObActionsIInputFunc *input,
+                                           ObActionsICancelFunc *cancel,
+                                           ObActionsIPostFunc *post)
 {
-    Options *o = setup_cycle_func(node);
+    Options *o = setup_cycle_func(node, pre, input, cancel, post);
     o->direction = OB_DIRECTION_NORTHWEST;
     return o;
 }
 
-static gpointer setup_northeast_cycle_func(xmlNodePtr node)
+static gpointer setup_northeast_cycle_func(xmlNodePtr node,
+                                           ObActionsIPreFunc *pre,
+                                           ObActionsIInputFunc *input,
+                                           ObActionsICancelFunc *cancel,
+                                           ObActionsIPostFunc *post)
 {
-    Options *o = setup_cycle_func(node);
+    Options *o = setup_cycle_func(node, pre, input, cancel, post);
     o->direction = OB_DIRECTION_EAST;
     return o;
 }
 
-static gpointer setup_southwest_cycle_func(xmlNodePtr node)
+static gpointer setup_southwest_cycle_func(xmlNodePtr node,
+                                           ObActionsIPreFunc *pre,
+                                           ObActionsIInputFunc *input,
+                                           ObActionsICancelFunc *cancel,
+                                           ObActionsIPostFunc *post)
 {
-    Options *o = setup_cycle_func(node);
+    Options *o = setup_cycle_func(node, pre, input, cancel, post);
     o->direction = OB_DIRECTION_SOUTHWEST;
     return o;
 }
 
-static gpointer setup_southeast_cycle_func(xmlNodePtr node)
+static gpointer setup_southeast_cycle_func(xmlNodePtr node,
+                                           ObActionsIPreFunc *pre,
+                                           ObActionsIInputFunc *input,
+                                           ObActionsICancelFunc *cancel,
+                                           ObActionsIPostFunc *post)
 {
-    Options *o = setup_cycle_func(node);
+    Options *o = setup_cycle_func(node, pre, input, cancel, post);
     o->direction = OB_DIRECTION_SOUTHEAST;
     return o;
 }
index 5e5382d4475adb780df2f6d481183289602efbe2..4a750b2c3a368ebea5bcbc03842772db92168578 100644 (file)
@@ -8,8 +8,7 @@ void action_dockautohide_startup(void)
 {
     actions_register("ToggleDockAutoHide",
                      NULL, NULL,
-                     run_func,
-                     NULL, NULL);
+                     run_func);
 }
 
 /* Always return FALSE because its not interactive */
index 4d29fc19bd682ff1fa7de68ad5da51b64dcb9933..bde7f5d25a24ff4dc66dbd154fa160580646597e 100644 (file)
@@ -33,7 +33,7 @@ static void     i_cancel_func(gpointer options);
 
 void action_execute_startup(void)
 {
-    actions_register("Execute", setup_func, free_func, run_func, NULL, NULL);
+    actions_register("Execute", setup_func, free_func, run_func);
 }
 
 static gpointer setup_func(xmlNodePtr node)
index 3bfebbce3175e60cca7fceec9a0272a4f35caa90..55d89a0b62512538817ef47f823cc0cc86cc081c 100644 (file)
@@ -13,8 +13,8 @@ static gboolean run_func(ObActionsData *data, gpointer options);
 
 void action_exit_startup(void)
 {
-    actions_register("Exit", setup_func, NULL, run_func, NULL, NULL);
-    actions_register("SessionLogout", setup_func, NULL, run_func, NULL, NULL);
+    actions_register("Exit", setup_func, NULL, run_func);
+    actions_register("SessionLogout", setup_func, NULL, run_func);
 }
 
 static gpointer setup_func(xmlNodePtr node)
index e25a79eac09b6b653d7ec21e4b3986339202603e..0e546deabd7021b321365ec1229198d7e927d1be 100644 (file)
@@ -13,7 +13,7 @@ static gboolean run_func(ObActionsData *data, gpointer options);
 
 void action_focus_startup(void)
 {
-    actions_register("Focus", setup_func, g_free, run_func, NULL, NULL);
+    actions_register("Focus", setup_func, g_free, run_func);
 }
 
 static gpointer setup_func(xmlNodePtr node)
index 49c945b9362cbb91372c01b7b075e23b7b29e48f..a3e5b5aca2f0200cea76f435f7aaa6ea46380d3d 100644 (file)
@@ -5,7 +5,7 @@ static gboolean run_func(ObActionsData *data, gpointer options);
 
 void action_focustobottom_startup(void)
 {
-    actions_register("FocusToBottom", NULL, NULL, run_func, NULL, NULL);
+    actions_register("FocusToBottom", NULL, NULL, run_func);
 }
 
 /* Always return FALSE because its not interactive */
index 7579b95d17005c8b354c7ba7d1b6b067ffecee8d..e1fdf232ab5e80038ada460a7ec1adcedff57f11 100644 (file)
@@ -5,8 +5,7 @@ static gboolean run_func_toggle(ObActionsData *data, gpointer options);
 
 void action_fullscreen_startup(void)
 {
-    actions_register("ToggleFullscreen", NULL, NULL, run_func_toggle,
-                     NULL, NULL);
+    actions_register("ToggleFullscreen", NULL, NULL, run_func_toggle);
 }
 
 /* Always return FALSE because its not interactive */
index 2a31496ab3a8e32330588e37b630614659f57783..0c39a63ea9b0d07519f3fc506f9c4ecba829834e 100644 (file)
@@ -22,18 +22,14 @@ static gpointer setup_west_func(xmlNodePtr node);
 void action_growtoedge_startup(void)
 {
     actions_register("GrowToEdge", setup_func,
-                     g_free, run_func, NULL, NULL);
+                     g_free, run_func);
     actions_register("ShrinkToEdge", setup_shrink_func,
-                     g_free, run_func, NULL, NULL);
+                     g_free, run_func);
     /* 3.4-compatibility */
-    actions_register("GrowToEdgeNorth", setup_north_func, g_free, run_func,
-                     NULL, NULL);
-    actions_register("GrowToEdgeSouth", setup_south_func, g_free, run_func,
-                     NULL, NULL);
-    actions_register("GrowToEdgeEast", setup_east_func, g_free, run_func,
-                     NULL, NULL);
-    actions_register("GrowToEdgeWest", setup_west_func, g_free, run_func,
-                     NULL, NULL);
+    actions_register("GrowToEdgeNorth", setup_north_func, g_free, run_func);
+    actions_register("GrowToEdgeSouth", setup_south_func, g_free, run_func);
+    actions_register("GrowToEdgeEast", setup_east_func, g_free, run_func);
+    actions_register("GrowToEdgeWest", setup_west_func, g_free, run_func);
 }
 
 static gpointer setup_func(xmlNodePtr node)
index 6f14a2e070760efad8f29e280909059e73a2829a..e6bdbb7b247f6104a23792195db8e88e49d25c09 100644 (file)
@@ -7,8 +7,7 @@ void action_iconify_startup(void)
 {
     actions_register("Iconify",
                      NULL, NULL,
-                     run_func,
-                     NULL, NULL);
+                     run_func);
 }
 
 /* Always return FALSE because its not interactive */
index 833bdd3a19764669466cd0ae7a50760f98a4c50d..47ff2fd58e3c5cd252719328add4f1ff11ac52c1 100644 (file)
@@ -29,7 +29,7 @@ static gboolean run_func(ObActionsData *data, gpointer options);
 
 void action_if_startup(void)
 {
-    actions_register("If", setup_func, free_func, run_func, NULL, NULL);
+    actions_register("If", setup_func, free_func, run_func);
 }
 
 static gpointer setup_func(xmlNodePtr node)
index 68244407bb0a344e623812dac18ad0a157e780c8..b7d547b9d5b1ee6a07f87ceee94dcc5fe4ee7f97 100644 (file)
@@ -7,8 +7,7 @@ void action_kill_startup(void)
 {
     actions_register("Kill",
                      NULL, NULL,
-                     run_func,
-                     NULL, NULL);
+                     run_func);
 }
 
 /* Always return FALSE because its not interactive */
index 1d522bbc87824e6b82ae5a9c6fccdbf5dc4292d8..1dc7c4cf5d30f037dab6de394fc7d6d5ecb35d59 100644 (file)
@@ -18,18 +18,18 @@ static gpointer setup_sendnormal_func(xmlNodePtr node);
 void action_layer_startup(void)
 {
     actions_register("ToggleAlwaysOnTop", setup_func_top, g_free,
-                     run_func, NULL, NULL);
+                     run_func);
     actions_register("ToggleAlwaysOnBottom", setup_func_bottom, g_free,
-                     run_func, NULL, NULL);
+                     run_func);
     actions_register("SendToLayer", setup_func_send, g_free,
-                     run_func, NULL, NULL);
+                     run_func);
     /* 3.4-compatibility */
     actions_register("SendToTopLayer", setup_sendtop_func, g_free,
-                     run_func, NULL, NULL);
+                     run_func);
     actions_register("SendToBottomLayer", setup_sendbottom_func, g_free,
-                     run_func, NULL, NULL);
+                     run_func);
     actions_register("SendToNormalLayer", setup_sendnormal_func, g_free,
-                     run_func, NULL, NULL);
+                     run_func);
 }
 
 static gpointer setup_func_top(xmlNodePtr node)
index d34e933bc738a9e86203fb45d9fb26223421aa1e..80ca6b8bcf9fc22c2d229e9f1b2cddb4c299769e 100644 (file)
@@ -8,8 +8,7 @@ void action_lower_startup(void)
 {
     actions_register("Lower",
                      NULL, NULL,
-                     run_func,
-                     NULL, NULL);
+                     run_func);
 }
 
 /* Always return FALSE because its not interactive */
index 5cc7141b6893d0abb0042d52e7649aeb6b1d4c75..90a8403959cd99d9c46b905cdf134dff02a016d3 100644 (file)
@@ -23,31 +23,28 @@ static gpointer setup_vert_func(xmlNodePtr node);
 
 void action_maximize_startup(void)
 {
-    actions_register("Maximize", setup_func, g_free, run_func_on,
-                     NULL, NULL);
-    actions_register("Unmaximize", setup_func, g_free, run_func_off,
-                     NULL, NULL);
-    actions_register("ToggleMaximize", setup_func, g_free, run_func_toggle,
-                     NULL, NULL);
+    actions_register("Maximize", setup_func, g_free, run_func_on);
+    actions_register("Unmaximize", setup_func, g_free, run_func_off);
+    actions_register("ToggleMaximize", setup_func, g_free, run_func_toggle);
     /* 3.4-compatibility */
     actions_register("MaximizeFull", setup_both_func, g_free,
-                     run_func_on, NULL, NULL);
+                     run_func_on);
     actions_register("UnmaximizeFull", setup_both_func, g_free,
-                     run_func_off, NULL, NULL);
+                     run_func_off);
     actions_register("ToggleMaximizeFull", setup_both_func, g_free,
-                     run_func_toggle, NULL, NULL);
+                     run_func_toggle);
     actions_register("MaximizeHorz", setup_horz_func, g_free,
-                     run_func_on, NULL, NULL);
+                     run_func_on);
     actions_register("UnmaximizeHorz", setup_horz_func, g_free,
-                     run_func_off, NULL, NULL);
+                     run_func_off);
     actions_register("ToggleMaximizeHorz", setup_horz_func, g_free,
-                     run_func_toggle, NULL, NULL);
+                     run_func_toggle);
     actions_register("MaximizeVert", setup_vert_func, g_free,
-                     run_func_on, NULL, NULL);
+                     run_func_on);
     actions_register("UnmaximizeVert", setup_vert_func, g_free,
-                     run_func_off, NULL, NULL);
+                     run_func_off);
     actions_register("ToggleMaximizeVert", setup_vert_func, g_free,
-                     run_func_toggle, NULL, NULL);
+                     run_func_toggle);
 }
 
 static gpointer setup_func(xmlNodePtr node)
index ddd3f59af7d1a76fb9144132c933e0612e112f59..ba8372a584bb0ad50e21ff35397b04385dfe06e3 100644 (file)
@@ -8,8 +8,7 @@ void action_move_startup(void)
 {
     actions_register("Move",
                      NULL, NULL,
-                     run_func,
-                     NULL, NULL);
+                     run_func);
 }
 
 /* Always return FALSE because its not interactive */
index 4e6e5998a62a988bc3d1cd463e143328cc4d3335..5bcdda446b80c19d901dea48635b37a81ab9244a 100644 (file)
@@ -14,7 +14,7 @@ static gboolean run_func(ObActionsData *data, gpointer options);
 
 void action_moverelative_startup(void)
 {
-    actions_register("MoveRelative", setup_func, g_free, run_func, NULL, NULL);
+    actions_register("MoveRelative", setup_func, g_free, run_func);
 }
 
 static gpointer setup_func(xmlNodePtr node)
index fc171fcc741430dbfa4abc2c552228f5ee7ea384..3c135c8995e5bc60c9bf5be2d4c23dc2b7757748 100644 (file)
@@ -30,10 +30,9 @@ static gpointer setup_center_func(xmlNodePtr node);
 
 void action_moveresizeto_startup(void)
 {
-    actions_register("MoveResizeTo", setup_func, g_free, run_func, NULL, NULL);
-/* 3.4-compatibility */
-    actions_register("MoveToCenter", setup_center_func, g_free, run_func,
-                     NULL, NULL);
+    actions_register("MoveResizeTo", setup_func, g_free, run_func);
+    /* 3.4-compatibility */
+    actions_register("MoveToCenter", setup_center_func, g_free, run_func);
 }
 
 static void parse_coord(xmlNodePtr n, gint *pos,
index 51215fd2cab5ae9ebd74621887fe4eba625f8ab3..e7384dadc277bb9f6faaf31e234e73a995449730 100644 (file)
@@ -19,16 +19,12 @@ static gpointer setup_west_func(xmlNodePtr node);
 
 void action_movetoedge_startup(void)
 {
-    actions_register("MoveToEdge", setup_func, g_free, run_func, NULL, NULL);
+    actions_register("MoveToEdge", setup_func, g_free, run_func);
     /* 3.4-compatibility */
-    actions_register("MoveToEdgeNorth", setup_north_func, g_free, run_func,
-                     NULL, NULL);
-    actions_register("MoveToEdgeSouth", setup_south_func, g_free, run_func,
-                     NULL, NULL);
-    actions_register("MoveToEdgeEast", setup_east_func, g_free, run_func,
-                     NULL, NULL);
-    actions_register("MoveToEdgeWest", setup_west_func, g_free, run_func,
-                     NULL, NULL);
+    actions_register("MoveToEdgeNorth", setup_north_func, g_free, run_func);
+    actions_register("MoveToEdgeSouth", setup_south_func, g_free, run_func);
+    actions_register("MoveToEdgeEast", setup_east_func, g_free, run_func);
+    actions_register("MoveToEdgeWest", setup_west_func, g_free, run_func);
 }
 
 static gpointer setup_func(xmlNodePtr node)
index 030a01592b9857df888dd768440cc964024de8eb..4309acc642231a0ee35f555af2108d060a2a9720 100644 (file)
@@ -6,8 +6,7 @@ static gboolean run_func_toggle(ObActionsData *data, gpointer options);
 
 void action_omnipresent_startup(void)
 {
-    actions_register("ToggleOmnipresent", NULL, NULL, run_func_toggle,
-                     NULL, NULL);
+    actions_register("ToggleOmnipresent", NULL, NULL, run_func_toggle);
 }
 
 /* Always return FALSE because its not interactive */
index 6837bce2564916e2bc8bfe1550bfc9c1621296b7..f6ac1452a43120cef1b12e41368985eb6fbe1ef3 100644 (file)
@@ -6,10 +6,7 @@ static gboolean run_func(ObActionsData *data, gpointer options);
 
 void action_raise_startup(void)
 {
-    actions_register("Raise",
-                     NULL, NULL,
-                     run_func,
-                     NULL, NULL);
+    actions_register("Raise", NULL, NULL, run_func);
 }
 
 /* Always return FALSE because its not interactive */
index 80fc917fc328db62e7b8bab7015625dccb9110b6..dbe41d854028e7239c377e1cdb6f21aa410ded28 100644 (file)
@@ -5,10 +5,7 @@ static gboolean run_func(ObActionsData *data, gpointer options);
 
 void action_raiselower_startup(void)
 {
-    actions_register("RaiseLower",
-                     NULL, NULL,
-                     run_func,
-                     NULL, NULL);
+    actions_register("RaiseLower", NULL, NULL, run_func);
 }
 
 /* Always return FALSE because its not interactive */
index cef814149d6ac334e7358572df6316a300b304df..813a12210ed3ad763e79c0f5a2cfd5cbd2417dd3 100644 (file)
@@ -5,10 +5,7 @@ static gboolean run_func(ObActionsData *data, gpointer options);
 
 void action_reconfigure_startup(void)
 {
-    actions_register("Reconfigure",
-                     NULL, NULL,
-                     run_func,
-                     NULL, NULL);
+    actions_register("Reconfigure", NULL, NULL, run_func);
 }
 
 /* Always return FALSE because its not interactive */
index 47f45f5b2de4aadcfb3dbcc88870d67ae86bf701..3df44b6cfa035d81604dc8b790a402f46ea941a5 100644 (file)
@@ -17,7 +17,7 @@ static guint32 pick_corner(gint x, gint y, gint cx, gint cy, gint cw, gint ch,
 
 void action_resize_startup(void)
 {
-    actions_register("Resize", setup_func, g_free, run_func, NULL, NULL);
+    actions_register("Resize", setup_func, g_free, run_func);
 }
 
 static gpointer setup_func(xmlNodePtr node)
index 5742e1fcff0a963e589aa370de47e6d11377c135..b4db73b7001ce18b7b23d585873c9c88902c31c4 100644 (file)
@@ -16,8 +16,7 @@ static gboolean run_func(ObActionsData *data, gpointer options);
 
 void action_resizerelative_startup(void)
 {
-    actions_register("ResizeRelative", setup_func, g_free, run_func,
-                     NULL, NULL);
+    actions_register("ResizeRelative", setup_func, g_free, run_func);
 }
 
 static gpointer setup_func(xmlNodePtr node)
index 47f332b184ee9cd4f04c45aa8855550ab4af47f6..01de4f9a752ee9c62803c9ddfccef416df8aa096 100644 (file)
@@ -12,7 +12,7 @@ static gboolean run_func(ObActionsData *data, gpointer options);
 
 void action_restart_startup(void)
 {
-    actions_register("Restart", setup_func, free_func, run_func, NULL, NULL);
+    actions_register("Restart", setup_func, free_func, run_func);
 }
 
 static gpointer setup_func(xmlNodePtr node)
index 2342067fc429405b5939333e7d9cb34ca252877e..502781dd9e34a58739d16d8a66b9ccc38d518776 100644 (file)
@@ -7,9 +7,9 @@ static gboolean run_func_toggle(ObActionsData *data, gpointer options);
 
 void action_shade_startup(void)
 {
-    actions_register("Shade", NULL, NULL, run_func_on, NULL, NULL);
-    actions_register("Unshade", NULL, NULL, run_func_off, NULL, NULL);
-    actions_register("ToggleShade", NULL, NULL, run_func_toggle, NULL, NULL);
+    actions_register("Shade", NULL, NULL, run_func_on);
+    actions_register("Unshade", NULL, NULL, run_func_off);
+    actions_register("ToggleShade", NULL, NULL, run_func_toggle);
 }
 
 /* Always return FALSE because its not interactive */
index 1070a965bcfb179c6055f8340820d10227f208f9..414e2817239888b32a15bec7d2a3943d2a2f632a 100644 (file)
@@ -7,8 +7,8 @@ static gboolean run_func_ur(ObActionsData *data, gpointer options);
 void action_shadelowerraise_startup()
 {
     /* 3.4-compatibility */
-    actions_register("ShadeLower", NULL, NULL, run_func_sl, NULL, NULL);
-    actions_register("UnshadeRaise", NULL, NULL, run_func_ur, NULL, NULL);
+    actions_register("ShadeLower", NULL, NULL, run_func_sl);
+    actions_register("UnshadeRaise", NULL, NULL, run_func_ur);
 }
 
 /* Always return FALSE because its not interactive */
index c9ba86c4da22125343a01eeb8a37f2ceef13e4dc..6dc77d5e7e65aef08a6e6ff8401b29d7e4eeb8c4 100644 (file)
@@ -5,10 +5,7 @@ static gboolean run_func(ObActionsData *data, gpointer options);
 
 void action_showdesktop_startup(void)
 {
-    actions_register("ToggleShowDesktop",
-                     NULL, NULL,
-                     run_func,
-                     NULL, NULL);
+    actions_register("ToggleShowDesktop", NULL, NULL, run_func);
 }
 
 /* Always return FALSE because its not interactive */
index 9590bd1589561eaedd7616606f3d1f5c38c7e4ed..546be5a8c31848eca86bf31db23f195dfd1e3c82 100644 (file)
@@ -12,8 +12,7 @@ static gboolean run_func(ObActionsData *data, gpointer options);
 
 void action_showmenu_startup(void)
 {
-    actions_register("ShowMenu", setup_func, free_func, run_func,
-                     NULL, NULL);
+    actions_register("ShowMenu", setup_func, free_func, run_func);
 }
 
 static gpointer setup_func(xmlNodePtr node)
index 22a9378cffaa593d7890a6a7f593b2bb986d08af..3db00ca361400ca780b2678f878632b1e0c8e19b 100644 (file)
@@ -5,7 +5,7 @@ static gboolean run_func(ObActionsData *data, gpointer options);
 
 void action_unfocus_startup(void)
 {
-    actions_register("Unfocus", NULL, NULL, run_func, NULL, NULL);
+    actions_register("Unfocus", NULL, NULL, run_func);
 }
 
 /* Always return FALSE because its not interactive */
This page took 0.073154 seconds and 4 git commands to generate.