Hi,
Paul Ishenin wrote:
> If you want to add cairo functions [to the gdk unit] then convert
> the whole gdkcairo.h
> using the same .inc file structure as other fpc gdk sources have.
Here is the patch (as output of svn diff). Please review it and let
me know if you need another format (I don't know subversion much and
this is my first patch to an open source project).
Thanks
Best Regards
Martin Sucha
Index: packages/gtk2/src/gtk+/gdk/gdkcairo.inc
===================================================================
--- packages/gtk2/src/gtk+/gdk/gdkcairo.inc (revision 0)
+++ packages/gtk2/src/gtk+/gdk/gdkcairo.inc (revision 0)
@@ -0,0 +1,21 @@
+// included by gdk2.pp
+
+{$IFDEF read_interface_types}
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function gdk_cairo_create(drawable:PGdkDrawable):Pcairo_t;cdecl;external gdklib;
+procedure gdk_cairo_set_source_color(cr:Pcairo_t; color:PGdkColor);cdecl;external gdklib;
+procedure gdk_cairo_set_source_pixbuf(cr:Pcairo_t; pixbuf:PGdkPixbuf; pixbuf_x:double; pixbuf_y:double);cdecl;external gdklib;
+procedure gdk_cairo_set_source_pixmap(cr:Pcairo_t; pixmap:PGdkPixmap; pixmap_x:double; pixmap_y:double);cdecl;external gdklib;
+procedure gdk_cairo_rectangle(cr:Pcairo_t; rectangle:PGdkRectangle);cdecl;external gdklib;
+procedure gdk_cairo_region(cr:Pcairo_t; region:PGdkRegion);cdecl;external gdklib;
+{$endif read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+{$ENDIF}
+
Index: packages/gtk2/src/gtk+/gdk/gdkincludes.inc
===================================================================
--- packages/gtk2/src/gtk+/gdk/gdkincludes.inc (revision 13015)
+++ packages/gtk2/src/gtk+/gdk/gdkincludes.inc (working copy)
@@ -28,4 +28,5 @@
{$include gdktypes.inc}
{$include gdkvisual.inc}
{$include gdkwindow.inc}
+{$include gdkcairo.inc}
Index: packages/gtk2/src/gtk+/gdk/gdk2.pas
===================================================================
--- packages/gtk2/src/gtk+/gdk/gdk2.pas (revision 13015)
+++ packages/gtk2/src/gtk+/gdk/gdk2.pas (working copy)
@@ -29,7 +29,7 @@
interface
-uses glib2, gdk2pixbuf, pango;
+uses glib2, gdk2pixbuf, pango, cairo;
const
// OS dependent defines
_______________________________________________
fpc-devel maillist - [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel