4 #include "bcdisplayinfo.inc"
6 #include "bcresources.inc"
7 #include "bcsignals.inc"
8 #include "bcwindowbase.inc"
22 BC_Resources(); // The window parameter is used to get the display information initially
25 int initialize_display(BC_WindowBase
*window
);
27 int get_bg_color(); // window backgrounds
28 int get_bg_shadow1(); // border for windows
32 // Get window border size created by window manager
34 int get_left_border();
35 int get_right_border();
36 int get_bottom_border();
38 // Pointer to signal handler class to run after ipc
39 static BC_Signals
*signal_handler
;
41 // These values should be changed before the first window is created.
43 int bg_color
; // window backgrounds
44 int bg_shadow1
; // border for windows
48 int default_text_color
;
49 int disabled_text_color
;
54 int button_highlighted
;
58 int button_uphighlighted
;
61 int highlight_inverse
;
63 // 3D box colors for menus
69 // If these are nonzero, they override the menu backgrounds.
70 VFrame
*menu_popup_bg
;
71 VFrame
**menu_title_bg
;
73 VFrame
**popupmenu_images
;
77 // Menu bar text color
79 // color of popup title
81 // Right and left margin for text not including triangle space.
83 // Right margin for triangle not including text margin.
84 int popupmenu_triangle_margin
;
85 // color for item text
87 // Override the menu item background if nonzero.
88 VFrame
**menu_item_bg
;
91 // color for progress text
95 int menu_highlighted_fontcolor
;
97 // ms for double click
99 // ms for cursor flash
101 // ms for scroll repeats
105 int tooltip_bg_color
;
106 int tooltips_enabled
;
108 int audiovideo_color
;
110 // default color of text
112 // background color of textboxes and list boxes
117 int text_background_hi
;
118 int text_background_noborder_hi
;
123 int text_inactive_highlight
;
125 int text_background_noborder
;
127 // Optional background for highlighted text in toggle
128 VFrame
*toggle_highlight_bg
;
129 int toggle_text_margin
;
132 static VFrame
*bg_image
;
133 static VFrame
*menu_bg
;
137 VFrame
**cancel_images
;
138 VFrame
**filebox_text_images
;
139 VFrame
**filebox_icons_images
;
140 VFrame
**filebox_updir_images
;
141 VFrame
**filebox_newfolder_images
;
142 VFrame
**filebox_descend_images
;
143 VFrame
**filebox_delete_images
;
144 VFrame
**filebox_reload_images
;
146 // Generic button images
147 VFrame
**generic_button_images
;
148 // Generic button text margin
149 int generic_button_margin
;
150 VFrame
**usethis_button_images
;
153 VFrame
**checkbox_images
;
154 VFrame
**radial_images
;
155 VFrame
**label_images
;
157 VFrame
**tumble_data
;
165 VFrame
**listbox_button
;
166 VFrame
**listbox_expand
;
167 VFrame
**listbox_column
;
170 // Margin for titles in addition to listbox border
171 int listbox_title_margin
;
172 int listbox_title_color
;
173 int listbox_title_hotspot
;
175 int listbox_border2_hi
;
177 int listbox_border3_hi
;
180 // Selected row color
181 int listbox_selected
;
182 // Highlighted row color
183 int listbox_highlighted
;
184 // Inactive row color
185 int listbox_inactive
;
186 // Default text color
191 VFrame
**horizontal_slider_data
;
192 VFrame
**vertical_slider_data
;
193 VFrame
**hscroll_data
;
195 VFrame
**vscroll_data
;
196 // Minimum pixels in handle
197 int scroll_minhandle
;
205 int pot_x1
, pot_y1
, pot_r
;
206 // Amoun of deflection of pot when down
208 int pot_needle_color
;
211 VFrame
**xmeter_images
, **ymeter_images
;
213 int meter_font_color
;
218 VFrame
**progress_images
;
220 // Motion required to start a drag
224 static suffix_to_type_t suffix_to_type
[TOTAL_SUFFIXES
];
225 static VFrame
*type_to_icon
[TOTAL_ICONS
];
226 // Display mode for fileboxes
228 // Filter currently used in filebox
229 char filebox_filter
[BCTEXTLEN
];
230 // History of submitted files
231 char filebox_history
[FILEBOX_HISTORY_SIZE
][BCTEXTLEN
];
235 // Column types for filebox
236 int filebox_columntype
[FILEBOX_COLUMNS
];
237 int filebox_columnwidth
[FILEBOX_COLUMNS
];
238 int filebox_sortcolumn
;
239 int filebox_sortorder
;
240 // Column types for filebox in directory mode
241 int dirbox_columntype
[FILEBOX_COLUMNS
];
242 int dirbox_columnwidth
[FILEBOX_COLUMNS
];
243 int dirbox_sortcolumn
;
244 int dirbox_sortorder
;
245 // Bottom margin between list and window
253 static char *large_font
;
254 static char *medium_font
;
255 static char *small_font
;
256 // Backup of fonts in case the first choices don't exist
257 static char *large_font2
;
258 static char *medium_font2
;
259 static char *small_font2
;
261 static char *large_fontset
;
262 static char *medium_fontset
;
263 static char *small_fontset
;
265 static char *large_font_xft
;
266 static char *medium_font_xft
;
267 static char *small_font_xft
;
269 VFrame
**medium_7segment
;
272 int draw_clock_background
;
275 // This must be constitutive since applications access the private members here.
280 // Available display extensions
283 // If the program uses recursive_resizing
284 int recursive_resizing
;
285 // Work around X server bugs
289 // Test for availability of shared memory pixmaps
290 int init_shm(BC_WindowBase
*window
);
291 void init_sizes(BC_WindowBase
*window
);
292 static int x_error_handler(Display
*display
, XErrorEvent
*event
);
293 BC_DisplayInfo
*display_info
;
294 VFrame
**list_pointers
[100];
295 int list_lengths
[100];