Re: GDK_PIXMAP_HBITMAP macro



From: "Justin Randall" <logic jrlogic dyndns org>
>
> While porting gtk-1.3.15 to Win32, I've run across a curious macro.

Not that I know anything about the win32 code, but...

> (taken from various sources, trying to understand how this macro is built)
> typedef unsigned long   gulong;
> typedef gulong          GType;
> GType gdk_drawable_impl_win32_get_type (void);
> #define GDK_TYPE_DRAWABLE_IMPL_WIN32  (gdk_drawable_impl_win32_get_type ())
> #define GDK_PIXMAP_HBITMAP(pixmap)
> (GDK_DRAWABLE_IMPL_WIN32(((GdkPixmapObject *)pixmap)->impl)->handle)

GDK_TYPE_DRAWABLE_IMPL_WIN32 and GDK_DRAWABLE_IMPL_WIN32() are two
different macros. The first returns a type in the libgobject type
system, while the second looks like it casts the implementation-dependent
part of the pixmap to a win32-implementation structure, from which
GDK_PIXMAP_HBITMAP then extracts a handle. This is probably causing some of
your confusion.

Ron Steinke



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