ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

taskbar/win32/mingw-compat.h

Go to the documentation of this file.
00001 /* ScummVM - Graphic Adventure Engine
00002  *
00003  * ScummVM is the legal property of its developers, whose names
00004  * are too numerous to list here. Please refer to the COPYRIGHT
00005  * file distributed with this source distribution.
00006  *
00007  * This program is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU General Public License
00009  * as published by the Free Software Foundation; either version 2
00010  * of the License, or (at your option) any later version.
00011  *
00012  * This program is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU General Public License
00018  * along with this program; if not, write to the Free Software
00019  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00020  *
00021  */
00022 
00023 // TODO: Remove header when the latest changes to the Windows SDK have been integrated into MingW
00024 //       For reference, the interface definitions here are imported the SDK headers and from the
00025 //       EcWin7 project (https://code.google.com/p/dukto/)
00026 
00027 #ifndef BACKEND_WIN32_TASKBAR_MINGW_H
00028 #define BACKEND_WIN32_TASKBAR_MINGW_H
00029 
00030 #if defined(WIN32)
00031 #if defined(__GNUC__)
00032 #ifdef __MINGW32__
00033 
00034 #ifdef _WIN32_WINNT
00035     #undef _WIN32_WINNT
00036 #endif
00037 #define _WIN32_WINNT 0x0501
00038 #include <windows.h>
00039 #include <commctrl.h>
00040 #include <initguid.h>
00041 #include <shlwapi.h>
00042 #include <shlguid.h>
00043 #define CMIC_MASK_ASYNCOK SEE_MASK_ASYNCOK
00044 
00045 extern const GUID CLSID_ShellLink;
00046 
00047 // Shard enumeration value
00048 #define SHARD_LINK 0x00000006
00049 
00050 // Taskbar GUID definitions
00051 DEFINE_GUID(CLSID_TaskbarList,0x56fdf344,0xfd6d,0x11d0,0x95,0x8a,0x0,0x60,0x97,0xc9,0xa0,0x90);
00052 DEFINE_GUID(IID_ITaskbarList3,0xea1afb91,0x9e28,0x4b86,0x90,0xE9,0x9e,0x9f,0x8a,0x5e,0xef,0xaf);
00053 DEFINE_GUID(IID_IPropertyStore,0x886d8eeb,0x8cf2,0x4446,0x8d,0x02,0xcd,0xba,0x1d,0xbd,0xcf,0x99);
00054 
00055 // Property key
00056 typedef struct _tagpropertykey {
00057     GUID fmtid;
00058     DWORD pid;
00059 } PROPERTYKEY;
00060 
00061 #define REFPROPERTYKEY const PROPERTYKEY &
00062 
00063 typedef struct tagPROPVARIANT PROPVARIANT;
00064 #define REFPROPVARIANT const PROPVARIANT &
00065 
00066 // Property store
00067 DECLARE_INTERFACE_(IPropertyStore, IUnknown) {
00068     STDMETHOD (GetCount) (DWORD *cProps) PURE;
00069     STDMETHOD (GetAt) (DWORD iProp, PROPERTYKEY *pkey) PURE;
00070     STDMETHOD (GetValue) (REFPROPERTYKEY key, PROPVARIANT *pv) PURE;
00071     STDMETHOD (SetValue) (REFPROPERTYKEY key, REFPROPVARIANT propvar) PURE;
00072     STDMETHOD (Commit) (void) PURE;
00073 
00074 private:
00075     ~IPropertyStore();
00076 };
00077 typedef IPropertyStore *LPIPropertyStore;
00078 
00079 // Mingw-specific defines for taskbar integration
00080 typedef enum THUMBBUTTONMASK {
00081     THB_BITMAP = 0x1,
00082     THB_ICON = 0x2,
00083     THB_TOOLTIP = 0x4,
00084     THB_FLAGS = 0x8
00085 } THUMBBUTTONMASK;
00086 
00087 typedef enum THUMBBUTTONFLAGS {
00088     THBF_ENABLED = 0,
00089     THBF_DISABLED = 0x1,
00090     THBF_DISMISSONCLICK = 0x2,
00091     THBF_NOBACKGROUND = 0x4,
00092     THBF_HIDDEN = 0x8,
00093     THBF_NONINTERACTIVE = 0x10
00094 } THUMBBUTTONFLAGS;
00095 
00096 typedef struct THUMBBUTTON {
00097     THUMBBUTTONMASK dwMask;
00098     UINT iId;
00099     UINT iBitmap;
00100     HICON hIcon;
00101     WCHAR szTip[260];
00102     THUMBBUTTONFLAGS dwFlags;
00103 } THUMBBUTTON;
00104 typedef struct THUMBBUTTON *LPTHUMBBUTTON;
00105 
00106 typedef enum TBPFLAG {
00107     TBPF_NOPROGRESS = 0,
00108     TBPF_INDETERMINATE = 0x1,
00109     TBPF_NORMAL = 0x2,
00110     TBPF_ERROR = 0x4,
00111     TBPF_PAUSED = 0x8
00112 } TBPFLAG;
00113 
00114 // Taskbar interface
00115 DECLARE_INTERFACE_(ITaskbarList3, IUnknown) {
00116     // IUnknown
00117     STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
00118     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
00119     STDMETHOD_(ULONG,Release) (THIS) PURE;
00120     // ITaskbarList
00121     STDMETHOD(HrInit) (THIS) PURE;
00122     STDMETHOD(AddTab) (THIS_ HWND hwnd) PURE;
00123     STDMETHOD(DeleteTab) (THIS_ HWND hwnd) PURE;
00124     STDMETHOD(ActivateTab) (THIS_ HWND hwnd) PURE;
00125     STDMETHOD(SetActiveAlt) (THIS_ HWND hwnd) PURE;
00126     STDMETHOD (MarkFullscreenWindow) (THIS_ HWND hwnd, int fFullscreen) PURE;
00127     // ITaskbarList3
00128     STDMETHOD (SetProgressValue) (THIS_ HWND hwnd, ULONGLONG ullCompleted, ULONGLONG ullTotal) PURE;
00129     STDMETHOD (SetProgressState) (THIS_ HWND hwnd, TBPFLAG tbpFlags) PURE;
00130     STDMETHOD (RegisterTab) (THIS_ HWND hwndTab, HWND hwndMDI) PURE;
00131     STDMETHOD (UnregisterTab) (THIS_ HWND hwndTab) PURE;
00132     STDMETHOD (SetTabOrder) (THIS_ HWND hwndTab, HWND hwndInsertBefore) PURE;
00133     STDMETHOD (SetTabActive) (THIS_ HWND hwndTab, HWND hwndMDI, DWORD dwReserved) PURE;
00134     STDMETHOD (ThumbBarAddButtons) (THIS_ HWND hwnd, UINT cButtons, LPTHUMBBUTTON pButton) PURE;
00135     STDMETHOD (ThumbBarUpdateButtons) (THIS_ HWND hwnd, UINT cButtons, LPTHUMBBUTTON pButton) PURE;
00136     STDMETHOD (ThumbBarSetImageList) (THIS_ HWND hwnd, HIMAGELIST himl) PURE;
00137     STDMETHOD (SetOverlayIcon) (THIS_ HWND hwnd, HICON hIcon, LPCWSTR pszDescription) PURE;
00138     STDMETHOD (SetThumbnailTooltip) (THIS_ HWND hwnd, LPCWSTR pszTip) PURE;
00139     STDMETHOD (SetThumbnailClip) (THIS_ HWND hwnd, RECT *prcClip) PURE;
00140 
00141 private:
00142     ~ITaskbarList3();
00143 };
00144 
00145 typedef ITaskbarList3 *LPITaskbarList3;
00146 
00147 #endif // __MINGW32__
00148 #endif // __GNUC__
00149 #endif // WIN32
00150 
00151 #endif // BACKEND_WIN32_TASKBAR_MINGW_H


Generated on Sat Feb 16 2019 05:00:58 for ResidualVM by doxygen 1.7.1
curved edge   curved edge