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.11 by pcg, Fri Feb 13 12:16:21 2004 UTC vs.
Revision 1.13 by pcg, Tue Feb 24 21:41:16 2004 UTC

1/*--------------------------------*-C-*---------------------------------* 1/*--------------------------------*-C-*---------------------------------*
2 * File: xdefaults.c 2 * File: xdefaults.c
3 *----------------------------------------------------------------------* 3 *----------------------------------------------------------------------*
4 * $Id: xdefaults.C,v 1.11 2004/02/13 12:16:21 pcg Exp $ 4 * $Id: xdefaults.C,v 1.13 2004/02/24 21:41:16 pcg Exp $
5 * 5 *
6 * All portions of code are copyright by their respective author/s. 6 * All portions of code are copyright by their respective author/s.
7 * Copyright (c) 1994 Robert Nation <nation@rocket.sanders.lockheed.com> 7 * Copyright (c) 1994 Robert Nation <nation@rocket.sanders.lockheed.com>
8 * - original version 8 * - original version
9 * Copyright (c) 1997,1998 mj olesen <olesen@me.queensu.ca> 9 * Copyright (c) 1997,1998 mj olesen <olesen@me.queensu.ca>
197 "input style: style = OverTheSpot|OffTheSpot|Root"), 197 "input style: style = OverTheSpot|OffTheSpot|Root"),
198#if defined(HAVE_XSETLOCALE) || defined(HAVE_SETLOCALE) 198#if defined(HAVE_XSETLOCALE) || defined(HAVE_SETLOCALE)
199 STRG (Rs_imLocale, "imLocale", "imlocale", "string", "locale to use for input method"), 199 STRG (Rs_imLocale, "imLocale", "imlocale", "string", "locale to use for input method"),
200#endif 200#endif
201#endif /* USE_XIM */ 201#endif /* USE_XIM */
202#ifdef GREEK_SUPPORT
203 STRG (Rs_greek_keyboard, "greek_keyboard", "grk", "mode",
204 "greek keyboard mapping; mode = iso | ibm"),
205 RSTRG (Rs_greektoggle_key, "greektoggle_key", "keysym"),
206#endif
207 STRG (Rs_name, NULL, "name", "string", 202 STRG (Rs_name, NULL, "name", "string",
208 "client instance, icon, and title strings"), 203 "client instance, icon, and title strings"),
209 STRG (Rs_title, "title", "title", "string", "title name for window"), 204 STRG (Rs_title, "title", "title", "string", "title name for window"),
210 STRG (Rs_title, NULL, "T", NULL, NULL), /* short form */ 205 STRG (Rs_title, NULL, "T", NULL, NULL), /* short form */
211 STRG (Rs_iconName, "iconName", "n", "string", "icon name for window"), 206 STRG (Rs_iconName, "iconName", "n", "string", "icon name for window"),
323# if defined(XTERM_SCROLLBAR) 318# if defined(XTERM_SCROLLBAR)
324 "xterm" 319 "xterm"
325# endif 320# endif
326#endif 321#endif
327 "," 322 ","
328#if defined(GREEK_SUPPORT)
329 "Greek,"
330#endif
331#if defined(RXVT_GRAPHICS)
332 "graphics,"
333#endif
334#if defined(NO_BACKSPACE_KEY) 323#if defined(NO_BACKSPACE_KEY)
335 "no_backspace," 324 "no_backspace,"
336#endif 325#endif
337#if defined(NO_DELETE_KEY) 326#if defined(NO_DELETE_KEY)
338 "no_delete," 327 "no_delete,"
570 * quarks will be something like 559 * quarks will be something like
571 * "rxvt" "keysym" "0xFF01" 560 * "rxvt" "keysym" "0xFF01"
572 * value will be a string 561 * value will be a string
573 */ 562 */
574/* ARGSUSED */ 563/* ARGSUSED */
575bool 564int
576rxvt_define_key(XrmDatabase *database __attribute__((unused)), XrmBindingList bindings __attribute__((unused)), XrmQuarkList quarks, XrmRepresentation *type __attribute__((unused)), XrmValue *value, XPointer closure __attribute__((unused))) 565rxvt_define_key (XrmDatabase *database __attribute__((unused)),
566 XrmBindingList bindings __attribute__((unused)),
567 XrmQuarkList quarks,
568 XrmRepresentation *type __attribute__((unused)),
569 XrmValue *value,
570 XPointer closure __attribute__((unused)))
577{ 571{
578 int last; 572 int last;
579 573
580 for (last = 0; quarks[last] != NULLQUARK; last++) /* look for last quark in list */ 574 for (last = 0; quarks[last] != NULLQUARK; last++) /* look for last quark in list */
581 ; 575 ;
899 class_prefix[0] = XrmStringToName (APL_SUBCLASS); 893 class_prefix[0] = XrmStringToName (APL_SUBCLASS);
900 class_prefix[1] = XrmStringToName ("Keysym"); 894 class_prefix[1] = XrmStringToName ("Keysym");
901 class_prefix[2] = NULLQUARK; 895 class_prefix[2] = NULLQUARK;
902 /* XXX: Need to check sizeof (rxvt_t) == sizeof (XPointer) */ 896 /* XXX: Need to check sizeof (rxvt_t) == sizeof (XPointer) */
903 XrmEnumerateDatabase (XrmGetDatabase (display), name_prefix, class_prefix, 897 XrmEnumerateDatabase (XrmGetDatabase (display), name_prefix, class_prefix,
904 XrmEnumOneLevel, rxvt_define_key, NULL); 898 XrmEnumOneLevel, rxvt_define_key, NULL);
905 name_prefix[0] = XrmStringToName (APL_CLASS); 899 name_prefix[0] = XrmStringToName (APL_CLASS);
906 name_prefix[1] = XrmStringToName ("keysym"); 900 name_prefix[1] = XrmStringToName ("keysym");
907 class_prefix[0] = XrmStringToName (APL_CLASS); 901 class_prefix[0] = XrmStringToName (APL_CLASS);
908 class_prefix[1] = XrmStringToName ("Keysym"); 902 class_prefix[1] = XrmStringToName ("Keysym");
909 /* XXX: Need to check sizeof (rxvt_t) == sizeof (XPointer) */ 903 /* XXX: Need to check sizeof (rxvt_t) == sizeof (XPointer) */
910 XrmEnumerateDatabase (XrmGetDatabase (display), name_prefix, class_prefix, 904 XrmEnumerateDatabase (XrmGetDatabase (display), name_prefix, class_prefix,
911 XrmEnumOneLevel, rxvt_define_key, NULL); 905 XrmEnumOneLevel, rxvt_define_key, NULL);
912# endif 906# endif
913# endif 907# endif
914 908
915# else /* USE_XGETDEFAULT */ 909# else /* USE_XGETDEFAULT */
916 /* get resources the hard way, but save lots of memory */ 910 /* get resources the hard way, but save lots of memory */
996 990
997 /* 991 /*
998 * even without resources, at least do this setup for command-line 992 * even without resources, at least do this setup for command-line
999 * options and command-line long options 993 * options and command-line long options
1000 */ 994 */
1001#ifdef MULTICHAR_SET
1002 set_multichar_encoding (rs[Rs_multichar_encoding]);
1003#endif
1004#ifdef GREEK_SUPPORT
1005 /* this could be a function in grkelot.c */
1006 /* void set_greek_keyboard (const char * str); */
1007 if (rs[Rs_greek_keyboard])
1008 {
1009 if (!STRCMP (rs[Rs_greek_keyboard], "iso"))
1010 greek_setmode (GREEK_ELOT928); /* former -grk9 */
1011 else if (!STRCMP (rs[Rs_greek_keyboard], "ibm"))
1012 greek_setmode (GREEK_IBM437); /* former -grk4 */
1013 }
1014 {
1015 KeySym sym;
1016
1017 if (rs[Rs_greektoggle_key]
1018 && ((sym = XStringToKeysym (rs[Rs_greektoggle_key])) != 0))
1019 ks_greekmodeswith = sym;
1020 }
1021#endif /* GREEK_SUPPORT */
1022 995
1023#if defined (HOTKEY_CTRL) || defined (HOTKEY_META) 996#if defined (HOTKEY_CTRL) || defined (HOTKEY_META)
1024
1025 {
1026 KeySym sym; 997 KeySym sym;
1027 998
1028 if (rs[Rs_bigfont_key] 999 if (rs[Rs_bigfont_key]
1029 && ((sym = XStringToKeysym (rs[Rs_bigfont_key])) != 0)) 1000 && ((sym = XStringToKeysym (rs[Rs_bigfont_key])) != 0))
1030 ks_bigfont = sym; 1001 ks_bigfont = sym;
1031 if (rs[Rs_smallfont_key] 1002 if (rs[Rs_smallfont_key]
1032 && ((sym = XStringToKeysym (rs[Rs_smallfont_key])) != 0)) 1003 && ((sym = XStringToKeysym (rs[Rs_smallfont_key])) != 0))
1033 ks_smallfont = sym; 1004 ks_smallfont = sym;
1034 }
1035#endif 1005#endif
1036} 1006}
1037 1007
1038/*}}} */ 1008/*}}} */
1039/*----------------------- end-of-file (C source) -----------------------*/ 1009/*----------------------- end-of-file (C source) -----------------------*/

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines