… | |
… | |
5 | * All portions of code are copyright by their respective author/s. |
5 | * All portions of code are copyright by their respective author/s. |
6 | * Copyright (c) 1994 Robert Nation <nation@rocket.sanders.lockheed.com> |
6 | * Copyright (c) 1994 Robert Nation <nation@rocket.sanders.lockheed.com> |
7 | * - original version |
7 | * - original version |
8 | * Copyright (c) 1997,1998 mj olesen <olesen@me.queensu.ca> |
8 | * Copyright (c) 1997,1998 mj olesen <olesen@me.queensu.ca> |
9 | * Copyright (c) 2003-2006 Marc Lehmann <schmorp@schmorp.de> |
9 | * Copyright (c) 2003-2006 Marc Lehmann <schmorp@schmorp.de> |
10 | * Copyright (c) 2007 Emanuele Giaquinta <e.giaquinta@glauco.it> |
10 | * Copyright (c) 2007,2015 Emanuele Giaquinta <e.giaquinta@glauco.it> |
11 | * |
11 | * |
12 | * This program is free software; you can redistribute it and/or modify |
12 | * This program is free software; you can redistribute it and/or modify |
13 | * it under the terms of the GNU General Public License as published by |
13 | * it under the terms of the GNU General Public License as published by |
14 | * the Free Software Foundation; either version 3 of the License, or |
14 | * the Free Software Foundation; either version 3 of the License, or |
15 | * (at your option) any later version. |
15 | * (at your option) any later version. |
… | |
… | |
113 | STRG (Rs_scrollBar_thickness, "thickness", "sbt", "number", "scrollbar thickness/width in pixels"), |
113 | STRG (Rs_scrollBar_thickness, "thickness", "sbt", "number", "scrollbar thickness/width in pixels"), |
114 | BOOL (Rs_scrollTtyOutput, "scrollTtyOutput", NULL, Opt_scrollTtyOutput, 0, NULL), |
114 | BOOL (Rs_scrollTtyOutput, "scrollTtyOutput", NULL, Opt_scrollTtyOutput, 0, NULL), |
115 | BOOL (Rs_scrollTtyOutput, NULL, "si", Opt_scrollTtyOutput, Optflag_Reverse, "scroll-on-tty-output inhibit"), |
115 | BOOL (Rs_scrollTtyOutput, NULL, "si", Opt_scrollTtyOutput, Optflag_Reverse, "scroll-on-tty-output inhibit"), |
116 | BOOL (Rs_scrollTtyKeypress, "scrollTtyKeypress", "sk", Opt_scrollTtyKeypress, 0, "scroll-on-keypress"), |
116 | BOOL (Rs_scrollTtyKeypress, "scrollTtyKeypress", "sk", Opt_scrollTtyKeypress, 0, "scroll-on-keypress"), |
117 | BOOL (Rs_scrollWithBuffer, "scrollWithBuffer", "sw", Opt_scrollWithBuffer, 0, "scroll-with-buffer"), |
117 | BOOL (Rs_scrollWithBuffer, "scrollWithBuffer", "sw", Opt_scrollWithBuffer, 0, "scroll-with-buffer"), |
118 | #if BG_IMAGE_FROM_ROOT |
|
|
119 | BOOL (Rs_transparent, "inheritPixmap", "ip", Opt_transparent, 0, "inherit parent pixmap"), |
|
|
120 | BOOL (Rs_transparent, "transparent", "tr", Opt_transparent, 0, "inherit parent pixmap"), |
|
|
121 | STRG (Rs_color + Color_tint, "tintColor", "tint", "color", "tint color"), |
|
|
122 | STRG (Rs_shade, "shading", "sh", "number", "shade background by number %."), |
|
|
123 | STRG (Rs_blurradius, "blurRadius", "blr", "HxV", "gaussian blur radii to apply to the root background"), |
|
|
124 | #endif |
|
|
125 | #if OFF_FOCUS_FADING |
118 | #if OFF_FOCUS_FADING |
126 | STRG (Rs_fade, "fading", "fade", "number", "fade colors by number % when losing focus"), |
119 | STRG (Rs_fade, "fading", "fade", "number", "fade colors by number % when losing focus"), |
127 | STRG (Rs_color + Color_fade, "fadeColor", "fadecolor", "color", "target color for off-focus fading"), |
120 | STRG (Rs_color + Color_fade, "fadeColor", "fadecolor", "color", "target color for off-focus fading"), |
128 | #endif |
121 | #endif |
129 | BOOL (Rs_utmpInhibit, "utmpInhibit", "ut", Opt_utmpInhibit, 0, "utmp inhibit"), |
122 | BOOL (Rs_utmpInhibit, "utmpInhibit", "ut", Opt_utmpInhibit, 0, "utmp inhibit"), |
… | |
… | |
194 | RSTRG (Rs_color + Color_cursor2, "cursorColor2", "color"), |
187 | RSTRG (Rs_color + Color_cursor2, "cursorColor2", "color"), |
195 | #endif /* NO_CURSORCOLOR */ |
188 | #endif /* NO_CURSORCOLOR */ |
196 | STRG (Rs_color + Color_pointer_fg, "pointerColor", "pr", "color", "pointer color"), |
189 | STRG (Rs_color + Color_pointer_fg, "pointerColor", "pr", "color", "pointer color"), |
197 | STRG (Rs_color + Color_pointer_bg, "pointerColor2", "pr2", "color", "pointer bg color"), |
190 | STRG (Rs_color + Color_pointer_bg, "pointerColor2", "pr2", "color", "pointer bg color"), |
198 | STRG (Rs_color + Color_border, "borderColor", "bd", "color", "border color"), |
191 | STRG (Rs_color + Color_border, "borderColor", "bd", "color", "border color"), |
199 | #if BG_IMAGE_FROM_FILE |
|
|
200 | RSTRG (Rs_path, "path", "search path"), |
|
|
201 | STRG (Rs_backgroundPixmap, "backgroundPixmap", "pixmap", "file[;geom]", "background pixmap"), |
|
|
202 | #endif |
|
|
203 | #if ENABLE_EWMH |
192 | #if ENABLE_EWMH |
204 | STRG (Rs_iconfile, "iconFile", "icon", "file", "path to application icon image"), |
193 | STRG (Rs_iconfile, "iconFile", "icon", "file", "path to application icon image"), |
205 | #endif |
194 | #endif |
206 | #ifdef HAVE_XMU |
195 | #ifdef HAVE_XMU |
207 | RSTRG (Rs_pointerShape, "pointerShape", "string"), |
196 | RSTRG (Rs_pointerShape, "pointerShape", "string"), |
… | |
… | |
644 | * quarks will be something like |
633 | * quarks will be something like |
645 | * "rxvt" "keysym" "0xFF01" |
634 | * "rxvt" "keysym" "0xFF01" |
646 | * value will be a string |
635 | * value will be a string |
647 | */ |
636 | */ |
648 | static int |
637 | static int |
649 | rxvt_keysym_enumerate_helper ( |
638 | rxvt_enumerate_helper ( |
650 | XrmDatabase *database ecb_unused, |
639 | XrmDatabase *database ecb_unused, |
651 | XrmBindingList bindings ecb_unused, |
640 | XrmBindingList bindings ecb_unused, |
652 | XrmQuarkList quarks, |
641 | XrmQuarkList quarks, |
653 | XrmRepresentation *type ecb_unused, |
642 | XrmRepresentation *type ecb_unused, |
654 | XrmValue *value, |
643 | XrmValue *value, |
… | |
… | |
859 | } |
848 | } |
860 | #endif /* NO_RESOURCES */ |
849 | #endif /* NO_RESOURCES */ |
861 | } |
850 | } |
862 | |
851 | |
863 | void |
852 | void |
864 | rxvt_term::enumerate_keysym_resources (void (*cb)(rxvt_term *, const char *, const char *)) |
853 | rxvt_term::enumerate_resources (void (*cb)(rxvt_term *, const char *, const char *), const char *name_p, const char *class_p) |
865 | { |
854 | { |
866 | /* |
855 | /* |
867 | * [R5 or later]: enumerate the resource database |
856 | * [R5 or later]: enumerate the resource database |
868 | */ |
857 | */ |
869 | #ifdef KEYSYM_RESOURCE |
858 | #ifdef KEYSYM_RESOURCE |
… | |
… | |
874 | |
863 | |
875 | XrmDatabase database = XrmGetDatabase (dpy); |
864 | XrmDatabase database = XrmGetDatabase (dpy); |
876 | XrmName name_prefix[3]; |
865 | XrmName name_prefix[3]; |
877 | XrmClass class_prefix[3]; |
866 | XrmClass class_prefix[3]; |
878 | |
867 | |
879 | name_prefix[1] = XrmStringToName ("keysym"); |
868 | name_prefix[1] = name_p ? XrmStringToName (name_p) : NULLQUARK; |
880 | name_prefix[2] = NULLQUARK; |
869 | name_prefix[2] = NULLQUARK; |
881 | class_prefix[1] = XrmStringToName ("Keysym"); |
870 | class_prefix[1] = class_p ? XrmStringToName (class_p) : NULLQUARK; |
882 | class_prefix[2] = NULLQUARK; |
871 | class_prefix[2] = NULLQUARK; |
883 | |
872 | |
884 | # ifdef RESFALLBACK |
873 | # ifdef RESFALLBACK |
885 | name_prefix[0] = class_prefix[0] = XrmStringToName (RESFALLBACK); |
874 | name_prefix[0] = class_prefix[0] = XrmStringToName (RESFALLBACK); |
886 | /* XXX: Need to check sizeof (rxvt_t) == sizeof (XPointer) */ |
875 | /* XXX: Need to check sizeof (rxvt_t) == sizeof (XPointer) */ |
887 | XrmEnumerateDatabase (database, name_prefix, class_prefix, |
876 | XrmEnumerateDatabase (database, name_prefix, class_prefix, |
888 | XrmEnumOneLevel, rxvt_keysym_enumerate_helper, (XPointer)closure); |
877 | XrmEnumOneLevel, rxvt_enumerate_helper, (XPointer)closure); |
889 | # endif |
878 | # endif |
890 | |
879 | |
891 | name_prefix[0] = class_prefix[0] = XrmStringToName (RESCLASS); |
880 | name_prefix[0] = class_prefix[0] = XrmStringToName (RESCLASS); |
892 | XrmEnumerateDatabase (database, name_prefix, class_prefix, |
881 | XrmEnumerateDatabase (database, name_prefix, class_prefix, |
893 | XrmEnumOneLevel, rxvt_keysym_enumerate_helper, (XPointer)closure); |
882 | XrmEnumOneLevel, rxvt_enumerate_helper, (XPointer)closure); |
894 | |
883 | |
895 | name_prefix[0] = class_prefix[0] = XrmStringToName (rs[Rs_name]); |
884 | name_prefix[0] = class_prefix[0] = XrmStringToName (rs[Rs_name]); |
896 | XrmEnumerateDatabase (database, name_prefix, class_prefix, |
885 | XrmEnumerateDatabase (database, name_prefix, class_prefix, |
897 | XrmEnumOneLevel, rxvt_keysym_enumerate_helper, (XPointer)closure); |
886 | XrmEnumOneLevel, rxvt_enumerate_helper, (XPointer)closure); |
898 | #endif |
887 | #endif |
899 | } |
888 | } |
900 | |
889 | |
901 | void |
890 | void |
902 | rxvt_term::extract_keysym_resources () |
891 | rxvt_term::extract_keysym_resources () |