ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/xdefaults.C
(Generate patch)

Comparing rxvt-unicode/src/xdefaults.C (file contents):
Revision 1.46 by root, Sun Jan 16 19:20:30 2005 UTC vs.
Revision 1.49 by root, Thu Feb 3 10:24:10 2005 UTC

97 BOOL (Rs_reverseVideo, "reverseVideo", "rv", Opt_reverseVideo, "reverse video"), 97 BOOL (Rs_reverseVideo, "reverseVideo", "rv", Opt_reverseVideo, "reverse video"),
98 BOOL (Rs_loginShell, "loginShell", "ls", Opt_loginShell, "login shell"), 98 BOOL (Rs_loginShell, "loginShell", "ls", Opt_loginShell, "login shell"),
99 BOOL (Rs_jumpScroll, "jumpScroll", "j", Opt_jumpScroll, "jump scrolling"), 99 BOOL (Rs_jumpScroll, "jumpScroll", "j", Opt_jumpScroll, "jump scrolling"),
100 BOOL (Rs_pastableTabs, "pastableTabs", "ptab", Opt_pastableTabs, "tab characters are pastable"), 100 BOOL (Rs_pastableTabs, "pastableTabs", "ptab", Opt_pastableTabs, "tab characters are pastable"),
101#ifdef HAVE_SCROLLBARS 101#ifdef HAVE_SCROLLBARS
102 RSTRG (Rs_scrollstyle, "scrollstyle", "mode"),
102 BOOL (Rs_scrollBar, "scrollBar", "sb", Opt_scrollBar, "scrollbar"), 103 BOOL (Rs_scrollBar, "scrollBar", "sb", Opt_scrollBar, "scrollbar"),
103 BOOL (Rs_scrollBar_right, "scrollBar_right", "sr", Opt_scrollBar_right, "scrollbar right"), 104 BOOL (Rs_scrollBar_right, "scrollBar_right", "sr", Opt_scrollBar_right, "scrollbar right"),
104 BOOL (Rs_scrollBar_floating, "scrollBar_floating", "st", Opt_scrollBar_floating, "scrollbar without a trough"), 105 BOOL (Rs_scrollBar_floating, "scrollBar_floating", "st", Opt_scrollBar_floating, "scrollbar without a trough"),
106 RSTRG (Rs_scrollBar_align, "scrollBar_align", "mode"),
107 STRG (Rs_scrollBar_thickness, "thickness", "sbt", "number", "scrollbar thickness/width in pixels"),
105#endif 108#endif
106 BOOL (Rs_scrollTtyOutput, "scrollTtyOutput", NULL, Opt_scrollTtyOutput, NULL), 109 BOOL (Rs_scrollTtyOutput, "scrollTtyOutput", NULL, Opt_scrollTtyOutput, NULL),
107 BOOL (Rs_scrollTtyOutput, NULL, "si", Opt_Reverse | Opt_scrollTtyOutput, "scroll-on-tty-output inhibit"), 110 BOOL (Rs_scrollTtyOutput, NULL, "si", Opt_Reverse | Opt_scrollTtyOutput, "scroll-on-tty-output inhibit"),
108 BOOL (Rs_scrollTtyKeypress, "scrollTtyKeypress", "sk", Opt_scrollTtyKeypress, "scroll-on-keypress"), 111 BOOL (Rs_scrollTtyKeypress, "scrollTtyKeypress", "sk", Opt_scrollTtyKeypress, "scroll-on-keypress"),
109 BOOL (Rs_scrollWithBuffer, "scrollWithBuffer", "sw", Opt_scrollWithBuffer, "scroll-with-buffer"), 112 BOOL (Rs_scrollWithBuffer, "scrollWithBuffer", "sw", Opt_scrollWithBuffer, "scroll-with-buffer"),
178 RSTRG (Rs_color + Color_trough, "troughColor", "color"), 181 RSTRG (Rs_color + Color_trough, "troughColor", "color"),
179#endif /* KEEP_SCROLLCOLOR */ 182#endif /* KEEP_SCROLLCOLOR */
180#ifdef OPTION_HC 183#ifdef OPTION_HC
181 STRG (Rs_color + Color_HC, "highlightColor", "hc", "color", "highlight color"), 184 STRG (Rs_color + Color_HC, "highlightColor", "hc", "color", "highlight color"),
182#endif 185#endif
186#ifndef NO_CURSORCOLOR
187 STRG (Rs_color + Color_cursor, "cursorColor", "cr", "color", "cursor color"),
188 /* command-line option = resource name */
189 RSTRG (Rs_color + Color_cursor2, "cursorColor2", "color"),
190#endif /* NO_CURSORCOLOR */
191 STRG (Rs_color + Color_pointer_fg, "pointerColor", "pr", "color", "pointer color"),
192 STRG (Rs_color + Color_pointer_bg, "pointerColor2", "pr2", "color", "pointer bg color"),
193 STRG (Rs_color + Color_border, "borderColor", "bd", "color", "border color"),
183#if defined (XPM_BACKGROUND) || (MENUBAR_MAX) 194#if defined (XPM_BACKGROUND) || (MENUBAR_MAX)
184 RSTRG (Rs_path, "path", "search path"), 195 RSTRG (Rs_path, "path", "search path"),
185#endif /* defined (XPM_BACKGROUND) || (MENUBAR_MAX) */ 196#endif /* defined (XPM_BACKGROUND) || (MENUBAR_MAX) */
186#ifdef XPM_BACKGROUND 197#ifdef XPM_BACKGROUND
187 STRG (Rs_backgroundPixmap, "backgroundPixmap", "pixmap", "file[;geom]", "background pixmap"), 198 STRG (Rs_backgroundPixmap, "backgroundPixmap", "pixmap", "file[;geom]", "background pixmap"),
197 STRG (Rs_boldItalicFont, "boldItalicFont", "fbi", "fontname", "bold italic font"), 208 STRG (Rs_boldItalicFont, "boldItalicFont", "fbi", "fontname", "bold italic font"),
198#endif 209#endif
199#ifdef USE_XIM 210#ifdef USE_XIM
200 STRG (Rs_inputMethod, "inputMethod", "im", "name", "name of input method"), 211 STRG (Rs_inputMethod, "inputMethod", "im", "name", "name of input method"),
201 STRG (Rs_preeditType, "preeditType", "pt", "style", "input style: style = OverTheSpot|OffTheSpot|Root"), 212 STRG (Rs_preeditType, "preeditType", "pt", "style", "input style: style = OverTheSpot|OffTheSpot|Root"),
202#if defined(HAVE_XSETLOCALE) || defined(HAVE_SETLOCALE)
203 STRG (Rs_imLocale, "imLocale", "imlocale", "string", "locale to use for input method"), 213 STRG (Rs_imLocale, "imLocale", "imlocale", "string", "locale to use for input method"),
204#endif 214 STRG (Rs_imFont, "imFont", "imfont", "fontname", "fontset for styles OverTheSpot and OffTheSpot"),
205#endif /* USE_XIM */ 215#endif /* USE_XIM */
206 STRG (Rs_name, NULL, "name", "string", "client instance, icon, and title strings"), 216 STRG (Rs_name, NULL, "name", "string", "client instance, icon, and title strings"),
207 STRG (Rs_title, "title", "title", "string", "title name for window"), 217 STRG (Rs_title, "title", "title", "string", "title name for window"),
208 STRG (Rs_title, NULL, "T", NULL, NULL), /* short form */ 218 STRG (Rs_title, NULL, "T", NULL, NULL), /* short form */
209 STRG (Rs_iconName, "iconName", "n", "string", "icon name for window"), 219 STRG (Rs_iconName, "iconName", "n", "string", "icon name for window"),
210#ifndef NO_CURSORCOLOR
211 STRG (Rs_color + Color_cursor, "cursorColor", "cr", "color", "cursor color"),
212 /* command-line option = resource name */
213 RSTRG (Rs_color + Color_cursor2, "cursorColor2", "color"),
214#endif /* NO_CURSORCOLOR */
215 STRG (Rs_color + Color_pointer_fg, "pointerColor", "pr", "color", "pointer color"),
216 STRG (Rs_color + Color_pointer_bg, "pointerColor2", "pr2", "color", "pointer bg color"),
217 STRG (Rs_color + Color_border, "borderColor", "bd", "color", "border color"),
218 STRG (Rs_saveLines, "saveLines", "sl", "number", "number of scrolled lines to save"), 220 STRG (Rs_saveLines, "saveLines", "sl", "number", "number of scrolled lines to save"),
219#if ENABLE_FRILLS 221#if ENABLE_FRILLS
220 STRG (Rs_ext_bwidth, "externalBorder", "w", "number", "external border in pixels"), 222 STRG (Rs_ext_bwidth, "externalBorder", "w", "number", "external border in pixels"),
221 STRG (Rs_ext_bwidth, NULL, "bw", NULL, NULL), 223 STRG (Rs_ext_bwidth, NULL, "bw", NULL, NULL),
222 STRG (Rs_ext_bwidth, NULL, "borderwidth", NULL, NULL), 224 STRG (Rs_ext_bwidth, NULL, "borderwidth", NULL, NULL),
223 STRG (Rs_int_bwidth, "internalBorder", "b", "number", "internal border in pixels"), 225 STRG (Rs_int_bwidth, "internalBorder", "b", "number", "internal border in pixels"),
224 BOOL (Rs_borderLess, "borderLess", "bl", Opt_borderLess, "borderless window"), 226 BOOL (Rs_borderLess, "borderLess", "bl", Opt_borderLess, "borderless window"),
225 STRG (Rs_lineSpace, "lineSpace", "lsp", "number", "number of extra pixels between rows"), 227 STRG (Rs_lineSpace, "lineSpace", "lsp", "number", "number of extra pixels between rows"),
226#endif 228#endif
227 STRG (Rs_scrollBar_thickness, "thickness", "sbt", "number", "scrollbar thickness/width in pixels"),
228#ifdef POINTER_BLANK 229#ifdef POINTER_BLANK
229 RSTRG (Rs_pointerBlankDelay, "pointerBlankDelay", "number"), 230 RSTRG (Rs_pointerBlankDelay, "pointerBlankDelay", "number"),
230#endif 231#endif
231#ifndef NO_BACKSPACE_KEY 232#ifndef NO_BACKSPACE_KEY
232 RSTRG (Rs_backspace_key, "backspacekey", "string"), 233 RSTRG (Rs_backspace_key, "backspacekey", "string"),
233#endif 234#endif
234#ifndef NO_DELETE_KEY 235#ifndef NO_DELETE_KEY
235 RSTRG (Rs_delete_key, "deletekey", "string"), 236 RSTRG (Rs_delete_key, "deletekey", "string"),
236#endif 237#endif
237 RSTRG (Rs_selectstyle, "selectstyle", "mode"), 238 RSTRG (Rs_selectstyle, "selectstyle", "mode"),
238 RSTRG (Rs_scrollstyle, "scrollstyle", "mode"),
239#ifdef HAVE_SCROLLBARS
240 RSTRG (Rs_scrollBar_align, "scrollBar_align", "mode"),
241#endif
242#ifdef PRINTPIPE 239#ifdef PRINTPIPE
243 RSTRG (Rs_print_pipe, "print-pipe", "string"), 240 RSTRG (Rs_print_pipe, "print-pipe", "string"),
244#endif 241#endif
245 STRG (Rs_modifier, "modifier", "mod", "modifier", "meta modifier = alt|meta|hyper|super|mod1|...|mod5"), 242 STRG (Rs_modifier, "modifier", "mod", "modifier", "meta modifier = alt|meta|hyper|super|mod1|...|mod5"),
246 INFO ("xrm", "string", "X resource"),
247#ifdef CUTCHAR_RESOURCE 243#ifdef CUTCHAR_RESOURCE
248 RSTRG (Rs_cutchars, "cutchars", "string"), 244 RSTRG (Rs_cutchars, "cutchars", "string"),
249#endif /* CUTCHAR_RESOURCE */ 245#endif /* CUTCHAR_RESOURCE */
250 RSTRG (Rs_answerbackstring, "answerbackString", "string"), 246 RSTRG (Rs_answerbackstring, "answerbackString", "string"),
251#ifndef NO_SECONDARY_SCREEN 247#ifndef NO_SECONDARY_SCREEN
252 BOOL (Rs_secondaryScreen, "secondaryScreen", "ssc", Opt_secondaryScreen, "enable secondary screen"), 248 BOOL (Rs_secondaryScreen, "secondaryScreen", "ssc", Opt_secondaryScreen, "enable secondary screen"),
253 BOOL (Rs_secondaryScroll, "secondaryScroll", "ssr", Opt_secondaryScroll, "enable secondary screen scroll"), 249 BOOL (Rs_secondaryScroll, "secondaryScroll", "ssr", Opt_secondaryScroll, "enable secondary screen scroll"),
250#endif
251#if !defined(NO_RESOURCES) && defined(USE_XGETDEFAULT)
252 INFO ("xrm", "string", "X resource"),
254#endif 253#endif
255 INFO ("e", "command arg ...", "command to execute") 254 INFO ("e", "command arg ...", "command to execute")
256 }; 255 };
257 256
258#undef INFO 257#undef INFO
606 XrmQuarkList quarks, 605 XrmQuarkList quarks,
607 XrmRepresentation *type __attribute__((unused)), 606 XrmRepresentation *type __attribute__((unused)),
608 XrmValue *value, 607 XrmValue *value,
609 XPointer closure __attribute__((unused))) 608 XPointer closure __attribute__((unused)))
610{ 609{
611 int last; 610 int last;
612 611
613 for (last = 0; quarks[last] != NULLQUARK; last++) /* look for last quark in list */ 612 for (last = 0; quarks[last] != NULLQUARK; last++) /* look for last quark in list */
614 ; 613 ;
614
615 last--; 615 last--;
616 GET_R->parse_keysym (XrmQuarkToString (quarks[last]), (char *)value->addr);//D//TODO 616 GET_R->parse_keysym (XrmQuarkToString (quarks[last]), (char *)value->addr);//D//TODO
617 return False; 617 return False;
618} 618}
619 619
663}; 663};
664 664
665int 665int
666rxvt_term::parse_keysym (const char *str, const char *arg) 666rxvt_term::parse_keysym (const char *str, const char *arg)
667{ 667{
668 int n, sym; 668 int n, sym;
669 unsigned int state = 0; 669 unsigned int state = 0;
670 const char *pmodend = NULL; 670 const char *pmodend = NULL;
671 char *newarg = NULL; 671 char *newarg = NULL;
672 char newargstr[NEWARGLIM]; 672 char newargstr[NEWARGLIM];
673 673
674 if (arg == NULL) 674 if (arg == NULL)
675 { 675 {
676 if ((n = rxvt_Str_match (str, "keysym.")) == 0) 676 if ((n = rxvt_Str_match (str, "keysym.")) == 0)
677 return 0; 677 return 0;
933 { 933 {
934 XrmMergeDatabases (rdb1, &database); 934 XrmMergeDatabases (rdb1, &database);
935# ifndef HAVE_BOTH_XRESOURCE_FILES 935# ifndef HAVE_BOTH_XRESOURCE_FILES
936 break; 936 break;
937# endif 937# endif
938
939 } 938 }
940 } 939 }
941 } 940 }
942# endif 941# endif
943 942
1040# endif 1039# endif
1041# endif 1040# endif
1042 1041
1043# else /* USE_XGETDEFAULT */ 1042# else /* USE_XGETDEFAULT */
1044 /* get resources the hard way, but save lots of memory */ 1043 /* get resources the hard way, but save lots of memory */
1045 FILE *fd = NULL; 1044 FILE *fd = NULL;
1046 char *home; 1045 char *home;
1047 1046
1048 if ((home = getenv ("HOME")) != NULL) 1047 if ((home = getenv ("HOME")) != NULL)
1049 { 1048 {
1050 unsigned int i, len = strlen (home) + 2; 1049 unsigned int i, len = strlen (home) + 2;
1051 char *f = NULL; 1050 char *f = NULL;
1052 1051
1053 for (i = 0; i < (sizeof (xnames) / sizeof (xnames[0])); i++) 1052 for (i = 0; i < (sizeof (xnames) / sizeof (xnames[0])); i++)
1054 { 1053 {
1055 f = (char *)rxvt_realloc (f, (len + strlen (xnames[i])) * sizeof (char)); 1054 f = (char *)rxvt_realloc (f, len + strlen (xnames[i]));
1056 1055
1057 sprintf (f, "%s/%s", home, xnames[i]); 1056 sprintf (f, "%s/%s", home, xnames[i]);
1058 1057
1059 if ((fd = fopen (f, "r")) != NULL) 1058 if ((fd = fopen (f, "r")) != NULL)
1060 break; 1059 break;
1061 } 1060 }
1061
1062 free (f); 1062 free (f);
1063 } 1063 }
1064 /* 1064 /*
1065 * The normal order to match resources is the following: 1065 * The normal order to match resources is the following:
1066 * @ global resources (partial match, ~/.Xdefaults) 1066 * @ global resources (partial match, ~/.Xdefaults)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines