<HTML
><HEAD
><TITLE
>Basic X concepts</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.44"><LINK
REL="HOME"
TITLE="Gnome Developers' Information"
HREF="book1.html"><LINK
REL="PREVIOUS"
TITLE="Using GnomeDialog directly"
HREF="gnome-dialog.html"><LINK
REL="NEXT"
TITLE="Visuals"
HREF="visuals.html"></HEAD
><BODY
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Gnome Developers' Information</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="gnome-dialog.html"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="visuals.html"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="CHAPTER"
><H1
><A
NAME="X-CONCEPTS-DOCS"
>Chapter 10. Basic X concepts</A
></H1
><DIV
CLASS="TOC"
><DL
><DT
><B
>Table of Contents</B
></DT
><DT
><A
HREF="x-concepts-docs.html#DRAWABLES"
>Drawables</A
></DT
><DT
><A
HREF="visuals.html"
>Visuals</A
></DT
><DT
><A
HREF="graphics-contexts.html"
>Graphics contexts</A
></DT
><DT
><A
HREF="event-driven-programming.html"
>Event-driven programming</A
></DT
></DL
></DIV
><P
>      The X Window System is a big and complex hairball.  The Gnome
      libraries try to make things easy by wrapping the hard stuff with
      nice wrappers.  Still, there are a few things you should keep in
      mind in order to write better applications.
    </P
><P
>      This chapter is aimed at programmers with little experience on X
      programming.  If you do not know what graphics contexts,
      drawables, and visuals are, you should definitely read this
      chapter.  If you already know your way around the X way of doing
      things, you may skip this chapter and move on to the fun stuff
      (i.e. writing GNOME applications).
    </P
><P
>      Please note that this chapter is intended to be a small crash
      course on the X concepts you will need to keep in mind while
      writing Gnome applications.  It is not a replacement for an Xlib
      manual.  You should definitely get your hands on the Xlib
      programmer's and reference manuals.
    </P
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="DRAWABLES"
>Drawables</A
></H1
><P
>	Drawables are things which you can paint on.  X has two types of
	drawables, <I
CLASS="EMPHASIS"
>windows</I
> and
	<I
CLASS="EMPHASIS"
>pixmaps</I
>.  Pixmaps are off-screen entities
	which you cannot see.  You can see a window when it is mapped
	(shown) on the screen.
      </P
><P
>	Windows can be nested in a tree structure.  All windows except
	the root window have a single parent, but all windows may have
	any number of children.  Pixmaps cannot be nested and they don't
	have parents.
      </P
><P
>	Windows have x/y/width/height properties that define their
	position within their parent.  Pixmaps only have width and
	height properties.
      </P
><P
>	Windows and pixmaps have many other properties.  However, a very
	important property is the <I
CLASS="EMPHASIS"
>visual class</I
> of
	the drawable, which is what we will discuss next.
      </P
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="gnome-dialog.html"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="book1.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="visuals.html"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Using <SPAN
CLASS="TYPE"
>GnomeDialog</SPAN
> directly</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Visuals</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>