1
<section id="ctrl-interface" xmlns:xi="http://www.w3.org/2001/XInclude">
2
<title>Calling by Interface</title>
4
<section><title>Interfaces</title>
6
<para>When applets make use of a control, they are interested in its
7
functionality, not its particular implementation. It doesn't matter which
8
control gets loaded as long as the control does exactly what was expected.
11
<para>The functionality is described by <emphasize>interfaces</emphasize>
12
and several implementations of an interface can exist. However, control
13
authors have to make sure that two different implementations of the same
14
interface provide the same functionality.</para>
19
<section><title>Unique Identifiers</title>
21
<para>To avoid confusion and incompatibility problems, interface identifiers
22
have to be globally unique. You don't have to worry about this requirement,
23
however, because <application>gDesklets</application> takes care about this
24
for you. It determines the identifier for
25
each interface and makes sure that changes in an interface lead to a
26
different unique identifier.</para>
28
<para>The interface identifiers are made up of a human-readable name given
29
by the interface's author, and a random-looking string. That string is
30
based on a checksum of the interface and is affected by all changes to the
31
interface, except for changes in comments.</para>
33
<para>The identifiers might look intimidating at first, but there is no magic
34
behind them and the only occasion when you get into touch with them is when
35
you want to <link linkend="dsp-tag-control">load a control</link> in
36
an applet. In that case, just use copy&paste.</para>
38
<para>Examples for interface identifiers are:</para>
40
ICalendar:cfw9o85ptery8egvoff6ijswc
41
ISystem:4i4p0jtvdz87qx44x2dm97ltj
42
ITime:9y703dqtfnv4w373caserz68r
45
<para>They can be looked up in the
46
<application>gdesklets-shell</application>, or by using the tool
47
<application>test-control.py</application>. There's no need to take care
48
about the identifier while writing a control.</para>