]> git.sesse.net Git - vlc/blob - modules/gui/skins/x11/x11_window.h
* AT LAST events work in X11 skins !
[vlc] / modules / gui / skins / x11 / x11_window.h
1 /*****************************************************************************
2  * x11_window.h: X11 implementation of the Window class
3  *****************************************************************************
4  * Copyright (C) 2003 VideoLAN
5  * $Id: x11_window.h,v 1.2 2003/05/13 20:36:29 asmax Exp $
6  *
7  * Authors: Cyril Deguet     <asmax@videolan.org>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111,
22  * USA.
23  *****************************************************************************/
24
25
26 #ifndef VLC_SKIN_X11_WIN
27 #define VLC_SKIN_X11_WIN
28
29 //--- X11 -------------------------------------------------------------------
30 #include <X11/Xlib.h>
31
32 //---------------------------------------------------------------------------
33 class Graphics;
34 class Event;
35
36 //---------------------------------------------------------------------------
37 class X11Window : public SkinWindow
38 {
39     private:
40         // General parameters
41         Window Wnd;
42         Display *display;
43         GC Gc;
44         int CursorX;
45         int CursorY;
46         int WindowX;
47         int WindowY;
48         string Name;
49
50         // Drag&Drop
51         X11DropObject *DropObject;
52
53         // Tooltip texts
54         Window ToolTipWindow;
55 //        TOOLINFO ToolTipInfo;
56
57         // Left button down
58         bool LButtonDown;
59         bool RButtonDown;
60
61     public:
62         // Cosntructors
63         X11Window( intf_thread_t *_p_intf, Window wnd, int x, int y,
64             bool visible, int transition, int normalalpha, int movealpha,
65             bool dragdrop, string name );
66
67         // Destructors
68         virtual ~X11Window();
69
70         // Event processing
71         virtual bool ProcessOSEvent( Event *evt );
72
73         // Window graphic aspect
74         virtual void OSShow( bool show );
75         virtual void RefreshFromImage( int x, int y, int w, int h );
76         virtual void SetTransparency( int Value = -1 );
77         virtual void WindowManualMove();
78         virtual void WindowManualMoveInit();
79
80         // Window methods
81         virtual void Move( int left, int top );
82         virtual void Size( int width, int height );
83
84         // Specific X11 methods
85         Window GetHandle() { return Wnd; };
86
87         // Tooltip texts
88         virtual void ChangeToolTipText( string text );
89
90         // Getters
91         string GetName() { return Name; }
92 };
93 //---------------------------------------------------------------------------
94
95 #endif