diff options
author | midipix <writeonce@midipix.org> | 2016-07-06 13:37:22 -0400 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-07-21 03:47:25 -0400 |
commit | 3882290b0246d8ba1a63ff4000303804b344570e (patch) | |
tree | 497666af2d2260823969169da44d505c4bd786ae /src/internal/gdi/gdi_window.h | |
parent | 64c88753aee1bbfeee00f9eeb5c561b839873f8d (diff) | |
download | ptycon-3882290b0246d8ba1a63ff4000303804b344570e.tar.bz2 ptycon-3882290b0246d8ba1a63ff4000303804b344570e.tar.xz |
free-standing environment: added minimal gdi definitions and accessor table.
Diffstat (limited to 'src/internal/gdi/gdi_window.h')
-rw-r--r-- | src/internal/gdi/gdi_window.h | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/src/internal/gdi/gdi_window.h b/src/internal/gdi/gdi_window.h new file mode 100644 index 0000000..eecf023 --- /dev/null +++ b/src/internal/gdi/gdi_window.h @@ -0,0 +1,95 @@ +#ifndef GDI_WINDOW_H +#define GDI_WINDOW_H + +#include <psxtypes/psxtypes.h> + + +#define GDI_GWL_USERDATA (-21) +#define GDI_GWL_EXSTYLE (-20) +#define GDI_GWL_STYLE (-16) +#define GDI_GWL_ID (-12) +#define GDI_GWL_HINSTANCE (-6) +#define GDI_GWL_WNDPROC (-4) + + +typedef struct _gdi_point { + int32_t x; + int32_t y; +} gdi_point; + +typedef struct _gdi_rect { + int32_t left; + int32_t top; + int32_t right; + int32_t bottom; +} gdi_rect; + + +typedef struct _gdi_msg { + void * hwnd; + uint32_t message; + uintptr_t wparam; + intptr_t lparam; + uint32_t time; + gdi_point pt; +} gdi_msg; + + +typedef int32_t __stdcall gdi_peek_message( + gdi_msg * msg, + void * hwnd, + uint32_t msg_filter_min, + uint32_t msg_filter_max, + uint32_t remove_msg); + +typedef gdi_peek_message gdi_peek_message_ansi; +typedef gdi_peek_message gdi_peek_message_utf16; + +typedef int32_t __stdcall gdi_get_system_metrics( + int32_t index); + +typedef int32_t __stdcall gdi_is_iconic( + void * hwnd); + +typedef int32_t __stdcall gdi_is_zoomed( + void * hwnd); + +typedef int32_t __stdcall gdi_move_window( + void * hwnd, + int32_t x, + int32_t y, + int32_t nwindth, + int32_t nheight, + int32_t repaint); + + +typedef int32_t __stdcall gdi_set_window_pos( + void * hwnd, + void * hwnd_insert_after, + int32_t x, + int32_t y, + int32_t cx, + int32_t cy, + uint32_t flags); + + +typedef int32_t __stdcall gdi_get_window_rect( + void * hwnd, + gdi_rect * rect); + +typedef int32_t __stdcall gdi_get_client_rect( + void * hwnd, + gdi_rect * rect); + +typedef void * __stdcall gdi_get_desktop_window(void); + + +typedef int32_t __stdcall gdi_set_window_long_ptr( + void * hwnd, + int32_t index, + intptr_t new_long); + +typedef gdi_set_window_long_ptr gdi_set_window_long_ptr_ansi; +typedef gdi_set_window_long_ptr gdi_set_window_long_ptr_utf16; + +#endif |