Documentation ¶
Overview ¶
Package win is internal. DO NOT USE.
Index ¶
- Constants
- Variables
- func ActivateActCtx(actCtx Handle, cookie *uintptr) (err error)
- func CallNextHookEx(hk Handle, code int32, wparam uintptr, lparam unsafe.Pointer) (ret uintptr)
- func ChooseColor(cc *CHOOSECOLOR) (ok bool)
- func CoCreateInstance(clsid *GUID, unkOuter *IUnknown, clsContext int32, iid *GUID, ...) (res error)
- func CoInitializeEx(reserved uintptr, coInit uint32) error
- func CoTaskMemFree(address unsafe.Pointer)
- func CoUninitialize()
- func CommDlgError() error
- func DeactivateActCtx(flags uint32, cookie uintptr) (err error)
- func DefWindowProc(wnd HWND, msg uint32, wparam uintptr, lparam unsafe.Pointer) (ret uintptr)
- func DeleteObject(o Handle) (ok bool)
- func DestroyIcon(icon Handle) (err error)
- func DestroyWindow(wnd HWND) (err error)
- func DispatchMessage(msg *MSG) (ret uintptr)
- func EnableWindow(wnd HWND, enable bool) (ok bool)
- func EnumWindows(enumFunc uintptr, lparam unsafe.Pointer) (err error)
- func GenerateConsoleCtrlEvent(ctrlEvent uint32, processGroupID uint32) (err error)
- func GetCurrentThreadId() (id uint32)
- func GetDeviceCaps(dc Handle, index int) (ret int)
- func GetDpiForWindow(wnd HWND) (ret int, err error)
- func GetMessage(msg *MSG, wnd HWND, msgFilterMin uint32, msgFilterMax uint32) (ret uintptr, err error)
- func GetOpenFileName(ofn *OPENFILENAME) (ok bool)
- func GetSaveFileName(ofn *OPENFILENAME) (ok bool)
- func GetSystemDirectory() (string, error)
- func GetSystemMetrics(index int) (ret int)
- func GetWindowRect(wnd HWND, cmdShow *RECT) (err error)
- func GetWindowText(wnd HWND) string
- func GetWindowThreadProcessId(hwnd HWND, pid *uint32) (tid uint32, err error)
- func GlobalFree(mem Handle) (err error)
- func InitCommonControlsEx(icc *INITCOMMONCONTROLSEX) (ok bool)
- func IsDialogMessage(wnd HWND, msg *MSG) (ok bool)
- func MessageBox(hwnd HWND, text *uint16, caption *uint16, boxtype uint32) (ret int32, err error)
- func MessageLoop(wnd HWND) error
- func PostQuitMessage(exitCode int)
- func RegisterClassEx(cls *WNDCLASSEX) (err error)
- func ReleaseActCtx(actCtx Handle)
- func ReleaseDC(wnd HWND, dc Handle) (ok bool)
- func RtlGetNtVersionNumbers() (majorVersion, minorVersion, buildNumber uint32)
- func SHCreateItemFromParsingName(path *uint16, bc *IBindCtx, iid *GUID, item **IShellItem) (res error)
- func SHGetPathFromIDListEx(ptr *ITEMIDLIST, path *uint16, pathLen int, opts int) (ok bool)
- func SendMessage(wnd HWND, msg uint32, wparam uintptr, lparam uintptr) (ret uintptr)
- func SendMessagePointer(wnd HWND, msg uint32, wparam uintptr, lparam unsafe.Pointer) (ret uintptr)
- func SetDlgItemText(dlg HWND, dlgItemID int, str *uint16) (err error)
- func SetForegroundWindow(wnd HWND) (ok bool)
- func SetThreadDpiAwarenessContext(dpiContext uintptr) (ret uintptr, err error)
- func SetWindowLong(wnd HWND, index int, newLong int) (ret int, err error)
- func SetWindowPos(wnd HWND, wndInsertAfter HWND, x int, y int, cx int, cy int, flags int) (err error)
- func SetWindowText(wnd HWND, text *uint16) (err error)
- func ShellNotifyIcon(message uint32, data *NOTIFYICONDATA) (ok bool)
- func ShowWindow(wnd HWND, cmdShow int) (ok bool)
- func SystemParametersInfo(action int, uiParam uintptr, pvParam unsafe.Pointer, winIni int) (err error)
- func TranslateMessage(msg *MSG) (ok bool)
- func UnhookWindowsHookEx(hk Handle) (err error)
- func UnregisterClass(className *uint16, instance Handle) (err error)
- func WTSSendMessage(server Handle, sessionID uint32, title *uint16, titleLength int, ...) (err error)
- type ACTCTX
- type BROWSEINFO
- type CHOOSECOLOR
- type COMDLG_FILTERSPEC
- type CWPRETSTRUCT
- type GUID
- type HWND
- type Handle
- func CreateActCtx(actCtx *ACTCTX) (ret Handle, err error)
- func CreateFontIndirect(lf *LOGFONT) (ret Handle)
- func CreateIconFromResourceEx(resBits []byte, icon bool, ver uint32, cx int, cy int, flags int) (ret Handle, err error)
- func ExtractAssociatedIcon(instance Handle, path *uint16, icon *uint16) (ret Handle, err error)
- func GetModuleHandle(moduleName *uint16) (ret Handle, err error)
- func GetWindowDC(wnd HWND) (ret Handle)
- func GlobalAlloc(flags uint32, bytes uintptr) (ret Handle, err error)
- func LoadIcon(instance Handle, resource uintptr) (ret Handle, err error)
- func SetWindowsHookEx(idHook int, fn uintptr, mod Handle, threadID uint32) (ret Handle, err error)
- type IBindCtx
- type IFileDialog
- func (u *IFileDialog) Close(res syscall.Errno) (err error)
- func (u *IFileDialog) GetOptions() (fos _FILEOPENDIALOGOPTIONS, err error)
- func (u *IFileDialog) GetResult() (item *IShellItem, err error)
- func (u *IFileDialog) SetDefaultExtension(extension *uint16) (err error)
- func (u *IFileDialog) SetFileName(name *uint16) (err error)
- func (u *IFileDialog) SetFileTypes(cFileTypes int, rgFilterSpec *COMDLG_FILTERSPEC) (err error)
- func (u *IFileDialog) SetFolder(item *IShellItem) (err error)
- func (u *IFileDialog) SetOptions(fos _FILEOPENDIALOGOPTIONS) (err error)
- func (u *IFileDialog) SetTitle(title *uint16) (err error)
- type IFileOpenDialog
- type IFileSaveDialog
- type IFileSaveDialogVtbl
- type IModalWindow
- type INITCOMMONCONTROLSEX
- type IShellItem
- type IShellItemArray
- type ITEMIDLIST
- type IUnknown
- type LOGFONT
- type MSG
- type NONCLIENTMETRICS
- type NOTIFYICONDATA
- type OPENFILENAME
- type POINT
- type Pointer
- type RECT
- type SIGDN
- type SYSTEMTIME
- type WNDCLASSEX
Constants ¶
const ( // InitCommonControlsEx flags ICC_LISTVIEW_CLASSES = 0x00000001 ICC_TREEVIEW_CLASSES = 0x00000002 ICC_BAR_CLASSES = 0x00000004 ICC_TAB_CLASSES = 0x00000008 ICC_UPDOWN_CLASS = 0x00000010 ICC_PROGRESS_CLASS = 0x00000020 ICC_HOTKEY_CLASS = 0x00000040 ICC_ANIMATE_CLASS = 0x00000080 ICC_WIN95_CLASSES = 0x000000FF ICC_DATE_CLASSES = 0x00000100 ICC_USEREX_CLASSES = 0x00000200 ICC_COOL_CLASSES = 0x00000400 ICC_INTERNET_CLASSES = 0x00000800 ICC_PAGESCROLLER_CLASS = 0x00001000 ICC_NATIVEFNTCTL_CLASS = 0x00002000 ICC_STANDARD_CLASSES = 0x00004000 ICC_LINK_CLASS = 0x00008000 )
const ( // ChooseColor flags CC_RGBINIT = 0x00000001 CC_FULLOPEN = 0x00000002 CC_PREVENTFULLOPEN = 0x00000004 )
const ( OFN_OVERWRITEPROMPT = 0x00000002 OFN_NOCHANGEDIR = 0x00000008 OFN_ALLOWMULTISELECT = 0x00000200 OFN_PATHMUSTEXIST = 0x00000800 OFN_FILEMUSTEXIST = 0x00001000 OFN_CREATEPROMPT = 0x00002000 OFN_NOREADONLYRETURN = 0x00008000 OFN_EXPLORER = 0x00080000 OFN_FORCESHOWHIDDEN = 0x10000000 )
const ( LOGPIXELSX = 88 LOGPIXELSY = 90 )
const ( // CreateActCtx flags ACTCTX_FLAG_PROCESSOR_ARCHITECTURE_VALID = 0x001 ACTCTX_FLAG_LANGID_VALID = 0x002 ACTCTX_FLAG_ASSEMBLY_DIRECTORY_VALID = 0x004 ACTCTX_FLAG_RESOURCE_NAME_VALID = 0x008 ACTCTX_FLAG_SET_PROCESS_DEFAULT = 0x010 ACTCTX_FLAG_APPLICATION_NAME_VALID = 0x020 ACTCTX_FLAG_HMODULE_VALID = 0x080 // Control signals CTRL_C_EVENT = windows.CTRL_C_EVENT CTRL_BREAK_EVENT = windows.CTRL_BREAK_EVENT CTRL_CLOSE_EVENT = windows.CTRL_CLOSE_EVENT CTRL_LOGOFF_EVENT = windows.CTRL_LOGOFF_EVENT CTRL_SHUTDOWN_EVENT = windows.CTRL_SHUTDOWN_EVENT )
const ( COINIT_MULTITHREADED = windows.COINIT_MULTITHREADED COINIT_APARTMENTTHREADED = windows.COINIT_APARTMENTTHREADED COINIT_DISABLE_OLE1DDE = windows.COINIT_DISABLE_OLE1DDE COINIT_SPEED_OVER_MEMORY = windows.COINIT_SPEED_OVER_MEMORY CLSCTX_INPROC_SERVER = windows.CLSCTX_INPROC_SERVER CLSCTX_INPROC_HANDLER = windows.CLSCTX_INPROC_HANDLER CLSCTX_LOCAL_SERVER = windows.CLSCTX_LOCAL_SERVER CLSCTX_REMOTE_SERVER = windows.CLSCTX_REMOTE_SERVER CLSCTX_ALL = windows.CLSCTX_INPROC_SERVER | windows.CLSCTX_INPROC_HANDLER | windows.CLSCTX_LOCAL_SERVER | windows.CLSCTX_REMOTE_SERVER E_CANCELED = windows.ERROR_CANCELLED | windows.FACILITY_WIN32<<16 | 0x80000000 E_TIMEOUT = windows.ERROR_TIMEOUT | windows.FACILITY_WIN32<<16 | 0x80000000 RPC_E_CHANGED_MODE = syscall.Errno(windows.RPC_E_CHANGED_MODE) S_FALSE = syscall.Errno(windows.S_FALSE) )
const ( BIF_RETURNONLYFSDIRS = 0x00000001 BFFM_INITIALIZED = 1 BFFM_SETSELECTION = WM_USER + 103 // ShellNotifyIcon messages NIM_ADD = 0 NIM_MODIFY = 1 NIM_DELETE = 2 NIM_SETFOCUS = 3 NIM_SETVERSION = 4 // NOTIFYICONDATA flags NIF_MESSAGE = 0x01 NIF_ICON = 0x02 NIF_TIP = 0x04 NIF_STATE = 0x08 NIF_INFO = 0x10 NIF_GUID = 0x20 NIF_REALTIME = 0x40 NIF_SHOWTIP = 0x80 // NOTIFYICONDATA info flags NIIF_NONE = 0x00 NIIF_INFO = 0x01 NIIF_WARNING = 0x02 NIIF_ERROR = 0x03 NIIF_USER = 0x04 NIIF_NOSOUND = 0x10 NIIF_LARGE_ICON = 0x20 NIIF_RESPECT_QUIET_TIME = 0x80 NIIF_ICON_MASK = 0x0F // NOTIFYICONDATA state NIS_HIDDEN = 0x1 NIS_SHAREDICON = 0x2 )
const ( FOS_OVERWRITEPROMPT _FILEOPENDIALOGOPTIONS = 0x2 FOS_STRICTFILETYPES _FILEOPENDIALOGOPTIONS = 0x4 FOS_NOCHANGEDIR _FILEOPENDIALOGOPTIONS = 0x8 FOS_PICKFOLDERS _FILEOPENDIALOGOPTIONS = 0x20 FOS_FORCEFILESYSTEM _FILEOPENDIALOGOPTIONS = 0x40 FOS_ALLNONSTORAGEITEMS _FILEOPENDIALOGOPTIONS = 0x80 FOS_NOVALIDATE _FILEOPENDIALOGOPTIONS = 0x100 FOS_ALLOWMULTISELECT _FILEOPENDIALOGOPTIONS = 0x200 FOS_PATHMUSTEXIST _FILEOPENDIALOGOPTIONS = 0x800 FOS_FILEMUSTEXIST _FILEOPENDIALOGOPTIONS = 0x1000 FOS_CREATEPROMPT _FILEOPENDIALOGOPTIONS = 0x2000 FOS_SHAREAWARE _FILEOPENDIALOGOPTIONS = 0x4000 FOS_NOREADONLYRETURN _FILEOPENDIALOGOPTIONS = 0x8000 FOS_NOTESTFILECREATE _FILEOPENDIALOGOPTIONS = 0x10000 FOS_HIDEMRUPLACES _FILEOPENDIALOGOPTIONS = 0x20000 FOS_HIDEPINNEDPLACES _FILEOPENDIALOGOPTIONS = 0x40000 FOS_NODEREFERENCELINKS _FILEOPENDIALOGOPTIONS = 0x100000 FOS_OKBUTTONNEEDSINTERACTION _FILEOPENDIALOGOPTIONS = 0x200000 FOS_DONTADDTORECENT _FILEOPENDIALOGOPTIONS = 0x2000000 FOS_FORCESHOWHIDDEN _FILEOPENDIALOGOPTIONS = 0x10000000 FOS_DEFAULTNOMINIMODE _FILEOPENDIALOGOPTIONS = 0x20000000 FOS_FORCEPREVIEWPANEON _FILEOPENDIALOGOPTIONS = 0x40000000 FOS_SUPPORTSTREAMABLEITEMS _FILEOPENDIALOGOPTIONS = 0x80000000 )
const ( // Button IDs IDOK = 1 IDCANCEL = 2 IDABORT = 3 IDRETRY = 4 IDIGNORE = 5 IDYES = 6 IDNO = 7 // Control IDs IDC_STATIC_OK = 20 // MessageBox types MB_OK = windows.MB_OK MB_OKCANCEL = windows.MB_OKCANCEL MB_ABORTRETRYIGNORE = windows.MB_ABORTRETRYIGNORE MB_YESNOCANCEL = windows.MB_YESNOCANCEL MB_YESNO = windows.MB_YESNO MB_RETRYCANCEL = windows.MB_RETRYCANCEL MB_CANCELTRYCONTINUE = windows.MB_CANCELTRYCONTINUE MB_ICONERROR = windows.MB_ICONERROR MB_ICONQUESTION = windows.MB_ICONQUESTION MB_ICONWARNING = windows.MB_ICONWARNING MB_ICONINFORMATION = windows.MB_ICONINFORMATION MB_DEFBUTTON1 = windows.MB_DEFBUTTON1 MB_DEFBUTTON2 = windows.MB_DEFBUTTON2 MB_DEFBUTTON3 = windows.MB_DEFBUTTON3 MB_SETFOREGROUND = windows.MB_SETFOREGROUND // Window messages WM_DESTROY = 0x0002 WM_CLOSE = 0x0010 WM_SETFONT = 0x0030 WM_SETICON = 0x0080 WM_NCCREATE = 0x0081 WM_NCDESTROY = 0x0082 WM_INITDIALOG = 0x0110 WM_COMMAND = 0x0111 WM_SYSCOMMAND = 0x0112 WM_DPICHANGED = 0x02e0 WM_USER = 0x0400 EM_SETSEL = 0x00b1 LB_ADDSTRING = 0x0180 LB_SETSEL = 0x0185 LB_SETCURSEL = 0x0186 LB_GETCURSEL = 0x0188 LB_GETSELCOUNT = 0x0190 LB_GETSELITEMS = 0x0191 MCM_GETCURSEL = 0x1001 MCM_SETCURSEL = 0x1002 PBM_SETPOS = WM_USER + 2 PBM_SETRANGE32 = WM_USER + 6 PBM_SETMARQUEE = WM_USER + 10 STM_SETICON = 0x0170 // CreateWindow CW_USEDEFAULT = -0x80000000 // Window classes PROGRESS_CLASS = "msctls_progress32" MONTHCAL_CLASS = "SysMonthCal32" // Window styles WS_OVERLAPPED = 0x00000000 WS_TILED = 0x00000000 WS_MAXIMIZEBOX = 0x00010000 WS_TABSTOP = 0x00010000 WS_GROUP = 0x00020000 WS_MINIMIZEBOX = 0x00020000 WS_SIZEBOX = 0x00040000 WS_THICKFRAME = 0x00040000 WS_SYSMENU = 0x00080000 WS_HSCROLL = 0x00100000 WS_VSCROLL = 0x00200000 WS_DLGFRAME = 0x00400000 WS_BORDER = 0x00800000 WS_CAPTION = 0x00c00000 WS_MAXIMIZE = 0x01000000 WS_CLIPCHILDREN = 0x02000000 WS_CLIPSIBLINGS = 0x04000000 WS_DISABLED = 0x08000000 WS_VISIBLE = 0x10000000 WS_ICONIC = 0x20000000 WS_MINIMIZE = 0x20000000 WS_CHILD = 0x40000000 WS_CHILDWINDOW = 0x40000000 WS_POPUP = 0x80000000 WS_POPUPWINDOW = WS_POPUP | WS_BORDER | WS_SYSMENU WS_OVERLAPPEDWINDOW = WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX WS_TILEDWINDOW = WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX // Extended window styles WS_EX_LEFT = 0x00000000 WS_EX_LTRREADING = 0x00000000 WS_EX_RIGHTSCROLLBAR = 0x00000000 WS_EX_DLGMODALFRAME = 0x00000001 WS_EX_NOPARENTNOTIFY = 0x00000004 WS_EX_TOPMOST = 0x00000008 WS_EX_ACCEPTFILES = 0x00000010 WS_EX_TRANSPARENT = 0x00000020 WS_EX_MDICHILD = 0x00000040 WS_EX_TOOLWINDOW = 0x00000080 WS_EX_WINDOWEDGE = 0x00000100 WS_EX_CLIENTEDGE = 0x00000200 WS_EX_CONTEXTHELP = 0x00000400 WS_EX_RIGHT = 0x00001000 WS_EX_RTLREADING = 0x00002000 WS_EX_LEFTSCROLLBAR = 0x00004000 WS_EX_CONTROLPARENT = 0x00010000 WS_EX_STATICEDGE = 0x00020000 WS_EX_APPWINDOW = 0x00040000 WS_EX_LAYERED = 0x00080000 WS_EX_NOINHERITLAYOUT = 0x00100000 WS_EX_NOREDIRECTIONBITMAP = 0x00200000 WS_EX_LAYOUTRTL = 0x00400000 WS_EX_COMPOSITED = 0x02000000 WS_EX_NOACTIVATE = 0x08000000 WS_EX_OVERLAPPEDWINDOW = WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE WS_EX_PALETTEWINDOW = WS_EX_WINDOWEDGE | WS_EX_TOOLWINDOW | WS_EX_TOPMOST // Button styles BS_DEFPUSHBUTTON = 0x0001 // Static control styles SS_NOPREFIX = 0x0080 SS_EDITCONTROL = 0x2000 SS_WORDELLIPSIS = 0xc000 // Edic control styles ES_PASSWORD = 0x0020 ES_AUTOHSCROLL = 0x0080 // List box control styles LBS_NOTIFY = 0x0001 LBS_EXTENDEDSEL = 0x0800 // Month calendar control styles MCS_NOTODAY = 0x0010 // Progress bar control styles PBS_SMOOTH = 0x0001 PBS_MARQUEE = 0x0008 // ShowWindow command SW_HIDE = 0 SW_NORMAL = 1 SW_SHOWNORMAL = 1 SW_SHOWMINIMIZED = 2 SW_SHOWMAXIMIZED = 3 SW_MAXIMIZE = 3 SW_SHOWNOACTIVATE = 4 SW_SHOW = 5 SW_MINIMIZE = 6 SW_SHOWMINNOACTIVE = 7 SW_SHOWNA = 8 SW_RESTORE = 9 SW_SHOWDEFAULT = 10 SW_FORCEMINIMIZE = 11 // SetWindowPos flags SWP_NOSIZE = 0x0001 SWP_NOMOVE = 0x0002 SWP_NOZORDER = 0x0004 SWP_NOREDRAW = 0x0008 SWP_NOACTIVATE = 0x0010 SWP_DRAWFRAME = 0x0020 SWP_FRAMECHANGED = 0x0020 SWP_SHOWWINDOW = 0x0040 SWP_HIDEWINDOW = 0x0080 SWP_NOCOPYBITS = 0x0100 SWP_NOREPOSITION = 0x0200 SWP_NOOWNERZORDER = 0x0200 SWP_NOSENDCHANGING = 0x0400 SWP_DEFERERASE = 0x2000 SWP_ASYNCWINDOWPOS = 0x4000 // Get/SetWindowLong ids GWL_WNDPROC = -4 GWL_HINSTANCE = -6 GWL_ID = -12 GWL_STYLE = -16 GWL_EXSTYLE = -20 GWL_USERDATA = -21 // Get/SetSystemMetrics ids SM_CXSCREEN = 0 SM_CYSCREEN = 1 // SystemParametersInfo ids SPI_GETNONCLIENTMETRICS = 0x29 // WM_SYSCOMMAND wParam SC_SIZE = 0xf000 SC_MOVE = 0xf010 SC_MINIMIZE = 0xf020 SC_MAXIMIZE = 0xf030 SC_NEXTWINDOW = 0xf040 SC_PREVWINDOW = 0xf050 SC_CLOSE = 0xf060 SC_VSCROLL = 0xf070 SC_HSCROLL = 0xf080 SC_MOUSEMENU = 0xf090 SC_KEYMENU = 0xf100 SC_RESTORE = 0xf120 SC_TASKLIST = 0xf130 SC_SCREENSAVE = 0xf140 SC_HOTKEY = 0xf150 SC_DEFAULT = 0xf160 SC_MONITORPOWER = 0xf170 SC_CONTEXTHELP = 0xf180 // SetWindowsHookEx types WH_CALLWNDPROCRET = 12 // System colors COLOR_WINDOW = 5 // DPI awareness USER_DEFAULT_SCREEN_DPI = 96 DPI_AWARENESS_CONTEXT_UNAWARE = ^uintptr(1) + 1 DPI_AWARENESS_CONTEXT_SYSTEM_AWARE = ^uintptr(2) + 1 DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE = ^uintptr(3) + 1 DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 = ^uintptr(4) + 1 DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED = ^uintptr(5) + 1 // LoadIcon resources IDI_APPLICATION = 32512 IDI_ERROR = 32513 IDI_HAND = 32513 IDI_QUESTION = 32514 IDI_WARNING = 32515 IDI_EXCLAMATION = 32515 IDI_ASTERISK = 32516 IDI_INFORMATION = 32516 IDI_WINLOGO = 32517 IDI_SHIELD = 32518 // LoadResource (image/icon) flags LR_DEFAULTCOLOR = 0x00000000 LR_MONOCHROME = 0x00000001 LR_LOADFROMFILE = 0x00000010 LR_LOADTRANSPARENT = 0x00000020 LR_DEFAULTSIZE = 0x00000040 LR_VGACOLOR = 0x00000080 LR_LOADMAP3DCOLORS = 0x00001000 LR_CREATEDIBSECTION = 0x00002000 LR_SHARED = 0x00008000 )
const ( WTS_CURRENT_SERVER_HANDLE = 0 WTS_CURRENT_SESSION = 0xffffffff )
Variables ¶
var ( IID_IShellItem = guid("\x1e\x6d\x82\x43\x18\xe7\xee\x42\xbc\x55\xa1\xe2\x61\xc3\x7b\xfe") IID_IFileOpenDialog = guid("\x88\x72\x7c\xd5\xad\xd4\x68\x47\xbe\x02\x9d\x96\x95\x32\xd9\x60") IID_IFileSaveDialog = guid("\x23\xcd\xbc\x84\xde\x5f\xdb\x4c\xae\xa4\xaf\x64\xb8\x3d\x78\xab") CLSID_FileOpenDialog = guid("\x9c\x5a\x1c\xdc\x8a\xe8\xde\x4d\xa5\xa1\x60\xf8\x2a\x20\xae\xf7") CLSID_FileSaveDialog = guid("\xf3\xe2\xb4\xc0\x21\xba\x73\x47\x8d\xba\x33\x5e\xc9\x46\xeb\x8b") )
Functions ¶
func ActivateActCtx ¶
func CallNextHookEx ¶
func ChooseColor ¶
func ChooseColor(cc *CHOOSECOLOR) (ok bool)
func CoCreateInstance ¶
func CoInitializeEx ¶
func CoTaskMemFree ¶
func CoUninitialize ¶
func CoUninitialize()
func CommDlgError ¶
func CommDlgError() error
func DeactivateActCtx ¶
func DefWindowProc ¶
func DeleteObject ¶
func DestroyIcon ¶
func DestroyWindow ¶
func DispatchMessage ¶
func EnableWindow ¶
func GetCurrentThreadId ¶
func GetCurrentThreadId() (id uint32)
func GetDeviceCaps ¶
func GetDpiForWindow ¶
func GetMessage ¶
func GetOpenFileName ¶
func GetOpenFileName(ofn *OPENFILENAME) (ok bool)
func GetSaveFileName ¶
func GetSaveFileName(ofn *OPENFILENAME) (ok bool)
func GetSystemDirectory ¶
func GetSystemMetrics ¶
func GetWindowRect ¶
func GetWindowText ¶
func GlobalFree ¶
func InitCommonControlsEx ¶
func InitCommonControlsEx(icc *INITCOMMONCONTROLSEX) (ok bool)
func IsDialogMessage ¶
func MessageBox ¶
func MessageLoop ¶
https://docs.microsoft.com/en-us/windows/win32/winmsg/using-messages-and-message-queues
func PostQuitMessage ¶
func PostQuitMessage(exitCode int)
func RegisterClassEx ¶
func RegisterClassEx(cls *WNDCLASSEX) (err error)
func ReleaseActCtx ¶
func ReleaseActCtx(actCtx Handle)
func RtlGetNtVersionNumbers ¶
func RtlGetNtVersionNumbers() (majorVersion, minorVersion, buildNumber uint32)
func SHCreateItemFromParsingName ¶
func SHCreateItemFromParsingName(path *uint16, bc *IBindCtx, iid *GUID, item **IShellItem) (res error)
func SHGetPathFromIDListEx ¶
func SHGetPathFromIDListEx(ptr *ITEMIDLIST, path *uint16, pathLen int, opts int) (ok bool)
func SendMessage ¶
func SendMessagePointer ¶
func SetForegroundWindow ¶
func SetWindowPos ¶
func SetWindowText ¶
func ShellNotifyIcon ¶
func ShellNotifyIcon(message uint32, data *NOTIFYICONDATA) (ok bool)
func ShowWindow ¶
func SystemParametersInfo ¶
func TranslateMessage ¶
func UnhookWindowsHookEx ¶
func UnregisterClass ¶
Types ¶
type ACTCTX ¶
type ACTCTX struct { Size uint32 Flags uint32 Source *uint16 ProcessorArchitecture uint16 LangId uint16 AssemblyDirectory *uint16 ResourceName uintptr ApplicationName *uint16 Module Handle }
https://docs.microsoft.com/en-us/windows/win32/api/winbase/ns-winbase-actctxw
type BROWSEINFO ¶
type BROWSEINFO struct { Owner HWND Root Pointer DisplayName *uint16 Title *uint16 Flags uint32 CallbackFunc uintptr LParam *uint16 Image int32 }
https://docs.microsoft.com/en-us/windows/win32/api/shlobj_core/ns-shlobj_core-browseinfow
type CHOOSECOLOR ¶
type CHOOSECOLOR struct { StructSize uint32 Owner HWND Instance HWND RgbResult uint32 CustColors *[16]uint32 Flags uint32 CustData Pointer FnHook uintptr TemplateName *uint16 }
https://docs.microsoft.com/en-us/windows/win32/api/commdlg/ns-commdlg-choosecolorw-r1
type COMDLG_FILTERSPEC ¶
https://docs.microsoft.com/en-us/windows/win32/api/shtypes/ns-shtypes-comdlg_filterspec
type CWPRETSTRUCT ¶
https://docs.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-cwpretstruct
type Handle ¶
func CreateActCtx ¶
func CreateFontIndirect ¶
func ExtractAssociatedIcon ¶
func GetModuleHandle ¶
func GetWindowDC ¶
type IFileDialog ¶
type IFileDialog struct{ IModalWindow }
func (*IFileDialog) GetOptions ¶
func (u *IFileDialog) GetOptions() (fos _FILEOPENDIALOGOPTIONS, err error)
func (*IFileDialog) GetResult ¶
func (u *IFileDialog) GetResult() (item *IShellItem, err error)
func (*IFileDialog) SetDefaultExtension ¶
func (u *IFileDialog) SetDefaultExtension(extension *uint16) (err error)
func (*IFileDialog) SetFileName ¶
func (u *IFileDialog) SetFileName(name *uint16) (err error)
func (*IFileDialog) SetFileTypes ¶
func (u *IFileDialog) SetFileTypes(cFileTypes int, rgFilterSpec *COMDLG_FILTERSPEC) (err error)
func (*IFileDialog) SetFolder ¶
func (u *IFileDialog) SetFolder(item *IShellItem) (err error)
func (*IFileDialog) SetOptions ¶
func (u *IFileDialog) SetOptions(fos _FILEOPENDIALOGOPTIONS) (err error)
func (*IFileDialog) SetTitle ¶
func (u *IFileDialog) SetTitle(title *uint16) (err error)
type IFileOpenDialog ¶
type IFileOpenDialog struct{ IFileDialog }
func (*IFileOpenDialog) GetResults ¶
func (u *IFileOpenDialog) GetResults() (res *IShellItemArray, err error)
type IFileSaveDialog ¶
type IFileSaveDialog struct{ IFileDialog }
type IFileSaveDialogVtbl ¶
type IModalWindow ¶
type IModalWindow struct{ IUnknown }
func (*IModalWindow) Show ¶
func (u *IModalWindow) Show(wnd HWND) (err error)
type INITCOMMONCONTROLSEX ¶
https://docs.microsoft.com/en-us/windows/win32/api/commctrl/ns-commctrl-initcommoncontrolsex
type IShellItem ¶
type IShellItem struct{ IUnknown }
func (*IShellItem) GetDisplayName ¶
func (u *IShellItem) GetDisplayName(name SIGDN) (res string, err error)
type IShellItemArray ¶
type IShellItemArray struct{ IUnknown }
func (*IShellItemArray) GetCount ¶
func (u *IShellItemArray) GetCount() (numItems uint32, err error)
func (*IShellItemArray) GetItemAt ¶
func (u *IShellItemArray) GetItemAt(index uint32) (item *IShellItem, err error)
type ITEMIDLIST ¶
type ITEMIDLIST struct{}
https://docs.microsoft.com/en-us/windows/win32/api/shtypes/ns-shtypes-itemidlist
func SHBrowseForFolder ¶
func SHBrowseForFolder(bi *BROWSEINFO) (ret *ITEMIDLIST)
type LOGFONT ¶
type LOGFONT struct { Height int32 Width int32 Escapement int32 Orientation int32 Weight int32 Italic byte Underline byte StrikeOut byte CharSet byte OutPrecision byte ClipPrecision byte Quality byte PitchAndFamily byte FaceName [32]uint16 }
https://docs.microsoft.com/en-us/windows/win32/api/wingdi/ns-wingdi-logfontw
type MSG ¶
type MSG struct { Owner syscall.Handle Message uint32 WParam uintptr LParam uintptr Time uint32 Pt POINT // contains filtered or unexported fields }
https://docs.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-msg
type NONCLIENTMETRICS ¶
type NONCLIENTMETRICS struct { Size uint32 BorderWidth int32 ScrollWidth int32 ScrollHeight int32 CaptionWidth int32 CaptionHeight int32 CaptionFont LOGFONT SmCaptionWidth int32 SmCaptionHeight int32 SmCaptionFont LOGFONT MenuWidth int32 MenuHeight int32 MenuFont LOGFONT StatusFont LOGFONT MessageFont LOGFONT }
https://docs.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-nonclientmetricsw
type NOTIFYICONDATA ¶
type NOTIFYICONDATA struct { StructSize uint32 Wnd HWND ID uint32 Flags uint32 CallbackMessage uint32 Icon Handle Tip [128]uint16 // NOTIFYICONDATAA_V1_SIZE State uint32 StateMask uint32 Info [256]uint16 Version uint32 InfoTitle [64]uint16 InfoFlags uint32 }
https://docs.microsoft.com/en-us/windows/win32/api/shellapi/ns-shellapi-notifyicondataw
type OPENFILENAME ¶
type OPENFILENAME struct { StructSize uint32 Owner HWND Instance Handle Filter *uint16 CustomFilter *uint16 MaxCustomFilter uint32 FilterIndex uint32 File *uint16 MaxFile uint32 FileTitle *uint16 MaxFileTitle uint32 InitialDir *uint16 Title *uint16 Flags uint32 FileOffset uint16 FileExtension uint16 DefExt *uint16 CustData Pointer FnHook uintptr TemplateName *uint16 FlagsEx uint32 // contains filtered or unexported fields }
https://docs.microsoft.com/en-us/windows/win32/api/commdlg/ns-commdlg-openfilenamew
type POINT ¶
type POINT struct {
X, Y int32
}
https://docs.microsoft.com/en-us/windows/win32/api/windef/ns-windef-point
type SIGDN ¶
type SIGDN int32
https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_core/ne-shobjidl_core-sigdn
const ( SIGDN_NORMALDISPLAY SIGDN = 0x00000000 SIGDN_PARENTRELATIVEPARSING SIGDN = ^(^0x18001 + 0x80000000) SIGDN_DESKTOPABSOLUTEPARSING SIGDN = ^(^0x28000 + 0x80000000) SIGDN_PARENTRELATIVEEDITING SIGDN = ^(^0x31001 + 0x80000000) SIGDN_DESKTOPABSOLUTEEDITING SIGDN = ^(^0x4c000 + 0x80000000) SIGDN_FILESYSPATH SIGDN = ^(^0x58000 + 0x80000000) SIGDN_URL SIGDN = ^(^0x68000 + 0x80000000) SIGDN_PARENTRELATIVEFORADDRESSBAR SIGDN = ^(^0x7c001 + 0x80000000) SIGDN_PARENTRELATIVE SIGDN = ^(^0x80001 + 0x80000000) SIGDN_PARENTRELATIVEFORUI SIGDN = ^(^0x94001 + 0x80000000) )
type SYSTEMTIME ¶
type SYSTEMTIME struct { Year uint16 Month uint16 DayOfWeek uint16 Day uint16 Hour uint16 Minute uint16 Second uint16 Milliseconds uint16 }
https://docs.microsoft.com/en-us/windows/win32/api/minwinbase/ns-minwinbase-systemtime
type WNDCLASSEX ¶
type WNDCLASSEX struct { Size uint32 Style uint32 WndProc uintptr ClsExtra int32 WndExtra int32 Instance Handle Icon Handle Cursor Handle Background Handle MenuName *uint16 ClassName *uint16 IconSm Handle }
https://docs.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-wndclassexw