103
by Richard Levitte
Cosmetic changes. |
1 |
/*
|
554.1.10
by Matthew Fuller
Pull out the simple cases of long-form twm+Claude copyright/license |
2 |
* Copyright 1988 by Evans & Sutherland Computer Corporation, |
3 |
* Salt Lake City, Utah |
|
4 |
* Portions Copyright 1989 by the Massachusetts Institute of Technology |
|
5 |
* Cambridge, Massachusetts |
|
6 |
*
|
|
7 |
* Copyright 1992 Claude Lecommandeur. |
|
11
by Claude Lecommandeur
CTWM version 3.2p1 |
8 |
*/
|
1
by Claude Lecommandeur
CTWM version 1.1 |
9 |
|
10 |
/***********************************************************************
|
|
11 |
*
|
|
12 |
* $XConsortium: gram.y,v 1.91 91/02/08 18:21:56 dave Exp $ |
|
13 |
*
|
|
14 |
* .twmrc command grammer |
|
15 |
*
|
|
16 |
* 07-Jan-86 Thomas E. LaStrange File created |
|
17 |
* 11-Nov-90 Dave Sternlicht Adding SaveColors |
|
18 |
* 10-Oct-90 David M. Sternlicht Storing saved colors on root |
|
3
by Claude Lecommandeur
CTWM version 1.3 |
19 |
* 22-April-92 Claude Lecommandeur modifications for ctwm. |
1
by Claude Lecommandeur
CTWM version 1.1 |
20 |
*
|
21 |
***********************************************************************/
|
|
22 |
||
23 |
%{
|
|
395.1.4
by Matthew Fuller
Move ctwm.h to the top of gram.y, and add it to lex.l. |
24 |
#include "ctwm.h"
|
25 |
||
1
by Claude Lecommandeur
CTWM version 1.1 |
26 |
#include <stdio.h>
|
324.1.13
by Matthew Fuller
Stuff in here does need string.h; it's getting it from some header |
27 |
#include <string.h>
|
324.1.2
by Matthew Fuller
Replace these Xmu charset fiddlings with strcasecmp(). Kill off |
28 |
#include <strings.h>
|
395.1.4
by Matthew Fuller
Move ctwm.h to the top of gram.y, and add it to lex.l. |
29 |
|
240.1.3
by Rhialto
4 - Added the remaining OnTopPriority changes from Stefan Monnier |
30 |
#include "otp.h"
|
518.1.25
by Matthew Fuller
Fix alphabetization. Not that it means much with as unordered as the |
31 |
#include "iconmgr.h"
|
9
by Claude Lecommandeur
CTWM version 3.1 |
32 |
#include "icons.h"
|
20
by Claude Lecommandeur
CTWM version 3.6 |
33 |
#include "windowbox.h"
|
528.1.63
by Matthew Fuller
#if 0 out the old function #define's in parse.h, and add |
34 |
#include "functions_defs.h"
|
1
by Claude Lecommandeur
CTWM version 1.1 |
35 |
#include "list.h"
|
36 |
#include "util.h"
|
|
524.1.1
by Matthew Fuller
Pull occupation.h out of screen.h, and include it directly in the |
37 |
#include "occupation.h"
|
1
by Claude Lecommandeur
CTWM version 1.1 |
38 |
#include "screen.h"
|
39 |
#include "parse.h"
|
|
431.1.27
by Matthew Fuller
Break out a parse_be.h for the stuff that should only be |
40 |
#include "parse_be.h"
|
435.1.1
by Matthew Fuller
Pull the static code out of gram.y and into a seaprate parse_yacc.c. |
41 |
#include "parse_yacc.h"
|
17
by Claude Lecommandeur
CTWM version 3.5 |
42 |
#include "cursor.h"
|
538.1.3
by Matthew Fuller
Rename the decorations*.h to win_decorations*.h. |
43 |
#include "win_decorations_init.h"
|
518.1.22
by Matthew Fuller
Break the funcs for handling WindowRegion stuff out of add_window.c |
44 |
#include "win_regions.h"
|
510.1.2
by Matthew Fuller
Break the functions used for parsing/applying the various workspace |
45 |
#include "workspace_config.h"
|
463.1.7
by Matthew Fuller
Add RplaySounds {} config block for setting sounds in the config file. |
46 |
#ifdef SOUNDS
|
47 |
# include "sound.h"
|
|
48 |
#endif
|
|
1
by Claude Lecommandeur
CTWM version 1.1 |
49 |
|
435.1.8
by Matthew Fuller
These vars are currently only used in gram.y, so move them there and |
50 |
static char *curWorkSpc = NULL;
|
51 |
static char *client = NULL;
|
|
52 |
static char *workspace = NULL;
|
|
53 |
static MenuItem *lastmenuitem = NULL;
|
|
435.1.13
by Matthew Fuller
Initialize for safety. |
54 |
static name_list **curplist = NULL;
|
435.1.14
by Matthew Fuller
Move another var into gram.y, and stop talking about mods_used in |
55 |
static int color = 0;
|
513.1.12
by Matthew Fuller
Actually, it looks like I can just pull in yytext to gram.y, so revert |
56 |
extern char *yytext; // Have to manually pull this in
|
1
by Claude Lecommandeur
CTWM version 1.1 |
57 |
|
492.2.28
by Matthew Fuller
extern is implicit and the only linkage specifier that's meaningful |
58 |
int yylex(void);
|
1
by Claude Lecommandeur
CTWM version 1.1 |
59 |
%}
|
60 |
||
61 |
%union
|
|
62 |
{
|
|
63 |
int num; |
|
134
by Richard Levitte
Resolve a lot of unsigned vs. signed conflicts, and a few other |
64 |
char *ptr; |
1
by Claude Lecommandeur
CTWM version 1.1 |
65 |
};
|
66 |
||
17
by Claude Lecommandeur
CTWM version 3.5 |
67 |
|
1
by Claude Lecommandeur
CTWM version 1.1 |
68 |
%token <num> LB RB LP RP MENUS MENU BUTTON DEFAULT_FUNCTION PLUS MINUS
|
103
by Richard Levitte
Cosmetic changes. |
69 |
%token <num> ALL OR CURSORS PIXMAPS ICONS COLOR SAVECOLOR MONOCHROME FUNCTION
|
12
by Claude Lecommandeur
CTWM version 3.3 |
70 |
%token <num> ICONMGR_SHOW ICONMGR ALTER WINDOW_FUNCTION ZOOM ICONMGRS
|
1
by Claude Lecommandeur
CTWM version 1.1 |
71 |
%token <num> ICONMGR_GEOMETRY ICONMGR_NOSHOW MAKE_TITLE
|
72 |
%token <num> ICONIFY_BY_UNMAPPING DONT_ICONIFY_BY_UNMAPPING
|
|
240.1.3
by Rhialto
4 - Added the remaining OnTopPriority changes from Stefan Monnier |
73 |
%token <num> AUTO_POPUP
|
103
by Richard Levitte
Cosmetic changes. |
74 |
%token <num> NO_BORDER NO_ICON_TITLE NO_TITLE AUTO_RAISE NO_HILITE ICON_REGION
|
75 |
%token <num> WINDOW_REGION META SHIFT LOCK CONTROL WINDOW TITLE ICON ROOT FRAME
|
|
1
by Claude Lecommandeur
CTWM version 1.1 |
76 |
%token <num> COLON EQUALS SQUEEZE_TITLE DONT_SQUEEZE_TITLE
|
240.1.2
by Rhialto
3 - Selected a number of cleanups from Stefan Monnier |
77 |
%token <num> WARP_ON_DEICONIFY
|
1
by Claude Lecommandeur
CTWM version 1.1 |
78 |
%token <num> START_ICONIFIED NO_TITLE_HILITE TITLE_HILITE
|
103
by Richard Levitte
Cosmetic changes. |
79 |
%token <num> MOVE RESIZE WAITC SELECT KILL LEFT_TITLEBUTTON RIGHT_TITLEBUTTON
|
80 |
%token <num> NUMBER KEYWORD NKEYWORD CKEYWORD CLKEYWORD FKEYWORD FSKEYWORD
|
|
240.1.3
by Rhialto
4 - Added the remaining OnTopPriority changes from Stefan Monnier |
81 |
%token <num> FNKEYWORD PRIORITY_SWITCHING PRIORITY_NOT_SWITCHING
|
513.1.1
by Matthew Fuller
Use a better name for these gravity keywords. |
82 |
%token <num> SKEYWORD SSKEYWORD WINDOW_RING WINDOW_RING_EXCLUDE WARP_CURSOR ERRORTOKEN
|
83 |
%token <num> GRAVITY /* N/S/E/W */
|
|
496.1.24
by Matthew Fuller
Rename the parser name for the lef/center/right keywords used in |
84 |
%token <num> SIJENUM /* SqueezeTitle justifications, SIJust enum */
|
12
by Claude Lecommandeur
CTWM version 3.3 |
85 |
%token <num> NO_STACKMODE ALWAYS_ON_TOP WORKSPACE WORKSPACES WORKSPCMGR_GEOMETRY
|
4
by Claude Lecommandeur
CTWM version 2.0 |
86 |
%token <num> OCCUPYALL OCCUPYLIST MAPWINDOWCURRENTWORKSPACE MAPWINDOWDEFAULTWORKSPACE
|
240.1.3
by Rhialto
4 - Added the remaining OnTopPriority changes from Stefan Monnier |
87 |
%token <num> ON_TOP_PRIORITY
|
17
by Claude Lecommandeur
CTWM version 3.5 |
88 |
%token <num> UNMAPBYMOVINGFARAWAY OPAQUEMOVE NOOPAQUEMOVE OPAQUERESIZE NOOPAQUERESIZE
|
89 |
%token <num> DONTSETINACTIVE CHANGE_WORKSPACE_FUNCTION DEICONIFY_FUNCTION ICONIFY_FUNCTION
|
|
20
by Claude Lecommandeur
CTWM version 3.6 |
90 |
%token <num> AUTOSQUEEZE STARTSQUEEZED DONT_SAVE AUTO_LOWER ICONMENU_DONTSHOW WINDOW_BOX
|
21
by Richard Levitte
This constitutes all the changes Claude had done since version 3.6. |
91 |
%token <num> IGNOREMODIFIER WINDOW_GEOMETRIES ALWAYSSQUEEZETOGRAVITY VIRTUAL_SCREENS
|
297.1.10
by Olaf 'Rhialto' Seibert
Parse DontToggleWorkspacemanagerState like other argument-less keywords. |
92 |
%token <num> IGNORE_TRANSIENT
|
365.1.4
by Matthew Fuller
Add a EWMHIgnore config keyword. |
93 |
%token <num> EWMH_IGNORE
|
473.1.6
by Matthew Fuller
Add a config entry to hold bits for ignoring MWM hints. |
94 |
%token <num> MWM_IGNORE
|
463.1.7
by Matthew Fuller
Add RplaySounds {} config block for setting sounds in the config file. |
95 |
%token <num> RPLAY_SOUNDS
|
567.2.3
by Matthew Fuller
Add ForceFocus config param. |
96 |
%token <num> FORCE_FOCUS
|
1
by Claude Lecommandeur
CTWM version 1.1 |
97 |
%token <ptr> STRING
|
98 |
||
99 |
%type <ptr> string
|
|
205
by Richard Levitte
- Extend the button specification for title buttons to take modifiers. |
100 |
%type <num> action button number signed_number keyaction full fullkey
|
513.1.4
by Matthew Fuller
Add rules for parsing vertical vs. horizontal gravity. |
101 |
%type <num> vgrav hgrav
|
1
by Claude Lecommandeur
CTWM version 1.1 |
102 |
|
103
by Richard Levitte
Cosmetic changes. |
103 |
%start twmrc
|
1
by Claude Lecommandeur
CTWM version 1.1 |
104 |
|
105 |
%%
|
|
297.1.7
by Olaf 'Rhialto' Seibert
Avoid gcc warning "warning: declaration of 'mods' shadows a global |
106 |
twmrc : { InitGramVariables(); } |
107 |
stmts
|
|
1
by Claude Lecommandeur
CTWM version 1.1 |
108 |
;
|
109 |
||
110 |
stmts : /* Empty */ |
|
111 |
| stmts stmt |
|
112 |
;
|
|
113 |
||
114 |
stmt : error |
|
115 |
| noarg |
|
116 |
| sarg |
|
117 |
| narg |
|
118 |
| squeeze |
|
513.1.5
by Matthew Fuller
Convert the IconRegion parsing lines to using vgrav/hgrav instead of |
119 |
| ICON_REGION string vgrav hgrav number number { |
522.1.1
by Matthew Fuller
Eliminate most (void) casts; they don't really add anything, and just |
120 |
AddIconRegion($2, $3, $4, $5, $6, "undef", "undef", "undef"); |
14
by Claude Lecommandeur
CTWM version 3.4 |
121 |
}
|
513.1.5
by Matthew Fuller
Convert the IconRegion parsing lines to using vgrav/hgrav instead of |
122 |
| ICON_REGION string vgrav hgrav number number string { |
522.1.1
by Matthew Fuller
Eliminate most (void) casts; they don't really add anything, and just |
123 |
AddIconRegion($2, $3, $4, $5, $6, $7, "undef", "undef"); |
14
by Claude Lecommandeur
CTWM version 3.4 |
124 |
}
|
513.1.5
by Matthew Fuller
Convert the IconRegion parsing lines to using vgrav/hgrav instead of |
125 |
| ICON_REGION string vgrav hgrav number number string string { |
522.1.1
by Matthew Fuller
Eliminate most (void) casts; they don't really add anything, and just |
126 |
AddIconRegion($2, $3, $4, $5, $6, $7, $8, "undef"); |
14
by Claude Lecommandeur
CTWM version 3.4 |
127 |
}
|
513.1.5
by Matthew Fuller
Convert the IconRegion parsing lines to using vgrav/hgrav instead of |
128 |
| ICON_REGION string vgrav hgrav number number string string string { |
522.1.1
by Matthew Fuller
Eliminate most (void) casts; they don't really add anything, and just |
129 |
AddIconRegion($2, $3, $4, $5, $6, $7, $8, $9); |
9
by Claude Lecommandeur
CTWM version 3.1 |
130 |
}
|
513.1.5
by Matthew Fuller
Convert the IconRegion parsing lines to using vgrav/hgrav instead of |
131 |
| ICON_REGION string vgrav hgrav number number { |
435.1.7
by Matthew Fuller
Rename this 'list' var used to track the current list being worked on |
132 |
curplist = AddIconRegion($2, $3, $4, $5, $6, "undef", "undef", "undef"); |
14
by Claude Lecommandeur
CTWM version 3.4 |
133 |
}
|
134 |
win_list
|
|
513.1.5
by Matthew Fuller
Convert the IconRegion parsing lines to using vgrav/hgrav instead of |
135 |
| ICON_REGION string vgrav hgrav number number string { |
435.1.7
by Matthew Fuller
Rename this 'list' var used to track the current list being worked on |
136 |
curplist = AddIconRegion($2, $3, $4, $5, $6, $7, "undef", "undef"); |
14
by Claude Lecommandeur
CTWM version 3.4 |
137 |
}
|
138 |
win_list
|
|
513.1.5
by Matthew Fuller
Convert the IconRegion parsing lines to using vgrav/hgrav instead of |
139 |
| ICON_REGION string vgrav hgrav number number string string { |
435.1.7
by Matthew Fuller
Rename this 'list' var used to track the current list being worked on |
140 |
curplist = AddIconRegion($2, $3, $4, $5, $6, $7, $8, "undef"); |
14
by Claude Lecommandeur
CTWM version 3.4 |
141 |
}
|
142 |
win_list
|
|
513.1.5
by Matthew Fuller
Convert the IconRegion parsing lines to using vgrav/hgrav instead of |
143 |
| ICON_REGION string vgrav hgrav number number string string string { |
435.1.7
by Matthew Fuller
Rename this 'list' var used to track the current list being worked on |
144 |
curplist = AddIconRegion($2, $3, $4, $5, $6, $7, $8, $9); |
14
by Claude Lecommandeur
CTWM version 3.4 |
145 |
}
|
146 |
win_list
|
|
147 |
||
513.1.6
by Matthew Fuller
Switch to explicit vgrav/hgrav for WindowRegion as well. |
148 |
| WINDOW_REGION string vgrav hgrav { |
435.1.7
by Matthew Fuller
Rename this 'list' var used to track the current list being worked on |
149 |
curplist = AddWindowRegion ($2, $3, $4); |
14
by Claude Lecommandeur
CTWM version 3.4 |
150 |
}
|
151 |
win_list
|
|
152 |
||
20
by Claude Lecommandeur
CTWM version 3.6 |
153 |
| WINDOW_BOX string string { |
435.1.7
by Matthew Fuller
Rename this 'list' var used to track the current list being worked on |
154 |
curplist = addWindowBox ($2, $3); |
20
by Claude Lecommandeur
CTWM version 3.6 |
155 |
}
|
156 |
win_list
|
|
157 |
||
1
by Claude Lecommandeur
CTWM version 1.1 |
158 |
| ICONMGR_GEOMETRY string number { if (Scr->FirstTime) |
159 |
{
|
|
17
by Claude Lecommandeur
CTWM version 3.5 |
160 |
Scr->iconmgr->geometry= (char*)$2; |
1
by Claude Lecommandeur
CTWM version 1.1 |
161 |
Scr->iconmgr->columns=$3; |
162 |
}
|
|
163 |
}
|
|
164 |
| ICONMGR_GEOMETRY string { if (Scr->FirstTime) |
|
17
by Claude Lecommandeur
CTWM version 3.5 |
165 |
Scr->iconmgr->geometry = (char*)$2; |
1
by Claude Lecommandeur
CTWM version 1.1 |
166 |
}
|
167 |
| WORKSPCMGR_GEOMETRY string number { if (Scr->FirstTime) |
|
17
by Claude Lecommandeur
CTWM version 3.5 |
168 |
{
|
21
by Richard Levitte
This constitutes all the changes Claude had done since version 3.6. |
169 |
Scr->workSpaceMgr.geometry= (char*)$2; |
170 |
Scr->workSpaceMgr.columns=$3; |
|
17
by Claude Lecommandeur
CTWM version 3.5 |
171 |
}
|
1
by Claude Lecommandeur
CTWM version 1.1 |
172 |
}
|
173 |
| WORKSPCMGR_GEOMETRY string { if (Scr->FirstTime) |
|
21
by Richard Levitte
This constitutes all the changes Claude had done since version 3.6. |
174 |
Scr->workSpaceMgr.geometry = (char*)$2; |
1
by Claude Lecommandeur
CTWM version 1.1 |
175 |
}
|
10
by Claude Lecommandeur
CTWM version 3.1p3 |
176 |
| MAPWINDOWCURRENTWORKSPACE {} |
4
by Claude Lecommandeur
CTWM version 2.0 |
177 |
curwork
|
178 |
||
10
by Claude Lecommandeur
CTWM version 3.1p3 |
179 |
| MAPWINDOWDEFAULTWORKSPACE {} |
4
by Claude Lecommandeur
CTWM version 2.0 |
180 |
defwork
|
181 |
||
1
by Claude Lecommandeur
CTWM version 1.1 |
182 |
| ZOOM number { if (Scr->FirstTime) |
183 |
{
|
|
492.2.104
by Matthew Fuller
Massive rewrite of various struct Screen config params that are |
184 |
Scr->DoZoom = true; |
1
by Claude Lecommandeur
CTWM version 1.1 |
185 |
Scr->ZoomCount = $2; |
186 |
}
|
|
187 |
}
|
|
103
by Richard Levitte
Cosmetic changes. |
188 |
| ZOOM { if (Scr->FirstTime) |
492.2.104
by Matthew Fuller
Massive rewrite of various struct Screen config params that are |
189 |
Scr->DoZoom = true; } |
1
by Claude Lecommandeur
CTWM version 1.1 |
190 |
| PIXMAPS pixmap_list {} |
191 |
| CURSORS cursor_list {} |
|
435.1.7
by Matthew Fuller
Rename this 'list' var used to track the current list being worked on |
192 |
| ICONIFY_BY_UNMAPPING { curplist = &Scr->IconifyByUn; } |
1
by Claude Lecommandeur
CTWM version 1.1 |
193 |
win_list
|
103
by Richard Levitte
Cosmetic changes. |
194 |
| ICONIFY_BY_UNMAPPING { if (Scr->FirstTime) |
492.2.104
by Matthew Fuller
Massive rewrite of various struct Screen config params that are |
195 |
Scr->IconifyByUnmapping = true; } |
8
by Claude Lecommandeur
CTWM version 3.0 |
196 |
|
435.1.7
by Matthew Fuller
Rename this 'list' var used to track the current list being worked on |
197 |
| OPAQUEMOVE { curplist = &Scr->OpaqueMoveList; } |
8
by Claude Lecommandeur
CTWM version 3.0 |
198 |
win_list
|
492.2.104
by Matthew Fuller
Massive rewrite of various struct Screen config params that are |
199 |
| OPAQUEMOVE { if (Scr->FirstTime) Scr->DoOpaqueMove = true; } |
435.1.7
by Matthew Fuller
Rename this 'list' var used to track the current list being worked on |
200 |
| NOOPAQUEMOVE { curplist = &Scr->NoOpaqueMoveList; } |
8
by Claude Lecommandeur
CTWM version 3.0 |
201 |
win_list
|
492.2.104
by Matthew Fuller
Massive rewrite of various struct Screen config params that are |
202 |
| NOOPAQUEMOVE { if (Scr->FirstTime) Scr->DoOpaqueMove = false; } |
435.1.7
by Matthew Fuller
Rename this 'list' var used to track the current list being worked on |
203 |
| OPAQUERESIZE { curplist = &Scr->OpaqueMoveList; } |
8
by Claude Lecommandeur
CTWM version 3.0 |
204 |
win_list
|
492.2.104
by Matthew Fuller
Massive rewrite of various struct Screen config params that are |
205 |
| OPAQUERESIZE { if (Scr->FirstTime) Scr->DoOpaqueResize = true; } |
435.1.7
by Matthew Fuller
Rename this 'list' var used to track the current list being worked on |
206 |
| NOOPAQUERESIZE { curplist = &Scr->NoOpaqueResizeList; } |
8
by Claude Lecommandeur
CTWM version 3.0 |
207 |
win_list
|
492.2.104
by Matthew Fuller
Massive rewrite of various struct Screen config params that are |
208 |
| NOOPAQUERESIZE { if (Scr->FirstTime) Scr->DoOpaqueResize = false; } |
8
by Claude Lecommandeur
CTWM version 3.0 |
209 |
|
103
by Richard Levitte
Cosmetic changes. |
210 |
| LEFT_TITLEBUTTON string EQUALS action { |
488.1.130
by Matthew Fuller
GotTitleButton's arg is only literal, and passed through to a |
211 |
GotTitleButton ($2, $4, false); |
1
by Claude Lecommandeur
CTWM version 1.1 |
212 |
}
|
103
by Richard Levitte
Cosmetic changes. |
213 |
| RIGHT_TITLEBUTTON string EQUALS action { |
488.1.130
by Matthew Fuller
GotTitleButton's arg is only literal, and passed through to a |
214 |
GotTitleButton ($2, $4, true); |
1
by Claude Lecommandeur
CTWM version 1.1 |
215 |
}
|
488.1.131
by Matthew Fuller
Convert rightside to bool too. Add an explicit conditional to convert |
216 |
| LEFT_TITLEBUTTON string { CreateTitleButton($2, 0, NULL, NULL, false, true); } |
103
by Richard Levitte
Cosmetic changes. |
217 |
binding_list
|
488.1.131
by Matthew Fuller
Convert rightside to bool too. Add an explicit conditional to convert |
218 |
| RIGHT_TITLEBUTTON string { CreateTitleButton($2, 0, NULL, NULL, true, true); } |
103
by Richard Levitte
Cosmetic changes. |
219 |
binding_list
|
3
by Claude Lecommandeur
CTWM version 1.3 |
220 |
| button string { |
437
by Matthew Fuller
Anyplace looking for a char * will find NULL as acceptable as (char |
221 |
root = GetRoot($2, NULL, NULL); |
492.2.80
by Matthew Fuller
Mechanical replacement of inline "(sometype *)0" constructs with NULL, |
222 |
AddFuncButton ($1, C_ROOT, 0, F_MENU, root, NULL); |
3
by Claude Lecommandeur
CTWM version 1.3 |
223 |
}
|
224 |
| button action { |
|
225 |
if ($2 == F_MENU) { |
|
226 |
pull->prev = NULL; |
|
492.2.80
by Matthew Fuller
Mechanical replacement of inline "(sometype *)0" constructs with NULL, |
227 |
AddFuncButton ($1, C_ROOT, 0, $2, pull, NULL); |
3
by Claude Lecommandeur
CTWM version 1.3 |
228 |
}
|
229 |
else { |
|
9
by Claude Lecommandeur
CTWM version 3.1 |
230 |
MenuItem *item; |
231 |
||
437
by Matthew Fuller
Anyplace looking for a char * will find NULL as acceptable as (char |
232 |
root = GetRoot(TWM_ROOT,NULL,NULL); |
9
by Claude Lecommandeur
CTWM version 3.1 |
233 |
item = AddToMenu (root, "x", Action, |
437
by Matthew Fuller
Anyplace looking for a char * will find NULL as acceptable as (char |
234 |
NULL, $2, NULL, NULL); |
492.2.80
by Matthew Fuller
Mechanical replacement of inline "(sometype *)0" constructs with NULL, |
235 |
AddFuncButton ($1, C_ROOT, 0, $2, NULL, item); |
3
by Claude Lecommandeur
CTWM version 1.3 |
236 |
}
|
237 |
Action = ""; |
|
238 |
pull = NULL; |
|
239 |
}
|
|
1
by Claude Lecommandeur
CTWM version 1.1 |
240 |
| string fullkey { GotKey($1, $2); } |
241 |
| button full { GotButton($1, $2); } |
|
3
by Claude Lecommandeur
CTWM version 1.3 |
242 |
|
435.1.7
by Matthew Fuller
Rename this 'list' var used to track the current list being worked on |
243 |
| DONT_ICONIFY_BY_UNMAPPING { curplist = &Scr->DontIconify; } |
1
by Claude Lecommandeur
CTWM version 1.1 |
244 |
win_list
|
10
by Claude Lecommandeur
CTWM version 3.1p3 |
245 |
| WORKSPACES {} |
1
by Claude Lecommandeur
CTWM version 1.1 |
246 |
workspc_list
|
288.2.10
by Olaf 'Rhialto' Seibert
Implement config file keyword IgnoreLockModifier in terms of |
247 |
| IGNOREMODIFIER |
248 |
{ mods = 0; } |
|
249 |
LB keys |
|
250 |
{ Scr->IgnoreModifier |= mods; mods = 0; } |
|
251 |
RB
|
|
435.1.7
by Matthew Fuller
Rename this 'list' var used to track the current list being worked on |
252 |
| OCCUPYALL { curplist = &Scr->OccupyAll; } |
1
by Claude Lecommandeur
CTWM version 1.1 |
253 |
win_list
|
435.1.7
by Matthew Fuller
Rename this 'list' var used to track the current list being worked on |
254 |
| ICONMENU_DONTSHOW { curplist = &Scr->IconMenuDontShow; } |
20
by Claude Lecommandeur
CTWM version 3.6 |
255 |
win_list
|
10
by Claude Lecommandeur
CTWM version 3.1p3 |
256 |
| OCCUPYLIST {} |
3
by Claude Lecommandeur
CTWM version 1.3 |
257 |
occupy_list
|
435.1.7
by Matthew Fuller
Rename this 'list' var used to track the current list being worked on |
258 |
| UNMAPBYMOVINGFARAWAY { curplist = &Scr->UnmapByMovingFarAway; } |
259 |
win_list
|
|
260 |
| AUTOSQUEEZE { curplist = &Scr->AutoSqueeze; } |
|
261 |
win_list
|
|
262 |
| STARTSQUEEZED { curplist = &Scr->StartSqueezed; } |
|
17
by Claude Lecommandeur
CTWM version 3.5 |
263 |
win_list
|
492.2.104
by Matthew Fuller
Massive rewrite of various struct Screen config params that are |
264 |
| ALWAYSSQUEEZETOGRAVITY { Scr->AlwaysSqueezeToGravity = true; } |
435.1.7
by Matthew Fuller
Rename this 'list' var used to track the current list being worked on |
265 |
| ALWAYSSQUEEZETOGRAVITY { curplist = &Scr->AlwaysSqueezeToGravityL; } |
266 |
win_list
|
|
267 |
| DONTSETINACTIVE { curplist = &Scr->DontSetInactive; } |
|
268 |
win_list
|
|
269 |
| ICONMGR_NOSHOW { curplist = &Scr->IconMgrNoShow; } |
|
1
by Claude Lecommandeur
CTWM version 1.1 |
270 |
win_list
|
492.2.104
by Matthew Fuller
Massive rewrite of various struct Screen config params that are |
271 |
| ICONMGR_NOSHOW { Scr->IconManagerDontShow = true; } |
435.1.7
by Matthew Fuller
Rename this 'list' var used to track the current list being worked on |
272 |
| ICONMGRS { curplist = &Scr->IconMgrs; } |
1
by Claude Lecommandeur
CTWM version 1.1 |
273 |
iconm_list
|
435.1.7
by Matthew Fuller
Rename this 'list' var used to track the current list being worked on |
274 |
| ICONMGR_SHOW { curplist = &Scr->IconMgrShow; } |
1
by Claude Lecommandeur
CTWM version 1.1 |
275 |
win_list
|
435.1.7
by Matthew Fuller
Rename this 'list' var used to track the current list being worked on |
276 |
| NO_TITLE_HILITE { curplist = &Scr->NoTitleHighlight; } |
1
by Claude Lecommandeur
CTWM version 1.1 |
277 |
win_list
|
278 |
| NO_TITLE_HILITE { if (Scr->FirstTime) |
|
492.2.104
by Matthew Fuller
Massive rewrite of various struct Screen config params that are |
279 |
Scr->TitleHighlight = false; } |
435.1.7
by Matthew Fuller
Rename this 'list' var used to track the current list being worked on |
280 |
| NO_HILITE { curplist = &Scr->NoHighlight; } |
1
by Claude Lecommandeur
CTWM version 1.1 |
281 |
win_list
|
282 |
| NO_HILITE { if (Scr->FirstTime) |
|
492.2.104
by Matthew Fuller
Massive rewrite of various struct Screen config params that are |
283 |
Scr->Highlight = false; } |
240.1.3
by Rhialto
4 - Added the remaining OnTopPriority changes from Stefan Monnier |
284 |
| ON_TOP_PRIORITY signed_number |
285 |
{ OtpScrSetZero(Scr, WinWin, $2); } |
|
286 |
| ON_TOP_PRIORITY ICONS signed_number |
|
287 |
{ OtpScrSetZero(Scr, IconWin, $3); } |
|
288 |
| ON_TOP_PRIORITY signed_number |
|
435.1.7
by Matthew Fuller
Rename this 'list' var used to track the current list being worked on |
289 |
{ curplist = OtpScrPriorityL(Scr, WinWin, $2); } |
240.1.3
by Rhialto
4 - Added the remaining OnTopPriority changes from Stefan Monnier |
290 |
win_list
|
291 |
| ON_TOP_PRIORITY ICONS signed_number |
|
435.1.7
by Matthew Fuller
Rename this 'list' var used to track the current list being worked on |
292 |
{ curplist = OtpScrPriorityL(Scr, IconWin, $3); } |
240.1.3
by Rhialto
4 - Added the remaining OnTopPriority changes from Stefan Monnier |
293 |
win_list
|
435.1.7
by Matthew Fuller
Rename this 'list' var used to track the current list being worked on |
294 |
| ALWAYS_ON_TOP { curplist = OtpScrPriorityL(Scr, WinWin, 8); } |
240.1.3
by Rhialto
4 - Added the remaining OnTopPriority changes from Stefan Monnier |
295 |
win_list
|
492.2.110
by Matthew Fuller
Correct some False's that should already be false's on |
296 |
| PRIORITY_SWITCHING { OtpScrSetSwitching(Scr, WinWin, false); |
435.1.7
by Matthew Fuller
Rename this 'list' var used to track the current list being worked on |
297 |
curplist = OtpScrSwitchingL(Scr, WinWin); } |
240.1.3
by Rhialto
4 - Added the remaining OnTopPriority changes from Stefan Monnier |
298 |
win_list
|
492.2.110
by Matthew Fuller
Correct some False's that should already be false's on |
299 |
| PRIORITY_NOT_SWITCHING { OtpScrSetSwitching(Scr, WinWin, true); |
435.1.7
by Matthew Fuller
Rename this 'list' var used to track the current list being worked on |
300 |
curplist = OtpScrSwitchingL(Scr, WinWin); } |
240.1.3
by Rhialto
4 - Added the remaining OnTopPriority changes from Stefan Monnier |
301 |
win_list
|
302 |
| PRIORITY_SWITCHING ICONS |
|
492.2.110
by Matthew Fuller
Correct some False's that should already be false's on |
303 |
{ OtpScrSetSwitching(Scr, IconWin, false); |
435.1.7
by Matthew Fuller
Rename this 'list' var used to track the current list being worked on |
304 |
curplist = OtpScrSwitchingL(Scr, IconWin); } |
240.1.3
by Rhialto
4 - Added the remaining OnTopPriority changes from Stefan Monnier |
305 |
win_list
|
306 |
| PRIORITY_NOT_SWITCHING ICONS |
|
492.2.110
by Matthew Fuller
Correct some False's that should already be false's on |
307 |
{ OtpScrSetSwitching(Scr, IconWin, true); |
435.1.7
by Matthew Fuller
Rename this 'list' var used to track the current list being worked on |
308 |
curplist = OtpScrSwitchingL(Scr, IconWin); } |
240.1.3
by Rhialto
4 - Added the remaining OnTopPriority changes from Stefan Monnier |
309 |
win_list
|
310 |
||
12
by Claude Lecommandeur
CTWM version 3.3 |
311 |
win_list
|
435.1.7
by Matthew Fuller
Rename this 'list' var used to track the current list being worked on |
312 |
| NO_STACKMODE { curplist = &Scr->NoStackModeL; } |
1
by Claude Lecommandeur
CTWM version 1.1 |
313 |
win_list
|
314 |
| NO_STACKMODE { if (Scr->FirstTime) |
|
492.2.104
by Matthew Fuller
Massive rewrite of various struct Screen config params that are |
315 |
Scr->StackMode = false; } |
435.1.7
by Matthew Fuller
Rename this 'list' var used to track the current list being worked on |
316 |
| NO_BORDER { curplist = &Scr->NoBorder; } |
9
by Claude Lecommandeur
CTWM version 3.1 |
317 |
win_list
|
492.2.104
by Matthew Fuller
Massive rewrite of various struct Screen config params that are |
318 |
| AUTO_POPUP { Scr->AutoPopup = true; } |
435.1.7
by Matthew Fuller
Rename this 'list' var used to track the current list being worked on |
319 |
| AUTO_POPUP { curplist = &Scr->AutoPopupL; } |
320 |
win_list
|
|
321 |
| DONT_SAVE { curplist = &Scr->DontSave; } |
|
322 |
win_list
|
|
323 |
| NO_ICON_TITLE { curplist = &Scr->NoIconTitle; } |
|
8
by Claude Lecommandeur
CTWM version 3.0 |
324 |
win_list
|
325 |
| NO_ICON_TITLE { if (Scr->FirstTime) |
|
492.2.104
by Matthew Fuller
Massive rewrite of various struct Screen config params that are |
326 |
Scr->NoIconTitlebar = true; } |
435.1.7
by Matthew Fuller
Rename this 'list' var used to track the current list being worked on |
327 |
| NO_TITLE { curplist = &Scr->NoTitle; } |
1
by Claude Lecommandeur
CTWM version 1.1 |
328 |
win_list
|
329 |
| NO_TITLE { if (Scr->FirstTime) |
|
492.2.104
by Matthew Fuller
Massive rewrite of various struct Screen config params that are |
330 |
Scr->NoTitlebar = true; } |
435.1.7
by Matthew Fuller
Rename this 'list' var used to track the current list being worked on |
331 |
| IGNORE_TRANSIENT { curplist = &Scr->IgnoreTransientL; } |
332 |
win_list
|
|
333 |
| MAKE_TITLE { curplist = &Scr->MakeTitle; } |
|
334 |
win_list
|
|
335 |
| START_ICONIFIED { curplist = &Scr->StartIconified; } |
|
336 |
win_list
|
|
337 |
| AUTO_RAISE { curplist = &Scr->AutoRaise; } |
|
1
by Claude Lecommandeur
CTWM version 1.1 |
338 |
win_list
|
492.2.104
by Matthew Fuller
Massive rewrite of various struct Screen config params that are |
339 |
| AUTO_RAISE { Scr->AutoRaiseDefault = true; } |
435.1.7
by Matthew Fuller
Rename this 'list' var used to track the current list being worked on |
340 |
| WARP_ON_DEICONIFY { curplist = &Scr->WarpOnDeIconify; } |
240.1.2
by Rhialto
3 - Selected a number of cleanups from Stefan Monnier |
341 |
win_list
|
435.1.7
by Matthew Fuller
Rename this 'list' var used to track the current list being worked on |
342 |
| AUTO_LOWER { curplist = &Scr->AutoLower; } |
18
by Claude Lecommandeur
CTWM version 3.5.2b |
343 |
win_list
|
492.2.104
by Matthew Fuller
Massive rewrite of various struct Screen config params that are |
344 |
| AUTO_LOWER { Scr->AutoLowerDefault = true; } |
1
by Claude Lecommandeur
CTWM version 1.1 |
345 |
| MENU string LP string COLON string RP { |
346 |
root = GetRoot($2, $4, $6); } |
|
492.2.84
by Matthew Fuller
bool-ify booleans in menus.h structs. |
347 |
menu { root->real_menu = true;} |
437
by Matthew Fuller
Anyplace looking for a char * will find NULL as acceptable as (char |
348 |
| MENU string { root = GetRoot($2, NULL, NULL); } |
492.2.84
by Matthew Fuller
bool-ify booleans in menus.h structs. |
349 |
menu { root->real_menu = true; } |
437
by Matthew Fuller
Anyplace looking for a char * will find NULL as acceptable as (char |
350 |
| FUNCTION string { root = GetRoot($2, NULL, NULL); } |
1
by Claude Lecommandeur
CTWM version 1.1 |
351 |
function
|
435.1.7
by Matthew Fuller
Rename this 'list' var used to track the current list being worked on |
352 |
| ICONS { curplist = &Scr->IconNames; } |
1
by Claude Lecommandeur
CTWM version 1.1 |
353 |
icon_list
|
103
by Richard Levitte
Cosmetic changes. |
354 |
| COLOR { color = COLOR; } |
355 |
color_list
|
|
356 |
| SAVECOLOR {} |
|
357 |
save_color_list
|
|
358 |
| MONOCHROME { color = MONOCHROME; } |
|
359 |
color_list
|
|
1
by Claude Lecommandeur
CTWM version 1.1 |
360 |
| DEFAULT_FUNCTION action { Scr->DefaultFunction.func = $2; |
361 |
if ($2 == F_MENU) |
|
362 |
{
|
|
363 |
pull->prev = NULL; |
|
364 |
Scr->DefaultFunction.menu = pull; |
|
365 |
}
|
|
366 |
else
|
|
367 |
{
|
|
437
by Matthew Fuller
Anyplace looking for a char * will find NULL as acceptable as (char |
368 |
root = GetRoot(TWM_ROOT,NULL,NULL); |
103
by Richard Levitte
Cosmetic changes. |
369 |
Scr->DefaultFunction.item = |
1
by Claude Lecommandeur
CTWM version 1.1 |
370 |
AddToMenu(root,"x",Action, |
437
by Matthew Fuller
Anyplace looking for a char * will find NULL as acceptable as (char |
371 |
NULL,$2, NULL, NULL); |
1
by Claude Lecommandeur
CTWM version 1.1 |
372 |
}
|
373 |
Action = ""; |
|
374 |
pull = NULL; |
|
375 |
}
|
|
376 |
| WINDOW_FUNCTION action { Scr->WindowFunction.func = $2; |
|
437
by Matthew Fuller
Anyplace looking for a char * will find NULL as acceptable as (char |
377 |
root = GetRoot(TWM_ROOT,NULL,NULL); |
103
by Richard Levitte
Cosmetic changes. |
378 |
Scr->WindowFunction.item = |
1
by Claude Lecommandeur
CTWM version 1.1 |
379 |
AddToMenu(root,"x",Action, |
437
by Matthew Fuller
Anyplace looking for a char * will find NULL as acceptable as (char |
380 |
NULL,$2, NULL, NULL); |
1
by Claude Lecommandeur
CTWM version 1.1 |
381 |
Action = ""; |
382 |
pull = NULL; |
|
383 |
}
|
|
9
by Claude Lecommandeur
CTWM version 3.1 |
384 |
| CHANGE_WORKSPACE_FUNCTION action { Scr->ChangeWorkspaceFunction.func = $2; |
437
by Matthew Fuller
Anyplace looking for a char * will find NULL as acceptable as (char |
385 |
root = GetRoot(TWM_ROOT,NULL,NULL); |
103
by Richard Levitte
Cosmetic changes. |
386 |
Scr->ChangeWorkspaceFunction.item = |
9
by Claude Lecommandeur
CTWM version 3.1 |
387 |
AddToMenu(root,"x",Action, |
437
by Matthew Fuller
Anyplace looking for a char * will find NULL as acceptable as (char |
388 |
NULL,$2, NULL, NULL); |
9
by Claude Lecommandeur
CTWM version 3.1 |
389 |
Action = ""; |
390 |
pull = NULL; |
|
391 |
}
|
|
392 |
| DEICONIFY_FUNCTION action { Scr->DeIconifyFunction.func = $2; |
|
437
by Matthew Fuller
Anyplace looking for a char * will find NULL as acceptable as (char |
393 |
root = GetRoot(TWM_ROOT,NULL,NULL); |
103
by Richard Levitte
Cosmetic changes. |
394 |
Scr->DeIconifyFunction.item = |
9
by Claude Lecommandeur
CTWM version 3.1 |
395 |
AddToMenu(root,"x",Action, |
437
by Matthew Fuller
Anyplace looking for a char * will find NULL as acceptable as (char |
396 |
NULL,$2, NULL, NULL); |
9
by Claude Lecommandeur
CTWM version 3.1 |
397 |
Action = ""; |
398 |
pull = NULL; |
|
399 |
}
|
|
400 |
| ICONIFY_FUNCTION action { Scr->IconifyFunction.func = $2; |
|
437
by Matthew Fuller
Anyplace looking for a char * will find NULL as acceptable as (char |
401 |
root = GetRoot(TWM_ROOT,NULL,NULL); |
103
by Richard Levitte
Cosmetic changes. |
402 |
Scr->IconifyFunction.item = |
9
by Claude Lecommandeur
CTWM version 3.1 |
403 |
AddToMenu(root,"x",Action, |
437
by Matthew Fuller
Anyplace looking for a char * will find NULL as acceptable as (char |
404 |
NULL,$2, NULL, NULL); |
9
by Claude Lecommandeur
CTWM version 3.1 |
405 |
Action = ""; |
406 |
pull = NULL; |
|
407 |
}
|
|
435.1.7
by Matthew Fuller
Rename this 'list' var used to track the current list being worked on |
408 |
| WARP_CURSOR { curplist = &Scr->WarpCursorL; } |
1
by Claude Lecommandeur
CTWM version 1.1 |
409 |
win_list
|
103
by Richard Levitte
Cosmetic changes. |
410 |
| WARP_CURSOR { if (Scr->FirstTime) |
492.2.104
by Matthew Fuller
Massive rewrite of various struct Screen config params that are |
411 |
Scr->WarpCursor = true; } |
435.1.7
by Matthew Fuller
Rename this 'list' var used to track the current list being worked on |
412 |
| WINDOW_RING { curplist = &Scr->WindowRingL; } |
1
by Claude Lecommandeur
CTWM version 1.1 |
413 |
win_list
|
492.2.104
by Matthew Fuller
Massive rewrite of various struct Screen config params that are |
414 |
| WINDOW_RING { Scr->WindowRingAll = true; } |
103
by Richard Levitte
Cosmetic changes. |
415 |
| WINDOW_RING_EXCLUDE { if (!Scr->WindowRingL) |
492.2.104
by Matthew Fuller
Massive rewrite of various struct Screen config params that are |
416 |
Scr->WindowRingAll = true; |
435.1.7
by Matthew Fuller
Rename this 'list' var used to track the current list being worked on |
417 |
curplist = &Scr->WindowRingExcludeL; } |
103
by Richard Levitte
Cosmetic changes. |
418 |
win_list
|
419 |
| WINDOW_GEOMETRIES { } |
|
20
by Claude Lecommandeur
CTWM version 3.6 |
420 |
wingeom_list
|
103
by Richard Levitte
Cosmetic changes. |
421 |
| VIRTUAL_SCREENS { } |
21
by Richard Levitte
This constitutes all the changes Claude had done since version 3.6. |
422 |
geom_list
|
365.1.5
by Matthew Fuller
Add functions to handle EWMHIgnore {} config. |
423 |
| EWMH_IGNORE { } |
424 |
ewmh_ignore_list
|
|
473.1.7
by Matthew Fuller
Hook up parsing of MWMIgnore {} |
425 |
| MWM_IGNORE { } |
426 |
mwm_ignore_list
|
|
463.1.7
by Matthew Fuller
Add RplaySounds {} config block for setting sounds in the config file. |
427 |
| RPLAY_SOUNDS { } |
428 |
rplay_sounds_list
|
|
567.2.3
by Matthew Fuller
Add ForceFocus config param. |
429 |
| FORCE_FOCUS { Scr->ForceFocus = true; } |
430 |
| FORCE_FOCUS { curplist = &Scr->ForceFocusL; } |
|
431 |
win_list
|
|
207.1.8
by Richard Levitte
A few semicolons missings. Thanks, Debian, for having so clear diffs |
432 |
;
|
20
by Claude Lecommandeur
CTWM version 3.6 |
433 |
|
1
by Claude Lecommandeur
CTWM version 1.1 |
434 |
noarg : KEYWORD { if (!do_single_keyword ($1)) { |
435 |
twmrc_error_prefix(); |
|
436 |
fprintf (stderr, |
|
437 |
"unknown singleton keyword %d\n", |
|
438 |
$1); |
|
492.2.97
by Matthew Fuller
bool-ify flags and return values related to config file parsing. |
439 |
ParseError = true; |
1
by Claude Lecommandeur
CTWM version 1.1 |
440 |
}
|
441 |
}
|
|
442 |
;
|
|
443 |
||
444 |
sarg : SKEYWORD string { if (!do_string_keyword ($1, $2)) { |
|
445 |
twmrc_error_prefix(); |
|
446 |
fprintf (stderr, |
|
447 |
"unknown string keyword %d (value \"%s\")\n", |
|
448 |
$1, $2); |
|
492.2.97
by Matthew Fuller
bool-ify flags and return values related to config file parsing. |
449 |
ParseError = true; |
1
by Claude Lecommandeur
CTWM version 1.1 |
450 |
}
|
451 |
}
|
|
435.1.5
by Matthew Fuller
Turn the defstring var into a #define, and switch to using the #define |
452 |
| SKEYWORD { if (!do_string_keyword ($1, DEFSTRING)) { |
103
by Richard Levitte
Cosmetic changes. |
453 |
twmrc_error_prefix(); |
454 |
fprintf (stderr, |
|
455 |
"unknown string keyword %d (no value)\n", |
|
456 |
$1); |
|
492.2.97
by Matthew Fuller
bool-ify flags and return values related to config file parsing. |
457 |
ParseError = true; |
103
by Richard Levitte
Cosmetic changes. |
458 |
}
|
459 |
}
|
|
1
by Claude Lecommandeur
CTWM version 1.1 |
460 |
;
|
461 |
||
203
by Richard Levitte
Enhance RandomPlacement with a displacement argument. |
462 |
sarg : SSKEYWORD string string |
463 |
{ if (!do_string_string_keyword ($1, $2, $3)) { |
|
464 |
twmrc_error_prefix(); |
|
465 |
fprintf (stderr, |
|
466 |
"unknown strings keyword %d (value \"%s\" and \"%s\")\n", |
|
467 |
$1, $2, $3); |
|
492.2.97
by Matthew Fuller
bool-ify flags and return values related to config file parsing. |
468 |
ParseError = true; |
203
by Richard Levitte
Enhance RandomPlacement with a displacement argument. |
469 |
}
|
470 |
}
|
|
435.1.4
by Matthew Fuller
Eliminate the need for defstring in do_string_string_keyword() by just |
471 |
| SSKEYWORD string { if (!do_string_string_keyword ($1, $2, NULL)) { |
203
by Richard Levitte
Enhance RandomPlacement with a displacement argument. |
472 |
twmrc_error_prefix(); |
473 |
fprintf (stderr, |
|
474 |
"unknown string keyword %d (value \"%s\")\n", |
|
475 |
$1, $2); |
|
492.2.97
by Matthew Fuller
bool-ify flags and return values related to config file parsing. |
476 |
ParseError = true; |
203
by Richard Levitte
Enhance RandomPlacement with a displacement argument. |
477 |
}
|
478 |
}
|
|
435.1.4
by Matthew Fuller
Eliminate the need for defstring in do_string_string_keyword() by just |
479 |
| SSKEYWORD { if (!do_string_string_keyword ($1, NULL, NULL)) { |
203
by Richard Levitte
Enhance RandomPlacement with a displacement argument. |
480 |
twmrc_error_prefix(); |
481 |
fprintf (stderr, |
|
482 |
"unknown string keyword %d (no value)\n", |
|
483 |
$1); |
|
492.2.97
by Matthew Fuller
bool-ify flags and return values related to config file parsing. |
484 |
ParseError = true; |
203
by Richard Levitte
Enhance RandomPlacement with a displacement argument. |
485 |
}
|
486 |
}
|
|
487 |
;
|
|
488 |
||
1
by Claude Lecommandeur
CTWM version 1.1 |
489 |
narg : NKEYWORD number { if (!do_number_keyword ($1, $2)) { |
490 |
twmrc_error_prefix(); |
|
491 |
fprintf (stderr, |
|
492 |
"unknown numeric keyword %d (value %d)\n", |
|
493 |
$1, $2); |
|
492.2.97
by Matthew Fuller
bool-ify flags and return values related to config file parsing. |
494 |
ParseError = true; |
1
by Claude Lecommandeur
CTWM version 1.1 |
495 |
}
|
496 |
}
|
|
497 |
;
|
|
498 |
||
499 |
||
500 |
||
205
by Richard Levitte
- Extend the button specification for title buttons to take modifiers. |
501 |
keyaction : EQUALS keys COLON action { $$ = $4; } |
502 |
;
|
|
503 |
||
1
by Claude Lecommandeur
CTWM version 1.1 |
504 |
full : EQUALS keys COLON contexts COLON action { $$ = $6; } |
505 |
;
|
|
506 |
||
507 |
fullkey : EQUALS keys COLON contextkeys COLON action { $$ = $6; } |
|
508 |
;
|
|
509 |
||
510 |
keys : /* Empty */ |
|
511 |
| keys key |
|
512 |
;
|
|
513 |
||
514 |
key : META { mods |= Mod1Mask; } |
|
515 |
| SHIFT { mods |= ShiftMask; } |
|
516 |
| LOCK { mods |= LockMask; } |
|
517 |
| CONTROL { mods |= ControlMask; } |
|
12
by Claude Lecommandeur
CTWM version 3.3 |
518 |
| ALTER number { if ($2 < 1 || $2 > 5) { |
519 |
twmrc_error_prefix(); |
|
103
by Richard Levitte
Cosmetic changes. |
520 |
fprintf (stderr, |
448.1.7
by Matthew Fuller
Correct an error message. |
521 |
"bad altkeymap number (%d), must be 1-5\n", |
12
by Claude Lecommandeur
CTWM version 3.3 |
522 |
$2); |
492.2.97
by Matthew Fuller
bool-ify flags and return values related to config file parsing. |
523 |
ParseError = true; |
12
by Claude Lecommandeur
CTWM version 3.3 |
524 |
} else { |
525 |
mods |= (Alt1Mask << ($2 - 1)); |
|
526 |
}
|
|
527 |
}
|
|
1
by Claude Lecommandeur
CTWM version 1.1 |
528 |
| META number { if ($2 < 1 || $2 > 5) { |
529 |
twmrc_error_prefix(); |
|
103
by Richard Levitte
Cosmetic changes. |
530 |
fprintf (stderr, |
1
by Claude Lecommandeur
CTWM version 1.1 |
531 |
"bad modifier number (%d), must be 1-5\n", |
532 |
$2); |
|
492.2.97
by Matthew Fuller
bool-ify flags and return values related to config file parsing. |
533 |
ParseError = true; |
1
by Claude Lecommandeur
CTWM version 1.1 |
534 |
} else { |
535 |
mods |= (Mod1Mask << ($2 - 1)); |
|
536 |
}
|
|
537 |
}
|
|
538 |
| OR { } |
|
539 |
;
|
|
540 |
||
513.1.4
by Matthew Fuller
Add rules for parsing vertical vs. horizontal gravity. |
541 |
vgrav : GRAVITY { |
542 |
switch($1) { |
|
513.1.8
by Matthew Fuller
Swap to the new enum for these gravity values, and retire the old |
543 |
case GRAV_NORTH: |
544 |
case GRAV_SOUTH: |
|
513.1.4
by Matthew Fuller
Add rules for parsing vertical vs. horizontal gravity. |
545 |
/* OK */ |
546 |
$$ = $1; |
|
547 |
break; |
|
548 |
default: |
|
549 |
twmrc_error_prefix(); |
|
513.1.12
by Matthew Fuller
Actually, it looks like I can just pull in yytext to gram.y, so revert |
550 |
fprintf(stderr, "Bad vertical gravity '%s'\n", yytext); |
513.1.16
by Matthew Fuller
YYERROR; should end the processing of the case, so set our ParseError |
551 |
ParseError = true; |
513.1.4
by Matthew Fuller
Add rules for parsing vertical vs. horizontal gravity. |
552 |
YYERROR; |
553 |
}
|
|
554 |
}
|
|
555 |
||
556 |
hgrav : GRAVITY { |
|
557 |
switch($1) { |
|
513.1.8
by Matthew Fuller
Swap to the new enum for these gravity values, and retire the old |
558 |
case GRAV_EAST: |
559 |
case GRAV_WEST: |
|
513.1.4
by Matthew Fuller
Add rules for parsing vertical vs. horizontal gravity. |
560 |
/* OK */ |
561 |
$$ = $1; |
|
562 |
break; |
|
563 |
default: |
|
564 |
twmrc_error_prefix(); |
|
513.1.12
by Matthew Fuller
Actually, it looks like I can just pull in yytext to gram.y, so revert |
565 |
fprintf(stderr, "Bad horiz gravity '%s'\n", yytext); |
513.1.16
by Matthew Fuller
YYERROR; should end the processing of the case, so set our ParseError |
566 |
ParseError = true; |
513.1.4
by Matthew Fuller
Add rules for parsing vertical vs. horizontal gravity. |
567 |
YYERROR; |
568 |
}
|
|
569 |
}
|
|
570 |
||
1
by Claude Lecommandeur
CTWM version 1.1 |
571 |
contexts : /* Empty */ |
572 |
| contexts context |
|
573 |
;
|
|
574 |
||
575 |
context : WINDOW { cont |= C_WINDOW_BIT; } |
|
576 |
| TITLE { cont |= C_TITLE_BIT; } |
|
577 |
| ICON { cont |= C_ICON_BIT; } |
|
578 |
| ROOT { cont |= C_ROOT_BIT; } |
|
579 |
| FRAME { cont |= C_FRAME_BIT; } |
|
21
by Richard Levitte
This constitutes all the changes Claude had done since version 3.6. |
580 |
| WORKSPACE { cont |= C_WORKSPACE_BIT; } |
1
by Claude Lecommandeur
CTWM version 1.1 |
581 |
| ICONMGR { cont |= C_ICONMGR_BIT; } |
582 |
| META { cont |= C_ICONMGR_BIT; } |
|
103
by Richard Levitte
Cosmetic changes. |
583 |
| ALTER { cont |= C_ALTER_BIT; } |
1
by Claude Lecommandeur
CTWM version 1.1 |
584 |
| ALL { cont |= C_ALL_BITS; } |
448.1.2
by Matthew Fuller
Tweak ordering/whitespace in these two definitions so they're the same |
585 |
| OR { } |
1
by Claude Lecommandeur
CTWM version 1.1 |
586 |
;
|
587 |
||
588 |
contextkeys : /* Empty */ |
|
589 |
| contextkeys contextkey |
|
590 |
;
|
|
591 |
||
592 |
contextkey : WINDOW { cont |= C_WINDOW_BIT; } |
|
593 |
| TITLE { cont |= C_TITLE_BIT; } |
|
594 |
| ICON { cont |= C_ICON_BIT; } |
|
595 |
| ROOT { cont |= C_ROOT_BIT; } |
|
596 |
| FRAME { cont |= C_FRAME_BIT; } |
|
21
by Richard Levitte
This constitutes all the changes Claude had done since version 3.6. |
597 |
| WORKSPACE { cont |= C_WORKSPACE_BIT; } |
1
by Claude Lecommandeur
CTWM version 1.1 |
598 |
| ICONMGR { cont |= C_ICONMGR_BIT; } |
599 |
| META { cont |= C_ICONMGR_BIT; } |
|
448.1.2
by Matthew Fuller
Tweak ordering/whitespace in these two definitions so they're the same |
600 |
| ALTER { cont |= C_ALTER_BIT; } |
1
by Claude Lecommandeur
CTWM version 1.1 |
601 |
| ALL { cont |= C_ALL_BITS; } |
602 |
| OR { } |
|
17
by Claude Lecommandeur
CTWM version 3.5 |
603 |
| string { Name = (char*)$1; cont |= C_NAME_BIT; } |
1
by Claude Lecommandeur
CTWM version 1.1 |
604 |
;
|
605 |
||
606 |
||
16
by Claude Lecommandeur
CTWM version 3.4pl2 |
607 |
binding_list : LB binding_entries RB {} |
103
by Richard Levitte
Cosmetic changes. |
608 |
;
|
11
by Claude Lecommandeur
CTWM version 3.2p1 |
609 |
|
610 |
binding_entries : /* Empty */ |
|
103
by Richard Levitte
Cosmetic changes. |
611 |
| binding_entries binding_entry |
612 |
;
|
|
11
by Claude Lecommandeur
CTWM version 3.2p1 |
613 |
|
488.1.4
by Matthew Fuller
Rename ModifyCurrentTB() to SetCurrentTBAction() to be a little more |
614 |
binding_entry : button keyaction { SetCurrentTBAction($1, mods, $2, Action, pull); mods = 0;} |
615 |
| button EQUALS action { SetCurrentTBAction($1, 0, $3, Action, pull);} |
|
440
by Matthew Fuller
De-support the pre-3.8 title button syntax. |
616 |
| button COLON action { |
617 |
/* Deprecated since 3.8, no longer supported */ |
|
618 |
yyerror("Title buttons specifications without = are no " |
|
619 |
"longer supported."); |
|
620 |
}
|
|
103
by Richard Levitte
Cosmetic changes. |
621 |
;
|
11
by Claude Lecommandeur
CTWM version 3.2p1 |
622 |
|
623 |
||
10
by Claude Lecommandeur
CTWM version 3.1p3 |
624 |
pixmap_list : LB pixmap_entries RB {} |
1
by Claude Lecommandeur
CTWM version 1.1 |
625 |
;
|
626 |
||
627 |
pixmap_entries : /* Empty */ |
|
628 |
| pixmap_entries pixmap_entry |
|
629 |
;
|
|
630 |
||
488.1.39
by Matthew Fuller
Hiding implementation details is generally a good thing, but the |
631 |
pixmap_entry : TITLE_HILITE string { Scr->HighlightPixmapName = strdup($2); } |
1
by Claude Lecommandeur
CTWM version 1.1 |
632 |
;
|
633 |
||
634 |
||
10
by Claude Lecommandeur
CTWM version 3.1p3 |
635 |
cursor_list : LB cursor_entries RB {} |
1
by Claude Lecommandeur
CTWM version 1.1 |
636 |
;
|
637 |
||
638 |
cursor_entries : /* Empty */ |
|
639 |
| cursor_entries cursor_entry |
|
640 |
;
|
|
641 |
||
642 |
cursor_entry : FRAME string string { |
|
643 |
NewBitmapCursor(&Scr->FrameCursor, $2, $3); } |
|
644 |
| FRAME string { |
|
645 |
NewFontCursor(&Scr->FrameCursor, $2); } |
|
646 |
| TITLE string string { |
|
647 |
NewBitmapCursor(&Scr->TitleCursor, $2, $3); } |
|
648 |
| TITLE string { |
|
649 |
NewFontCursor(&Scr->TitleCursor, $2); } |
|
650 |
| ICON string string { |
|
651 |
NewBitmapCursor(&Scr->IconCursor, $2, $3); } |
|
652 |
| ICON string { |
|
653 |
NewFontCursor(&Scr->IconCursor, $2); } |
|
654 |
| ICONMGR string string { |
|
655 |
NewBitmapCursor(&Scr->IconMgrCursor, $2, $3); } |
|
656 |
| ICONMGR string { |
|
657 |
NewFontCursor(&Scr->IconMgrCursor, $2); } |
|
658 |
| BUTTON string string { |
|
659 |
NewBitmapCursor(&Scr->ButtonCursor, $2, $3); } |
|
660 |
| BUTTON string { |
|
661 |
NewFontCursor(&Scr->ButtonCursor, $2); } |
|
662 |
| MOVE string string { |
|
663 |
NewBitmapCursor(&Scr->MoveCursor, $2, $3); } |
|
664 |
| MOVE string { |
|
665 |
NewFontCursor(&Scr->MoveCursor, $2); } |
|
666 |
| RESIZE string string { |
|
667 |
NewBitmapCursor(&Scr->ResizeCursor, $2, $3); } |
|
668 |
| RESIZE string { |
|
669 |
NewFontCursor(&Scr->ResizeCursor, $2); } |
|
8
by Claude Lecommandeur
CTWM version 3.0 |
670 |
| WAITC string string { |
1
by Claude Lecommandeur
CTWM version 1.1 |
671 |
NewBitmapCursor(&Scr->WaitCursor, $2, $3); } |
8
by Claude Lecommandeur
CTWM version 3.0 |
672 |
| WAITC string { |
1
by Claude Lecommandeur
CTWM version 1.1 |
673 |
NewFontCursor(&Scr->WaitCursor, $2); } |
674 |
| MENU string string { |
|
675 |
NewBitmapCursor(&Scr->MenuCursor, $2, $3); } |
|
676 |
| MENU string { |
|
677 |
NewFontCursor(&Scr->MenuCursor, $2); } |
|
678 |
| SELECT string string { |
|
679 |
NewBitmapCursor(&Scr->SelectCursor, $2, $3); } |
|
680 |
| SELECT string { |
|
681 |
NewFontCursor(&Scr->SelectCursor, $2); } |
|
682 |
| KILL string string { |
|
683 |
NewBitmapCursor(&Scr->DestroyCursor, $2, $3); } |
|
684 |
| KILL string { |
|
685 |
NewFontCursor(&Scr->DestroyCursor, $2); } |
|
686 |
;
|
|
687 |
||
10
by Claude Lecommandeur
CTWM version 3.1p3 |
688 |
color_list : LB color_entries RB {} |
1
by Claude Lecommandeur
CTWM version 1.1 |
689 |
;
|
690 |
||
691 |
||
692 |
color_entries : /* Empty */ |
|
693 |
| color_entries color_entry |
|
694 |
;
|
|
695 |
||
696 |
color_entry : CLKEYWORD string { if (!do_colorlist_keyword ($1, color, |
|
697 |
$2)) { |
|
698 |
twmrc_error_prefix(); |
|
699 |
fprintf (stderr, |
|
700 |
"unhandled list color keyword %d (string \"%s\")\n", |
|
701 |
$1, $2); |
|
492.2.97
by Matthew Fuller
bool-ify flags and return values related to config file parsing. |
702 |
ParseError = true; |
1
by Claude Lecommandeur
CTWM version 1.1 |
703 |
}
|
704 |
}
|
|
435.1.7
by Matthew Fuller
Rename this 'list' var used to track the current list being worked on |
705 |
| CLKEYWORD string { curplist = do_colorlist_keyword($1,color, |
1
by Claude Lecommandeur
CTWM version 1.1 |
706 |
$2); |
435.1.7
by Matthew Fuller
Rename this 'list' var used to track the current list being worked on |
707 |
if (!curplist) { |
1
by Claude Lecommandeur
CTWM version 1.1 |
708 |
twmrc_error_prefix(); |
709 |
fprintf (stderr, |
|
710 |
"unhandled color list keyword %d (string \"%s\")\n", |
|
711 |
$1, $2); |
|
492.2.97
by Matthew Fuller
bool-ify flags and return values related to config file parsing. |
712 |
ParseError = true; |
1
by Claude Lecommandeur
CTWM version 1.1 |
713 |
}
|
714 |
}
|
|
715 |
win_color_list
|
|
716 |
| CKEYWORD string { if (!do_color_keyword ($1, color, |
|
717 |
$2)) { |
|
718 |
twmrc_error_prefix(); |
|
719 |
fprintf (stderr, |
|
720 |
"unhandled color keyword %d (string \"%s\")\n", |
|
721 |
$1, $2); |
|
492.2.97
by Matthew Fuller
bool-ify flags and return values related to config file parsing. |
722 |
ParseError = true; |
1
by Claude Lecommandeur
CTWM version 1.1 |
723 |
}
|
724 |
}
|
|
725 |
;
|
|
726 |
||
10
by Claude Lecommandeur
CTWM version 3.1p3 |
727 |
save_color_list : LB s_color_entries RB {} |
103
by Richard Levitte
Cosmetic changes. |
728 |
;
|
1
by Claude Lecommandeur
CTWM version 1.1 |
729 |
|
730 |
s_color_entries : /* Empty */ |
|
103
by Richard Levitte
Cosmetic changes. |
731 |
| s_color_entries s_color_entry |
732 |
;
|
|
1
by Claude Lecommandeur
CTWM version 1.1 |
733 |
|
103
by Richard Levitte
Cosmetic changes. |
734 |
s_color_entry : string { do_string_savecolor(color, $1); } |
735 |
| CLKEYWORD { do_var_savecolor($1); } |
|
736 |
;
|
|
1
by Claude Lecommandeur
CTWM version 1.1 |
737 |
|
10
by Claude Lecommandeur
CTWM version 3.1p3 |
738 |
win_color_list : LB win_color_entries RB {} |
1
by Claude Lecommandeur
CTWM version 1.1 |
739 |
;
|
740 |
||
741 |
win_color_entries : /* Empty */ |
|
742 |
| win_color_entries win_color_entry |
|
743 |
;
|
|
744 |
||
745 |
win_color_entry : string string { if (Scr->FirstTime && |
|
746 |
color == Scr->Monochrome) |
|
435.1.7
by Matthew Fuller
Rename this 'list' var used to track the current list being worked on |
747 |
AddToList(curplist, $1, $2); } |
1
by Claude Lecommandeur
CTWM version 1.1 |
748 |
;
|
749 |
||
20
by Claude Lecommandeur
CTWM version 3.6 |
750 |
wingeom_list : LB wingeom_entries RB {} |
751 |
;
|
|
752 |
||
753 |
wingeom_entries : /* Empty */ |
|
754 |
| wingeom_entries wingeom_entry |
|
755 |
;
|
|
79
by Dan Lilliehorn
Lots of updates and bugfixes. |
756 |
/* added a ';' after call to AddToList */ |
21
by Richard Levitte
This constitutes all the changes Claude had done since version 3.6. |
757 |
wingeom_entry : string string { AddToList (&Scr->WindowGeometries, $1, $2); } |
103
by Richard Levitte
Cosmetic changes. |
758 |
;
|
21
by Richard Levitte
This constitutes all the changes Claude had done since version 3.6. |
759 |
|
760 |
geom_list : LB geom_entries RB {} |
|
761 |
;
|
|
762 |
||
763 |
geom_entries : /* Empty */ |
|
764 |
| geom_entries geom_entry |
|
765 |
;
|
|
78
by Richard Levitte
Add missing ; |
766 |
|
67
by Richard Levitte
Add missing colon. |
767 |
geom_entry : string { AddToList (&Scr->VirtualScreens, $1, ""); } |
78
by Richard Levitte
Add missing ; |
768 |
;
|
20
by Claude Lecommandeur
CTWM version 3.6 |
769 |
|
365.1.5
by Matthew Fuller
Add functions to handle EWMHIgnore {} config. |
770 |
|
771 |
ewmh_ignore_list : LB ewmh_ignore_entries RB { proc_ewmh_ignore(); } |
|
772 |
;
|
|
773 |
||
774 |
ewmh_ignore_entries : /* Empty */ |
|
775 |
| ewmh_ignore_entries ewmh_ignore_entry |
|
776 |
;
|
|
777 |
||
778 |
ewmh_ignore_entry : string { add_ewmh_ignore($1); } |
|
779 |
;
|
|
780 |
||
781 |
||
473.1.7
by Matthew Fuller
Hook up parsing of MWMIgnore {} |
782 |
mwm_ignore_list : LB mwm_ignore_entries RB { proc_mwm_ignore(); } |
783 |
;
|
|
784 |
||
785 |
mwm_ignore_entries : /* Empty */ |
|
786 |
| mwm_ignore_entries mwm_ignore_entry |
|
787 |
;
|
|
788 |
||
789 |
mwm_ignore_entry : string { add_mwm_ignore($1); } |
|
790 |
;
|
|
791 |
||
792 |
||
103
by Richard Levitte
Cosmetic changes. |
793 |
squeeze : SQUEEZE_TITLE { |
492.2.104
by Matthew Fuller
Massive rewrite of various struct Screen config params that are |
794 |
if (HasShape) Scr->SqueezeTitle = true; |
1
by Claude Lecommandeur
CTWM version 1.1 |
795 |
}
|
435.1.7
by Matthew Fuller
Rename this 'list' var used to track the current list being worked on |
796 |
| SQUEEZE_TITLE { curplist = &Scr->SqueezeTitleL; |
604.1.3
by Matthew Fuller
Eliminate ScreenInfo.SqueezeTitleSet. It's used as a flag in the |
797 |
if (HasShape) |
492.2.104
by Matthew Fuller
Massive rewrite of various struct Screen config params that are |
798 |
Scr->SqueezeTitle = true; |
1
by Claude Lecommandeur
CTWM version 1.1 |
799 |
}
|
800 |
LB win_sqz_entries RB |
|
492.2.104
by Matthew Fuller
Massive rewrite of various struct Screen config params that are |
801 |
| DONT_SQUEEZE_TITLE { Scr->SqueezeTitle = false; } |
435.1.7
by Matthew Fuller
Rename this 'list' var used to track the current list being worked on |
802 |
| DONT_SQUEEZE_TITLE { curplist = &Scr->DontSqueezeTitleL; } |
1
by Claude Lecommandeur
CTWM version 1.1 |
803 |
win_list
|
804 |
;
|
|
805 |
||
806 |
win_sqz_entries : /* Empty */ |
|
496.1.24
by Matthew Fuller
Rename the parser name for the lef/center/right keywords used in |
807 |
| win_sqz_entries string SIJENUM signed_number number { |
1
by Claude Lecommandeur
CTWM version 1.1 |
808 |
if (Scr->FirstTime) { |
435.1.7
by Matthew Fuller
Rename this 'list' var used to track the current list being worked on |
809 |
do_squeeze_entry (curplist, $2, $3, $4, $5); |
1
by Claude Lecommandeur
CTWM version 1.1 |
810 |
}
|
811 |
}
|
|
812 |
;
|
|
813 |
||
814 |
||
10
by Claude Lecommandeur
CTWM version 3.1p3 |
815 |
iconm_list : LB iconm_entries RB {} |
1
by Claude Lecommandeur
CTWM version 1.1 |
816 |
;
|
817 |
||
818 |
iconm_entries : /* Empty */ |
|
819 |
| iconm_entries iconm_entry |
|
820 |
;
|
|
821 |
||
822 |
iconm_entry : string string number { if (Scr->FirstTime) |
|
435.1.7
by Matthew Fuller
Rename this 'list' var used to track the current list being worked on |
823 |
AddToList(curplist, $1, |
437
by Matthew Fuller
Anyplace looking for a char * will find NULL as acceptable as (char |
824 |
AllocateIconManager($1, NULL, |
1
by Claude Lecommandeur
CTWM version 1.1 |
825 |
$2,$3)); |
826 |
}
|
|
827 |
| string string string number |
|
828 |
{ if (Scr->FirstTime) |
|
435.1.7
by Matthew Fuller
Rename this 'list' var used to track the current list being worked on |
829 |
AddToList(curplist, $1, |
1
by Claude Lecommandeur
CTWM version 1.1 |
830 |
AllocateIconManager($1,$2, |
831 |
$3, $4)); |
|
832 |
}
|
|
833 |
;
|
|
834 |
||
10
by Claude Lecommandeur
CTWM version 3.1p3 |
835 |
workspc_list : LB workspc_entries RB {} |
1
by Claude Lecommandeur
CTWM version 1.1 |
836 |
;
|
837 |
||
838 |
workspc_entries : /* Empty */ |
|
5
by Claude Lecommandeur
CTWM version 2.1 |
839 |
| workspc_entries workspc_entry |
1
by Claude Lecommandeur
CTWM version 1.1 |
840 |
;
|
841 |
||
842 |
workspc_entry : string { |
|
437
by Matthew Fuller
Anyplace looking for a char * will find NULL as acceptable as (char |
843 |
AddWorkSpace ($1, NULL, NULL, NULL, NULL, NULL); |
1
by Claude Lecommandeur
CTWM version 1.1 |
844 |
}
|
845 |
| string { |
|
17
by Claude Lecommandeur
CTWM version 3.5 |
846 |
curWorkSpc = (char*)$1; |
1
by Claude Lecommandeur
CTWM version 1.1 |
847 |
}
|
848 |
workapp_list
|
|
849 |
;
|
|
850 |
||
10
by Claude Lecommandeur
CTWM version 3.1p3 |
851 |
workapp_list : LB workapp_entries RB {} |
1
by Claude Lecommandeur
CTWM version 1.1 |
852 |
;
|
853 |
||
854 |
workapp_entries : /* Empty */ |
|
855 |
| workapp_entries workapp_entry |
|
856 |
;
|
|
857 |
||
858 |
workapp_entry : string { |
|
437
by Matthew Fuller
Anyplace looking for a char * will find NULL as acceptable as (char |
859 |
AddWorkSpace (curWorkSpc, $1, NULL, NULL, NULL, NULL); |
1
by Claude Lecommandeur
CTWM version 1.1 |
860 |
}
|
861 |
| string string { |
|
437
by Matthew Fuller
Anyplace looking for a char * will find NULL as acceptable as (char |
862 |
AddWorkSpace (curWorkSpc, $1, $2, NULL, NULL, NULL); |
1
by Claude Lecommandeur
CTWM version 1.1 |
863 |
}
|
864 |
| string string string { |
|
437
by Matthew Fuller
Anyplace looking for a char * will find NULL as acceptable as (char |
865 |
AddWorkSpace (curWorkSpc, $1, $2, $3, NULL, NULL); |
1
by Claude Lecommandeur
CTWM version 1.1 |
866 |
}
|
867 |
| string string string string { |
|
437
by Matthew Fuller
Anyplace looking for a char * will find NULL as acceptable as (char |
868 |
AddWorkSpace (curWorkSpc, $1, $2, $3, $4, NULL); |
1
by Claude Lecommandeur
CTWM version 1.1 |
869 |
}
|
870 |
| string string string string string { |
|
871 |
AddWorkSpace (curWorkSpc, $1, $2, $3, $4, $5); |
|
872 |
}
|
|
873 |
;
|
|
874 |
||
4
by Claude Lecommandeur
CTWM version 2.0 |
875 |
curwork : LB string RB { |
876 |
WMapCreateCurrentBackGround ($2, NULL, NULL, NULL); |
|
877 |
}
|
|
878 |
| LB string string RB { |
|
879 |
WMapCreateCurrentBackGround ($2, $3, NULL, NULL); |
|
880 |
}
|
|
881 |
| LB string string string RB { |
|
882 |
WMapCreateCurrentBackGround ($2, $3, $4, NULL); |
|
883 |
}
|
|
884 |
| LB string string string string RB { |
|
885 |
WMapCreateCurrentBackGround ($2, $3, $4, $5); |
|
886 |
}
|
|
887 |
;
|
|
888 |
||
889 |
defwork : LB string RB { |
|
890 |
WMapCreateDefaultBackGround ($2, NULL, NULL, NULL); |
|
891 |
}
|
|
892 |
| LB string string RB { |
|
893 |
WMapCreateDefaultBackGround ($2, $3, NULL, NULL); |
|
894 |
}
|
|
895 |
| LB string string string RB { |
|
896 |
WMapCreateDefaultBackGround ($2, $3, $4, NULL); |
|
897 |
}
|
|
898 |
| LB string string string string RB { |
|
899 |
WMapCreateDefaultBackGround ($2, $3, $4, $5); |
|
900 |
}
|
|
901 |
;
|
|
902 |
||
10
by Claude Lecommandeur
CTWM version 3.1p3 |
903 |
win_list : LB win_entries RB {} |
1
by Claude Lecommandeur
CTWM version 1.1 |
904 |
;
|
905 |
||
906 |
win_entries : /* Empty */ |
|
907 |
| win_entries win_entry |
|
908 |
;
|
|
909 |
||
910 |
win_entry : string { if (Scr->FirstTime) |
|
435.1.7
by Matthew Fuller
Rename this 'list' var used to track the current list being worked on |
911 |
AddToList(curplist, $1, 0); |
1
by Claude Lecommandeur
CTWM version 1.1 |
912 |
}
|
913 |
;
|
|
914 |
||
10
by Claude Lecommandeur
CTWM version 3.1p3 |
915 |
occupy_list : LB occupy_entries RB {} |
3
by Claude Lecommandeur
CTWM version 1.3 |
916 |
;
|
917 |
||
918 |
occupy_entries : /* Empty */ |
|
919 |
| occupy_entries occupy_entry |
|
920 |
;
|
|
921 |
||
17
by Claude Lecommandeur
CTWM version 3.5 |
922 |
occupy_entry : string {client = (char*)$1;} |
923 |
occupy_workspc_list
|
|
924 |
| WINDOW string {client = (char*)$2;} |
|
925 |
occupy_workspc_list
|
|
926 |
| WORKSPACE string {workspace = (char*)$2;} |
|
3
by Claude Lecommandeur
CTWM version 1.3 |
927 |
occupy_window_list
|
928 |
;
|
|
929 |
||
10
by Claude Lecommandeur
CTWM version 3.1p3 |
930 |
occupy_workspc_list : LB occupy_workspc_entries RB {} |
3
by Claude Lecommandeur
CTWM version 1.3 |
931 |
;
|
932 |
||
933 |
occupy_workspc_entries : /* Empty */ |
|
934 |
| occupy_workspc_entries occupy_workspc_entry |
|
935 |
;
|
|
936 |
||
937 |
occupy_workspc_entry : string { |
|
453.1.4
by Matthew Fuller
Make use of the AddToClientsList() return value to warn about unknown |
938 |
if(!AddToClientsList ($1, client)) { |
939 |
twmrc_error_prefix(); |
|
940 |
fprintf(stderr, "unknown workspace '%s'\n", $1); |
|
941 |
}
|
|
3
by Claude Lecommandeur
CTWM version 1.3 |
942 |
}
|
207.1.8
by Richard Levitte
A few semicolons missings. Thanks, Debian, for having so clear diffs |
943 |
;
|
3
by Claude Lecommandeur
CTWM version 1.3 |
944 |
|
10
by Claude Lecommandeur
CTWM version 3.1p3 |
945 |
occupy_window_list : LB occupy_window_entries RB {} |
3
by Claude Lecommandeur
CTWM version 1.3 |
946 |
;
|
947 |
||
948 |
occupy_window_entries : /* Empty */ |
|
949 |
| occupy_window_entries occupy_window_entry |
|
950 |
;
|
|
951 |
||
952 |
occupy_window_entry : string { |
|
453.1.4
by Matthew Fuller
Make use of the AddToClientsList() return value to warn about unknown |
953 |
if(!AddToClientsList (workspace, $1)) { |
954 |
twmrc_error_prefix(); |
|
955 |
fprintf(stderr, "unknown workspace '%s'\n", workspace); |
|
956 |
}
|
|
3
by Claude Lecommandeur
CTWM version 1.3 |
957 |
}
|
207.1.8
by Richard Levitte
A few semicolons missings. Thanks, Debian, for having so clear diffs |
958 |
;
|
3
by Claude Lecommandeur
CTWM version 1.3 |
959 |
|
10
by Claude Lecommandeur
CTWM version 3.1p3 |
960 |
icon_list : LB icon_entries RB {} |
1
by Claude Lecommandeur
CTWM version 1.1 |
961 |
;
|
962 |
||
963 |
icon_entries : /* Empty */ |
|
964 |
| icon_entries icon_entry |
|
965 |
;
|
|
966 |
||
435.1.7
by Matthew Fuller
Rename this 'list' var used to track the current list being worked on |
967 |
icon_entry : string string { if (Scr->FirstTime) AddToList(curplist, $1, $2); } |
1
by Claude Lecommandeur
CTWM version 1.1 |
968 |
;
|
969 |
||
463.1.17
by Matthew Fuller
Add ifdef's so that RplaySounds{} gives an appropriate warning when |
970 |
rplay_sounds_list : LB rplay_sounds_entries RB { |
971 |
#ifndef SOUNDS |
|
972 |
twmrc_error_prefix(); |
|
973 |
fprintf(stderr, "RplaySounds ignored; rplay support " |
|
974 |
"not configured.\n"); |
|
975 |
#else
|
|
976 |
sound_set_from_config(); |
|
977 |
#endif
|
|
978 |
}
|
|
463.1.7
by Matthew Fuller
Add RplaySounds {} config block for setting sounds in the config file. |
979 |
;
|
980 |
||
981 |
rplay_sounds_entries : /* Empty */ |
|
982 |
| rplay_sounds_entries rplay_sounds_entry |
|
983 |
;
|
|
984 |
||
985 |
rplay_sounds_entry : string string { |
|
463.1.17
by Matthew Fuller
Add ifdef's so that RplaySounds{} gives an appropriate warning when |
986 |
#ifdef SOUNDS |
463.1.13
by Matthew Fuller
Show warning if we failed setting an event from the config file. |
987 |
if(set_sound_event_name($1, $2) != 0) { |
988 |
twmrc_error_prefix(); |
|
989 |
fprintf(stderr, "Failed adding sound for %s; " |
|
990 |
"maybe event name is invalid?\n", $1); |
|
991 |
}
|
|
463.1.17
by Matthew Fuller
Add ifdef's so that RplaySounds{} gives an appropriate warning when |
992 |
#endif
|
463.1.7
by Matthew Fuller
Add RplaySounds {} config block for setting sounds in the config file. |
993 |
}
|
994 |
;
|
|
995 |
||
10
by Claude Lecommandeur
CTWM version 3.1p3 |
996 |
function : LB function_entries RB {} |
1
by Claude Lecommandeur
CTWM version 1.1 |
997 |
;
|
998 |
||
999 |
function_entries: /* Empty */ |
|
1000 |
| function_entries function_entry |
|
1001 |
;
|
|
1002 |
||
109
by Richard Levitte
AddToMenu was called with incorrect arguments |
1003 |
function_entry : action { AddToMenu(root, "", Action, NULL, $1, |
437
by Matthew Fuller
Anyplace looking for a char * will find NULL as acceptable as (char |
1004 |
NULL, NULL); |
1
by Claude Lecommandeur
CTWM version 1.1 |
1005 |
Action = ""; |
1006 |
}
|
|
1007 |
;
|
|
1008 |
||
492.2.80
by Matthew Fuller
Mechanical replacement of inline "(sometype *)0" constructs with NULL, |
1009 |
menu : LB menu_entries RB {lastmenuitem = NULL;} |
1
by Claude Lecommandeur
CTWM version 1.1 |
1010 |
;
|
1011 |
||
1012 |
menu_entries : /* Empty */ |
|
1013 |
| menu_entries menu_entry |
|
1014 |
;
|
|
1015 |
||
8
by Claude Lecommandeur
CTWM version 3.0 |
1016 |
menu_entry : string action { |
1017 |
if ($2 == F_SEPARATOR) { |
|
492.2.84
by Matthew Fuller
bool-ify booleans in menus.h structs. |
1018 |
if (lastmenuitem) lastmenuitem->separated = true; |
8
by Claude Lecommandeur
CTWM version 3.0 |
1019 |
}
|
1020 |
else { |
|
437
by Matthew Fuller
Anyplace looking for a char * will find NULL as acceptable as (char |
1021 |
lastmenuitem = AddToMenu(root, $1, Action, pull, $2, NULL, NULL); |
8
by Claude Lecommandeur
CTWM version 3.0 |
1022 |
Action = ""; |
1023 |
pull = NULL; |
|
1024 |
}
|
|
1025 |
}
|
|
1
by Claude Lecommandeur
CTWM version 1.1 |
1026 |
| string LP string COLON string RP action { |
8
by Claude Lecommandeur
CTWM version 3.0 |
1027 |
if ($7 == F_SEPARATOR) { |
492.2.84
by Matthew Fuller
bool-ify booleans in menus.h structs. |
1028 |
if (lastmenuitem) lastmenuitem->separated = true; |
8
by Claude Lecommandeur
CTWM version 3.0 |
1029 |
}
|
1030 |
else { |
|
1031 |
lastmenuitem = AddToMenu(root, $1, Action, pull, $7, $3, $5); |
|
1032 |
Action = ""; |
|
1033 |
pull = NULL; |
|
1034 |
}
|
|
1035 |
}
|
|
1
by Claude Lecommandeur
CTWM version 1.1 |
1036 |
;
|
1037 |
||
1038 |
action : FKEYWORD { $$ = $1; } |
|
1039 |
| FSKEYWORD string { |
|
1040 |
$$ = $1; |
|
17
by Claude Lecommandeur
CTWM version 3.5 |
1041 |
Action = (char*)$2; |
1
by Claude Lecommandeur
CTWM version 1.1 |
1042 |
switch ($1) { |
1043 |
case F_MENU: |
|
437
by Matthew Fuller
Anyplace looking for a char * will find NULL as acceptable as (char |
1044 |
pull = GetRoot ($2, NULL,NULL); |
1
by Claude Lecommandeur
CTWM version 1.1 |
1045 |
pull->prev = root; |
1046 |
break; |
|
1047 |
case F_WARPRING: |
|
1048 |
if (!CheckWarpRingArg (Action)) { |
|
1049 |
twmrc_error_prefix(); |
|
1050 |
fprintf (stderr, |
|
1051 |
"ignoring invalid f.warptoring argument \"%s\"\n", |
|
1052 |
Action); |
|
1053 |
$$ = F_NOP; |
|
1054 |
}
|
|
1055 |
case F_WARPTOSCREEN: |
|
1056 |
if (!CheckWarpScreenArg (Action)) { |
|
1057 |
twmrc_error_prefix(); |
|
103
by Richard Levitte
Cosmetic changes. |
1058 |
fprintf (stderr, |
1059 |
"ignoring invalid f.warptoscreen argument \"%s\"\n", |
|
1060 |
Action); |
|
1
by Claude Lecommandeur
CTWM version 1.1 |
1061 |
$$ = F_NOP; |
1062 |
}
|
|
1063 |
break; |
|
1064 |
case F_COLORMAP: |
|
1065 |
if (CheckColormapArg (Action)) { |
|
1066 |
$$ = F_COLORMAP; |
|
1067 |
} else { |
|
1068 |
twmrc_error_prefix(); |
|
1069 |
fprintf (stderr, |
|
103
by Richard Levitte
Cosmetic changes. |
1070 |
"ignoring invalid f.colormap argument \"%s\"\n", |
1
by Claude Lecommandeur
CTWM version 1.1 |
1071 |
Action); |
1072 |
$$ = F_NOP; |
|
1073 |
}
|
|
1074 |
break; |
|
1075 |
} /* end switch */ |
|
1076 |
}
|
|
1077 |
;
|
|
1078 |
||
1079 |
||
1080 |
signed_number : number { $$ = $1; } |
|
1081 |
| PLUS number { $$ = $2; } |
|
1082 |
| MINUS number { $$ = -($2); } |
|
1083 |
;
|
|
1084 |
||
1085 |
button : BUTTON number { $$ = $2; |
|
1086 |
if ($2 == 0) |
|
1087 |
yyerror("bad button 0"); |
|
1088 |
||
1089 |
if ($2 > MAX_BUTTONS) |
|
1090 |
{
|
|
1091 |
$$ = 0; |
|
1092 |
yyerror("button number too large"); |
|
1093 |
}
|
|
1094 |
}
|
|
1095 |
;
|
|
1096 |
||
435.1.11
by Matthew Fuller
This var is only used in gram.y, and only in one block anyway, so just |
1097 |
string : STRING { char *ptr = strdup($1); |
1
by Claude Lecommandeur
CTWM version 1.1 |
1098 |
RemoveDQuote(ptr); |
134
by Richard Levitte
Resolve a lot of unsigned vs. signed conflicts, and a few other |
1099 |
$$ = ptr; |
1
by Claude Lecommandeur
CTWM version 1.1 |
1100 |
}
|
103
by Richard Levitte
Cosmetic changes. |
1101 |
;
|
21
by Richard Levitte
This constitutes all the changes Claude had done since version 3.6. |
1102 |
|
1
by Claude Lecommandeur
CTWM version 1.1 |
1103 |
number : NUMBER { $$ = $1; } |
1104 |
;
|
|
1105 |
||
1106 |
%%
|