github.com/tomatome/win@v0.3.1/comdlg32.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  	libcomdlg32 uintptr
    15  
    16  	// Functions
    17  	chooseColor          uintptr
    18  	chooseFont           uintptr
    19  	commDlgExtendedError uintptr
    20  	findText             uintptr
    21  	getFileTitle         uintptr
    22  	getOpenFileName      uintptr
    23  	getSaveFileName      uintptr
    24  	pageSetupDlg         uintptr
    25  	printDlgEx           uintptr
    26  	printDlg             uintptr
    27  	replaceText          uintptr
    28  )
    29  
    30  func init() {
    31  	// Library
    32  	libcomdlg32 = doLoadLibrary("comdlg32.dll")
    33  
    34  	// Functions
    35  	chooseColor = doGetProcAddress(libcomdlg32, "ChooseColorW")
    36  	chooseFont = doGetProcAddress(libcomdlg32, "ChooseFontW")
    37  	commDlgExtendedError = doGetProcAddress(libcomdlg32, "CommDlgExtendedError")
    38  	findText = doGetProcAddress(libcomdlg32, "FindTextW")
    39  	getFileTitle = doGetProcAddress(libcomdlg32, "GetFileTitleW")
    40  	getOpenFileName = doGetProcAddress(libcomdlg32, "GetOpenFileNameW")
    41  	getSaveFileName = doGetProcAddress(libcomdlg32, "GetSaveFileNameW")
    42  	pageSetupDlg = doGetProcAddress(libcomdlg32, "PageSetupDlgW")
    43  	printDlgEx = doGetProcAddress(libcomdlg32, "PrintDlgExW")
    44  	printDlg = doGetProcAddress(libcomdlg32, "PrintDlgW")
    45  	replaceText = doGetProcAddress(libcomdlg32, "ReplaceTextW")
    46  }
    47  
    48  func ChooseColor(unnamed0 *CHOOSECOLOR) bool {
    49  	ret1 := syscall3(chooseColor, 1,
    50  		uintptr(unsafe.Pointer(unnamed0)),
    51  		0,
    52  		0)
    53  	return ret1 != 0
    54  }
    55  
    56  func ChooseFont(unnamed0 LPCHOOSEFONT) bool {
    57  	ret1 := syscall3(chooseFont, 1,
    58  		uintptr(unsafe.Pointer(unnamed0)),
    59  		0,
    60  		0)
    61  	return ret1 != 0
    62  }
    63  
    64  func CommDlgExtendedError() DWORD {
    65  	ret1 := syscall3(commDlgExtendedError, 0,
    66  		0,
    67  		0,
    68  		0)
    69  	return DWORD(ret1)
    70  }
    71  
    72  func FindText(unnamed0 LPFINDREPLACE) HWND {
    73  	ret1 := syscall3(findText, 1,
    74  		uintptr(unsafe.Pointer(unnamed0)),
    75  		0,
    76  		0)
    77  	return HWND(ret1)
    78  }
    79  
    80  func GetFileTitle(unnamed0 string, unnamed1 LPWSTR, unnamed2 WORD) int16 {
    81  	unnamed0Str := unicode16FromString(unnamed0)
    82  	ret1 := syscall3(getFileTitle, 3,
    83  		uintptr(unsafe.Pointer(&unnamed0Str[0])),
    84  		uintptr(unsafe.Pointer(unnamed1)),
    85  		uintptr(unnamed2))
    86  	return int16(ret1)
    87  }
    88  
    89  func GetOpenFileName(unnamed0 LPOPENFILENAME) bool {
    90  	ret1 := syscall3(getOpenFileName, 1,
    91  		uintptr(unsafe.Pointer(unnamed0)),
    92  		0,
    93  		0)
    94  	return ret1 != 0
    95  }
    96  
    97  func GetSaveFileName(unnamed0 LPOPENFILENAME) bool {
    98  	ret1 := syscall3(getSaveFileName, 1,
    99  		uintptr(unsafe.Pointer(unnamed0)),
   100  		0,
   101  		0)
   102  	return ret1 != 0
   103  }
   104  
   105  func PageSetupDlg(unnamed0 LPPAGESETUPDLG) bool {
   106  	ret1 := syscall3(pageSetupDlg, 1,
   107  		uintptr(unsafe.Pointer(unnamed0)),
   108  		0,
   109  		0)
   110  	return ret1 != 0
   111  }
   112  
   113  func PrintDlgEx(unnamed0 LPPRINTDLGEX) HRESULT {
   114  	ret1 := syscall3(printDlgEx, 1,
   115  		uintptr(unsafe.Pointer(unnamed0)),
   116  		0,
   117  		0)
   118  	return HRESULT(ret1)
   119  }
   120  
   121  func PrintDlg(unnamed0 LPPRINTDLG) bool {
   122  	ret1 := syscall3(printDlg, 1,
   123  		uintptr(unsafe.Pointer(unnamed0)),
   124  		0,
   125  		0)
   126  	return ret1 != 0
   127  }
   128  
   129  func ReplaceText(unnamed0 LPFINDREPLACE) HWND {
   130  	ret1 := syscall3(replaceText, 1,
   131  		uintptr(unsafe.Pointer(unnamed0)),
   132  		0,
   133  		0)
   134  	return HWND(ret1)
   135  }