github.com/tomatome/win@v0.3.1/uxtheme.go (about)

     1  // This file was automatically generated by https://github.com/kbinani/win/blob/generator/internal/cmd/gen/gen.go
     2  // go run internal/cmd/gen/gen.go
     3  
     4  // +build windows
     5  
     6  package win
     7  
     8  import (
     9  	"unsafe"
    10  )
    11  
    12  var (
    13  	// Library
    14  	libuxtheme uintptr
    15  
    16  	// Functions
    17  	beginPanningFeedback                  uintptr
    18  	endPanningFeedback                    uintptr
    19  	updatePanningFeedback                 uintptr
    20  	beginBufferedAnimation                uintptr
    21  	beginBufferedPaint                    uintptr
    22  	bufferedPaintClear                    uintptr
    23  	bufferedPaintInit                     uintptr
    24  	bufferedPaintRenderAnimation          uintptr
    25  	bufferedPaintSetAlpha                 uintptr
    26  	bufferedPaintStopAllAnimations        uintptr
    27  	bufferedPaintUnInit                   uintptr
    28  	closeThemeData                        uintptr
    29  	drawThemeBackground                   uintptr
    30  	drawThemeBackgroundEx                 uintptr
    31  	drawThemeEdge                         uintptr
    32  	drawThemeIcon                         uintptr
    33  	drawThemeParentBackground             uintptr
    34  	drawThemeText                         uintptr
    35  	drawThemeTextEx                       uintptr
    36  	enableThemeDialogTexture              uintptr
    37  	enableTheming                         uintptr
    38  	endBufferedAnimation                  uintptr
    39  	endBufferedPaint                      uintptr
    40  	getBufferedPaintBits                  uintptr
    41  	getBufferedPaintDC                    uintptr
    42  	getBufferedPaintTargetDC              uintptr
    43  	getBufferedPaintTargetRect            uintptr
    44  	getCurrentThemeName                   uintptr
    45  	getThemeAppProperties                 uintptr
    46  	getThemeBackgroundContentRect         uintptr
    47  	getThemeBackgroundExtent              uintptr
    48  	getThemeBackgroundRegion              uintptr
    49  	getThemeBool                          uintptr
    50  	getThemeColor                         uintptr
    51  	getThemeDocumentationProperty         uintptr
    52  	getThemeEnumValue                     uintptr
    53  	getThemeFilename                      uintptr
    54  	getThemeFont                          uintptr
    55  	getThemeInt                           uintptr
    56  	getThemeIntList                       uintptr
    57  	getThemeMargins                       uintptr
    58  	getThemeMetric                        uintptr
    59  	getThemePartSize                      uintptr
    60  	getThemePosition                      uintptr
    61  	getThemePropertyOrigin                uintptr
    62  	getThemeRect                          uintptr
    63  	getThemeString                        uintptr
    64  	getThemeSysBool                       uintptr
    65  	getThemeSysColor                      uintptr
    66  	getThemeSysColorBrush                 uintptr
    67  	getThemeSysFont                       uintptr
    68  	getThemeSysInt                        uintptr
    69  	getThemeSysSize                       uintptr
    70  	getThemeSysString                     uintptr
    71  	getThemeTextExtent                    uintptr
    72  	getThemeTextMetrics                   uintptr
    73  	getThemeTransitionDuration            uintptr
    74  	getWindowTheme                        uintptr
    75  	hitTestThemeBackground                uintptr
    76  	isAppThemed                           uintptr
    77  	isThemeActive                         uintptr
    78  	isThemeBackgroundPartiallyTransparent uintptr
    79  	isThemeDialogTextureEnabled           uintptr
    80  	isThemePartDefined                    uintptr
    81  	openThemeData                         uintptr
    82  	openThemeDataEx                       uintptr
    83  	setThemeAppProperties                 uintptr
    84  	setWindowTheme                        uintptr
    85  )
    86  
    87  func init() {
    88  	// Library
    89  	libuxtheme = doLoadLibrary("uxtheme.dll")
    90  
    91  	// Functions
    92  	beginPanningFeedback = doGetProcAddress(libuxtheme, "BeginPanningFeedback")
    93  	endPanningFeedback = doGetProcAddress(libuxtheme, "EndPanningFeedback")
    94  	updatePanningFeedback = doGetProcAddress(libuxtheme, "UpdatePanningFeedback")
    95  	beginBufferedAnimation = doGetProcAddress(libuxtheme, "BeginBufferedAnimation")
    96  	beginBufferedPaint = doGetProcAddress(libuxtheme, "BeginBufferedPaint")
    97  	bufferedPaintClear = doGetProcAddress(libuxtheme, "BufferedPaintClear")
    98  	bufferedPaintInit = doGetProcAddress(libuxtheme, "BufferedPaintInit")
    99  	bufferedPaintRenderAnimation = doGetProcAddress(libuxtheme, "BufferedPaintRenderAnimation")
   100  	bufferedPaintSetAlpha = doGetProcAddress(libuxtheme, "BufferedPaintSetAlpha")
   101  	bufferedPaintStopAllAnimations = doGetProcAddress(libuxtheme, "BufferedPaintStopAllAnimations")
   102  	bufferedPaintUnInit = doGetProcAddress(libuxtheme, "BufferedPaintUnInit")
   103  	closeThemeData = doGetProcAddress(libuxtheme, "CloseThemeData")
   104  	drawThemeBackground = doGetProcAddress(libuxtheme, "DrawThemeBackground")
   105  	drawThemeBackgroundEx = doGetProcAddress(libuxtheme, "DrawThemeBackgroundEx")
   106  	drawThemeEdge = doGetProcAddress(libuxtheme, "DrawThemeEdge")
   107  	drawThemeIcon = doGetProcAddress(libuxtheme, "DrawThemeIcon")
   108  	drawThemeParentBackground = doGetProcAddress(libuxtheme, "DrawThemeParentBackground")
   109  	drawThemeText = doGetProcAddress(libuxtheme, "DrawThemeText")
   110  	drawThemeTextEx = doGetProcAddress(libuxtheme, "DrawThemeTextEx")
   111  	enableThemeDialogTexture = doGetProcAddress(libuxtheme, "EnableThemeDialogTexture")
   112  	enableTheming = doGetProcAddress(libuxtheme, "EnableTheming")
   113  	endBufferedAnimation = doGetProcAddress(libuxtheme, "EndBufferedAnimation")
   114  	endBufferedPaint = doGetProcAddress(libuxtheme, "EndBufferedPaint")
   115  	getBufferedPaintBits = doGetProcAddress(libuxtheme, "GetBufferedPaintBits")
   116  	getBufferedPaintDC = doGetProcAddress(libuxtheme, "GetBufferedPaintDC")
   117  	getBufferedPaintTargetDC = doGetProcAddress(libuxtheme, "GetBufferedPaintTargetDC")
   118  	getBufferedPaintTargetRect = doGetProcAddress(libuxtheme, "GetBufferedPaintTargetRect")
   119  	getCurrentThemeName = doGetProcAddress(libuxtheme, "GetCurrentThemeName")
   120  	getThemeAppProperties = doGetProcAddress(libuxtheme, "GetThemeAppProperties")
   121  	getThemeBackgroundContentRect = doGetProcAddress(libuxtheme, "GetThemeBackgroundContentRect")
   122  	getThemeBackgroundExtent = doGetProcAddress(libuxtheme, "GetThemeBackgroundExtent")
   123  	getThemeBackgroundRegion = doGetProcAddress(libuxtheme, "GetThemeBackgroundRegion")
   124  	getThemeBool = doGetProcAddress(libuxtheme, "GetThemeBool")
   125  	getThemeColor = doGetProcAddress(libuxtheme, "GetThemeColor")
   126  	getThemeDocumentationProperty = doGetProcAddress(libuxtheme, "GetThemeDocumentationProperty")
   127  	getThemeEnumValue = doGetProcAddress(libuxtheme, "GetThemeEnumValue")
   128  	getThemeFilename = doGetProcAddress(libuxtheme, "GetThemeFilename")
   129  	getThemeFont = doGetProcAddress(libuxtheme, "GetThemeFont")
   130  	getThemeInt = doGetProcAddress(libuxtheme, "GetThemeInt")
   131  	getThemeIntList = doGetProcAddress(libuxtheme, "GetThemeIntList")
   132  	getThemeMargins = doGetProcAddress(libuxtheme, "GetThemeMargins")
   133  	getThemeMetric = doGetProcAddress(libuxtheme, "GetThemeMetric")
   134  	getThemePartSize = doGetProcAddress(libuxtheme, "GetThemePartSize")
   135  	getThemePosition = doGetProcAddress(libuxtheme, "GetThemePosition")
   136  	getThemePropertyOrigin = doGetProcAddress(libuxtheme, "GetThemePropertyOrigin")
   137  	getThemeRect = doGetProcAddress(libuxtheme, "GetThemeRect")
   138  	getThemeString = doGetProcAddress(libuxtheme, "GetThemeString")
   139  	getThemeSysBool = doGetProcAddress(libuxtheme, "GetThemeSysBool")
   140  	getThemeSysColor = doGetProcAddress(libuxtheme, "GetThemeSysColor")
   141  	getThemeSysColorBrush = doGetProcAddress(libuxtheme, "GetThemeSysColorBrush")
   142  	getThemeSysFont = doGetProcAddress(libuxtheme, "GetThemeSysFont")
   143  	getThemeSysInt = doGetProcAddress(libuxtheme, "GetThemeSysInt")
   144  	getThemeSysSize = doGetProcAddress(libuxtheme, "GetThemeSysSize")
   145  	getThemeSysString = doGetProcAddress(libuxtheme, "GetThemeSysString")
   146  	getThemeTextExtent = doGetProcAddress(libuxtheme, "GetThemeTextExtent")
   147  	getThemeTextMetrics = doGetProcAddress(libuxtheme, "GetThemeTextMetrics")
   148  	getThemeTransitionDuration = doGetProcAddress(libuxtheme, "GetThemeTransitionDuration")
   149  	getWindowTheme = doGetProcAddress(libuxtheme, "GetWindowTheme")
   150  	hitTestThemeBackground = doGetProcAddress(libuxtheme, "HitTestThemeBackground")
   151  	isAppThemed = doGetProcAddress(libuxtheme, "IsAppThemed")
   152  	isThemeActive = doGetProcAddress(libuxtheme, "IsThemeActive")
   153  	isThemeBackgroundPartiallyTransparent = doGetProcAddress(libuxtheme, "IsThemeBackgroundPartiallyTransparent")
   154  	isThemeDialogTextureEnabled = doGetProcAddress(libuxtheme, "IsThemeDialogTextureEnabled")
   155  	isThemePartDefined = doGetProcAddress(libuxtheme, "IsThemePartDefined")
   156  	openThemeData = doGetProcAddress(libuxtheme, "OpenThemeData")
   157  	openThemeDataEx = doGetProcAddress(libuxtheme, "OpenThemeDataEx")
   158  	setThemeAppProperties = doGetProcAddress(libuxtheme, "SetThemeAppProperties")
   159  	setWindowTheme = doGetProcAddress(libuxtheme, "SetWindowTheme")
   160  }
   161  
   162  func BeginPanningFeedback(hwnd HWND) bool {
   163  	ret1 := syscall3(beginPanningFeedback, 1,
   164  		uintptr(hwnd),
   165  		0,
   166  		0)
   167  	return ret1 != 0
   168  }
   169  
   170  func EndPanningFeedback(hwnd HWND, fAnimateBack bool) bool {
   171  	ret1 := syscall3(endPanningFeedback, 2,
   172  		uintptr(hwnd),
   173  		getUintptrFromBool(fAnimateBack),
   174  		0)
   175  	return ret1 != 0
   176  }
   177  
   178  func UpdatePanningFeedback(hwnd HWND, lTotalOverpanOffsetX LONG, lTotalOverpanOffsetY LONG, fInInertia bool) bool {
   179  	ret1 := syscall6(updatePanningFeedback, 4,
   180  		uintptr(hwnd),
   181  		uintptr(lTotalOverpanOffsetX),
   182  		uintptr(lTotalOverpanOffsetY),
   183  		getUintptrFromBool(fInInertia),
   184  		0,
   185  		0)
   186  	return ret1 != 0
   187  }
   188  
   189  func BeginBufferedAnimation(hwnd HWND, hdcTarget HDC, rcTarget /*const*/ *RECT, dwFormat BP_BUFFERFORMAT, pPaintParams *BP_PAINTPARAMS, pAnimationParams *BP_ANIMATIONPARAMS, phdcFrom *HDC, phdcTo *HDC) HANIMATIONBUFFER {
   190  	ret1 := syscall9(beginBufferedAnimation, 8,
   191  		uintptr(hwnd),
   192  		uintptr(hdcTarget),
   193  		uintptr(unsafe.Pointer(rcTarget)),
   194  		uintptr(dwFormat),
   195  		uintptr(unsafe.Pointer(pPaintParams)),
   196  		uintptr(unsafe.Pointer(pAnimationParams)),
   197  		uintptr(unsafe.Pointer(phdcFrom)),
   198  		uintptr(unsafe.Pointer(phdcTo)),
   199  		0)
   200  	return HANIMATIONBUFFER(ret1)
   201  }
   202  
   203  func BeginBufferedPaint(hdcTarget HDC, prcTarget /*const*/ *RECT, dwFormat BP_BUFFERFORMAT, pPaintParams *BP_PAINTPARAMS, phdc *HDC) HPAINTBUFFER {
   204  	ret1 := syscall6(beginBufferedPaint, 5,
   205  		uintptr(hdcTarget),
   206  		uintptr(unsafe.Pointer(prcTarget)),
   207  		uintptr(dwFormat),
   208  		uintptr(unsafe.Pointer(pPaintParams)),
   209  		uintptr(unsafe.Pointer(phdc)),
   210  		0)
   211  	return HPAINTBUFFER(ret1)
   212  }
   213  
   214  func BufferedPaintClear(hBufferedPaint HPAINTBUFFER, prc /*const*/ *RECT) HRESULT {
   215  	ret1 := syscall3(bufferedPaintClear, 2,
   216  		uintptr(hBufferedPaint),
   217  		uintptr(unsafe.Pointer(prc)),
   218  		0)
   219  	return HRESULT(ret1)
   220  }
   221  
   222  func BufferedPaintInit() HRESULT {
   223  	ret1 := syscall3(bufferedPaintInit, 0,
   224  		0,
   225  		0,
   226  		0)
   227  	return HRESULT(ret1)
   228  }
   229  
   230  func BufferedPaintRenderAnimation(hwnd HWND, hdcTarget HDC) bool {
   231  	ret1 := syscall3(bufferedPaintRenderAnimation, 2,
   232  		uintptr(hwnd),
   233  		uintptr(hdcTarget),
   234  		0)
   235  	return ret1 != 0
   236  }
   237  
   238  func BufferedPaintSetAlpha(hBufferedPaint HPAINTBUFFER, prc /*const*/ *RECT, alpha BYTE) HRESULT {
   239  	ret1 := syscall3(bufferedPaintSetAlpha, 3,
   240  		uintptr(hBufferedPaint),
   241  		uintptr(unsafe.Pointer(prc)),
   242  		uintptr(alpha))
   243  	return HRESULT(ret1)
   244  }
   245  
   246  func BufferedPaintStopAllAnimations(hwnd HWND) HRESULT {
   247  	ret1 := syscall3(bufferedPaintStopAllAnimations, 1,
   248  		uintptr(hwnd),
   249  		0,
   250  		0)
   251  	return HRESULT(ret1)
   252  }
   253  
   254  func BufferedPaintUnInit() HRESULT {
   255  	ret1 := syscall3(bufferedPaintUnInit, 0,
   256  		0,
   257  		0,
   258  		0)
   259  	return HRESULT(ret1)
   260  }
   261  
   262  func CloseThemeData(hTheme HTHEME) HRESULT {
   263  	ret1 := syscall3(closeThemeData, 1,
   264  		uintptr(hTheme),
   265  		0,
   266  		0)
   267  	return HRESULT(ret1)
   268  }
   269  
   270  func DrawThemeBackground(hTheme HTHEME, hdc HDC, iPartId int32, iStateId int32, pRect /*const*/ *RECT, pClipRect /*const*/ *RECT) HRESULT {
   271  	ret1 := syscall6(drawThemeBackground, 6,
   272  		uintptr(hTheme),
   273  		uintptr(hdc),
   274  		uintptr(iPartId),
   275  		uintptr(iStateId),
   276  		uintptr(unsafe.Pointer(pRect)),
   277  		uintptr(unsafe.Pointer(pClipRect)))
   278  	return HRESULT(ret1)
   279  }
   280  
   281  func DrawThemeBackgroundEx(hTheme HTHEME, hdc HDC, iPartId int32, iStateId int32, pRect /*const*/ *RECT, pOptions /*const*/ *DTBGOPTS) HRESULT {
   282  	ret1 := syscall6(drawThemeBackgroundEx, 6,
   283  		uintptr(hTheme),
   284  		uintptr(hdc),
   285  		uintptr(iPartId),
   286  		uintptr(iStateId),
   287  		uintptr(unsafe.Pointer(pRect)),
   288  		uintptr(unsafe.Pointer(pOptions)))
   289  	return HRESULT(ret1)
   290  }
   291  
   292  func DrawThemeEdge(hTheme HTHEME, hdc HDC, iPartId int32, iStateId int32, pDestRect /*const*/ *RECT, uEdge UINT, uFlags UINT, pContentRect *RECT) HRESULT {
   293  	ret1 := syscall9(drawThemeEdge, 8,
   294  		uintptr(hTheme),
   295  		uintptr(hdc),
   296  		uintptr(iPartId),
   297  		uintptr(iStateId),
   298  		uintptr(unsafe.Pointer(pDestRect)),
   299  		uintptr(uEdge),
   300  		uintptr(uFlags),
   301  		uintptr(unsafe.Pointer(pContentRect)),
   302  		0)
   303  	return HRESULT(ret1)
   304  }
   305  
   306  func DrawThemeIcon(hTheme HTHEME, hdc HDC, iPartId int32, iStateId int32, pRect /*const*/ *RECT, himl HIMAGELIST, iImageIndex int32) HRESULT {
   307  	ret1 := syscall9(drawThemeIcon, 7,
   308  		uintptr(hTheme),
   309  		uintptr(hdc),
   310  		uintptr(iPartId),
   311  		uintptr(iStateId),
   312  		uintptr(unsafe.Pointer(pRect)),
   313  		uintptr(himl),
   314  		uintptr(iImageIndex),
   315  		0,
   316  		0)
   317  	return HRESULT(ret1)
   318  }
   319  
   320  func DrawThemeParentBackground(hwnd HWND, hdc HDC, prc *RECT) HRESULT {
   321  	ret1 := syscall3(drawThemeParentBackground, 3,
   322  		uintptr(hwnd),
   323  		uintptr(hdc),
   324  		uintptr(unsafe.Pointer(prc)))
   325  	return HRESULT(ret1)
   326  }
   327  
   328  func DrawThemeText(hTheme HTHEME, hdc HDC, iPartId int32, iStateId int32, pszText string, iCharCount int32, flags DWORD, flags2 DWORD, pRect /*const*/ *RECT) HRESULT {
   329  	pszTextStr := unicode16FromString(pszText)
   330  	ret1 := syscall9(drawThemeText, 9,
   331  		uintptr(hTheme),
   332  		uintptr(hdc),
   333  		uintptr(iPartId),
   334  		uintptr(iStateId),
   335  		uintptr(unsafe.Pointer(&pszTextStr[0])),
   336  		uintptr(iCharCount),
   337  		uintptr(flags),
   338  		uintptr(flags2),
   339  		uintptr(unsafe.Pointer(pRect)))
   340  	return HRESULT(ret1)
   341  }
   342  
   343  func DrawThemeTextEx(hTheme HTHEME, hdc HDC, iPartId int32, iStateId int32, pszText string, iCharCount int32, flags DWORD, rect *RECT, options /*const*/ *DTTOPTS) HRESULT {
   344  	pszTextStr := unicode16FromString(pszText)
   345  	ret1 := syscall9(drawThemeTextEx, 9,
   346  		uintptr(hTheme),
   347  		uintptr(hdc),
   348  		uintptr(iPartId),
   349  		uintptr(iStateId),
   350  		uintptr(unsafe.Pointer(&pszTextStr[0])),
   351  		uintptr(iCharCount),
   352  		uintptr(flags),
   353  		uintptr(unsafe.Pointer(rect)),
   354  		uintptr(unsafe.Pointer(options)))
   355  	return HRESULT(ret1)
   356  }
   357  
   358  func EnableThemeDialogTexture(hwnd HWND, dwFlags DWORD) HRESULT {
   359  	ret1 := syscall3(enableThemeDialogTexture, 2,
   360  		uintptr(hwnd),
   361  		uintptr(dwFlags),
   362  		0)
   363  	return HRESULT(ret1)
   364  }
   365  
   366  func EnableTheming(fEnable bool) HRESULT {
   367  	ret1 := syscall3(enableTheming, 1,
   368  		getUintptrFromBool(fEnable),
   369  		0,
   370  		0)
   371  	return HRESULT(ret1)
   372  }
   373  
   374  func EndBufferedAnimation(hbpAnimation HANIMATIONBUFFER, fUpdateTarget bool) HRESULT {
   375  	ret1 := syscall3(endBufferedAnimation, 2,
   376  		uintptr(hbpAnimation),
   377  		getUintptrFromBool(fUpdateTarget),
   378  		0)
   379  	return HRESULT(ret1)
   380  }
   381  
   382  func EndBufferedPaint(hPaintBuffer HPAINTBUFFER, fUpdateTarget bool) HRESULT {
   383  	ret1 := syscall3(endBufferedPaint, 2,
   384  		uintptr(hPaintBuffer),
   385  		getUintptrFromBool(fUpdateTarget),
   386  		0)
   387  	return HRESULT(ret1)
   388  }
   389  
   390  func GetBufferedPaintBits(hBufferedPaint HPAINTBUFFER, ppbBuffer **RGBQUAD, pcxRow *int) HRESULT {
   391  	ret1 := syscall3(getBufferedPaintBits, 3,
   392  		uintptr(hBufferedPaint),
   393  		uintptr(unsafe.Pointer(ppbBuffer)),
   394  		uintptr(unsafe.Pointer(pcxRow)))
   395  	return HRESULT(ret1)
   396  }
   397  
   398  func GetBufferedPaintDC(hBufferedPaint HPAINTBUFFER) HDC {
   399  	ret1 := syscall3(getBufferedPaintDC, 1,
   400  		uintptr(hBufferedPaint),
   401  		0,
   402  		0)
   403  	return HDC(ret1)
   404  }
   405  
   406  func GetBufferedPaintTargetDC(hBufferedPaint HPAINTBUFFER) HDC {
   407  	ret1 := syscall3(getBufferedPaintTargetDC, 1,
   408  		uintptr(hBufferedPaint),
   409  		0,
   410  		0)
   411  	return HDC(ret1)
   412  }
   413  
   414  func GetBufferedPaintTargetRect(hBufferedPaint HPAINTBUFFER, prc *RECT) HRESULT {
   415  	ret1 := syscall3(getBufferedPaintTargetRect, 2,
   416  		uintptr(hBufferedPaint),
   417  		uintptr(unsafe.Pointer(prc)),
   418  		0)
   419  	return HRESULT(ret1)
   420  }
   421  
   422  func GetCurrentThemeName(pszThemeFileName LPWSTR, dwMaxNameChars int32, pszColorBuff LPWSTR, cchMaxColorChars int32, pszSizeBuff LPWSTR, cchMaxSizeChars int32) HRESULT {
   423  	ret1 := syscall6(getCurrentThemeName, 6,
   424  		uintptr(unsafe.Pointer(pszThemeFileName)),
   425  		uintptr(dwMaxNameChars),
   426  		uintptr(unsafe.Pointer(pszColorBuff)),
   427  		uintptr(cchMaxColorChars),
   428  		uintptr(unsafe.Pointer(pszSizeBuff)),
   429  		uintptr(cchMaxSizeChars))
   430  	return HRESULT(ret1)
   431  }
   432  
   433  func GetThemeAppProperties() DWORD {
   434  	ret1 := syscall3(getThemeAppProperties, 0,
   435  		0,
   436  		0,
   437  		0)
   438  	return DWORD(ret1)
   439  }
   440  
   441  func GetThemeBackgroundContentRect(hTheme HTHEME, hdc HDC, iPartId int32, iStateId int32, pBoundingRect /*const*/ *RECT, pContentRect *RECT) HRESULT {
   442  	ret1 := syscall6(getThemeBackgroundContentRect, 6,
   443  		uintptr(hTheme),
   444  		uintptr(hdc),
   445  		uintptr(iPartId),
   446  		uintptr(iStateId),
   447  		uintptr(unsafe.Pointer(pBoundingRect)),
   448  		uintptr(unsafe.Pointer(pContentRect)))
   449  	return HRESULT(ret1)
   450  }
   451  
   452  func GetThemeBackgroundExtent(hTheme HTHEME, hdc HDC, iPartId int32, iStateId int32, pContentRect /*const*/ *RECT, pExtentRect *RECT) HRESULT {
   453  	ret1 := syscall6(getThemeBackgroundExtent, 6,
   454  		uintptr(hTheme),
   455  		uintptr(hdc),
   456  		uintptr(iPartId),
   457  		uintptr(iStateId),
   458  		uintptr(unsafe.Pointer(pContentRect)),
   459  		uintptr(unsafe.Pointer(pExtentRect)))
   460  	return HRESULT(ret1)
   461  }
   462  
   463  func GetThemeBackgroundRegion(hTheme HTHEME, hdc HDC, iPartId int32, iStateId int32, pRect /*const*/ *RECT, pRegion *HRGN) HRESULT {
   464  	ret1 := syscall6(getThemeBackgroundRegion, 6,
   465  		uintptr(hTheme),
   466  		uintptr(hdc),
   467  		uintptr(iPartId),
   468  		uintptr(iStateId),
   469  		uintptr(unsafe.Pointer(pRect)),
   470  		uintptr(unsafe.Pointer(pRegion)))
   471  	return HRESULT(ret1)
   472  }
   473  
   474  func GetThemeBool(hTheme HTHEME, iPartId int32, iStateId int32, iPropId int32, pfVal *BOOL) HRESULT {
   475  	ret1 := syscall6(getThemeBool, 5,
   476  		uintptr(hTheme),
   477  		uintptr(iPartId),
   478  		uintptr(iStateId),
   479  		uintptr(iPropId),
   480  		uintptr(unsafe.Pointer(pfVal)),
   481  		0)
   482  	return HRESULT(ret1)
   483  }
   484  
   485  func GetThemeColor(hTheme HTHEME, iPartId int32, iStateId int32, iPropId int32, pColor *COLORREF) HRESULT {
   486  	ret1 := syscall6(getThemeColor, 5,
   487  		uintptr(hTheme),
   488  		uintptr(iPartId),
   489  		uintptr(iStateId),
   490  		uintptr(iPropId),
   491  		uintptr(unsafe.Pointer(pColor)),
   492  		0)
   493  	return HRESULT(ret1)
   494  }
   495  
   496  func GetThemeDocumentationProperty(pszThemeName string, pszPropertyName string, pszValueBuff LPWSTR, cchMaxValChars int32) HRESULT {
   497  	pszThemeNameStr := unicode16FromString(pszThemeName)
   498  	pszPropertyNameStr := unicode16FromString(pszPropertyName)
   499  	ret1 := syscall6(getThemeDocumentationProperty, 4,
   500  		uintptr(unsafe.Pointer(&pszThemeNameStr[0])),
   501  		uintptr(unsafe.Pointer(&pszPropertyNameStr[0])),
   502  		uintptr(unsafe.Pointer(pszValueBuff)),
   503  		uintptr(cchMaxValChars),
   504  		0,
   505  		0)
   506  	return HRESULT(ret1)
   507  }
   508  
   509  func GetThemeEnumValue(hTheme HTHEME, iPartId int32, iStateId int32, iPropId int32, piVal *int) HRESULT {
   510  	ret1 := syscall6(getThemeEnumValue, 5,
   511  		uintptr(hTheme),
   512  		uintptr(iPartId),
   513  		uintptr(iStateId),
   514  		uintptr(iPropId),
   515  		uintptr(unsafe.Pointer(piVal)),
   516  		0)
   517  	return HRESULT(ret1)
   518  }
   519  
   520  func GetThemeFilename(hTheme HTHEME, iPartId int32, iStateId int32, iPropId int32, pszThemeFilename LPWSTR, cchMaxBuffChars int32) HRESULT {
   521  	ret1 := syscall6(getThemeFilename, 6,
   522  		uintptr(hTheme),
   523  		uintptr(iPartId),
   524  		uintptr(iStateId),
   525  		uintptr(iPropId),
   526  		uintptr(unsafe.Pointer(pszThemeFilename)),
   527  		uintptr(cchMaxBuffChars))
   528  	return HRESULT(ret1)
   529  }
   530  
   531  func GetThemeFont(hTheme HTHEME, hdc HDC, iPartId int32, iStateId int32, iPropId int32, pFont *LOGFONT) HRESULT {
   532  	ret1 := syscall6(getThemeFont, 6,
   533  		uintptr(hTheme),
   534  		uintptr(hdc),
   535  		uintptr(iPartId),
   536  		uintptr(iStateId),
   537  		uintptr(iPropId),
   538  		uintptr(unsafe.Pointer(pFont)))
   539  	return HRESULT(ret1)
   540  }
   541  
   542  func GetThemeInt(hTheme HTHEME, iPartId int32, iStateId int32, iPropId int32, piVal *int) HRESULT {
   543  	ret1 := syscall6(getThemeInt, 5,
   544  		uintptr(hTheme),
   545  		uintptr(iPartId),
   546  		uintptr(iStateId),
   547  		uintptr(iPropId),
   548  		uintptr(unsafe.Pointer(piVal)),
   549  		0)
   550  	return HRESULT(ret1)
   551  }
   552  
   553  func GetThemeIntList(hTheme HTHEME, iPartId int32, iStateId int32, iPropId int32, pIntList *INTLIST) HRESULT {
   554  	ret1 := syscall6(getThemeIntList, 5,
   555  		uintptr(hTheme),
   556  		uintptr(iPartId),
   557  		uintptr(iStateId),
   558  		uintptr(iPropId),
   559  		uintptr(unsafe.Pointer(pIntList)),
   560  		0)
   561  	return HRESULT(ret1)
   562  }
   563  
   564  func GetThemeMargins(hTheme HTHEME, hdc HDC, iPartId int32, iStateId int32, iPropId int32, prc *RECT, pMargins *MARGINS) HRESULT {
   565  	ret1 := syscall9(getThemeMargins, 7,
   566  		uintptr(hTheme),
   567  		uintptr(hdc),
   568  		uintptr(iPartId),
   569  		uintptr(iStateId),
   570  		uintptr(iPropId),
   571  		uintptr(unsafe.Pointer(prc)),
   572  		uintptr(unsafe.Pointer(pMargins)),
   573  		0,
   574  		0)
   575  	return HRESULT(ret1)
   576  }
   577  
   578  func GetThemeMetric(hTheme HTHEME, hdc HDC, iPartId int32, iStateId int32, iPropId int32, piVal *int) HRESULT {
   579  	ret1 := syscall6(getThemeMetric, 6,
   580  		uintptr(hTheme),
   581  		uintptr(hdc),
   582  		uintptr(iPartId),
   583  		uintptr(iStateId),
   584  		uintptr(iPropId),
   585  		uintptr(unsafe.Pointer(piVal)))
   586  	return HRESULT(ret1)
   587  }
   588  
   589  func GetThemePartSize(hTheme HTHEME, hdc HDC, iPartId int32, iStateId int32, prc *RECT, eSize THEMESIZE, psz *SIZE) HRESULT {
   590  	ret1 := syscall9(getThemePartSize, 7,
   591  		uintptr(hTheme),
   592  		uintptr(hdc),
   593  		uintptr(iPartId),
   594  		uintptr(iStateId),
   595  		uintptr(unsafe.Pointer(prc)),
   596  		uintptr(eSize),
   597  		uintptr(unsafe.Pointer(psz)),
   598  		0,
   599  		0)
   600  	return HRESULT(ret1)
   601  }
   602  
   603  func GetThemePosition(hTheme HTHEME, iPartId int32, iStateId int32, iPropId int32, pPoint *POINT) HRESULT {
   604  	ret1 := syscall6(getThemePosition, 5,
   605  		uintptr(hTheme),
   606  		uintptr(iPartId),
   607  		uintptr(iStateId),
   608  		uintptr(iPropId),
   609  		uintptr(unsafe.Pointer(pPoint)),
   610  		0)
   611  	return HRESULT(ret1)
   612  }
   613  
   614  func GetThemePropertyOrigin(hTheme HTHEME, iPartId int32, iStateId int32, iPropId int32, pOrigin *PROPERTYORIGIN) HRESULT {
   615  	ret1 := syscall6(getThemePropertyOrigin, 5,
   616  		uintptr(hTheme),
   617  		uintptr(iPartId),
   618  		uintptr(iStateId),
   619  		uintptr(iPropId),
   620  		uintptr(unsafe.Pointer(pOrigin)),
   621  		0)
   622  	return HRESULT(ret1)
   623  }
   624  
   625  func GetThemeRect(hTheme HTHEME, iPartId int32, iStateId int32, iPropId int32, pRect *RECT) HRESULT {
   626  	ret1 := syscall6(getThemeRect, 5,
   627  		uintptr(hTheme),
   628  		uintptr(iPartId),
   629  		uintptr(iStateId),
   630  		uintptr(iPropId),
   631  		uintptr(unsafe.Pointer(pRect)),
   632  		0)
   633  	return HRESULT(ret1)
   634  }
   635  
   636  func GetThemeString(hTheme HTHEME, iPartId int32, iStateId int32, iPropId int32, pszBuff LPWSTR, cchMaxBuffChars int32) HRESULT {
   637  	ret1 := syscall6(getThemeString, 6,
   638  		uintptr(hTheme),
   639  		uintptr(iPartId),
   640  		uintptr(iStateId),
   641  		uintptr(iPropId),
   642  		uintptr(unsafe.Pointer(pszBuff)),
   643  		uintptr(cchMaxBuffChars))
   644  	return HRESULT(ret1)
   645  }
   646  
   647  func GetThemeSysBool(hTheme HTHEME, iBoolID int32) bool {
   648  	ret1 := syscall3(getThemeSysBool, 2,
   649  		uintptr(hTheme),
   650  		uintptr(iBoolID),
   651  		0)
   652  	return ret1 != 0
   653  }
   654  
   655  func GetThemeSysColor(hTheme HTHEME, iColorID int32) COLORREF {
   656  	ret1 := syscall3(getThemeSysColor, 2,
   657  		uintptr(hTheme),
   658  		uintptr(iColorID),
   659  		0)
   660  	return COLORREF(ret1)
   661  }
   662  
   663  func GetThemeSysColorBrush(hTheme HTHEME, iColorID int32) HBRUSH {
   664  	ret1 := syscall3(getThemeSysColorBrush, 2,
   665  		uintptr(hTheme),
   666  		uintptr(iColorID),
   667  		0)
   668  	return HBRUSH(ret1)
   669  }
   670  
   671  func GetThemeSysFont(hTheme HTHEME, iFontID int32, plf *LOGFONT) HRESULT {
   672  	ret1 := syscall3(getThemeSysFont, 3,
   673  		uintptr(hTheme),
   674  		uintptr(iFontID),
   675  		uintptr(unsafe.Pointer(plf)))
   676  	return HRESULT(ret1)
   677  }
   678  
   679  func GetThemeSysInt(hTheme HTHEME, iIntID int32, piValue *int) HRESULT {
   680  	ret1 := syscall3(getThemeSysInt, 3,
   681  		uintptr(hTheme),
   682  		uintptr(iIntID),
   683  		uintptr(unsafe.Pointer(piValue)))
   684  	return HRESULT(ret1)
   685  }
   686  
   687  func GetThemeSysSize(hTheme HTHEME, iSizeID int32) int32 {
   688  	ret1 := syscall3(getThemeSysSize, 2,
   689  		uintptr(hTheme),
   690  		uintptr(iSizeID),
   691  		0)
   692  	return int32(ret1)
   693  }
   694  
   695  func GetThemeSysString(hTheme HTHEME, iStringID int32, pszStringBuff LPWSTR, cchMaxStringChars int32) HRESULT {
   696  	ret1 := syscall6(getThemeSysString, 4,
   697  		uintptr(hTheme),
   698  		uintptr(iStringID),
   699  		uintptr(unsafe.Pointer(pszStringBuff)),
   700  		uintptr(cchMaxStringChars),
   701  		0,
   702  		0)
   703  	return HRESULT(ret1)
   704  }
   705  
   706  func GetThemeTextExtent(hTheme HTHEME, hdc HDC, iPartId int32, iStateId int32, pszText string, iCharCount int32, dwTextFlags DWORD, pBoundingRect /*const*/ *RECT, pExtentRect *RECT) HRESULT {
   707  	pszTextStr := unicode16FromString(pszText)
   708  	ret1 := syscall9(getThemeTextExtent, 9,
   709  		uintptr(hTheme),
   710  		uintptr(hdc),
   711  		uintptr(iPartId),
   712  		uintptr(iStateId),
   713  		uintptr(unsafe.Pointer(&pszTextStr[0])),
   714  		uintptr(iCharCount),
   715  		uintptr(dwTextFlags),
   716  		uintptr(unsafe.Pointer(pBoundingRect)),
   717  		uintptr(unsafe.Pointer(pExtentRect)))
   718  	return HRESULT(ret1)
   719  }
   720  
   721  func GetThemeTextMetrics(hTheme HTHEME, hdc HDC, iPartId int32, iStateId int32, ptm *TEXTMETRIC) HRESULT {
   722  	ret1 := syscall6(getThemeTextMetrics, 5,
   723  		uintptr(hTheme),
   724  		uintptr(hdc),
   725  		uintptr(iPartId),
   726  		uintptr(iStateId),
   727  		uintptr(unsafe.Pointer(ptm)),
   728  		0)
   729  	return HRESULT(ret1)
   730  }
   731  
   732  func GetThemeTransitionDuration(hTheme HTHEME, iPartId int32, iStateIdFrom int32, iStateIdTo int32, iPropId int32, pdwDuration *uint32) HRESULT {
   733  	ret1 := syscall6(getThemeTransitionDuration, 6,
   734  		uintptr(hTheme),
   735  		uintptr(iPartId),
   736  		uintptr(iStateIdFrom),
   737  		uintptr(iStateIdTo),
   738  		uintptr(iPropId),
   739  		uintptr(unsafe.Pointer(pdwDuration)))
   740  	return HRESULT(ret1)
   741  }
   742  
   743  func GetWindowTheme(hwnd HWND) HTHEME {
   744  	ret1 := syscall3(getWindowTheme, 1,
   745  		uintptr(hwnd),
   746  		0,
   747  		0)
   748  	return HTHEME(ret1)
   749  }
   750  
   751  func HitTestThemeBackground(hTheme HTHEME, hdc HDC, iPartId int32, iStateId int32, dwOptions DWORD, pRect /*const*/ *RECT, hrgn HRGN, ptTest POINT, pwHitTestCode *WORD) HRESULT {
   752  	ret1 := syscall12(hitTestThemeBackground, 10,
   753  		uintptr(hTheme),
   754  		uintptr(hdc),
   755  		uintptr(iPartId),
   756  		uintptr(iStateId),
   757  		uintptr(dwOptions),
   758  		uintptr(unsafe.Pointer(pRect)),
   759  		uintptr(hrgn),
   760  		uintptr(ptTest.X),
   761  		uintptr(ptTest.Y),
   762  		uintptr(unsafe.Pointer(pwHitTestCode)),
   763  		0,
   764  		0)
   765  	return HRESULT(ret1)
   766  }
   767  
   768  func IsAppThemed() bool {
   769  	ret1 := syscall3(isAppThemed, 0,
   770  		0,
   771  		0,
   772  		0)
   773  	return ret1 != 0
   774  }
   775  
   776  func IsThemeActive() bool {
   777  	ret1 := syscall3(isThemeActive, 0,
   778  		0,
   779  		0,
   780  		0)
   781  	return ret1 != 0
   782  }
   783  
   784  func IsThemeBackgroundPartiallyTransparent(hTheme HTHEME, iPartId int32, iStateId int32) bool {
   785  	ret1 := syscall3(isThemeBackgroundPartiallyTransparent, 3,
   786  		uintptr(hTheme),
   787  		uintptr(iPartId),
   788  		uintptr(iStateId))
   789  	return ret1 != 0
   790  }
   791  
   792  func IsThemeDialogTextureEnabled(hwnd HWND) bool {
   793  	ret1 := syscall3(isThemeDialogTextureEnabled, 1,
   794  		uintptr(hwnd),
   795  		0,
   796  		0)
   797  	return ret1 != 0
   798  }
   799  
   800  func IsThemePartDefined(hTheme HTHEME, iPartId int32, iStateId int32) bool {
   801  	ret1 := syscall3(isThemePartDefined, 3,
   802  		uintptr(hTheme),
   803  		uintptr(iPartId),
   804  		uintptr(iStateId))
   805  	return ret1 != 0
   806  }
   807  
   808  func OpenThemeData(hwnd HWND, classlist string) HTHEME {
   809  	classlistStr := unicode16FromString(classlist)
   810  	ret1 := syscall3(openThemeData, 2,
   811  		uintptr(hwnd),
   812  		uintptr(unsafe.Pointer(&classlistStr[0])),
   813  		0)
   814  	return HTHEME(ret1)
   815  }
   816  
   817  func OpenThemeDataEx(hwnd HWND, pszClassList string, flags DWORD) HTHEME {
   818  	pszClassListStr := unicode16FromString(pszClassList)
   819  	ret1 := syscall3(openThemeDataEx, 3,
   820  		uintptr(hwnd),
   821  		uintptr(unsafe.Pointer(&pszClassListStr[0])),
   822  		uintptr(flags))
   823  	return HTHEME(ret1)
   824  }
   825  
   826  func SetThemeAppProperties(dwFlags DWORD) {
   827  	syscall3(setThemeAppProperties, 1,
   828  		uintptr(dwFlags),
   829  		0,
   830  		0)
   831  }
   832  
   833  func SetWindowTheme(hwnd HWND, pszSubAppName string, pszSubIdList string) HRESULT {
   834  	pszSubAppNameStr := unicode16FromString(pszSubAppName)
   835  	pszSubIdListStr := unicode16FromString(pszSubIdList)
   836  	ret1 := syscall3(setWindowTheme, 3,
   837  		uintptr(hwnd),
   838  		uintptr(unsafe.Pointer(&pszSubAppNameStr[0])),
   839  		uintptr(unsafe.Pointer(&pszSubIdListStr[0])))
   840  	return HRESULT(ret1)
   841  }