Merge lp:~bregma/geis/improved-api-docs into lp:geis
- improved-api-docs
- Merge into trunk
Proposed by
Stephen M. Webb
Status: | Merged |
---|---|
Merged at revision: | 117 |
Proposed branch: | lp:~bregma/geis/improved-api-docs |
Merge into: | lp:geis |
Diff against target: |
2425 lines (+1093/-327) 10 files modified
.bzrignore (+1/-0) ChangeLog (+14/-0) Makefile.am (+1/-1) configure.ac (+2/-1) doc/Doxyfile (+104/-45) doc/api.dox (+21/-0) doc/using_geis_v2.dox (+78/-0) examples/Makefile.am (+28/-0) examples/geis2.c (+190/-0) include/geis/geis.h (+654/-280) |
To merge this branch: | bzr merge lp:~bregma/geis/improved-api-docs |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Henrik Rydberg (community) | Approve | ||
Review via email: mp+53737@code.launchpad.net |
Commit message
Description of the change
Improved documentation, including example code using GEIS v2.
The generated documentation can be found at <http://
No code changes are included.
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file '.bzrignore' |
2 | --- .bzrignore 2011-03-07 15:23:53 +0000 |
3 | +++ .bzrignore 2011-03-17 04:23:22 +0000 |
4 | @@ -24,6 +24,7 @@ |
5 | doc/api |
6 | doc/docbook-xsl.css |
7 | doc/geisspec-1.0.html |
8 | +examples/geis2 |
9 | geis_config.* |
10 | libtool |
11 | libutouch-geis.pc |
12 | |
13 | === modified file 'ChangeLog' |
14 | --- ChangeLog 2011-03-16 21:56:03 +0000 |
15 | +++ ChangeLog 2011-03-17 04:23:22 +0000 |
16 | @@ -1,5 +1,19 @@ |
17 | 2011-03-16 Stephen M. Webb <stephen.webb@canonical.com> |
18 | |
19 | + Refined the API documentation and added an examples directory. |
20 | + |
21 | + * doc/api.dox: new documentation file |
22 | + * doc/logo_x64.png: new logo image |
23 | + * doc/using_geis_v2.dox: new documentation file |
24 | + * examples/Makefile.am: examples subdirectory Makefile |
25 | + * examples/geis2.c: new example program |
26 | + * Makefile.am: added examples subdirectory |
27 | + * configure.ac: added examples subdirectory |
28 | + * doc/Doxyfile: tweaked Doxygen settings |
29 | + * include/geis/geis.h: complete API docs refinement |
30 | + |
31 | +2011-03-16 Stephen M. Webb <stephen.webb@canonical.com> |
32 | + |
33 | Replaced device class with explicit attributes. |
34 | |
35 | * include/geis/geis.h (GEIS_DEVICE_CLASS_*) removed |
36 | |
37 | === modified file 'Makefile.am' |
38 | --- Makefile.am 2011-02-08 03:26:22 +0000 |
39 | +++ Makefile.am 2011-03-17 04:23:22 +0000 |
40 | @@ -21,7 +21,7 @@ |
41 | |
42 | ACLOCAL_MFLAGS = -I m4 |
43 | |
44 | -SUBDIRS = include libs libutouch-geis testsuite doc |
45 | +SUBDIRS = include libs libutouch-geis testsuite examples doc |
46 | |
47 | doc-%: |
48 | $(MAKE) -C doc $@ |
49 | |
50 | === modified file 'configure.ac' |
51 | --- configure.ac 2011-03-09 19:46:45 +0000 |
52 | +++ configure.ac 2011-03-17 04:23:22 +0000 |
53 | @@ -96,5 +96,6 @@ |
54 | testsuite/libutouch-geis/Makefile |
55 | testsuite/geis2/Makefile |
56 | testsuite/geis1/Makefile |
57 | - testsuite/geistest/Makefile]) |
58 | + testsuite/geistest/Makefile |
59 | + examples/Makefile]) |
60 | AC_OUTPUT |
61 | |
62 | === modified file 'doc/Doxyfile' |
63 | --- doc/Doxyfile 2011-03-12 02:52:56 +0000 |
64 | +++ doc/Doxyfile 2011-03-17 04:23:22 +0000 |
65 | @@ -1,4 +1,4 @@ |
66 | -# Doxyfile 1.7.1 |
67 | +# Doxyfile 1.7.3 |
68 | |
69 | # This file describes the settings to be used by the documentation system |
70 | # doxygen (www.doxygen.org) for a project |
71 | @@ -31,7 +31,20 @@ |
72 | # This could be handy for archiving the generated documentation or |
73 | # if some version control system is used. |
74 | |
75 | -PROJECT_NUMBER = 0.3 |
76 | +PROJECT_NUMBER = 2.0 |
77 | + |
78 | +# Using the PROJECT_BRIEF tag one can provide an optional one line description |
79 | +# for a project that appears at the top of each page and should give viewer |
80 | +# a quick idea about the purpose of the project. Keep the description short. |
81 | + |
82 | +PROJECT_BRIEF = "Gesture Engine Interface Support" |
83 | + |
84 | +# With the PROJECT_LOGO tag one can specify an logo or icon that is |
85 | +# included in the documentation. The maximum height of the logo should not |
86 | +# exceed 55 pixels and the maximum width should not exceed 200 pixels. |
87 | +# Doxygen will copy the logo to the output directory. |
88 | + |
89 | +PROJECT_LOGO = logo_x64.png |
90 | |
91 | # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) |
92 | # base path where the generated documentation will be put. |
93 | @@ -57,7 +70,7 @@ |
94 | # Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, |
95 | # Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English |
96 | # messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, |
97 | -# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, |
98 | +# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, |
99 | # Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. |
100 | |
101 | OUTPUT_LANGUAGE = English |
102 | @@ -136,7 +149,7 @@ |
103 | STRIP_FROM_INC_PATH = |
104 | |
105 | # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter |
106 | -# (but less readable) file names. This can be useful is your file systems |
107 | +# (but less readable) file names. This can be useful if your file system |
108 | # doesn't support long names like on DOS, Mac, or CD-ROM. |
109 | |
110 | SHORT_NAMES = NO |
111 | @@ -147,7 +160,7 @@ |
112 | # comments will behave just like regular Qt-style comments |
113 | # (thus requiring an explicit @brief command for a brief description.) |
114 | |
115 | -JAVADOC_AUTOBRIEF = NO |
116 | +JAVADOC_AUTOBRIEF = YES |
117 | |
118 | # If the QT_AUTOBRIEF tag is set to YES then Doxygen will |
119 | # interpret the first line (until the first dot) of a Qt-style |
120 | @@ -233,7 +246,7 @@ |
121 | # to include (a tag file for) the STL sources as input, then you should |
122 | # set this tag to YES in order to let doxygen match functions declarations and |
123 | # definitions whose arguments contain STL classes (e.g. func(std::string); v.s. |
124 | -# func(std::string) {}). This also make the inheritance and collaboration |
125 | +# func(std::string) {}). This also makes the inheritance and collaboration |
126 | # diagrams that involve STL classes more complete and accurate. |
127 | |
128 | BUILTIN_STL_SUPPORT = NO |
129 | @@ -251,7 +264,7 @@ |
130 | |
131 | # For Microsoft's IDL there are propget and propput attributes to indicate getter |
132 | # and setter methods for a property. Setting this option to YES (the default) |
133 | -# will make doxygen to replace the get and set methods by a property in the |
134 | +# will make doxygen replace the get and set methods by a property in the |
135 | # documentation. This will only work if the methods are indeed getting or |
136 | # setting a simple type. If this is not the case, or you want to show the |
137 | # methods anyway, you should set this option to NO. |
138 | @@ -289,10 +302,10 @@ |
139 | # For small to medium size projects (<1000 input files) the default value is |
140 | # probably good enough. For larger projects a too small cache size can cause |
141 | # doxygen to be busy swapping symbols to and from disk most of the time |
142 | -# causing a significant performance penality. |
143 | +# causing a significant performance penalty. |
144 | # If the system has enough physical memory increasing the cache will improve the |
145 | # performance by keeping more symbols in memory. Note that the value works on |
146 | -# a logarithmic scale so increasing the size by one will rougly double the |
147 | +# a logarithmic scale so increasing the size by one will roughly double the |
148 | # memory usage. The cache size is given by this formula: |
149 | # 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, |
150 | # corresponding to a cache size of 2^16 = 65536 symbols |
151 | @@ -337,7 +350,7 @@ |
152 | # extracted and appear in the documentation as a namespace called |
153 | # 'anonymous_namespace{file}', where file will be replaced with the base |
154 | # name of the file that contains the anonymous namespace. By default |
155 | -# anonymous namespace are hidden. |
156 | +# anonymous namespaces are hidden. |
157 | |
158 | EXTRACT_ANON_NSPACES = NO |
159 | |
160 | @@ -448,6 +461,15 @@ |
161 | |
162 | SORT_BY_SCOPE_NAME = NO |
163 | |
164 | +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to |
165 | +# do proper type resolution of all parameters of a function it will reject a |
166 | +# match between the prototype and the implementation of a member function even |
167 | +# if there is only one candidate or it is obvious which candidate to choose |
168 | +# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen |
169 | +# will still accept a match between prototype and implementation in such cases. |
170 | + |
171 | +STRICT_PROTO_MATCHING = NO |
172 | + |
173 | # The GENERATE_TODOLIST tag can be used to enable (YES) or |
174 | # disable (NO) the todo list. This list is created by putting \todo |
175 | # commands in the documentation. |
176 | @@ -478,14 +500,14 @@ |
177 | ENABLED_SECTIONS = |
178 | |
179 | # The MAX_INITIALIZER_LINES tag determines the maximum number of lines |
180 | -# the initial value of a variable or define consists of for it to appear in |
181 | +# the initial value of a variable or macro consists of for it to appear in |
182 | # the documentation. If the initializer consists of more lines than specified |
183 | # here it will be hidden. Use a value of 0 to hide initializers completely. |
184 | -# The appearance of the initializer of individual variables and defines in the |
185 | +# The appearance of the initializer of individual variables and macros in the |
186 | # documentation can be controlled using \showinitializer or \hideinitializer |
187 | # command in the documentation regardless of this setting. |
188 | |
189 | -MAX_INITIALIZER_LINES = 30 |
190 | +MAX_INITIALIZER_LINES = 0 |
191 | |
192 | # Set the SHOW_USED_FILES tag to NO to disable the list of files generated |
193 | # at the bottom of the documentation of classes and structs. If set to YES the |
194 | @@ -558,7 +580,7 @@ |
195 | |
196 | WARN_IF_DOC_ERROR = YES |
197 | |
198 | -# This WARN_NO_PARAMDOC option can be abled to get warnings for |
199 | +# The WARN_NO_PARAMDOC option can be enabled to get warnings for |
200 | # functions that are documented, but have no documentation for their parameters |
201 | # or return value. If set to NO (the default) doxygen will only warn about |
202 | # wrong or incomplete parameter documentation, but not about the absence of |
203 | @@ -590,7 +612,8 @@ |
204 | # directories like "/usr/src/myproject". Separate the files or directories |
205 | # with spaces. |
206 | |
207 | -INPUT = ../include/geis |
208 | +INPUT = ../include/geis \ |
209 | + . |
210 | |
211 | # This tag can be used to specify the character encoding of the source files |
212 | # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is |
213 | @@ -604,8 +627,9 @@ |
214 | # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp |
215 | # and *.h) to filter out the source-files in the directories. If left |
216 | # blank the following patterns are tested: |
217 | -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx |
218 | -# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 |
219 | +# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh |
220 | +# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py |
221 | +# *.f90 *.f *.for *.vhd *.vhdl |
222 | |
223 | FILE_PATTERNS = *.c \ |
224 | *.cc \ |
225 | @@ -637,7 +661,8 @@ |
226 | *.f90 \ |
227 | *.f \ |
228 | *.vhd \ |
229 | - *.vhdl |
230 | + *.vhdl \ |
231 | + *.dox |
232 | |
233 | # The RECURSIVE tag can be used to turn specify whether or not subdirectories |
234 | # should be searched for input files as well. Possible values are YES and NO. |
235 | @@ -652,7 +677,7 @@ |
236 | EXCLUDE = |
237 | |
238 | # The EXCLUDE_SYMLINKS tag can be used select whether or not files or |
239 | -# directories that are symbolic links (a Unix filesystem feature) are excluded |
240 | +# directories that are symbolic links (a Unix file system feature) are excluded |
241 | # from the input. |
242 | |
243 | EXCLUDE_SYMLINKS = NO |
244 | @@ -677,7 +702,7 @@ |
245 | # directories that contain example code fragments that are included (see |
246 | # the \include command). |
247 | |
248 | -EXAMPLE_PATH = |
249 | +EXAMPLE_PATH = ../examples |
250 | |
251 | # If the value of the EXAMPLE_PATH tag contains directories, you can use the |
252 | # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp |
253 | @@ -713,8 +738,8 @@ |
254 | # basis. Doxygen will compare the file name with each pattern and apply the |
255 | # filter if there is a match. The filters are a list of the form: |
256 | # pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further |
257 | -# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER |
258 | -# is applied to all files. |
259 | +# info on how filters are used. If FILTER_PATTERNS is empty or if |
260 | +# non of the patterns match the file name, INPUT_FILTER is applied. |
261 | |
262 | FILTER_PATTERNS = |
263 | |
264 | @@ -724,6 +749,14 @@ |
265 | |
266 | FILTER_SOURCE_FILES = NO |
267 | |
268 | +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file |
269 | +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) |
270 | +# and it is also possible to disable source filtering for a specific pattern |
271 | +# using *.ext= (so without naming a filter). This option only has effect when |
272 | +# FILTER_SOURCE_FILES is enabled. |
273 | + |
274 | +FILTER_SOURCE_PATTERNS = |
275 | + |
276 | #--------------------------------------------------------------------------- |
277 | # configuration options related to source browsing |
278 | #--------------------------------------------------------------------------- |
279 | @@ -777,7 +810,7 @@ |
280 | # will generate a verbatim copy of the header file for each class for |
281 | # which an include is specified. Set to NO to disable this. |
282 | |
283 | -VERBATIM_HEADERS = YES |
284 | +VERBATIM_HEADERS = NO |
285 | |
286 | #--------------------------------------------------------------------------- |
287 | # configuration options related to the alphabetical class index |
288 | @@ -1046,8 +1079,10 @@ |
289 | |
290 | DISABLE_INDEX = NO |
291 | |
292 | -# This tag can be used to set the number of enum values (range [1..20]) |
293 | -# that doxygen will group on one line in the generated HTML documentation. |
294 | +# This tag can be used to set the number of enum values (range [0,1..20]) |
295 | +# that doxygen will group on one line in the generated HTML documentation. |
296 | +# Note that a value of 0 will completely suppress the enum values from |
297 | +# appearing in the overview section. |
298 | |
299 | ENUM_VALUES_PER_LINE = 4 |
300 | |
301 | @@ -1093,6 +1128,26 @@ |
302 | |
303 | FORMULA_TRANSPARENT = YES |
304 | |
305 | +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax |
306 | +# (see http://www.mathjax.org) which uses client side Javascript for the |
307 | +# rendering instead of using prerendered bitmaps. Use this if you do not |
308 | +# have LaTeX installed or if you want to formulas look prettier in the HTML |
309 | +# output. When enabled you also need to install MathJax separately and |
310 | +# configure the path to it using the MATHJAX_RELPATH option. |
311 | + |
312 | +USE_MATHJAX = NO |
313 | + |
314 | +# When MathJax is enabled you need to specify the location relative to the |
315 | +# HTML output directory using the MATHJAX_RELPATH option. The destination |
316 | +# directory should contain the MathJax.js script. For instance, if the mathjax |
317 | +# directory is located at the same level as the HTML output directory, then |
318 | +# MATHJAX_RELPATH should be ../mathjax. The default value points to the |
319 | +# mathjax.org site, so you can quickly see the result without installing |
320 | +# MathJax, but it is strongly recommended to install a local copy of MathJax |
321 | +# before deployment. |
322 | + |
323 | +MATHJAX_RELPATH = http://www.mathjax.org/mathjax |
324 | + |
325 | # When the SEARCHENGINE tag is enabled doxygen will generate a search box |
326 | # for the HTML output. The underlying search engine uses javascript |
327 | # and DHTML and should work on any modern browser. Note that when using |
328 | @@ -1108,7 +1163,7 @@ |
329 | # using Javascript. Doxygen will generate the search PHP script and index |
330 | # file to put on the web server. The advantage of the server |
331 | # based approach is that it scales better to large projects and allows |
332 | -# full text search. The disadvances is that it is more difficult to setup |
333 | +# full text search. The disadvantages are that it is more difficult to setup |
334 | # and does not have live searching capabilities. |
335 | |
336 | SERVER_BASED_SEARCH = NO |
337 | @@ -1149,7 +1204,7 @@ |
338 | COMPACT_LATEX = NO |
339 | |
340 | # The PAPER_TYPE tag can be used to set the paper type that is used |
341 | -# by the printer. Possible values are: a4, a4wide, letter, legal and |
342 | +# by the printer. Possible values are: a4, letter, legal and |
343 | # executive. If left blank a4wide will be used. |
344 | |
345 | PAPER_TYPE = a4wide |
346 | @@ -1364,13 +1419,13 @@ |
347 | # compilation will be performed. Macro expansion can be done in a controlled |
348 | # way by setting EXPAND_ONLY_PREDEF to YES. |
349 | |
350 | -MACRO_EXPANSION = NO |
351 | +MACRO_EXPANSION = YES |
352 | |
353 | # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES |
354 | # then the macro expansion is limited to the macros specified with the |
355 | # PREDEFINED and EXPAND_AS_DEFINED tags. |
356 | |
357 | -EXPAND_ONLY_PREDEF = NO |
358 | +EXPAND_ONLY_PREDEF = YES |
359 | |
360 | # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files |
361 | # in the INCLUDE_PATH (see below) will be search if a #include is found. |
362 | @@ -1398,20 +1453,20 @@ |
363 | # undefined via #undef or recursively expanded use the := operator |
364 | # instead of the = operator. |
365 | |
366 | -PREDEFINED = GEIS_API="" |
367 | +PREDEFINED = GEIS_API= |
368 | |
369 | # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then |
370 | # this tag can be used to specify a list of macro names that should be expanded. |
371 | # The macro definition that is found in the sources will be used. |
372 | -# Use the PREDEFINED tag if you want to use a different macro definition. |
373 | +# Use the PREDEFINED tag if you want to use a different macro definition that |
374 | +# overrules the definition found in the source code. |
375 | |
376 | EXPAND_AS_DEFINED = |
377 | |
378 | # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then |
379 | -# doxygen's preprocessor will remove all function-like macros that are alone |
380 | -# on a line, have an all uppercase name, and do not end with a semicolon. Such |
381 | -# function macros are typically used for boiler-plate code, and will confuse |
382 | -# the parser if not removed. |
383 | +# doxygen's preprocessor will remove all references to function-like macros |
384 | +# that are alone on a line, have an all uppercase name, and do not end with a |
385 | +# semicolon, because these will confuse the parser if not removed. |
386 | |
387 | SKIP_FUNCTION_MACROS = YES |
388 | |
389 | @@ -1465,9 +1520,8 @@ |
390 | # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will |
391 | # generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base |
392 | # or super classes. Setting the tag to NO turns the diagrams off. Note that |
393 | -# this option is superseded by the HAVE_DOT option below. This is only a |
394 | -# fallback. It is recommended to install and use dot, since it yields more |
395 | -# powerful graphs. |
396 | +# this option also works with HAVE_DOT disabled, but it is recommended to |
397 | +# install and use dot, since it yields more powerful graphs. |
398 | |
399 | CLASS_DIAGRAMS = YES |
400 | |
401 | @@ -1501,11 +1555,10 @@ |
402 | |
403 | DOT_NUM_THREADS = 0 |
404 | |
405 | -# By default doxygen will write a font called FreeSans.ttf to the output |
406 | -# directory and reference it in all dot files that doxygen generates. This |
407 | -# font does not include all possible unicode characters however, so when you need |
408 | -# these (or just want a differently looking font) you can specify the font name |
409 | -# using DOT_FONTNAME. You need need to make sure dot is able to find the font, |
410 | +# By default doxygen will write a font called Helvetica to the output |
411 | +# directory and reference it in all dot files that doxygen generates. |
412 | +# When you want a differently looking font you can specify the font name |
413 | +# using DOT_FONTNAME. You need to make sure dot is able to find the font, |
414 | # which can be done by putting it in a standard location or by setting the |
415 | # DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory |
416 | # containing the font. |
417 | @@ -1585,7 +1638,7 @@ |
418 | CALLER_GRAPH = NO |
419 | |
420 | # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen |
421 | -# will graphical hierarchy of all classes instead of a textual one. |
422 | +# will generate a graphical hierarchy of all classes instead of a textual one. |
423 | |
424 | GRAPHICAL_HIERARCHY = YES |
425 | |
426 | @@ -1597,7 +1650,7 @@ |
427 | DIRECTORY_GRAPH = YES |
428 | |
429 | # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images |
430 | -# generated by dot. Possible values are png, jpg, or gif |
431 | +# generated by dot. Possible values are png, svg, gif or svg. |
432 | # If left blank png will be used. |
433 | |
434 | DOT_IMAGE_FORMAT = png |
435 | @@ -1613,6 +1666,12 @@ |
436 | |
437 | DOTFILE_DIRS = |
438 | |
439 | +# The MSCFILE_DIRS tag can be used to specify one or more directories that |
440 | +# contain msc files that are included in the documentation (see the |
441 | +# \mscfile command). |
442 | + |
443 | +MSCFILE_DIRS = |
444 | + |
445 | # The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of |
446 | # nodes that will be shown in the graph. If the number of nodes in a graph |
447 | # becomes larger than this value, doxygen will truncate the graph, which is |
448 | |
449 | === added file 'doc/api.dox' |
450 | --- doc/api.dox 1970-01-01 00:00:00 +0000 |
451 | +++ doc/api.dox 2011-03-17 04:23:22 +0000 |
452 | @@ -0,0 +1,21 @@ |
453 | +/** |
454 | + * @mainpage The GEIS API |
455 | + * |
456 | + * @section sec_intro Introduction |
457 | + * |
458 | + * The GEIS API provides a defined, stable, portable interface for receiving |
459 | + * gestural input. |
460 | + * |
461 | + * GEIS actually provides two APIs: |
462 | + * the @ref using_geis_v1 "simplified interface" |
463 | + * and the @ref using_geis_v2 "advanced interface". |
464 | + * |
465 | + * @page using_geis_v1 Using The Simplified Interface |
466 | + * |
467 | + * @section using_geis_v1_intro Introduction to the Simplified GEIS Interface |
468 | + * |
469 | + * The goal of the simplified GEIS interface is to minimize the work required to |
470 | + * receive gestures from the gesture recognition engine. It is designed around |
471 | + * the idea of creating a set of callback functions and installing them to |
472 | + * receive gesture events on a selected window. |
473 | + */ |
474 | |
475 | === added file 'doc/logo_x64.png' |
476 | Binary files doc/logo_x64.png 1970-01-01 00:00:00 +0000 and doc/logo_x64.png 2011-03-17 04:23:22 +0000 differ |
477 | === added file 'doc/using_geis_v2.dox' |
478 | --- doc/using_geis_v2.dox 1970-01-01 00:00:00 +0000 |
479 | +++ doc/using_geis_v2.dox 2011-03-17 04:23:22 +0000 |
480 | @@ -0,0 +1,78 @@ |
481 | +/** |
482 | + |
483 | +@page using_geis_v2 Using The Advanced Interface |
484 | + |
485 | +@section using_geis_v2_intro Introduction to the Advanced GEIS Interface |
486 | + |
487 | +The advanced GEIS interface is designed around the idea that you can create |
488 | +<em>filters</em> to limit the kinds of gestures received and combine those |
489 | +filters into <em>subscriptions</em> that interact with the gesture |
490 | +recognizer to deliver <em>gesture events</em>. |
491 | + |
492 | +The normal flow for using the advanced interface is as follows. |
493 | + -# create a Geis object |
494 | + -# create a GeisSubscription object on the Geis object |
495 | + -# create and add one or more GeisFilter to the GeisSubscription |
496 | + -# activate the GeisSubscription |
497 | + -# wait for and process a series of GeisEvent |
498 | + |
499 | +@subsection using_geis_v2_example An example of advanced API usage |
500 | +This is an example of using the advanced (GEIS v2) API. The full source code |
501 | +for this example (including details missing here) is included in the source |
502 | +distribution of utouch-geis. |
503 | + |
504 | +Please note that these examples omit all of the error checking for expository |
505 | +purposes only. |
506 | + |
507 | +@dontinclude geis2.c |
508 | + |
509 | +First, some objects are declared. |
510 | +@skip GeisStatus |
511 | +@until int |
512 | + |
513 | +The API instance is created. We tell it to report input devices and gesture |
514 | +classes. |
515 | +@until NULL |
516 | + |
517 | +A subscription object is created. We want gesture continuations. |
518 | +@line geis_subscription_new |
519 | + |
520 | +An empty filter is created. An empty filter means <em>all</em> input devices, |
521 | +<em>all</em> gestures, <em>all</em> regions. |
522 | +@line geis_filter_new |
523 | + |
524 | +For the purpose of this example, we want just 2-touch gestures, so we need to |
525 | +add a term to the filter specifying only those gestures with two touches. |
526 | +@skip geis_filter_add_term |
527 | +@until NULL |
528 | + |
529 | +The filter is added to the subscription and the subscription is activated. |
530 | +@until geis_subscription_activate |
531 | + |
532 | +For the event loop processing, we're going to need the event fd (this is |
533 | +assuming a Unix implementation of GEIS, other platforms may have a different |
534 | +event indicator). |
535 | +@line geis_get_configuration |
536 | + |
537 | +The application's main event loop is run until a read is indicated as available |
538 | +on the event fd, at which point the GEIS event loop is pumped. |
539 | +@skip geis_dispatch_events |
540 | +@until geis_next_event |
541 | +The events are handled and the event loop pumped until it's empty. |
542 | +@until geis_next_event |
543 | + |
544 | +Finally, the API objects are cleaned up. |
545 | +@skip geis_subscription_delete |
546 | +@until geis_delete |
547 | + |
548 | +@subsection using_geis_v2_examining_devices Examining Devices |
549 | + |
550 | +@dontinclude geis2.c |
551 | + |
552 | +@skip dump_device_event |
553 | +@until } |
554 | +@line } |
555 | + |
556 | +@example geis2.c |
557 | + |
558 | +*/ |
559 | |
560 | === added directory 'examples' |
561 | === added file 'examples/Makefile.am' |
562 | --- examples/Makefile.am 1970-01-01 00:00:00 +0000 |
563 | +++ examples/Makefile.am 2011-03-17 04:23:22 +0000 |
564 | @@ -0,0 +1,28 @@ |
565 | +# |
566 | +# @file examples/Makefile.am |
567 | +# @brief automake recipe for the GEIS examples |
568 | +# |
569 | +# Copyright 2011 Canonical, Ltd. |
570 | +# |
571 | +# This file is part of the utouch-geis library. This library is free software; |
572 | +# you can redistribute it and/or modify it under the terms of the GNU Lesser |
573 | +# General Public License as published by the Free Software Foundation; either |
574 | +# version 3 of the License, or (at your option) any later version. |
575 | +# |
576 | +# This library is distributed in the hope that it will be useful, but WITHOUT |
577 | +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
578 | +# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more |
579 | +# details. |
580 | +# |
581 | +# You should have received a copy of the GNU General Public License |
582 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
583 | +# |
584 | + |
585 | +noinst_PROGRAMS = geis2 |
586 | + |
587 | +geis2_SOURCES = geis2.c |
588 | + |
589 | +geis2_CFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/libutouch-geis |
590 | + |
591 | +geis2_LDADD = $(top_builddir)/libutouch-geis/libutouch-geis.la |
592 | + |
593 | |
594 | === added file 'examples/geis2.c' |
595 | --- examples/geis2.c 1970-01-01 00:00:00 +0000 |
596 | +++ examples/geis2.c 2011-03-17 04:23:22 +0000 |
597 | @@ -0,0 +1,190 @@ |
598 | +/** |
599 | + * @file geis2.c |
600 | + * @brief A simple example using the GEIS v2 API. |
601 | + * |
602 | + * Copyright 2011 Canonical Ltd. |
603 | + * |
604 | + * This program is free software: you can redistribute it and/or modify |
605 | + * it under the terms of the GNU General Public License as published by |
606 | + * the Free Software Foundation, either version 3 of the License, or |
607 | + * (at your option) any later version. |
608 | + * |
609 | + * This program is distributed in the hope that it will be useful, |
610 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
611 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
612 | + * GNU General Public License for more details. |
613 | + * |
614 | + * You should have received a copy of the GNU General Public License |
615 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
616 | + */ |
617 | + |
618 | +#include <errno.h> |
619 | +#include <geis/geis.h> |
620 | +#include <stdio.h> |
621 | +#include <string.h> |
622 | +#include <sys/select.h> |
623 | + |
624 | + |
625 | +void print_attr(GeisAttr attr) |
626 | +{ |
627 | + GeisString attr_name = geis_attr_name(attr); |
628 | + switch (geis_attr_type(attr)) |
629 | + { |
630 | + case GEIS_ATTR_TYPE_BOOLEAN: |
631 | + printf(" \"%s\": %s\n", attr_name, |
632 | + geis_attr_value_to_boolean(attr) ? "true" : "false"); |
633 | + break; |
634 | + case GEIS_ATTR_TYPE_FLOAT: |
635 | + printf(" \"%s\": %g\n", attr_name, geis_attr_value_to_float(attr)); |
636 | + break; |
637 | + case GEIS_ATTR_TYPE_INTEGER: |
638 | + printf(" \"%s\": %d\n", attr_name, geis_attr_value_to_integer(attr)); |
639 | + break; |
640 | + case GEIS_ATTR_TYPE_STRING: |
641 | + printf(" \"%s\": %s\n", attr_name, geis_attr_value_to_string(attr)); |
642 | + break; |
643 | + default: |
644 | + break; |
645 | + } |
646 | +} |
647 | + |
648 | + |
649 | +void |
650 | +dump_device_event(GeisEvent event) |
651 | +{ |
652 | + GeisDevice device; |
653 | + GeisAttr attr; |
654 | + GeisSize i; |
655 | + GeisInputDeviceId device_id = 0; |
656 | + |
657 | + attr = geis_event_attr_by_name(event, GEIS_EVENT_ATTRIBUTE_DEVICE); |
658 | + device = geis_attr_value_to_pointer(attr); |
659 | + printf("device %02d \"%s\"\n", |
660 | + geis_device_id(device), geis_device_name(device)); |
661 | + for (i = 0; i < geis_device_attr_count(device); ++i) |
662 | + { |
663 | + print_attr(geis_device_attr(device, i)); |
664 | + } |
665 | +} |
666 | + |
667 | + |
668 | +void |
669 | +dump_gesture_event(GeisEvent event) |
670 | +{ |
671 | + GeisSize i; |
672 | + GeisTouchSet touchset; |
673 | + GeisGroupSet groupset; |
674 | + GeisAttr attr; |
675 | + |
676 | + attr = geis_event_attr_by_name(event, GEIS_EVENT_ATTRIBUTE_TOUCHSET); |
677 | + touchset = geis_attr_value_to_pointer(attr); |
678 | + |
679 | + attr = geis_event_attr_by_name(event, GEIS_EVENT_ATTRIBUTE_GROUPSET); |
680 | + groupset = geis_attr_value_to_pointer(attr); |
681 | + |
682 | + printf("gesture\n"); |
683 | + for (i= 0; i < geis_groupset_group_count(groupset); ++i) |
684 | + { |
685 | + GeisSize j; |
686 | + GeisGroup group = geis_groupset_group(groupset, i); |
687 | + |
688 | + for (j=0; j < geis_group_frame_count(group); ++j) |
689 | + { |
690 | + GeisSize k; |
691 | + GeisFrame frame = geis_group_frame(group, j); |
692 | + GeisSize attr_count = geis_frame_attr_count(frame); |
693 | + |
694 | + for (k = 0; k < attr_count; ++k) |
695 | + { |
696 | + print_attr(geis_frame_attr(frame, k)); |
697 | + } |
698 | + |
699 | + for (k = 0; k < geis_frame_touchid_count(frame); ++k) |
700 | + { |
701 | + GeisSize touchid = geis_frame_touchid(frame, k); |
702 | + GeisTouch touch = geis_touchset_touch_by_id(touchset, touchid); |
703 | + GeisSize n; |
704 | + printf("+touch %lu\n", k); |
705 | + for (n = 0; n < geis_touch_attr_count(touch); ++n) |
706 | + { |
707 | + print_attr(geis_touch_attr(touch, n)); |
708 | + } |
709 | + } |
710 | + } |
711 | + } |
712 | +} |
713 | + |
714 | + |
715 | +int |
716 | +main(int argc, char* argv[]) |
717 | +{ |
718 | + GeisStatus status; |
719 | + Geis geis; |
720 | + GeisSubscription subscription; |
721 | + GeisFilter filter; |
722 | + int fd; |
723 | + |
724 | + geis = geis_new(GEIS_INIT_UTOUCH_XCB, |
725 | + GEIS_INIT_TRACK_DEVICES, |
726 | + NULL); |
727 | + subscription = geis_subscription_new(geis, "example", GEIS_SUBSCRIPTION_CONT); |
728 | + filter = geis_filter_new(geis, "filter"); |
729 | + |
730 | + geis_filter_add_term(filter, |
731 | + GEIS_FILTER_REGION, |
732 | + GEIS_GESTURE_ATTRIBUTE_TOUCHES, GEIS_FILTER_OP_EQ, 2, |
733 | + NULL); |
734 | + |
735 | + status = geis_subscription_add_filter(subscription, filter); |
736 | + status = geis_subscription_activate(subscription); |
737 | + |
738 | + geis_get_configuration(geis, GEIS_CONFIGURATION_FD, &fd); |
739 | + |
740 | + while(1) |
741 | + { |
742 | + fd_set read_fds; |
743 | + FD_ZERO(&read_fds); |
744 | + FD_SET(0, &read_fds); |
745 | + FD_SET(fd, &read_fds); |
746 | + int sstat = select(fd+1, &read_fds, NULL, NULL, NULL); |
747 | + if (sstat < 0) |
748 | + { |
749 | + fprintf(stderr, "error %d in select(): %s\n", errno, strerror(errno)); |
750 | + break; |
751 | + } |
752 | + |
753 | + if (FD_ISSET(fd, &read_fds)) |
754 | + { |
755 | + GeisEvent event; |
756 | + status = geis_dispatch_events(geis); |
757 | + status = geis_next_event(geis, &event); |
758 | + while (status == GEIS_STATUS_CONTINUE || status == GEIS_STATUS_SUCCESS) |
759 | + { |
760 | + switch (geis_event_type(event)) |
761 | + { |
762 | + case GEIS_EVENT_DEVICE_AVAILABLE: |
763 | + case GEIS_EVENT_DEVICE_UNAVAILABLE: |
764 | + dump_device_event(event); |
765 | + break; |
766 | + |
767 | + case GEIS_EVENT_GESTURE_BEGIN: |
768 | + case GEIS_EVENT_GESTURE_UPDATE: |
769 | + case GEIS_EVENT_GESTURE_END: |
770 | + dump_gesture_event(event); |
771 | + break; |
772 | + } |
773 | + geis_event_delete(event); |
774 | + status = geis_next_event(geis, &event); |
775 | + } |
776 | + } |
777 | + |
778 | + if (FD_ISSET(0, &read_fds)) |
779 | + { |
780 | + break; |
781 | + } |
782 | + } |
783 | + |
784 | + geis_subscription_delete(subscription); |
785 | + geis_delete(geis); |
786 | +} |
787 | + |
788 | |
789 | === modified file 'include/geis/geis.h' |
790 | --- include/geis/geis.h 2011-03-16 21:56:03 +0000 |
791 | +++ include/geis/geis.h 2011-03-17 04:23:22 +0000 |
792 | @@ -25,11 +25,83 @@ |
793 | extern "C" { |
794 | #endif |
795 | |
796 | +/** |
797 | + * @defgroup geis_common Common Types and Definitions |
798 | + * |
799 | + * These types and values are common to both the simplified and advanced GEIS |
800 | + * interfaces. |
801 | + */ |
802 | + |
803 | +/** |
804 | + * @defgroup geis_v1 The Simplified GEIS Interface |
805 | + * |
806 | + * The simplified GEIS interface is the original (GEIS v1) API. It provides a |
807 | + * way to specify a list of gesture names and input devices for which gestures |
808 | + * will be recognized on a given window. |
809 | + * |
810 | + * See @ref using_geis_v1. |
811 | + */ |
812 | + |
813 | +/** |
814 | + * @defgroup geis_v2 The Advanced GEIS Interface |
815 | + * |
816 | + * The advanced GEIS interface (GEIS v2) was developed to give a more nuanced |
817 | + * control over the types of gestures and input devices for which gestures will |
818 | + * be recognized. |
819 | + * |
820 | + * See @ref using_geis_v2. |
821 | + */ |
822 | + |
823 | +/** |
824 | + * GEIS version macros |
825 | + * |
826 | + * These macros can be tested at compile time to query for support of various |
827 | + * features. |
828 | + */ |
829 | #define GEIS_VERSION_1_0 1 |
830 | #define GEIS_VERSION_2_0 20101122 |
831 | |
832 | #include <geis/geisimpl.h> |
833 | |
834 | +/** |
835 | + * Errors returned from calls. |
836 | + * @ingroup geis_common |
837 | + * |
838 | + * Most GEIS API calls return a status code indicating success or, in the event |
839 | + * of a lack of success, the reson for failure. |
840 | + */ |
841 | +typedef enum GeisStatus |
842 | +{ |
843 | + GEIS_STATUS_SUCCESS = 0, /**< normal successful completion */ |
844 | + GEIS_STATUS_CONTINUE = 20, /**< normal successful completion |
845 | + with data still remaining */ |
846 | + GEIS_STATUS_EMPTY = 21, /**< normal successful completion |
847 | + with no data retrieved */ |
848 | + GEIS_STATUS_NOT_SUPPORTED = 10, /**< a requested feature is not supported */ |
849 | + GEIS_BAD_ARGUMENT = 1000, /**< a bad argument value was passed */ |
850 | + GEIS_UNKNOWN_ERROR = 9999, /**< any other error condition */ |
851 | + GEIS_STATUS_BAD_ARGUMENT = -100, /**< a bad argument value was passed */ |
852 | + GEIS_STATUS_UNKNOWN_ERROR = -999 /**< any other error condition */ |
853 | +} GeisStatus; |
854 | + |
855 | +/** |
856 | + * Attribute data types. |
857 | + * @ingroup geis_common |
858 | + */ |
859 | +typedef enum GeisAttrType |
860 | +{ |
861 | + GEIS_ATTR_TYPE_UNKNOWN, /**< Attr is an unknown type. */ |
862 | + GEIS_ATTR_TYPE_BOOLEAN, /**< Attr is truth-valued . */ |
863 | + GEIS_ATTR_TYPE_FLOAT, /**< Attr is real-valued. */ |
864 | + GEIS_ATTR_TYPE_INTEGER, /**< Attr is a counting number. */ |
865 | + GEIS_ATTR_TYPE_POINTER, /**< Attr is a pointer to a data structure. */ |
866 | + GEIS_ATTR_TYPE_STRING /**< Attr is a null-terminated UTF-8 string. */ |
867 | + |
868 | +} GeisAttrType; |
869 | + |
870 | +#define GEIS_FALSE 0 |
871 | +#define GEIS_TRUE 1 |
872 | + |
873 | /* Standard fundamental gestures */ |
874 | #define GEIS_GESTURE_DRAG "Drag" |
875 | #define GEIS_GESTURE_PINCH "Pinch" |
876 | @@ -37,10 +109,20 @@ |
877 | #define GEIS_GESTURE_TAP "Tap" |
878 | |
879 | /** |
880 | - * @defgroup geis_v1_gesture_types Standard Gesture Types (GEIS v1) |
881 | - * The names of standard gesture types. These names can be passed to |
882 | + * @defgroup geis_v1_gesture_types Gesture Types |
883 | + * @ingroup geis_v1 |
884 | + * |
885 | + * The names of gesture types. These names can be passed to |
886 | * geis_subscribe() in a NULL-terminated list to specify only a subset of |
887 | * available gestures. |
888 | + */ |
889 | + |
890 | +/** |
891 | + * @defgroup geis_v1_standar_gesture_types Standard Gesture Types |
892 | + * @ingroup geis_v1_gesture_types |
893 | + * |
894 | + * These gesture types should be available on all GEIS implementations. |
895 | + * |
896 | * @{ |
897 | */ |
898 | |
899 | @@ -69,8 +151,11 @@ |
900 | /* @} */ |
901 | |
902 | /** |
903 | - * @defgroup geis_v1_vendor_extensions Vendor Extensions (GEIS v1) |
904 | + * @defgroup geis_v1_vendor_extensions Vendor Extension Gesture Types |
905 | + * @ingroup geis_v1_gesture_types |
906 | + * |
907 | * Vendor-specific extensions to the GEIS v1 API. |
908 | + * |
909 | * @{ |
910 | */ |
911 | |
912 | @@ -124,46 +209,10 @@ |
913 | #define GEIS_GESTURE_ATTRIBUTE_TOUCH_4_X "touch 4 x" |
914 | #define GEIS_GESTURE_ATTRIBUTE_TOUCH_4_Y "touch 4 y" |
915 | |
916 | -#define GEIS_TOUCH_ATTRIBUTE_ID "touch id" |
917 | -#define GEIS_TOUCH_ATTRIBUTE_X "touch x" |
918 | -#define GEIS_TOUCH_ATTRIBUTE_Y "touch y" |
919 | - |
920 | -#define GEIS_REGION_ATTRIBUTE_WINDOWID "windowid" |
921 | - |
922 | -#define GEIS_FALSE 0 |
923 | -#define GEIS_TRUE 1 |
924 | - |
925 | - |
926 | -/** |
927 | - * @defgroup geis_status Status and Errors |
928 | - * |
929 | - * Most GEIS API calls return a status code indicating success or, in the event |
930 | - * of a lack of success, the reson for failure. |
931 | - * |
932 | - * @{ |
933 | - */ |
934 | - |
935 | -/** |
936 | - * Errors returned from calls. |
937 | - */ |
938 | -typedef enum GeisStatus |
939 | -{ |
940 | - GEIS_STATUS_SUCCESS = 0, /**< normal successful completion */ |
941 | - GEIS_STATUS_CONTINUE = 20, /**< normal successful completion |
942 | - with data still remaining */ |
943 | - GEIS_STATUS_EMPTY = 21, /**< normal successful completion |
944 | - with no data retrieved */ |
945 | - GEIS_STATUS_NOT_SUPPORTED = 10, /**< a requested feature is not supported */ |
946 | - GEIS_BAD_ARGUMENT = 1000, /**< a bad argument value was passed */ |
947 | - GEIS_UNKNOWN_ERROR = 9999, /**< any other error condition */ |
948 | - GEIS_STATUS_BAD_ARGUMENT = -100, /**< a bad argument value was passed */ |
949 | - GEIS_STATUS_UNKNOWN_ERROR = -999 /**< any other error condition */ |
950 | -} GeisStatus; |
951 | - |
952 | -/* @} */ |
953 | |
954 | /** |
955 | * @defgroup geis_meta Initialization and Cleanup |
956 | + * @ingroup geis_v1 |
957 | * |
958 | * Each instance of a gesture subscription must be created using the geis_init() |
959 | * call and destroyed using the geis_finish() call. |
960 | @@ -182,22 +231,26 @@ |
961 | */ |
962 | |
963 | /** |
964 | - * An opaque type representing a geis gesture subscription instance. |
965 | + * @class GeisInstance |
966 | + * A geis gesture subscription instance. |
967 | */ |
968 | +/** @cond typedef */ |
969 | typedef struct _GeisInstance *GeisInstance; |
970 | +/** @endcond */ |
971 | |
972 | /** |
973 | - * @struct GeisWinInfo |
974 | + * @class GeisWinInfo |
975 | * Generic display region description block |
976 | */ |
977 | typedef struct GeisWinInfo |
978 | { |
979 | - uint32_t win_type; |
980 | - void *win_info; |
981 | + uint32_t win_type; /**< Selects the implementation-specific window type. */ |
982 | + void *win_info; /**< Additional info dependent on the window type. */ |
983 | } GeisWinInfo; |
984 | |
985 | /** |
986 | * Initializes a geis subscription instance for a display region. |
987 | + * @memberof GeisInstance |
988 | * |
989 | * @param[in] win_info a display region description block |
990 | * -- see geis implementtaion documentation |
991 | @@ -210,7 +263,8 @@ |
992 | GEIS_API GeisStatus geis_init(GeisWinInfo *win_info, GeisInstance *geis_instance); |
993 | |
994 | /** |
995 | - * Cleans up a geis subscriotion instance for a display region. |
996 | + * Cleans up a geis subscription instance for a display region. |
997 | + * @memberof GeisInstance |
998 | * |
999 | * @param[in] geis_instance an opaque pointer to a geis gesture subscription |
1000 | * instance |
1001 | @@ -223,49 +277,139 @@ |
1002 | /* @} */ |
1003 | |
1004 | /** |
1005 | - * @defgroup geis_2_geis The Geis API Object (GEIS v2.0) |
1006 | - * |
1007 | - * @{ |
1008 | - */ |
1009 | - |
1010 | -/** |
1011 | - * @defgroup geis_2_geis_init_args Specified Initialization Arguments |
1012 | - * |
1013 | - * These initialization arguments are defined by the GEIS specification. |
1014 | - * |
1015 | - * @{ |
1016 | - */ |
1017 | - |
1018 | -/** |
1019 | + * @defgroup geis_v1_config Configuration and Control |
1020 | + * @ingroup geis_v1 |
1021 | + * @{ |
1022 | + */ |
1023 | + |
1024 | +/** |
1025 | + * Gets the Unix file descriptor for GEIS events. |
1026 | + * |
1027 | + * Applications or toolkits can use this file descriptor to intgerate geis event |
1028 | + * handling into their main event dispatch loop. When a GEIS event is available |
1029 | + * for processing, the fd will have a read-available state indicated in |
1030 | + * select(), poll(), epoll(), etc. |
1031 | + */ |
1032 | +#define GEIS_CONFIG_UNIX_FD 10001 |
1033 | + |
1034 | +/** |
1035 | + * Indicates if a particular feaure is supported. |
1036 | + * |
1037 | + * @param[in] geis_instance An opaque pointer to a geis gesture subscription |
1038 | + * instance. |
1039 | + * @param[in] configuration_item Indicates which configuration item will be |
1040 | + * checked for support. |
1041 | + * |
1042 | + * @retval GEIS_BAD_ARGUMENT an invalid argument value was passed |
1043 | + * @retval GEIS_STATUS_SUCCESS normal successful completion |
1044 | + */ |
1045 | +GEIS_API GeisStatus geis_configuration_supported(GeisInstance geis_instance, |
1046 | + int configuration_item); |
1047 | + |
1048 | +/** |
1049 | + * Gets a feature configuration value. |
1050 | + * |
1051 | + * @param[in] geis_instance An opaque pointer to a geis gesture subscription |
1052 | + * instance. |
1053 | + * @param[in] configuration_item Indicates which configuration item will be |
1054 | + * get. |
1055 | + * @param[in] value A pointer to where the retrieved value will be |
1056 | + * stored. |
1057 | + * |
1058 | + * @retval GEIS_BAD_ARGUMENT an invalid argument value was passed |
1059 | + * @retval GEIS_STATUS_SUCCESS normal successful completion |
1060 | + */ |
1061 | +GEIS_API GeisStatus geis_configuration_get_value(GeisInstance geis_instance, |
1062 | + int configuration_item, |
1063 | + void *value); |
1064 | + |
1065 | +/** |
1066 | + * Sets a feature configuration value. |
1067 | + * |
1068 | + * @param[in] geis_instance An opaque pointer to a geis gesture subscription |
1069 | + * instance. |
1070 | + * @param[in] configuration_item Indicates which configuration item will be |
1071 | + * set. |
1072 | + * @param[in] value A pointer to where the value to be set will be |
1073 | + * read. |
1074 | + * |
1075 | + * @retval GEIS_BAD_ARGUMENT an invalid argument value was passed |
1076 | + * @retval GEIS_STATUS_SUCCESS normal successful completion |
1077 | + */ |
1078 | +GEIS_API GeisStatus geis_configuration_set_value(GeisInstance geis_instance, |
1079 | + int configuration_item, |
1080 | + void *value); |
1081 | + |
1082 | +/** |
1083 | + * Dispatches geis events until there are no further events available. |
1084 | + * |
1085 | + * @param[in] geis_instance an opaque pointer to a geis gesture subscription |
1086 | + * instance |
1087 | + * |
1088 | + * This function is used to integrate geis even dispatch into the main event |
1089 | + * loop of an application or toolkit. |
1090 | + * |
1091 | + * @retval GEIS_BAD_ARGUMENT an invalid GeisInstance was passed |
1092 | + * @retval GEIS_STATUS_SUCCESS normal successful completion |
1093 | + */ |
1094 | +GEIS_API GeisStatus geis_event_dispatch(GeisInstance geis_instance); |
1095 | + |
1096 | +/* @} */ |
1097 | + |
1098 | +/** |
1099 | + * @defgroup geis_v2_geis The Geis API Object |
1100 | + * @ingroup geis_v2 |
1101 | + * |
1102 | + * @{ |
1103 | + */ |
1104 | + |
1105 | +/** |
1106 | + * @class Geis |
1107 | + * Represents an instance of the gestire recognition engine |
1108 | + */ |
1109 | +/** @cond typedef */ |
1110 | +typedef struct _Geis *Geis; |
1111 | +/** @endcond */ |
1112 | + |
1113 | +/** |
1114 | + * @name Standard Initialization Arguments |
1115 | + * |
1116 | + * @par |
1117 | + * These initialization arguments are defined by the GEIS v2 specification. |
1118 | + * |
1119 | + * @{ |
1120 | + * |
1121 | + * @def GEIS_INIT_SERVICE_PROVIDER |
1122 | * Enables GEIS to provide a networked service. |
1123 | - * |
1124 | + * This initialization argument takes no parameters. |
1125 | + * |
1126 | + * @def GEIS_INIT_TRACK_DEVICES |
1127 | + * Tells GEIS to send input device events. |
1128 | + * This initialization argument takes no parameters. |
1129 | + * |
1130 | + * @def GEIS_INIT_TRACK_GESTURE_CLASSES |
1131 | + * Tells GEIS to send gesture class events. |
1132 | * This initialization argument takes no parameters. |
1133 | */ |
1134 | + |
1135 | #define GEIS_INIT_SERVICE_PROVIDER "org.libgeis.init.server" |
1136 | - |
1137 | -/** |
1138 | - * Tells GEIS to send input device events. |
1139 | - * |
1140 | - * This initialization argument takes no parameters. |
1141 | - */ |
1142 | #define GEIS_INIT_TRACK_DEVICES "org.libgeis.init.track-devices" |
1143 | - |
1144 | -/** |
1145 | - * Tells GEIS to send gesture class events. |
1146 | - * |
1147 | - * This initialization argument takes no parameters. |
1148 | - */ |
1149 | #define GEIS_INIT_TRACK_GESTURE_CLASSES "org.libgeis.init.track-gesture-classes" |
1150 | |
1151 | /* @} */ |
1152 | |
1153 | /** |
1154 | - * @defgroup geis_2_geis_init_vendor Vendor-defined Initialization Arguments |
1155 | + * @name Vendor-defined Initialization Arguments |
1156 | * |
1157 | + * @par |
1158 | * These initialization arguments are not a part of te GEIS specification and |
1159 | * may change. |
1160 | * |
1161 | * @{ |
1162 | + * |
1163 | + * @def GEIS_INIT_UTOUCH_MOCK_ENGINE |
1164 | + * |
1165 | + * @def GEIS_INIT_UTOUCH_XCB |
1166 | */ |
1167 | |
1168 | #define GEIS_INIT_UTOUCH_MOCK_ENGINE "com.canonical.utouch.mock.engine" |
1169 | @@ -274,18 +418,27 @@ |
1170 | /* @} */ |
1171 | |
1172 | |
1173 | -typedef struct _Geis *Geis; |
1174 | - |
1175 | /** |
1176 | * Initializes an instance of the GEIS v2.0 API. |
1177 | - * |
1178 | - * @param[in] name A name for the API instance (used for diagnostics). |
1179 | - * @param[in] ... A set of zero or more initialization arguments. |
1180 | + * @ingroup geis_v2_geis |
1181 | + * @memberof Geis |
1182 | + * |
1183 | + * @param[in] init_arg_name The name of an initializaer argument. |
1184 | + * @param[in] ... The remaining initializaer arguments. |
1185 | + * |
1186 | + * A NULL-terminated list of zero or more initialization arguments is passed to |
1187 | + * this function to create and initialize a connection to a gesture recognition |
1188 | + * engine. |
1189 | + * |
1190 | + * If no initialization arguments are passed, the parameter list consists of a |
1191 | + * single NULL argument. |
1192 | */ |
1193 | GEIS_API Geis geis_new(GeisString init_arg_name, ...); |
1194 | |
1195 | /** |
1196 | * Cleans up an instance of the GEIS v2.0 API. |
1197 | + * @ingroup geis_v2_geis |
1198 | + * @memberof Geis |
1199 | * |
1200 | * @param[in] geis An instance of the GEIS v2.0 API. |
1201 | * |
1202 | @@ -297,7 +450,8 @@ |
1203 | /* @} */ |
1204 | |
1205 | /** |
1206 | - * @defgroup geis_error Error Reporting |
1207 | + * @defgroup geis_v2_error Error Reporting |
1208 | + * @ingroup geis_v2 |
1209 | * @{ |
1210 | */ |
1211 | |
1212 | @@ -343,77 +497,22 @@ |
1213 | /* @} */ |
1214 | |
1215 | /** |
1216 | - * @defgroup geis1_config Configuration and Control (GEIS v1.0) |
1217 | - * @{ |
1218 | - */ |
1219 | - |
1220 | -#define GEIS_CONFIG_UNIX_FD 10001 |
1221 | - |
1222 | -/** |
1223 | - * Indicates if a particular feaure is supported. |
1224 | - * |
1225 | - * @param[in] geis_instance an opaque pointer to a geis gesture subscription |
1226 | - * instance |
1227 | - * |
1228 | - * @retval GEIS_BAD_ARGUMENT an invalid argument value was passed |
1229 | - * @retval GEIS_STATUS_SUCCESS normal successful completion |
1230 | - */ |
1231 | -GEIS_API GeisStatus geis_configuration_supported(GeisInstance geis_instance, |
1232 | - int configuration_item); |
1233 | - |
1234 | -/** |
1235 | - * Gets a feature configuration value. |
1236 | - * |
1237 | - * @param[in] geis_instance an opaque pointer to a geis gesture subscription |
1238 | - * instance |
1239 | - * |
1240 | - * @retval GEIS_BAD_ARGUMENT an invalid argument value was passed |
1241 | - * @retval GEIS_STATUS_SUCCESS normal successful completion |
1242 | - */ |
1243 | -GEIS_API GeisStatus geis_configuration_get_value(GeisInstance geis_instance, |
1244 | - int configuration_item, |
1245 | - void *value); |
1246 | - |
1247 | -/** |
1248 | - * Sets a feature configuration value. |
1249 | - * |
1250 | - * @param[in] geis_instance an opaque pointer to a geis gesture subscription |
1251 | - * instance |
1252 | - * |
1253 | - * @retval GEIS_BAD_ARGUMENT an invalid argument value was passed |
1254 | - * @retval GEIS_STATUS_SUCCESS normal successful completion |
1255 | - */ |
1256 | -GEIS_API GeisStatus geis_configuration_set_value(GeisInstance geis_instance, |
1257 | - int configuration_item, |
1258 | - void *value); |
1259 | - |
1260 | -/** |
1261 | - * Dispatches geis events until there are no further events available. |
1262 | - * |
1263 | - * @param[in] geis_instance an opaque pointer to a geis gesture subscription |
1264 | - * instance |
1265 | - * |
1266 | - * This function is used to integrate geis even dispatch into the main event |
1267 | - * loop of an application or toolkit. |
1268 | - * |
1269 | - * @retval GEIS_BAD_ARGUMENT an invalid GeisInstance was passed |
1270 | - * @retval GEIS_STATUS_SUCCESS normal successful completion |
1271 | - */ |
1272 | -GEIS_API GeisStatus geis_event_dispatch(GeisInstance geis_instance); |
1273 | - |
1274 | -/* @} */ |
1275 | - |
1276 | -/** |
1277 | - * @defgroup geis2_config Configuration (GEIS v2.0) |
1278 | - * @{ |
1279 | - */ |
1280 | - |
1281 | -/** |
1282 | - * @defgroup geis2_config_spec Required Configuration Items |
1283 | - * |
1284 | + * @defgroup geis_v2_config Configuration |
1285 | + * @ingroup geis_v2 |
1286 | + * @{ |
1287 | + */ |
1288 | + |
1289 | +/** |
1290 | + * @name Required Configuration Items |
1291 | + * |
1292 | + * @par |
1293 | * These configuration items are defined by the GEIS specification. |
1294 | * |
1295 | * @{ |
1296 | + * |
1297 | + * @def GEIS_CONFIGURATION_FD |
1298 | + * Gets a Unix file descriptor that will signal the availablility of GEIS events |
1299 | + * for processing. |
1300 | */ |
1301 | |
1302 | #define GEIS_CONFIGURATION_FD "org.libgeis.configuration.fd" |
1303 | @@ -421,12 +520,15 @@ |
1304 | /* @} */ |
1305 | |
1306 | /** |
1307 | - * @defgroup geis2_config_vendor Vendor-defined Configuration Items |
1308 | + * @name Vendor-defined Configuration Items |
1309 | * |
1310 | + * @par |
1311 | * These configuration items are not a part of the GEIS specification and may |
1312 | * change. |
1313 | * |
1314 | * @{ |
1315 | + * |
1316 | + * @def GEIS_CONFIG_UTOUCH_MAX_EVENTS |
1317 | */ |
1318 | |
1319 | #define GEIS_CONFIG_UTOUCH_MAX_EVENTS "com.canonical.utouch.max_events" |
1320 | @@ -454,9 +556,8 @@ |
1321 | /** |
1322 | * Sets a feature configuration value. |
1323 | * |
1324 | - * @param[in] geis An opaque GEIS API object. |
1325 | - * @param[in] configuration_value Selects the configuration value to return. |
1326 | - * @param[in] configuration_item_name Selects the configuration value to return. |
1327 | + * @param[in] geis An opaque GEIS API object. |
1328 | + * @param[in] configuration_item_name Selects the configuration value to return. |
1329 | * @param[in] configuration_item_value Points to a buffer to contain the output |
1330 | * configuration value. The actual type of |
1331 | * this buffer depends on the |
1332 | @@ -473,84 +574,8 @@ |
1333 | /* @} */ |
1334 | |
1335 | /** |
1336 | - * @defgroup geis2_attrs Attributes |
1337 | - * |
1338 | - * Attributes are named values associated with various GEIS entities, including |
1339 | - * input devices, gesture types, and gesture events. |
1340 | - * |
1341 | - * @{ |
1342 | - */ |
1343 | -typedef enum GeisAttrType |
1344 | -{ |
1345 | - GEIS_ATTR_TYPE_UNKNOWN, |
1346 | - GEIS_ATTR_TYPE_BOOLEAN, |
1347 | - GEIS_ATTR_TYPE_FLOAT, |
1348 | - GEIS_ATTR_TYPE_INTEGER, |
1349 | - GEIS_ATTR_TYPE_POINTER, |
1350 | - GEIS_ATTR_TYPE_STRING |
1351 | -} GeisAttrType; |
1352 | - |
1353 | -/** |
1354 | - * An opaque type that encapsulates a GEIS attribute. |
1355 | - * |
1356 | - * GeisAttr objects may not be created or destroyed by the application, they may |
1357 | - * only have their data examined or extracted. |
1358 | - */ |
1359 | -typedef struct _GeisAttr *GeisAttr; |
1360 | - |
1361 | -/** |
1362 | - * Gets the name of an attribute. |
1363 | - * |
1364 | - * @param[in] attr Identifies the attribute. |
1365 | - */ |
1366 | -GEIS_API GeisString geis_attr_name(GeisAttr attr); |
1367 | - |
1368 | -/** |
1369 | - * Gets the type of an attribute value. |
1370 | - * |
1371 | - * @param[in] attr Identifies the attribute. |
1372 | - */ |
1373 | -GEIS_API GeisAttrType geis_attr_type(GeisAttr attr); |
1374 | - |
1375 | -/** |
1376 | - * Gets the value of an attribute as a GeisBoolean. |
1377 | - * |
1378 | - * @param[in] attr Identifies the attribute. |
1379 | - */ |
1380 | -GEIS_API GeisBoolean geis_attr_value_to_boolean(GeisAttr attr); |
1381 | - |
1382 | -/** |
1383 | - * Gets the value of an attribute as a GeisFloat. |
1384 | - * |
1385 | - * @param[in] attr Identifies the attribute. |
1386 | - */ |
1387 | -GEIS_API GeisFloat geis_attr_value_to_float(GeisAttr attr); |
1388 | - |
1389 | -/** |
1390 | - * Gets the value of an attribute as a GeisInteger. |
1391 | - * |
1392 | - * @param[in] attr Identifies the attribute. |
1393 | - */ |
1394 | -GEIS_API GeisInteger geis_attr_value_to_integer(GeisAttr attr); |
1395 | - |
1396 | -/** |
1397 | - * Gets the value of an attribute as a GeisPointer. |
1398 | - * |
1399 | - * @param[in] attr Identifies the attribute. |
1400 | - */ |
1401 | -GEIS_API GeisPointer geis_attr_value_to_pointer(GeisAttr attr); |
1402 | - |
1403 | -/** |
1404 | - * Gets the value of an attribute as a GeisString. |
1405 | - * |
1406 | - * @param[in] attr Identifies the attribute. |
1407 | - */ |
1408 | -GEIS_API GeisString geis_attr_value_to_string(GeisAttr attr); |
1409 | - |
1410 | -/* @} */ |
1411 | - |
1412 | -/** |
1413 | - * @defgroup geis_input Input Devices |
1414 | + * @defgroup geis_v1_input Input Devices |
1415 | + * @ingroup geis_v1 |
1416 | * @{ |
1417 | */ |
1418 | |
1419 | @@ -582,7 +607,7 @@ |
1420 | * |
1421 | * @param[in] geis_instance points to a geis gesture subscription |
1422 | * instance |
1423 | - * @param[in] funcs points to a GeisInputFuncs table |
1424 | + * @param[in] func points to a GeisInputFuncs table |
1425 | * @param[in] cookie an application specific value to be passed to |
1426 | * the callback |
1427 | * |
1428 | @@ -601,22 +626,32 @@ |
1429 | /* @} */ |
1430 | |
1431 | /** |
1432 | - * @defgroup geis1_subscription Gesture Subscription (GEIS v1.0) |
1433 | + * @defgroup geis_v1_subscription Gesture Subscription |
1434 | + * @ingroup geis_v1 |
1435 | * @{ |
1436 | */ |
1437 | typedef unsigned int GeisGestureType; |
1438 | typedef unsigned int GeisGestureId; |
1439 | |
1440 | +/** Selects ALL input devices. */ |
1441 | #define GEIS_ALL_GESTURES ((GeisGestureType)0) |
1442 | + |
1443 | #define GEIS_NO_GESTURE_ID ((GeisGestureId)0) |
1444 | |
1445 | /** |
1446 | - * Gesture Attributes |
1447 | + * An individual gesture attribute. |
1448 | + * |
1449 | + * Gesture events are associated with a list of attributes, each of which is a |
1450 | + * (name, type, value) tuple. These attribute reveal a little piece of |
1451 | + * information about a gesture. |
1452 | */ |
1453 | typedef struct GeisGestureAttr |
1454 | { |
1455 | + /** The name of the gesture attribute. */ |
1456 | GeisString name; |
1457 | + /** The data type of the gesture attribute. */ |
1458 | GeisAttrType type; |
1459 | + /** The value of the attributes. */ |
1460 | union |
1461 | { |
1462 | GeisBoolean boolean_val; |
1463 | @@ -642,14 +677,23 @@ |
1464 | GeisGestureAttr *attrs); |
1465 | |
1466 | /** |
1467 | - * A structure of callback functions. |
1468 | + * The set of callback functions invoked for various gesture-related events. |
1469 | + * |
1470 | + * An application must define callback functions to handle the various gesture |
1471 | + * events. These callbacks are provided in a table passed to geis_subscribe for |
1472 | + * each window on which gesture events may occur. |
1473 | */ |
1474 | typedef struct GeisGestureFuncs |
1475 | { |
1476 | + /** Invoked when a new gesture type has been defined. */ |
1477 | GeisGestureCallback added; |
1478 | + /** Invoked when a defined gesture type is no longer available. */ |
1479 | GeisGestureCallback removed; |
1480 | + /** Invoked when a new gesture starts. */ |
1481 | GeisGestureCallback start; |
1482 | + /** Invoked when a gesture has changed values. */ |
1483 | GeisGestureCallback update; |
1484 | + /** Invoked when a gesture finishes. */ |
1485 | GeisGestureCallback finish; |
1486 | } GeisGestureFuncs; |
1487 | |
1488 | @@ -688,7 +732,79 @@ |
1489 | /* @} */ |
1490 | |
1491 | /** |
1492 | - * @defgroup geis2_event_control Event Control (GEIS v2.0) |
1493 | + * @defgroup geis_v2_attrs Attributes |
1494 | + * @ingroup geis_v2 |
1495 | + * |
1496 | + * Attributes are named values associated with various GEIS entities, including |
1497 | + * input devices, gesture types, and gesture events. |
1498 | + * |
1499 | + * @{ |
1500 | + */ |
1501 | + |
1502 | +/** |
1503 | + * An opaque type that encapsulates a GEIS attribute. |
1504 | + * |
1505 | + * GeisAttr objects may not be created or destroyed by the application, they may |
1506 | + * only have their data examined or extracted. |
1507 | + */ |
1508 | +/** @cond typedef */ |
1509 | +typedef struct _GeisAttr *GeisAttr; |
1510 | +/** @endcond */ |
1511 | + |
1512 | +/** |
1513 | + * Gets the name of an attribute. |
1514 | + * |
1515 | + * @param[in] attr Identifies the attribute. |
1516 | + */ |
1517 | +GEIS_API GeisString geis_attr_name(GeisAttr attr); |
1518 | + |
1519 | +/** |
1520 | + * Gets the type of an attribute value. |
1521 | + * |
1522 | + * @param[in] attr Identifies the attribute. |
1523 | + */ |
1524 | +GEIS_API GeisAttrType geis_attr_type(GeisAttr attr); |
1525 | + |
1526 | +/** |
1527 | + * Gets the value of an attribute as a GeisBoolean. |
1528 | + * |
1529 | + * @param[in] attr Identifies the attribute. |
1530 | + */ |
1531 | +GEIS_API GeisBoolean geis_attr_value_to_boolean(GeisAttr attr); |
1532 | + |
1533 | +/** |
1534 | + * Gets the value of an attribute as a GeisFloat. |
1535 | + * |
1536 | + * @param[in] attr Identifies the attribute. |
1537 | + */ |
1538 | +GEIS_API GeisFloat geis_attr_value_to_float(GeisAttr attr); |
1539 | + |
1540 | +/** |
1541 | + * Gets the value of an attribute as a GeisInteger. |
1542 | + * |
1543 | + * @param[in] attr Identifies the attribute. |
1544 | + */ |
1545 | +GEIS_API GeisInteger geis_attr_value_to_integer(GeisAttr attr); |
1546 | + |
1547 | +/** |
1548 | + * Gets the value of an attribute as a GeisPointer. |
1549 | + * |
1550 | + * @param[in] attr Identifies the attribute. |
1551 | + */ |
1552 | +GEIS_API GeisPointer geis_attr_value_to_pointer(GeisAttr attr); |
1553 | + |
1554 | +/** |
1555 | + * Gets the value of an attribute as a GeisString. |
1556 | + * |
1557 | + * @param[in] attr Identifies the attribute. |
1558 | + */ |
1559 | +GEIS_API GeisString geis_attr_value_to_string(GeisAttr attr); |
1560 | + |
1561 | +/* @} */ |
1562 | + |
1563 | +/** |
1564 | + * @defgroup geis_v2_event_control Event Control |
1565 | + * @ingroup geis_v2 |
1566 | * |
1567 | * These functions are used to dispatch events generated from the various other |
1568 | * GEIS components. |
1569 | @@ -718,48 +834,56 @@ |
1570 | } GeisEventType; |
1571 | |
1572 | /** |
1573 | - * Opaque pointer to a generic GEIS event. |
1574 | + * @class GeisEvent |
1575 | + * A generic GEIS event. |
1576 | * |
1577 | * Applications must determine the type of the actual event and convert the |
1578 | * opaque pointer to a concrete event pointer, if required. |
1579 | * |
1580 | * Events are created by the GEIS API but must be destroyed by the application. |
1581 | */ |
1582 | +/** @cond typedef */ |
1583 | typedef struct _GeisEvent *GeisEvent; |
1584 | +/** @endcond */ |
1585 | |
1586 | /** |
1587 | * Destroys a GeisEvent. |
1588 | + * @memberof GeisEvent |
1589 | * |
1590 | - * @param[in] geis The GeisEvent to destroy. |
1591 | + * @param[in] event The GeisEvent to destroy. |
1592 | */ |
1593 | GEIS_API void geis_event_delete(GeisEvent event); |
1594 | |
1595 | /** |
1596 | * Gets the type of the event. |
1597 | + * @memberof GeisEvent |
1598 | * |
1599 | - * @param[in] geis The GeisEvent to destroy. |
1600 | + * @param[in] event The GeisEvent to destroy. |
1601 | */ |
1602 | GEIS_API GeisEventType geis_event_type(GeisEvent event); |
1603 | |
1604 | /** |
1605 | * Gets the number of attributes in the event. |
1606 | + * @memberof GeisEvent |
1607 | * |
1608 | - * @param[in] geis The GeisEvent. |
1609 | + * @param[in] event The GeisEvent. |
1610 | */ |
1611 | GEIS_API GeisSize geis_event_attr_count(GeisEvent event); |
1612 | |
1613 | /** |
1614 | * Gets an indicated attribute from the event. |
1615 | + * @memberof GeisEvent |
1616 | * |
1617 | - * @param[in] geis The GeisEvent. |
1618 | - * @param[in] index Indicates the attribute to retrieve. |
1619 | + * @param[in] event The GeisEvent. |
1620 | + * @param[in] index Indicates the attribute to retrieve. |
1621 | */ |
1622 | GEIS_API GeisAttr geis_event_attr(GeisEvent event, GeisSize index); |
1623 | |
1624 | /** |
1625 | * Gets a named attribute from the event. |
1626 | + * @memberof GeisEvent |
1627 | * |
1628 | - * @param[in] geis The GeisEvent. |
1629 | + * @param[in] event The GeisEvent. |
1630 | * @param[in] attr_name The name of the attribute to retrieve. |
1631 | */ |
1632 | GEIS_API GeisAttr geis_event_attr_by_name(GeisEvent event, GeisString attr_name); |
1633 | @@ -804,7 +928,6 @@ |
1634 | * Pumps the GEIS event loop. |
1635 | * |
1636 | * @param[in] geis The GEIS API instance. |
1637 | - * @param[out] event An opeaque event object. |
1638 | * |
1639 | * Processes input events until there are no more input events to process and |
1640 | * generates zero or more gesture events, reporting them via the user-supplied |
1641 | @@ -850,12 +973,31 @@ |
1642 | /* @} */ |
1643 | |
1644 | /** |
1645 | - * @defgroup geis2_device Gesture Input Devices (GEIS v2.0) |
1646 | - * @{ |
1647 | + * @defgroup geis_v2_device Input Devices |
1648 | + * @ingroup geis_v2 |
1649 | + * @{ |
1650 | + */ |
1651 | + |
1652 | +/** |
1653 | + * @name Device Event Attributes |
1654 | + * @{ |
1655 | + * |
1656 | + * @def GEIS_EVENT_ATTRIBUTE_DEVICE |
1657 | + * The event attribute containing a pointer to a GeisDevice. |
1658 | + * |
1659 | + * The GEIS_EVENT_DEVICE_AVAILABLE and GEIS_EVENT_DEVICE_UNAVAILABLE events |
1660 | + * should have a GEIS_ATTR_TYPE_POINTER attribute with this name. It |
1661 | + * should contain a pointer to a GeisDevice describing the device made available |
1662 | + * or unavailable. |
1663 | */ |
1664 | #define GEIS_EVENT_ATTRIBUTE_DEVICE "device" |
1665 | |
1666 | +/* @} */ |
1667 | + |
1668 | /** |
1669 | + * @name Device Attributes |
1670 | + * @{ |
1671 | + * |
1672 | * @def GEIS_DEVICE_ATTRIBUTE_NAME |
1673 | * The name of the input device. Not guaranteed unique. |
1674 | * |
1675 | @@ -864,15 +1006,23 @@ |
1676 | * instance. |
1677 | * |
1678 | * @def GEIS_DEVICE_ATTRIBUTE_TOUCHES |
1679 | - * The simultaneous number of touches the device claims to be able to detect if |
1680 | - * it is a multi-touch device. A value of zero indicates the maximum number of |
1681 | - * touches can not be determined. |
1682 | + * The maximum number of touches a device is capable of reporting. |
1683 | + * This integer is the number if simultaneous touches the device claims to be |
1684 | + * able to detect if it is a multi-touch device. A value of zero indicates the |
1685 | + * maximum number of touches can not be determined. |
1686 | * |
1687 | * @def GEIS_DEVICE_ATTRIBUTE_DIRECT_TOUCH |
1688 | - * Indicates if this is a direct touch device (eg. touchscreen). |
1689 | + * Indicates the device is a direct touch device. |
1690 | + * The present of this boolean attribute with a value of GEIS_TRUE indicates the |
1691 | + * device is a direct touch multi-touch device (for example, a touchscreen), |
1692 | + * otherwise it is an indirect touch device (such as a touchpad) or not a touch |
1693 | + * device at all. |
1694 | * |
1695 | * @def GEIS_DEVICE_ATTRIBUTE_INDEPENDENT_TOUCH |
1696 | - * Indicates if this is an independent touch device (eg. Apple MagicMouse). |
1697 | + * Indicates the device is an independent touch device. |
1698 | + * The presence of this boolean attribute with a value of GEIS_TRUE indicates |
1699 | + * the device is an independent touch device (for example, an Apple MagicMouse). |
1700 | + * Other multi-touch devices should report GEIS_FALSE. |
1701 | */ |
1702 | #define GEIS_DEVICE_ATTRIBUTE_NAME "device name" |
1703 | #define GEIS_DEVICE_ATTRIBUTE_ID "device id" |
1704 | @@ -880,14 +1030,17 @@ |
1705 | #define GEIS_DEVICE_ATTRIBUTE_DIRECT_TOUCH "direct touch" |
1706 | #define GEIS_DEVICE_ATTRIBUTE_INDEPENDENT_TOUCH "independent touch" |
1707 | |
1708 | +/* @} */ |
1709 | |
1710 | /** |
1711 | * @class GeisDevice |
1712 | - * An opaque pointer type representing a gesture-capable input device. |
1713 | + * A gesture-capable input device. |
1714 | * |
1715 | * GeisDevice objects are created by the GEIS API and are reference counted. |
1716 | */ |
1717 | +/** @cond typedef */ |
1718 | typedef struct _GeisDevice *GeisDevice; |
1719 | +/** @endcond */ |
1720 | |
1721 | GEIS_API void geis_register_device_callback(Geis geis, |
1722 | GeisEventCallback event_callback, |
1723 | @@ -895,7 +1048,7 @@ |
1724 | |
1725 | /** |
1726 | * Adds a reference count to a device. |
1727 | - * @public @memberof GeisDevice |
1728 | + * @memberof GeisDevice |
1729 | * |
1730 | * @param[in] device The device. |
1731 | * |
1732 | @@ -907,7 +1060,7 @@ |
1733 | |
1734 | /** |
1735 | * Removes a reference count from a device. |
1736 | - * @public @memberof GeisDevice |
1737 | + * @memberof GeisDevice |
1738 | * |
1739 | * @param[in] device The device. |
1740 | * |
1741 | @@ -948,29 +1101,60 @@ |
1742 | * @memberof GeisDevice |
1743 | * |
1744 | * @param[in] device The device. |
1745 | + * @param[in] index Indicates which attr to retrieve. |
1746 | */ |
1747 | GEIS_API GeisAttr geis_device_attr(GeisDevice device, GeisSize index); |
1748 | |
1749 | /* @} */ |
1750 | |
1751 | /** |
1752 | - * @defgroup geis2_class Gesture Classes (GEIS v2.0) |
1753 | + * @defgroup geis_v2_class Gesture Classes |
1754 | + * @ingroup geis_v2 |
1755 | * @{ |
1756 | */ |
1757 | |
1758 | /** |
1759 | - * An opaque pointer type representing a gesture-capable input device. |
1760 | + * @class GeisGestureClass |
1761 | + * A defined gesture classifier. |
1762 | * |
1763 | - * GeisDevice objects are created by the GEIS API and are reference counted. An |
1764 | - * application needs to increment and decrement the reference count of a gesture |
1765 | - * class object to control its persistence. |
1766 | + * GeisGestureClass objects are created by the GEIS API and are reference |
1767 | + * counted. An application needs to increment and decrement the reference |
1768 | + * count of a gesture class object to control its persistence. |
1769 | */ |
1770 | +/** @cond typedef */ |
1771 | typedef struct _GeisGestureClass *GeisGestureClass; |
1772 | - |
1773 | +/** @endcond */ |
1774 | + |
1775 | +/** |
1776 | + * @name Gesture Class Event Attributes |
1777 | + * @{ |
1778 | + * |
1779 | + * @def GEIS_EVENT_ATTRIBUTE_CLASS |
1780 | + * The event attribute containing a pointer to a GeisGestureClass. |
1781 | + * |
1782 | + * The GEIS_EVENT_CLASS_AVAILABLE and GEIS_EVENT_CLASS_UNAVAILABLE events |
1783 | + * should have a GEIS_ATTR_TYPE_POINTER attribute with this name. It |
1784 | + * should contain a pointer to a GeisGestureClass describing the gesture class |
1785 | + * made available or unavailable. |
1786 | + */ |
1787 | +#define GEIS_EVENT_ATTRIBUTE_CLASS "gesture class" |
1788 | + |
1789 | +/* @} */ |
1790 | + |
1791 | +/** |
1792 | + * @name Gesture Class Attributes |
1793 | + * @{ |
1794 | + * |
1795 | + * @def GEIS_CLASS_ATTRIBUTE_NAME |
1796 | + * The name of the gesture class. |
1797 | + * |
1798 | + * @def GEIS_CLASS_ATTRIBUTE_ID |
1799 | + * The unique integer ID of the gesture class. |
1800 | + */ |
1801 | #define GEIS_CLASS_ATTRIBUTE_NAME "class name" |
1802 | #define GEIS_CLASS_ATTRIBUTE_ID "class id" |
1803 | |
1804 | -#define GEIS_EVENT_ATTRIBUTE_CLASS "gesture class" |
1805 | +/* @} */ |
1806 | |
1807 | /** |
1808 | * Registers a callback to receive gesture class change notifications. |
1809 | @@ -997,6 +1181,7 @@ |
1810 | |
1811 | /** |
1812 | * Increments the reference count of a gesture class object. |
1813 | + * @memberof GeisGestureClass |
1814 | * |
1815 | * @param[in] gesture_class The gesture class object. |
1816 | */ |
1817 | @@ -1004,6 +1189,7 @@ |
1818 | |
1819 | /** |
1820 | * Decrements the reference count of a gesture class object. |
1821 | + * @memberof GeisGestureClass |
1822 | * |
1823 | * @param[in] gesture_class The gesture class object. |
1824 | * |
1825 | @@ -1014,6 +1200,7 @@ |
1826 | |
1827 | /** |
1828 | * Gets the name of the gesture class. |
1829 | + * @memberof GeisGestureClass |
1830 | * |
1831 | * @param[in] gesture_class The gesture class object. |
1832 | */ |
1833 | @@ -1021,6 +1208,7 @@ |
1834 | |
1835 | /** |
1836 | * Gets the numeric identifier of the gesture class. |
1837 | + * @memberof GeisGestureClass |
1838 | * |
1839 | * @param[in] gesture_class The gesture class object. |
1840 | */ |
1841 | @@ -1028,6 +1216,7 @@ |
1842 | |
1843 | /** |
1844 | * Gets the number of attributes of the gesture class. |
1845 | + * @memberof GeisGestureClass |
1846 | * |
1847 | * @param[in] gesture_class The gesture class object. |
1848 | */ |
1849 | @@ -1035,6 +1224,7 @@ |
1850 | |
1851 | /** |
1852 | * Gets the indicated attribute of teh gesture class. |
1853 | + * @memberof GeisGestureClass |
1854 | * |
1855 | * @param[in] gesture_class The gesture class object. |
1856 | * @param[in] index The index of the attribute to retrieve. |
1857 | @@ -1045,32 +1235,66 @@ |
1858 | /* @} */ |
1859 | |
1860 | /** |
1861 | - * @defgroup geis2_region Gesture Regions (GEIS v2.0) |
1862 | + * @defgroup geis_v2_region Gesture Regions |
1863 | + * @ingroup geis_v2 |
1864 | * @{ |
1865 | */ |
1866 | |
1867 | +/** |
1868 | + * @class GeisRegion |
1869 | + * Defines a region over which gestures may take place. |
1870 | + */ |
1871 | +/** @cond typedef */ |
1872 | typedef struct _GeisRegion *GeisRegion; |
1873 | - |
1874 | -/** |
1875 | - * @defgroup geis2_region_init_args Gesture Region Initialization Arguments |
1876 | - * |
1877 | +/** @endcond */ |
1878 | + |
1879 | +/** |
1880 | + * @name Region Attributes |
1881 | + * |
1882 | + * @par |
1883 | + * These attributes can be used to construct filter terms to restrict a |
1884 | + * gesture subscription to a particular region. |
1885 | + * |
1886 | + * @{ |
1887 | + * |
1888 | + * @def GEIS_REGION_ATTRIBUTE_WINDOWID |
1889 | + * The X11 windowid in which a gesture occurred. Used for filter matching. |
1890 | + */ |
1891 | +#define GEIS_REGION_ATTRIBUTE_WINDOWID "windowid" |
1892 | + |
1893 | +/* @} */ |
1894 | + |
1895 | +/** |
1896 | + * @name Region Initialization Arguments |
1897 | + * |
1898 | + * @par |
1899 | * Gesture regions are created to describe a particular display/feedback region. |
1900 | * The type of the region can not be changed after creation (just create a new |
1901 | * region for that). The types of regions are platform specific and each type |
1902 | * may require addition arguments. |
1903 | * |
1904 | + * @par |
1905 | * The following region initialization argument names are required by the |
1906 | * GEIS v2.0 specification. |
1907 | * |
1908 | * @{ |
1909 | + * |
1910 | + * @def GEIS_REGION_X11_ROOT |
1911 | + * Selects the X11 root window as a region. |
1912 | + * |
1913 | + * @def GEIS_REGION_X11_WINDOWID |
1914 | + * Selects an X11 window as a region. |
1915 | + * Requires the window_id as an argument. |
1916 | */ |
1917 | #define GEIS_REGION_X11_ROOT "org.libgeis.region.x11.root" |
1918 | + |
1919 | #define GEIS_REGION_X11_WINDOWID "org.libgeis.region.x11.windowid" |
1920 | |
1921 | /* @} */ |
1922 | |
1923 | /** |
1924 | * Creates a new GEIS v2.0 region. |
1925 | + * @memberof GeisRegion |
1926 | * |
1927 | * @param[in] geis The GEIS API instance. |
1928 | * @param[in] name A name. Used for diagnostics. |
1929 | @@ -1086,6 +1310,7 @@ |
1930 | |
1931 | /** |
1932 | * Destroys a GEIS v2.0 region. |
1933 | + * @memberof GeisRegion |
1934 | * |
1935 | * @param[in] region The region. |
1936 | */ |
1937 | @@ -1093,6 +1318,7 @@ |
1938 | |
1939 | /** |
1940 | * Gets the name of a GEIS v2.0 region. |
1941 | + * @memberof GeisRegion |
1942 | * |
1943 | * @param[in] region The region. |
1944 | * |
1945 | @@ -1103,32 +1329,51 @@ |
1946 | /* @} */ |
1947 | |
1948 | /** |
1949 | - * @defgroup geis2_filter Gesture Filter (GEIS v2.0) |
1950 | + * @defgroup geis_v2_filter Gesture Filter |
1951 | + * @ingroup geis_v2 |
1952 | * @{ |
1953 | */ |
1954 | |
1955 | +/** |
1956 | + * @class GeisFilter |
1957 | + * Selects a subset of possible gestures in a subscription. |
1958 | + * |
1959 | + * A GeisFilter is a collection of filter terms, each of which defines a |
1960 | + * criterion for selection of gestures returned on a subscription. |
1961 | + * |
1962 | + * All filter terms are effectively ANDed together in a filter. |
1963 | + **/ |
1964 | +/** @cond typedef */ |
1965 | typedef struct _GeisFilter *GeisFilter; |
1966 | +/** @endcond */ |
1967 | |
1968 | +/** |
1969 | + * Indicates the type of filter. |
1970 | + */ |
1971 | typedef enum _GeisFilterFacility |
1972 | { |
1973 | - GEIS_FILTER_DEVICE = 1000, |
1974 | - GEIS_FILTER_CLASS = 2000, |
1975 | - GEIS_FILTER_REGION = 3000 |
1976 | + GEIS_FILTER_DEVICE = 1000, /**< Filters on device attributes. */ |
1977 | + GEIS_FILTER_CLASS = 2000, /**< Filters on gesture attributes. */ |
1978 | + GEIS_FILTER_REGION = 3000 /**< Filters on region attributes. */ |
1979 | } GeisFilterFacility; |
1980 | |
1981 | +/** |
1982 | + * Indicates the type of filter operation. |
1983 | + */ |
1984 | typedef enum _GeisFilterOperation |
1985 | { |
1986 | - GEIS_FILTER_OP_EQ, |
1987 | - GEIS_FILTER_OP_NE, |
1988 | - GEIS_FILTER_OP_GT, |
1989 | - GEIS_FILTER_OP_GE, |
1990 | - GEIS_FILTER_OP_LT, |
1991 | - GEIS_FILTER_OP_LE |
1992 | + GEIS_FILTER_OP_EQ, /**< Compares for equality. */ |
1993 | + GEIS_FILTER_OP_NE, /**< Compares for inequality */ |
1994 | + GEIS_FILTER_OP_GT, /**< Compares for greater-than. */ |
1995 | + GEIS_FILTER_OP_GE, /**< Compares for greater-than-or-equal. */ |
1996 | + GEIS_FILTER_OP_LT, /**< Compares for less-than. */ |
1997 | + GEIS_FILTER_OP_LE /**< Compares for less-tha-or-equal. */ |
1998 | } GeisFilterOperation; |
1999 | |
2000 | |
2001 | /** |
2002 | * Creates a new, empty filter. |
2003 | + * @memberof GeisFilter |
2004 | * |
2005 | * @param[in] geis The GEIS API instance. |
2006 | * @param[in] name A name. |
2007 | @@ -1139,16 +1384,20 @@ |
2008 | |
2009 | /** |
2010 | * Creates a new filter by copying an existing filter. |
2011 | + * @memberof GeisFilter |
2012 | * |
2013 | * @param[in] original An existing geisFilter instance. |
2014 | * @param[in] name A name. |
2015 | * |
2016 | + * The original filter remains unchanged. |
2017 | + * |
2018 | * @returns a GeisFilter object or NULL on failure. |
2019 | */ |
2020 | GEIS_API GeisFilter geis_filter_clone(GeisFilter original, GeisString name); |
2021 | |
2022 | /** |
2023 | - * Destroys a GEIS v2.0 filter object. |
2024 | + * Destroys a GeisFilter. |
2025 | + * @memberof GeisFilter |
2026 | * |
2027 | * @param[in] filter The filter. |
2028 | */ |
2029 | @@ -1156,6 +1405,7 @@ |
2030 | |
2031 | /** |
2032 | * Gets the name given to the filter when it was created. |
2033 | + * @memberof GeisFilter |
2034 | * |
2035 | * @param[in] filter The filter. |
2036 | */ |
2037 | @@ -1163,6 +1413,7 @@ |
2038 | |
2039 | /** |
2040 | * Adds a term to a filter. |
2041 | + * @memberof GeisFilter |
2042 | * |
2043 | * @param[in] filter The filter. |
2044 | * @param[in] facility The term facility. |
2045 | @@ -1180,16 +1431,38 @@ |
2046 | /* @} */ |
2047 | |
2048 | /** |
2049 | - * @defgroup geis2_subscription Gesture Subscription (GEIS v2.0) |
2050 | + * @defgroup geis_v2_subscription Gesture Subscription |
2051 | + * @ingroup geis_v2 |
2052 | * @{ |
2053 | */ |
2054 | |
2055 | +/** |
2056 | + * @class GeisSubscription |
2057 | + * A gesture recognition subscription. |
2058 | + */ |
2059 | +/** @cond typedef */ |
2060 | typedef struct _GeisSubscription *GeisSubscription; |
2061 | +/** @endcond */ |
2062 | |
2063 | /** |
2064 | - * Flags to refine the behaviour of the gesture subscription. |
2065 | + * @enum GeisSubscriptionFlags |
2066 | + * |
2067 | + * These flags are used when creating a new subscription and affect the nature |
2068 | + * of the gestures recognized by the subscription. They may ORed together. |
2069 | + * |
2070 | + * @var GeisSubscriptionFlags::GEIS_SUBSCRIPTION_NONE |
2071 | + * No special subscription processing: this is the default. |
2072 | + * |
2073 | + * @var GeisSubscriptionFlags::GEIS_SUBSCRIPTION_GRAB |
2074 | + * The subscription will "grab" all filtered gestures from subwindows. |
2075 | + * |
2076 | + * @var GeisSubscriptionFlags::GEIS_SUBSCRIPTION_CONT |
2077 | + * The gesture engine will return <em>gesture continuations</em>, in which the |
2078 | + * class of a recognized gestire may change over the lifetime of the gesture. |
2079 | + * If this flag is not set, a new gesture will be identified for each change in |
2080 | + * gesture class. |
2081 | */ |
2082 | -typedef enum _GeisSubscriptionFlags |
2083 | +typedef enum GeisSubscriptionFlags |
2084 | { |
2085 | GEIS_SUBSCRIPTION_NONE = 0x0000, |
2086 | GEIS_SUBSCRIPTION_GRAB = 0x0001, |
2087 | @@ -1198,6 +1471,7 @@ |
2088 | |
2089 | /** |
2090 | * Creates a new subscription. |
2091 | + * @memberof GeisSubscription |
2092 | * |
2093 | * @param[in] geis The GEIS API instance. |
2094 | * @param[in] name A name. |
2095 | @@ -1214,6 +1488,7 @@ |
2096 | |
2097 | /** |
2098 | * Destroys a GEIS v2.0 subscription object. |
2099 | + * @memberof GeisSubscription |
2100 | * |
2101 | * @param[in] subscription The subscription. |
2102 | */ |
2103 | @@ -1221,6 +1496,7 @@ |
2104 | |
2105 | /** |
2106 | * Activates a subscription. |
2107 | + * @memberof GeisSubscription |
2108 | * |
2109 | * @param[in] subscription The subscription. |
2110 | * |
2111 | @@ -1231,6 +1507,7 @@ |
2112 | |
2113 | /** |
2114 | * Deactivates a subscription. |
2115 | + * @memberof GeisSubscription |
2116 | * |
2117 | * @param[in] subscription The subscription. |
2118 | * |
2119 | @@ -1241,6 +1518,7 @@ |
2120 | |
2121 | /** |
2122 | * Gets the name given to a subscription when it was created. |
2123 | + * @memberof GeisSubscription |
2124 | * |
2125 | * @param[in] subscription The subscription. |
2126 | */ |
2127 | @@ -1248,6 +1526,7 @@ |
2128 | |
2129 | /** |
2130 | * Gets the ID assigned to a subscription when it was created. |
2131 | + * @memberof GeisSubscription |
2132 | * |
2133 | * @param[in] subscription The subscription. |
2134 | */ |
2135 | @@ -1255,6 +1534,7 @@ |
2136 | |
2137 | /** |
2138 | * Adds a filter to a subscription. |
2139 | + * @memberof GeisSubscription |
2140 | * |
2141 | * @param[in] subscription The subscription. |
2142 | * @param[in] filter The filter to be added to the subscription. |
2143 | @@ -1271,6 +1551,7 @@ |
2144 | |
2145 | /** |
2146 | * Gets an named filter from a subscription. |
2147 | + * @memberof GeisSubscription |
2148 | * |
2149 | * @param[in] sub The subscription. |
2150 | * @param[in] name Names the filter to retrieve. |
2151 | @@ -1283,6 +1564,7 @@ |
2152 | |
2153 | /** |
2154 | * Removes a filter from a subscription. |
2155 | + * @memberof GeisSubscription |
2156 | * |
2157 | * @param[in] subscription The subscription. |
2158 | * @param[in] filter The filter to be removed from the subscription. |
2159 | @@ -1293,22 +1575,93 @@ |
2160 | /* @} */ |
2161 | |
2162 | /** |
2163 | - * @defgroup geis2_gesture Gesture Frames (GEIS v2.0) |
2164 | + * @defgroup geis_v2_gesture Gesture Frames |
2165 | + * @ingroup geis_v2 |
2166 | + * Gesture state information. |
2167 | + * |
2168 | + * Gesture frames, and their associated groups and touches, convey information |
2169 | + * about the current state of recognized gestures. |
2170 | + * |
2171 | * @{ |
2172 | */ |
2173 | |
2174 | +/** |
2175 | + * @class GeisGroup |
2176 | + * A collection of gesture frames. |
2177 | + * |
2178 | + * @class GeisGroupSet |
2179 | + * A collection of GeisGroups. |
2180 | + * |
2181 | + * @class GeisTouch |
2182 | + * An instance of a touch. |
2183 | + * |
2184 | + * @class GeisTouchId |
2185 | + * Relates a touch in a frame to a touch object in a set. |
2186 | + * |
2187 | + * @class GeisTouchSet |
2188 | + * A collection of GeisTouch |
2189 | + * |
2190 | + * @class GeisFrame |
2191 | + * A collection of information describing the state of a gesture. |
2192 | + */ |
2193 | +/** @cond typedef */ |
2194 | typedef struct _GeisGroup *GeisGroup; |
2195 | typedef struct _GeisGroupSet *GeisGroupSet; |
2196 | typedef GeisSize GeisTouchId; |
2197 | typedef struct _GeisTouch *GeisTouch; |
2198 | typedef struct _GeisTouchSet *GeisTouchSet; |
2199 | typedef struct _GeisFrame *GeisFrame; |
2200 | +/** @endcond */ |
2201 | |
2202 | +/** |
2203 | + * @name Gesture Frame Event Attributes |
2204 | + * |
2205 | + * @par |
2206 | + * A gesture event (GEIS_EVENT_GESTURE_BEGIN, GEIS_EVENT_GESTURE_UPDATE, |
2207 | + * GEIS_EVENT_GESTURE_END) should have two GEIS_ATTR_TYPE_POINTER attributes, |
2208 | + * one containing a GeisGroupSet and one containing a GeisTouchSet. |
2209 | + * |
2210 | + * @{ |
2211 | + * |
2212 | + * @def GEIS_EVENT_ATTRIBUTE_GROUPSET |
2213 | + * The event attribute containing a pointer to a GeisGroupSet. |
2214 | + * |
2215 | + * @def GEIS_EVENT_ATTRIBUTE_TOUCHSET |
2216 | + * The event attribute containing a pointer to a GeisTouchSet. |
2217 | + */ |
2218 | #define GEIS_EVENT_ATTRIBUTE_GROUPSET "group set" |
2219 | #define GEIS_EVENT_ATTRIBUTE_TOUCHSET "touch set" |
2220 | |
2221 | +/* @} */ |
2222 | + |
2223 | +/** |
2224 | + * @name Touch Attributes |
2225 | + * |
2226 | + * @par |
2227 | + * Each touch has zero or more attributes associated with it. Differing hardware |
2228 | + * is capable of reporting differing sets of touch attributes, so there is no |
2229 | + * guarantee that any or all of the defined touch attributes will bre present. |
2230 | + * |
2231 | + * @{ |
2232 | + * |
2233 | + * @def GEIS_TOUCH_ATTRIBUTE_ID |
2234 | + * Identifies the touch. |
2235 | + * |
2236 | + * @def GEIS_TOUCH_ATTRIBUTE_X |
2237 | + * The X coordinate of the touch. |
2238 | + * |
2239 | + * @def GEIS_TOUCH_ATTRIBUTE_Y |
2240 | + * The Y coordinate of the touch. |
2241 | + */ |
2242 | +#define GEIS_TOUCH_ATTRIBUTE_ID "touch id" |
2243 | +#define GEIS_TOUCH_ATTRIBUTE_X "touch x" |
2244 | +#define GEIS_TOUCH_ATTRIBUTE_Y "touch y" |
2245 | + |
2246 | +/* @} */ |
2247 | + |
2248 | /** |
2249 | * Gets the number of gesture groups in a groupset. |
2250 | + * @memberof GeisGroupSet |
2251 | * |
2252 | * @param[in] groupset The groupset. |
2253 | */ |
2254 | @@ -1316,6 +1669,7 @@ |
2255 | |
2256 | /** |
2257 | * Gets an indicated gesture group from a groupset. |
2258 | + * @memberof GeisGroupSet |
2259 | * |
2260 | * @param[in] groupset The groupset. |
2261 | * @param[in] index Indicates which gesture group to retrieve. |
2262 | @@ -1324,6 +1678,7 @@ |
2263 | |
2264 | /** |
2265 | * Gets the identifier of a gesture group. |
2266 | + * @memberof GeisGroup |
2267 | * |
2268 | * @param[in] group The gesture group. |
2269 | */ |
2270 | @@ -1331,6 +1686,7 @@ |
2271 | |
2272 | /** |
2273 | * Gets the number of gesture frames in a gesture group. |
2274 | + * @memberof GeisGroup |
2275 | * |
2276 | * @param[in] group The gesture group. |
2277 | */ |
2278 | @@ -1338,6 +1694,7 @@ |
2279 | |
2280 | /** |
2281 | * Gets an indicated gesture frame from a gesture group. |
2282 | + * @memberof GeisGroup |
2283 | * |
2284 | * @param[in] group The gesture group. |
2285 | * @param[in] index Indicates which gesture frame to retrieve. |
2286 | @@ -1346,6 +1703,7 @@ |
2287 | |
2288 | /** |
2289 | * Marks a gesture group as rejected. |
2290 | + * @memberof GeisGroup |
2291 | * |
2292 | * @param[in] group The gesture group to reject. |
2293 | */ |
2294 | @@ -1353,6 +1711,7 @@ |
2295 | |
2296 | /** |
2297 | * Gets the number of touches in a touchset. |
2298 | + * @memberof GeisTouchSet |
2299 | * |
2300 | * @param[in] touchset The touchset, |
2301 | */ |
2302 | @@ -1360,6 +1719,7 @@ |
2303 | |
2304 | /** |
2305 | * Gets an indicated touch from a touchset. |
2306 | + * @memberof GeisTouchSet |
2307 | * |
2308 | * @param[in] touchset The touchset. |
2309 | * @param[in] index Indicates which touch to retrieve. |
2310 | @@ -1368,6 +1728,7 @@ |
2311 | |
2312 | /** |
2313 | * Gets an identified touch from a touchset. |
2314 | + * @memberof GeisTouchSet |
2315 | * |
2316 | * @param[in] touchset The touchset. |
2317 | * @param[in] touchid Identifies a touch. |
2318 | @@ -1379,6 +1740,7 @@ |
2319 | |
2320 | /** |
2321 | * Gets the identifier of a touch. |
2322 | + * @memberof GeisTouch |
2323 | * |
2324 | * @param[in] touch The touch. |
2325 | */ |
2326 | @@ -1386,6 +1748,7 @@ |
2327 | |
2328 | /** |
2329 | * Gets the number of attrs associated with a touch. |
2330 | + * @memberof GeisTouch |
2331 | * |
2332 | * @param[in] touch The touch. |
2333 | */ |
2334 | @@ -1393,6 +1756,7 @@ |
2335 | |
2336 | /** |
2337 | * Gets an indicated attr from a touch. |
2338 | + * @memberof GeisTouch |
2339 | * |
2340 | * @param[in] touch The touch. |
2341 | * @param[in] index Indicates which attr to retrieve. |
2342 | @@ -1401,6 +1765,7 @@ |
2343 | |
2344 | /** |
2345 | * Gets a named attr from a touch. |
2346 | + * @memberof GeisTouch |
2347 | * |
2348 | * @param[in] touch The touch. |
2349 | * @param[in] name Names the attr to retrieve. |
2350 | @@ -1411,6 +1776,7 @@ |
2351 | |
2352 | /** |
2353 | * Gets the identifier of a gesture frame. |
2354 | + * @memberof GeisFrame |
2355 | * |
2356 | * @param[in] frame the gesture frame. |
2357 | */ |
2358 | @@ -1418,6 +1784,7 @@ |
2359 | |
2360 | /** |
2361 | * Indicates if a gesture frame belongs to a gesture class. |
2362 | + * @memberof GeisFrame |
2363 | * |
2364 | * @param[in] frame The gesture frame. |
2365 | * @param[in] gesture_class The gesture class. |
2366 | @@ -1430,6 +1797,7 @@ |
2367 | |
2368 | /** |
2369 | * Gets the number of attrs associated with a gesture frame. |
2370 | + * @memberof GeisFrame |
2371 | * |
2372 | * @param[in] frame The gesture frame. |
2373 | */ |
2374 | @@ -1437,6 +1805,7 @@ |
2375 | |
2376 | /** |
2377 | * Gets an indicated attr from a gesture frame. |
2378 | + * @memberof GeisFrame |
2379 | * |
2380 | * @param[in] frame The gesture frame. |
2381 | * @param[in] index Indicates which attr to retrieve. |
2382 | @@ -1445,6 +1814,7 @@ |
2383 | |
2384 | /** |
2385 | * Gets a named attr from a gesture frame. |
2386 | + * @memberof GeisFrame |
2387 | * |
2388 | * @param[in] frame The gesture frame. |
2389 | * @param[in] name Names the attr to retrieve. |
2390 | @@ -1455,6 +1825,7 @@ |
2391 | |
2392 | /** |
2393 | * Gets the current transform matrix of a gesture. |
2394 | + * @memberof GeisFrame |
2395 | * |
2396 | * @param[in] frame The gesture frame. |
2397 | */ |
2398 | @@ -1462,6 +1833,7 @@ |
2399 | |
2400 | /** |
2401 | * Gets the number of touches making up a gesture for the frame. |
2402 | + * @memberof GeisFrame |
2403 | * |
2404 | * @param[in] frame The gesture frame. |
2405 | */ |
2406 | @@ -1469,6 +1841,7 @@ |
2407 | |
2408 | /** |
2409 | * Gets the ID of the indicated touch within the gesture frame. |
2410 | + * @memberof GeisFrame |
2411 | * |
2412 | * @param[in] frame The gesture frame. |
2413 | * @param[in] index Indicates which touch ID to retrieve. |
2414 | @@ -1477,10 +1850,11 @@ |
2415 | |
2416 | /** |
2417 | * Marks a gesture as rejected. |
2418 | + * @memberof GeisFrame |
2419 | * |
2420 | * @param[in] gesture_id Identifies the gesture. |
2421 | */ |
2422 | -GEIS_API void geis_gesture_reject(GeisGestureId gestureid); |
2423 | +GEIS_API void geis_gesture_reject(GeisGestureId gesture_id); |
2424 | |
2425 | /* @} */ |
2426 |
Love the example!