~ubuntu-branches/debian/experimental/kopete/experimental

« back to all changes in this revision

Viewing changes to doc/emoticonspec.docbook

  • Committer: Package Import Robot
  • Author(s): Maximiliano Curia
  • Date: 2015-02-24 11:32:57 UTC
  • mfrom: (1.1.41 vivid)
  • Revision ID: package-import@ubuntu.com-20150224113257-gnupg4v7lzz18ij0
Tags: 4:14.12.2-1
* New upstream release (14.12.2).
* Bump Standards-Version to 3.9.6, no changes needed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="UTF-8"?>
 
2
<appendix id="kopete-emoticons">
 
3
<appendixinfo>
 
4
    <title>Emoticons Specification</title>
 
5
    <releaseinfo>Version 0.1</releaseinfo>
 
6
    <date>07 January 2005</date>
 
7
    <authorgroup>
 
8
      <author>
 
9
        <firstname>Olivier</firstname>
 
10
        <surname>Goffart</surname>
 
11
        <affiliation>
 
12
          <address>
 
13
            <email>ogoffart@tiscalinet.be</email>
 
14
          </address>
 
15
        </affiliation>
 
16
      </author>
 
17
    </authorgroup>
 
18
  </appendixinfo>
 
19
 
 
20
<title>Emoticons</title>
 
21
 
 
22
  <sect1 id="introduction-emoticons">
 
23
    <title>Introduction</title>
 
24
    <para>
 
25
      This DRAFT document defines how to make a theme of emoticons typically used
 
26
                in instant messaging applications
 
27
    </para>
 
28
    <para>
 
29
      The basic scheme is very simple. The theme consists in one sub directory which
 
30
                contains all the pictures and an &XML; file that gives each picture ASCII symbols.
 
31
                A .directory file might be used.
 
32
    </para>
 
33
  <sect2 id="location">
 
34
    <title>File locations</title>
 
35
    <para>
 
36
      Files involved in this specification are located according to the "desktop
 
37
      base directory specification" which can be found on <ulink
 
38
      url="http://www.freedesktop.org/standards/">www.freedesktop.org</ulink>.
 
39
    </para>
 
40
    <para>
 
41
                All the files of the theme must be placed in a sub directory of
 
42
                 <varname>$XDG_DATA_DIRS</varname>/emoticons/
 
43
                 The name of the directory must be equal to the name of the theme.
 
44
                 That directory <emphasis>must</emphasis> contains a file called <varname>emoticons.xml</varname>
 
45
                 the format of that file is described below.
 
46
        </para>
 
47
        <para>
 
48
                  The theme directory may also contain a .directory file which contains
 
49
                  translations of the theme name and/or an icon for that theme.
 
50
        </para>
 
51
  </sect2>
 
52
  <sect2 id="emoticons-map-format">
 
53
    <title>Format of the emoticons.xml file</title>
 
54
    <para>
 
55
      Emoticon map files must be well-formed XML files.
 
56
                Implementations should ignore unknown tag or unknown attributes.
 
57
    </para>
 
58
    <sect3 id="emoticons-map-elements">
 
59
      <title>Elements</title>
 
60
      <para>
 
61
        <variablelist>
 
62
          <varlistentry>
 
63
                                        <term>&lt;messaging-emoticon-map&gt; [version="0.1"]</term>
 
64
            <listitem>
 
65
              <para>
 
66
                                                 The root element is &lt;messaging-emoticon-map&gt;
 
67
                                                 all other elements are contained by it.
 
68
              </para>
 
69
            </listitem>
 
70
          </varlistentry>
 
71
          <varlistentry>
 
72
            <term>&lt;emoticon file="..."&gt;</term>
 
73
            <listitem>
 
74
              <para>
 
75
                                                This element represents one emoticon.
 
76
                                                The attribute file is the name of the image file which must be in the same directory.
 
77
                                                The extension may be omitted. In that case, the implementation look in that directory
 
78
                                                for a file with the same name in a supported format.
 
79
              </para>
 
80
                                  <para>
 
81
                                                 There are no order for emoticon in the map.
 
82
                                                 But the first icon in the map is generally used to identify the theme graphically.
 
83
                                                 By convention the this SHOULD be :-)
 
84
                                  </para>
 
85
            </listitem>
 
86
          </varlistentry>
 
87
          <varlistentry>
 
88
            <term>&lt;string&gt;</term>
 
89
            <listitem>
 
90
              <para>
 
91
                This element may only appear below &lt;emoticon&gt;.
 
92
                                         It represents the ASCII string which will be matched in the text,
 
93
                                         and replaced by the image specified by the file attribute of the emoticon.
 
94
              </para>
 
95
                                  <para>
 
96
                                                 There may be several strings per emoticon.
 
97
                                  </para>
 
98
                                  <para>
 
99
                                                 There is no order for string inside an emoticon. But the first one SHOULD be
 
100
                                                 the default one, and will be taken if there is a GUI selector.
 
101
                                  </para>
 
102
            </listitem>
 
103
          </varlistentry>
 
104
            </variablelist>
 
105
  </para>
 
106
    </sect3>
 
107
  </sect2>
 
108
 
 
109
  <sect2 id="img-format">
 
110
    <title>Format of the image.</title>
 
111
    <para>
 
112
                All images SHOULD be in a supported format :  PNG, GIF or MNG.
 
113
    </para>
 
114
  </sect2>
 
115
 
 
116
  <sect2 id="implementation">
 
117
    <title>Implementations notes</title>
 
118
         <sect3 id="impl-parser">
 
119
          <title>Emoticon parser</title>
 
120
    <para>
 
121
                There are no real recommendation how to parse emoticons. But
 
122
                an emoticon with a longer string should have the priority over one with a shorter string.
 
123
                (Example: if both :-() and :-( are in a theme, the picture for the first one should be used
 
124
                        when :-() is encountered)
 
125
    </para>
 
126
</sect3>
 
127
</sect2>
 
128
 
 
129
<sect2 id="example">
 
130
          <title>Example</title>
 
131
          <para>
 
132
                         <programlisting>
 
133
&lt;messaging-emoticon-map&gt;
 
134
        &lt;emoticon file="smile.png"&gt;
 
135
                        &lt;string&gt;:-)&lt;/string&gt;
 
136
                        &lt;string&gt;:)&lt;/string&gt;
 
137
                        &lt;string&gt;:o)&lt;/string&gt;
 
138
        &lt;/emoticon&gt;
 
139
 
 
140
        &lt;emoticon file="wink.png"&gt;
 
141
                        &lt;string&gt;;-)&lt;/string&gt;
 
142
                        &lt;string&gt;;)&lt;/string&gt;
 
143
        &lt;/emoticon&gt;
 
144
 
 
145
        &lt;emoticon file="unhappy.png"&gt;
 
146
                        &lt;string&gt;:-(&lt;/string&gt;
 
147
                        &lt;string&gt;:(&lt;/string&gt;
 
148
        &lt;/emoticon&gt;
 
149
&lt;/messaging-emoticon-map&gt;
 
150
 
 
151
 </programlisting>
 
152
</para>
 
153
</sect2>
 
154
 
 
155
<!--sect2 id="todo">
 
156
          <title>TODO</title>
 
157
          <para>
 
158
                         A DTD of the XML file
 
159
          </para>
 
160
</sect2-->
 
161
</sect1>
 
162
</appendix>
 
163