Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 1bbf51ece72e40a5f40ad48678e7c5a5 > files > 233

libgnome32-devel-1.4.2-22mdv2009.1.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<HTML
><HEAD
><TITLE
>Event-driven programming</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.74b"><LINK
REL="HOME"
TITLE="Gnome Developers' Information"
HREF="book1.html"><LINK
REL="UP"
TITLE="Basic X concepts"
HREF="x-concepts-docs.html"><LINK
REL="PREVIOUS"
TITLE="Graphics contexts"
HREF="graphics-contexts.html"><LINK
REL="NEXT"
TITLE="LibGnorba Documentation"
HREF="libgnorba-docs.html"></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation 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="graphics-contexts.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Basic X concepts</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="libgnorba-docs.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="EVENT-DRIVEN-PROGRAMMING"
>Event-driven programming</A
></H1
><P
>	Programmers coming from a text console world may find GUI
	programming a bit strange at first.  In "traditional"
	programming, the program guides the user through several screens
	of prompts and options, and the program is always in control of
	what is going to happen next.
      </P
><P
>	In GUI-land, you mostly give up the control flow of your
	programs and let the system drive them for you.  It is the user
	who is in control now &#8212; every time the program is run, the
	user may choose a different way to work his way through the user
	interface.  Menu options may be invoked at any time, and windows
	may be opened and closed at will.
      </P
><P
>	GUI programming generally operates on an
	<I
CLASS="EMPHASIS"
>event-driven</I
> model.  This means that
	applications get events from the system or the user and must
	react to them.  This is different from the "traditional" model
	where the program tells the user what to do next at every step.
      </P
><P
>	Event-driven programs typically sit around in a loop waiting for
	events to come.  When an event is received, the program figures
	out what to do with it and proceeds accordingly.  An event could
	be "the user pressed a mouse button", or "a window moved", or
	even "you must terminate yourself".
      </P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="graphics-contexts.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="book1.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="libgnorba-docs.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Graphics contexts</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="x-concepts-docs.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>LibGnorba Documentation</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>