summaryrefslogtreecommitdiffhomepage
path: root/src/internal/gdi/gdi_window.h
blob: eecf0236f268241c55e3fe6218a95af149991cd9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
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