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 "bcsynchronous.inc"
16 #include "bcwindowbase.inc"
32 BC_Resources(); // The window parameter is used to get the display information initially
35 int initialize_display(BC_WindowBase
*window
);
39 int get_bg_color(); // window backgrounds
40 int get_bg_shadow1(); // border for windows
44 // Get window border size created by window manager
46 int get_left_border();
47 int get_right_border();
48 int get_bottom_border();
49 // Get synchronous thread for OpenGL
50 BC_Synchronous
* get_synchronous();
51 // Called by user after synchronous thread is created.
52 void set_synchronous(BC_Synchronous
*synchronous
);
53 // Pointer to signal handler class to run after ipc
54 static BC_Signals
*signal_handler
;
56 // These values should be changed before the first window is created.
58 int bg_color
; // window backgrounds
59 int bg_shadow1
; // border for windows
63 int default_text_color
;
64 int disabled_text_color
;
69 int button_highlighted
;
73 int button_uphighlighted
;
76 int highlight_inverse
;
78 // 3D box colors for menus
84 // If these are nonzero, they override the menu backgrounds.
85 VFrame
*menu_popup_bg
;
86 VFrame
**menu_title_bg
;
88 VFrame
**popupmenu_images
;
92 // Menu bar text color
94 // color of popup title
96 // Right and left margin for text not including triangle space.
98 // Right margin for triangle not including text margin.
99 int popupmenu_triangle_margin
;
100 // color for item text
102 // Override the menu item background if nonzero.
103 VFrame
**menu_item_bg
;
106 // color for progress text
110 int menu_highlighted_fontcolor
;
112 // ms for double click
114 // ms for cursor flash
116 // ms for scroll repeats
120 int tooltip_bg_color
;
121 int tooltips_enabled
;
123 int audiovideo_color
;
125 // default color of text
127 // background color of textboxes and list boxes
132 int text_background_hi
;
133 int text_background_noborder_hi
;
138 int text_inactive_highlight
;
140 int text_background_noborder
;
142 // Optional background for highlighted text in toggle
143 VFrame
*toggle_highlight_bg
;
144 int toggle_text_margin
;
147 static VFrame
*bg_image
;
148 static VFrame
*menu_bg
;
152 VFrame
**cancel_images
;
153 VFrame
**filebox_text_images
;
154 VFrame
**filebox_icons_images
;
155 VFrame
**filebox_updir_images
;
156 VFrame
**filebox_newfolder_images
;
157 VFrame
**filebox_descend_images
;
158 VFrame
**filebox_delete_images
;
159 VFrame
**filebox_reload_images
;
161 // Generic button images
162 VFrame
**generic_button_images
;
163 // Generic button text margin
164 int generic_button_margin
;
165 VFrame
**usethis_button_images
;
168 VFrame
**checkbox_images
;
169 VFrame
**radial_images
;
170 VFrame
**label_images
;
172 VFrame
**tumble_data
;
180 VFrame
**listbox_button
;
181 VFrame
**listbox_expand
;
182 VFrame
**listbox_column
;
185 // Margin for titles in addition to listbox border
186 int listbox_title_margin
;
187 int listbox_title_color
;
188 int listbox_title_hotspot
;
190 int listbox_border2_hi
;
192 int listbox_border3_hi
;
195 // Selected row color
196 int listbox_selected
;
197 // Highlighted row color
198 int listbox_highlighted
;
199 // Inactive row color
200 int listbox_inactive
;
201 // Default text color
206 VFrame
**horizontal_slider_data
;
207 VFrame
**vertical_slider_data
;
208 VFrame
**hscroll_data
;
210 VFrame
**vscroll_data
;
211 // Minimum pixels in handle
212 int scroll_minhandle
;
220 int pot_x1
, pot_y1
, pot_r
;
221 // Amount of deflection of pot when down
223 int pot_needle_color
;
226 VFrame
**xmeter_images
, **ymeter_images
;
228 int meter_font_color
;
233 VFrame
**progress_images
;
235 // Motion required to start a drag
239 static suffix_to_type_t suffix_to_type
[TOTAL_SUFFIXES
];
240 static VFrame
*type_to_icon
[TOTAL_ICONS
];
241 // Display mode for fileboxes
243 // Filter currently used in filebox
244 char filebox_filter
[BCTEXTLEN
];
245 // History of submitted files
246 char filebox_history
[FILEBOX_HISTORY_SIZE
][BCTEXTLEN
];
250 // Column types for filebox
251 int filebox_columntype
[FILEBOX_COLUMNS
];
252 int filebox_columnwidth
[FILEBOX_COLUMNS
];
253 int filebox_sortcolumn
;
254 int filebox_sortorder
;
255 // Column types for filebox in directory mode
256 int dirbox_columntype
[FILEBOX_COLUMNS
];
257 int dirbox_columnwidth
[FILEBOX_COLUMNS
];
258 int dirbox_sortcolumn
;
259 int dirbox_sortorder
;
260 // Bottom margin between list and window
268 static char *large_font
;
269 static char *medium_font
;
270 static char *small_font
;
271 // Backup of fonts in case the first choices don't exist
272 static char *large_font2
;
273 static char *medium_font2
;
274 static char *small_font2
;
276 static char *large_fontset
;
277 static char *medium_fontset
;
278 static char *small_fontset
;
280 static char *large_font_xft
;
281 static char *medium_font_xft
;
282 static char *small_font_xft
;
284 VFrame
**medium_7segment
;
287 int draw_clock_background
;
290 // This must be constitutive since applications access the private members here.
295 // Available display extensions
298 // If the program uses recursive_resizing
299 int recursive_resizing
;
300 // Work around X server bugs
304 // Test for availability of shared memory pixmaps
305 int init_shm(BC_WindowBase
*window
);
306 void init_sizes(BC_WindowBase
*window
);
307 static int x_error_handler(Display
*display
, XErrorEvent
*event
);
308 BC_DisplayInfo
*display_info
;
309 VFrame
**list_pointers
[100];
310 int list_lengths
[100];
315 BC_Synchronous
*synchronous
;