[Haskell] Haskell Xlib bindings
Hi, This message does not answer the original question, but may be useful if anyone really wants to work on the X protocol interface to Haskell. Just adding from my past experience. I had a (experimental, unfinished, and most likely it never will be finished) project to bind directly to the X11 protocol rather than to Xlib, and thus to have full access to all information exchanged between the client and server sides (the original question was about Xlib hiding some info). The protocol transport layer binding was done using FFIPKG, and the working directory is here: http://www.golubovsky.org/repos/hsxwm/ All those modules with cryptic names are results of hsffig parsing C data structures' definitions from X.h and Xproto.h Some example usage is in the HSX11 subdirectory. Hskell files in the main directory were my attempts to model the evilwm window manager as an example, but because of lack of time I never got any far on that project. In HSX11 there is a definition of the Transceivable class which does binary serialization/deserialization of protocol packets, and also a module XAuthority which implements the magic cookie protocol. Also some generic code for few X11 requests and responses. Finally, I was able to display a window with some cyrillic characters in it (to show that Unicode works). The largest problem was to obtain automatic serialization code for all those packet structures which might be most likely done with Template Haskell, but some functionality was missing in it back then. -- Dimitry Golubovsky Anywhere on the Web ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell
[Haskell] Haskell Xlib bindings
Hello everyone, This question probably belongs in GUI, but I tried posting there a week ago and have yet to get a response. My question is this: Why do the Haskell Xlib bindings have no way to extract the property event from an event pointer? For example, the following functions are available: get_KeyEvent, get_ButtonEvent, get_MotionEvent, etc. but there's no get_PropertyEvent. Why was this left out? It seems pretty critical to the functionality of an Xlib program to someone who's been programming in C with Xlib for quite some time. Thanks, Robert Hoelz ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell
Re: [Haskell] Haskell Xlib bindings
On Sun, 2007-02-04 at 16:00 -0600, Rob Hoelz wrote: Hello everyone, This question probably belongs in GUI, but I tried posting there a week ago and have yet to get a response. My question is this: Why do the Haskell Xlib bindings have no way to extract the property event from an event pointer? For example, the following functions are available: get_KeyEvent, get_ButtonEvent, get_MotionEvent, etc. but there's no get_PropertyEvent. Why was this left out? It seems pretty critical to the functionality of an Xlib program to someone who's been programming in C with Xlib for quite some time. I think the sad fact is that nobody seriously uses the Xlib bindings. If you want to help improve them, I'm sure that'd be most welcome. Perhaps these days binding xcb might be the way to go for low level X11 stuff. Duncan ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell