shell32.odin 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. // +build windows
  2. package sys_windows
  3. foreign import shell32 "system:Shell32.lib"
  4. @(default_calling_convention="stdcall")
  5. foreign shell32 {
  6. CommandLineToArgvW :: proc(cmd_list: wstring, num_args: ^c_int) -> ^wstring ---
  7. ShellExecuteW :: proc(
  8. hwnd: HWND,
  9. lpOperation: LPCWSTR,
  10. lpFile: LPCWSTR,
  11. lpParameters: LPCWSTR,
  12. lpDirectory: LPCWSTR,
  13. nShowCmd: INT,
  14. ) -> HINSTANCE ---
  15. ShellExecuteExW :: proc(pExecInfo: ^SHELLEXECUTEINFOW) -> BOOL ---
  16. SHCreateDirectoryExW :: proc(
  17. hwnd: HWND,
  18. pszPath: LPCWSTR,
  19. psa: ^SECURITY_ATTRIBUTES,
  20. ) -> c_int ---
  21. SHFileOperationW :: proc(lpFileOp: LPSHFILEOPSTRUCTW) -> c_int ---
  22. SHGetFolderPathW :: proc(hwnd: HWND, csidl: c_int, hToken: HANDLE, dwFlags: DWORD, pszPath: LPWSTR) -> HRESULT ---
  23. SHAppBarMessage :: proc(dwMessage: DWORD, pData: PAPPBARDATA) -> UINT_PTR ---
  24. Shell_NotifyIconW :: proc(dwMessage: DWORD, lpData: ^NOTIFYICONDATAW) -> BOOL ---
  25. }
  26. APPBARDATA :: struct {
  27. cbSize: DWORD,
  28. hWnd: HWND,
  29. uCallbackMessage: UINT,
  30. uEdge: UINT,
  31. rc: RECT,
  32. lParam: LPARAM,
  33. }
  34. PAPPBARDATA :: ^APPBARDATA
  35. ABM_NEW :: 0x00000000
  36. ABM_REMOVE :: 0x00000001
  37. ABM_QUERYPOS :: 0x00000002
  38. ABM_SETPOS :: 0x00000003
  39. ABM_GETSTATE :: 0x00000004
  40. ABM_GETTASKBARPOS :: 0x00000005
  41. ABM_ACTIVATE :: 0x00000006
  42. ABM_GETAUTOHIDEBAR :: 0x00000007
  43. ABM_SETAUTOHIDEBAR :: 0x00000008
  44. ABM_WINDOWPOSCHANGED :: 0x0000009
  45. ABM_SETSTATE :: 0x0000000a
  46. ABN_STATECHANGE :: 0x0000000
  47. ABN_POSCHANGED :: 0x0000001
  48. ABN_FULLSCREENAPP :: 0x0000002
  49. ABN_WINDOWARRANGE :: 0x0000003
  50. ABS_AUTOHIDE :: 0x0000001
  51. ABS_ALWAYSONTOP :: 0x0000002
  52. ABE_LEFT :: 0
  53. ABE_TOP :: 1
  54. ABE_RIGHT :: 2
  55. ABE_BOTTOM :: 3