PageRenderTime 70ms CodeModel.GetById 13ms app.highlight 53ms RepoModel.GetById 0ms app.codeStats 1ms

/packages/gtk2/src/gtk+/gtk/gtkstyle.inc

https://github.com/slibre/freepascal
Pascal | 398 lines | 300 code | 36 blank | 62 comment | 0 complexity | ee29a7639b31535f29e6e0bcfb7b9a87 MD5 | raw file
Possible License(s): LGPL-2.0, LGPL-2.1, LGPL-3.0
  1// included by gtk2.pas
  2
  3{$IFDEF read_forward_definitions}
  4   PGtkStyle = ^TGtkStyle;
  5{$ENDIF read_forward_definitions}
  6
  7//------------------------------------------------------------------------------
  8
  9{$IFDEF read_interface_types}
 10  // internal type
 11  PGtkIconSource = pointer;
 12
 13
 14{ Some forward declarations needed to rationalize the header
 15   files.
 16  }
 17   TGtkRcPropertyParser = function (pspec:PGParamSpec; rc_string:PGString; property_value:PGValue):gboolean; cdecl;
 18{ We make this forward declaration here, since we pass
 19   GtkWidget's to the draw functions.
 20  }
 21
 22
 23{< public > }
 24{ Halfway between text/base  }
 25{< private > }
 26{ Font description for style->private_font or %NULL  }
 27{ the RcStyle from which this style was created  }
 28{ of type GtkStyle   }
 29{ of type GtkIconFactory   }
 30   TGtkStyle = record
 31        parent_instance : TGObject;
 32        fg : array[0..4] of TGdkColor;
 33        bg : array[0..4] of TGdkColor;
 34        light : array[0..4] of TGdkColor;
 35        dark : array[0..4] of TGdkColor;
 36        mid : array[0..4] of TGdkColor;
 37        text : array[0..4] of TGdkColor;
 38        base : array[0..4] of TGdkColor;
 39        text_aa : array[0..4] of TGdkColor;
 40        black : TGdkColor;
 41        white : TGdkColor;
 42        font_desc : PPangoFontDescription;
 43        xthickness : gint;
 44        ythickness : gint;
 45        fg_gc : array[0..4] of PGdkGC;
 46        bg_gc : array[0..4] of PGdkGC;
 47        light_gc : array[0..4] of PGdkGC;
 48        dark_gc : array[0..4] of PGdkGC;
 49        mid_gc : array[0..4] of PGdkGC;
 50        text_gc : array[0..4] of PGdkGC;
 51        base_gc : array[0..4] of PGdkGC;
 52        text_aa_gc : array[0..4] of PGdkGC;
 53        black_gc : PGdkGC;
 54        white_gc : PGdkGC;
 55        bg_pixmap : array[0..4] of PGdkPixmap;
 56        attach_count : gint;
 57        depth : gint;
 58        colormap : PGdkColormap;
 59        private_font : PGdkFont;
 60        private_font_desc : PPangoFontDescription;
 61        rc_style : PGtkRcStyle;
 62        styles : PGSList;
 63        property_cache : PGArray;
 64        icon_factories : PGSList;
 65     end;
 66
 67{ Initialize for a particular colormap/depth
 68     combination. style->colormap/style->depth will have
 69     been set at this point. Will typically chain to parent.
 70    }
 71{ Clean up for a particular colormap/depth combination. Will
 72     typically chain to parent.
 73    }
 74{ Make style an exact duplicate of src.
 75    }
 76{ Create an empty style of the same type as this style.
 77     The default implementation, which does
 78     g_object_new (G_OBJECT_TYPE (style), NULL);
 79     should work in most cases.
 80    }
 81{ Initialize the GtkStyle with the values in the GtkRcStyle.
 82     should chain to the parent implementation.
 83    }
 84{ Drawing functions
 85    }
 86{ Padding for future expansion  }
 87   PGtkStyleClass = ^TGtkStyleClass;
 88   TGtkStyleClass = record
 89        parent_class : TGObjectClass;
 90        realize : procedure (style:PGtkStyle); cdecl;
 91        unrealize : procedure (style:PGtkStyle); cdecl;
 92        copy : procedure (style:PGtkStyle; src:PGtkStyle); cdecl;
 93        clone : function (style:PGtkStyle):PGtkStyle; cdecl;
 94        init_from_rc : procedure (style:PGtkStyle; rc_style:PGtkRcStyle); cdecl;
 95        set_background : procedure (style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType); cdecl;
 96        render_icon : function (style:PGtkStyle; source:PGtkIconSource; direction:TGtkTextDirection; state:TGtkStateType; size:TGtkIconSize;
 97                     widget:PGtkWidget; detail:Pgchar):PGdkPixbuf; cdecl;
 98        draw_hline : procedure (style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; area:PGdkRectangle; widget:PGtkWidget;
 99                      detail:Pgchar; x1:gint; x2:gint; y:gint); cdecl;
100        draw_vline : procedure (style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; area:PGdkRectangle; widget:PGtkWidget;
101                      detail:Pgchar; y1:gint; y2:gint; x:gint); cdecl;
102        draw_shadow : procedure (style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; area:PGdkRectangle;
103                      widget:PGtkWidget; detail:Pgchar; x:gint; y:gint; width:gint;
104                      height:gint); cdecl;
105        draw_polygon : procedure (style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; area:PGdkRectangle;
106                      widget:PGtkWidget; detail:Pgchar; point:PGdkPoint; npoints:gint; fill:gboolean); cdecl;
107        draw_arrow : procedure (style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; area:PGdkRectangle;
108                      widget:PGtkWidget; detail:Pgchar; arrow_type:TGtkArrowType; fill:gboolean; x:gint;
109                      y:gint; width:gint; height:gint); cdecl;
110        draw_diamond : procedure (style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; area:PGdkRectangle;
111                      widget:PGtkWidget; detail:Pgchar; x:gint; y:gint; width:gint;
112                      height:gint); cdecl;
113        draw_string : procedure (style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; area:PGdkRectangle; widget:PGtkWidget;
114                      detail:Pgchar; x:gint; y:gint; _string:Pgchar); cdecl;
115        draw_box : procedure (style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; area:PGdkRectangle;
116                      widget:PGtkWidget; detail:Pgchar; x:gint; y:gint; width:gint;
117                      height:gint); cdecl;
118        draw_flat_box : procedure (style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; area:PGdkRectangle;
119                      widget:PGtkWidget; detail:Pgchar; x:gint; y:gint; width:gint;
120                      height:gint); cdecl;
121        draw_check : procedure (style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; area:PGdkRectangle;
122                      widget:PGtkWidget; detail:Pgchar; x:gint; y:gint; width:gint;
123                      height:gint); cdecl;
124        draw_option : procedure (style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; area:PGdkRectangle;
125                      widget:PGtkWidget; detail:Pgchar; x:gint; y:gint; width:gint;
126                      height:gint); cdecl;
127        draw_tab : procedure (style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; area:PGdkRectangle;
128                      widget:PGtkWidget; detail:Pgchar; x:gint; y:gint; width:gint;
129                      height:gint); cdecl;
130        draw_shadow_gap : procedure (style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; area:PGdkRectangle;
131                      widget:PGtkWidget; detail:Pgchar; x:gint; y:gint; width:gint;
132                      height:gint; gap_side:TGtkPositionType; gap_x:gint; gap_width:gint); cdecl;
133        draw_box_gap : procedure (style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; area:PGdkRectangle;
134                      widget:PGtkWidget; detail:Pgchar; x:gint; y:gint; width:gint;
135                      height:gint; gap_side:TGtkPositionType; gap_x:gint; gap_width:gint); cdecl;
136        draw_extension : procedure (style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; area:PGdkRectangle;
137                      widget:PGtkWidget; detail:Pgchar; x:gint; y:gint; width:gint;
138                      height:gint; gap_side:TGtkPositionType); cdecl;
139        draw_focus : procedure (style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; area:PGdkRectangle; widget:PGtkWidget;
140                      detail:Pgchar; x:gint; y:gint; width:gint; height:gint); cdecl;
141        draw_slider : procedure (style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; area:PGdkRectangle;
142                      widget:PGtkWidget; detail:Pgchar; x:gint; y:gint; width:gint;
143                      height:gint; orientation:TGtkOrientation); cdecl;
144        draw_handle : procedure (style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; area:PGdkRectangle;
145                      widget:PGtkWidget; detail:Pgchar; x:gint; y:gint; width:gint;
146                      height:gint; orientation:TGtkOrientation); cdecl;
147        draw_expander : procedure (style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; area:PGdkRectangle; widget:PGtkWidget;
148                      detail:Pgchar; x:gint; y:gint; expander_style:TGtkExpanderStyle); cdecl;
149        draw_layout : procedure (style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; use_text:gboolean; area:PGdkRectangle;
150                      widget:PGtkWidget; detail:Pgchar; x:gint; y:gint; layout:PPangoLayout); cdecl;
151        draw_resize_grip : procedure (style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; area:PGdkRectangle; widget:PGtkWidget;
152                      detail:Pgchar; edge:TGdkWindowEdge; x:gint; y:gint; width:gint;
153                      height:gint); cdecl;
154        _gtk_reserved1 : procedure ; cdecl;
155        _gtk_reserved2 : procedure ; cdecl;
156        _gtk_reserved3 : procedure ; cdecl;
157        _gtk_reserved4 : procedure ; cdecl;
158        _gtk_reserved5 : procedure ; cdecl;
159        _gtk_reserved6 : procedure ; cdecl;
160        _gtk_reserved7 : procedure ; cdecl;
161        _gtk_reserved8 : procedure ; cdecl;
162        _gtk_reserved9 : procedure ; cdecl;
163        _gtk_reserved10 : procedure ; cdecl;
164        _gtk_reserved11 : procedure ; cdecl;
165        _gtk_reserved12 : procedure ; cdecl;
166     end;
167
168   PGtkBorder = ^TGtkBorder;
169   TGtkBorder = record
170        left : gint;
171        right : gint;
172        top : gint;
173        bottom : gint;
174     end;
175
176{$ENDIF read_interface_types}
177
178//------------------------------------------------------------------------------
179
180{$IFDEF read_interface_rest}
181function GTK_TYPE_STYLE : GType;
182function GTK_STYLE(anObject: pointer) : PGtkStyle;
183function GTK_STYLE_CLASS(klass: pointer) : PGtkStyleClass;
184function GTK_IS_STYLE(anObject: pointer) : boolean;
185function GTK_IS_STYLE_CLASS(klass: pointer) : boolean;
186function GTK_STYLE_GET_CLASS(obj: pointer) : PGtkStyleClass;
187function GTK_TYPE_BORDER : GType;
188function GTK_STYLE_ATTACHED(style : pointer) : boolean;
189
190
191function gtk_style_get_type:GType; cdecl; external gtklib;
192function gtk_style_new:PGtkStyle; cdecl; external gtklib;
193function gtk_style_copy(style:PGtkStyle):PGtkStyle; cdecl; external gtklib;
194function gtk_style_attach(style:PGtkStyle; window:PGdkWindow):PGtkStyle; cdecl; external gtklib;
195procedure gtk_style_detach(style:PGtkStyle); cdecl; external gtklib;
196
197{$ifndef GTK_DISABLE_DEPRECATED}
198function gtk_style_ref(style:PGtkStyle):PGtkStyle; cdecl; external gtklib;
199procedure gtk_style_unref(style:PGtkStyle); cdecl; external gtklib;
200
201{$ifndef GDK_MULTIHEAD_SAFE}
202function gtk_style_get_font(style:PGtkStyle):PGdkFont; cdecl; external gtklib;
203{$endif}
204
205function gtk_style_get_font_for_display(display:PGdkDisplay; style:PGtkStyle):PGdkFont; cdecl; external gtklib;
206procedure gtk_style_set_font(style:PGtkStyle; font:PGdkFont); cdecl; external gtklib;
207{$endif}
208{ GTK_DISABLE_DEPRECATED  }
209
210procedure gtk_style_set_background(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType); cdecl; external gtklib;
211procedure gtk_style_apply_default_background(style:PGtkStyle; window:PGdkWindow; set_bg:gboolean; state_type:TGtkStateType; area:PGdkRectangle;
212            x:gint; y:gint; width:gint; height:gint); cdecl; external gtklib;
213function gtk_style_lookup_icon_set(style:PGtkStyle; stock_id:Pgchar):PGtkIconSet; cdecl; external gtklib;
214function gtk_style_render_icon(style:PGtkStyle; source:PGtkIconSource; direction:TGtkTextDirection; state:TGtkStateType; size:TGtkIconSize;
215           widget:PGtkWidget; detail:Pgchar):PGdkPixbuf; cdecl; external gtklib;
216{$ifndef GTK_DISABLE_DEPRECATED}
217
218procedure gtk_draw_hline(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; x1:gint; x2:gint;
219            y:gint); cdecl; external gtklib;
220procedure gtk_draw_vline(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; y1:gint; y2:gint;
221            x:gint); cdecl; external gtklib;
222procedure gtk_draw_shadow(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; x:gint;
223            y:gint; width:gint; height:gint); cdecl; external gtklib;
224procedure gtk_draw_polygon(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; points:PGdkPoint;
225            npoints:gint; fill:gboolean); cdecl; external gtklib;
226procedure gtk_draw_arrow(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; arrow_type:TGtkArrowType;
227            fill:gboolean; x:gint; y:gint; width:gint; height:gint); cdecl; external gtklib;
228procedure gtk_draw_diamond(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; x:gint;
229            y:gint; width:gint; height:gint); cdecl; external gtklib;
230procedure gtk_draw_box(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; x:gint;
231            y:gint; width:gint; height:gint); cdecl; external gtklib;
232procedure gtk_draw_flat_box(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; x:gint;
233            y:gint; width:gint; height:gint); cdecl; external gtklib;
234procedure gtk_draw_check(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; x:gint;
235            y:gint; width:gint; height:gint); cdecl; external gtklib;
236procedure gtk_draw_option(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; x:gint;
237            y:gint; width:gint; height:gint); cdecl; external gtklib;
238procedure gtk_draw_tab(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; x:gint;
239            y:gint; width:gint; height:gint); cdecl; external gtklib;
240procedure gtk_draw_shadow_gap(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; x:gint;
241            y:gint; width:gint; height:gint; gap_side:TGtkPositionType; gap_x:gint;
242            gap_width:gint); cdecl; external gtklib;
243procedure gtk_draw_box_gap(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; x:gint;
244            y:gint; width:gint; height:gint; gap_side:TGtkPositionType; gap_x:gint;
245            gap_width:gint); cdecl; external gtklib;
246procedure gtk_draw_extension(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; x:gint;
247            y:gint; width:gint; height:gint; gap_side:TGtkPositionType); cdecl; external gtklib;
248procedure gtk_draw_focus(style:PGtkStyle; window:PGdkWindow; x:gint; y:gint; width:gint;
249            height:gint); cdecl; external gtklib;
250procedure gtk_draw_slider(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; x:gint;
251            y:gint; width:gint; height:gint; orientation:TGtkOrientation); cdecl; external gtklib;
252procedure gtk_draw_handle(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; x:gint;
253            y:gint; width:gint; height:gint; orientation:TGtkOrientation); cdecl; external gtklib;
254procedure gtk_draw_expander(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; x:gint; y:gint;
255            expander_style:TGtkExpanderStyle); cdecl; external gtklib;
256procedure gtk_draw_layout(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; use_text:gboolean; x:gint;
257            y:gint; layout:PPangoLayout); cdecl; external gtklib;
258procedure gtk_draw_resize_grip(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; edge:TGdkWindowEdge; x:gint;
259            y:gint; width:gint; height:gint); cdecl; external gtklib;
260{$endif}
261{ GTK_DISABLE_DEPRECATED  }
262
263procedure gtk_paint_hline(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; area:PGdkRectangle; widget:PGtkWidget;
264            detail:Pgchar; x1:gint; x2:gint; y:gint); cdecl; external gtklib;
265procedure gtk_paint_vline(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; area:PGdkRectangle; widget:PGtkWidget;
266            detail:Pgchar; y1:gint; y2:gint; x:gint); cdecl; external gtklib;
267procedure gtk_paint_shadow(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; area:PGdkRectangle;
268            widget:PGtkWidget; detail:Pgchar; x:gint; y:gint; width:gint;
269            height:gint); cdecl; external gtklib;
270procedure gtk_paint_polygon(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; area:PGdkRectangle;
271            widget:PGtkWidget; detail:Pgchar; points:PGdkPoint; npoints:gint; fill:gboolean); cdecl; external gtklib;
272procedure gtk_paint_arrow(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; area:PGdkRectangle;
273            widget:PGtkWidget; detail:Pgchar; arrow_type:TGtkArrowType; fill:gboolean; x:gint;
274            y:gint; width:gint; height:gint); cdecl; external gtklib;
275procedure gtk_paint_diamond(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; area:PGdkRectangle;
276            widget:PGtkWidget; detail:Pgchar; x:gint; y:gint; width:gint;
277            height:gint); cdecl; external gtklib;
278procedure gtk_paint_box(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; area:PGdkRectangle;
279            widget:PGtkWidget; detail:Pgchar; x:gint; y:gint; width:gint;
280            height:gint); cdecl; external gtklib;
281procedure gtk_paint_flat_box(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; area:PGdkRectangle;
282            widget:PGtkWidget; detail:Pgchar; x:gint; y:gint; width:gint;
283            height:gint); cdecl; external gtklib;
284procedure gtk_paint_check(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; area:PGdkRectangle;
285            widget:PGtkWidget; detail:Pgchar; x:gint; y:gint; width:gint;
286            height:gint); cdecl; external gtklib;
287procedure gtk_paint_option(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; area:PGdkRectangle;
288            widget:PGtkWidget; detail:Pgchar; x:gint; y:gint; width:gint;
289            height:gint); cdecl; external gtklib;
290procedure gtk_paint_tab(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; area:PGdkRectangle;
291            widget:PGtkWidget; detail:Pgchar; x:gint; y:gint; width:gint;
292            height:gint); cdecl; external gtklib;
293procedure gtk_paint_shadow_gap(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; area:PGdkRectangle;
294            widget:PGtkWidget; detail:Pgchar; x:gint; y:gint; width:gint;
295            height:gint; gap_side:TGtkPositionType; gap_x:gint; gap_width:gint); cdecl; external gtklib;
296procedure gtk_paint_box_gap(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; area:PGdkRectangle;
297            widget:PGtkWidget; detail:Pgchar; x:gint; y:gint; width:gint;
298            height:gint; gap_side:TGtkPositionType; gap_x:gint; gap_width:gint); cdecl; external gtklib;
299procedure gtk_paint_extension(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; area:PGdkRectangle;
300            widget:PGtkWidget; detail:Pgchar; x:gint; y:gint; width:gint;
301            height:gint; gap_side:TGtkPositionType); cdecl; external gtklib;
302procedure gtk_paint_focus(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; area:PGdkRectangle; widget:PGtkWidget;
303            detail:Pgchar; x:gint; y:gint; width:gint; height:gint); cdecl; external gtklib;
304procedure gtk_paint_slider(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; area:PGdkRectangle;
305            widget:PGtkWidget; detail:Pgchar; x:gint; y:gint; width:gint;
306            height:gint; orientation:TGtkOrientation); cdecl; external gtklib;
307procedure gtk_paint_handle(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; area:PGdkRectangle;
308            widget:PGtkWidget; detail:Pgchar; x:gint; y:gint; width:gint;
309            height:gint; orientation:TGtkOrientation); cdecl; external gtklib;
310procedure gtk_paint_expander(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; area:PGdkRectangle; widget:PGtkWidget;
311            detail:Pgchar; x:gint; y:gint; expander_style:TGtkExpanderStyle); cdecl; external gtklib;
312procedure gtk_paint_layout(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; use_text:gboolean; area:PGdkRectangle;
313            widget:PGtkWidget; detail:Pgchar; x:gint; y:gint; layout:PPangoLayout); cdecl; external gtklib;
314procedure gtk_paint_resize_grip(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; area:PGdkRectangle; widget:PGtkWidget;
315            detail:Pgchar; edge:TGdkWindowEdge; x:gint; y:gint; width:gint;
316            height:gint); cdecl; external gtklib;
317function gtk_border_get_type:GType; cdecl; external gtklib;
318function gtk_border_copy(border:PGtkBorder):PGtkBorder; cdecl; external gtklib;
319procedure gtk_border_free(border:PGtkBorder); cdecl; external gtklib;
320{ --- private API ---  }
321function _gtk_style_peek_property_value(style:PGtkStyle; widget_type:GType; pspec:PGParamSpec; parser:TGtkRcPropertyParser):PGValue; cdecl; external gtklib;
322
323{ deprecated  }
324{$ifndef GTK_DISABLE_DEPRECATED}
325procedure gtk_style_apply_default_pixmap(style:PGtkStyle; window:PGdkWindow;
326  state_type:TGtkStateType; area:PGdkRectangle;
327  x:gint; y:gint; width:gint; height:gint);
328
329procedure gtk_draw_string(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; x:gint; y:gint;
330            _string:Pgchar); cdecl; external gtklib;
331procedure gtk_paint_string(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; area:PGdkRectangle; widget:PGtkWidget;
332            detail:Pgchar; x:gint; y:gint; _string:Pgchar); cdecl; external gtklib;
333{$endif}
334{ GTK_DISABLE_DEPRECATED  }
335
336function _gtk_get_insertion_cursor_gc(widget:PGtkWidget; is_primary:gboolean):PGdkGC; cdecl; external gtklib;
337procedure _gtk_draw_insertion_cursor(widget:PGtkWidget; drawable:PGdkDrawable; gc:PGdkGC; location:PGdkRectangle; direction:TGtkTextDirection;
338            draw_arrow:gboolean); cdecl; external gtklib;
339
340{$ifdef HasGTK2_4}
341procedure gtk_draw_insertion_cursor(widget:PGtkWidget; drawable:PGdkDrawable; area:PGdkRectangle; location:PGdkRectangle; is_primary:gboolean;
342            direction:TGtkTextDirection; draw_arrow:gboolean); cdecl; external gtklib;
343{$endif}
344{$ENDIF read_interface_rest}
345
346//------------------------------------------------------------------------------
347
348{$IFDEF read_implementation}
349function GTK_TYPE_STYLE : GType;
350begin
351   GTK_TYPE_STYLE:=gtk_style_get_type;
352end;
353
354function GTK_STYLE(anObject: pointer) : PGtkStyle;
355begin
356   GTK_STYLE:=PGtkStyle(G_TYPE_CHECK_INSTANCE_CAST(anObject,GTK_TYPE_STYLE));
357end;
358
359function GTK_STYLE_CLASS(klass: pointer) : PGtkStyleClass;
360begin
361   GTK_STYLE_CLASS:=PGtkStyleClass(G_TYPE_CHECK_CLASS_CAST(klass,GTK_TYPE_STYLE));
362end;
363
364function GTK_IS_STYLE(anObject: pointer) : boolean;
365begin
366   GTK_IS_STYLE:=G_TYPE_CHECK_INSTANCE_TYPE(anObject,GTK_TYPE_STYLE);
367end;
368
369function GTK_IS_STYLE_CLASS(klass: pointer) : boolean;
370begin
371   GTK_IS_STYLE_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,GTK_TYPE_STYLE);
372end;
373
374function GTK_STYLE_GET_CLASS(obj: pointer) : PGtkStyleClass;
375begin
376   GTK_STYLE_GET_CLASS:=PGtkStyleClass(G_TYPE_INSTANCE_GET_CLASS(obj,GTK_TYPE_STYLE));
377end;
378
379function GTK_TYPE_BORDER : GType;
380begin
381   GTK_TYPE_BORDER:=gtk_border_get_type;
382end;
383
384function GTK_STYLE_ATTACHED(style : pointer) : boolean;
385begin
386   GTK_STYLE_ATTACHED:=((GTK_STYLE(style))^.attach_count) > 0;
387end;
388
389procedure gtk_style_apply_default_pixmap(style:PGtkStyle; window:PGdkWindow;
390  state_type:TGtkStateType; area:PGdkRectangle;
391  x:gint; y:gint; width:gint; height:gint);
392begin
393   gtk_style_apply_default_background(style,window,true,state_type,area,x,y,width,height);
394end;
395
396{$ENDIF read_implementation}
397// included by gtk2.pas
398