summaryrefslogtreecommitdiff
path: root/packages/gtk2/src/gtk+/gtk/gtkscrolledwindow.inc
blob: 2eba92b5326fdbf2d1f05f32dd38d3b6ec77c873 (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
178
179
180
181
182
183
184
185
186
187
188
189
// included by gtk2.pas

{$IFDEF read_forward_definitions}
{$ENDIF read_forward_definitions}

//------------------------------------------------------------------------------

{$IFDEF read_interface_types}
{ Flag used by ::move-focus-out implementation  }
   PGtkScrolledWindow = ^TGtkScrolledWindow;
   TGtkScrolledWindow = record
        container : TGtkBin;
        hscrollbar : PGtkWidget;
        vscrollbar : PGtkWidget;
        flag0 : {$ifdef win32}longint{$else}word{$endif};
        shadow_type : guint16;
     end;

{ Action signals for keybindings. Do not connect to these signals
    }
{ Unfortunately, GtkScrollType is deficient in that there is
     no horizontal/vertical variants for GTK_SCROLL_START/END,
     so we have to add an additional boolean flag.
    }
{ Padding for future expansion  }
   PGtkScrolledWindowClass = ^TGtkScrolledWindowClass;
   TGtkScrolledWindowClass = record
        parent_class : TGtkBinClass;
        scrollbar_spacing : gint;
        scroll_child : procedure (scrolled_window:PGtkScrolledWindow; scroll:TGtkScrollType; horizontal:gboolean); cdecl;
        move_focus_out : procedure (scrolled_window:PGtkScrolledWindow; direction:TGtkDirectionType); cdecl;
        _gtk_reserved1 : procedure ; cdecl;
        _gtk_reserved2 : procedure ; cdecl;
        _gtk_reserved3 : procedure ; cdecl;
        _gtk_reserved4 : procedure ; cdecl;
     end;

{$ENDIF read_interface_types}

//------------------------------------------------------------------------------

{$IFDEF read_interface_rest}
const
   bm_TGtkScrolledWindow_hscrollbar_policy = $3;
   bp_TGtkScrolledWindow_hscrollbar_policy = 0;
   bm_TGtkScrolledWindow_vscrollbar_policy = $C;
   bp_TGtkScrolledWindow_vscrollbar_policy = 2;
   bm_TGtkScrolledWindow_hscrollbar_visible = $10;
   bp_TGtkScrolledWindow_hscrollbar_visible = 4;
   bm_TGtkScrolledWindow_vscrollbar_visible = $20;
   bp_TGtkScrolledWindow_vscrollbar_visible = 5;
   bm_TGtkScrolledWindow_window_placement = $C0;
   bp_TGtkScrolledWindow_window_placement = 6;
   bm_TGtkScrolledWindow_focus_out = $100;
   bp_TGtkScrolledWindow_focus_out = 8;


function GTK_TYPE_SCROLLED_WINDOW : GType;
function GTK_SCROLLED_WINDOW(obj: pointer) : PGtkScrolledWindow;
function GTK_SCROLLED_WINDOW_CLASS(klass: pointer) : PGtkScrolledWindowClass;
function GTK_IS_SCROLLED_WINDOW(obj: pointer) : boolean;
function GTK_IS_SCROLLED_WINDOW_CLASS(klass: pointer) : boolean;
function GTK_SCROLLED_WINDOW_GET_CLASS(obj: pointer) : PGtkScrolledWindowClass;

function hscrollbar_policy(var a : TGtkScrolledWindow) : guint;
procedure set_hscrollbar_policy(var a : TGtkScrolledWindow; __hscrollbar_policy : guint);
function vscrollbar_policy(var a : TGtkScrolledWindow) : guint;
procedure set_vscrollbar_policy(var a : TGtkScrolledWindow; __vscrollbar_policy : guint);
function hscrollbar_visible(var a : TGtkScrolledWindow) : guint;
procedure set_hscrollbar_visible(var a : TGtkScrolledWindow; __hscrollbar_visible : guint);
function vscrollbar_visible(var a : TGtkScrolledWindow) : guint;
procedure set_vscrollbar_visible(var a : TGtkScrolledWindow; __vscrollbar_visible : guint);
function window_placement(var a : TGtkScrolledWindow) : guint;
procedure set_window_placement(var a : TGtkScrolledWindow; __window_placement : guint);
function focus_out(var a : TGtkScrolledWindow) : guint; overload;
procedure set_focus_out(var a : TGtkScrolledWindow; __focus_out : guint); overload;

function gtk_scrolled_window_get_type:TGtkType; cdecl; external gtklib;
function gtk_scrolled_window_new(hadjustment:PGtkAdjustment; vadjustment:PGtkAdjustment):PGtkWidget; cdecl; external gtklib;
procedure gtk_scrolled_window_set_hadjustment(scrolled_window:PGtkScrolledWindow; hadjustment:PGtkAdjustment); cdecl; external gtklib;
procedure gtk_scrolled_window_set_vadjustment(scrolled_window:PGtkScrolledWindow; hadjustment:PGtkAdjustment); cdecl; external gtklib;
function gtk_scrolled_window_get_hadjustment(scrolled_window:PGtkScrolledWindow):PGtkAdjustment; cdecl; external gtklib;
function gtk_scrolled_window_get_vadjustment(scrolled_window:PGtkScrolledWindow):PGtkAdjustment; cdecl; external gtklib;
procedure gtk_scrolled_window_set_policy(scrolled_window:PGtkScrolledWindow; hscrollbar_policy:TGtkPolicyType; vscrollbar_policy:TGtkPolicyType); cdecl; external gtklib;
procedure gtk_scrolled_window_get_policy(scrolled_window:PGtkScrolledWindow; hscrollbar_policy:PGtkPolicyType; vscrollbar_policy:PGtkPolicyType); cdecl; external gtklib;
procedure gtk_scrolled_window_set_placement(scrolled_window:PGtkScrolledWindow; window_placement:TGtkCornerType); cdecl; external gtklib;
function gtk_scrolled_window_get_placement(scrolled_window:PGtkScrolledWindow):TGtkCornerType; cdecl; external gtklib;
procedure gtk_scrolled_window_set_shadow_type(scrolled_window:PGtkScrolledWindow; _type:TGtkShadowType); cdecl; external gtklib;
function gtk_scrolled_window_get_shadow_type(scrolled_window:PGtkScrolledWindow):TGtkShadowType; cdecl; external gtklib;
procedure gtk_scrolled_window_add_with_viewport(scrolled_window:PGtkScrolledWindow; child:PGtkWidget); cdecl; external gtklib;
{$ENDIF read_interface_rest}

//------------------------------------------------------------------------------

{$IFDEF read_implementation}
function GTK_TYPE_SCROLLED_WINDOW : GType;
begin
   GTK_TYPE_SCROLLED_WINDOW:=gtk_scrolled_window_get_type;
end;

function GTK_SCROLLED_WINDOW(obj: pointer) : PGtkScrolledWindow;
begin
   GTK_SCROLLED_WINDOW:=PGtkScrolledWindow(GTK_CHECK_CAST(obj,GTK_TYPE_SCROLLED_WINDOW));
end;

function GTK_SCROLLED_WINDOW_CLASS(klass: pointer) : PGtkScrolledWindowClass;
begin
   GTK_SCROLLED_WINDOW_CLASS:=PGtkScrolledWindowClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_SCROLLED_WINDOW));
