File: gtk-style.ads

package info (click to toggle)
libgtkada2 2.8.1-6lenny3
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 13,496 kB
  • ctags: 3,886
  • sloc: ada: 103,189; ansic: 45,411; perl: 5,500; sh: 2,812; makefile: 1,169; xml: 19
file content (868 lines) | stat: -rw-r--r-- 34,015 bytes parent folder | download | duplicates (2)
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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
-----------------------------------------------------------------------
--               GtkAda - Ada95 binding for Gtk+/Gnome               --
--                                                                   --
--   Copyright (C) 1998-2000 E. Briot, J. Brobecker and A. Charlet   --
--                Copyright (C) 2000-2006 AdaCore                    --
--                                                                   --
-- This library is free software; you can redistribute it and/or     --
-- modify it under the terms of the GNU General Public               --
-- License as published by the Free Software Foundation; either      --
-- version 2 of the License, or (at your option) any later version.  --
--                                                                   --
-- This library is distributed in the hope that it will be useful,   --
-- but WITHOUT ANY WARRANTY; without even the implied warranty of    --
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU --
-- General Public License for more details.                          --
--                                                                   --
-- You should have received a copy of the GNU General Public         --
-- License along with this library; if not, write to the             --
-- Free Software Foundation, Inc., 59 Temple Place - Suite 330,      --
-- Boston, MA 02111-1307, USA.                                       --
--                                                                   --
-----------------------------------------------------------------------

--  <description>
--  This package contains various functions to draw widget parts on the screen.
--  Whenever possible, you should use these functions instead of directly
--  the ones from Gdk.Drawable, since this package will properly take into
--  account the user's theme and color choice.
--
--  Consider also using directly the function Gtk.Widget.Modify_Font,
--  Gtk.Widget.Modify_Background,... rather than use the lower level Gtk_Style
--  object.
--
--  See Gtk.RC to learn how styles can be defined in external configuration
--  files by the end-user of your application.
--  </description>
--  <c_version>2.8.17</c_version>
--  <group>Configuration and Themes</group>

with Glib.Object;
with Glib.Values;
with Gdk.Color;        use Gdk.Color;
with Gdk.Font;         use Gdk.Font;
with Gdk.GC;
with Gdk.Pixmap;
with Gdk.Rectangle;
with Gdk.Types;
with Gdk.Window;
with Gtk.Enums;        use Gtk.Enums;
with Gtk.Object;
with Pango.Font;
with Pango.Layout;
with Interfaces.C.Strings;

