Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2009-04

Definitions from gdkcairo.h missing in gtk2 package

6 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Martin Sucha

Hi All,

I wanted to create application using FPC, GTK+ and cairo, but was unable to find function declaration for gdk_cairo_create function.

After looking at GTK+ sources, I created an external declaration myself:
function gdk_cairo_create(drawable:PGdkDrawable):Pcairo_t;cdecl;external gdklib;

I would, however, expect to find it in gdk2 unit.

It seems that declarations from gdkcairo.h[1] were omitted when creating gtk2 package. Was this intentional?
(To mention the necessary info: I searched in fpc 2.2.4 sources)

Best Regards

Martin Sucha

[1] http://git.gnome.org/cgit/gtk+/plain/gdk/gdkcairo.h

Reply by email

Paul Ishenin
to Martin Sucha
Martin Sucha wrote 5 lines
Hi All, I wanted to create application using FPC, GTK+ and cairo, but was unable to find function declaration for gdk_cairo_create function.

gdk cairo interaction was added in gtk 2.8. FPC gtk package was originally created for gtk 2.2. Later I added some missed 2.4, 2.6 functions. It also contains few 2.8 functions but not all.

If you want to add cairo functions then convert the whole gdkcairo.h using the same .inc file structure as other fpc gdk sources have.

Best regards,
Paul Ishenin.

Reply by email

Martin Sucha
to Paul Ishenin

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

Reply by email

Paul Ishenin
to Martin Sucha
Martin Sucha wrote 10 lines
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, I have commited it in r13017. But at moment I don't know whether it is allowed for fpc packages to be dependent on other packages. Therefore I removed cairo dependency and declared Pcairo_t (the only dependency) as pointer.

Maybe some fpc team member can comment about this question.

Best regards,
Paul Ishenin.

Reply by email

Marco van de Voort
to Paul Ishenin

In our previous episode, Paul Ishenin said:

Show quoted text 13 lines
> 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, I have commited it in r13017. But at moment I don't know whether it is allowed for fpc packages to be dependent on other packages. Therefore I removed cairo dependency and declared Pcairo_t (the only dependency) as pointer.

Yes it is allowed, but it also needs mods to the build system (makefiles/fpcmake). Remind me in the weekend, and I'll look at it.

Reply by email

Martin Sucha
to Marco van de Voort

Hi,

Marco van de Voort wrote 7 lines
> But at moment I don't know whether > it is allowed for fpc packages to be dependent on other packages. > Therefore I removed cairo dependency and declared Pcairo_t (the only > dependency) as pointer. Yes it is allowed, but it also needs mods to the build system (makefiles/fpcmake). Remind me in the weekend, and I'll for not reminding you, I was busy past few days.

I also want to add pangocairo bindings and these require more cairo types than gdkcairo (skimming through header file gives me at least these: cairo_t, cairo_font_type_t, cairo_font_options_t). So it may be better to add cairo as dependency and update gdkcairo.inc as well. What do you think?

Before I start doing something I want to be sure what I want to do: As pangocairo is distributed in separate dynamic library/shared object I wonder whether I should put these bindings just into pango unit or create separate unit under packages/gtk2/src/pangocairo? Would creating pangocairo unit require additional changes to the build system?

Thanks.

Best Regards

Martin Sucha

Reply by email