end;

function GTK_IS_SCROLLED_WINDOW(obj: pointer) : boolean;
begin
   GTK_IS_SCROLLED_WINDOW:=GTK_CHECK_TYPE(obj,GTK_TYPE_SCROLLED_WINDOW);
end;

function GTK_IS_SCROLLED_WINDOW_CLASS(klass: pointer) : boolean;
begin
   GTK_IS_SCROLLED_WINDOW_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_SCROLLED_WINDOW);
end;

function GTK_SCROLLED_WINDOW_GET_CLASS(obj: pointer) : PGtkScrolledWindowClass;
begin
   GTK_SCROLLED_WINDOW_GET_CLASS:=PGtkScrolledWindowClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_SCROLLED_WINDOW));
end;

function hscrollbar_policy(var a : TGtkScrolledWindow) : guint;
begin
   hscrollbar_policy:=(a.flag0 and bm_TGtkScrolledWindow_hscrollbar_policy) shr bp_TGtkScrolledWindow_hscrollbar_policy;
end;

procedure set_hscrollbar_policy(var a : TGtkScrolledWindow; __hscrollbar_policy : guint);
begin
   a.flag0:=a.flag0 or ((__hscrollbar_policy shl bp_TGtkScrolledWindow_hscrollbar_policy) and bm_TGtkScrolledWindow_hscrollbar_policy);
