]> git.sesse.net Git - vlc/blob - modules/gui/skins/src/skin_common.h
* modules/gui/wxwindows/*: The wxwindows interface is now a "dialogs provider" module...
[vlc] / modules / gui / skins / src / skin_common.h
1 /*****************************************************************************
2  * skin_common.h: Private Skin interface description
3  *****************************************************************************
4  * Copyright (C) 2003 VideoLAN
5  * $Id: skin_common.h,v 1.22 2003/07/17 17:30:40 gbazin Exp $
6  *
7  * Authors: Olivier Teulière <ipkiss@via.ecp.fr>
8  *          Emmanuel Puig    <karibu@via.ecp.fr>
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111,
23  * USA.
24  *****************************************************************************/
25
26
27 #ifndef SKIN_COMMON_H
28 #define SKIN_COMMON_H
29
30 #define SLIDER_RANGE        1048576  // 1024*1024
31 #define DEFAULT_SKIN_FILE   "skins/default.vlt"
32
33 class Theme;
34 class Dialogs;
35 class wxMenu;
36 class wxIcon;
37
38 #ifdef X11_SKINS
39 #include <X11/Xlib.h>
40 #endif
41
42 // For mouse events FIXME: should be elsewhere?
43 #define MOUSE_LEFT (1<<0)
44 #define MOUSE_RIGHT (1<<1)
45 #define KEY_CTRL (1<<2)
46 #define KEY_SHIFT (1<<3)
47
48
49 //---------------------------------------------------------------------------
50 // intf_sys_t: description and status of skin interface
51 //---------------------------------------------------------------------------
52 struct intf_sys_t
53 {
54     // Pointer to the theme main class
55     Theme *p_theme;
56     char *p_new_theme_file;
57
58     // The input thread
59     input_thread_t *p_input;
60
61     // The playlist thread
62     playlist_t *p_playlist;
63
64     // Check if thread is closing
65     int  i_close_status;
66     bool b_all_win_closed;
67
68     // Message bank subscription
69     msg_subscription_t *p_sub;
70
71     // Interface status
72     int i_index;        // Set which file is being played
73     int i_size;         // Size of playlist;
74
75     // Interface dialogs
76     Dialogs *p_dialogs;
77
78     // Send an event to show a dialog
79     void (*pf_showdialog) ( intf_thread_t *p_intf, int i_dialog, int i_arg );
80
81     // Popup menu
82     vlc_bool_t b_popup_change;
83 #if !defined(MODULE_NAME_IS_basic_skins)
84     wxMenu     *p_popup_menu;
85
86     wxIcon      *p_icon;
87 #endif
88
89 #ifdef X11_SKINS
90     Display *display;
91     Window mainWin;    // Window which receives "broadcast" events
92     vlc_mutex_t xlock;
93     Pixmap iconPixmap; // vlc icon
94     Pixmap iconMask;
95 #endif
96
97 #ifdef WIN32
98     // Interface thread id used to post broadcast messages
99     DWORD dwThreadId;
100
101     // We dynamically load msimg32.dll to get a pointer to TransparentBlt()
102     HINSTANCE h_msimg32_dll;
103     BOOL (WINAPI *TransparentBlt)( HDC,int,int,int,int,HDC,int,
104                                    int,int,int,UINT );
105     // Idem for user32.dll and SetLayeredWindowAttributes()
106     HINSTANCE h_user32_dll;
107     BOOL (WINAPI *SetLayeredWindowAttributes)( HWND,COLORREF,BYTE,DWORD );
108 #endif
109
110 };
111
112 #endif