package Gtk.Style is

   ------------
   -- Styles --
   ------------

   type Gtk_Style_Record is new Glib.Object.GObject_Record with null record;
   type Gtk_Style is access all Gtk_Style_Record'Class;

   Null_Style : constant Gtk_Style := null;

   type Gtk_Rc_Property_Parser is access function
     (Pspec     : Glib.Param_Spec;
      Rc_String : Interfaces.C.Strings.chars_ptr;
      Value     : access Glib.Values.GValue) return Gboolean;
   pragma Convention (C, Gtk_Rc_Property_Parser);
   --  A function used to parse a string into the value of a property.
   --  Pspec is the property that is being parsed, Rc_String is the value as
   --  read in a gtk configuration file (any string, really), and Value should
   --  be set to the value read.
   --  See also Gtk.Settings

   procedure Gtk_New (Style : out Gtk_Style);
   procedure Initialize (Style : access Gtk_Style_Record'Class);
   --  Creates or initializes a new style

   function Get_Type return Gtk.Gtk_Type;
   --  Return the internal value associated with a Gtk_Style.

   function Copy (Source : Gtk_Style) return Gtk_Style;
   --  Copy a Gtk_Style

   function Attach
     (Style  : Gtk_Style; Window : Gdk.Window.Gdk_Window) return Gtk_Style;
   procedure Detach (Style : Gtk_Style);
   --  Attaches a style to a window; this process allocates the colors and
   --  creates the GC's for the style - it specializes it to a particular
   --  visual and colormap. The process may involve the creation of a new style
   --  if the style has already been attached to a window with a different
   --  style and colormap.
   --  It returns either Style or a newly allocated style. If a new one is
   --  created, the parameter will be Unref once, and the new one Ref once.

   procedure Set_Background
     (Style      : Gtk_Style;
      Window     : Gdk.Window.Gdk_Window;
      State_Type : Gtk_State_Type);
   --  Set the background color of Window to the background color specified
   --  by Style.

   procedure Apply_Default_Background
     (Style      : access Gtk_Style_Record;
      Window     : Gdk.Window.Gdk_Window;
      Set_Bg     : Boolean;
      State_Type : Gtk_State_Type;
      Area       : Gdk.Rectangle.Gdk_Rectangle;
      X          : Gint;
      Y          : Gint;
      Width      : Gint;
      Height     : Gint);
   --  Applies the default background from style to the given area in Window

   -----------------
   --  Properties --
   -----------------
   --  The style contains a number of properties. Each of these can be set to
   --  multiple values simulatenously, that will be applied depending on the
   --  widget's current state (highlighted, active, inactive,...)

   procedure Set_Background
     (Style      : Gtk_Style;
      State_Type : Enums.Gtk_State_Type;
      Color      : Gdk.Color.Gdk_Color);
   procedure Set_Bg
     (Style      : Gtk_Style;
      State_Type : Enums.Gtk_State_Type;
      Color      : Gdk.Color.Gdk_Color) renames Set_Background;
   function Get_Background
     (Style      : Gtk_Style;
      State_Type : Enums.Gtk_State_Type) return Gdk.Color.Gdk_Color;
   function Get_Bg
     (Style      : Gtk_Style;
      State_Type : Gtk_State_Type) return Gdk_Color renames Get_Background;
   --  Set or get the background color that this style uses in the given state

   procedure Set_Background_GC
     (Style      : Gtk_Style;
      State_Type : Enums.Gtk_State_Type;
      GC         : Gdk.GC.Gdk_GC);
   procedure Set_Background
     (Style      : Gtk_Style;
      State_Type : Enums.Gtk_State_Type;
      GC         : Gdk_GC) renames Set_Background_GC;
   procedure Set_Bg
     (Style      : Gtk_Style;
      State_Type : Enums.Gtk_State_Type;
      GC         : Gdk.GC.Gdk_GC) renames Set_Background_GC;
   procedure Set_Bg_GC
     (Style      : Gtk_Style;
      State_Type : Enums.Gtk_State_Type;
      GC         : Gdk.GC.Gdk_GC) renames Set_Background_GC;
   function Get_Background_GC
     (Style      : Gtk_Style;
      State_Type : Enums.Gtk_State_Type) return Gdk.GC.Gdk_GC;
   function Get_Bg
     (Style      : Gtk_Style;
      State_Type : Gtk_State_Type) return Gdk_GC renames Get_Background_GC;
   function Get_Background
     (Style      : Gtk_Style;
      State_Type : Gtk_State_Type) return Gdk_GC renames Get_Background_GC;
   function Get_Bg_GC
     (Style      : Gtk_Style;
      State_Type : Gtk_State_Type) return Gdk_GC renames Get_Background_GC;
   --  Set or get the graphic context that the style is using for the
   --  background

   procedure Set_Foreground
     (Style      : Gtk_Style;
      State_Type : Enums.Gtk_State_Type;
      Color      : Gdk.Color.Gdk_Color);
   procedure Set_Fg
     (Style      : Gtk_Style;
      State_Type : Enums.Gtk_State_Type;
      Color      : Gdk.Color.Gdk_Color) renames Set_Foreground;
   function Get_Foreground
     (Style      : Gtk_Style;
      State_Type : Enums.Gtk_State_Type) return Gdk.Color.Gdk_Color;
   function Get_Fg
     (Style      : Gtk_Style;
      State_Type : Gtk_State_Type) return Gdk_Color renames Get_Foreground;
   --  Set or get the foreground color that the style is using

   procedure Set_Foreground_GC
     (Style      : Gtk_Style;
      State_Type : Enums.Gtk_State_Type;
      GC         : Gdk.GC.Gdk_GC);
   procedure Set_Fg_GC
     (Style      : Gtk_Style;
      State_Type : Enums.Gtk_State_Type;
      GC         : Gdk.GC.Gdk_GC) renames Set_Foreground_GC;
   procedure Set_Foreground
     (Style      : Gtk_Style;
      State_Type : Enums.Gtk_State_Type;
      GC         : Gdk.GC.Gdk_GC) renames Set_Foreground_GC;
   procedure Set_Fg
     (Style      : Gtk_Style;
      State_Type : Enums.Gtk_State_Type;
      GC         : Gdk.GC.Gdk_GC) renames Set_Foreground_GC;
   function Get_Foreground_GC
     (Style      : Gtk_Style;
      State_Type : Enums.Gtk_State_Type) return Gdk.GC.Gdk_GC;
   function Get_Foreground
     (Style      : Gtk_Style;
      State_Type : Gtk_State_Type) return Gdk_GC renames Get_Foreground_GC;
   function Get_Fg
     (Style      : Gtk_Style;
      State_Type : Gtk_State_Type) return Gdk_GC renames Get_Foreground_GC;
   function Get_Fg_GC
     (Style      : Gtk_Style;
      State_Type : Gtk_State_Type) return Gdk_GC renames Get_Foreground_GC;
   --  Set or get the graphic context used by this style for the foreground

   procedure Set_Light
     (Style      : Gtk_Style;
      State_Type : Enums.Gtk_State_Type;
      Color      : Gdk.Color.Gdk_Color);
   function Get_Light
     (Style      : Gtk_Style;
      State_Type : Enums.Gtk_State_Type) return Gdk.Color.Gdk_Color;
   procedure Set_Light_GC
     (Style      : Gtk_Style;
      State_Type : Enums.Gtk_State_Type;
      GC         : Gdk.GC.Gdk_GC);
   function Get_Light_GC
     (Style      : Gtk_Style;
      State_Type : Enums.Gtk_State_Type) return Gdk.GC.Gdk_GC;
   procedure Set_Light
     (Style      : Gtk_Style;
      State_Type : Enums.Gtk_State_Type;
      GC         : Gdk.GC.Gdk_GC) renames Set_Light_GC;
   function Get_Light
     (Style      : Gtk_Style;
      State_Type : Gtk_State_Type) return Gdk_GC renames Get_Light_GC;
   --  Set or get the lighter color or graphic context that this style is
   --  using. This color is used to draw the shadows around rectangles for
   --  instance

   procedure Set_Dark
     (Style      : Gtk_Style;
      State_Type : Gtk_State_Type;
      Color      : Gdk.Color.Gdk_Color);
   procedure Set_Dark_GC
     (Style      : Gtk_Style;
      State_Type : Gtk_State_Type;
      GC         : Gdk.GC.Gdk_GC);
   procedure Set_Dark
     (Style      : Gtk_Style;
      State_Type : Gtk_State_Type;
      GC         : Gdk.GC.Gdk_GC) renames Set_Dark_GC;
   function Get_Dark
     (Style      : Gtk_Style;
      State_Type : Gtk_State_Type) return Gdk.Color.Gdk_Color;
   function Get_Dark_GC
     (Style      : Gtk_Style;
      State_Type : Gtk_State_Type) return Gdk.GC.Gdk_GC;
   function Get_Dark
     (Style      : Gtk_Style;
      State_Type : Gtk_State_Type) return Gdk_GC renames Get_Dark_GC;
   --  Set or get the darker color or graphic context that this style is using.
   --  This color is used to draw the shadows around rectangles for instance.

   procedure Set_Middle
     (Style      : Gtk_Style;
      State_Type : Gtk_State_Type;
      Color      : Gdk.Color.Gdk_Color);
   procedure Set_Mid
     (Style      : Gtk_Style;
      State_Type : Gtk_State_Type;
      Color      : Gdk.Color.Gdk_Color) renames Set_Middle;
   function Get_Middle
     (Style      : Gtk_Style;
      State_Type : Gtk_State_Type) return Gdk.Color.Gdk_Color;
   function Get_Mid
     (Style      : Gtk_Style;
      State_Type : Gtk_State_Type) return Gdk_Color renames Get_Middle;
   procedure Set_Middle_GC
     (Style      : Gtk_Style;
      State_Type : Enums.Gtk_State_Type;
      GC         : Gdk.GC.Gdk_GC);
   function Get_Middle_GC
     (Style      : Gtk_Style;
      State_Type : Gtk_State_Type) return Gdk_GC;
   procedure Set_Middle
     (Style      : Gtk_Style;
      State_Type : Enums.Gtk_State_Type;
      GC         : Gdk_GC) renames Set_Middle_GC;
   function Get_Middle
     (Style      : Gtk_Style;
      State_Type : Gtk_State_Type) return Gdk_GC renames Get_Middle_GC;
   procedure Set_Mid_GC
     (Style      : Gtk_Style;
      State_Type : Enums.Gtk_State_Type;
      GC         : Gdk_GC) renames Set_Middle_GC;
   function Get_Mid_GC
     (Style      : Gtk_Style;
      State_Type : Gtk_State_Type) return Gdk_GC renames Get_Middle_GC;
   procedure Set_Mid
     (Style      : Gtk_Style;
      State_Type : Enums.Gtk_State_Type;
      GC         : Gdk.GC.Gdk_GC) renames Set_Middle_GC;
   function Get_Mid
     (Style      : Gtk_Style;
      State_Type : Gtk_State_Type) return Gdk_GC renames Get_Middle_GC;
   --  Set or get the middle color. This color should be between the light and
   --  dark colors set above.

   procedure Set_Text
     (Style      : Gtk_Style;
      State_Type : Enums.Gtk_State_Type;
      Color      : Gdk.Color.Gdk_Color);
   function Get_Text
     (Style      : Gtk_Style;
      State_Type : Enums.Gtk_State_Type) return Gdk.Color.Gdk_Color;
   procedure Set_Text_GC
     (Style      : Gtk_Style;
      State_Type : Enums.Gtk_State_Type;
      GC         : Gdk.GC.Gdk_GC);
   function Get_Text_GC
     (Style      : Gtk_Style;
      State_Type : Enums.Gtk_State_Type) return Gdk.GC.Gdk_GC;
   procedure Set_Text
     (Style      : Gtk_Style;
      State_Type : Enums.Gtk_State_Type;
      GC         : Gdk.GC.Gdk_GC) renames Set_Text_GC;
   function Get_Text
     (Style      : Gtk_Style;
      State_Type : Gtk_State_Type) return Gdk_GC renames Get_Text_GC;
   --  Set or get the color to use when drawing text.

   procedure Set_Base
     (Style      : Gtk_Style;
      State_Type : Enums.Gtk_State_Type;
      Color      : Gdk.Color.Gdk_Color);
   function Get_Base
     (Style      : Gtk_Style;
      State_Type : Enums.Gtk_State_Type) return Gdk.Color.Gdk_Color;
   procedure Set_Base_GC
     (Style      : Gtk_Style;
      State_Type : Enums.Gtk_State_Type;
      GC         : Gdk.GC.Gdk_GC);
   function Get_Base_GC
     (Style      : Gtk_Style;
      State_Type : Enums.Gtk_State_Type) return Gdk.GC.Gdk_GC;
   procedure Set_Base
     (Style      : Gtk_Style;
      State_Type : Enums.Gtk_State_Type;
      GC         : Gdk.GC.Gdk_GC) renames Set_Base_GC;
   function Get_Base
     (Style      : Gtk_Style;
      State_Type : Gtk_State_Type) return Gdk_GC renames Get_Base_GC;
   --  Set or get the base color

   procedure Set_Black
     (Style : Gtk_Style;
      Color : Gdk.Color.Gdk_Color);
   function Get_Black (Style : Gtk_Style) return Gdk.Color.Gdk_Color;
   procedure Set_Black_GC (Style : Gtk_Style; GC : Gdk.GC.Gdk_GC);
   function Get_Black_GC (Style : Gtk_Style) return Gdk.GC.Gdk_GC;
   procedure Set_Black
     (Style : Gtk_Style; GC : Gdk.GC.Gdk_GC) renames Set_Black_GC;
   function Get_Black
     (Style : Gtk_Style) return Gdk.GC.Gdk_GC renames Get_Black_GC;
   --  Set or get the "black" color. It isn't necessarily black, although most
   --  themes will want to use black here.

   procedure Set_White (Style : Gtk_Style; Color : Gdk.Color.Gdk_Color);
   function Get_White (Style : Gtk_Style) return Gdk.Color.Gdk_Color;
   procedure Set_White_GC (Style : Gtk_Style; GC : Gdk.GC.Gdk_GC);
   function Get_White_GC (Style : Gtk_Style) return Gdk.GC.Gdk_GC;
   procedure Set_White
     (Style : Gtk_Style; GC : Gdk.GC.Gdk_GC) renames Set_White_GC;
   function Get_White
     (Style : Gtk_Style) return Gdk.GC.Gdk_GC renames Get_White_GC;
   --  Set or get the "white" color. It isn't necessarily white, although most
   --  themes will want to use white here.

   procedure Set_Font_Description
     (Style : Gtk_Style; Desc : Pango.Font.Pango_Font_Description);
   function Get_Font_Description
     (Style : Gtk_Style) return Pango.Font.Pango_Font_Description;
   --  Set or get the font to use for this style

   --  <doc_ignore>
   function Get_Font (Style : Gtk_Style) return Gdk.Font.Gdk_Font;
   pragma Obsolescent ("Use Get_Font_Description");  --  Get_Font
   --  </doc_ignore>

   procedure Set_Bg_Pixmap
     (Style      : Gtk_Style;
      State_Type : Enums.Gtk_State_Type;
      Pixmap     : Gdk.Pixmap.Gdk_Pixmap);
   function Get_Bg_Pixmap
     (Style      : Gtk_Style;
      State_Type : Enums.Gtk_State_Type) return Gdk.Pixmap.Gdk_Pixmap;
   --  Set or get the pixmap to use for background

   function X_Thickness (Style : Gtk_Style) return Gint;
   --  Width of the vertical scrollbars and ranges when Style is applied.
   --  In fact, this thickness is used for a lot of widgets whose width
   --  does not depend on their content, such as rulers,...

   function Y_Thickness (Style : Gtk_Style) return Gint;
   --  Height of the horizontal scrollbars and ranges when Style is applied.

   --------------
   -- Painting --
   --------------
   --  All the subprograms below have similar profiles.
   --  Area is always a clipping area. Drawing only takes place within that
   --  area, and pixels outside of it are not affected.
   --  Detail is a theme-specific detail string. This is generally provided by
   --  the application (or rather gtk+ itself) to indicate that the drawing
   --  should be slightly different, and Detail describes the exact contact.
   --  All drawings are done on Window. Widget is used to draw specific
   --  things depending on the widget type.

   procedure Draw_Insertion_Cursor
     (Widget     : access Gtk.Object.Gtk_Object_Record'Class;
      Drawable   : Gdk_Drawable;
      Area       : Gdk.Rectangle.Gdk_Rectangle;
      Location   : Gdk.Rectangle.Gdk_Rectangle;
      Is_Primary : Boolean;
      Direction  : Gtk_Text_Direction;
      Draw_Arrow : Boolean);
   --  Draws a text caret on Drawable at Location. This is not a style function
   --  but merely a convenience function for drawing the standard cursor shape.
   --  Is_Primary indicates whether the cursor should be the primary cursor
   --  color. Direction is the text direction. Draw_Arrow should be true to
   --  draw a directional arrow on the cursor. Should be False unless the
   --  cursor is split.

   procedure Paint_Handle
     (Style               : Gtk_Style;
      Window              : Gdk.Gdk_Window;
      State_Type          : Gtk.Enums.Gtk_State_Type;
      Shadow_Type         : Gtk.Enums.Gtk_Shadow_Type;
      Area                : Gdk.Rectangle.Gdk_Rectangle;
      Widget              : access Gtk.Object.Gtk_Object_Record'Class;
      Detail              : String := "paned";
      X, Y, Width, Height : Gint;
      Orientation         : Gtk.Enums.Gtk_Orientation);
   --  Paint the handles as is done in the Gtk_Paned widget (ie a series of
   --  small dots in Window, that indicate that Window can be manipulated and
   --  resized.
   --  If Detail is "paned", only a few dots are painted in the middle of
   --  window (aligned either horizontally or vertically depending on
   --  Orientation). Any other value for Detail draws points on the whole
   --  length of Window.
   --  (X, Y, Width, Height) is the area in which the dots should be painted.
   --  For the whole window, use (0, 0, -1, -1).
   --  Only the area that intersect Area is drawn.

   procedure Paint_Arrow
     (Style       : access Gtk_Style_Record;
      Window      : Gdk_Window;
      State_Type  : Gtk_State_Type;
      Shadow_Type : Gtk_Shadow_Type;
      Area        : Gdk.Rectangle.Gdk_Rectangle := Gdk.Rectangle.Full_Area;
      Widget      : access Glib.Object.GObject_Record'Class;
      Detail      : String := "";
      Arrow_Type  : Gtk_Arrow_Type;
      Fill        : Boolean;
      X           : Gint;
      Y           : Gint;
      Width       : Gint;
      Height      : Gint);
   --  Draws an arrow in the given rectangle on Window using the given
   --  parameters. Arrow_Type determines the direction of the arrow.
   --  The default theme engine only recognazied "menu_scroll_arrow_up" for
   --  Detail.

   procedure Paint_Box
     (Style       : access Gtk_Style_Record;
      Window      : Gdk_Window;
      State_Type  : Gtk_State_Type;
      Shadow_Type : Gtk_Shadow_Type;
      Area        : Gdk.Rectangle.Gdk_Rectangle := Gdk.Rectangle.Full_Area;
      Widget      : access Glib.Object.GObject_Record'Class;
      Detail      : String := "";
      X           : Gint;
      Y           : Gint;
      Width       : Gint;
      Height      : Gint);
   --  Draws a box on Window with the given parameters.
   --  The default theme engine recognizes the following for Detail:
   --  "spinbutton_up", "spinbutton_down", "paned", "optionmenu"

   procedure Paint_Box_Gap
     (Style       : access Gtk_Style_Record;
      Window      : Gdk_Window;
      State_Type  : Gtk_State_Type;
      Shadow_Type : Gtk_Shadow_Type;
      Area        : Gdk.Rectangle.Gdk_Rectangle := Gdk.Rectangle.Full_Area;
      Widget      : access Glib.Object.GObject_Record'Class;
      Detail      : String := "";
      X           : Gint;
      Y           : Gint;
      Width       : Gint;
      Height      : Gint;
      Gap_Side    : Gtk_Position_Type;
      Gap_X       : Gint;
      Gap_Width   : Gint);
   --  Draws a box in Window using the given style and state and shadow type,
   --  leaving a gap in one side.

   procedure Paint_Check
     (Style       : access Gtk_Style_Record;
      Window      : Gdk_Window;
      State_Type  : Gtk_State_Type;
      Shadow_Type : Gtk_Shadow_Type;
      Area        : Gdk.Rectangle.Gdk_Rectangle := Gdk.Rectangle.Full_Area;
      Widget      : access Glib.Object.GObject_Record'Class;
      Detail      : String := "";
      X           : Gint;
      Y           : Gint;
      Width       : Gint;
      Height      : Gint);
   --  Draws a check button indicator in the given rectangle on Window with
   --  the given parameters. The default theme handles the following values for
   --  detail: "cellcheck", "check"

   procedure Paint_Diamond
     (Style       : access Gtk_Style_Record;
      Window      : Gdk_Window;
      State_Type  : Gtk_State_Type;
      Shadow_Type : Gtk_Shadow_Type;
      Area        : Gdk.Rectangle.Gdk_Rectangle := Gdk.Rectangle.Full_Area;
      Widget      : access Glib.Object.GObject_Record'Class;
      Detail      : String := "";
      X           : Gint;
      Y           : Gint;
      Width       : Gint;
      Height      : Gint);
   --  Draws a diamond in the given rectangle on Window using the given
   --  parameters.

   procedure Paint_Expander
     (Style          : access Gtk_Style_Record;
      Window         : Gdk_Window;
      State_Type     : Gtk_State_Type;
      Area           : Gdk.Rectangle.Gdk_Rectangle := Gdk.Rectangle.Full_Area;
      Widget         : access Glib.Object.GObject_Record'Class;
      Detail         : String := "";
      X              : Gint;
      Y              : Gint;
      Expander_Style : Gtk_Expander_Style);
   --  Draws an expander as used in Gtk_Tree_View. X and Y specify the center
   --  the expander. The size of the expander is determined by the
   --  "expander-size" style property of Widget. (If widget is not specified or
   --  doesn't have an "expander-size" property, an unspecified default size
   --  will be used, since the caller doesn't have sufficient information to
   --  position the expander, this is likely not useful.) The expander is
   --  expander_size pixels tall in the collapsed position and expander_size
   --  pixels wide in the expanded position.

   procedure Paint_Extension
     (Style       : access Gtk_Style_Record;
      Window      : Gdk_Window;
      State_Type  : Gtk_State_Type;
      Shadow_Type : Gtk_Shadow_Type;
      Area        : Gdk.Rectangle.Gdk_Rectangle := Gdk.Rectangle.Full_Area;
      Widget      : access Glib.Object.GObject_Record'Class;
      Detail      : String := "";
      X           : Gint;
      Y           : Gint;
      Width       : Gint;
      Height      : Gint;
      Gap_Side    : Gtk_Position_Type);
   --  Draws an extension, i.e. a notebook tab.

   procedure Paint_Flat_Box
     (Style       : access Gtk_Style_Record;
      Window      : Gdk_Window;
      State_Type  : Gtk_State_Type;
      Shadow_Type : Gtk_Shadow_Type;
      Area        : Gdk.Rectangle.Gdk_Rectangle := Gdk.Rectangle.Full_Area;
      Widget      : access Glib.Object.GObject_Record'Class;
      Detail      : String := "";
      X           : Gint;
      Y           : Gint;
      Width       : Gint;
      Height      : Gint);
   --  Draws a flat box on Window with the given parameters.

   procedure Paint_Focus
     (Style      : access Gtk_Style_Record;
      Window     : Gdk_Window;
      State_Type : Gtk_State_Type;
      Area       : Gdk.Rectangle.Gdk_Rectangle := Gdk.Rectangle.Full_Area;
      Widget     : access Glib.Object.GObject_Record'Class;
      Detail     : String := "";
      X          : Gint;
      Y          : Gint;
      Width      : Gint;
      Height     : Gint);
   --  Draws a focus indicator around the given rectangle on Window using the
   --  given style.

   procedure Paint_Hline
     (Style      : access Gtk_Style_Record;
      Window     : Gdk_Window;
      State_Type : Gtk_State_Type;
      Area       : Gdk.Rectangle.Gdk_Rectangle := Gdk.Rectangle.Full_Area;
      Widget     : access Glib.Object.GObject_Record'Class;
      Detail     : String := "";
      X1         : Gint;
      X2         : Gint;
      Y          : Gint);
   --  Draws a horizontal line from (X1, Y) to (X2, Y) in Window
   --  using the given style and state.

   procedure Paint_Layout
     (Style      : access Gtk_Style_Record;
      Window     : Gdk_Window;
      State_Type : Gtk_State_Type;
      Use_Text   : Boolean;
      Area       : Gdk.Rectangle.Gdk_Rectangle := Gdk.Rectangle.Full_Area;
      Widget     : access Glib.Object.GObject_Record'Class;
      Detail     : String := "";
      X          : Gint;
      Y          : Gint;
      Layout     : Pango.Layout.Pango_Layout);
   --  Draws a layout on Window using the given parameters.

   procedure Paint_Option
     (Style       : access Gtk_Style_Record;
      Window      : Gdk_Window;
      State_Type  : Gtk_State_Type;
      Shadow_Type : Gtk_Shadow_Type;
      Area        : Gdk.Rectangle.Gdk_Rectangle := Gdk.Rectangle.Full_Area;
      Widget      : access Glib.Object.GObject_Record'Class;
      Detail      : String := "";
      X           : Gint;
      Y           : Gint;
      Width       : Gint;
      Height      : Gint);
   --  Draws a radio button indicator in the given rectangle on Window with
   --  the given parameters.

   procedure Paint_Polygon
     (Style       : access Gtk_Style_Record;
      Window      : Gdk_Window;
      State_Type  : Gtk_State_Type;
      Shadow_Type : Gtk_Shadow_Type;
      Area        : Gdk.Rectangle.Gdk_Rectangle := Gdk.Rectangle.Full_Area;
      Widget      : access Glib.Object.GObject_Record'Class;
      Detail      : String := "";
      Points      : Gdk.Types.Gdk_Point;
      Npoints     : Gint;
      Fill        : Boolean);
   --  Draws a polygon on Window with the given parameters.

   procedure Paint_Resize_Grip
     (Style      : access Gtk_Style_Record;
      Window     : Gdk_Window;
      State_Type : Gtk_State_Type;
      Area       : Gdk.Rectangle.Gdk_Rectangle := Gdk.Rectangle.Full_Area;
      Widget     : access Glib.Object.GObject_Record'Class;
      Detail     : String := "";
      Edge       : Gdk.Window.Gdk_Window_Edge;
      X          : Gint;
      Y          : Gint;
      Width      : Gint;
      Height     : Gint);
   --  Draws a resize grip in the given rectangle on Window using the given
   --  parameters.

   procedure Paint_Shadow
     (Style       : access Gtk_Style_Record;
      Window      : Gdk_Window;
      State_Type  : Gtk_State_Type;
      Shadow_Type : Gtk_Shadow_Type;
      Area        : Gdk.Rectangle.Gdk_Rectangle := Gdk.Rectangle.Full_Area;
      Widget      : access Glib.Object.GObject_Record'Class;
      Detail      : String := "";
      X           : Gint;
      Y           : Gint;
      Width       : Gint;
      Height      : Gint);
   --  Draws a shadow around the given rectangle in Window using the given
   --  style and state and shadow type.

   procedure Paint_Shadow_Gap
     (Style       : access Gtk_Style_Record;
      Window      : Gdk_Window;
      State_Type  : Gtk_State_Type;
      Shadow_Type : Gtk_Shadow_Type;
      Area        : Gdk.Rectangle.Gdk_Rectangle := Gdk.Rectangle.Full_Area;
      Widget      : access Glib.Object.GObject_Record'Class;
      Detail      : String := "";
      X           : Gint;
      Y           : Gint;
      Width       : Gint;
      Height      : Gint;
      Gap_Side    : Gtk_Position_Type;
      Gap_X       : Gint;
      Gap_Width   : Gint);
   --  Draws a shadow around the given rectangle in Window
   --  using the given style and state and shadow type, leaving a
   --  gap in one side.

   procedure Paint_Slider
     (Style       : access Gtk_Style_Record;
      Window      : Gdk_Window;
      State_Type  : Gtk_State_Type;
      Shadow_Type : Gtk_Shadow_Type;
      Area        : Gdk.Rectangle.Gdk_Rectangle := Gdk.Rectangle.Full_Area;
      Widget      : access Glib.Object.GObject_Record'Class;
      Detail      : String := "";
      X           : Gint;
      Y           : Gint;
      Width       : Gint;
      Height      : Gint;
      Orientation : Gtk_Orientation);
   --  Draws a slider in the given rectangle on Window using the given style
   --  and orientation.

   procedure Paint_Tab
     (Style       : access Gtk_Style_Record;
      Window      : Gdk_Window;
      State_Type  : Gtk_State_Type;
      Shadow_Type : Gtk_Shadow_Type;
      Area        : Gdk.Rectangle.Gdk_Rectangle := Gdk.Rectangle.Full_Area;
      Widget      : access Glib.Object.GObject_Record'Class;
      Detail      : String := "";
      X           : Gint;
      Y           : Gint;
      Width       : Gint;
      Height      : Gint);
   --  Draws an option menu tab (i.e. the up and down pointing arrows) in the
   --  given rectangle on Window using the given parameters.

   procedure Paint_Vline
     (Style      : access Gtk_Style_Record;
      Window     : Gdk_Window;
      State_Type : Gtk_State_Type;
      Area       : Gdk.Rectangle.Gdk_Rectangle := Gdk.Rectangle.Full_Area;
      Widget     : access Glib.Object.GObject_Record'Class;
      Detail     : String := "";
      Y1         : Gint;
      Y2         : Gint;
      X          : Gint);
   --  Draws a vertical line from (X, Y1) to (X, Y2) in Window
   --  using the given style and state.

   -------------
   -- Drawing --
   -------------
   --  All these procedures are obsolescent, and have been replaced by the
   --  Paint_* versions below.
   --  <doc_ignore>

   procedure Draw_Polygon
     (Style       : Gtk_Style;
      Window      : Gdk.Window.Gdk_Window;
      State_Type  : Enums.Gtk_State_Type;
      Shadow_Type : Enums.Gtk_Shadow_Type;
      Points      : Gdk.Types.Gdk_Points_Array;
      Fill        : Boolean);
   pragma Obsolescent ("Use Paint_Polygon");  --  Draw_Polygon
   --  Draws a polygon in Window

   procedure Draw_Arrow
     (Style       : Gtk_Style;
      Window      : Gdk.Window.Gdk_Window;
      State_Type  : Enums.Gtk_State_Type;
      Shadow_Type : Enums.Gtk_Shadow_Type;
      Arrow_Type  : Enums.Gtk_Arrow_Type;
      Fill        : Boolean;
      X, Y        : Gint;
      Width       : Gint;
      Height      : Gint);
   pragma Obsolescent ("Use Pain_Arrow");  --  Draw_Arrow
   --  Draws an arrow in Window, within the given rectangle

   procedure Draw_Shadow
     (Style       : access Gtk_Style_Record;
      Window      : Gdk_Window;
      State_Type  : Gtk_State_Type;
      Shadow_Type : Gtk_Shadow_Type;
      X           : Gint;
      Y           : Gint;
      Width       : Gint;
      Height      : Gint);
   pragma Obsolescent;  --  Draw_Shadow
   --  Draws a shadow around the given rectangle in @window
   --  using the given style and state and shadow type.


   procedure Draw_String
     (Style       : Gtk_Style;
      Window      : Gdk.Window.Gdk_Window;
      State_Type  : Enums.Gtk_State_Type;
      X, Y        : Gint;
      Str         : UTF8_String);
   pragma Obsolescent ("Use Paint_String");  --  Draw_String
   --  Draws a text on Window

   --  </doc_ignore>

   -------------
   -- Signals --
   -------------

   --  <signals>
   --  The following new signals are defined for this widget:
   --
   --  - "realize"
   --    procedure Handler (Style : access Gtk_Style_Record'Class);
   --    Emitted when the style has been initialized for a particular colormap
   --    and depth. Connecting to this signal is probably seldom useful since
   --    most of the time applications and widgets only deal with styles that
   --    have been already realized.
   --
   --  - "unrealize"
   --    procedure Handler (Style : access Gtk_Style_Record'Class);
   --    Emitted when the aspects of the style specific to a particular
   --    colormap and depth are being cleaned up. A connection to this signal
   --    can be useful if a widget wants to cache objects like a Gdk_GC as
   --    object data on Gtk_Style. This signal provides a convenient place to
   --    free such cached objects.
   --
   --  </signals>

   Signal_Realize  : constant String := "realize";
   Signal_Unrealize : constant String := "unrealize";

private
   pragma Import (C, Get_Type, "gtk_style_get_type");
end Gtk.Style;

--  The following subprograms never had a binding, and are now obsolescent:
--  No binding: gtk_draw_box
--  No binding: gtk_draw_box_gap
--  No binding: gtk_draw_check
--  No binding: gtk_draw_diamond
--  No binding: gtk_draw_expander
--  No binding: gtk_draw_extension
--  No binding: gtk_draw_flat_box
--  No binding: gtk_draw_focus
--  No binding: gtk_draw_handle
--  No binding: gtk_draw_hline
--  No binding: gtk_draw_layout
--  No binding: gtk_draw_option
--  No binding: gtk_draw_resize_grip
--  No binding: gtk_draw_shadow_gap
--  No binding: gtk_draw_slider
--  No binding: gtk_draw_tab
--  No binding: gtk_draw_vline
--  No binding: gtk_paint_string
--  No binding: gtk_style_set_font

--  These are obsolescent, and inherited anyway
--  No binding: gtk_style_ref
--  No binding: gtk_style_unref

--  Binding is in gtk-icon_factory.ads
--  No binding: gtk_style_lookup_icon_set
--  No binding: gtk_style_render_icon

--  Borders are currently unused anyway
--  No binding: gtk_border_copy
--  No binding: gtk_border_free
--  No binding: gtk_border_get_type