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