2 Copyright (C) 2009 Red Hat, Inc.
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
14 You should have received a copy of the GNU Lesser General Public
15 License along with this library; if not, see <http://www.gnu.org/licenses/>.
18 #ifndef _H_RED_WINDOW_P
19 #define _H_RED_WINDOW_P
24 #include <X11/Xdefs.h>
29 typedef GLXContext RedGlContext;
30 typedef GLXPbuffer RedPbuffer;
35 struct PixelsSource_p;
41 void migrate(RedWindow& red_window, PixelsSource_p& pix_source, int dest_screen);
42 void create(RedWindow& red_window, PixelsSource_p& pix_source,
43 int x, int y, int in_screen);
44 void destroy(RedWindow& red_window, PixelsSource_p& pix_source);
45 void set_minmax(PixelsSource_p& pix_source);
46 void wait_for_reparent();
48 void wait_for_unmap();
49 void sync(bool shadowed = false);
50 void set_visibale(bool vis) { _visibale = vis;}
51 void move_to_current_desktop();
52 Window get_window() {return _win;}
54 static void win_proc(XEvent& event);
55 static Cursor create_invisible_cursor(Window window);
58 void set_glx(int width, int height);
60 static void handle_key_press_event(RedWindow& red_window, XKeyEvent* event);
65 Cursor _invisible_cursor;
71 GLXContext _glcont_copy;
76 bool _shadow_foucs_state;
77 XEvent _shadow_focus_event;
78 bool _pointer_in_window;
80 bool _shadow_pointer_state;
81 XEvent _shadow_pointer_event;
83 RedWindow *_red_window;
86 Time _last_event_time;