GNOME Bugzilla – Bug 510336
XLib-specific and others methods in GDK
Last modified: 2008-02-14 22:14:27 UTC
Do you mind add fuctions like: namespace Gdk { class Drawable ... { [Conditional (condition="X")] public virtual long get_xid(); } } to gdk vapi?
Not sure how we want to handle this. It might be better to put the functions into a separate gdk-x11-2.0.vapi
It do not sounds bad, but: 1. It will be included automaticly on 'using Gdk' (better way IMHO). or 2. It can be compiled by [Conditional (condition="X")] using Gdk.X;
It would probably be in the Gdk namespace (so 1.) but you'll need to add --pkg gdk-x11-2.0 if you want to use these functions and the functions won't be added to existing types of the Gdk binding.
Well - the gdk-win32-2.0, gdk-quartz & co. should follow (I guess that they will be in the next release of gdk since I have seen functions in svn but not documentation [not mentioning the local system ;) ]).
Created attachment 103799 [details] [review] gdk-x11-2.0.patch Simple patch. I followed the naming convention of prefixing all X11 specific functions by x11_. However is vala support some kind of open classes? I mean is it possible to add to Gdk.Drawable method x11_get_xid from gdk-x11 package?
Created attachment 103966 [details] [review] gdk-x11-2.0.patch Few updates (ie. forgotten entry in Makefile etc.)
2008-02-02 Jürg Billeter <j@bitron.ch> * vapi/Makefile.am, vapi/packages/gdk-x11-2.0/, vapi/gdk-x11-2.0.deps, vapi/gdk-x11-2.0.vapi: add gdk-x11-2.0 bindings, patch by Maciej Piechotka, fixes bug 510336 Fixed in r949.
Also: * Integration with XCB binding * More object interface
Created attachment 104997 [details] [review] gdk-x11-2.0.patch More object oriented API
Created attachment 105151 [details] [review] gdk-x11-2.0.patch Replace uint32 by Xcb.* and pointer by Display (where appropiate).
The VAPI file is generated by vapigen, manually modifying the generated file is not a good solution. A second issue is that gdk-x11-2.0 shouldn't depend on xcb, else it won't work anymore on systems not using xcb. I'm closing the bug again, as the original issue has been fixed. Please open new bugs for new issues.
(In reply to comment #11) > The VAPI file is generated by vapigen, manually modifying the generated file is > not a good solution. > Yes - so how to force vapigen to pack them into classes. Especially wih different prefixes (gdk_, gdkx_, gdk_x11_)?