end;

function vscrollbar_policy(var a : TGtkScrolledWindow) : guint;
begin
   vscrollbar_policy:=(a.flag0 and bm_TGtkScrolledWindow_vscrollbar_policy) shr bp_TGtkScrolledWindow_vscrollbar_policy;
end;

procedure set_vscrollbar_policy(var a : TGtkScrolledWindow; __vscrollbar_policy : guint);
begin
   a.flag0:=a.flag0 or ((__vscrollbar_policy shl bp_TGtkScrolledWindow_vscrollbar_policy) and bm_TGtkScrolledWindow_vscrollbar_policy);
end;

function hscrollbar_visible(var a : TGtkScrolledWindow) : guint;
begin
   hscrollbar_visible:=(a.flag0 and bm_TGtkScrolledWindow_hscrollbar_visible) shr bp_TGtkScrolledWindow_hscrollbar_visible;
end;

procedure set_hscrollbar_visible(var a : TGtkScrolledWindow; __hscrollbar_visible : guint);
begin
   a.flag0:=a.flag0 or ((__hscrollbar_visible shl bp_TGtkScrolledWindow_hscrollbar_visible) and bm_TGtkScrolledWindow_hscrollbar_visible);
end;

function vscrollbar_visible(var a : TGtkScrolledWindow) : guint;
begin
   vscrollbar_visible:=(a.flag0 and bm_TGtkScrolledWindow_vscrollbar_visible) shr bp_TGtkScrolledWindow_vscrollbar_visible;
end;

procedure set_vscrollbar_visible(var a : TGtkScrolledWindow; __vscrollbar_visible : guint);
begin
   a.flag0:=a.flag0 or ((__vscrollbar_visible shl bp_TGtkScrolledWindow_vscrollbar_visible) and bm_TGtkScrolledWindow_vscrollbar_visible);
end;

function window_placement(var a : TGtkScrolledWindow) : guint;
begin
   window_placement:=(a.flag0 and bm_TGtkScrolledWindow_window_placement) shr bp_TGtkScrolledWindow_window_placement;
end;

procedure set_window_placement(var a : TGtkScrolledWindow; __window_placement : guint);
begin
   a.flag0:=a.flag0 or ((__window_placement shl bp_TGtkScrolledWindow_window_placement) and bm_TGtkScrolledWindow_window_placement);
end;

function focus_out(var a : TGtkScrolledWindow) : guint;
begin
   focus_out:=(a.flag0 and bm_TGtkScrolledWindow_focus_out) shr bp_TGtkScrolledWindow_focus_out;
end;

procedure set_focus_out(var a : TGtkScrolledWindow; __focus_out : guint);
begin
   a.flag0:=a.flag0 or ((__focus_out shl bp_TGtkScrolledWindow_focus_out) and bm_TGtkScrolledWindow_focus_out);
end;

{$ENDIF read_implementation}
// included by gtk2.pas