shell32.odin 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. }
  25. APPBARDATA :: struct {
  26. cbSize: DWORD,
  27. hWnd: HWND,
  28. uCallbackMessage: UINT,
  29. uEdge: UINT,
  30. rc: RECT,
  31. lParam: LPARAM,
  32. }
  33. PAPPBARDATA :: ^APPBARDATA
  34. ABM_NEW :: 0x00000000
  35. ABM_REMOVE :: 0x00000001
  36. ABM_QUERYPOS :: 0x00000002
  37. ABM_SETPOS :: 0x00000003
  38. ABM_GETSTATE :: 0x00000004
  39. ABM_GETTASKBARPOS :: 0x00000005
  40. ABM_ACTIVATE :: 0x00000006
  41. ABM_GETAUTOHIDEBAR :: 0x00000007
  42. ABM_SETAUTOHIDEBAR :: 0x00000008
  43. ABM_WINDOWPOSCHANGED :: 0x0000009
  44. ABM_SETSTATE :: 0x0000000a
  45. ABN_STATECHANGE :: 0x0000000
  46. ABN_POSCHANGED :: 0x0000001
  47. ABN_FULLSCREENAPP :: 0x0000002
  48. ABN_WINDOWARRANGE :: 0x0000003
  49. ABS_AUTOHIDE :: 0x0000001
  50. ABS_ALWAYSONTOP :: 0x0000002
  51. ABE_LEFT :: 0
  52. ABE_TOP :: 1
  53. ABE_RIGHT :: 2
  54. ABE_BOTTOM :: 3