blob: aa806d032271b146e6e7ff705d154dfafc059903 (
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
|
{%MainUnit ../gdk2x.pas}
{$IFDEF read_interface_rest}
type
{ Offsets to add to X coordinates within window }
{ to get GDK coodinates within window }
{ Set when the window background is temporarily
unset during resizing and scaling }
{ visible rectangle of window }
PGdkXPositionInfo = ^TGdkXPositionInfo;
TGdkXPositionInfo = record
x : gint;
y : gint;
width : gint;
height : gint;
x_offset : gint;
y_offset : gint;
flag0 : word;
clip_rect : TGdkRectangle;
end;
const
bm_TGdkXPositionInfo_big = $1;
bp_TGdkXPositionInfo_big = 0;
bm_TGdkXPositionInfo_mapped = $2;
bp_TGdkXPositionInfo_mapped = 1;
bm_TGdkXPositionInfo_no_bg = $4;
bp_TGdkXPositionInfo_no_bg = 2;
function big(var a : TGdkXPositionInfo) : guint;
procedure set_big(var a : TGdkXPositionInfo; __big : guint);
function mapped(var a : TGdkXPositionInfo) : guint;
procedure set_mapped(var a : TGdkXPositionInfo; __mapped : guint);
function no_bg(var a : TGdkXPositionInfo) : guint;
procedure set_no_bg(var a : TGdkXPositionInfo; __no_bg : guint);
{ Window implementation for X11 }
type
PGdkWindowImplX11 = ^TGdkWindowImplX11;
TGdkWindowImplX11 = record
parent_instance : TGdkDrawableImplX11;
width : gint;
height : gint;
position_info : TGdkXPositionInfo;
flag0 : word;
focus_window : TWindow;
end;
type
PGdkWindowImplX11Class = ^TGdkWindowImplX11Class;
TGdkWindowImplX11Class = record
parent_class : TGdkDrawableImplX11Class;
end;
function GDK_TYPE_WINDOW_IMPL_X11 : GType;
function GDK_WINDOW_IMPL_X11(obj : pointer) : PGdkWindowImplX11;
function GDK_WINDOW_IMPL_X11_CLASS(klass : pointer) : PGdkWindowImplX11Class;
function GDK_IS_WINDOW_IMPL_X11(obj : pointer) : boolean;
function GDK_IS_WINDOW_IMPL_X11_CLASS(klass : pointer) : boolean;
function GDK_WINDOW_IMPL_X11_GET_CLASS(obj : pointer) : PGdkWindowImplX11Class;
{ Set if the window, or any descendent of it, has the focus }
{ Set if !window_has_focus, but events are being sent to the
window because the pointer is in it. (Typically, no window
manager is running. }
{ We use an extra X window for toplevel windows that we XSetInputFocus()
to in order to avoid getting keyboard events redirected to subwindows
that might not even be part of this app }
const
bm_TGdkWindowImplX11_has_focus = $1;
bp_TGdkWindowImplX11_has_focus = 0;
bm_TGdkWindowImplX11_has_pointer_focus = $2;
bp_TGdkWindowImplX11_has_pointer_focus = 1;
function has_focus(var a : TGdkWindowImplX11) : guint;
procedure set_has_focus(var a : TGdkWindowImplX11; __has_focus : guint);
function has_pointer_focus(var a : TGdkWindowImplX11) : guint;
procedure set_has_pointer_focus(var a : TGdkWindowImplX11; __has_pointer_focus : guint);
function gdk_window_impl_x11_get_type:GType;cdecl;external;
{$ENDIF read_interface_rest}
//------------------------------------------------------------------------------
{$IFDEF read_implementation}
function big(var a : TGdkXPositionInfo) : guint;
begin
big:=(a.flag0 and bm_TGdkXPositionInfo_big) shr bp_TGdkXPositionInfo_big;
end;
procedure set_big(var a : TGdkXPositionInfo; __big : guint);
begin
a.flag0:=a.flag0 or ((__big shl bp_TGdkXPositionInfo_big) and bm_TGdkXPositionInfo_big);
end;
function mapped(var a : TGdkXPositionInfo) : guint;
begin
mapped:=(a.flag0 and bm_TGdkXPositionInfo_mapped) shr bp_TGdkXPositionInfo_mapped;
end;
procedure set_mapped(var a : TGdkXPositionInfo; __mapped : guint);
begin
a.flag0:=a.flag0 or ((__mapped shl bp_TGdkXPositionInfo_mapped) and bm_TGdkXPositionInfo_mapped);
end;
function no_bg(var a : TGdkXPositionInfo) : guint;
begin
no_bg:=(a.flag0 and bm_TGdkXPositionInfo_no_bg) shr bp_TGdkXPositionInfo_no_bg;
end;
procedure set_no_bg(var a : TGdkXPositionInfo; __no_bg : guint);
begin
a.flag0:=a.flag0 or ((__no_bg shl bp_TGdkXPositionInfo_no_bg) and bm_TGdkXPositionInfo_no_bg);
end;
function GDK_TYPE_WINDOW_IMPL_X11 : GType;
begin
GDK_TYPE_WINDOW_IMPL_X11:=gdk_window_impl_x11_get_type;
end;
function GDK_WINDOW_IMPL_X11(obj : pointer) : PGdkWindowImplX11;
begin
GDK_WINDOW_IMPL_X11:=PGdkWindowImplX11(G_TYPE_CHECK_INSTANCE_CAST(obj,GDK_TYPE_WINDOW_IMPL_X11));
end;
function GDK_WINDOW_IMPL_X11_CLASS(klass : pointer) : PGdkWindowImplX11Class;
begin
GDK_WINDOW_IMPL_X11_CLASS:=PGdkWindowImplX11Class(G_TYPE_CHECK_CLASS_CAST(klass,GDK_TYPE_WINDOW_IMPL_X11));
end;
function GDK_IS_WINDOW_IMPL_X11(obj : pointer) : boolean;
begin
GDK_IS_WINDOW_IMPL_X11:=G_TYPE_CHECK_INSTANCE_TYPE(obj,GDK_TYPE_WINDOW_IMPL_X11);
end;
function GDK_IS_WINDOW_IMPL_X11_CLASS(klass : pointer) : boolean;
begin
GDK_IS_WINDOW_IMPL_X11_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,GDK_TYPE_WINDOW_IMPL_X11);
end;
function GDK_WINDOW_IMPL_X11_GET_CLASS(obj : pointer) : PGdkWindowImplX11Class;
begin
GDK_WINDOW_IMPL_X11_GET_CLASS:=PGdkWindowImplX11Class(G_TYPE_INSTANCE_GET_CLASS(obj,GDK_TYPE_WINDOW_IMPL_X11));
end;
function has_focus(var a : TGdkWindowImplX11) : guint;
begin
has_focus:=(a.flag0 and bm_TGdkWindowImplX11_has_focus) shr bp_TGdkWindowImplX11_has_focus;
end;
procedure set_has_focus(var a : TGdkWindowImplX11; __has_focus : guint);
begin
a.flag0:=a.flag0 or ((__has_focus shl bp_TGdkWindowImplX11_has_focus) and bm_TGdkWindowImplX11_has_focus);
end;
function has_pointer_focus(var a : TGdkWindowImplX11) : guint;
begin
has_pointer_focus:=(a.flag0 and bm_TGdkWindowImplX11_has_pointer_focus) shr bp_TGdkWindowImplX11_has_pointer_focus;
end;
procedure set_has_pointer_focus(var a : TGdkWindowImplX11; __has_pointer_focus : guint);
begin
a.flag0:=a.flag0 or ((__has_pointer_focus shl bp_TGdkWindowImplX11_has_pointer_focus) and bm_TGdkWindowImplX11_has_pointer_focus);
end;
{$ENDIF read_implementation}
|