gdi32.odin 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. // +build windows
  2. package sys_windows
  3. foreign import gdi32 "system:Gdi32.lib"
  4. @(default_calling_convention="stdcall")
  5. foreign gdi32 {
  6. GetStockObject :: proc(i: c_int) -> HGDIOBJ ---
  7. SelectObject :: proc(hdc: HDC, h: HGDIOBJ) -> HGDIOBJ ---
  8. CreateDIBPatternBrush :: proc(h: HGLOBAL, iUsage: UINT) -> HBRUSH ---
  9. CreateDIBitmap :: proc(
  10. hdc: HDC,
  11. pbmih: ^BITMAPINFOHEADER,
  12. flInit: DWORD,
  13. pjBits: VOID,
  14. pbmi: ^BITMAPINFO,
  15. iUsage: UINT,
  16. ) -> HBITMAP ---
  17. CreateDIBSection :: proc(
  18. hdc: HDC,
  19. pbmi: ^BITMAPINFO,
  20. usage: UINT,
  21. ppvBits: VOID,
  22. hSection: HANDLE,
  23. offset: DWORD,
  24. ) -> HBITMAP ---
  25. StretchDIBits :: proc(
  26. hdc: HDC,
  27. xDest: c_int,
  28. yDest: c_int,
  29. DestWidth: c_int,
  30. DestHeight: c_int,
  31. xSrc: c_int,
  32. ySrc: c_int,
  33. SrcWidth: c_int,
  34. SrcHeight: c_int,
  35. lpBits: VOID,
  36. lpbmi: ^BITMAPINFO,
  37. iUsage: UINT,
  38. rop: DWORD,
  39. ) -> c_int ---
  40. StretchBlt :: proc(
  41. hdcDest: HDC,
  42. xDest: c_int,
  43. yDest: c_int,
  44. wDest: c_int,
  45. hDest: c_int,
  46. hdcSrc: HDC,
  47. xSrc: c_int,
  48. ySrc: c_int,
  49. wSrc: c_int,
  50. hSrc: c_int,
  51. rop: DWORD,
  52. ) -> BOOL ---
  53. SetPixelFormat :: proc(hdc: HDC, format: c_int, ppfd: ^PIXELFORMATDESCRIPTOR) -> BOOL ---
  54. ChoosePixelFormat :: proc(hdc: HDC, ppfd: ^PIXELFORMATDESCRIPTOR) -> c_int ---
  55. SwapBuffers :: proc(HDC) -> BOOL ---
  56. PatBlt :: proc(hdc: HDC, x, y, w, h: c_int, rop: DWORD) -> BOOL ---
  57. }