You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

w32tiger.h 5.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. /* Copyright (C) 2011 TigerVNC Team. All Rights Reserved.
  2. *
  3. * This is free software; you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License as published by
  5. * the Free Software Foundation; either version 2 of the License, or
  6. * (at your option) any later version.
  7. *
  8. * This software is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU General Public License
  14. * along with this software; if not, write to the Free Software
  15. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
  16. * USA.
  17. */
  18. #ifndef OS_W32TIGER_H
  19. #define OS_W32TIGER_H
  20. #ifdef WIN32
  21. #include <windows.h>
  22. #include <wininet.h>
  23. #include <shlobj.h>
  24. #include <shlguid.h>
  25. #include <wininet.h>
  26. /* Windows has different names for these */
  27. #define strcasecmp _stricmp
  28. #define strncasecmp _strnicmp
  29. /* MSLLHOOKSTRUCT structure*/
  30. #ifndef LLMHF_INJECTED
  31. #define LLMHF_INJECTED 0x00000001
  32. #endif
  33. /* IActiveDesktop. As of 2011-10-12, MinGW does not define
  34. IActiveDesktop in any way (see tracker 2877129), while MinGW64 is
  35. broken: has the headers but not the lib symbols. */
  36. #ifndef HAVE_ACTIVE_DESKTOP_H
  37. extern const GUID CLSID_ActiveDesktop;
  38. extern const GUID IID_IActiveDesktop;
  39. /* IActiveDesktop::AddUrl */
  40. #define ADDURL_SILENT 0x0001
  41. /* IActiveDesktop::AddDesktopItemWithUI */
  42. #define DTI_ADDUI_DEFAULT 0x00000000
  43. #define DTI_ADDUI_DISPSUBWIZARD 0x00000001
  44. #define DTI_ADDUI_POSITIONITEM 0x00000002
  45. /* IActiveDesktop::ModifyDesktopItem */
  46. #define COMP_ELEM_TYPE 0x00000001
  47. #define COMP_ELEM_CHECKED 0x00000002
  48. #define COMP_ELEM_DIRTY 0x00000004
  49. #define COMP_ELEM_NOSCROLL 0x00000008
  50. #define COMP_ELEM_POS_LEFT 0x00000010
  51. #define COMP_ELEM_POS_TOP 0x00000020
  52. #define COMP_ELEM_SIZE_WIDTH 0x00000040
  53. #define COMP_ELEM_SIZE_HEIGHT 0x00000080
  54. #define COMP_ELEM_POS_ZINDEX 0x00000100
  55. #define COMP_ELEM_SOURCE 0x00000200
  56. #define COMP_ELEM_FRIENDLYNAME 0x00000400
  57. #define COMP_ELEM_SUBSCRIBEDURL 0x00000800
  58. #define COMP_ELEM_ORIGINAL_CSI 0x00001000
  59. #define COMP_ELEM_RESTORED_CSI 0x00002000
  60. #define COMP_ELEM_CURITEMSTATE 0x00004000
  61. #define COMP_ELEM_ALL 0x00007FFF /* OR-ed all COMP_ELEM_ */
  62. /* IActiveDesktop::GetWallpaper */
  63. #define AD_GETWP_BMP 0x00000000
  64. #define AD_GETWP_IMAGE 0x00000001
  65. #define AD_GETWP_LAST_APPLIED 0x00000002
  66. /* IActiveDesktop::ApplyChanges */
  67. #define AD_APPLY_SAVE 0x00000001
  68. #define AD_APPLY_HTMLGEN 0x00000002
  69. #define AD_APPLY_REFRESH 0x00000004
  70. #define AD_APPLY_ALL 0x00000007 /* OR-ed three AD_APPLY_ above */
  71. #define AD_APPLY_FORCE 0x00000008
  72. #define AD_APPLY_BUFFERED_REFRESH 0x00000010
  73. #define AD_APPLY_DYNAMICREFRESH 0x00000020
  74. /* Structures for IActiveDesktop */
  75. typedef struct {
  76. DWORD dwSize;
  77. int iLeft;
  78. int iTop;
  79. DWORD dwWidth;
  80. DWORD dwHeight;
  81. DWORD dwItemState;
  82. } COMPSTATEINFO, *LPCOMPSTATEINFO;
  83. typedef const COMPSTATEINFO *LPCCOMPSTATEINFO;
  84. typedef struct {
  85. DWORD dwSize;
  86. int iLeft;
  87. int iTop;
  88. DWORD dwWidth;
  89. DWORD dwHeight;
  90. int izIndex;
  91. BOOL fCanResize;
  92. BOOL fCanResizeX;
  93. BOOL fCanResizeY;
  94. int iPreferredLeftPercent;
  95. int iPreferredTopPercent;
  96. } COMPPOS, *LPCOMPPOS;
  97. typedef const COMPPOS *LPCCOMPPOS;
  98. typedef struct {
  99. DWORD dwSize;
  100. DWORD dwID;
  101. int iComponentType;
  102. BOOL fChecked;
  103. BOOL fDirty;
  104. BOOL fNoScroll;
  105. COMPPOS cpPos;
  106. WCHAR wszFriendlyName[MAX_PATH];
  107. WCHAR wszSource[INTERNET_MAX_URL_LENGTH];
  108. WCHAR wszSubscribedURL[INTERNET_MAX_URL_LENGTH];
  109. DWORD dwCurItemState;
  110. COMPSTATEINFO csiOriginal;
  111. COMPSTATEINFO csiRestored;
  112. } COMPONENT, *LPCOMPONENT;
  113. typedef const COMPONENT *LPCCOMPONENT;
  114. typedef struct {
  115. DWORD dwSize;
  116. BOOL fEnableComponents;
  117. BOOL fActiveDesktop;
  118. } COMPONENTSOPT, *LPCOMPONENTSOPT;
  119. typedef const COMPONENTSOPT *LPCCOMPONENTSOPT;
  120. typedef struct {
  121. DWORD dwSize;
  122. DWORD dwStyle;
  123. } WALLPAPEROPT, *LPWALLPAPEROPT;
  124. typedef const WALLPAPEROPT *LPCWALLPAPEROPT;
  125. /* WALLPAPEROPT styles */
  126. #define WPSTYLE_CENTER 0x0
  127. #define WPSTYLE_TILE 0x1
  128. #define WPSTYLE_STRETCH 0x2
  129. #define WPSTYLE_MAX 0x3
  130. /* Those two are defined in Windows 7 and newer, we don't need them now */
  131. #if 0
  132. #define WPSTYLE_KEEPASPECT 0x3
  133. #define WPSTYLE_CROPTOFIT 0x4
  134. #endif
  135. #define INTERFACE IActiveDesktop
  136. DECLARE_INTERFACE_(IActiveDesktop, IUnknown)
  137. {
  138. STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  139. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  140. STDMETHOD_(ULONG,Release)(THIS) PURE;
  141. STDMETHOD(AddDesktopItem)(THIS_ LPCOMPONENT,DWORD) PURE;
  142. STDMETHOD(AddDesktopItemWithUI)(THIS_ HWND,LPCOMPONENT,DWORD) PURE;
  143. STDMETHOD(AddUrl)(THIS_ HWND,LPCWSTR,LPCOMPONENT,DWORD) PURE;
  144. STDMETHOD(ApplyChanges)(THIS_ DWORD) PURE;
  145. STDMETHOD(GenerateDesktopItemHtml)(THIS_ LPCWSTR,LPCOMPONENT,DWORD) PURE;
  146. STDMETHOD(GetDesktopItem)(THIS_ int,LPCOMPONENT,DWORD) PURE;
  147. STDMETHOD(GetDesktopItemByID)(THIS_ DWORD,LPCOMPONENT,DWORD) PURE;
  148. STDMETHOD(GetDesktopItemBySource)(THIS_ LPCWSTR,LPCOMPONENT,DWORD) PURE;
  149. STDMETHOD(GetDesktopItemCount)(THIS_ LPINT,DWORD) PURE;
  150. STDMETHOD(GetDesktopItemOptions)(THIS_ LPCOMPONENTSOPT,DWORD) PURE;
  151. STDMETHOD(GetPattern)(THIS_ LPWSTR,UINT,DWORD) PURE;
  152. STDMETHOD(GetWallpaper)(THIS_ LPWSTR,UINT,DWORD) PURE;
  153. STDMETHOD(GetWallpaperOptions)(THIS_ LPWALLPAPEROPT,DWORD) PURE;
  154. STDMETHOD(ModifyDesktopItem)(THIS_ LPCCOMPONENT,DWORD) PURE;
  155. STDMETHOD(RemoveDesktopItem)(THIS_ LPCCOMPONENT,DWORD) PURE;
  156. STDMETHOD(SetDesktopItemOptions)(THIS_ LPCCOMPONENTSOPT,DWORD) PURE;
  157. STDMETHOD(SetPattern)(THIS_ LPCWSTR,DWORD) PURE;
  158. STDMETHOD(SetWallpaper)(THIS_ LPCWSTR,DWORD) PURE;
  159. STDMETHOD(SetWallpaperOptions)(THIS_ LPCWALLPAPEROPT,DWORD) PURE;
  160. };
  161. #undef INTERFACE
  162. #endif /* HAVE_ACTIVE_DESKTOP_H */
  163. #endif /* WIN32 */
  164. #endif /* OS_W32TIGER_H */