]> git.sesse.net Git - vlc/blob - modules/gui/skins/x11/x11_theme.h
60fdc36bbac5ab90ac8e28ac36ce9a3fb0d6758e
[vlc] / modules / gui / skins / x11 / x11_theme.h
1 /*****************************************************************************
2  * x11_theme.h: X11 implementation of the Theme class
3  *****************************************************************************
4  * Copyright (C) 2003 VideoLAN
5  * $Id: x11_theme.h,v 1.3 2003/06/01 22:11:24 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_THEME
27 #define VLC_SKIN_X11_THEME
28
29 //--- GENERAL ---------------------------------------------------------------
30 #include <string>
31 using namespace std;
32
33 //--- X11 -------------------------------------------------------------------
34 #include <X11/Xlib.h>
35
36 // macros to make X calls thread safe
37 extern intf_thread_t *g_pIntf;
38 #define XLOCK vlc_mutex_lock( &g_pIntf->p_sys->xlock )
39 #define XUNLOCK vlc_mutex_unlock( &g_pIntf->p_sys->xlock )
40
41
42 //---------------------------------------------------------------------------
43 struct intf_thread_t;
44 class SkinWindow;
45 class EventBank;
46 class BitmapBank;
47 class FontBank;
48
49
50 //---------------------------------------------------------------------------
51 class X11Theme : public Theme
52 {
53     protected:
54         intf_thread_t *p_intf;
55         // Handles
56         Display *display;
57 /*
58         // System tray icon
59         NOTIFYICONDATA TrayIcon;
60         HMENU SysMenu;
61 */
62     public:
63         // Constructor
64         X11Theme( intf_thread_t *_p_intf );
65         virtual void OnLoadTheme();
66
67         // Destructor
68         virtual ~X11Theme();
69
70         // Specific methods
71         Display * GetDisplay()   { return display; }
72
73         // !!!
74         virtual void AddWindow( string name, int x, int y, bool visible,
75             int fadetime, int alpha, int movealpha, bool dragdrop );
76         virtual void ChangeClientWindowName( string name );
77
78         // Taskbar && system tray
79         virtual void AddSystemMenu( string name, Event *event );
80         virtual void ChangeTray();
81         virtual void ChangeTaskbar();
82 //        HMENU GetSysMenu() { return SysMenu; }
83 };
84 //---------------------------------------------------------------------------
85
86
87 #endif
88