vlc_windows_interfaces.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * vlc_windows_interfaces.h : Replacement for incomplete MinGW headers
00003  ****************************************************************************
00004  *
00005  * Copyright (C) 2009-2010 VideoLAN
00006  *
00007  * Authors: Geoffroy Couprie <geal@videolan.org>
00008  *
00009  * This program is free software; you can redistribute it and/or modify it
00010  * under the terms of the GNU Lesser General Public License as published by
00011  * the Free Software Foundation; either version 2.1 of the License, or
00012  * (at your option) any later version.
00013  *
00014  * This program is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00017  * GNU Lesser General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU Lesser General Public License
00020  * along with this program; if not, write to the Free Software Foundation,
00021  * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
00022  *****************************************************************************/
00023 
00024 #ifndef MINGW_WORKAROUNDS_H
00025 #define MINGW_WORKAROUNDS_H
00026 
00027 #ifdef __MINGW32__
00028 # include <_mingw.h>
00029 #endif
00030 
00031 #ifdef __MINGW64_VERSION_MAJOR /* mingw.org lacks this header */
00032 # include <shobjidl.h>
00033 #endif
00034 
00035 #include <commctrl.h>
00036 #include <basetyps.h>
00037 #include <objbase.h>
00038 
00039 /* rpcndr.h defines small not only for idl */
00040 #undef small
00041 
00042 /* mingw.org fails to define this */
00043 #ifndef __ITaskbarList3_INTERFACE_DEFINED__
00044 #define __ITaskbarList3_INTERFACE_DEFINED__
00045 const GUID CLSID_TaskbarList ={ 0x56FDF344,0xFD6D,0x11d0,{0x95,0x8A,0x00,0x60,0x97,0xC9,0xA0,0x90}};
00046 const GUID IID_ITaskbarList3 = { 0xea1afb91,0x9e28,0x4b86,{0x90,0xe9,0x9e,0x9f,0x8a,0x5e,0xef,0xaf}};
00047 
00048 
00049 typedef enum TBPFLAG
00050 {
00051     TBPF_NOPROGRESS    = 0,
00052     TBPF_INDETERMINATE = 0x1,
00053     TBPF_NORMAL        = 0x2,
00054     TBPF_ERROR         = 0x4,
00055     TBPF_PAUSED        = 0x8
00056 } TBPFLAG;
00057 
00058 typedef struct tagTHUMBBUTTON
00059 {
00060     DWORD dwMask;
00061     UINT iId;
00062     UINT iBitmap;
00063     HICON hIcon;
00064     //    WCHAR pszTip[ 260 ];
00065     wchar_t pszTip[ 260 ];
00066     DWORD dwFlags;
00067 } THUMBBUTTON;
00068 
00069 typedef struct tagTHUMBBUTTON *LPTHUMBBUTTON;
00070 
00071 typedef enum THUMBBUTTONMASK {
00072     THB_BITMAP  = 0x1,
00073     THB_ICON    = 0x2,
00074     THB_TOOLTIP = 0x4,
00075     THB_FLAGS   = 0x8
00076 } THUMBBUTTONMASK;
00077 
00078 typedef enum THUMBBUTTONFLAGS {
00079     THBF_ENABLED        = 0x0,
00080     THBF_DISABLED       = 0x1,
00081     THBF_DISMISSONCLICK = 0x2,
00082     THBF_NOBACKGROUND   = 0x4,
00083     THBF_HIDDEN         = 0x8,
00084     THBF_NONINTERACTIVE = 0x10
00085 } THUMBBUTTONFLAGS;
00086 
00087 #ifdef __cplusplus
00088 interface ITaskbarList : public IUnknown {
00089 public:
00090     virtual HRESULT WINAPI HrInit(void) = 0;
00091     virtual HRESULT WINAPI AddTab(HWND hwnd) = 0;
00092     virtual HRESULT WINAPI DeleteTab(HWND hwnd) = 0;
00093     virtual HRESULT WINAPI ActivateTab(HWND hwnd) = 0;
00094     virtual HRESULT WINAPI SetActiveAlt(HWND hwnd) = 0;
00095 };
00096 
00097 interface ITaskbarList2 : public ITaskbarList {
00098 public:
00099     virtual HRESULT WINAPI MarkFullscreenWindow(HWND hwnd,WINBOOL fFullscreen) = 0;
00100 };
00101 
00102 interface ITaskbarList3 : public ITaskbarList2
00103 {
00104     virtual HRESULT STDMETHODCALLTYPE SetProgressValue(
00105         HWND hwnd,
00106         ULONGLONG ullCompleted,
00107         ULONGLONG ullTotal) = 0;
00108 
00109     virtual HRESULT STDMETHODCALLTYPE SetProgressState(
00110         HWND hwnd,
00111         TBPFLAG tbpFlags) = 0;
00112 
00113     virtual HRESULT STDMETHODCALLTYPE RegisterTab(
00114         HWND hwndTab,
00115         HWND hwndMDI) = 0;
00116 
00117     virtual HRESULT STDMETHODCALLTYPE UnregisterTab(
00118         HWND hwndTab) = 0;
00119 
00120     virtual HRESULT STDMETHODCALLTYPE SetTabOrder(
00121         HWND hwndTab,
00122         HWND hwndInsertBefore) = 0;
00123 
00124     virtual HRESULT STDMETHODCALLTYPE SetTabActive(
00125         HWND hwndTab,
00126         HWND hwndMDI,
00127         DWORD dwReserved) = 0;
00128 
00129     virtual HRESULT STDMETHODCALLTYPE ThumbBarAddButtons(
00130         HWND hwnd,
00131         UINT cButtons,
00132         LPTHUMBBUTTON pButton) = 0;
00133 
00134     virtual HRESULT STDMETHODCALLTYPE ThumbBarUpdateButtons(
00135         HWND hwnd,
00136         UINT cButtons,
00137         LPTHUMBBUTTON pButton) = 0;
00138 
00139     virtual HRESULT STDMETHODCALLTYPE ThumbBarSetImageList(
00140         HWND hwnd,
00141         HIMAGELIST himl) = 0;
00142 
00143     virtual HRESULT STDMETHODCALLTYPE SetOverlayIcon(
00144         HWND hwnd,
00145         HICON hIcon,
00146         LPCWSTR pszDescription) = 0;
00147 
00148     virtual HRESULT STDMETHODCALLTYPE SetThumbnailTooltip(
00149         HWND hwnd,
00150         LPCWSTR pszTip) = 0;
00151 
00152     virtual HRESULT STDMETHODCALLTYPE SetThumbnailClip(
00153         HWND hwnd,
00154         RECT *prcClip) = 0;
00155 
00156 };
00157 
00158 #else /* !__cplusplus */
00159 
00160 struct ITaskbarList3Vtbl;
00161 struct ITaskbarList3 { struct ITaskbarList3Vtbl* lpVtbl; };
00162 typedef struct ITaskbarList3 ITaskbarList3;
00163 
00164 struct ITaskbarList3Vtbl
00165 {
00166 
00167     long ( WINAPI *QueryInterface )(ITaskbarList3 * This, REFIID riid, void **ppvObject);
00168 
00169     long ( WINAPI *AddRef )(ITaskbarList3 *This);
00170 
00171     long ( WINAPI *Release )(ITaskbarList3 *This);
00172 
00173     long ( WINAPI *HrInit )(ITaskbarList3 *This);
00174 
00175     long ( WINAPI *AddTab )(ITaskbarList3 *This, HWND hwnd);
00176 
00177     long ( WINAPI *DeleteTab )(ITaskbarList3 *This, HWND hwnd);
00178 
00179     long ( WINAPI *ActivateTab )(ITaskbarList3 *This, HWND hwnd);
00180 
00181     long ( WINAPI *SetActiveAlt )(ITaskbarList3 *This, HWND hwnd);
00182 
00183     long ( WINAPI *MarkFullscreenWindow )(ITaskbarList3 *This, HWND hwnd,
00184         BOOL fFullscreen);
00185 
00186     long ( WINAPI *SetProgressValue )(ITaskbarList3 *This, HWND hwnd,
00187         ULONGLONG ullCompleted, ULONGLONG ullTotal);
00188 
00189     long ( WINAPI *SetProgressState )(ITaskbarList3 *This, HWND hwnd,
00190         TBPFLAG tbpFlags);
00191 
00192     long ( WINAPI *RegisterTab )( ITaskbarList3 *This, HWND hwndTab, HWND hwndMDI);
00193 
00194     long ( WINAPI *UnregisterTab )(ITaskbarList3 *This, HWND hwndTab);
00195 
00196     long ( WINAPI *SetTabOrder )(ITaskbarList3 *This, HWND hwndTab,
00197         HWND hwndInsertBefore);
00198 
00199     long ( WINAPI *SetTabActive )(ITaskbarList3 *This, HWND hwndTab,
00200         HWND hwndMDI, DWORD dwReserved);
00201 
00202     long ( WINAPI *ThumbBarAddButtons )(ITaskbarList3 *This, HWND hwnd,
00203         UINT cButtons, LPTHUMBBUTTON pButton);
00204 
00205     long ( WINAPI *ThumbBarUpdateButtons )(ITaskbarList3 *This, HWND hwnd,
00206         UINT cButtons, LPTHUMBBUTTON pButton);
00207 
00208     long ( WINAPI *ThumbBarSetImageList )(ITaskbarList3 *This, HWND hwnd,
00209         HIMAGELIST himl);
00210 
00211     long ( WINAPI *SetOverlayIcon )(ITaskbarList3 *This, HWND hwnd,
00212         HICON hIcon, LPCWSTR pszDescription);
00213 
00214     long ( WINAPI *SetThumbnailTooltip )(ITaskbarList3 *This, HWND hwnd,
00215         LPCWSTR pszTip);
00216 
00217     long ( WINAPI *SetThumbnailClip )(ITaskbarList3 *This, HWND hwnd,
00218         RECT *prcClip);
00219 
00220 };
00221 
00222 #endif /* __cplusplus */
00223 #endif /* __ITaskbarList3_INTERFACE_DEFINED__ */
00224 
00225 /* mingw-w64 also fails to define these as of 2.0.1 */
00226 
00227 #ifndef THBN_CLICKED
00228 # define THBN_CLICKED        0x1800
00229 #endif
00230 
00231 #ifndef __IApplicationAssociationRegistrationUI_INTERFACE_DEFINED__
00232 #define __IApplicationAssociationRegistrationUI_INTERFACE_DEFINED__
00233 const GUID IID_IApplicationAssociationRegistrationUI = {0x1f76a169,0xf994,0x40ac, {0x8f,0xc8,0x09,0x59,0xe8,0x87,0x47,0x10}};
00234 const GUID CLSID_ApplicationAssociationRegistrationUI = { 0x1968106d,0xf3b5,0x44cf,{0x89,0x0e,0x11,0x6f,0xcb,0x9e,0xce,0xf1}};
00235 #ifdef __cplusplus
00236 
00237 interface IApplicationAssociationRegistrationUI : public IUnknown
00238 {
00239     virtual HRESULT STDMETHODCALLTYPE LaunchAdvancedAssociationUI(
00240         LPCWSTR pszAppRegName) = 0;
00241 };
00242 #endif /* __cplusplus */
00243 #endif /* __IApplicationAssociationRegistrationUI_INTERFACE_DEFINED__ */
00244 
00245 #endif //MINGW_WORKAROUNDS_H
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines