-rw-r--r-- | docs/qcop.doc | 179 |
1 files changed, 179 insertions, 0 deletions
diff --git a/docs/qcop.doc b/docs/qcop.doc new file mode 100644 index 0000000..6fe4c71 --- a/dev/null +++ b/docs/qcop.doc | |||
@@ -0,0 +1,179 @@ | |||
1 | /*! | ||
2 | |||
3 | \page qcop.html | ||
4 | |||
5 | \title QCop Messages | ||
6 | |||
7 | QCop messages allow applications to communicate with each other. | ||
8 | These messages are send using QCopEnvelope, and received by connecting | ||
9 | to a QCopChannel. | ||
10 | |||
11 | The <tt>channelname</tt> of channels within Qtopia all start with "QPE/". | ||
12 | The <tt>messagename</tt> is a function identifier followed by a list of types | ||
13 | in parentheses. There are no spaces in the message name. | ||
14 | |||
15 | The variable names shown in this documentation are purely for information | ||
16 | purposes. A message shown as | ||
17 | "messageName(Type1 varname1, Type2 varname2, Type2 varname3)" would be | ||
18 | used in program code as: | ||
19 | |||
20 | \code | ||
21 | QCopEnvelope e(channelname, "messageName(Type1,Type2,Type2)"); | ||
22 | e << parameter1 << parameter2 << parameter3; | ||
23 | \endcode | ||
24 | |||
25 | |||
26 | The system-wide channels and messages. | ||
27 | |||
28 | <dl> | ||
29 | <dt><b>QPE/System</b> | ||
30 | <dd> | ||
31 | <ul> | ||
32 | <li>busy() | ||
33 | <br> Causes a wait indicator to be shown to the user. | ||
34 | <li>notBusy() | ||
35 | <br> Cancels the wait indicator. | ||
36 | <li>linkChanged(QString) | ||
37 | <br> Sent whenever a link is changed. | ||
38 | It is sent by FileManager::saveFile() and others, and | ||
39 | received by the Launcher. | ||
40 | <li>applyStyle() | ||
41 | <br> Sent when user changes style. | ||
42 | It is received by QPEApplication and the application | ||
43 | will redraw accordingly. | ||
44 | <li>quit() | ||
45 | <br> Terminates the Qtopia environment. | ||
46 | <li>shutdown() | ||
47 | <br> Terminates the system. | ||
48 | <li>restart() | ||
49 | <br> Restarts the Qtopia environment. | ||
50 | <li>execute(QString) | ||
51 | <br> Executes or raises the given application. | ||
52 | <li>execute(QString,QString) | ||
53 | <br> Executes or raises the given application, passing an argument. | ||
54 | Note that you should consider using the | ||
55 | <b>QPE/Application/<i>appname</i></b> channels described below. | ||
56 | <li>addAlarm(QDateTime,QCString,QCString,int) | ||
57 | <br> Internal. See AlarmServer::addAlarm() | ||
58 | <li>deleteAlarm(QDateTime,QCString,QCString,int) | ||
59 | <br> Internal. See AlarmServer::deleteAlarm() | ||
60 | <li>setDefaultRotation(int) | ||
61 | <br> Internal. | ||
62 | <li>grabKeyboard(QString) | ||
63 | <br> Internal. | ||
64 | <li>timeChange(QString) | ||
65 | <br> Internal. | ||
66 | <li>clockChange(bool) | ||
67 | <br> Internal. | ||
68 | <li>setScreenSaverInterval(int) | ||
69 | <br> Internal. | ||
70 | <li>language(QString) | ||
71 | <br> Internal. | ||
72 | </ul> | ||
73 | |||
74 | <dt><b>QPE/Sync</b> | ||
75 | <ul> | ||
76 | <li>flush() | ||
77 | <br> Sent at the start of synchronization. Synchable applications | ||
78 | should save any synchable data to disk. | ||
79 | <i>Note: this message is currently asynchronous. Stay tuned | ||
80 | to discussions regarding synchronization, as this message | ||
81 | may become synchronous, requiring slight midification to | ||
82 | your code. For now, just respond in a timely fashion, | ||
83 | since the sync server merely waits a small time.</i> | ||
84 | <li>reload() | ||
85 | <br> Sent at the end of synchronization. Synchable applications | ||
86 | should reload any synchable data from disk. | ||
87 | </ul> | ||
88 | |||
89 | <dt><b>QPE/TaskBar</b> | ||
90 | <ul> | ||
91 | <li>message(QString) | ||
92 | <br> Internal. See Global::statusMessage() | ||
93 | <li>showInputMethod() | ||
94 | <br> Internal. | ||
95 | <li>hideInputMethod() | ||
96 | <br> Internal. | ||
97 | <li>reloadInputMethods() | ||
98 | <br> Internal. | ||
99 | <li>reloadApplets() | ||
100 | <br> Internal. | ||
101 | </ul> | ||
102 | |||
103 | <dt><b>QPE/Card</b> | ||
104 | <ul> | ||
105 | <li>stabChanged() | ||
106 | <br> Sent when <tt>/var/run/stab</tt>, <tt>/var/state/pcmcia/stab</tt>, | ||
107 | or <tt>/var/lib/pcmcia/stab</tt> may have changed. | ||
108 | <li>netUp() | ||
109 | <br> Sent when a network connection is running. | ||
110 | <li>netDown() | ||
111 | <br> Sent when a network connection is available, but not running. | ||
112 | <li>netUnavailable() | ||
113 | <br> Sent when a network connection is not available. | ||
114 | </ul> | ||
115 | |||
116 | <dt><b>Qt/Tray</b> | ||
117 | This channel allows Qt applications (not just Qtopia applications) | ||
118 | to show system-tray status in a cross-platform manner, | ||
119 | but it is not currently supported. See TaskbarAppletInterface for | ||
120 | a more powerful alternative for system tray applications. | ||
121 | <ul> | ||
122 | <li>popup(int,QPoint) | ||
123 | <li>remove(int) | ||
124 | <li>setIcon(int,QPixmap) | ||
125 | <li>setToolTip(int,QString) | ||
126 | <li>doubleClicked(int,QPoint) | ||
127 | <li>clicked(int,QPoint) | ||
128 | </ul> | ||
129 | </dl> | ||
130 | |||
131 | Each application listens on a channel called | ||
132 | <b>QPE/Application/<i>appname</i></b>, where <b><i>appname</i></b> is | ||
133 | the executable name (the application identifier). Standard messages on | ||
134 | this channel are: | ||
135 | |||
136 | <dl> | ||
137 | <dt><b>QPE/Application/<i>appname</i></b> | ||
138 | <ul> | ||
139 | <li>setDocument(QString) | ||
140 | <br>Internal. Causes the setDocument(const QString&) slot | ||
141 | of <a href=docwidget.html>the main document widget</a> | ||
142 | to be called. | ||
143 | <li>nextView() | ||
144 | <br>Applications connected to hardware buttons will receive | ||
145 | this message if they are already visible. | ||
146 | <li>raise() | ||
147 | <br>Internal. Causes the the main document widget and the | ||
148 | current modal widget to be raised. | ||
149 | <li>quit() | ||
150 | <br>Internal. Terminates the application. | ||
151 | <li>quitIfInvisible() | ||
152 | <br>Internal. Terminates the application if it is not shown. | ||
153 | </ul> | ||
154 | </dl> | ||
155 | |||
156 | The QPE/Application/<i>appname</i> channel has a special property: when | ||
157 | messages are sent to these channels vie QCopEnvelope, the message is | ||
158 | delivered even if the application is not yet running (the application | ||
159 | is run and the message is then sent). | ||
160 | |||
161 | Applications also respond to messages specific to the application. | ||
162 | Such messages in the base Qtopia applications are: | ||
163 | |||
164 | <dl> | ||
165 | <dt><b>QPE/Application/helpbrowser</b> | ||
166 | <ul> | ||
167 | <li>showFile(QString <i>file</i>) | ||
168 | <br>Send this message to have the Help Browser show a file. | ||
169 | The <i>file</i> may be an absolute filename or relative | ||
170 | to the system HTML documentation directory ($QPEDIR/help/html). | ||
171 | </ul> | ||
172 | <dt><b>QPE/Application/datebook</b> | ||
173 | <ul> | ||
174 | <li>alarm(QDateTime,int) | ||
175 | <br>Internal. Causes the Calendar application to sound alarms. | ||
176 | </ul> | ||
177 | </dl> | ||
178 | |||
179 | */ | ||