~ubuntu-branches/ubuntu/quantal/openmotif/quantal

« back to all changes in this revision

Viewing changes to demos/programs/airport/README

  • Committer: Bazaar Package Importer
  • Author(s): Stefan Bauer
  • Date: 2010-06-23 12:12:31 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20100623121231-u89gxdp51sg9wjj2
Tags: 2.3.0-1
* New Maintainer (Closes: #379258) 
* Acknowledge NMU changes
* New upstream release (Closes: #494375)
* Get rid of security patches as they are already part of new upstream
  release (00-xpmvuln.openmotif.patch, 342092-CVE-2005-3964.patch)
* Bump Standards to 3.8.4
* Added {misc:Depends} to make the package lintian cleaner
* Fix weak-library-dev-dependency by adding ${binary:Version}) for the
  -dev Package of openmotif
* Let package depend on autotools-dev to use newer autotools-helper-files
* Work around an autoconf-bug (Gentoo-Bug #1475)
* Added Client-side anti-aliased fonts support via XFT
* Added UTF-8 and UTF8_STRING atom support
* Ability to show text and pixmaps in Label, LabelGadget and all
  derived widgets
* Support of PNG/JPEG image formats in the same way as XPM is supported
* Increase FILE_OFFSET_BITS to 64 to show files >2GB in file-selector
  Idea taken from Magne Oestlyngen (Closes: #288537)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $TOG: README /main/5 1997/03/05 11:45:52 dbl $ */
 
2
%@OPENGROUP_COPYRIGHT@
 
3
%COPYRIGHT NOTICE
 
4
%Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc.
 
5
%Copyright (c) 1996, 1997, 1998, 1999, 2000 The Open Group
 
6
%ALL RIGHTS RESERVED (MOTIF). See the file named COPYRIGHT.MOTIF for
 
7
%the full copyright text.
 
8
%
 
9
%This software is subject to an open license. It may only be
 
10
%used on, with or for operating systems which are themselves open
 
11
%source systems. You must contact The Open Group for a license
 
12
%allowing distribution and sublicensing of this software on, with,
 
13
%or for operating systems which are not Open Source programs.
 
14
%
 
15
%See http://www.opengroup.org/openmotif/license for full
 
16
%details of the license agreement. Any use, reproduction, or
 
17
%distribution of the program constitutes recipient's acceptance of
 
18
%this agreement.
 
19
%
 
20
%EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
 
21
%PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 
22
%KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY
 
23
%WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
 
24
%OR FITNESS FOR A PARTICULAR PURPOSE
 
25
%
 
26
%EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT
 
27
%NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT,
 
28
%INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 
29
%DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED
 
30
%AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 
31
%LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
 
32
%ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE
 
33
%EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE
 
34
%POSSIBILITY OF SUCH DAMAGES.
 
35
%
 
36
%HISTORY
 
37
 
 
38
The airport program demonstrates the use of Motif Drag and Drop in both
 
39
dynamic and pre-register mode.
 
40
 
 
41
The demo illustrates drag and drop thru a plane/airport metaphor.
 
42
Each client represents an airport with planes at the gates.
 
43
The demo is only interesting if you run TWO clients. Flying
 
44
only makes sense from a departure airport to a destination airport.
 
45
 
 
46
The client displays in the center part of the main window a drawing
 
47
area with the airport track and a few planes.  Every airport has a
 
48
traffic controller that monitors outgoing planes and incoming planes.
 
49
 
 
50
On the left side of the main window, you can see the detailed status
 
51
of the latest outgoing flight.
 
52
 
 
53
On the right side of the main window, you can see the detailed status
 
54
of an incoming flight.
 
55
 
 
56
At the bottom of the main window is a message area displaying 
 
57
status of the flights.
 
58
 
 
59
On the Departure Side:
 
60
----------------------
 
61
 
 
62
The user can pick a plane from a gate and drag it.
 
63
At this moment the airport announces in the message area the
 
64
flight number and the departure gate number, with a message
 
65
 
 
66
        Flight %d leaving from gate %d
 
67
 
 
68
When dragging the plane icon (the plane flies) the out going airport
 
69
displays some state and produces a sound effect on every mouse motion.
 
70
 
 
71
When the plane is over the root window, it says: Over Ocean
 
72
When the plane is over a top level window, it says: Over Land
 
73
When the plane is over another airport, its says: Radar Echo
 
74
 
 
75
If a drop occurs outside of an airport, the flight is simply
 
76
returned to its departure gate, with message
 
77
 
 
78
        Flight %d has returned.
 
79
 
 
80
If a drop occurs on airport,
 
81
        the out going airport announces first: Landing.
 
82
 
 
83
Then it waits for the destination to request data.
 
84
When the drop is finished (successfully) a message is displayed
 
85
 
 
86
        Passengers from flight %d have landed safe
 
87
 
 
88
If the drop fails,
 
89
 
 
90
        an unfortunate plane crash message is shown.
 
91
 
 
92
 
 
93
On the Arrival Side:
 
94
-------------------
 
95
 
 
96
The traffic is initially: No Traffic
 
97
 
 
98
When a plane is approaching the airport, the status is: Radar Echo.
 
99
At this point, on every mouse movement the airport tracks are 
 
100
highlighted, providing a blinking feedback to the pilot.
 
101
 
 
102
If a drop occurs, the state is set to: Landing.
 
103
 
 
104
The airport then finds an available gate to taxi the plane
 
105
and obtains information from the source (starts data transfer)
 
106
 
 
107
The data transfered is actually the flight number.
 
108
 
 
109
If the drop is successful (the flight number is received from the source)
 
110
a message is displayed:
 
111
 
 
112
        Flight %d arrived at gate %d
 
113
 
 
114
 
 
115
Differences between PreRegister and Dynamic protocol
 
116
----------------------------------------------------
 
117
 
 
118
In PreRegister mode, since the destination is unaware of the
 
119
incoming flights
 
120
 
 
121
        1) the Traffic Control always shows: No Traffic
 
122
        2) the tracks do not blink on incoming flights.
 
123
 
 
124
The resources are
 
125
-----------------
 
126
 
 
127
Airport.trackMargin: 20 a margin inside DrawingArea
 
128
Airport.trackBackground: track background
 
129
Airport.trackForeground: track foreground
 
130
Airport.spotBackground: plane icon background color at gate
 
131
Airport.spotForeground: plane icon foreground color at gate
 
132
Airport.dragUnderBackground: track background color
 
133
Airport.dragUnderForeground: track foreground color
 
134
Airport.flyingBackground: plane icon background color when flying
 
135
Airport.noneForeground: plane color when flying over ocean or land
 
136
Airport.validForeground: plane color when over an airport
 
137
Airport.invalidForeground: plane color when over a non-airport site
 
138
Airport.bellDuration: 100
 
139
Airport.bellPercent: 100
 
140
 
 
141
 
 
142
Code Organization:
 
143
-----------------
 
144
 
 
145
 
 
146
File main.c creates the widgets and does the drawing.
 
147
File dragsource.c contains all callbacks related to the source
 
148
        drag over feedback and drag start
 
149
File dropsite.c contains all callbacks related to destination
 
150
        drag under feedback and drop site.
 
151
 
 
152
BUGS:
 
153
----
 
154
 
 
155
        Requesting Help in planes is known to be unsecure :-)