summaryrefslogtreecommitdiff
path: root/src/actions.h
blob: 73ce89b87d8fc3ab0b40b6acbda6cc86857e4b9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
/* Prototypes of all actions that can be performed with keystrokes.
 * Copyright (C) 2000, 2001, 2002, 2003, 2004 Shawn Betts <sabetts@vcn.bc.ca>
 *
 * This file is part of ratpoison.
 *
 * ratpoison 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 2, or (at your option)
 * any later version.
 *
 * ratpoison 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 software; see the file COPYING.  If not, write to
 * the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
 * Boston, MA 02111-1307 USA
 */

#ifndef _RATPOISON_ACTIONS_H
#define _RATPOISON_ACTIONS_H 1

#define MAX_COMMAND_LENGTH 100
#define MAX_ARGS_LENGTH 100

typedef struct user_command user_command;

enum argtype { arg_VOID, arg_STRING, arg_NUMBER };

struct
user_command
{
  char *name;
  char * (*func)(int, char *);
  int argtype;
};

int spawn(char *data);
char * command (int interactive, char *data);

char *cmd_abort (int interactive, char *data);
char *cmd_addhook (int interactive, char *data);
char *cmd_alias (int interactive, char *data);
char *cmd_banish (int interactive, char *data);
char *cmd_bind (int interactive, char *data);
char *cmd_chdir (int interactive, char *data);
char *cmd_clrunmanaged (int interactive, char *data);
char *cmd_colon (int interactive, char *data);
char *cmd_curframe (int interactive, char *data);
char *cmd_delete (int interactive, char *data);
char *cmd_echo (int interactive, char *data);
char *cmd_escape (int interactive, char *data);
char *cmd_exec (int interactive, char *data);
char *cmd_fdump (int interactively, char *data);
char *cmd_focusdown (int interactive, char *data);
char *cmd_focuslast (int interactive, char *data);
char *cmd_focusleft (int interactive, char *data);
char *cmd_focusright (int interactive, char *data);
char *cmd_focusup (int interactive, char *data);
char *cmd_frestore (int interactively, char *data);
char *cmd_fselect (int interactive, char *data);
char *cmd_gdelete (int interactive, char *data);
char *cmd_getenv (int interactive, char *data);
char *cmd_gmerge (int interactive, char *data);
char *cmd_gmove (int interactive, char *data);
char *cmd_gnew (int interactive, char *data);
char *cmd_gnewbg (int interactive, char *data);
char *cmd_gnext (int interactive, char *data);
char *cmd_gprev (int interactive, char *data);
char *cmd_gravity (int interactive, char *data);
char *cmd_groups (int interactive, char *data);
char *cmd_gselect (int interactive, char *data);
char *cmd_h_split (int interactive, char *data);
char *cmd_help (int interactive, char *data);
char *cmd_info (int interactive, char *data);
char *cmd_kill (int interactive, char *data);
char *cmd_last (int interactive, char *data);
char *cmd_lastmsg (int interactive, char *data);
char *cmd_license (int interactive, char *data);
char *cmd_link (int interactive, char *data);
char *cmd_listhook (int interactive, char *data);
char *cmd_meta (int interactive, char *data);
char *cmd_msgwait (int interactive, char *data);
char *cmd_newwm(int interactive, char *which);
char *cmd_next (int interactive, char *data);
char *cmd_next_frame (int interactive, char *data);
char *cmd_nextscreen (int interactive, char *data);
char *cmd_number (int interactive, char *data);
char *cmd_only (int interactive, char *data);
char *cmd_other (int interactive, char *data);
char *cmd_prev (int interactive, char *data);
char *cmd_prev_frame (int interactive, char *data);
char *cmd_prevscreen (int interactive, char *data);
char *cmd_quit(int interactive, char *data);
char *cmd_redisplay (int interactive, char *data);
char *cmd_remhook (int interactive, char *data);
char *cmd_remove (int interactive, char *data);
char *cmd_rename (int interactive, char *data);
char *cmd_resize (int interactive, char *data);
char *cmd_restart (int interactive, char *data);
char *cmd_rudeness (int interactive, char *data);
char *cmd_select (int interactive, char *data);
char *cmd_setenv (int interactive, char *data);
char *cmd_shrink (int interactive, char *data);
char *cmd_source (int interactive, char *data);
char *cmd_startup_message (int interactive, char *data);
char *cmd_time (int interactive, char *data);
char *cmd_tmpwm (int interactive, char *data);
char *cmd_togglewrapwinlist ();
char *cmd_unalias (int interactive, char *data);
char *cmd_unbind (int interactive, char *data);
char *cmd_unimplemented (int interactive, char *data);
char *cmd_unmanage (int interactive, char *data);
char *cmd_unsetenv (int interactive, char *data);
char *cmd_v_split (int interactive, char *data);
char *cmd_verbexec (int interactive, char *data);
char *cmd_version (int interactive, char *data);
char *cmd_warp(int interactive, char *data);
char *cmd_windows (int interactive, char *data);
char *cmd_readkey (int interactive, char *data);
char *cmd_newkmap (int interactive, char *data);
char *cmd_delkmap (int interactive, char *data);
char *cmd_definekey (int interactive, char *data);
char *cmd_set (int interactive, char *data);
char *cmd_sselect(int interactive, char *data);
char *cmd_ratwarp (int interactive, char *data);
char *cmd_ratclick (int interactive, char *data);
char *cmd_ratrelwarp (int interactive, char *data);
char *cmd_rathold (int interactive, char *data);
char *cmd_cnext (int interactive, char *data);
char *cmd_cother (int interactive, char *data);
char *cmd_cprev (int interactive, char *data);
char *cmd_dedicate (int interactive, char *data);
char *cmd_describekey (int interactive, char *data);
char *cmd_inext (int interactive, char *data);
char *cmd_iother (int interactive, char *data);
char *cmd_iprev (int interactive, char *data);
char *cmd_prompt (int interactive, char *data);
char *cmd_sdump (int interactive, char *data);
char *cmd_sfdump (int interactively, char *data);
char *cmd_undo (int interactive, char *data);
char *cmd_putsel (int interactive, char *data);
char *cmd_getsel (int interactive, char *data);
char *cmd_appendsel (int interactive, char *data);
void pop_frame_undo (rp_frame_undo *u);

rp_keymap *find_keymap (char *name);
void initialize_default_keybindings (void);
void keymap_free (rp_keymap *map);
void free_aliases ();
void free_keymaps ();
rp_action* find_keybinding (KeySym keysym, int state, rp_keymap *map);
rp_action* find_keybinding_by_action (char *action, rp_keymap *map);


#endif /* ! _RATPOISON_ACTIONS_H */