~statik/ubuntu/maverick/erlang/erlang-merge-testing

« back to all changes in this revision

Viewing changes to lib/gs/doc/src/gs_chapter1.xml

  • Committer: Bazaar Package Importer
  • Author(s): Sergei Golovan
  • Date: 2009-05-01 10:14:38 UTC
  • mfrom: (3.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20090501101438-6qlr6rsdxgyzrg2z
Tags: 1:13.b-dfsg-2
* Cleaned up patches: removed unneeded patch which helped to support
  different SCTP library versions, made sure that changes for m68k
  architecture applied only when building on this architecture.
* Removed duplicated information from binary packages descriptions.
* Don't require libsctp-dev build-dependency on solaris-i386 architecture
  which allows to build Erlang on Nexenta (thanks to Tim Spriggs for
  the suggestion).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="latin1" ?>
 
2
<!DOCTYPE chapter SYSTEM "chapter.dtd">
 
3
 
 
4
<chapter>
 
5
  <header>
 
6
    <copyright>
 
7
      <year>2000</year>
 
8
      <year>2007</year>
 
9
      <holder>Ericsson AB, All Rights Reserved</holder>
 
10
    </copyright>
 
11
    <legalnotice>
 
12
  The contents of this file are subject to the Erlang Public License,
 
13
  Version 1.1, (the "License"); you may not use this file except in
 
14
  compliance with the License. You should have received a copy of the
 
15
  Erlang Public License along with this software. If not, it can be
 
16
  retrieved online at http://www.erlang.org/.
 
17
 
 
18
  Software distributed under the License is distributed on an "AS IS"
 
19
  basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
 
20
  the License for the specific language governing rights and limitations
 
21
  under the License.
 
22
 
 
23
  The Initial Developer of the Original Code is Ericsson AB.
 
24
    </legalnotice>
 
25
 
 
26
    <title>GS - The Graphics System</title>
 
27
    <prepared></prepared>
 
28
    <docno></docno>
 
29
    <date></date>
 
30
    <rev></rev>
 
31
  </header>
 
32
 
 
33
  <section>
 
34
    <title>Introduction</title>
 
35
    <p>This section describes the general graphics interface to Erlang. This system was designed with the following requirements in mind:</p>
 
36
    <list type="bulleted">
 
37
      <item>a graphics system which is easy to learn</item>
 
38
      <item>a graphics system which is portable to many different platforms.</item>
 
39
    </list>
 
40
    <p>Erlang has been implemented on a wide range of platforms and the graphics system works on all these platforms. Erlang applications can be written towards the same graphics API and the application can run on all supported platforms without modification.</p>
 
41
    <marker id="gs_fig1"/>
 
42
    <image file="pics/gs1-1-image-1">
 
43
      <icaption>Graphics Interface for Erlang</icaption>
 
44
    </image>
 
45
  </section>
 
46
 
 
47
  <section>
 
48
    <title>Basic Architecture of GS</title>
 
49
    <p>The basic building block in the graphics system is the graphical object. Objects are created in a hierarchical fashion where each object has a parent. The most common object types are:</p>
 
50
    <list type="bulleted">
 
51
      <item>window</item>
 
52
      <item>button</item>
 
53
      <item>label</item>
 
54
      <item>list box</item>
 
55
      <item>frame.</item>
 
56
    </list>
 
57
    <p>Whenever a new object is created, a unique object identifier is returned. This object identifier makes it possible to configure the object by changing its appearance and behaviour. This configuration of the object is controlled by the <em>Options</em>, also known as attributes or properties. These include width and height. Most options have a value of a specified type, but not all.</p>
 
58
    <p>Whenever an Erlang process creates a graphical object, it is said 
 
59
      to own the object. The graphics system must keep track of the owner 
 
60
      of every graphical object in order to forward incoming events to 
 
61
      the owner-process and kill the appropriate graphics window if the owner 
 
62
      process suddenly dies.</p>
 
63
    <marker id="gs_fig2"/>
 
64
    <image file="pics/gs1-1-image-2">
 
65
      <icaption>Owner Process</icaption>
 
66
    </image>
 
67
    <p>Events are messages which are sent from the graphical object to the owner-process. The events the owner-process is informed about may include:</p>
 
68
    <list type="bulleted">
 
69
      <item>the user has clicked on a button</item>
 
70
      <item>the user has entered text into an entry field</item>
 
71
      <item>the user has taken some action on the object, like moving the window.</item>
 
72
    </list>
 
73
    <marker id="gs_fig3"/>
 
74
    <image file="pics/gs1-1-image-3">
 
75
      <icaption>Events Delivered to Owner Process</icaption>
 
76
    </image>
 
77
  </section>
 
78
</chapter>
 
79