VLC  2.1.0-git
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
vlc_windows_interfaces.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * vlc_windows_interfaces.h : Replacement for incomplete MinGW headers
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 it
10  * under the terms of the GNU Lesser General Public License as published by
11  * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public License
20  * along with this program; if not, write to the Free Software Foundation,
21  * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22  *****************************************************************************/
23 
24 #ifndef MINGW_WORKAROUNDS_H
25 #define MINGW_WORKAROUNDS_H
26 
27 #ifdef __MINGW32__
28 # include <_mingw.h>
29 #endif
30 
31 #ifdef __MINGW64_VERSION_MAJOR /* mingw.org lacks this header */
32 # include <shobjidl.h>
33 #endif
34 
35 #include <commctrl.h>
36 #include <basetyps.h>
37 #include <objbase.h>
38 
39 /* rpcndr.h defines small not only for idl */
40 #undef small
41 
42 /* mingw.org fails to define this */
43 #ifndef __ITaskbarList3_INTERFACE_DEFINED__
44 #define __ITaskbarList3_INTERFACE_DEFINED__
45 const GUID CLSID_TaskbarList ={ 0x56FDF344,0xFD6D,0x11d0,{0x95,0x8A,0x00,0x60,0x97,0xC9,0xA0,0x90}};
46 const GUID IID_ITaskbarList3 = { 0xea1afb91,0x9e28,0x4b86,{0x90,0xe9,0x9e,0x9f,0x8a,0x5e,0xef,0xaf}};
47 
48 
49 typedef enum TBPFLAG
50 {
51  TBPF_NOPROGRESS = 0,
53  TBPF_NORMAL = 0x2,
54  TBPF_ERROR = 0x4,
57 
58 typedef struct tagTHUMBBUTTON
59 {
60  DWORD dwMask;
61  UINT iId;
62  UINT iBitmap;
63  HICON hIcon;
64  // WCHAR pszTip[ 260 ];
65  wchar_t pszTip[ 260 ];
66  DWORD dwFlags;
68 
69 typedef struct tagTHUMBBUTTON *LPTHUMBBUTTON;
70 
71 typedef enum THUMBBUTTONMASK {
72  THB_BITMAP = 0x1,
73  THB_ICON = 0x2,
74  THB_TOOLTIP = 0x4,
75  THB_FLAGS = 0x8
77 
78 typedef enum THUMBBUTTONFLAGS {
79  THBF_ENABLED = 0x0,
83  THBF_HIDDEN = 0x8,
86 
87 #ifdef __cplusplus
88 interface ITaskbarList : public IUnknown {
89 public:
90  virtual HRESULT WINAPI HrInit(void) = 0;
91  virtual HRESULT WINAPI AddTab(HWND hwnd) = 0;
92  virtual HRESULT WINAPI DeleteTab(HWND hwnd) = 0;
93  virtual HRESULT WINAPI ActivateTab(HWND hwnd) = 0;
94  virtual HRESULT WINAPI SetActiveAlt(HWND hwnd) = 0;
95 };
96 
97 interface ITaskbarList2 : public ITaskbarList {
98 public:
99  virtual HRESULT WINAPI MarkFullscreenWindow(HWND hwnd,WINBOOL fFullscreen) = 0;
100 };
101 
102 interface ITaskbarList3 : public ITaskbarList2
103 {
104  virtual HRESULT STDMETHODCALLTYPE SetProgressValue(
105  HWND hwnd,
106  ULONGLONG ullCompleted,
107  ULONGLONG ullTotal) = 0;
108 
109  virtual HRESULT STDMETHODCALLTYPE SetProgressState(
110  HWND hwnd,
111  TBPFLAG tbpFlags) = 0;
112 
113  virtual HRESULT STDMETHODCALLTYPE RegisterTab(
114  HWND hwndTab,
115  HWND hwndMDI) = 0;
116 
117  virtual HRESULT STDMETHODCALLTYPE UnregisterTab(
118  HWND hwndTab) = 0;
119 
120  virtual HRESULT STDMETHODCALLTYPE SetTabOrder(
121  HWND hwndTab,
122  HWND hwndInsertBefore) = 0;
123 
124  virtual HRESULT STDMETHODCALLTYPE SetTabActive(
125  HWND hwndTab,
126  HWND hwndMDI,
127  DWORD dwReserved) = 0;
128 
129  virtual HRESULT STDMETHODCALLTYPE ThumbBarAddButtons(
130  HWND hwnd,
131  UINT cButtons,
132  LPTHUMBBUTTON pButton) = 0;
133 
134  virtual HRESULT STDMETHODCALLTYPE ThumbBarUpdateButtons(
135  HWND hwnd,
136  UINT cButtons,
137  LPTHUMBBUTTON pButton) = 0;
138 
139  virtual HRESULT STDMETHODCALLTYPE ThumbBarSetImageList(
140  HWND hwnd,
141  HIMAGELIST himl) = 0;
142 
143  virtual HRESULT STDMETHODCALLTYPE SetOverlayIcon(
144  HWND hwnd,
145  HICON hIcon,
146  LPCWSTR pszDescription) = 0;
147 
148  virtual HRESULT STDMETHODCALLTYPE SetThumbnailTooltip(
149  HWND hwnd,
150  LPCWSTR pszTip) = 0;
151 
152  virtual HRESULT STDMETHODCALLTYPE SetThumbnailClip(
153  HWND hwnd,
154  RECT *prcClip) = 0;
155 
156 };
157 
158 #else /* !__cplusplus */
159 
160 struct ITaskbarList3Vtbl;
161 struct ITaskbarList3 { struct ITaskbarList3Vtbl* lpVtbl; };
164 struct ITaskbarList3Vtbl
165 {
166 
167  long ( WINAPI *QueryInterface )(ITaskbarList3 * This, REFIID riid, void **ppvObject);
169  long ( WINAPI *AddRef )(ITaskbarList3 *This);
170 
171  long ( WINAPI *Release )(ITaskbarList3 *This);
172 
173  long ( WINAPI *HrInit )(ITaskbarList3 *This);
174 
175  long ( WINAPI *AddTab )(ITaskbarList3 *This, HWND hwnd);
177  long ( WINAPI *DeleteTab )(ITaskbarList3 *This, HWND hwnd);
178 
179  long ( WINAPI *ActivateTab )(ITaskbarList3 *This, HWND hwnd);
180 
181  long ( WINAPI *SetActiveAlt )(ITaskbarList3 *This, HWND hwnd);
182 
183  long ( WINAPI *MarkFullscreenWindow )(ITaskbarList3 *This, HWND hwnd,
184  BOOL fFullscreen);
185 
186  long ( WINAPI *SetProgressValue )(ITaskbarList3 *This, HWND hwnd,
187  ULONGLONG ullCompleted, ULONGLONG ullTotal);
188 
189  long ( WINAPI *SetProgressState )(ITaskbarList3 *This, HWND hwnd,
191 
192  long ( WINAPI *RegisterTab )( ITaskbarList3 *This, HWND hwndTab, HWND hwndMDI);
194  long ( WINAPI *UnregisterTab )(ITaskbarList3 *This, HWND hwndTab);
195 
196  long ( WINAPI *SetTabOrder )(ITaskbarList3 *This, HWND hwndTab,
198 
199  long ( WINAPI *SetTabActive )(ITaskbarList3 *This, HWND hwndTab,
200  HWND hwndMDI, DWORD dwReserved);
201 
202  long ( WINAPI *ThumbBarAddButtons )(ITaskbarList3 *This, HWND hwnd,
203  UINT cButtons, LPTHUMBBUTTON pButton);
204 
205  long ( WINAPI *ThumbBarUpdateButtons )(ITaskbarList3 *This, HWND hwnd,
206  UINT cButtons, LPTHUMBBUTTON pButton);
207 
208  long ( WINAPI *ThumbBarSetImageList )(ITaskbarList3 *This, HWND hwnd,
209  HIMAGELIST himl);
210 
211  long ( WINAPI *SetOverlayIcon )(ITaskbarList3 *This, HWND hwnd,
212  HICON hIcon, LPCWSTR pszDescription);
213 
214  long ( WINAPI *SetThumbnailTooltip )(ITaskbarList3 *This, HWND hwnd,
215  LPCWSTR pszTip);
216 
217  long ( WINAPI *SetThumbnailClip )(ITaskbarList3 *This, HWND hwnd,
218  RECT *prcClip);
219 
220 };
221 
222 #endif /* __cplusplus */
223 #endif /* __ITaskbarList3_INTERFACE_DEFINED__ */
224 
225 /* mingw-w64 also fails to define these as of 2.0.1 */
226 
227 #ifndef THBN_CLICKED
228 # define THBN_CLICKED 0x1800
229 #endif
230 
231 #ifndef __IApplicationAssociationRegistrationUI_INTERFACE_DEFINED__
232 #define __IApplicationAssociationRegistrationUI_INTERFACE_DEFINED__
233 const GUID IID_IApplicationAssociationRegistrationUI = {0x1f76a169,0xf994,0x40ac, {0x8f,0xc8,0x09,0x59,0xe8,0x87,0x47,0x10}};
234 const GUID CLSID_ApplicationAssociationRegistrationUI = { 0x1968106d,0xf3b5,0x44cf,{0x89,0x0e,0x11,0x6f,0xcb,0x9e,0xce,0xf1}};
235 #ifdef __cplusplus
236 
237 interface IApplicationAssociationRegistrationUI : public IUnknown
238 {
239  virtual HRESULT STDMETHODCALLTYPE LaunchAdvancedAssociationUI(
240  LPCWSTR pszAppRegName) = 0;
241 };
242 #endif /* __cplusplus */
243 #endif /* __IApplicationAssociationRegistrationUI_INTERFACE_DEFINED__ */
244 
245 #endif //MINGW_WORKAROUNDS_H