Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Haskell
Wiki community
Recent changes
Random page
HaskellWiki
Search
Search
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
XHB
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Basic XHB notions === XHB has been created to eliminate the need for programs to actually implement the X protocol layer. This library gives a program a very low-level access to any X server. Since the protocol is standardized, a client using any implementation of XHB may talk with any X server (the same occurs for Xlib, of course). We now give a brief description of the basic XHB notions. They will be detailed later. * The X server connection which abstracts request and reply queues. * Requests and replies which are the means of communicating between X server and client. * The graphics context which holds the current state of graphics variables (what foreground and background colors to use, what font to use when drawing some text, etc.). Actually, this is how we reduce bandwidth consumption. * Events with additional information (e.g., position on the screen where event was generated, mouse button associated with the event, etc.). What is really interesting here, is that XHB is non-blocking (asynchronous). That is, it doesn't force you to wait for reply on your request. When sending a request, XHB returns immediately (with a cookie, "a promise"), even if the reply is not yet available; while Xlib, for instance, locks your program waiting for X server to reply. This can be very slow (and it is, in fact). Note that [[Lazy evaluation]] is good at hiding latency of this sort.
Summary:
Please note that all contributions to HaskellWiki are considered to be released under simple permissive license (see
HaskellWiki:Copyrights
for details). If you don't want your writing to be edited mercilessly and redistributed at will, then don't submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
DO NOT SUBMIT COPYRIGHTED WORK WITHOUT PERMISSION!
Cancel
Editing help
(opens in new window)
Toggle limited content width