After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 510336 - XLib-specific and others methods in GDK
XLib-specific and others methods in GDK
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: Bindings
0.1.x
Other All
: Normal enhancement
: ---
Assigned To: Jürg Billeter
Vala maintainers
Depends on: 515435
Blocks:
 
 
Reported: 2008-01-18 06:33 UTC by Maciej (Matthew) Piechotka
Modified: 2008-02-14 22:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gdk-x11-2.0.patch (16.49 KB, patch)
2008-01-27 02:17 UTC, Maciej (Matthew) Piechotka
none Details | Review
gdk-x11-2.0.patch (17.22 KB, patch)
2008-01-29 16:21 UTC, Maciej (Matthew) Piechotka
committed Details | Review
gdk-x11-2.0.patch (23.28 KB, patch)
2008-02-11 23:12 UTC, Maciej (Matthew) Piechotka
none Details | Review
gdk-x11-2.0.patch (11.54 KB, patch)
2008-02-13 14:42 UTC, Maciej (Matthew) Piechotka
needs-work Details | Review

Description Maciej (Matthew) Piechotka 2008-01-18 06:33:41 UTC
Do you mind add fuctions like:
namespace Gdk {
class Drawable ... {
[Conditional (condition="X")]
public virtual long get_xid();
}
}

to gdk vapi?
Comment 1 Jürg Billeter 2008-01-18 17:10:36 UTC
Not sure how we want to handle this. It might be better to put the functions into a separate gdk-x11-2.0.vapi
Comment 2 Maciej (Matthew) Piechotka 2008-01-18 19:46:15 UTC
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;
Comment 3 Jürg Billeter 2008-01-21 09:47:37 UTC
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.
Comment 4 Maciej (Matthew) Piechotka 2008-01-21 10:58:21 UTC
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 ;) ]).
Comment 5 Maciej (Matthew) Piechotka 2008-01-27 02:17:29 UTC
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?
Comment 6 Maciej (Matthew) Piechotka 2008-01-29 16:21:50 UTC
Created attachment 103966 [details] [review]
gdk-x11-2.0.patch

Few updates (ie. forgotten entry in Makefile etc.)
Comment 7 Jürg Billeter 2008-02-02 12:40:12 UTC
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.
Comment 8 Maciej (Matthew) Piechotka 2008-02-11 23:11:30 UTC
Also:
* Integration with XCB binding
* More object interface
Comment 9 Maciej (Matthew) Piechotka 2008-02-11 23:12:31 UTC
Created attachment 104997 [details] [review]
gdk-x11-2.0.patch

More object oriented API
Comment 10 Maciej (Matthew) Piechotka 2008-02-13 14:42:57 UTC
Created attachment 105151 [details] [review]
gdk-x11-2.0.patch

Replace uint32 by Xcb.* and pointer by Display (where appropiate).
Comment 11 Jürg Billeter 2008-02-14 14:40:15 UTC
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.
Comment 12 Maciej (Matthew) Piechotka 2008-02-14 22:14:27 UTC
(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_)?