Jump to content

Xlib Programming Basics: Difference between revisions

From IdeaWazaWiki
wikademia>Darklama
+initial introduction to the basic breakdown of a program using Xlib
 
wikademia>Darklama
+Computer programming
Line 5: Line 5:
* Respond to events received from the X Window server, by drawing on windows or taking other actions. This includes the initial event to draw the content of each window for the first time.
* Respond to events received from the X Window server, by drawing on windows or taking other actions. This includes the initial event to draw the content of each window for the first time.
* Close a connection to a X Window server in response to a user's action when the time is right. Like for example when clicking quit from a menu.
* Close a connection to a X Window server in response to a user's action when the time is right. Like for example when clicking quit from a menu.
[[Category:Computer programming]]

Revision as of 16:08, 30 November 2008

Xlib is an application programming interface (API) for X Window. A program which uses Xlib can be broken down into 4 parts:

  • Opening a connection to a X Window server, using the default display or specifying a specific screen and display to use.
  • Create windows for the user interface and map them so they are shown to the user
  • Respond to events received from the X Window server, by drawing on windows or taking other actions. This includes the initial event to draw the content of each window for the first time.
  • Close a connection to a X Window server in response to a user's action when the time is right. Like for example when clicking quit from a menu.