6 // Global objects for the user interface
11 #include "bcdisplayinfo.inc"
12 #include "bcfilebox.h"
13 #include "bcresources.inc"
14 #include "bcsignals.inc"
15 #include "bcwindowbase.inc"
31 BC_Resources(); // The window parameter is used to get the display information initially
34 int initialize_display(BC_WindowBase
*window
);
36 int get_bg_color(); // window backgrounds
37 int get_bg_shadow1(); // border for windows
41 // Get window border size created by window manager
43 int get_left_border();
44 int get_right_border();
45 int get_bottom_border();
47 // Pointer to signal handler class to run after ipc
48 static BC_Signals
*signal_handler
;
50 // These values should be changed before the first window is created.
52 int bg_color
; // window backgrounds
53 int bg_shadow1
; // border for windows
57 int default_text_color
;
58 int disabled_text_color
;
63 int button_highlighted
;
67 int button_uphighlighted
;
70 int highlight_inverse
;
72 // 3D box colors for menus
78 // If these are nonzero, they override the menu backgrounds.
79 VFrame
*menu_popup_bg
;
80 VFrame
**menu_title_bg
;
82 VFrame
**popupmenu_images
;
86 // Menu bar text color
88 // color of popup title
90 // Right and left margin for text not including triangle space.
92 // Right margin for triangle not including text margin.
93 int popupmenu_triangle_margin
;
94 // color for item text
96 // Override the menu item background if nonzero.
97 VFrame
**menu_item_bg
;
100 // color for progress text
104 int menu_highlighted_fontcolor
;
106 // ms for double click
108 // ms for cursor flash
110 // ms for scroll repeats
114 int tooltip_bg_color
;
115 int tooltips_enabled
;
117 int audiovideo_color
;
119 // default color of text
121 // background color of textboxes and list boxes
126 int text_background_hi
;
127 int text_background_noborder_hi
;
132 int text_inactive_highlight
;
134 int text_background_noborder
;
136 // Optional background for highlighted text in toggle
137 VFrame
*toggle_highlight_bg
;
138 int toggle_text_margin
;
141 static VFrame
*bg_image
;
142 static VFrame
*menu_bg
;
146 VFrame
**cancel_images
;
147 VFrame
**filebox_text_images
;
148 VFrame
**filebox_icons_images
;
149 VFrame
**filebox_updir_images
;
150 VFrame
**filebox_newfolder_images
;
151 VFrame
**filebox_descend_images
;
152 VFrame
**filebox_delete_images
;
153 VFrame
**filebox_reload_images
;
155 // Generic button images
156 VFrame
**generic_button_images
;
157 // Generic button text margin
158 int generic_button_margin
;
159 VFrame
**usethis_button_images
;
162 VFrame
**checkbox_images
;
163 VFrame
**radial_images
;
164 VFrame
**label_images
;
166 VFrame
**tumble_data
;
174 VFrame
**listbox_button
;
175 VFrame
**listbox_expand
;
176 VFrame
**listbox_column
;
179 // Margin for titles in addition to listbox border
180 int listbox_title_margin
;
181 int listbox_title_color
;
182 int listbox_title_hotspot
;
184 int listbox_border2_hi
;
186 int listbox_border3_hi
;
189 // Selected row color
190 int listbox_selected
;
191 // Highlighted row color
192 int listbox_highlighted
;
193 // Inactive row color
194 int listbox_inactive
;
195 // Default text color
200 VFrame
**horizontal_slider_data
;
201 VFrame
**vertical_slider_data
;
202 VFrame
**hscroll_data
;
204 VFrame
**vscroll_data
;
205 // Minimum pixels in handle
206 int scroll_minhandle
;
214 int pot_x1
, pot_y1
, pot_r
;
215 // Amount of deflection of pot when down
217 int pot_needle_color
;
220 VFrame
**xmeter_images
, **ymeter_images
;
222 int meter_font_color
;
227 VFrame
**progress_images
;
229 // Motion required to start a drag
233 static suffix_to_type_t suffix_to_type
[TOTAL_SUFFIXES
];
234 static VFrame
*type_to_icon
[TOTAL_ICONS
];
235 // Display mode for fileboxes
237 // Filter currently used in filebox
238 char filebox_filter
[BCTEXTLEN
];
239 // History of submitted files
240 char filebox_history
[FILEBOX_HISTORY_SIZE
][BCTEXTLEN
];
244 // Column types for filebox
245 int filebox_columntype
[FILEBOX_COLUMNS
];
246 int filebox_columnwidth
[FILEBOX_COLUMNS
];
247 int filebox_sortcolumn
;
248 int filebox_sortorder
;
249 // Column types for filebox in directory mode
250 int dirbox_columntype
[FILEBOX_COLUMNS
];
251 int dirbox_columnwidth
[FILEBOX_COLUMNS
];
252 int dirbox_sortcolumn
;
253 int dirbox_sortorder
;
254 // Bottom margin between list and window
262 static char *large_font
;
263 static char *medium_font
;
264 static char *small_font
;
265 // Backup of fonts in case the first choices don't exist
266 static char *large_font2
;
267 static char *medium_font2
;
268 static char *small_font2
;
270 static char *large_fontset
;
271 static char *medium_fontset
;
272 static char *small_fontset
;
274 static char *large_font_xft
;
275 static char *medium_font_xft
;
276 static char *small_font_xft
;
278 VFrame
**medium_7segment
;
281 int draw_clock_background
;
284 // This must be constitutive since applications access the private members here.
289 // Available display extensions
292 // If the program uses recursive_resizing
293 int recursive_resizing
;
294 // Work around X server bugs
298 // Test for availability of shared memory pixmaps
299 int init_shm(BC_WindowBase
*window
);
300 void init_sizes(BC_WindowBase
*window
);
301 static int x_error_handler(Display
*display
, XErrorEvent
*event
);
302 BC_DisplayInfo
*display_info
;
303 VFrame
**list_pointers
[100];
304 int list_lengths
[100];