]> git.sesse.net Git - vlc/blob - include/vlc_windows_interfaces.h
Win32: don't redeclare definitions
[vlc] / include / vlc_windows_interfaces.h
1 /*****************************************************************************
2  * vlc_windows_interfaces.h : Vista/7 helpers
3  ****************************************************************************
4  *
5  * Copyright (C) 2009-2010 VideoLAN
6  *
7  * Authors: Geoffroy Couprie <geal@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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22  *****************************************************************************/
23
24 #ifndef VISTAASSOC_H
25 #define VISTAASSOC_H
26
27 #include <commctrl.h>
28
29 #ifndef STDCALL
30 #define STDCALL
31 #endif
32
33 #define CLSCTX_INPROC_SERVER 1
34 typedef GUID IID;
35 #ifndef _REFIID_DEFINED
36 # define REFIID const IID* const
37 #endif
38
39 const GUID clsid_IApplication2 = { 0x1968106d,0xf3b5,0x44cf,{0x89,0x0e,0x11,0x6f,0xcb,0x9e,0xce,0xf1}};
40 const GUID IID_IApplicationAssociationRegistrationUI = {0x1f76a169,0xf994,0x40ac, {0x8f,0xc8,0x09,0x59,0xe8,0x87,0x47,0x10}};
41
42 const GUID clsid_ITaskbarList ={ 0x56FDF344,0xFD6D,0x11d0,{0x95,0x8A,0x00,0x60,0x97,0xC9,0xA0,0x90}};
43 const GUID IID_ITaskbarList3 = { 0xea1afb91,0x9e28,0x4b86,{0x90,0xe9,0x9e,0x9f,0x8a,0x5e,0xef,0xaf}};
44 #ifndef __IUnknown_INTERFACE_DEFINED__
45 #undef IUnknown
46 typedef struct _IUnknown IUnknown;
47 #endif
48 typedef struct _IApplicationAssociationRegistrationUI IApplicationAssociationRegistrationUI;
49 typedef struct _ITaskbarList3 ITaskbarList3;
50
51 typedef struct IUnknown_vt
52 {
53     long (STDCALL *QueryInterface)(IUnknown *This, const GUID *riid,
54                                    void **ppvObject);
55     long (STDCALL *AddRef)(IUnknown *This);
56     long (STDCALL *Release)(IUnknown *This);
57
58 } IUnknown_vt;
59 struct _IUnknown { IUnknown_vt* vt; };
60 #ifndef __IUnknown_INTERFACE_DEFINED__
61 typedef IUnknown *LPUNKNOWN;
62 #endif
63 typedef struct IApplicationAssociationRegistrationUI_vt
64 {
65     /* IUnknown methods */
66     long (STDCALL *QueryInterface)(IUnknown *This, const GUID *riid,
67                                    void **ppvObject);
68     long (STDCALL *AddRef)(IUnknown *This);
69     long (STDCALL *Release)(IUnknown *This);
70     long (STDCALL *LaunchAdvancedAssociationUI)(IApplicationAssociationRegistrationUI *This, LPCWSTR app);
71 } IApplicationAssociationRegistrationUI_vt;
72 struct _IApplicationAssociationRegistrationUI { IApplicationAssociationRegistrationUI_vt* vt; };
73 typedef IApplicationAssociationRegistrationUI *LPAPPASSOCREGUI, *PAPPASSOCREGUI;
74
75 typedef enum TBPFLAG
76 {
77     TBPF_NOPROGRESS    = 0,
78     TBPF_INDETERMINATE = 0x1,
79     TBPF_NORMAL        = 0x2,
80     TBPF_ERROR         = 0x4,
81     TBPF_PAUSED        = 0x8
82 } TBPFLAG;
83
84 typedef enum TBATFLAG
85 {
86     TBATF_USEMDITHUMBNAIL   = 0x1,
87     TBATF_USEMDILIVEPREVIEW = 0x2
88 } TBATFLAG;
89
90 typedef struct tagTHUMBBUTTON
91 {
92     DWORD dwMask;
93     UINT iId;
94     UINT iBitmap;
95     HICON hIcon;
96     //    WCHAR pszTip[ 260 ];
97     wchar_t pszTip[ 260 ];
98     DWORD dwFlags;
99 } THUMBBUTTON;
100
101 typedef struct tagTHUMBBUTTON *LPTHUMBBUTTON;
102
103 // THUMBBUTTON flags
104 #define THBF_ENABLED             0x0000
105 #define THBF_DISABLED            0x0001
106 #define THBF_DISMISSONCLICK      0x0002
107 #define THBF_NOBACKGROUND        0x0004
108 #define THBF_HIDDEN              0x0008
109
110 // THUMBBUTTON mask
111 #define THB_BITMAP          0x0001
112 #define THB_ICON            0x0002
113 #define THB_TOOLTIP         0x0004
114 #define THB_FLAGS           0x0008
115 #define THBN_CLICKED        0x1800
116
117 typedef struct ITaskbarList3Vtbl
118 {
119
120     long ( STDCALL *QueryInterface )(ITaskbarList3 * This, REFIID riid, void **ppvObject);
121
122     long ( STDCALL *AddRef )( ITaskbarList3 * This);
123
124     long ( STDCALL *Release )( ITaskbarList3 * This);
125
126     long ( STDCALL *HrInit )( ITaskbarList3 * This);
127
128     long ( STDCALL *AddTab )( ITaskbarList3 * This, HWND hwnd);
129
130     long ( STDCALL *DeleteTab )( ITaskbarList3 * This, HWND hwnd);
131
132     long ( STDCALL *ActivateTab )( ITaskbarList3 * This, HWND hwnd);
133
134     long ( STDCALL *SetActiveAlt )( ITaskbarList3 * This, HWND hwnd);
135
136     long ( STDCALL *MarkFullscreenWindow )( ITaskbarList3 * This, HWND hwnd,
137         BOOL fFullscreen);
138
139     long ( STDCALL *SetProgressValue )( ITaskbarList3 * This, HWND hwnd,
140         ULONGLONG ullCompleted, ULONGLONG ullTotal);
141
142     long ( STDCALL *SetProgressState )( ITaskbarList3 * This, HWND hwnd,
143         TBPFLAG tbpFlags);
144
145     long ( STDCALL *RegisterTab )(  ITaskbarList3 * This, HWND hwndTab, HWND hwndMDI);
146
147     long ( STDCALL *UnregisterTab )( ITaskbarList3 * This, HWND hwndTab);
148
149     long ( STDCALL *SetTabOrder )( ITaskbarList3 * This, HWND hwndTab,
150         HWND hwndInsertBefore);
151
152     long ( STDCALL *SetTabActive )( ITaskbarList3 * This, HWND hwndTab,
153         HWND hwndMDI, TBATFLAG tbatFlags);
154
155     long ( STDCALL *ThumbBarAddButtons )( ITaskbarList3 * This, HWND hwnd,
156         UINT cButtons, LPTHUMBBUTTON pButton);
157
158     long ( STDCALL *ThumbBarUpdateButtons )( ITaskbarList3 * This, HWND hwnd,
159         UINT cButtons, LPTHUMBBUTTON pButton);
160
161     long ( STDCALL *ThumbBarSetImageList )( ITaskbarList3 * This, HWND hwnd,
162         HIMAGELIST himl);
163
164     long ( STDCALL *SetOverlayIcon )( ITaskbarList3 * This, HWND hwnd,
165         HICON hIcon, LPCWSTR pszDescription);
166
167     long ( STDCALL *SetThumbnailTooltip )( ITaskbarList3 * This, HWND hwnd,
168         LPCWSTR pszTip);
169
170     long ( STDCALL *SetThumbnailClip )( ITaskbarList3 * This, HWND hwnd,
171         RECT *prcClip);
172
173 } ITaskbarList3Vtbl;
174
175 struct _ITaskbarList3 { ITaskbarList3Vtbl* vt; };
176 typedef ITaskbarList3 *LPTASKBARLIST3, *PTASKBARLIST3;
177
178
179 #ifdef __cplusplus
180 extern "C" {
181 #endif
182     HRESULT WINAPI CoCreateInstance(const GUID *,LPUNKNOWN,DWORD,REFIID,PVOID*);
183     HRESULT WINAPI CoInitialize(PVOID);
184     void WINAPI CoUninitialize(void);
185 #ifdef __cplusplus
186 };
187 #endif
188
189 #endif //VISTAASSOC_H