PageRenderTime 26ms CodeModel.GetById 17ms app.highlight 7ms RepoModel.GetById 1ms app.codeStats 0ms

/packages/gtk2/src/gtk+/gdk/gdkpixmap.inc

https://github.com/slibre/freepascal
Pascal | 125 lines | 80 code | 28 blank | 17 comment | 0 complexity | 044c3ed581b6055f5fce2b39e7b7b763 MD5 | raw file
Possible License(s): LGPL-2.0, LGPL-2.1, LGPL-3.0
  1// included by gdk2.pp
  2
  3{$IFDEF read_interface_types}
  4{ window-system-specific delegate anObject  }
  5   PGdkPixmapObject = ^TGdkPixmapObject;
  6   TGdkPixmapObject = record
  7        parent_instance : TGdkDrawable;
  8        impl : PGdkDrawable;
  9        depth : gint;
 10     end;
 11
 12   PGdkPixmapObjectClass = ^TGdkPixmapObjectClass;
 13   TGdkPixmapObjectClass = record
 14        parent_class : TGdkDrawableClass;
 15     end;
 16
 17{$ENDIF read_interface_types}
 18
 19//------------------------------------------------------------------------------
 20
 21{$IFDEF read_interface_rest}
 22function GDK_TYPE_PIXMAP : GType;
 23function GDK_PIXMAP(anObject : Pointer) : PGdkPixmap;
 24function GDK_PIXMAP_CLASS(klass : Pointer) : PGdkPixmapObjectClass;
 25function GDK_IS_PIXMAP(anObject : Pointer) : boolean;
 26function GDK_IS_PIXMAP_CLASS(klass : Pointer) : boolean;
 27function GDK_PIXMAP_GET_CLASS(obj : Pointer) : PGdkPixmapObjectClass;
 28
 29function GDK_PIXMAP_OBJECT(anObject : Pointer) : PGdkPixmapObject;
 30
 31
 32function gdk_pixmap_get_type:GType; cdecl; external gdklib;
 33
 34
 35{ Pixmaps }
 36
 37function gdk_pixmap_new(window:PGdkWindow; width:gint; height:gint; depth:gint):PGdkPixmap; cdecl; external gdklib;
 38function gdk_bitmap_create_from_data(window:PGdkWindow; data:Pgchar; width:gint; height:gint):PGdkBitmap; cdecl; external gdklib;
 39function gdk_pixmap_create_from_data(window:PGdkWindow; data:Pgchar; width:gint; height:gint; depth:gint;
 40           fg:PGdkColor; bg:PGdkColor):PGdkPixmap; cdecl; external gdklib;
 41function gdk_pixmap_create_from_xpm(window:PGdkWindow; var mask:PGdkBitmap; transparent_color:PGdkColor; filename:Pgchar):PGdkPixmap; cdecl; external gdklib;
 42function gdk_pixmap_colormap_create_from_xpm(window:PGdkWindow; colormap:PGdkColormap; var mask:PGdkBitmap; transparent_color:PGdkColor; filename:Pgchar):PGdkPixmap; cdecl; external gdklib;
 43function gdk_pixmap_create_from_xpm_d(window:PGdkWindow; var mask:PGdkBitmap; transparent_color:PGdkColor; data:PPgchar):PGdkPixmap; cdecl; external gdklib;
 44function gdk_pixmap_colormap_create_from_xpm_d(window:PGdkWindow; colormap:PGdkColormap; var mask:PGdkBitmap; transparent_color:PGdkColor; data:PPgchar):PGdkPixmap; cdecl; external gdklib;
 45{ Functions to create/lookup pixmaps from their native equivalents }
 46
 47{$ifndef GDK_MULTIHEAD_SAFE}
 48function gdk_pixmap_foreign_new(anid:TGdkNativeWindow):PGdkPixmap; cdecl; external gdklib;
 49function gdk_pixmap_lookup(anid:TGdkNativeWindow):PGdkPixmap; cdecl; external gdklib;
 50{$endif}
 51{ GDK_MULTIHEAD_SAFE  }
 52
 53function gdk_pixmap_foreign_new_for_display(display:PGdkDisplay; anid:TGdkNativeWindow):PGdkPixmap; cdecl; external gdklib;
 54function gdk_pixmap_lookup_for_display(display:PGdkDisplay; anid:TGdkNativeWindow):PGdkPixmap; cdecl; external gdklib;
 55
 56{$ifndef GDK_DISABLE_DEPRECATED}
 57function gdk_bitmap_ref(drawable:PGdkDrawable):PGdkDrawable;
 58procedure gdk_bitmap_unref(drawable:PGdkDrawable);
 59function gdk_pixmap_ref(drawable:PGdkDrawable):PGdkDrawable;
 60procedure gdk_pixmap_unref(drawable:PGdkDrawable);
 61{$endif}
 62{$endif read_interface_rest}
 63
 64//------------------------------------------------------------------------------
 65
 66{$IFDEF read_implementation}
 67function GDK_TYPE_PIXMAP : GType;
 68begin
 69  GDK_TYPE_PIXMAP:=gdk_pixmap_get_type;
 70end;
 71
 72function GDK_PIXMAP(anObject : Pointer) : PGdkPixmap;
 73begin
 74  GDK_PIXMAP:=PGdkPixmap(G_TYPE_CHECK_INSTANCE_CAST(anObject,GDK_TYPE_PIXMAP));
 75end;
 76
 77function GDK_PIXMAP_CLASS(klass : Pointer) : PGdkPixmapObjectClass;
 78begin
 79  GDK_PIXMAP_CLASS:=PGdkPixmapObjectClass(G_TYPE_CHECK_CLASS_CAST(klass,
 80                                                              GDK_TYPE_PIXMAP));
 81end;
 82
 83function GDK_IS_PIXMAP(anObject : Pointer) : boolean;
 84begin
 85  GDK_IS_PIXMAP:=G_TYPE_CHECK_INSTANCE_TYPE(anObject,GDK_TYPE_PIXMAP);
 86end;
 87
 88function GDK_IS_PIXMAP_CLASS(klass : Pointer) : boolean;
 89begin
 90  GDK_IS_PIXMAP_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,GDK_TYPE_PIXMAP);
 91end;
 92
 93function GDK_PIXMAP_GET_CLASS(obj : Pointer) : PGdkPixmapObjectClass;
 94begin
 95  GDK_PIXMAP_GET_CLASS:=PGdkPixmapObjectClass(G_TYPE_INSTANCE_GET_CLASS(obj,
 96                                                              GDK_TYPE_PIXMAP));
 97end;
 98
 99function GDK_PIXMAP_OBJECT(anObject : Pointer) : PGdkPixmapObject;
100begin
101  GDK_PIXMAP_OBJECT:=PGdkPixmapObject(GDK_PIXMAP(anObject));
102end;
103
104function gdk_bitmap_ref(drawable:PGdkDrawable):PGdkDrawable;
105begin
106  gdk_bitmap_ref:=GDK_DRAWABLE(g_object_ref(G_OBJECT(drawable)));
107end;
108
109procedure gdk_bitmap_unref(drawable:PGdkDrawable);
110begin
111  g_object_unref(G_OBJECT(drawable));
112end;
113
114function gdk_pixmap_ref(drawable:PGdkDrawable):PGdkDrawable;
115begin
116  gdk_pixmap_ref:=GDK_DRAWABLE(g_object_ref(G_OBJECT(drawable)));
117end;
118
119procedure gdk_pixmap_unref(drawable:PGdkDrawable);
120begin
121  g_object_unref(G_OBJECT(drawable));
122end;
123
124{$ENDIF}
125