gdi32.odin 1.0 KB

1234567891011121314151617181920212223242526
  1. // +build windows
  2. package win32
  3. foreign import "system:gdi32.lib"
  4. WHITENESS :: 0x00FF0062;
  5. BLACKNESS :: 0x00000042;
  6. @(default_calling_convention = "std")
  7. foreign gdi32 {
  8. @(link_name="GetStockObject") get_stock_object :: proc(fn_object: i32) -> Hgdiobj ---;
  9. @(link_name="StretchDIBits")
  10. stretch_dibits :: proc(hdc: Hdc,
  11. x_dst, y_dst, width_dst, height_dst: i32,
  12. x_src, y_src, width_src, header_src: i32,
  13. bits: rawptr, bits_info: ^Bitmap_Info,
  14. usage: u32,
  15. rop: u32) -> i32 ---;
  16. @(link_name="SetPixelFormat") set_pixel_format :: proc(hdc: Hdc, pixel_format: i32, pfd: ^Pixel_Format_Descriptor) -> Bool ---;
  17. @(link_name="ChoosePixelFormat") choose_pixel_format :: proc(hdc: Hdc, pfd: ^Pixel_Format_Descriptor) -> i32 ---;
  18. @(link_name="SwapBuffers") swap_buffers :: proc(hdc: Hdc) -> Bool ---;
  19. @(link_name="PatBlt") pat_blt :: proc(hdc: Hdc, x, y, w, h: i32, rop: u32) -> Bool ---;
  20. }