On Sat, Nov 29, 2008 at 3:32 PM, Florian Brosch <[EMAIL PROTECTED]>wrote:

> NewMagickWand should be a static method in vala:
>
>
I don't think so. You should define a creation method instead:
[Compact]
[CCode (cname="MagickWand", free_function="DestroyMagickWand" )]
public class Wand {
    [CCode (cname="NewMagickWand")]
    public Wand ();
    [CCode (cname="MagickGetSize")]
    public bool get_size (out ulong width, out ulong height);
}


>
> [Compact]
> [CCode (cname="MagickWand", free_function="DestroyMagickWand" )]
> public class Wand {
>     [CCode (cname="NewMagickWand")]
>    public static Wand new_magick_wand ();
>
>    [CCode (cname="MagickGetSize")]
>    public bool get_size(out ulong width, out ulong height);
> }
>
>
> 2008/11/29 fdsdœ Fsfsd <[EMAIL PROTECTED]>:
> > Hi,
> >
> > I'm trying to create a binding to ImageMagick library. I've made a simple
> > vapi file :
> >
> > [CCode (cprefix = "", lower_case_cprefix = "", cheader_filename =
> > "ImageMagick/wand/MagickWand..h")]
> > namespace ImageMagick.Wand {
> >
> >     [Compact]
> >     [CCode (cname="MagickWand", free_function="DestroyMagickWand" )]
> >     public class Wand {
> >
> >         [CCode (cname="MagickGetSize")]
> >         public bool get_size(out ulong width, out ulong height);
> >
> >
> >     }
> > }
> >
> > But, instantiation of MagickWand class is made by function NewMagickWand
> and
> > I don't know how to define this C function as class's constructor.
> >
> > Any help would be great.
> >
> > Thnaks you.
> >
> >
> > _______________________________________________
> > Vala-list mailing list
> > [email protected]
> > http://mail.gnome.org/mailman/listinfo/vala-list
> >
> >
> _______________________________________________
> Vala-list mailing list
> [email protected]
> http://mail.gnome.org/mailman/listinfo/vala-list
>
_______________________________________________
Vala-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to