4 * (c) 1998-2004 Alexey Vyskubov <alexey@mawhrin.net>
12 #include <X11/Xlib.h> /* X Window standard header */
13 #include <X11/Xresource.h> /* X resource manager stuff */
18 static int tblentr
= 6; /* There are 6 recognized
20 static XrmOptionDescRec tbl
[] = {
33 {"-iconboom", ".iconBoom",
36 {"-display", ".display",
41 void ParseOptions(int *argc
, register char *argv
[])
47 XrmParseCommand(&cmdlineDB
, tbl
, tblentr
, "fookb", argc
, argv
);
55 puts("\tUsage: fookb [options]");
56 puts("Possible options:");
57 puts("-icon1 xpm_file\t\tIcon to show for the 1st Xkb group");
58 puts("-icon2 xpm_file\t\tIcon to show for the 2nd Xkb group");
59 puts("-icon3 xpm_file\t\tIcon to show for the 3rd Xkb group");
60 puts("-icon4 xpm_file\t\tIcon to show for the 4th Xkb group");
61 puts("-iconboom xpm_file\tIcon to show when Xkb system goes crazy");
62 puts("-display X_display\tX display to use (normally not needed)");
64 puts("Command line parameters takes precedence over X resources or configuration file!");
65 printf("Configuration file location: ");
67 puts("~/GNUstep/Defaults/FOOkb");
74 /* We should get display now -- we need it for access to other
76 if (XrmGetResource(cmdlineDB
, "fookb.display", "Fookb.Display",
77 str_type
, &value
) == True
) {
78 (void) strncpy(mydispname
, value
.addr
, (size_t)value
.size
);
86 void MoreOptions(Display
*dpy
)
89 XrmDatabase servDB
, appDB
;
91 appDB
= XrmGetFileDatabase
92 ("/usr/X11R6/lib/X11/app-defaults/Fookb");
93 (void) XrmMergeDatabases(appDB
, &finalDB
); /* Fookb defaults file
97 /* Let's look: does xrdb load server defautls? (As a property of
99 if (XResourceManagerString(dpy
) != NULL
) {
100 servDB
= XrmGetStringDatabase(XResourceManagerString(dpy
));
101 XrmMergeDatabases(servDB
, &finalDB
);