[9080] | 1 | /* |
---|
| 2 | * Modifications Copyright 1993, 1994, 1995, 1996 by Paul Mattes. |
---|
| 3 | * Copyright 1990 by Jeff Sparkes. |
---|
| 4 | * Permission to use, copy, modify, and distribute this software and its |
---|
| 5 | * documentation for any purpose and without fee is hereby granted, |
---|
| 6 | * provided that the above copyright notice appear in all copies and that |
---|
| 7 | * both that copyright notice and this permission notice appear in |
---|
| 8 | * supporting documentation. |
---|
| 9 | */ |
---|
| 10 | |
---|
| 11 | /* |
---|
| 12 | * appres.h |
---|
| 13 | * Application resource definitions for x3270. |
---|
| 14 | */ |
---|
| 15 | |
---|
| 16 | /* Toggles */ |
---|
| 17 | |
---|
| 18 | enum toggle_type { TT_INITIAL, TT_TOGGLE, TT_FINAL }; |
---|
| 19 | struct toggle { |
---|
| 20 | Boolean value; /* toggle value */ |
---|
| 21 | Boolean changed; /* has the value changed since init */ |
---|
| 22 | Widget w[2]; /* the menu item widgets */ |
---|
| 23 | char *label[2]; /* labels */ |
---|
| 24 | void (*upcall)(); /* change value */ |
---|
| 25 | }; |
---|
| 26 | #define MONOCASE 0 |
---|
| 27 | #define ALT_CURSOR 1 |
---|
| 28 | #define CURSOR_BLINK 2 |
---|
| 29 | #define SHOW_TIMING 3 |
---|
| 30 | #define CURSOR_POS 4 |
---|
| 31 | #define DS_TRACE 5 |
---|
| 32 | #define SCROLL_BAR 6 |
---|
| 33 | #define LINE_WRAP 7 |
---|
| 34 | #define BLANK_FILL 8 |
---|
| 35 | #define SCREEN_TRACE 9 |
---|
| 36 | #define EVENT_TRACE 10 |
---|
| 37 | #define MARGINED_PASTE 11 |
---|
| 38 | #define RECTANGLE_SELECT 12 |
---|
| 39 | |
---|
| 40 | #define N_TOGGLES 13 |
---|
| 41 | |
---|
| 42 | #define toggled(ix) (appres.toggle[ix].value) |
---|
| 43 | #define toggle_toggle(t) \ |
---|
| 44 | { (t)->value = !(t)->value; (t)->changed = True; } |
---|
| 45 | |
---|
| 46 | /* Application resources */ |
---|
| 47 | |
---|
| 48 | typedef struct { |
---|
| 49 | /* Basic colors */ |
---|
| 50 | Pixel foreground; |
---|
| 51 | Pixel background; |
---|
| 52 | |
---|
| 53 | /* Options (not toggles) */ |
---|
| 54 | Boolean mono; |
---|
| 55 | Boolean extended; |
---|
| 56 | Boolean m3279; |
---|
| 57 | Boolean visual_bell; |
---|
| 58 | Boolean keypad_on; |
---|
| 59 | Boolean menubar; |
---|
| 60 | Boolean active_icon; |
---|
| 61 | Boolean label_icon; |
---|
| 62 | Boolean apl_mode; |
---|
| 63 | Boolean once; |
---|
| 64 | Boolean invert_kpshift; |
---|
| 65 | Boolean scripted; |
---|
| 66 | Boolean modified_sel; |
---|
| 67 | Boolean use_cursor_color; |
---|
| 68 | Boolean reconnect; |
---|
| 69 | Boolean do_confirms; |
---|
| 70 | Boolean numeric_lock; |
---|
| 71 | Boolean allow_resize; |
---|
| 72 | Boolean secure; |
---|
| 73 | Boolean no_other; |
---|
| 74 | Boolean oerr_lock; |
---|
| 75 | Boolean typeahead; |
---|
| 76 | Boolean debug_tracing; |
---|
| 77 | Boolean attn_lock; |
---|
| 78 | |
---|
| 79 | /* Named resources */ |
---|
| 80 | char *keypad; |
---|
| 81 | char *efontname; |
---|
| 82 | char *afontname; |
---|
| 83 | char *model; |
---|
| 84 | char *key_map; |
---|
| 85 | char *compose_map; |
---|
| 86 | char *hostsfile; |
---|
| 87 | char *port; |
---|
| 88 | char *charset; |
---|
| 89 | char *termname; |
---|
| 90 | char *font_list; |
---|
| 91 | char *debug_font; |
---|
| 92 | char *icon_font; |
---|
| 93 | char *icon_label_font; |
---|
| 94 | char *macros; |
---|
| 95 | char *trace_dir; |
---|
| 96 | int save_lines; |
---|
| 97 | char *normal_name; |
---|
| 98 | char *select_name; |
---|
| 99 | char *bold_name; |
---|
| 100 | char *colorbg_name; |
---|
| 101 | char *keypadbg_name; |
---|
| 102 | char *selbg_name; |
---|
| 103 | char *cursor_color_name; |
---|
| 104 | char *color_scheme; |
---|
| 105 | int bell_volume; |
---|
| 106 | char *oversize; |
---|
| 107 | char *char_class; |
---|
| 108 | char *ft_command; |
---|
[11122] | 109 | int modified_sel_color; |
---|
[9080] | 110 | |
---|
| 111 | /* Toggles */ |
---|
| 112 | struct toggle toggle[N_TOGGLES]; |
---|
| 113 | |
---|
| 114 | /* Simple widget resources */ |
---|
| 115 | XtTranslations base_translations; |
---|
| 116 | Cursor wait_mcursor; |
---|
| 117 | Cursor locked_mcursor; |
---|
| 118 | |
---|
| 119 | /* Line-mode TTY parameters */ |
---|
| 120 | Boolean icrnl; |
---|
| 121 | Boolean inlcr; |
---|
| 122 | char *erase; |
---|
| 123 | char *kill; |
---|
| 124 | char *werase; |
---|
| 125 | char *rprnt; |
---|
| 126 | char *lnext; |
---|
| 127 | char *intr; |
---|
| 128 | char *quit; |
---|
| 129 | char *eof; |
---|
| 130 | |
---|
| 131 | #if defined(USE_APP_DEFAULTS) /*[*/ |
---|
| 132 | /* App-defaults version */ |
---|
| 133 | char *ad_version; |
---|
| 134 | #endif /*]*/ |
---|
| 135 | |
---|
| 136 | } AppRes, *AppResptr; |
---|
| 137 | |
---|
| 138 | extern AppRes appres; |
---|