[Mono-dev] Cairo on win32?

Idan Gazit idan at fastmail.fm
Sun Sep 4 07:46:12 EDT 2005

Hi again,

>> I'm trying to compile/run the cairo examples in the samples directory. I
>> can compile OK, however running yields the following error:
>> Unhandled Exception: System.EntryPointNotFoundException:
>> gdk_x11_drawable_get_xid
>> in (wrapper managed-to-native) GtkCairo:gdk_x11_drawable_get_xid (intptr)
> This is meant to work on X. Could you try the PNG samples?

A few things:

1. The cairo samples in question pretty specifically reference Win32 
(besides the fact that they are distributed in the win32 installer) -- 
at the top of GtkCairo.cs you have the following import statements:

static extern IntPtr gdk_x11_drawable_get_xdisplay (IntPtr raw);
static extern IntPtr gdk_x11_drawable_get_xid (IntPtr raw);

static extern void gdk_window_get_internal_paint_info(IntPtr raw, out 
IntPtr real_drawable, out int x_offset, out int y_offset);

I get it that gdk_x11_... refers to an X call, but I figured that it is 
probably remapped inside GDK-win32 to some win32-specific call. Am I 
wrong? Is there a win32-equivalent call? Either way it doesn't seem that 
gdk_x11_drawable_get_xid is exported on libgdk-win32-2.0-0.dll, hence 
the error, right?

2. What are the PNG samples that you're referring to? There are many 
samples, none of which are definitively the "PNG Samples".

My goal is to code with Cairo on win32, specifically I'm working on a 
new widget which requires some drawing of (vector) graphics. If it's 
just not doable with cairo today then please let me know, better to bail 
early than to waste time beating a dead horse.

3. Is there a "Right Way" to do vector drawing today? I understand that 
GTK will use Cairo as the drawing backend in the future, and also 
System.Drawing -- so with the current state of affairs, if I want to 
code a custom widget using a DrawingArea, is there an approach I should 
be favoring?

Thanks (Hisham) & everybody else. :)


More information about the Mono-devel-list mailing list