r665: Merged the official release 2.0.
[cinelerra_cv.git] / guicast / bcwindowbase.h
blob8570505925c273c0a8c9258118de8d7959d384c7
1 #ifndef BCWINDOWBASE_H
2 #define BCWINDOWBASE_H
4 #if defined(HAVE_CONFIG_H)
5 #include "config.h"
6 #endif
8 // Window types
10 #define MAIN_WINDOW 0
11 #define SUB_WINDOW 1
12 #define POPUP_WINDOW 2
13 #ifdef HAVE_LIBXXF86VM
14 #define VIDMODE_SCALED_WINDOW 3
15 #endif
17 #define TOOLTIP_MARGIN 2
18 #define BC_INFINITY 65536
20 #include "arraylist.h"
21 #include "bcbar.inc"
22 #include "bcbitmap.inc"
23 #include "bcbutton.inc"
24 #include "bccapture.inc"
25 #include "bcclipboard.inc"
26 #include "bcdragwindow.inc"
27 #include "bcfilebox.inc"
28 #include "bclistbox.inc"
29 #include "bcmenubar.inc"
30 #include "bcmeter.inc"
31 #include "bcpan.inc"
32 #include "bcpixmap.inc"
33 #include "bcpopup.inc"
34 #include "bcpopupmenu.inc"
35 #include "bcpot.inc"
36 #include "bcprogress.inc"
37 #include "bcrepeater.inc"
38 #include "bcresources.inc"
39 #include "bcscrollbar.inc"
40 #include "bcslider.inc"
41 #include "bcsubwindow.inc"
42 #include "bctextbox.inc"
43 #include "bctitle.inc"
44 #include "bctoggle.inc"
45 #include "bctumble.inc"
46 #include "bcwindow.inc"
47 #include "bcwindowbase.inc"
48 #include "bcwindowevents.inc"
49 #include "condition.inc"
50 #include "defaults.inc"
51 #include "linklist.h"
52 #include "mutex.h"
53 #include "vframe.inc"
56 #include <stdint.h>
57 #include <stdio.h>
58 #include <stdlib.h>
59 #include <X11/Xatom.h>
60 #ifdef HAVE_XFT
61 #include <X11/Xft/Xft.h>
62 #endif
63 #include <X11/Xlib.h>
64 #include <X11/Xutil.h>
65 #include <X11/keysym.h>
66 #include <X11/cursorfont.h>
67 #ifdef HAVE_LIBXXF86VM
68 #include <X11/extensions/xf86vmode.h>
69 #endif
74 #ifdef HAVE_GL
75 typedef void* GLXContext;
76 #endif
78 class BC_ResizeCall
80 public:
81 BC_ResizeCall(int w, int h);
82 int w, h;
86 // Windows, subwindows, popupwindows inherit from this
87 class BC_WindowBase
89 public:
90 BC_WindowBase();
91 virtual ~BC_WindowBase();
93 friend class BC_Bar;
94 friend class BC_Bitmap;
95 friend class BC_Button;
96 friend class BC_GenericButton;
97 friend class BC_Capture;
98 friend class BC_Clipboard;
99 friend class BC_DragWindow;
100 friend class BC_FileBox;
101 friend class BC_FullScreen;
102 friend class BC_ListBox;
103 friend class BC_Menu;
104 friend class BC_MenuBar;
105 friend class BC_MenuItem;
106 friend class BC_MenuPopup;
107 friend class BC_Meter;
108 friend class BC_Pan;
109 friend class BC_Pixmap;
110 friend class BC_Popup;
111 friend class BC_PopupMenu;
112 friend class BC_Pot;
113 friend class BC_ProgressBar;
114 friend class BC_Repeater;
115 friend class BC_Resources;
116 friend class BC_ScrollBar;
117 friend class BC_Slider;
118 friend class BC_SubWindow;
119 friend class BC_TextBox;
120 friend class BC_Title;
121 friend class BC_Toggle;
122 friend class BC_Tumbler;
123 friend class BC_Window;
124 friend class BC_WindowEvents;
126 // Main loop
127 int run_window();
128 // Terminal event dispatchers
129 virtual int close_event();
130 virtual int resize_event(int w, int h);
131 virtual int repeat_event(int64_t duration) { return 0; };
132 virtual int focus_in_event() { return 0; };
133 virtual int focus_out_event() { return 0; };
134 virtual int button_press_event() { return 0; };
135 virtual int button_release_event() { return 0; };
136 virtual int cursor_motion_event() { return 0; };
137 virtual int cursor_leave_event();
138 virtual int cursor_enter_event();
139 virtual int keypress_event() { return 0; };
140 virtual int translation_event() { return 0; };
141 virtual int drag_start_event() { return 0; };
142 virtual int drag_motion_event() { return 0; };
143 virtual int drag_stop_event() { return 0; };
144 virtual int uses_text() { return 0; };
145 // Only if opengl is enabled
146 virtual int expose_event() { return 0; };
148 // Check if a hardware accelerated colormodel is available and reserve it
149 int accel_available(int color_model, int lock_it);
150 // Get color model adjusted for byte order and pixel size
151 int get_color_model();
152 // return the colormap pixel of the color for all bit depths
153 int get_color(int64_t color);
154 // return the currently selected color
155 int64_t get_color();
156 int show_window(int flush = 1);
157 int hide_window(int flush = 1);
158 int get_hidden();
159 int get_video_on();
160 // Shouldn't deference a pointer to delete a window if a parent is
161 // currently being deleted. This returns 1 if any parent is being deleted.
162 int get_deleting();
163 void enable_opengl();
164 void disable_opengl();
165 void lock_opengl();
166 void unlock_opengl();
167 void flip_opengl();
169 int flash(int x, int y, int w, int h, int flush = 1);
170 int flash(int flush = 1);
171 void flush();
172 void sync_display();
173 // Lock out other threads
174 int lock_window(char *location = 0);
175 int unlock_window();
176 int get_window_lock();
178 BC_MenuBar* add_menubar(BC_MenuBar *menu_bar);
179 BC_WindowBase* add_subwindow(BC_WindowBase *subwindow);
180 BC_WindowBase* add_tool(BC_WindowBase *subwindow);
182 static BC_Resources* get_resources();
183 // Dimensions
184 virtual int get_w();
185 virtual int get_h();
186 virtual int get_x();
187 virtual int get_y();
188 int get_root_w(int ignore_dualhead = 0, int lock_display = 0);
189 int get_root_h(int lock_display);
190 // Get current position
191 int get_abs_cursor_x(int lock_window);
192 int get_abs_cursor_y(int lock_window);
193 int get_relative_cursor_x();
194 int get_relative_cursor_y();
195 // Return 1 if cursor is over an unobscured part of this window.
196 // An argument is provided for excluding a drag popup
197 int get_cursor_over_window();
198 // For traversing windows... return 1 if this or any subwindow is win
199 int match_window(Window win);
201 // 1 or 0 if a button is down
202 int get_button_down();
203 // Number of button pressed 1 - 5
204 int get_buttonpress();
205 int get_has_focus();
206 int get_dragging();
207 int get_keypress();
208 // Get cursor position of last event
209 int get_cursor_x();
210 int get_cursor_y();
211 // Cursor position of drag start
212 int get_drag_x();
213 int get_drag_y();
214 int relative_cursor_x(BC_WindowBase *pov);
215 int relative_cursor_y(BC_WindowBase *pov);
216 int alt_down();
217 int shift_down();
218 int ctrl_down();
219 int get_double_click();
220 // Bottom right corner
221 int get_x2();
222 int get_y2();
223 int get_bg_color();
224 BC_Pixmap* get_bg_pixmap();
225 int get_text_ascent(int font);
226 int get_text_descent(int font);
227 int get_text_height(int font, char *text = 0);
228 int get_text_width(int font, char *text, int length = -1);
229 BC_Clipboard* get_clipboard();
230 void set_dragging(int value);
231 int set_w(int w);
232 int set_h(int h);
233 BC_WindowBase* get_top_level();
234 BC_WindowBase* get_parent();
235 // Event happened in this window
236 int is_event_win();
237 int cursor_inside();
238 // Deactivate everything and activate this subwindow
239 virtual int activate();
240 // Deactivate this subwindow
241 virtual int deactivate();
242 void set_active_subwindow(BC_WindowBase *subwindow);
243 // Get value of toggle value when dragging a selection
244 int get_toggle_value();
245 // Get if toggle is being dragged
246 int get_toggle_drag();
249 // Set the gc to the color
250 void set_color(int64_t color);
251 int get_bgcolor();
252 void set_font(int font);
253 // Set the cursor to a macro from cursors.h
254 void set_cursor(int cursor, int is_hourglass = 0);
255 // Set the cursor to a character in the X cursor library. Used by test.C
256 void set_x_cursor(int cursor);
257 int get_cursor();
259 // Entry point for starting hourglass.
260 // Converts all cursors and saves the previous cursor.
261 void start_hourglass();
262 void stop_hourglass();
264 // Recursive part of hourglass commands.
265 void start_hourglass_recursive();
266 void stop_hourglass_recursive();
268 // Drawing
269 void copy_area(int x1, int y1, int x2, int y2, int w, int h, BC_Pixmap *pixmap = 0);
270 void clear_box(int x, int y, int w, int h, BC_Pixmap *pixmap = 0);
271 void draw_box(int x, int y, int w, int h, BC_Pixmap *pixmap = 0);
272 void draw_circle(int x, int y, int w, int h, BC_Pixmap *pixmap = 0);
273 void draw_disc(int x, int y, int w, int h, BC_Pixmap *pixmap = 0);
274 void draw_text(int x, int y, char *text, int length = -1, BC_Pixmap *pixmap = 0);
275 void draw_center_text(int x, int y, char *text, int length = -1);
276 void draw_line(int x1, int y1, int x2, int y2, BC_Pixmap *pixmap = 0);
277 void draw_polygon(ArrayList<int> *x, ArrayList<int> *y, BC_Pixmap *pixmap = 0);
278 void draw_rectangle(int x, int y, int w, int h);
279 void draw_3segment(int x,
280 int y,
281 int w,
282 int h,
283 BC_Pixmap *left_image,
284 BC_Pixmap *mid_image,
285 BC_Pixmap *right_image,
286 BC_Pixmap *pixmap = 0);
287 void draw_3segment(int x,
288 int y,
289 int w,
290 int h,
291 VFrame *left_image,
292 VFrame *mid_image,
293 VFrame *right_image,
294 BC_Pixmap *pixmap = 0);
295 // For drawing a changing level
296 void draw_3segmenth(int x,
297 int y,
298 int w,
299 int total_x,
300 int total_w,
301 VFrame *image,
302 BC_Pixmap *pixmap);
303 void draw_3segmenth(int x,
304 int y,
305 int w,
306 int total_x,
307 int total_w,
308 BC_Pixmap *src,
309 BC_Pixmap *dst = 0);
310 void draw_3segmentv(int x,
311 int y,
312 int h,
313 int total_y,
314 int total_h,
315 BC_Pixmap *src,
316 BC_Pixmap *dst = 0);
317 void draw_3segmentv(int x,
318 int y,
319 int h,
320 int total_y,
321 int total_h,
322 VFrame *src,
323 BC_Pixmap *dst = 0);
324 // For drawing a single level
325 void draw_3segmenth(int x,
326 int y,
327 int w,
328 VFrame *image,
329 BC_Pixmap *pixmap = 0);
330 void draw_3segmenth(int x,
331 int y,
332 int w,
333 BC_Pixmap *src,
334 BC_Pixmap *dst = 0);
335 void draw_3segmentv(int x,
336 int y,
337 int h,
338 BC_Pixmap *src,
339 BC_Pixmap *dst = 0);
340 void draw_3segmentv(int x,
341 int y,
342 int h,
343 VFrame *src,
344 BC_Pixmap *dst = 0);
345 void draw_9segment(int x,
346 int y,
347 int w,
348 int h,
349 VFrame *src,
350 BC_Pixmap *dst = 0);
351 void draw_9segment(int x,
352 int y,
353 int w,
354 int h,
355 BC_Pixmap *src,
356 BC_Pixmap *dst = 0);
357 void draw_3d_box(int x,
358 int y,
359 int w,
360 int h,
361 int light1,
362 int light2,
363 int middle,
364 int shadow1,
365 int shadow2,
366 BC_Pixmap *pixmap = 0);
367 void draw_3d_border(int x, int y, int w, int h,
368 int light1, int light2, int shadow1, int shadow2);
369 void draw_colored_box(int x, int y, int w, int h, int down, int highlighted);
370 void draw_check(int x, int y);
371 void draw_triangle_down_flat(int x, int y, int w, int h);
372 void draw_triangle_up(int x, int y, int w, int h,
373 int light1, int light2, int middle, int shadow1, int shadow2);
374 void draw_triangle_down(int x, int y, int w, int h,
375 int light1, int light2, int middle, int shadow1, int shadow2);
376 void draw_triangle_left(int x, int y, int w, int h,
377 int light1, int light2, int middle, int shadow1, int shadow2);
378 void draw_triangle_right(int x, int y, int w, int h,
379 int light1, int light2, int middle, int shadow1, int shadow2);
380 // Set the gc to opaque
381 void set_opaque();
382 void set_inverse();
383 void set_background(VFrame *bitmap);
384 // Change the window title. The title is translated internally.
385 void set_title(char *text);
386 char* get_title();
387 void start_video();
388 void stop_video();
389 int video_is_on();
390 void set_done(int return_value);
391 // Get a bitmap to draw on the window with
392 BC_Bitmap* new_bitmap(int w, int h, int color_model = -1);
393 // Draw a bitmap on the window
394 void draw_bitmap(BC_Bitmap *bitmap,
395 int dont_wait,
396 int dest_x = 0,
397 int dest_y = 0,
398 int dest_w = 0,
399 int dest_h = 0,
400 int src_x = 0,
401 int src_y = 0,
402 int src_w = 0,
403 int src_h = 0,
404 BC_Pixmap *pixmap = 0);
405 void draw_pixel(int x, int y, BC_Pixmap *pixmap = 0);
406 // Draw a pixmap on the window
407 void draw_pixmap(BC_Pixmap *pixmap,
408 int dest_x = 0,
409 int dest_y = 0,
410 int dest_w = -1,
411 int dest_h = -1,
412 int src_x = 0,
413 int src_y = 0,
414 BC_Pixmap *dst = 0);
415 // Draw a vframe on the window
416 void draw_vframe(VFrame *frame,
417 int dest_x = 0,
418 int dest_y = 0,
419 int dest_w = -1,
420 int dest_h = -1,
421 int src_x = 0,
422 int src_y = 0,
423 int src_w = 0,
424 int src_h = 0,
425 BC_Pixmap *pixmap = 0);
426 void draw_border(char *text, int x, int y, int w, int h);
427 // Draw a region of the background
428 void draw_top_background(BC_WindowBase *parent_window, int x, int y, int w, int h, BC_Pixmap *pixmap = 0);
429 void draw_top_tiles(BC_WindowBase *parent_window, int x, int y, int w, int h);
430 void draw_background(int x, int y, int w, int h);
431 void draw_tiles(BC_Pixmap *tile,
432 int origin_x,
433 int origin_y,
434 int x,
435 int y,
436 int w,
437 int h);
438 void slide_left(int distance);
439 void slide_right(int distance);
440 void slide_up(int distance);
441 void slide_down(int distance);
443 int cycle_textboxes(int amount);
445 int raise_window(int do_flush = 1);
446 int set_tooltips(int tooltips_enabled);
447 int resize_window(int w, int h);
448 int reposition_window(int x, int y, int w = -1, int h = -1);
449 // Cause a repeat event to be dispatched every duration.
450 // duration is milliseconds
451 int set_repeat(int64_t duration);
452 // Stop a repeat event from being dispatched.
453 int unset_repeat(int64_t duration);
454 int set_tooltip(char *text);
455 int show_tooltip(int w = -1, int h = -1);
456 int hide_tooltip();
457 int set_icon(VFrame *data);
458 int load_defaults(Defaults *defaults);
459 int save_defaults(Defaults *defaults);
461 #ifdef HAVE_LIBXXF86VM
462 // Mode switch methods.
463 void closest_vm(int *vm, int *width, int *height);
464 void scale_vm(int vm);
465 void restore_vm();
466 #endif
469 int test_keypress;
472 private:
473 // Create a window
474 virtual int create_window(BC_WindowBase *parent_window,
475 char *title,
476 int x,
477 int y,
478 int w,
479 int h,
480 int minw,
481 int minh,
482 int allow_resize,
483 int private_color,
484 int hide,
485 int bg_color,
486 char *display_name,
487 int window_type,
488 BC_Pixmap *bg_pixmap,
489 int group_it);
491 static Display* init_display(char *display_name);
492 virtual int initialize();
493 int get_atoms();
494 void init_cursors();
495 int init_colors();
496 int init_window_shape();
497 static int evaluate_color_model(int client_byte_order, int server_byte_order, int depth);
498 int create_private_colors();
499 int create_color(int color);
500 int create_shared_colors();
501 // Get width of a single line. Used by get_text_width
502 int get_single_text_width(int font, char *text, int length);
503 int allocate_color_table();
504 int init_gc();
505 int init_fonts();
506 int get_color_rgb8(int color);
507 int64_t get_color_rgb16(int color);
508 int64_t get_color_bgr16(int color);
509 int64_t get_color_bgr24(int color);
510 XFontStruct* get_font_struct(int font);
511 #ifdef HAVE_XFT
512 XftFont* get_xft_struct(int font);
513 #endif
514 Cursor get_cursor_struct(int cursor);
515 XFontSet get_fontset(int font);
516 XFontSet get_curr_fontset(void);
517 void set_fontset(int font);
518 int dispatch_event();
520 int get_key_masks(XEvent *event);
522 int trigger_tooltip();
523 int untrigger_tooltip();
524 void draw_tooltip();
525 int arm_repeat(int64_t duration);
526 // delete all repeater opjects for a close
527 int unset_all_repeaters();
529 // Block and get event from common events.
530 XEvent* get_event();
531 // Return number of events in table.
532 int get_event_count();
533 // Put event in common events.
534 void put_event(XEvent *event);
536 // Recursive event dispatchers
537 int dispatch_resize_event(int w, int h);
538 int dispatch_focus_in();
539 int dispatch_focus_out();
540 int dispatch_motion_event();
541 int dispatch_keypress_event();
542 int dispatch_repeat_event(int64_t duration);
543 int dispatch_repeat_event_master(int64_t duration);
544 int dispatch_button_press();
545 int dispatch_button_release();
546 int dispatch_cursor_leave();
547 int dispatch_cursor_enter();
548 int dispatch_translation_event();
549 int dispatch_drag_start();
550 int dispatch_drag_motion();
551 int dispatch_drag_stop();
552 int dispatch_expose_event();
554 // Get the port ID for a color model or return -1 for failure
555 int grab_port_id(BC_WindowBase *window, int color_model);
557 int find_next_textbox(BC_WindowBase **first_textbox, BC_WindowBase **next_textbox, int &result);
558 int find_prev_textbox(BC_WindowBase **last_textbox, BC_WindowBase **prev_textbox, int &result);
562 void translate_coordinates(Window src_w,
563 Window dest_w,
564 int src_x,
565 int src_y,
566 int *dest_x_return,
567 int *dest_y_return);
569 // Top level window above this window
570 BC_WindowBase* top_level;
571 // Window just above this window
572 BC_WindowBase* parent_window;
573 // list of window bases in this window
574 BC_SubWindowList* subwindows;
575 // Position of window
576 int x, y, w, h;
577 // Default colors
578 int light1, light2, medium, dark1, dark2, bg_color;
579 // Type of window defined above
580 int window_type;
581 // Pointer to the active menubar in the window.
582 BC_MenuBar* active_menubar;
583 // pointer to the active popup menu in the window
584 BC_PopupMenu* active_popup_menu;
585 // pointer to the active subwindow
586 BC_WindowBase* active_subwindow;
588 // Window parameters
589 int allow_resize;
590 int hidden, private_color, bits_per_pixel, color_model;
591 int server_byte_order, client_byte_order;
592 // number of colors in color table
593 int total_colors;
594 // last color found in table
595 int current_color_value, current_color_pixel;
596 // table for every color allocated
597 int color_table[256][2];
598 // Turn on optimization
599 int video_on;
600 // Event handler completion
601 int done;
602 // Return value of event handler
603 int return_value;
604 // Motion event compression
605 int motion_events, last_motion_x, last_motion_y;
606 // window of buffered motion
607 Window last_motion_win;
608 // Resize event compression
609 int resize_events, last_resize_w, last_resize_h;
610 int translation_events, last_translate_x, last_translate_y;
611 int prev_x, prev_y;
612 // Since the window manager automatically translates the window at boot,
613 // use the first translation event to get correction factors
614 int translation_count;
615 int x_correction, y_correction;
616 // Key masks
617 int ctrl_mask, shift_mask, alt_mask;
618 // Cursor motion information
619 int cursor_x, cursor_y;
620 // Button status information
621 int button_down, button_number;
622 // When button was pressed and whether it qualifies as a double click
623 uint64_t button_time1, button_time2;
624 int double_click;
625 // Which button is down. 1, 2, 3, 4, 5
626 int button_pressed;
627 // Last key pressed
628 int key_pressed;
629 // During a selection drag involving toggles, set the same value for each toggle
630 int toggle_value;
631 int toggle_drag;
632 // Whether the window has the focus
633 int has_focus;
635 static BC_Resources resources;
636 // Array of repeaters for multiple repeating objects.
637 ArrayList<BC_Repeater*> repeaters;
638 // int64_t next_repeat_id;
639 // Text for tooltip if one exists
640 char tooltip_text[BCTEXTLEN];
641 // If the current window's tooltip is visible
642 int tooltip_on;
643 // Repeat ID of tooltip
644 // int64_t tooltip_id;
645 // Popup window for tooltip
646 BC_Popup *tooltip_popup;
647 // If this subwindow has already shown a tooltip since the last EnterNotify
648 int tooltip_done;
649 // If the tooltip shouldn't be hidden
650 int persistant_tooltip;
654 // Font sets
655 XFontSet largefontset, mediumfontset, smallfontset, curr_fontset;
657 // Fonts
658 int current_font;
659 XFontStruct *largefont, *mediumfont, *smallfont;
661 // Xft
662 // XftDraw *xft_drawable;
663 // XftFont *largefont_xft, *mediumfont_xft, *smallfont_xft;
664 // Must be void so users don't need to include the wrong libpng version.
665 void *xft_drawable;
666 void *largefont_xft, *mediumfont_xft, *smallfont_xft;
669 int64_t current_color;
670 // Coordinate of drag start
671 int drag_x, drag_y;
672 // Boundaries the cursor must pass to start a drag
673 int drag_x1, drag_x2, drag_y1, drag_y2;
674 // Dragging is specific to the subwindow
675 int is_dragging;
676 // Don't delete the background pixmap
677 int shared_bg_pixmap;
678 char title[BCTEXTLEN];
680 // X Window parameters
681 int screen;
682 Window rootwin;
683 // windows previous events happened in
684 Window event_win, drag_win;
685 Visual *vis;
686 Colormap cmap;
687 // Display for all synchronous operations
688 Display *display;
689 // Display to send events on
690 Display *event_display;
691 Window win;
692 Pixmap pixmap;
693 #ifdef HAVE_GL
694 GLXContext gl_context;
695 #endif
696 static Mutex opengl_lock;
697 int window_lock;
698 GC gc;
699 // Depth given by the X Server
700 int default_depth;
701 Atom DelWinXAtom;
702 Atom ProtoXAtom;
703 Atom RepeaterXAtom;
704 Atom SetDoneXAtom;
705 // Cursor before starting an hourglass operation.
706 int prev_cursor;
707 // Number of times start_hourglass was called
708 int hourglass_total;
709 // Cursor set by last set_cursor.
710 int current_cursor;
711 Cursor arrow_cursor;
712 Cursor cross_cursor;
713 Cursor ibeam_cursor;
714 Cursor vseparate_cursor;
715 Cursor hseparate_cursor;
716 Cursor move_cursor;
717 Cursor temp_cursor;
718 Cursor left_cursor;
719 Cursor right_cursor;
720 Cursor upright_arrow_cursor;
721 Cursor upleft_resize_cursor;
722 Cursor upright_resize_cursor;
723 Cursor downleft_resize_cursor;
724 Cursor downright_resize_cursor;
725 Cursor hourglass_cursor;
727 int xvideo_port_id;
728 ArrayList<BC_ResizeCall*> resize_history;
729 // Background tile if tiled
730 BC_Pixmap *bg_pixmap;
731 // Icon
732 BC_Popup *icon_window;
733 BC_Pixmap *icon_pixmap;
734 // Temporary
735 BC_Bitmap *temp_bitmap;
736 // Clipboard
737 BC_Clipboard *clipboard;
738 #ifdef HAVE_LIBXXF86VM
739 // Mode switch information.
740 int vm_switched;
741 XF86VidModeModeInfo orig_modeline;
742 #endif
744 // Common events coming from X server and repeater.
745 ArrayList<XEvent*> common_events;
746 // Locks for common events
747 // Locking order:
748 // 1) event_condition
749 // 2) event_lock
750 Mutex *event_lock;
751 Condition *event_condition;
752 BC_WindowEvents *event_thread;
753 int is_deleting;
758 #endif