1
This directory contains the CORBA IDL file for SandUhr
4
In the following I will describe the semantics for
5
the various attributes and methods of the SandUhr
6
CORBA interface. The directory remote/ of the SandUhr
7
source code distribution contains example code, which
8
illustrates the use of this interface.
11
The central part of SandUhr is the 'Timer' interface.
12
It represents the sand-glass-shaped window and every piece
13
of information associated to it.
15
* enum TimerState { TSPrepare, TSRunning, TSDone };
16
readonly attribute TimerState State;
18
The state of the timer. This is 'TSPrepare' if the timer is
19
not yet running (e.g. while the initial setup window is
20
showing), 'TSRunning' during normal operation, and 'TSDone'
21
after the timer elapsed (i.e. while the alarm is delivered).
23
* attribute string TimeSpec;
25
The alarm time as a time specification string. The format of
26
this string is explained in the SandUhr Manual.
28
* attribute string Message;
30
The alarm message. This is passed to the alarm action
33
* attribute AlarmAction Alarm;
35
The alarm action. There are several subclasses of AlarmAction
36
available. These are described below.
39
unsigned short Red, Green, Blue;
41
attribute Color SandColor;
43
The fill color of the sand glass. The Red, Green, and Blue
44
values may lay in the range 0 to 255 inclusive.
46
* attribute boolean WindowDecorations;
47
enum Layer { LayerDesktop, LayerBelow, LayerNormal, LayerOntop };
48
attribute Layer WindowLayer;
50
These fields describe the interaction with the window manager.
51
They control the corresponding GNOME window manager hints.
55
Destroy the currently running timer without delivering the
58
* unsigned long TimeLeft () raises (NotRunning);
60
Return the number of seconds left until the alarm is
61
delivered. The NotRunning exception is raised if
62
the timer's state is not TSRunning.
65
The Alarm action is described by Objects of type AlarmAction.
67
* readonly attribute boolean NeedsPopup;
69
If this is true, the Timer will display the alarm message in a
70
popup window in addition to the Deliver() call.
72
* void Attach (in Timer T);
74
This is called by a Timer object, before it accesses the
75
AlarmAction object in any other way. It may be used to
76
implement reference counting for alarm actions.
78
* void Detach (in Timer T);
80
This is called by the Timer object when the Timer is no longer
81
interested in this AlarmAction. This occurs after the Deliver()
82
call or after the AlarmAction is replaced with another one.
83
This method may be used to implement reference counting for
86
* void Deliver (in string TimeSpec, in string Message);
88
This method is called by the timer to actually deliver the
89
alarm. The function is responsible for delivering the alarm
90
to the user. If the delivery fails it must raise the
91
DeliveryFailed exception. Note that the TimeSpec contains a
92
normalized form of the alarm time, not the originial time
96
SandUhr implements three subclasses of AlarmAction:
98
* interface AlarmBeep: AlarmAction {
99
attribute unsigned short Count;
102
Ring the keybord bell repeatedly. Count is the number of beeps.
103
It is decreased while the alarm is delivered until the value
106
* interface AlarmSound: AlarmAction {
107
attribute string SoundFile;
110
Playes a sound file via the enlightened sound daemon esd.
111
The file name 'SoundFile' must denote a file on the host
112
the AlarmSound object lives on.
114
* interface AlarmCommand: AlarmAction {
115
attribute string CommandString;
118
Execute an arbitrary shell command. This command is executed
119
via 'gnome_execute_shell' on the host the AlarmCommand object
123
To create Alarm and Timer objects you should use the TimerFactory
124
interface. It is derived from GNOME::ObjectFactory. The TimerFactory
125
represents the control window and all resources associated with it.
126
TimerFactory objects are registered with the GNOME object activation
129
* AlarmBeep CreateAlarmBeep (in unsigned short Count);
130
AlarmSound CreateAlarmSound (in string SoundFile);
131
AlarmCommand CreateAlarmCommand (in string CommandString);
133
Create an AlarmAction object. This may be assigned to
134
a timer's Alarm attribute.
136
* Timer CreateTimer (in string TimeSpec, in string Message)
137
raises (InvalidTime);
139
Create a new Timer object. The alarm time is described by
140
TimeSpec. The format of this string is explained in the
141
SandUhr Manual. If TimeSpec is the empty string, open a
142
window to query the user for an alarm time. If TimeSpec is not
143
a valid alarm time specification, the InvalidTime exception is
146
* typedef sequence<Timer> TimerVec;
147
readonly attribute TimerVec Timers;
149
This is the list of timers, which are under control of the
152
* void ShowControl (in boolean Show);
154
Show or hide the Control window, which is associated with the