~ubuntu-branches/ubuntu/lucid/fpc/lucid-proposed

« back to all changes in this revision

Viewing changes to fpcsrc/packages/gtk2/src/gtk+/gdk/gdkcolor.inc

  • Committer: Bazaar Package Importer
  • Author(s): Mazen Neifer, Torsten Werner, Mazen Neifer
  • Date: 2008-10-09 23:29:00 UTC
  • mfrom: (4.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20081009232900-553f61m37jkp6upv
Tags: 2.2.2-4
[ Torsten Werner ]
* Update ABI version in fpc-depends automatically.
* Remove empty directories from binary package fpc-source.

[ Mazen Neifer ]
* Removed leading path when calling update-alternatives to remove a Linitian
  error.
* Fixed clean target.
* Improved description of packages. (Closes: #498882)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// included by gdk2.pp
 
2
 
 
3
{$IFDEF read_forward_definitions}
 
4
{ The color type.
 
5
     A color consists of red, green and blue values in the
 
6
      range 0-65535 and a pixel value. The pixel value is highly
 
7
      dependent on the depth and colormap which this color will
 
8
      be used to draw into. Therefore, sharing colors between
 
9
      colormaps is a bad idea.
 
10
  }
 
11
   PGdkColor = ^TGdkColor;
 
12
   TGdkColor = record
 
13
        pixel : guint32;
 
14
        red : guint16;
 
15
        green : guint16;
 
16
        blue : guint16;
 
17
     end;
 
18
 
 
19
   PGdkColormap = ^TGdkColormap;
 
20
{$ENDIF read_forward_definitions}
 
21
 
 
22
//------------------------------------------------------------------------------
 
23
 
 
24
{$IFDEF read_interface_types}
 
25
   PGdkColormapClass = ^TGdkColormapClass;
 
26
   TGdkColormapClass = record
 
27
        parent_class : TGObjectClass;
 
28
     end;
 
29
 
 
30
   TGdkColormap = record
 
31
        parent_instance : TGObject;
 
32
        size : gint;
 
33
        colors : PGdkColor;
 
34
        visual : PGdkVisual;
 
35
        windowing_data : gpointer;
 
36
        screen : PGdkScreen;
 
37
     end;
 
38
 
 
39
{$ENDIF read_interface_types}
 
40
 
 
41
//------------------------------------------------------------------------------
 
42
 
 
43
{$IFDEF read_interface_rest}
 
44
 
 
45
{ The colormap type. }
 
46
function GDK_TYPE_COLORMAP : GType;
 
47
function GDK_COLORMAP(anObject : pointer) : PGdkColormap;
 
48
function GDK_COLORMAP_CLASS(klass : pointer) : PGdkColormapClass;
 
49
function GDK_IS_COLORMAP(anObject : pointer) : boolean;
 
50
function GDK_IS_COLORMAP_CLASS(klass : pointer) : boolean;
 
51
function GDK_COLORMAP_GET_CLASS(obj : pointer) : PGdkColormapClass;
 
52
 
 
53
function GDK_TYPE_COLOR : GType;
 
54
 
 
55
function gdk_colormap_get_type:GType; cdecl; external gdklib;
 
56
function gdk_colormap_new(visual:PGdkVisual; allocate:gboolean):PGdkColormap; cdecl; external gdklib;
 
57
 
 
58
{$ifndef GDK_DISABLE_DEPRECATED}
 
59
function gdk_colormap_ref(cmap:PGdkColormap):PGdkColormap; cdecl; external gdklib;
 
60
procedure gdk_colormap_unref(cmap:PGdkColormap); cdecl; external gdklib;
 
61
{$endif}
 
62
 
 
63
{$ifndef GDK_MULTIHEAD_SAFE}
 
64
function gdk_colormap_get_system:PGdkColormap; cdecl; external gdklib;
 
65
{$endif}
 
66
 
 
67
{$ifndef GDK_DISABLE_DEPRECATED}
 
68
function gdk_colormap_get_system_size:gint; cdecl; external gdklib;
 
69
procedure gdk_colormap_change(colormap:PGdkColormap; ncolors:gint); cdecl; external gdklib;
 
70
{$endif}
 
71
 
 
72
function gdk_colormap_alloc_colors(colormap:PGdkColormap; colors:PGdkColor; ncolors:gint; writeable:gboolean; best_match:gboolean;
 
73
           success:Pgboolean):gint; cdecl; external gdklib;
 
74
function gdk_colormap_alloc_color(colormap:PGdkColormap; color:PGdkColor; writeable:gboolean; best_match:gboolean):gboolean; cdecl; external gdklib;
 
75
procedure gdk_colormap_free_colors(colormap:PGdkColormap; colors:PGdkColor; ncolors:gint); cdecl; external gdklib;
 
76
procedure gdk_colormap_query_color(colormap:PGdkColormap; pixel:gulong; result:PGdkColor); cdecl; external gdklib;
 
77
function gdk_colormap_get_visual(colormap:PGdkColormap):PGdkVisual; cdecl; external gdklib;
 
78
function gdk_color_copy(color:PGdkColor):PGdkColor; cdecl; external gdklib;
 
79
procedure gdk_color_free(color:PGdkColor); cdecl; external gdklib;
 
80
function gdk_color_parse(spec:Pgchar; color:PGdkColor):gint; cdecl; external gdklib;
 
81
function gdk_color_hash(colora:PGdkColor):guint; cdecl; external gdklib;
 
82
function gdk_color_equal(colora:PGdkColor; colorb:PGdkColor):gboolean; cdecl; external gdklib;
 
83
function gdk_color_get_type:GType; cdecl; external gdklib;
 
84
 
 
85
{ The following functions are deprecated  }
 
86
{$ifndef GDK_DISABLE_DEPRECATED}
 
87
procedure gdk_colors_store(colormap:PGdkColormap; colors:PGdkColor; ncolors:gint); cdecl; external gdklib;
 
88
function gdk_colors_alloc(colormap:PGdkColormap; contiguous:gboolean; planes:Pgulong; nplanes:gint; pixels:Pgulong;
 
89
           npixels:gint):gint; cdecl; external gdklib;
 
90
procedure gdk_colors_free(colormap:PGdkColormap; pixels:Pgulong; npixels:gint; planes:gulong); cdecl; external gdklib;
 
91
function gdk_color_white(colormap:PGdkColormap; color:PGdkColor):gint; cdecl; external gdklib;
 
92
function gdk_color_black(colormap:PGdkColormap; color:PGdkColor):gint; cdecl; external gdklib;
 
93
function gdk_color_alloc(colormap:PGdkColormap; color:PGdkColor):gint; cdecl; external gdklib;
 
94
function gdk_color_change(colormap:PGdkColormap; color:PGdkColor):gint; cdecl; external gdklib;
 
95
{$endif}
 
96
 
 
97
{ GDK_DISABLE_DEPRECATED  }
 
98
{$endif read_interface_rest}
 
99
 
 
100
//------------------------------------------------------------------------------
 
101
 
 
102
{$IFDEF read_implementation}
 
103
function GDK_TYPE_COLORMAP : GType;
 
104
begin
 
105
  GDK_TYPE_COLORMAP:=gdk_colormap_get_type;
 
106
end;
 
107
 
 
108
function GDK_COLORMAP(anObject : pointer) : PGdkColormap;
 
109
begin
 
110
  GDK_COLORMAP:=PGdkColormap(G_TYPE_CHECK_INSTANCE_CAST(anObject,
 
111
                                                        GDK_TYPE_COLORMAP));
 
112
end;
 
113
 
 
114
function GDK_COLORMAP_CLASS(klass : pointer) : PGdkColormapClass;
 
115
begin
 
116
  GDK_COLORMAP_CLASS:=PGdkColormapClass(G_TYPE_CHECK_CLASS_CAST(klass,
 
117
                                                            GDK_TYPE_COLORMAP));
 
118
end;
 
119
 
 
120
function GDK_IS_COLORMAP(anObject : pointer) : boolean;
 
121
begin
 
122
  GDK_IS_COLORMAP:=G_TYPE_CHECK_INSTANCE_TYPE(anObject,GDK_TYPE_COLORMAP);
 
123
end;
 
124
 
 
125
function GDK_IS_COLORMAP_CLASS(klass : pointer) : boolean;
 
126
begin
 
127
  GDK_IS_COLORMAP_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,GDK_TYPE_COLORMAP);
 
128
end;
 
129
 
 
130
function GDK_COLORMAP_GET_CLASS(obj : pointer) : PGdkColormapClass;
 
131
begin
 
132
  GDK_COLORMAP_GET_CLASS:=PGdkColormapClass(G_TYPE_INSTANCE_GET_CLASS(obj,
 
133
                                                            GDK_TYPE_COLORMAP));
 
134
end;
 
135
 
 
136
function GDK_TYPE_COLOR : GType;
 
137
begin
 
138
  GDK_TYPE_COLOR:=gdk_color_get_type;
 
139
end;
 
140
{$ENDIF}
 
141