Re: Re: Gdk-Pixbuf Problem



Thanks, It worked. I declared it as a pointer and i was able to compile properly.
Now there is other problem.
I am using gdk_pixbuf_xlib_get_from_drawable(...) to get the
image from XDrawableArea to GdkPixbuf.
I wanted to see the values I have got in GdkPixbuf using workshop (which is a graphical version of dbx), but it reported "forward reference _GdkPixbuf' not defined.
How can I print the contents of GdkPixbuf.

Thanks,
anita




On Tue, 27 Aug 2002 Gustavo Giráldez wrote :
Hi,

On Mon, 2002-08-26 at 20:05, anita setty wrote:
> Hello,
>
> I was able to compile gtk-2.0 on solaris and install
> it along with glib, atk and pango.
> I have installed the library in /usr/local/lib.
> Header's are installed in /usr/local/include.
>
> I am trying to use the function
> gdk_pixbuf_xlib_get_from_drawable()
> which returns a GdkPixbuf. I have included the .h files. Have > set complier flags to include appropriate header files. Have set
> the library to link.
> I am getting an error "The type _GdkPixbuf" is incomplete.
>
> When I looked into the gdk-pixbuf.h, I see that GdkPixbuf is
> typedef to structure _GdkPixbuf. This structure is not defined
> in
> any files under /usr/local/include/gtk-2.0/gdk-pixbuf
>
> I see that this structure has been declared in
> gdk-pixbuf-private.h
> and this file is not installed in
> /usr/local/include/gtk-2.0/gdk-pixbuf
> Is this the reason I am getting compilation error, or I am doing
> something wrong.
> Please let me know what I should do.
>
The GdkPixbuf *is* a private structure, so it's ok that the file is not installed. You reference a GdkPixbuf by its pointer, so you don't need the actual structure layout. How are you trying to use it? Sounds like you're trying to malloc() a GdkPixbuf or allocate it in the stack. You can't do these things. A GdkPixbuf is a ref counted object, which you
create using functions like gdk_pixbuf_new().

HTH,
Gustavo






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]