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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
|
/*-
* @(#)modes.h 4.01 2000/01/28 xlockmore
*
* modes.h - mode management for xlock, the X Window System lockscreen.
*
* Copyright (c) 1991 by Patrick J. Naughton.
*
* See xlock.c for copying information.
*
* Revision History:
* 10-Oct-1999: Generated by genlauncher.
* Adapted by Eric Lassauge <lassauge AT users.sourceforge.net>
* 08-Jul-1998: Adapted to xglock from mode.h by Remi Cohen-Scali
* <remi.cohenscali@pobox.com>
*
*/
/*-
* Declare external interface routines for supported screen savers.
*/
#ifndef _LMODE_H_
#define _LMODE_H_
/* -------------------------------------------------------------------- */
typedef struct LockStruct_s {
gchar *cmdline_arg; /* mode name */
gint def_delay; /* default delay for mode */
gint def_batchcount;
gint def_cycles;
gint def_size;
gfloat def_saturation;
gchar *desc; /* text description of mode */
void *userdata; /* for use by the mode */
} LockStruct;
LockStruct LockProcs[] =
{
{"anemone",
50000, 1, 1, 1, 1.00,
"Shows wiggling tentacles", (void *) NULL},
{"ant",
1000, -3, 40000, -7, 1.00,
"Shows Langton's and Turk's generalized ants", (void *) NULL},
{"ant3d",
5000, -3, 100000, 1, 1.00,
"Shows 3D ants", (void *) NULL},
{"apollonian",
1000000, 64, 20, 1, 1.00,
"Shows Apollonian Circles", (void *) NULL},
#ifdef USE_GL
{"atlantis",
25000, 4, 100, 6000, 1.00,
"Shows moving sharks/whales/dolphin", (void *) NULL},
#endif
#ifdef USE_GL
{"atunnels",
25000, 1, 1, 0, 1.00,
"Shows an OpenGL advanced tunnel screensaver", (void *) NULL},
#endif
{"ball",
10000, 10, 20, -100, 1.00,
"Shows bouncing balls", (void *) NULL},
{"bat",
100000, -8, 1, 0, 1.00,
"Shows bouncing flying bats", (void *) NULL},
#ifdef USE_GL
{"biof",
10000, 800, 1, 0, 1.00,
"Shows 3D bioform", (void *) NULL},
#endif
{"blot",
200000, 6, 30, 1, 0.30,
"Shows Rorschach's ink blot test", (void *) NULL},
{"bouboule",
10000, 100, 1, 15, 1.00,
"Shows Mimi's bouboule of moving stars", (void *) NULL},
{"bounce",
5000, -10, 1, 0, 1.00,
"Shows bouncing footballs", (void *) NULL},
{"braid",
1000, 15, 100, -7, 1.00,
"Shows random braids and knots", (void *) NULL},
{"bubble",
100000, 25, 1, 100, 0.60,
"Shows popping bubbles", (void *) NULL},
#if defined( USE_GL ) && defined( HAVE_CXX )
{"bubble3d",
20000, 1, 2, 1, 1.00,
"Richard Jones's GL bubbles", (void *) NULL},
#endif
{"bug",
75000, 10, 32767, -4, 1.00,
"Shows Palmiter's bug evolution and garden of Eden", (void *) NULL},
#ifdef USE_GL
{"cage",
80000, 1, 1, 1, 1.00,
"Shows the Impossible Cage, an Escher-like GL scene", (void *) NULL},
#endif
{"clock",
100000, -16, 200, -200, 1.00,
"Shows Packard's clock", (void *) NULL},
{"coral",
60000, -3, 1, 35, 0.60,
"Shows a coral reef", (void *) NULL},
{"crystal",
60000, -500, 200, -15, 1.00,
"Shows polygons in 2D plane groups", (void *) NULL},
{"daisy",
100000, 300, 350, 1, 1.00,
"Shows a meadow of daisies", (void *) NULL},
{"dclock",
10000, 1, 10000, 1, 0.30,
"Shows a floating digital clock or message", (void *) NULL},
{"decay",
200000, 6, 30, 1, 0.30,
"Shows a decaying screen", (void *) NULL},
{"deco",
1000000, -30, 2, -10, 0.60,
"Shows art as ugly as sin", (void *) NULL},
{"demon",
50000, 0, 1000, -7, 1.00,
"Shows Griffeath's cellular automata", (void *) NULL},
{"dilemma",
200000, -2, 1000, 0, 1.00,
"Shows Lloyd's Prisoner's Dilemma simulation", (void *) NULL},
{"discrete",
1000, 4096, 2500, 1, 1.00,
"Shows various discrete maps", (void *) NULL},
{"dragon",
2000000, 1, 16, -24, 1.00,
"Shows Deventer's Hexagonal Dragons Maze", (void *) NULL},
{"drift",
10000, 30, 1, 1, 1.00,
"Shows cosmic drifting flame fractals", (void *) NULL},
{"euler2d",
1000, 1024, 3000, 1, 1.00,
"Shows a simulation of 2D incompressible inviscid fluid", (void *) NULL},
{"eyes",
20000, -8, 5, 1, 1.00,
"Shows eyes following a bouncing grelb", (void *) NULL},
{"fadeplot",
30000, 10, 1500, 1, 0.60,
"Shows a fading plot of sine squared", (void *) NULL},
{"fiberlamp",
10000, 500, 10000, 0, 1.00,
"Shows a Fiber Optic Lamp", (void *) NULL},
#ifdef USE_GL
{"fire",
10000, 800, 1, 0, 1.00,
"Shows a 3D fire-like image", (void *) NULL},
#endif
{"flag",
50000, 1, 1000, -7, 1.00,
"Shows a waving flag image", (void *) NULL},
{"flame",
750000, 20, 10000, 1, 1.00,
"Shows cosmic flame fractals", (void *) NULL},
{"flow",
1000, 1024, 3000, -10, 1.00,
"Shows dynamic strange attractors", (void *) NULL},
{"forest",
400000, 100, 200, 1, 1.00,
"Shows binary trees of a fractal forest", (void *) NULL},
{"fzort",
10000, 1, 1, 1, 1.00,
"Shows a metalic-looking fzort", (void *) NULL},
{"galaxy",
100, -5, 250, -3, 1.00,
"Shows crashing spiral galaxies", (void *) NULL},
#ifdef USE_GL
{"gears",
50000, 1, 2, 1, 1.00,
"Shows GL's gears", (void *) NULL},
#endif
#ifdef USE_GL
{"glplanet",
15000, 1, 2, 1, 1.00,
"Animates texture mapped sphere (planet)", (void *) NULL},
#endif
{"goop",
10000, -12, 1, 1, 1.00,
"Shows goop from a lava lamp", (void *) NULL},
{"grav",
10000, -12, 1, 1, 1.00,
"Shows orbiting planets", (void *) NULL},
{"helix",
25000, 1, 100, 1, 1.00,
"Shows string art", (void *) NULL},
{"hop",
10000, 1000, 2500, 1, 1.00,
"Shows real plane iterated fractals", (void *) NULL},
{"hyper",
100000, -6, 300, 1, 1.00,
"Shows spinning n-dimensional hypercubes", (void *) NULL},
{"ico",
100000, 0, 400, 0, 1.00,
"Shows a bouncing polyhedron", (void *) NULL},
{"ifs",
1000, 1, 1, 1, 1.00,
"Shows a modified iterated function system", (void *) NULL},
{"image",
3000000, -20, 1, 1, 1.00,
"Shows randomly appearing logos", (void *) NULL},
#if defined( USE_GL ) && defined( HAVE_CXX )
{"invert",
80000, 1, 1, 1, 1.00,
"Shows a sphere inverted without wrinkles", (void *) NULL},
#endif
{"juggle",
10000, 200, 1000, 1, 1.00,
"Shows a Juggler, juggling", (void *) NULL},
{"julia",
10000, 1000, 20, 1, 1.00,
"Shows the Julia set", (void *) NULL},
{"kaleid",
80000, 4, 40, -9, 0.60,
"Shows a kaleidoscope", (void *) NULL},
{"kumppa",
10000, 1, 1, 1, 1.00,
"Shows kumppa", (void *) NULL},
#ifdef USE_GL
{"lament",
10000, 1, 1, 1, 1.00,
"Shows Lemarchand's Box", (void *) NULL},
#endif
{"laser",
20000, -10, 200, 1, 1.00,
"Shows spinning lasers", (void *) NULL},
{"life",
750000, 40, 140, 0, 1.00,
"Shows Conway's game of Life", (void *) NULL},
{"life1d",
10000, 1, 10, 0, 1.00,
"Shows Wolfram's game of 1D Life", (void *) NULL},
{"life3d",
1000000, 35, 85, 1, 1.00,
"Shows Bays' game of 3D Life", (void *) NULL},
{"lightning",
10000, 1, 1, 1, 0.60,
"Shows Keith's fractal lightning bolts", (void *) NULL},
{"lisa",
25000, 1, 256, -1, 1.00,
"Shows animated lisajous loops", (void *) NULL},
{"lissie",
10000, 1, 2000, -200, 0.60,
"Shows lissajous worms", (void *) NULL},
{"loop",
100000, -5, 1600, -12, 1.00,
"Shows Langton's self-producing loops", (void *) NULL},
{"lyapunov",
25000, 600, 1, 1, 1.00,
"Shows lyapunov space", (void *) NULL},
{"mandelbrot",
25000, -8, 20000, 1, 1.00,
"Shows mandelbrot sets", (void *) NULL},
{"marquee",
100000, 1, 1, 1, 1.00,
"Shows messages", (void *) NULL},
{"matrix",
100, 1, 1, 1, 1.00,
"Shows the matrix", (void *) NULL},
{"maze",
1000, 1, 3000, -40, 1.00,
"Shows a random maze and a depth first search solution", (void *) NULL},
#ifdef USE_GL
{"moebius",
30000, 1, 1, 1, 1.00,
"Shows Moebius Strip II, an Escher-like GL scene with ants", (void *) NULL},
#endif
#ifdef USE_GL
{"molecule",
50000, 1, 20, 1, 1.00,
"Draws molecules", (void *) NULL},
#endif
#ifdef USE_GL
{"morph3d",
40000, 0, 1, 1, 1.00,
"Shows GL morphing polyhedra", (void *) NULL},
#endif
{"mountain",
1000, 30, 4000, 1, 1.00,
"Shows Papo's mountain range", (void *) NULL},
{"munch",
5000, 1, 7, 1, 1.00,
"Shows munching squares", (void *) NULL},
#ifdef USE_GL
{"noof",
1000, 1, 1, 1, 1.00,
"Shows SGI Diatoms", (void *) NULL},
#endif
{"nose",
100000, 1, 1, 1, 1.00,
"Shows a man with a big nose runs around spewing out messages", (void *) NULL},
{"pacman",
10000, 10, 1, 0, 1.00,
"Shows Pacman(tm)", (void *) NULL},
{"penrose",
10000, 1, 1, -40, 1.00,
"Shows Penrose's quasiperiodic tilings", (void *) NULL},
{"petal",
10000, -500, 400, 1, 1.00,
"Shows various GCD Flowers", (void *) NULL},
{"petri",
10000, 1, 1, 4, 1.00,
"Shows a mold simulation in a petri dish", (void *) NULL},
#ifdef USE_GL
{"pipes",
1000, 2, 5, 500, 1.00,
"Shows a selfbuilding pipe system", (void *) NULL},
#endif
{"polyominoes",
6000, 1, 8192, 1, 1.00,
"Shows attempts to place polyominoes into a rectangle", (void *) NULL},
{"puzzle",
10000, 250, 1, 1, 1.00,
"Shows a puzzle being scrambled and then solved", (void *) NULL},
{"pyro",
15000, 100, 1, -3, 1.00,
"Shows fireworks", (void *) NULL},
{"qix",
30000, -5, 32, 1, 1.00,
"Shows spinning lines a la Qix(tm)", (void *) NULL},
{"roll",
100000, 25, 1, -64, 0.60,
"Shows a rolling ball", (void *) NULL},
{"rotor",
100, 4, 100, -6, 0.30,
"Shows Tom's Roto-Rooter", (void *) NULL},
#ifdef USE_GL
{"rubik",
100000, -30, 5, -6, 1.00,
"Shows an auto-solving Rubik's Cube", (void *) NULL},
#endif
#ifdef USE_GL
{"sballs",
40000, 0, 10, 0, 1.00,
"Balls spinning like crazy in GL", (void *) NULL},
#endif
{"scooter",
20000, 24, 3, 100, 1.00,
"Shows a journey through space tunnel and stars", (void *) NULL},
{"shape",
10000, 100, 256, 1, 1.00,
"Shows stippled rectangles, ellipses, and triangles", (void *) NULL},
{"sierpinski",
400000, 2000, 100, 1, 1.00,
"Shows Sierpinski's triangle", (void *) NULL},
#ifdef USE_GL
{"sierpinski3d",
15000, 1, 2, 1, 1.00,
"Shows GL's Sierpinski gasket", (void *) NULL},
#endif
#if defined(USE_GL) && defined( USE_UNSTABLE )
{"skewb",
100000, -30, 5, 1, 1.00,
"Shows an auto-solving Skewb", (void *) NULL},
#endif
{"slip",
50000, 35, 50, 1, 1.00,
"Shows slipping blits", (void *) NULL},
#ifdef HAVE_CXX
{"solitare",
2000000, 1, 1, 1, 1.00,
"Shows Klondike's game of solitare", (void *) NULL},
#endif
#ifdef USE_UNSTABLE
{"space",
10000, 100, 1, 15, 1.00,
"Shows a journey into deep space", (void *) NULL},
#endif
{"sphere",
5000, 1, 20, 0, 1.00,
"Shows a bunch of shaded spheres", (void *) NULL},
{"spiral",
5000, -40, 350, 1, 1.00,
"Shows a helical locus of points", (void *) NULL},
{"spline",
30000, -6, 2048, 1, 0.30,
"Shows colorful moving splines", (void *) NULL},
#ifdef USE_GL
{"sproingies",
80000, 5, 0, 0, 1.00,
"Shows Sproingies! Nontoxic. Safe for pets and small children", (void *) NULL},
#endif
#ifdef USE_GL
{"stairs",
200000, 0, 1, 1, 1.00,
"Shows some Infinite Stairs, an Escher-like scene", (void *) NULL},
#endif
{"star",
75000, 100, 1, 100, 0.30,
"Shows a star field with a twist", (void *) NULL},
{"starfish",
10000, 1, 1, 1, 1.00,
"Shows starfish", (void *) NULL},
{"strange",
1000, 1, 1, 1, 1.00,
"Shows strange attractors", (void *) NULL},
#ifdef USE_GL
{"superquadrics",
40000, 25, 40, 1, 1.00,
"Shows 3D mathematical shapes", (void *) NULL},
#endif
{"swarm",
15000, -100, 1, -10, 1.00,
"Shows a swarm of bees following a wasp", (void *) NULL},
{"swirl",
5000, 5, 1, 1, 1.00,
"Shows animated swirling patterns", (void *) NULL},
{"t3d",
250000, 1000, 60000, 0, 1.00,
"Shows a Flying Balls Clock Demo", (void *) NULL},
{"tetris",
50000, 1, 1, -100, 1.00,
"Shows an autoplaying tetris game", (void *) NULL},
#if defined(USE_GL) && defined(HAVE_CXX) && defined( HAVE_TTF ) && defined( HAVE_GLTT )
{"text3d",
100000, 1, 10, 1, 1.00,
"Shows 3D text", (void *) NULL},
#endif
#if defined(USE_GL) && defined(HAVE_CXX) && defined( HAVE_FREETYPE ) && defined( HAVE_FTGL )
{"text3d2",
100000, 1, 10, 1, 1.00,
"Shows 3D text", (void *) NULL},
#endif
{"thornbird",
1000, 800, 16, 1, 1.00,
"Shows an animated bird in a thorn bush fractal map", (void *) NULL},
{"tik_tak",
60000, -20, 200, -1000, 1.00,
"Shows rotating polygons", (void *) NULL},
{"toneclock",
60000, -20, 200, -1000, 1.00,
"Shows Peter Schat's toneclock", (void *) NULL},
{"triangle",
10000, 1, 1, 1, 1.00,
"Shows a triangle mountain range", (void *) NULL},
{"tube",
25000, -9, 20000, -200, 1.00,
"Shows an animated tube", (void *) NULL},
{"turtle",
1000000, 1, 20, 1, 1.00,
"Shows turtle fractals", (void *) NULL},
{"vines",
200000, 0, 1, 1, 1.00,
"Shows fractals", (void *) NULL},
{"voters",
1000, 0, 327670, 0, 1.00,
"Shows Dewdney's Voters", (void *) NULL},
{"wator",
750000, 1, 32767, 0, 1.00,
"Shows Dewdney's Water-Torus planet of fish and sharks", (void *) NULL},
{"wire",
500000, 1000, 150, -8, 1.00,
"Shows a random circuit with 2 electrons", (void *) NULL},
{"world",
100000, -16, 1, 1, 0.30,
"Shows spinning Earths", (void *) NULL},
{"worm",
17000, -20, 10, -3, 1.00,
"Shows wiggly worms", (void *) NULL},
{"xcl",
20000, -3, 1, 1, 1.00,
"Shows a control line combat model race", (void *) NULL},
{"xjack",
50000, 1, 1, 1, 1.00,
"Shows Jack having one of those days", (void *) NULL},
{"blank",
3000000, 1, 1, 1, 1.00,
"Shows nothing but a black screen", (void *) NULL},
#ifdef USE_BOMB
{"bomb",
100000, 10, 20, 1, 1.0,
"Shows a bomb and will autologout after a time", (void *) NULL},
{"random",
1, 1, 1, 1, 1.0,
"Shows a random mode from above except blank and bomb", (void *) NULL},
#else
{"random",
1, 1, 1, 1, 1.0,
"Shows a random mode from above except blank", (void *) NULL},
#endif
};
/* Number of modes (set in main) */
guint nb_mode = 0;
/* Defaults values available */
#define DEF_DELAY 0
#define DEF_BATCHCOUNT 1
#define DEF_CYCLES 2
#define DEF_SIZE 3
#define DEF_SATURATION 4
#define NB_DEFAULTED_OPTIONS 5
/* Default values options names */
static gchar *defaulted_options[NB_DEFAULTED_OPTIONS] = {
"delay",
"batchcount",
"cycles",
"size",
"saturation"};
/* Number of default values options */
static guint nb_defaultedOptions = NB_DEFAULTED_OPTIONS;
/*------------------------------------*/
/* Boolean xlock options */
/*------------------------------------*/
/* boolean option entry */
typedef struct struct_option_bool_s {
gchar *cmdarg;
gchar *label;
gchar *desc;
gchar defval;
gchar value;
} struct_option_bool;
/* Description of the boolean options */
struct_option_bool BoolOpt[] =
{
{"mono", "mono", "The mono option causes xlock to display monochrome", '\000', '\000'},
{"nolock", "nolock", "The nolock option causes xlock to only draw the patterns and not lock the display", '\000', '\000'},
{"remote", "remote", "The remote option causes xlock to not stop you from locking remote X11 server", '\000', '\000'},
{"allowroot", "allowroot", "The allowroot option allow the root password to unlock the server", '\000', '\000'},
{"enablesaver", "enablesaver", "This option enables the use of the normal Xserver screen saver", '\000', '\000'},
{"resetsaver", "resetsaver", "This option enables the call of XResetScreenSaver", '\000', '\000'},
{"allowaccess", "allowaccess", "For servers not allowing clients to modify host access, left the X11 server open", '\000', '\000'},
#ifdef USE_VTLOCK
{"lockvt", "lockvt", "This option control the VT switch locking", '\000', '\000'},
#endif
{"mousemotion", "mousemotion", "Allows to turn on/off the mouse sensitivity to bring up pass window", '\001', '\000'},
{"grabmouse", "grabmouse", "This option causes xlock to grab mouse and keyboard", '\001', '\000'},
{"grabserver", "grabserver", "The grabserver option causes xlock to grab the server", '\001', '\000'},
{"echokeys", "echokeys", "This option causes xlock to echo a question mark for each typed character", '\000', '\000'},
{"usefirst", "usefirst", "This option enables xlock to use the first keystroke in the password", '\000', '\000'},
{"verbose", "verbose", "verbose launch", '\000', '\000'},
{"debug", "debug", "This option allows xlock to be locked in a window", '\000', '\000'},
{"wireframe", "wireframe", "This option turns on wireframe rendering mode mainly for GL", '\000', '\000'},
#ifdef USE_GL
{"showfps", "showfps", "This option turns on frame per sec display for GL", '\000', '\000'},
{"fpstop", "fpstop", "This option turns on top fps display for GL", '\000', '\000'},
#endif
{"install", "install", "Allows xlock to install its own colormap if xlock runs out of colors", '\000', '\000'},
{"sound", "sound", "Allows you to turn on and off sound if installed with the capability", '\000', '\000'},
{"timeelapsed", "timeelapsed", "Allows you to find out how long a machine is locked", '\000', '\000'},
{"fullrandom", "fullrandom", "Turn on/off randomness options within modes", '\000', '\000'},
{"use3d", "use3d", "Turn on/off 3d view, available on bouboule, pyro, star, and worm", '\000', '\000'},
{"trackmouse", "trackmouse", "Turn on and off mouse interaction in eyes, julia, and swarm", '\000', '\000'},
#if 0
{"dtsaver", "dtsaver", "Turn on/off CDE Saver Mode. Only available if CDE support was compiled in", '\000', '\000'},
#endif
};
/* Number of boolean options (set in main) */
guint nb_boolOpt = 0;
/* Boolean option dialog callback struct */
typedef struct struct_option_bool_callback_s {
GtkWidget *boolopt_dialog;
} struct_option_bool_callback;
/*------------------------------------*/
/* General options */
/*------------------------------------*/
/* Gen option entry struct */
typedef struct struct_option_gen_s {
gchar *cmdarg;
gchar *label;
gchar *desc;
gchar *help_anchor;
GtkWidget *text_widget;
} struct_option_gen;
/* Description of the general option */
struct_option_gen generalOpt[] =
{
{"username", "username", "text string to use for Name prompt", "opt_gen_", (GtkWidget *)NULL},
{"password", "password", "text string to use for Password prompt", "gen_opt_", (GtkWidget *)NULL},
{"info", "info", "text string to use for instruction", "gen_opt_", (GtkWidget *)NULL},
{"validate", "validate", "text string to use for validating password message", "gen_opt_", (GtkWidget *)NULL},
{"invalid", "invalidate", "text string to use for invalid password message", "gen_opt_", (GtkWidget *)NULL},
{"message", "message", "message to say", "gen_opt_", (GtkWidget *)NULL},
{"delay", "delay", "The delay option sets the speed at which a mode will operate", "gen_opt_", (GtkWidget *)NULL},
{"batchcount", "batchcount", "This option sets number of things to do per batch to num", "gen_opt_", (GtkWidget *)NULL},
{"cycles", "cycles", "This option delay is used for some mode as parameter", "gen_opt_", (GtkWidget *)NULL},
{"ncolors", "ncolors", "This option delay is used for some mode as parameter", "gen_opt_", (GtkWidget *)NULL},
{"size", "size", "This option delay is used for some mode as parameter", "gen_opt_", (GtkWidget *)NULL},
{"saturation", "saturation", "This option delay is used for some GL mode as parameter", "gen_opt_", (GtkWidget *)NULL},
{"nice", "nice", "This option sets system nicelevel of the xlock process", "gen_opt_", (GtkWidget *)NULL},
{"lockdelay", "lockdelay", "This option set the delay between launch and lock", "gen_opt_", (GtkWidget *)NULL},
{"timeout", "timeout", "The timeout option sets the password screen timeout", "gen_opt_", (GtkWidget *)NULL},
{"geometry", "geometry", "geometry of mode window", "gen_opt_", (GtkWidget *)NULL},
{"icongeometry", "icongeometry", "geometry of mode icon window", "gen_opt_", (GtkWidget *)NULL},
{"glgeometry", "geometry", "geometry of GL mode window", "gen_opt_", (GtkWidget *)NULL},
{"delta3d", "delta3d", "Turn on/off 3d view, available on bouboule, pyro, star, and worm", "gen_opt_", (GtkWidget *)NULL},
{"neighbors", "neighbors", "Sets number of neighbors of cell (3, 4, 6, 9, 12) for automata modes", "gen_opt_", (GtkWidget *)NULL},
{"cpasswd", "cpasswd", "Sets the key to be this text string to unlock", "gen_opt_", (GtkWidget *)NULL},
{"program", "program", "program used as a fortune generator", "gen_opt_", (GtkWidget *)NULL},
#ifdef USE_AUTO_LOGOUT
{"forceLogout", "forceLogout", "This option sets minutes to auto-logout", "gen_opt_", (GtkWidget *)NULL},
#endif
#ifdef USE_BUTTON_LOGOUT
{"logoutButtonHelp", "logoutButtonHelp", "Text string is a message shown outside logout", "gen_opt_", (GtkWidget *)NULL},
{"logoutButtonLabel", "logoutButtonLabel", "Text string is a message shown inside logout button", "gen_opt_", (GtkWidget *)NULL},
#endif
#if defined( USE_AUTO_LOGOUT ) || defined( USE_BUTTON_LOGOUT )
{"logoutFailedString", "logoutFailedString", "Text string is shown when a logout is attempted and fails", "gen_opt_", (GtkWidget *)NULL},
#endif
{"startCmd", "startCmd", "Command to execute when the screen is locked", "gen_opt_", (GtkWidget *)NULL},
{"endCmd", "endCmd", "Command to execute when the screen is unlocked", "gen_opt_", (GtkWidget *)NULL},
{"pipepassCmd", "pipepassCmd", "Command into which to pipe the password when the screen is unlocked", "gen_opt_", (GtkWidget *)NULL},
#if defined( USE_AUTO_LOGOUT ) || defined( USE_BUTTON_LOGOUT )
{"logoutCmd", "logoutCmd", "Command to execute when the user is logged out", "gen_opt_", (GtkWidget *)NULL},
#endif
{"mailCmd", "mailCmd", "Command to execute when mails are checked", "gen_opt_", (GtkWidget *)NULL},
#ifdef USE_DPMS
{"dpmsstandby", "dpmsstandby", "Allows one to set DPMS Standby for monitor (0 is infinite)", "gen_opt_", (GtkWidget *)NULL},
{"dpmssuspend", "dpmssuspend", "Allows one to set DPMS Suspend for monitor (0 is infinite)", "gen_opt_", (GtkWidget *)NULL},
{"dpmsoff", "dpmsoff", "Allows one to set DPMS Power Off for monitor (0 is infinite)", "gen_opt_", (GtkWidget *)NULL},
#endif
};
/* Number of general options (set in main) */
guint nb_genOpt = 0;
/* General option dialog callback struct */
typedef struct struct_option_gen_callback_s {
GtkWidget *gen_dialog;
GtkWidget *text_widget;
} struct_option_gen_callback;
/*------------------------------------*/
/* Font/File/Color options */
/*------------------------------------*/
/* Option type (font/color/file) */
typedef enum enum_type_option_fntcol_e {
TFNTCOL_FONT = 0,
TFNTCOL_COLOR,
TFNTCOL_FILE
} enum_type_option_fntcol;
/* Font/Color/File option entry struct */
typedef struct struct_option_fntcol_s {
enum_type_option_fntcol type;
gchar *cmdarg;
gchar *label;
gchar *desc;
gchar *help_anchor;
GtkWidget *entry;
GtkWidget *drawing_area;
} struct_option_fntcol;
/* Description of the font and color option */
struct_option_fntcol fntcolorOpt[] =
{
{TFNTCOL_COLOR, "bg", "background", "background color to use for password prompt", "opt_fntcol_",
(GtkWidget *)NULL, (GtkWidget *)NULL},
{TFNTCOL_COLOR, "fg", "foreground", "foreground color to use for password prompt", "opt_fntcol_",
(GtkWidget *)NULL, (GtkWidget *)NULL},
{TFNTCOL_COLOR, "none3d", "none3d", "color used for empty size in 3d mode", "opt_fntcol_",
(GtkWidget *)NULL, (GtkWidget *)NULL},
{TFNTCOL_COLOR, "right3d", "right3d", "color used for right eye in 3d mode", "opt_fntcol_",
(GtkWidget *)NULL, (GtkWidget *)NULL},
{TFNTCOL_COLOR, "left3d", "left3d", "color used for left eye in 3d mode", "opt_fntcol_",
(GtkWidget *)NULL, (GtkWidget *)NULL},
{TFNTCOL_COLOR, "both3d", "both3d", "color used for overlapping images for left and right eye in 3d mode", "opt_fntcol_",
(GtkWidget *)NULL, (GtkWidget *)NULL},
{TFNTCOL_FONT, "font", "font", "font to use for password prompt", "opt_fntcol_",
(GtkWidget *)NULL, (GtkWidget *)NULL},
{TFNTCOL_FONT, "messagefont", "msgfont", "font to use for message", "opt_fntcol_",
(GtkWidget *)NULL, (GtkWidget *)NULL},
{TFNTCOL_FONT, "planfont", "planfont", "font to use for lower part of password screen", "opt_fntcol_",
(GtkWidget *)NULL, (GtkWidget *)NULL},
#ifdef USE_GL
{TFNTCOL_FONT, "fpsfont", "fpsfont", "font to use for FPS display in GL mode", "opt_fntcol_",
(GtkWidget *)NULL, (GtkWidget *)NULL},
#endif
{TFNTCOL_FILE, "messagesfile", "messagesfile", "file to be used as the fortune generator", "opt_fntcol_",
(GtkWidget *)NULL, (GtkWidget *)NULL},
{TFNTCOL_FILE, "messagefile", "messagefile", "file whose contents are displayed", "opt_fntcol_",
(GtkWidget *)NULL, (GtkWidget *)NULL},
{TFNTCOL_FILE, "bitmap", "bitmap", "sets the xbm, xpm, or ras file to be displayed with some modes", "opt_fntcol_",
(GtkWidget *)NULL, (GtkWidget *)NULL},
{TFNTCOL_FILE, "lifefile", "lifefile", "sets the lifeform (only one format: #P xlife format)", "opt_fntcol_",
(GtkWidget *)NULL, (GtkWidget *)NULL},
{TFNTCOL_FILE, "life3dfile", "life3dfile", "sets the lifeform (only one format similar to #P xlife format)", "opt_fntcol_",
(GtkWidget *)NULL, (GtkWidget *)NULL},
};
/* Number of font/color/file options (set in main) */
guint nb_fntColorOpt = 0;
/* Font/Color/File option dialog callback struct */
typedef struct struct_option_fntcol_callback_s {
GtkWidget *fntcol_dialog;
GtkWidget *entry;
GtkWidget *drawing_area;
} struct_option_fntcol_callback;
/* Colors handling */
/* GdkVisual *gdkvisual; */
GdkColormap *gdkcolormap;
#endif /* !_LMODE_H_ */
|