File: resource.h

package info (click to toggle)
xabacus 1-6
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 244 kB
  • ctags: 484
  • sloc: ansic: 746; makefile: 451
file content (64 lines) | stat: -rw-r--r-- 2,283 bytes parent folder | download
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
/* resource.h: 
 * definitions for the resource & command-line parser for xabaxus.
 * Make sure main.h is also modified to reflect changes to resources made in
 * this file.
 */

struct _resources {
	String display;
	int beadwidth; 
	int beadheight;
	int framewidth; 
	int ncols; 
	String colors[4];
	String demo;
	String demofont;
	Boolean script;
} app_resources;

#define offset(field)   XtOffset (struct _resources *, field)

static XtResource resources[] = {
	{ "display","Display", XtRString, sizeof(String),
	offset(display), XtRString, "                 "},
	{ "beadwidth","Beadwidth",XtRInt, sizeof (int),
	offset(beadwidth),XtRString, "30"},
	{ "beadheight","Beadheight",XtRInt, sizeof (int),
	offset(beadheight),XtRString, "20"},
	{ "framewidth","Framewidth",XtRInt, sizeof (int),
	offset(framewidth),XtRString, "10"},
	{ "ncols","Ncols",XtRInt, sizeof (int),
	offset(ncols),XtRString, "13"},
	{ "framecolor","Framecolor", XtRString, sizeof(String),
	offset(colors[0]), XtRString, "brown"},
	{ "bg","Bg", XtRString, sizeof(String),
	offset(colors[1]), XtRString, "white"},
	{ "beadcolor","Beadcolor", XtRString, sizeof(String),
	offset(colors[2]), XtRString, "green4"},
	{ "railcolor","Railcolor", XtRString, sizeof(String),
	offset(colors[3]), XtRString, "black"},
	{ "demo","Demo",XtRString, sizeof(String),
	offset(demo), XtRString, "                                  " },
	{ "demofont","Demofont",XtRString, sizeof(String),
	offset(demofont), XtRString, "-*-times-*-r-*-*-*-180-*-*-*-*" },
	{ "script","Script",XtRBoolean, sizeof(Boolean),
	offset(script), XtRString, "False" },

};

static XrmOptionDescRec options[] = {
	{ "-display","display",XrmoptionSepArg,	NULL},
	{ "-beadwidth","beadwidth",XrmoptionSepArg,	NULL},
	{ "-beadheight","beadheight",XrmoptionSepArg,	NULL},
	{ "-framewidth","framewidth",XrmoptionSepArg,	NULL},
	{ "-ncols","ncols",XrmoptionSepArg,	NULL},
	{ "-framecolor","framecolor",XrmoptionSepArg,	NULL},
	{ "-bg","bg",XrmoptionSepArg,	NULL},
	{ "-beadcolor","beadcolor",XrmoptionSepArg,	NULL},
	{ "-railcolor","railcolor",XrmoptionSepArg,	NULL},
	{ "-demo","demo",XrmoptionSepArg, NULL},
	{ "-demofont","demofont", XrmoptionSepArg, NULL},
	{ "-fn","demofont", XrmoptionSepArg, NULL},
	{ "-script","script",XrmoptionNoArg, (caddr_t)"TRUE"},
};