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.185 by sf-exg, Sat Mar 14 23:03:51 2015 UTC vs.
Revision 1.189 by sf-exg, Tue Jun 16 11:58:26 2015 UTC

201 STRG (Rs_backgroundPixmap, "backgroundPixmap", "pixmap", "file[;geom]", "background pixmap"), 201 STRG (Rs_backgroundPixmap, "backgroundPixmap", "pixmap", "file[;geom]", "background pixmap"),
202#endif 202#endif
203#if ENABLE_EWMH 203#if ENABLE_EWMH
204 STRG (Rs_iconfile, "iconFile", "icon", "file", "path to application icon image"), 204 STRG (Rs_iconfile, "iconFile", "icon", "file", "path to application icon image"),
205#endif 205#endif
206#ifdef HAVE_XMU
207 RSTRG (Rs_pointerShape, "pointerShape", "string"),
208#endif
206 /* fonts: command-line option = resource name */ 209 /* fonts: command-line option = resource name */
207 STRG (Rs_font, "font", "fn", "fontname", "normal text font"), 210 STRG (Rs_font, "font", "fn", "fontname", "normal text font"),
208#if ENABLE_STYLES 211#if ENABLE_STYLES
209 STRG (Rs_boldFont, "boldFont", "fb", "fontname", "bold font"), 212 STRG (Rs_boldFont, "boldFont", "fb", "fontname", "bold font"),
210 STRG (Rs_italicFont, "italicFont", "fi", "fontname", "italic font"), 213 STRG (Rs_italicFont, "italicFont", "fi", "fontname", "italic font"),
625 return 0; 628 return 0;
626} 629}
627 630
628/*}}} */ 631/*}}} */
629 632
630#ifndef NO_RESOURCES
631/*----------------------------------------------------------------------*/ 633/*----------------------------------------------------------------------*/
632 634
633# ifdef KEYSYM_RESOURCE 635#ifdef KEYSYM_RESOURCE
634static void 636static void
635rxvt_define_key (rxvt_term *term, const char *k, const char *v) 637rxvt_define_key (rxvt_term *term, const char *k, const char *v)
636{ 638{
637 term->bind_action (k, v); 639 term->bind_action (k, v);
638} 640}
775 777
776 free (ws); 778 free (ws);
777 return 1; 779 return 1;
778} 780}
779 781
780# endif /* KEYSYM_RESOURCE */ 782#endif /* KEYSYM_RESOURCE */
781#endif /* NO_RESOURCES */
782 783
783static char * 784static char *
784get_res (XrmDatabase database, const char *program, const char *option) 785get_res (XrmDatabase database, const char *program, const char *option)
785{ 786{
786 char resource[512]; 787 char resource[512];
860} 861}
861 862
862void 863void
863rxvt_term::enumerate_keysym_resources (void (*cb)(rxvt_term *, const char *, const char *)) 864rxvt_term::enumerate_keysym_resources (void (*cb)(rxvt_term *, const char *, const char *))
864{ 865{
865#ifndef NO_RESOURCES
866 /* 866 /*
867 * [R5 or later]: enumerate the resource database 867 * [R5 or later]: enumerate the resource database
868 */ 868 */
869# ifdef KEYSYM_RESOURCE 869#ifdef KEYSYM_RESOURCE
870 void *closure[2] = { 870 void *closure[2] = {
871 (void *)this, 871 (void *)this,
872 (void *)cb, 872 (void *)cb,
873 }; 873 };
874 874
879 name_prefix[1] = XrmStringToName ("keysym"); 879 name_prefix[1] = XrmStringToName ("keysym");
880 name_prefix[2] = NULLQUARK; 880 name_prefix[2] = NULLQUARK;
881 class_prefix[1] = XrmStringToName ("Keysym"); 881 class_prefix[1] = XrmStringToName ("Keysym");
882 class_prefix[2] = NULLQUARK; 882 class_prefix[2] = NULLQUARK;
883 883
884# ifdef RESFALLBACK 884# ifdef RESFALLBACK
885 name_prefix[0] = class_prefix[0] = XrmStringToName (RESFALLBACK); 885 name_prefix[0] = class_prefix[0] = XrmStringToName (RESFALLBACK);
886 /* XXX: Need to check sizeof (rxvt_t) == sizeof (XPointer) */ 886 /* XXX: Need to check sizeof (rxvt_t) == sizeof (XPointer) */
887 XrmEnumerateDatabase (database, name_prefix, class_prefix, 887 XrmEnumerateDatabase (database, name_prefix, class_prefix,
888 XrmEnumOneLevel, rxvt_keysym_enumerate_helper, (XPointer)closure); 888 XrmEnumOneLevel, rxvt_keysym_enumerate_helper, (XPointer)closure);
889# endif 889# endif
890 890
891 name_prefix[0] = class_prefix[0] = XrmStringToName (RESCLASS); 891 name_prefix[0] = class_prefix[0] = XrmStringToName (RESCLASS);
892 XrmEnumerateDatabase (database, name_prefix, class_prefix, 892 XrmEnumerateDatabase (database, name_prefix, class_prefix,
893 XrmEnumOneLevel, rxvt_keysym_enumerate_helper, (XPointer)closure); 893 XrmEnumOneLevel, rxvt_keysym_enumerate_helper, (XPointer)closure);
894 894
895 name_prefix[0] = class_prefix[0] = XrmStringToName (rs[Rs_name]); 895 name_prefix[0] = class_prefix[0] = XrmStringToName (rs[Rs_name]);
896 XrmEnumerateDatabase (database, name_prefix, class_prefix, 896 XrmEnumerateDatabase (database, name_prefix, class_prefix,
897 XrmEnumOneLevel, rxvt_keysym_enumerate_helper, (XPointer)closure); 897 XrmEnumOneLevel, rxvt_keysym_enumerate_helper, (XPointer)closure);
898# endif 898#endif
899
900#endif /* NO_RESOURCES */
901} 899}
902 900
903void 901void
904rxvt_term::extract_keysym_resources () 902rxvt_term::extract_keysym_resources ()
905{ 903{
904#ifdef KEYSYM_RESOURCE
906 enumerate_keysym_resources (rxvt_define_key); 905 enumerate_keysym_resources (rxvt_define_key);
906#endif
907} 907}
908 908
909/*----------------------- end-of-file (C source) -----------------------*/ 909/*----------------------- end-of-file (C source) -----------------------*/
910 910

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines