… | |
… | |
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. |
… | |
… | |
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"), |
… | |
… | |
641 | * quarks will be something like |
644 | * quarks will be something like |
642 | * "rxvt" "keysym" "0xFF01" |
645 | * "rxvt" "keysym" "0xFF01" |
643 | * value will be a string |
646 | * value will be a string |
644 | */ |
647 | */ |
645 | static int |
648 | static int |
646 | rxvt_keysym_enumerate_helper ( |
649 | rxvt_enumerate_helper ( |
647 | XrmDatabase *database ecb_unused, |
650 | XrmDatabase *database ecb_unused, |
648 | XrmBindingList bindings ecb_unused, |
651 | XrmBindingList bindings ecb_unused, |
649 | XrmQuarkList quarks, |
652 | XrmQuarkList quarks, |
650 | XrmRepresentation *type ecb_unused, |
653 | XrmRepresentation *type ecb_unused, |
651 | XrmValue *value, |
654 | XrmValue *value, |
… | |
… | |
856 | } |
859 | } |
857 | #endif /* NO_RESOURCES */ |
860 | #endif /* NO_RESOURCES */ |
858 | } |
861 | } |
859 | |
862 | |
860 | void |
863 | void |
861 | rxvt_term::enumerate_keysym_resources (void (*cb)(rxvt_term *, const char *, const char *)) |
864 | rxvt_term::enumerate_resources (void (*cb)(rxvt_term *, const char *, const char *), const char *name_p, const char *class_p) |
862 | { |
865 | { |
863 | /* |
866 | /* |
864 | * [R5 or later]: enumerate the resource database |
867 | * [R5 or later]: enumerate the resource database |
865 | */ |
868 | */ |
866 | #ifdef KEYSYM_RESOURCE |
869 | #ifdef KEYSYM_RESOURCE |
… | |
… | |
871 | |
874 | |
872 | XrmDatabase database = XrmGetDatabase (dpy); |
875 | XrmDatabase database = XrmGetDatabase (dpy); |
873 | XrmName name_prefix[3]; |
876 | XrmName name_prefix[3]; |
874 | XrmClass class_prefix[3]; |
877 | XrmClass class_prefix[3]; |
875 | |
878 | |
876 | name_prefix[1] = XrmStringToName ("keysym"); |
879 | name_prefix[1] = name_p ? XrmStringToName (name_p) : NULLQUARK; |
877 | name_prefix[2] = NULLQUARK; |
880 | name_prefix[2] = NULLQUARK; |
878 | class_prefix[1] = XrmStringToName ("Keysym"); |
881 | class_prefix[1] = class_p ? XrmStringToName (class_p) : NULLQUARK; |
879 | class_prefix[2] = NULLQUARK; |
882 | class_prefix[2] = NULLQUARK; |
880 | |
883 | |
881 | # ifdef RESFALLBACK |
884 | # ifdef RESFALLBACK |
882 | name_prefix[0] = class_prefix[0] = XrmStringToName (RESFALLBACK); |
885 | name_prefix[0] = class_prefix[0] = XrmStringToName (RESFALLBACK); |
883 | /* XXX: Need to check sizeof (rxvt_t) == sizeof (XPointer) */ |
886 | /* XXX: Need to check sizeof (rxvt_t) == sizeof (XPointer) */ |
884 | XrmEnumerateDatabase (database, name_prefix, class_prefix, |
887 | XrmEnumerateDatabase (database, name_prefix, class_prefix, |
885 | XrmEnumOneLevel, rxvt_keysym_enumerate_helper, (XPointer)closure); |
888 | XrmEnumOneLevel, rxvt_enumerate_helper, (XPointer)closure); |
886 | # endif |
889 | # endif |
887 | |
890 | |
888 | name_prefix[0] = class_prefix[0] = XrmStringToName (RESCLASS); |
891 | name_prefix[0] = class_prefix[0] = XrmStringToName (RESCLASS); |
889 | XrmEnumerateDatabase (database, name_prefix, class_prefix, |
892 | XrmEnumerateDatabase (database, name_prefix, class_prefix, |
890 | XrmEnumOneLevel, rxvt_keysym_enumerate_helper, (XPointer)closure); |
893 | XrmEnumOneLevel, rxvt_enumerate_helper, (XPointer)closure); |
891 | |
894 | |
892 | name_prefix[0] = class_prefix[0] = XrmStringToName (rs[Rs_name]); |
895 | name_prefix[0] = class_prefix[0] = XrmStringToName (rs[Rs_name]); |
893 | XrmEnumerateDatabase (database, name_prefix, class_prefix, |
896 | XrmEnumerateDatabase (database, name_prefix, class_prefix, |
894 | XrmEnumOneLevel, rxvt_keysym_enumerate_helper, (XPointer)closure); |
897 | XrmEnumOneLevel, rxvt_enumerate_helper, (XPointer)closure); |
895 | #endif |
898 | #endif |
896 | } |
899 | } |
897 | |
900 | |
898 | void |
901 | void |
899 | rxvt_term::extract_keysym_resources () |
902 | rxvt_term::extract_keysym_resources () |