1 /* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*-
3 actions.h for the Openbox window manager
4 Copyright (c) 2007 Dana Jansens
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 See the COPYING file for a copy of the GNU General Public License.
21 #include "parser/parse.h"
24 typedef struct _ObActionsDefinition ObActionsDefinition
;
25 typedef struct _ObActionsAct ObActionsAct
;
26 typedef struct _ObActionsData ObActionsData
;
27 typedef struct _ObActionsAnyData ObActionsAnyData
;
28 typedef struct _ObActionsGlobalData ObActionsGlobalData
;
29 typedef struct _ObActionsClientData ObActionsClientData
;
30 typedef struct _ObActionsSelectorData ObActionsSelectorData
;
35 OB_ACTION_INTERACTING
,
36 OB_NUM_ACTIONS_INTERACTIVE_STATES
37 } ObActionsInteractiveState
;
39 typedef gpointer (*ObActionsDataSetupFunc
)(ObParseInst
*i
,
40 xmlDocPtr doc
, xmlNodePtr node
);
41 typedef void (*ObActionsDataFreeFunc
)(gpointer options
);
42 typedef void (*ObActionsRunFunc
)(ObActionsData
*data
,
48 06:10 (@dana) hm i think there are 3 types of actions
49 06:10 (@dana) global actions, window actions, and selector actions
50 06:11 (@dana) eg show menu/exit, raise/focus, and cycling/directional/expose
54 OB_ACTION_TYPE_GLOBAL
,
55 OB_ACTION_TYPE_CLIENT
,
56 OB_ACTION_TYPE_SELECTOR
59 struct _ObActionsAnyData
{
66 ObActionsInteractiveState interactive
;
69 struct _ObActionsGlobalData
{
73 struct _ObActionsClientData
{
77 ObFrameContext context
;
80 struct _ObActionsSelectorData
{
86 struct _ObActionsData
{
91 ObActionsGlobalData global
;
92 ObActionsClientData client
;
93 ObActionsSelectorData selector
;
97 void actions_startup(gboolean reconfigure
);
98 void actions_shutdown(gboolean reconfigure
);
100 gboolean
actions_register(const gchar
*name
,
101 gboolean allow_interactive
,
102 ObActionsDataSetupFunc setup
,
103 ObActionsDataFreeFunc free
,
104 ObActionsRunFunc run
);
106 ObActionsAct
* actions_parse(ObParseInst
*i
,
109 ObActionsAct
* actions_parse_string(const gchar
*name
);
111 void actions_act_ref(ObActionsAct
*act
);
112 void actions_act_unref(ObActionsAct
*act
);