Status: | Merged |
---|---|
Merged at revision: | 45 |
Proposed branch: | lp:~chasedouglas/frame/v2 |
Merge into: | lp:frame |
Diff against target: |
6387 lines (+6005/-12) 46 files modified
.bzrignore (+4/-0) Makefile.am (+4/-1) configure.ac (+7/-1) doc/Doxyfile (+1749/-0) doc/Makefile.am (+42/-0) include/utouch/frame-mtdev.h (+14/-0) include/utouch/frame-xi2.h (+14/-0) include/utouch/frame.h (+624/-3) include/utouch/frame_x11.h (+136/-0) src/Makefile.am (+40/-6) src/libutouch-frame.ver (+47/-0) src/v2/axis.cpp (+54/-0) src/v2/axis.h (+55/-0) src/v2/device.cpp (+87/-0) src/v2/device.h (+56/-0) src/v2/event.cpp (+106/-0) src/v2/event.h (+55/-0) src/v2/frame.cpp (+258/-0) src/v2/frame.h (+68/-0) src/v2/handle.cpp (+87/-0) src/v2/handle.h (+59/-0) src/v2/property.h (+78/-0) src/v2/touch.cpp (+171/-0) src/v2/touch.h (+63/-0) src/v2/typedefs.h (+41/-0) src/v2/value.cpp (+201/-0) src/v2/value.h (+99/-0) src/v2/window.cpp (+47/-0) src/v2/window.h (+53/-0) src/v2/x11/device_x11.cpp (+222/-0) src/v2/x11/device_x11.h (+66/-0) src/v2/x11/frame_x11.cpp (+74/-0) src/v2/x11/handle_x11.cpp (+182/-0) src/v2/x11/handle_x11.h (+63/-0) src/v2/x11/window_x11.cpp (+198/-0) src/v2/x11/window_x11.h (+66/-0) tools/Makefile.am (+17/-0) tools/common-defs.h (+1/-1) tools/common/device.c (+188/-0) tools/common/device.h (+28/-0) tools/common/frame.c (+80/-0) tools/common/frame.h (+24/-0) tools/common/touch.c (+213/-0) tools/common/touch.h (+25/-0) tools/utouch-frame-test-x11.c (+221/-0) tools/utouch-frame-test-x11.txt (+18/-0) |
To merge this branch: | bzr merge lp:~chasedouglas/frame/v2 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Stephen M. Webb (community) | Approve | ||
Chase Douglas (community) | Needs Resubmitting | ||
Jussi Pakkanen (community) | Approve | ||
Review via email: mp+81794@code.launchpad.net |
This proposal supersedes a proposal from 2011-08-27.
Commit message
Description of the change
This branch includes all the agreed upon changes.
Original description
=======
This adds a v2.x layer of the uTouch-Frame library. It co-exists with the v1.x layer for now, but the goal should be to remove the v1.x layer once we have moved to the client-side architecture. Differences and reasons for an upgrade:
* v1 has a push and pull api, there was a queue, but no way to signal that data was available.
- v2 has a queue and provides an eventfd signaling interface.
* v1 uses a ring buffer of public structures as its api. This creates ABI breakage every time the structure is extended.
- v2 uses opaque objects retrieved from a queue in an opaque object.
* v1 works on a per-device level. This means a new context must be created for every new device, adding extra overhead and management.
- v2 uses one context and provides events when devices are added/removed
* In order to be fast, v1 allocated all memory up front. The user is required to specify at context creation time how much buffering to use. If you specified too much you wasted memory; if you specified too little you might overrun your buffer. The amount is hard to determine, and the best choice is probably machine and load specific.
- v2 uses C++ under the covers, and objects that are frequently created and destroyed are allocated from pools of memory, either through the standard library in the case of std::vector and std::queue or through __gnu_cxx:
* v1 copies the all the touches from one frame to the next when a new frame is created.
- v2 uses std::shared_ptr and only copies the shared_ptr context from frame to frame when a touch is unchanged. Thus, a five touch frame where only one touch has changed copies and consumes the memory of only one touch instead of five.
* v1 calculates the velocity of each touch
- v2 drops this. I feel it should be done elsewhere
* v1 provides pointers to other objects in the ring buffer as though it were a linked list to allow for the user to see the state of a touch in a previous frame. However, there was no guarantee that the pointers were valid beyond the previous touch to the current frame.
- In v2 all objects have a defined lifetime. The lifetime of device-related objects (the device itself and its axis objects) is until a device removed event is put back to the library. The lifetime of a frame and its touches is until the event for the frame is put back to the library. In theory any number of events may be retrieved from the library at a time, but they must be put back in the order of retrieval or undefined results will occur.
* v1 has support for reading from mtdev.
- v2 drops this. It will not have any use once we move to the client side architecture.
* v1 is written in Henrik's coding style (which is fine :).
- v2 conforms to the Google C++ code style (which is what the DX team has agreed to).
If you want to test it, check it out, build it as usual, and run tools/utouch-
Jussi Pakkanen (jpakkane) wrote : Posted in a previous version of this proposal | # |
Chase Douglas (chasedouglas) wrote : Posted in a previous version of this proposal | # |
> Every single comment I have made about accessor functions vs generic property
> getter/setter applies here too. In fact it applies even stronger. As an
> example, the Axis class has no use for a generic setter. None. Zilch. Zero.
> There are no new properties that can magically appear at runtime. They are all
> specified by the kernel interface, the type enum and they are all required
> arguments of the constructor. All it does is complexify the code and
> circumvent the type system making the entire thing more fragile.
Note that there are no setters in the api.
One can reason that the axis object is not going to be extended, so I have converted frame_axis_
The rest of the objects may be extended in the future, and they could be extended at runtime. Leaving them as generic opaque getters allows for better forward compatibility.
> And if opaque getters and setters are to be used, they better be used
> everywhere and always. For example, UFTouchClass has getters and setters for
> id and state but not others. Which is it gonna be?
Touches are retrieved through an indexed lookup because there's no other way to retrieve them from the frame object.
Axes can be retrieved through an indexed lookup for the same reason until you know what axis types are available for the device. Once you have looped through the available axes you can get an axis directly by its type.
These are special cases because the objects are part of arrays.
> UFHandleClass requires an Initialize call before it is usable. This is wrong.
> Either this needs to be done in the constructor or a static factory. It might
> be sensible not to use exceptions in this case since Frame is being used as a
> C library. I'm not quite sure what happens if an exception escapes the
> boundary.
It has been converted to a factor function. Additionally, frame_x11_new() now catches any exceptions and returns UFStatusErrorRe
> There are multiple duplicate declarations of SharedUFDeviceC
> SharedUFDeviceClass etc. There can be only one.
These are essentially forward declarations of the typedefs. If you don't forward declare them, you will need to include the appropriate header files. If you attempt to do that (which I tried to do), you get into a header recursion and end up with undefined type errors.
This leaves us with two possibilities: forgo the typedefs and use the exact definitions, or leave the forward declarations of typedefs. Note that the typedefs cannot get out of sync or else you will get compiler errors stating there is a conflicting declaration. I have decided to leave them as it makes the code easier to read.
> The PutEvent/GetEvent interface is a bit cryptic. Why is it called PutEvent if
> it just deletes the event. Should it not be ReleaseEvent? "Put" in a container
> object implies adding new stuff for further use. Actually, the entire
> interface seems a bit fishy to me. Could you give an example on how you
> envision it will be used and how it differs from the current API.
In linux, and I believe elsewhere too, some reference counting APIs use "get" and "put" to increment and decrement the referen...
Chase Douglas (chasedouglas) wrote : Posted in a previous version of this proposal | # |
I want to note that this api is nowhere near final. What I propose is instead of merging this into lp:utouch-frame, we merge it into lp:utouch-frame/v2. We continually merge any changes from trunk (which should be few if any), and we switch the daily ppa over to build from lp:utouch-frame/v2. We can then have a final merge review before merging lp:utouch-frame/v2 into lp:utouch-frame.
During this time, we'll be able to kick the tires on the api. If we find certain things to be cumbersome, we can change them. From this point of view, this merge proposal should be about finding and fixing implementation issues and the direction of the api. For example, if the api structure is reasonable, but there's a question as to what should have static accessors and what should have generic property getters, we can address those later on before merging back to trunk.
Jussi Pakkanen (jpakkane) wrote : Posted in a previous version of this proposal | # |
Forward declarations have one of the following two forms:
class Foo;
struct Foo;
What we have in the code is a type declaration. They must _not_ be duplicated. Ever. In this particular case an easy fix is to have a header such as basic_definitions.h which does not include anything and has the following contents:
class UFTouch;
// other forward declared classes here
typedef std::shared_
// other type declaration thingies here.
It can be included anywhere, is short, conflict-free and does not cause compilation slowdown.
Jussi Pakkanen (jpakkane) wrote : Posted in a previous version of this proposal | # |
The X event object is created in utouch-
The main function in x11 test app is too long. It should be split into smaller, logical groups (setup, processing, teardown or something similar).
PRINT_PROPERTY is quite long, it should really be a function.
Jussi Pakkanen (jpakkane) wrote : Posted in a previous version of this proposal | # |
The header file of x11-test lists Henrik as the author.
Jussi Pakkanen (jpakkane) wrote : | # |
Looking good. Just some things I found.
InjectEvent still destroys the X event given to it. This is an ownership error as described above.
Classes live inside utouch::frame namespace but they still have the UF prefix in their names. Shouldn't they be just Touch, Device etc. since they are only for internal use?
Chase Douglas (chasedouglas) wrote : | # |
InjectEvent takes the X event and gets the "extra" data for the event and frees it after it's done with the extra data. This is how one handles XI2 events because the X protocol is dumb. However, anyone with access to the event can get the extra data again. For example, in the utouch-
I am keeping the UF prefix to signify which classes back an opaque API object. For example, UFFrame is exposed through the API, while Window is not. Otherwise it would be hard to determine what is backing the API without looking closely at the header files.
- 119. By Chase Douglas
-
Handle long unsigned int values, fixes build on i386
Chase Douglas (chasedouglas) wrote : | # |
I take the InjectEvent comments back. It appears you cannot call XGetEventData twice on the same event. I will modify the API so that the caller has to call XGetEventData before injecting the event, and then XFreeEventData after. I'm also going to rename it to frame_x11_
- 120. By Chase Douglas
-
Make the client get and free event data
Event data can only be retrieved once, so the client needs to be in
control of when this occurs.Also, rename frame_x11_
inject_ event() to frame_x11_ process_ event()
Chase Douglas (chasedouglas) wrote : | # |
I have pushed a fix to the branch. Please review.
And thanks, Jussi, for remembering this!
Stephen M. Webb (bregma) wrote : | # |
(0) I had to back out r119 to get the code to build on a 64-bit oneiric system. You might want to double-check that code.
(1) Downcasts should never use reinterpret_cast: use either dynamic_cast if you're unsure of the derived type (and the base type has at least 1 virtual function and you check for successful conversion) or static_cast if you're sure of the derived type or the base is a POD. I see a lot of this in X11 classes -- all of the reinterpret_casts should actually be static_casts. Same with value.cpp.
(2) None of the uses of dynamic_cast are necessary in value.cpp are necessary: you're using it to cast a contained pointer to the same type.
(3) There is much potential for leakage on a memory allocation failure. I'm assuming we don't care too much since a memory allocation failure is invariably fatal anyway, leaking a little is the last of our worries when it happens. Let me know if this is a legitimate concern and I can enumerate cases for fixing (I vote it's not a concern).
I'm marking this as needs fixing for the casting changes and the build failure. The API seems reasonable and while the implementation is a little more complex than I would expect from a simple adaptor filter library, appears solid. Valgrind reports no leaks other than those due to X11 itself and I can see no name leakage from the SO file.
- 121. By Chase Douglas
-
Only define long unsigned value variant when it differs from uint64_t
Fixes build on 64-bit machines.
- 122. By Chase Douglas
-
Use static_cast when casting from a super- to a sub-class
- 123. By Chase Douglas
-
dynamic_cast is unnecessary where it's been used
Chase Douglas (chasedouglas) wrote : | # |
Stephen,
Thanks for catching the build failure! I modified the way X window IDs were handled while on a plane with my x86 netbook, and I hadn't compiled it on behemoth since. It should be fixed now.
I fixed the casting issues. I agree that the memory leak on memory allocation failures are not worth fixing at this time. Feel free to open a bug if you really want :).
Please review the changes I have pushed.
Thanks!
Stephen M. Webb (bregma) wrote : | # |
This is certainly Good Enough. Let's get this sucker in.
Chase Douglas (chasedouglas) wrote : | # |
Great! As a note, I'm waiting on integration of a unit test framework and adding some basic test cases before merging into trunk.
Preview Diff
1 | === modified file '.bzrignore' |
2 | --- .bzrignore 2011-02-23 10:03:28 +0000 |
3 | +++ .bzrignore 2011-11-21 22:46:23 +0000 |
4 | @@ -4,16 +4,20 @@ |
5 | **/Makefile |
6 | *.deps |
7 | *.libs |
8 | +*.dirstamp |
9 | *Makefile.in |
10 | aclocal.m4 |
11 | autom4te.cache |
12 | config-aux |
13 | config.* |
14 | configure |
15 | +doc/api |
16 | libtool |
17 | stamp-* |
18 | tools/utouch-frame-test-mtdev |
19 | tools/utouch-frame-test-mtdev.1 |
20 | tools/utouch-frame-test-xi2 |
21 | tools/utouch-frame-test-xi2.1 |
22 | +tools/utouch-frame-test-x11 |
23 | +tools/utouch-frame-test-x11.1 |
24 | utouch-frame.pc |
25 | |
26 | === modified file 'Makefile.am' |
27 | --- Makefile.am 2010-12-30 19:23:24 +0000 |
28 | +++ Makefile.am 2011-11-21 22:46:23 +0000 |
29 | @@ -1,4 +1,4 @@ |
30 | -SUBDIRS = src tools test |
31 | +SUBDIRS = doc src tools test |
32 | |
33 | pkgconfigdir = $(libdir)/pkgconfig |
34 | pkgconfig_DATA = utouch-frame.pc |
35 | @@ -11,4 +11,7 @@ |
36 | ChangeLog: |
37 | bzr log > ChangeLog |
38 | |
39 | +doc-%: |
40 | + $(MAKE) -C doc $@ |
41 | + |
42 | dist-hook: ChangeLog INSTALL |
43 | |
44 | === modified file 'configure.ac' |
45 | --- configure.ac 2011-08-31 13:15:38 +0000 |
46 | +++ configure.ac 2011-11-21 22:46:23 +0000 |
47 | @@ -1,7 +1,7 @@ |
48 | # Initialize Autoconf |
49 | AC_PREREQ([2.60]) |
50 | AC_INIT([Touch Frame Library], |
51 | - [1.2.0], |
52 | + [1.99.1], |
53 | [], |
54 | [utouch-frame]) |
55 | AC_CONFIG_SRCDIR([Makefile.am]) |
56 | @@ -21,6 +21,7 @@ |
57 | |
58 | # Checks for programs. |
59 | AC_PROG_CC |
60 | +AC_PROG_CXX |
61 | AC_PROG_INSTALL |
62 | |
63 | PKG_CHECK_MODULES([MTDEV], [mtdev >= 1.1]) |
64 | @@ -43,8 +44,13 @@ |
65 | [AC_MSG_WARN([asciidoc not installed, man pages will not be created])]) |
66 | |
67 | AC_CONFIG_FILES([Makefile |
68 | + doc/Makefile |
69 | src/Makefile |
70 | test/Makefile |
71 | tools/Makefile |
72 | utouch-frame.pc]) |
73 | + |
74 | +AC_SUBST(AM_CPPFLAGS, "-Wall -Werror") |
75 | +AC_SUBST(AM_CXXFLAGS, "-std=c++0x") |
76 | + |
77 | AC_OUTPUT |
78 | |
79 | === added directory 'doc' |
80 | === added file 'doc/Doxyfile' |
81 | --- doc/Doxyfile 1970-01-01 00:00:00 +0000 |
82 | +++ doc/Doxyfile 2011-11-21 22:46:23 +0000 |
83 | @@ -0,0 +1,1749 @@ |
84 | +# Doxyfile 1.7.4 |
85 | + |
86 | +# This file describes the settings to be used by the documentation system |
87 | +# doxygen (www.doxygen.org) for a project |
88 | +# |
89 | +# All text after a hash (#) is considered a comment and will be ignored |
90 | +# The format is: |
91 | +# TAG = value [value, ...] |
92 | +# For lists items can also be appended using: |
93 | +# TAG += value [value, ...] |
94 | +# Values that contain spaces should be placed between quotes (" ") |
95 | + |
96 | +#--------------------------------------------------------------------------- |
97 | +# Project related configuration options |
98 | +#--------------------------------------------------------------------------- |
99 | + |
100 | +# This tag specifies the encoding used for all characters in the config file |
101 | +# that follow. The default is UTF-8 which is also the encoding used for all |
102 | +# text before the first occurrence of this tag. Doxygen uses libiconv (or the |
103 | +# iconv built into libc) for the transcoding. See |
104 | +# http://www.gnu.org/software/libiconv for the list of possible encodings. |
105 | + |
106 | +DOXYFILE_ENCODING = UTF-8 |
107 | + |
108 | +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded |
109 | +# by quotes) that should identify the project. |
110 | + |
111 | +PROJECT_NAME = uTouch-Frame |
112 | + |
113 | +# The PROJECT_NUMBER tag can be used to enter a project or revision number. |
114 | +# This could be handy for archiving the generated documentation or |
115 | +# if some version control system is used. |
116 | + |
117 | +PROJECT_NUMBER = 2.0 |
118 | + |
119 | +# Using the PROJECT_BRIEF tag one can provide an optional one line description |
120 | +# for a project that appears at the top of each page and should give viewer |
121 | +# a quick idea about the purpose of the project. Keep the description short. |
122 | + |
123 | +PROJECT_BRIEF = "A library to encapsulate touch events" |
124 | + |
125 | +# With the PROJECT_LOGO tag one can specify an logo or icon that is |
126 | +# included in the documentation. The maximum height of the logo should not |
127 | +# exceed 55 pixels and the maximum width should not exceed 200 pixels. |
128 | +# Doxygen will copy the logo to the output directory. |
129 | + |
130 | +PROJECT_LOGO = |
131 | + |
132 | +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) |
133 | +# base path where the generated documentation will be put. |
134 | +# If a relative path is entered, it will be relative to the location |
135 | +# where doxygen was started. If left blank the current directory will be used. |
136 | + |
137 | +OUTPUT_DIRECTORY = api |
138 | + |
139 | +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create |
140 | +# 4096 sub-directories (in 2 levels) under the output directory of each output |
141 | +# format and will distribute the generated files over these directories. |
142 | +# Enabling this option can be useful when feeding doxygen a huge amount of |
143 | +# source files, where putting all generated files in the same directory would |
144 | +# otherwise cause performance problems for the file system. |
145 | + |
146 | +CREATE_SUBDIRS = NO |
147 | + |
148 | +# The OUTPUT_LANGUAGE tag is used to specify the language in which all |
149 | +# documentation generated by doxygen is written. Doxygen will use this |
150 | +# information to generate all constant output in the proper language. |
151 | +# The default language is English, other supported languages are: |
152 | +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, |
153 | +# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, |
154 | +# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English |
155 | +# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, |
156 | +# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, |
157 | +# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. |
158 | + |
159 | +OUTPUT_LANGUAGE = English |
160 | + |
161 | +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will |
162 | +# include brief member descriptions after the members that are listed in |
163 | +# the file and class documentation (similar to JavaDoc). |
164 | +# Set to NO to disable this. |
165 | + |
166 | +BRIEF_MEMBER_DESC = YES |
167 | + |
168 | +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend |
169 | +# the brief description of a member or function before the detailed description. |
170 | +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the |
171 | +# brief descriptions will be completely suppressed. |
172 | + |
173 | +REPEAT_BRIEF = YES |
174 | + |
175 | +# This tag implements a quasi-intelligent brief description abbreviator |
176 | +# that is used to form the text in various listings. Each string |
177 | +# in this list, if found as the leading text of the brief description, will be |
178 | +# stripped from the text and the result after processing the whole list, is |
179 | +# used as the annotated text. Otherwise, the brief description is used as-is. |
180 | +# If left blank, the following values are used ("$name" is automatically |
181 | +# replaced with the name of the entity): "The $name class" "The $name widget" |
182 | +# "The $name file" "is" "provides" "specifies" "contains" |
183 | +# "represents" "a" "an" "the" |
184 | + |
185 | +ABBREVIATE_BRIEF = "The $name class" \ |
186 | + "The $name widget" \ |
187 | + "The $name file" \ |
188 | + is \ |
189 | + provides \ |
190 | + specifies \ |
191 | + contains \ |
192 | + represents \ |
193 | + a \ |
194 | + an \ |
195 | + the |
196 | + |
197 | +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then |
198 | +# Doxygen will generate a detailed section even if there is only a brief |
199 | +# description. |
200 | + |
201 | +ALWAYS_DETAILED_SEC = NO |
202 | + |
203 | +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all |
204 | +# inherited members of a class in the documentation of that class as if those |
205 | +# members were ordinary class members. Constructors, destructors and assignment |
206 | +# operators of the base classes will not be shown. |
207 | + |
208 | +INLINE_INHERITED_MEMB = NO |
209 | + |
210 | +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full |
211 | +# path before files name in the file list and in the header files. If set |
212 | +# to NO the shortest path that makes the file name unique will be used. |
213 | + |
214 | +FULL_PATH_NAMES = NO |
215 | + |
216 | +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag |
217 | +# can be used to strip a user-defined part of the path. Stripping is |
218 | +# only done if one of the specified strings matches the left-hand part of |
219 | +# the path. The tag can be used to show relative paths in the file list. |
220 | +# If left blank the directory from which doxygen is run is used as the |
221 | +# path to strip. |
222 | + |
223 | +STRIP_FROM_PATH = |
224 | + |
225 | +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of |
226 | +# the path mentioned in the documentation of a class, which tells |
227 | +# the reader which header file to include in order to use a class. |
228 | +# If left blank only the name of the header file containing the class |
229 | +# definition is used. Otherwise one should specify the include paths that |
230 | +# are normally passed to the compiler using the -I flag. |
231 | + |
232 | +STRIP_FROM_INC_PATH = |
233 | + |
234 | +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter |
235 | +# (but less readable) file names. This can be useful if your file system |
236 | +# doesn't support long names like on DOS, Mac, or CD-ROM. |
237 | + |
238 | +SHORT_NAMES = NO |
239 | + |
240 | +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen |
241 | +# will interpret the first line (until the first dot) of a JavaDoc-style |
242 | +# comment as the brief description. If set to NO, the JavaDoc |
243 | +# comments will behave just like regular Qt-style comments |
244 | +# (thus requiring an explicit @brief command for a brief description.) |
245 | + |
246 | +JAVADOC_AUTOBRIEF = YES |
247 | + |
248 | +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will |
249 | +# interpret the first line (until the first dot) of a Qt-style |
250 | +# comment as the brief description. If set to NO, the comments |
251 | +# will behave just like regular Qt-style comments (thus requiring |
252 | +# an explicit \brief command for a brief description.) |
253 | + |
254 | +QT_AUTOBRIEF = NO |
255 | + |
256 | +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen |
257 | +# treat a multi-line C++ special comment block (i.e. a block of //! or /// |
258 | +# comments) as a brief description. This used to be the default behaviour. |
259 | +# The new default is to treat a multi-line C++ comment block as a detailed |
260 | +# description. Set this tag to YES if you prefer the old behaviour instead. |
261 | + |
262 | +MULTILINE_CPP_IS_BRIEF = NO |
263 | + |
264 | +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented |
265 | +# member inherits the documentation from any documented member that it |
266 | +# re-implements. |
267 | + |
268 | +INHERIT_DOCS = YES |
269 | + |
270 | +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce |
271 | +# a new page for each member. If set to NO, the documentation of a member will |
272 | +# be part of the file/class/namespace that contains it. |
273 | + |
274 | +SEPARATE_MEMBER_PAGES = NO |
275 | + |
276 | +# The TAB_SIZE tag can be used to set the number of spaces in a tab. |
277 | +# Doxygen uses this value to replace tabs by spaces in code fragments. |
278 | + |
279 | +TAB_SIZE = 8 |
280 | + |
281 | +# This tag can be used to specify a number of aliases that acts |
282 | +# as commands in the documentation. An alias has the form "name=value". |
283 | +# For example adding "sideeffect=\par Side Effects:\n" will allow you to |
284 | +# put the command \sideeffect (or @sideeffect) in the documentation, which |
285 | +# will result in a user-defined paragraph with heading "Side Effects:". |
286 | +# You can put \n's in the value part of an alias to insert newlines. |
287 | + |
288 | +ALIASES = |
289 | + |
290 | +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C |
291 | +# sources only. Doxygen will then generate output that is more tailored for C. |
292 | +# For instance, some of the names that are used will be different. The list |
293 | +# of all members will be omitted, etc. |
294 | + |
295 | +OPTIMIZE_OUTPUT_FOR_C = YES |
296 | + |
297 | +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java |
298 | +# sources only. Doxygen will then generate output that is more tailored for |
299 | +# Java. For instance, namespaces will be presented as packages, qualified |
300 | +# scopes will look different, etc. |
301 | + |
302 | +OPTIMIZE_OUTPUT_JAVA = NO |
303 | + |
304 | +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran |
305 | +# sources only. Doxygen will then generate output that is more tailored for |
306 | +# Fortran. |
307 | + |
308 | +OPTIMIZE_FOR_FORTRAN = NO |
309 | + |
310 | +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL |
311 | +# sources. Doxygen will then generate output that is tailored for |
312 | +# VHDL. |
313 | + |
314 | +OPTIMIZE_OUTPUT_VHDL = NO |
315 | + |
316 | +# Doxygen selects the parser to use depending on the extension of the files it |
317 | +# parses. With this tag you can assign which parser to use for a given extension. |
318 | +# Doxygen has a built-in mapping, but you can override or extend it using this |
319 | +# tag. The format is ext=language, where ext is a file extension, and language |
320 | +# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C, |
321 | +# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make |
322 | +# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C |
323 | +# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions |
324 | +# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. |
325 | + |
326 | +EXTENSION_MAPPING = |
327 | + |
328 | +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want |
329 | +# to include (a tag file for) the STL sources as input, then you should |
330 | +# set this tag to YES in order to let doxygen match functions declarations and |
331 | +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. |
332 | +# func(std::string) {}). This also makes the inheritance and collaboration |
333 | +# diagrams that involve STL classes more complete and accurate. |
334 | + |
335 | +BUILTIN_STL_SUPPORT = NO |
336 | + |
337 | +# If you use Microsoft's C++/CLI language, you should set this option to YES to |
338 | +# enable parsing support. |
339 | + |
340 | +CPP_CLI_SUPPORT = NO |
341 | + |
342 | +# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. |
343 | +# Doxygen will parse them like normal C++ but will assume all classes use public |
344 | +# instead of private inheritance when no explicit protection keyword is present. |
345 | + |
346 | +SIP_SUPPORT = NO |
347 | + |
348 | +# For Microsoft's IDL there are propget and propput attributes to indicate getter |
349 | +# and setter methods for a property. Setting this option to YES (the default) |
350 | +# will make doxygen replace the get and set methods by a property in the |
351 | +# documentation. This will only work if the methods are indeed getting or |
352 | +# setting a simple type. If this is not the case, or you want to show the |
353 | +# methods anyway, you should set this option to NO. |
354 | + |
355 | +IDL_PROPERTY_SUPPORT = YES |
356 | + |
357 | +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC |
358 | +# tag is set to YES, then doxygen will reuse the documentation of the first |
359 | +# member in the group (if any) for the other members of the group. By default |
360 | +# all members of a group must be documented explicitly. |
361 | + |
362 | +DISTRIBUTE_GROUP_DOC = NO |
363 | + |
364 | +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of |
365 | +# the same type (for instance a group of public functions) to be put as a |
366 | +# subgroup of that type (e.g. under the Public Functions section). Set it to |
367 | +# NO to prevent subgrouping. Alternatively, this can be done per class using |
368 | +# the \nosubgrouping command. |
369 | + |
370 | +SUBGROUPING = YES |
371 | + |
372 | +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and |
373 | +# unions are shown inside the group in which they are included (e.g. using |
374 | +# @ingroup) instead of on a separate page (for HTML and Man pages) or |
375 | +# section (for LaTeX and RTF). |
376 | + |
377 | +INLINE_GROUPED_CLASSES = YES |
378 | + |
379 | +# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum |
380 | +# is documented as struct, union, or enum with the name of the typedef. So |
381 | +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct |
382 | +# with name TypeT. When disabled the typedef will appear as a member of a file, |
383 | +# namespace, or class. And the struct will be named TypeS. This can typically |
384 | +# be useful for C code in case the coding convention dictates that all compound |
385 | +# types are typedef'ed and only the typedef is referenced, never the tag name. |
386 | + |
387 | +TYPEDEF_HIDES_STRUCT = YES |
388 | + |
389 | +# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to |
390 | +# determine which symbols to keep in memory and which to flush to disk. |
391 | +# When the cache is full, less often used symbols will be written to disk. |
392 | +# For small to medium size projects (<1000 input files) the default value is |
393 | +# probably good enough. For larger projects a too small cache size can cause |
394 | +# doxygen to be busy swapping symbols to and from disk most of the time |
395 | +# causing a significant performance penalty. |
396 | +# If the system has enough physical memory increasing the cache will improve the |
397 | +# performance by keeping more symbols in memory. Note that the value works on |
398 | +# a logarithmic scale so increasing the size by one will roughly double the |
399 | +# memory usage. The cache size is given by this formula: |
400 | +# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, |
401 | +# corresponding to a cache size of 2^16 = 65536 symbols |
402 | + |
403 | +SYMBOL_CACHE_SIZE = 0 |
404 | + |
405 | +#--------------------------------------------------------------------------- |
406 | +# Build related configuration options |
407 | +#--------------------------------------------------------------------------- |
408 | + |
409 | +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in |
410 | +# documentation are documented, even if no documentation was available. |
411 | +# Private class members and static file members will be hidden unless |
412 | +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES |
413 | + |
414 | +EXTRACT_ALL = YES |
415 | + |
416 | +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class |
417 | +# will be included in the documentation. |
418 | + |
419 | +EXTRACT_PRIVATE = NO |
420 | + |
421 | +# If the EXTRACT_STATIC tag is set to YES all static members of a file |
422 | +# will be included in the documentation. |
423 | + |
424 | +EXTRACT_STATIC = NO |
425 | + |
426 | +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) |
427 | +# defined locally in source files will be included in the documentation. |
428 | +# If set to NO only classes defined in header files are included. |
429 | + |
430 | +EXTRACT_LOCAL_CLASSES = YES |
431 | + |
432 | +# This flag is only useful for Objective-C code. When set to YES local |
433 | +# methods, which are defined in the implementation section but not in |
434 | +# the interface are included in the documentation. |
435 | +# If set to NO (the default) only methods in the interface are included. |
436 | + |
437 | +EXTRACT_LOCAL_METHODS = NO |
438 | + |
439 | +# If this flag is set to YES, the members of anonymous namespaces will be |
440 | +# extracted and appear in the documentation as a namespace called |
441 | +# 'anonymous_namespace{file}', where file will be replaced with the base |
442 | +# name of the file that contains the anonymous namespace. By default |
443 | +# anonymous namespaces are hidden. |
444 | + |
445 | +EXTRACT_ANON_NSPACES = NO |
446 | + |
447 | +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all |
448 | +# undocumented members of documented classes, files or namespaces. |
449 | +# If set to NO (the default) these members will be included in the |
450 | +# various overviews, but no documentation section is generated. |
451 | +# This option has no effect if EXTRACT_ALL is enabled. |
452 | + |
453 | +HIDE_UNDOC_MEMBERS = NO |
454 | + |
455 | +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all |
456 | +# undocumented classes that are normally visible in the class hierarchy. |
457 | +# If set to NO (the default) these classes will be included in the various |
458 | +# overviews. This option has no effect if EXTRACT_ALL is enabled. |
459 | + |
460 | +HIDE_UNDOC_CLASSES = NO |
461 | + |
462 | +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all |
463 | +# friend (class|struct|union) declarations. |
464 | +# If set to NO (the default) these declarations will be included in the |
465 | +# documentation. |
466 | + |
467 | +HIDE_FRIEND_COMPOUNDS = NO |
468 | + |
469 | +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any |
470 | +# documentation blocks found inside the body of a function. |
471 | +# If set to NO (the default) these blocks will be appended to the |
472 | +# function's detailed documentation block. |
473 | + |
474 | +HIDE_IN_BODY_DOCS = NO |
475 | + |
476 | +# The INTERNAL_DOCS tag determines if documentation |
477 | +# that is typed after a \internal command is included. If the tag is set |
478 | +# to NO (the default) then the documentation will be excluded. |
479 | +# Set it to YES to include the internal documentation. |
480 | + |
481 | +INTERNAL_DOCS = NO |
482 | + |
483 | +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate |
484 | +# file names in lower-case letters. If set to YES upper-case letters are also |
485 | +# allowed. This is useful if you have classes or files whose names only differ |
486 | +# in case and if your file system supports case sensitive file names. Windows |
487 | +# and Mac users are advised to set this option to NO. |
488 | + |
489 | +CASE_SENSE_NAMES = NO |
490 | + |
491 | +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen |
492 | +# will show members with their full class and namespace scopes in the |
493 | +# documentation. If set to YES the scope will be hidden. |
494 | + |
495 | +HIDE_SCOPE_NAMES = YES |
496 | + |
497 | +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen |
498 | +# will put a list of the files that are included by a file in the documentation |
499 | +# of that file. |
500 | + |
501 | +SHOW_INCLUDE_FILES = NO |
502 | + |
503 | +# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen |
504 | +# will list include files with double quotes in the documentation |
505 | +# rather than with sharp brackets. |
506 | + |
507 | +FORCE_LOCAL_INCLUDES = NO |
508 | + |
509 | +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] |
510 | +# is inserted in the documentation for inline members. |
511 | + |
512 | +INLINE_INFO = YES |
513 | + |
514 | +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen |
515 | +# will sort the (detailed) documentation of file and class members |
516 | +# alphabetically by member name. If set to NO the members will appear in |
517 | +# declaration order. |
518 | + |
519 | +SORT_MEMBER_DOCS = NO |
520 | + |
521 | +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the |
522 | +# brief documentation of file, namespace and class members alphabetically |
523 | +# by member name. If set to NO (the default) the members will appear in |
524 | +# declaration order. |
525 | + |
526 | +SORT_BRIEF_DOCS = NO |
527 | + |
528 | +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen |
529 | +# will sort the (brief and detailed) documentation of class members so that |
530 | +# constructors and destructors are listed first. If set to NO (the default) |
531 | +# the constructors will appear in the respective orders defined by |
532 | +# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. |
533 | +# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO |
534 | +# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. |
535 | + |
536 | +SORT_MEMBERS_CTORS_1ST = NO |
537 | + |
538 | +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the |
539 | +# hierarchy of group names into alphabetical order. If set to NO (the default) |
540 | +# the group names will appear in their defined order. |
541 | + |
542 | +SORT_GROUP_NAMES = NO |
543 | + |
544 | +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be |
545 | +# sorted by fully-qualified names, including namespaces. If set to |
546 | +# NO (the default), the class list will be sorted only by class name, |
547 | +# not including the namespace part. |
548 | +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. |
549 | +# Note: This option applies only to the class list, not to the |
550 | +# alphabetical list. |
551 | + |
552 | +SORT_BY_SCOPE_NAME = NO |
553 | + |
554 | +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to |
555 | +# do proper type resolution of all parameters of a function it will reject a |
556 | +# match between the prototype and the implementation of a member function even |
557 | +# if there is only one candidate or it is obvious which candidate to choose |
558 | +# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen |
559 | +# will still accept a match between prototype and implementation in such cases. |
560 | + |
561 | +STRICT_PROTO_MATCHING = NO |
562 | + |
563 | +# The GENERATE_TODOLIST tag can be used to enable (YES) or |
564 | +# disable (NO) the todo list. This list is created by putting \todo |
565 | +# commands in the documentation. |
566 | + |
567 | +GENERATE_TODOLIST = YES |
568 | + |
569 | +# The GENERATE_TESTLIST tag can be used to enable (YES) or |
570 | +# disable (NO) the test list. This list is created by putting \test |
571 | +# commands in the documentation. |
572 | + |
573 | +GENERATE_TESTLIST = YES |
574 | + |
575 | +# The GENERATE_BUGLIST tag can be used to enable (YES) or |
576 | +# disable (NO) the bug list. This list is created by putting \bug |
577 | +# commands in the documentation. |
578 | + |
579 | +GENERATE_BUGLIST = YES |
580 | + |
581 | +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or |
582 | +# disable (NO) the deprecated list. This list is created by putting |
583 | +# \deprecated commands in the documentation. |
584 | + |
585 | +GENERATE_DEPRECATEDLIST= YES |
586 | + |
587 | +# The ENABLED_SECTIONS tag can be used to enable conditional |
588 | +# documentation sections, marked by \if sectionname ... \endif. |
589 | + |
590 | +ENABLED_SECTIONS = |
591 | + |
592 | +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines |
593 | +# the initial value of a variable or macro consists of for it to appear in |
594 | +# the documentation. If the initializer consists of more lines than specified |
595 | +# here it will be hidden. Use a value of 0 to hide initializers completely. |
596 | +# The appearance of the initializer of individual variables and macros in the |
597 | +# documentation can be controlled using \showinitializer or \hideinitializer |
598 | +# command in the documentation regardless of this setting. |
599 | + |
600 | +MAX_INITIALIZER_LINES = 30 |
601 | + |
602 | +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated |
603 | +# at the bottom of the documentation of classes and structs. If set to YES the |
604 | +# list will mention the files that were used to generate the documentation. |
605 | + |
606 | +SHOW_USED_FILES = YES |
607 | + |
608 | +# If the sources in your project are distributed over multiple directories |
609 | +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy |
610 | +# in the documentation. The default is NO. |
611 | + |
612 | +SHOW_DIRECTORIES = NO |
613 | + |
614 | +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. |
615 | +# This will remove the Files entry from the Quick Index and from the |
616 | +# Folder Tree View (if specified). The default is YES. |
617 | + |
618 | +SHOW_FILES = NO |
619 | + |
620 | +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the |
621 | +# Namespaces page. This will remove the Namespaces entry from the Quick Index |
622 | +# and from the Folder Tree View (if specified). The default is YES. |
623 | + |
624 | +SHOW_NAMESPACES = NO |
625 | + |
626 | +# The FILE_VERSION_FILTER tag can be used to specify a program or script that |
627 | +# doxygen should invoke to get the current version for each file (typically from |
628 | +# the version control system). Doxygen will invoke the program by executing (via |
629 | +# popen()) the command <command> <input-file>, where <command> is the value of |
630 | +# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file |
631 | +# provided by doxygen. Whatever the program writes to standard output |
632 | +# is used as the file version. See the manual for examples. |
633 | + |
634 | +FILE_VERSION_FILTER = |
635 | + |
636 | +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed |
637 | +# by doxygen. The layout file controls the global structure of the generated |
638 | +# output files in an output format independent way. The create the layout file |
639 | +# that represents doxygen's defaults, run doxygen with the -l option. |
640 | +# You can optionally specify a file name after the option, if omitted |
641 | +# DoxygenLayout.xml will be used as the name of the layout file. |
642 | + |
643 | +LAYOUT_FILE = |
644 | + |
645 | +#--------------------------------------------------------------------------- |
646 | +# configuration options related to warning and progress messages |
647 | +#--------------------------------------------------------------------------- |
648 | + |
649 | +# The QUIET tag can be used to turn on/off the messages that are generated |
650 | +# by doxygen. Possible values are YES and NO. If left blank NO is used. |
651 | + |
652 | +QUIET = NO |
653 | + |
654 | +# The WARNINGS tag can be used to turn on/off the warning messages that are |
655 | +# generated by doxygen. Possible values are YES and NO. If left blank |
656 | +# NO is used. |
657 | + |
658 | +WARNINGS = YES |
659 | + |
660 | +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings |
661 | +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will |
662 | +# automatically be disabled. |
663 | + |
664 | +WARN_IF_UNDOCUMENTED = YES |
665 | + |
666 | +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for |
667 | +# potential errors in the documentation, such as not documenting some |
668 | +# parameters in a documented function, or documenting parameters that |
669 | +# don't exist or using markup commands wrongly. |
670 | + |
671 | +WARN_IF_DOC_ERROR = YES |
672 | + |
673 | +# The WARN_NO_PARAMDOC option can be enabled to get warnings for |
674 | +# functions that are documented, but have no documentation for their parameters |
675 | +# or return value. If set to NO (the default) doxygen will only warn about |
676 | +# wrong or incomplete parameter documentation, but not about the absence of |
677 | +# documentation. |
678 | + |
679 | +WARN_NO_PARAMDOC = NO |
680 | + |
681 | +# The WARN_FORMAT tag determines the format of the warning messages that |
682 | +# doxygen can produce. The string should contain the $file, $line, and $text |
683 | +# tags, which will be replaced by the file and line number from which the |
684 | +# warning originated and the warning text. Optionally the format may contain |
685 | +# $version, which will be replaced by the version of the file (if it could |
686 | +# be obtained via FILE_VERSION_FILTER) |
687 | + |
688 | +WARN_FORMAT = "$file:$line: $text" |
689 | + |
690 | +# The WARN_LOGFILE tag can be used to specify a file to which warning |
691 | +# and error messages should be written. If left blank the output is written |
692 | +# to stderr. |
693 | + |
694 | +WARN_LOGFILE = |
695 | + |
696 | +#--------------------------------------------------------------------------- |
697 | +# configuration options related to the input files |
698 | +#--------------------------------------------------------------------------- |
699 | + |
700 | +# The INPUT tag can be used to specify the files and/or directories that contain |
701 | +# documented source files. You may enter file names like "myfile.cpp" or |
702 | +# directories like "/usr/src/myproject". Separate the files or directories |
703 | +# with spaces. |
704 | + |
705 | +INPUT = ../include/utouch |
706 | + |
707 | +# This tag can be used to specify the character encoding of the source files |
708 | +# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is |
709 | +# also the default input encoding. Doxygen uses libiconv (or the iconv built |
710 | +# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for |
711 | +# the list of possible encodings. |
712 | + |
713 | +INPUT_ENCODING = UTF-8 |
714 | + |
715 | +# If the value of the INPUT tag contains directories, you can use the |
716 | +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp |
717 | +# and *.h) to filter out the source-files in the directories. If left |
718 | +# blank the following patterns are tested: |
719 | +# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh |
720 | +# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py |
721 | +# *.f90 *.f *.for *.vhd *.vhdl |
722 | + |
723 | +FILE_PATTERNS = *.c \ |
724 | + *.cc \ |
725 | + *.cxx \ |
726 | + *.cpp \ |
727 | + *.c++ \ |
728 | + *.d \ |
729 | + *.java \ |
730 | + *.ii \ |
731 | + *.ixx \ |
732 | + *.ipp \ |
733 | + *.i++ \ |
734 | + *.inl \ |
735 | + *.h \ |
736 | + *.hh \ |
737 | + *.hxx \ |
738 | + *.hpp \ |
739 | + *.h++ \ |
740 | + *.idl \ |
741 | + *.odl \ |
742 | + *.cs \ |
743 | + *.php \ |
744 | + *.php3 \ |
745 | + *.inc \ |
746 | + *.m \ |
747 | + *.mm \ |
748 | + *.dox \ |
749 | + *.py \ |
750 | + *.f90 \ |
751 | + *.f \ |
752 | + *.for \ |
753 | + *.vhd \ |
754 | + *.vhdl |
755 | + |
756 | +# The RECURSIVE tag can be used to turn specify whether or not subdirectories |
757 | +# should be searched for input files as well. Possible values are YES and NO. |
758 | +# If left blank NO is used. |
759 | + |
760 | +RECURSIVE = NO |
761 | + |
762 | +# The EXCLUDE tag can be used to specify files and/or directories that should |
763 | +# excluded from the INPUT source files. This way you can easily exclude a |
764 | +# subdirectory from a directory tree whose root is specified with the INPUT tag. |
765 | + |
766 | +EXCLUDE = |
767 | + |
768 | +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or |
769 | +# directories that are symbolic links (a Unix file system feature) are excluded |
770 | +# from the input. |
771 | + |
772 | +EXCLUDE_SYMLINKS = NO |
773 | + |
774 | +# If the value of the INPUT tag contains directories, you can use the |
775 | +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude |
776 | +# certain files from those directories. Note that the wildcards are matched |
777 | +# against the file with absolute path, so to exclude all test directories |
778 | +# for example use the pattern */test/* |
779 | + |
780 | +EXCLUDE_PATTERNS = |
781 | + |
782 | +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names |
783 | +# (namespaces, classes, functions, etc.) that should be excluded from the |
784 | +# output. The symbol name can be a fully qualified name, a word, or if the |
785 | +# wildcard * is used, a substring. Examples: ANamespace, AClass, |
786 | +# AClass::ANamespace, ANamespace::*Test |
787 | + |
788 | +EXCLUDE_SYMBOLS = |
789 | + |
790 | +# The EXAMPLE_PATH tag can be used to specify one or more files or |
791 | +# directories that contain example code fragments that are included (see |
792 | +# the \include command). |
793 | + |
794 | +EXAMPLE_PATH = |
795 | + |
796 | +# If the value of the EXAMPLE_PATH tag contains directories, you can use the |
797 | +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp |
798 | +# and *.h) to filter out the source-files in the directories. If left |
799 | +# blank all files are included. |
800 | + |
801 | +EXAMPLE_PATTERNS = * |
802 | + |
803 | +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be |
804 | +# searched for input files to be used with the \include or \dontinclude |
805 | +# commands irrespective of the value of the RECURSIVE tag. |
806 | +# Possible values are YES and NO. If left blank NO is used. |
807 | + |
808 | +EXAMPLE_RECURSIVE = NO |
809 | + |
810 | +# The IMAGE_PATH tag can be used to specify one or more files or |
811 | +# directories that contain image that are included in the documentation (see |
812 | +# the \image command). |
813 | + |
814 | +IMAGE_PATH = |
815 | + |
816 | +# The INPUT_FILTER tag can be used to specify a program that doxygen should |
817 | +# invoke to filter for each input file. Doxygen will invoke the filter program |
818 | +# by executing (via popen()) the command <filter> <input-file>, where <filter> |
819 | +# is the value of the INPUT_FILTER tag, and <input-file> is the name of an |
820 | +# input file. Doxygen will then use the output that the filter program writes |
821 | +# to standard output. If FILTER_PATTERNS is specified, this tag will be |
822 | +# ignored. |
823 | + |
824 | +INPUT_FILTER = |
825 | + |
826 | +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern |
827 | +# basis. Doxygen will compare the file name with each pattern and apply the |
828 | +# filter if there is a match. The filters are a list of the form: |
829 | +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further |
830 | +# info on how filters are used. If FILTER_PATTERNS is empty or if |
831 | +# non of the patterns match the file name, INPUT_FILTER is applied. |
832 | + |
833 | +FILTER_PATTERNS = |
834 | + |
835 | +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using |
836 | +# INPUT_FILTER) will be used to filter the input files when producing source |
837 | +# files to browse (i.e. when SOURCE_BROWSER is set to YES). |
838 | + |
839 | +FILTER_SOURCE_FILES = NO |
840 | + |
841 | +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file |
842 | +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) |
843 | +# and it is also possible to disable source filtering for a specific pattern |
844 | +# using *.ext= (so without naming a filter). This option only has effect when |
845 | +# FILTER_SOURCE_FILES is enabled. |
846 | + |
847 | +FILTER_SOURCE_PATTERNS = |
848 | + |
849 | +#--------------------------------------------------------------------------- |
850 | +# configuration options related to source browsing |
851 | +#--------------------------------------------------------------------------- |
852 | + |
853 | +# If the SOURCE_BROWSER tag is set to YES then a list of source files will |
854 | +# be generated. Documented entities will be cross-referenced with these sources. |
855 | +# Note: To get rid of all source code in the generated output, make sure also |
856 | +# VERBATIM_HEADERS is set to NO. |
857 | + |
858 | +SOURCE_BROWSER = NO |
859 | + |
860 | +# Setting the INLINE_SOURCES tag to YES will include the body |
861 | +# of functions and classes directly in the documentation. |
862 | + |
863 | +INLINE_SOURCES = NO |
864 | + |
865 | +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct |
866 | +# doxygen to hide any special comment blocks from generated source code |
867 | +# fragments. Normal C and C++ comments will always remain visible. |
868 | + |
869 | +STRIP_CODE_COMMENTS = YES |
870 | + |
871 | +# If the REFERENCED_BY_RELATION tag is set to YES |
872 | +# then for each documented function all documented |
873 | +# functions referencing it will be listed. |
874 | + |
875 | +REFERENCED_BY_RELATION = NO |
876 | + |
877 | +# If the REFERENCES_RELATION tag is set to YES |
878 | +# then for each documented function all documented entities |
879 | +# called/used by that function will be listed. |
880 | + |
881 | +REFERENCES_RELATION = NO |
882 | + |
883 | +# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) |
884 | +# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from |
885 | +# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will |
886 | +# link to the source code. Otherwise they will link to the documentation. |
887 | + |
888 | +REFERENCES_LINK_SOURCE = YES |
889 | + |
890 | +# If the USE_HTAGS tag is set to YES then the references to source code |
891 | +# will point to the HTML generated by the htags(1) tool instead of doxygen |
892 | +# built-in source browser. The htags tool is part of GNU's global source |
893 | +# tagging system (see http://www.gnu.org/software/global/global.html). You |
894 | +# will need version 4.8.6 or higher. |
895 | + |
896 | +USE_HTAGS = NO |
897 | + |
898 | +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen |
899 | +# will generate a verbatim copy of the header file for each class for |
900 | +# which an include is specified. Set to NO to disable this. |
901 | + |
902 | +VERBATIM_HEADERS = NO |
903 | + |
904 | +#--------------------------------------------------------------------------- |
905 | +# configuration options related to the alphabetical class index |
906 | +#--------------------------------------------------------------------------- |
907 | + |
908 | +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index |
909 | +# of all compounds will be generated. Enable this if the project |
910 | +# contains a lot of classes, structs, unions or interfaces. |
911 | + |
912 | +ALPHABETICAL_INDEX = NO |
913 | + |
914 | +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then |
915 | +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns |
916 | +# in which this list will be split (can be a number in the range [1..20]) |
917 | + |
918 | +COLS_IN_ALPHA_INDEX = 5 |
919 | + |
920 | +# In case all classes in a project start with a common prefix, all |
921 | +# classes will be put under the same header in the alphabetical index. |
922 | +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that |
923 | +# should be ignored while generating the index headers. |
924 | + |
925 | +IGNORE_PREFIX = |
926 | + |
927 | +#--------------------------------------------------------------------------- |
928 | +# configuration options related to the HTML output |
929 | +#--------------------------------------------------------------------------- |
930 | + |
931 | +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will |
932 | +# generate HTML output. |
933 | + |
934 | +GENERATE_HTML = YES |
935 | + |
936 | +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. |
937 | +# If a relative path is entered the value of OUTPUT_DIRECTORY will be |
938 | +# put in front of it. If left blank `html' will be used as the default path. |
939 | + |
940 | +HTML_OUTPUT = html |
941 | + |
942 | +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for |
943 | +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank |
944 | +# doxygen will generate files with .html extension. |
945 | + |
946 | +HTML_FILE_EXTENSION = .html |
947 | + |
948 | +# The HTML_HEADER tag can be used to specify a personal HTML header for |
949 | +# each generated HTML page. If it is left blank doxygen will generate a |
950 | +# standard header. Note that when using a custom header you are responsible |
951 | +# for the proper inclusion of any scripts and style sheets that doxygen |
952 | +# needs, which is dependent on the configuration options used. |
953 | +# It is adviced to generate a default header using "doxygen -w html |
954 | +# header.html footer.html stylesheet.css YourConfigFile" and then modify |
955 | +# that header. Note that the header is subject to change so you typically |
956 | +# have to redo this when upgrading to a newer version of doxygen or when |
957 | +# changing the value of configuration settings such as GENERATE_TREEVIEW! |
958 | + |
959 | +HTML_HEADER = |
960 | + |
961 | +# The HTML_FOOTER tag can be used to specify a personal HTML footer for |
962 | +# each generated HTML page. If it is left blank doxygen will generate a |
963 | +# standard footer. |
964 | + |
965 | +HTML_FOOTER = |
966 | + |
967 | +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading |
968 | +# style sheet that is used by each HTML page. It can be used to |
969 | +# fine-tune the look of the HTML output. If the tag is left blank doxygen |
970 | +# will generate a default style sheet. Note that doxygen will try to copy |
971 | +# the style sheet file to the HTML output directory, so don't put your own |
972 | +# stylesheet in the HTML output directory as well, or it will be erased! |
973 | + |
974 | +HTML_STYLESHEET = |
975 | + |
976 | +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or |
977 | +# other source files which should be copied to the HTML output directory. Note |
978 | +# that these files will be copied to the base HTML output directory. Use the |
979 | +# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these |
980 | +# files. In the HTML_STYLESHEET file, use the file name only. Also note that |
981 | +# the files will be copied as-is; there are no commands or markers available. |
982 | + |
983 | +HTML_EXTRA_FILES = |
984 | + |
985 | +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. |
986 | +# Doxygen will adjust the colors in the stylesheet and background images |
987 | +# according to this color. Hue is specified as an angle on a colorwheel, |
988 | +# see http://en.wikipedia.org/wiki/Hue for more information. |
989 | +# For instance the value 0 represents red, 60 is yellow, 120 is green, |
990 | +# 180 is cyan, 240 is blue, 300 purple, and 360 is red again. |
991 | +# The allowed range is 0 to 359. |
992 | + |
993 | +HTML_COLORSTYLE_HUE = 220 |
994 | + |
995 | +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of |
996 | +# the colors in the HTML output. For a value of 0 the output will use |
997 | +# grayscales only. A value of 255 will produce the most vivid colors. |
998 | + |
999 | +HTML_COLORSTYLE_SAT = 100 |
1000 | + |
1001 | +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to |
1002 | +# the luminance component of the colors in the HTML output. Values below |
1003 | +# 100 gradually make the output lighter, whereas values above 100 make |
1004 | +# the output darker. The value divided by 100 is the actual gamma applied, |
1005 | +# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, |
1006 | +# and 100 does not change the gamma. |
1007 | + |
1008 | +HTML_COLORSTYLE_GAMMA = 80 |
1009 | + |
1010 | +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML |
1011 | +# page will contain the date and time when the page was generated. Setting |
1012 | +# this to NO can help when comparing the output of multiple runs. |
1013 | + |
1014 | +HTML_TIMESTAMP = YES |
1015 | + |
1016 | +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, |
1017 | +# files or namespaces will be aligned in HTML using tables. If set to |
1018 | +# NO a bullet list will be used. |
1019 | + |
1020 | +HTML_ALIGN_MEMBERS = YES |
1021 | + |
1022 | +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML |
1023 | +# documentation will contain sections that can be hidden and shown after the |
1024 | +# page has loaded. For this to work a browser that supports |
1025 | +# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox |
1026 | +# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). |
1027 | + |
1028 | +HTML_DYNAMIC_SECTIONS = NO |
1029 | + |
1030 | +# If the GENERATE_DOCSET tag is set to YES, additional index files |
1031 | +# will be generated that can be used as input for Apple's Xcode 3 |
1032 | +# integrated development environment, introduced with OSX 10.5 (Leopard). |
1033 | +# To create a documentation set, doxygen will generate a Makefile in the |
1034 | +# HTML output directory. Running make will produce the docset in that |
1035 | +# directory and running "make install" will install the docset in |
1036 | +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find |
1037 | +# it at startup. |
1038 | +# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html |
1039 | +# for more information. |
1040 | + |
1041 | +GENERATE_DOCSET = NO |
1042 | + |
1043 | +# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the |
1044 | +# feed. A documentation feed provides an umbrella under which multiple |
1045 | +# documentation sets from a single provider (such as a company or product suite) |
1046 | +# can be grouped. |
1047 | + |
1048 | +DOCSET_FEEDNAME = "Doxygen generated docs" |
1049 | + |
1050 | +# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that |
1051 | +# should uniquely identify the documentation set bundle. This should be a |
1052 | +# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen |
1053 | +# will append .docset to the name. |
1054 | + |
1055 | +DOCSET_BUNDLE_ID = org.doxygen.Project |
1056 | + |
1057 | +# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify |
1058 | +# the documentation publisher. This should be a reverse domain-name style |
1059 | +# string, e.g. com.mycompany.MyDocSet.documentation. |
1060 | + |
1061 | +DOCSET_PUBLISHER_ID = org.doxygen.Publisher |
1062 | + |
1063 | +# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. |
1064 | + |
1065 | +DOCSET_PUBLISHER_NAME = Publisher |
1066 | + |
1067 | +# If the GENERATE_HTMLHELP tag is set to YES, additional index files |
1068 | +# will be generated that can be used as input for tools like the |
1069 | +# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) |
1070 | +# of the generated HTML documentation. |
1071 | + |
1072 | +GENERATE_HTMLHELP = NO |
1073 | + |
1074 | +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can |
1075 | +# be used to specify the file name of the resulting .chm file. You |
1076 | +# can add a path in front of the file if the result should not be |
1077 | +# written to the html output directory. |
1078 | + |
1079 | +CHM_FILE = |
1080 | + |
1081 | +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can |
1082 | +# be used to specify the location (absolute path including file name) of |
1083 | +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run |
1084 | +# the HTML help compiler on the generated index.hhp. |
1085 | + |
1086 | +HHC_LOCATION = |
1087 | + |
1088 | +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag |
1089 | +# controls if a separate .chi index file is generated (YES) or that |
1090 | +# it should be included in the master .chm file (NO). |
1091 | + |
1092 | +GENERATE_CHI = NO |
1093 | + |
1094 | +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING |
1095 | +# is used to encode HtmlHelp index (hhk), content (hhc) and project file |
1096 | +# content. |
1097 | + |
1098 | +CHM_INDEX_ENCODING = |
1099 | + |
1100 | +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag |
1101 | +# controls whether a binary table of contents is generated (YES) or a |
1102 | +# normal table of contents (NO) in the .chm file. |
1103 | + |
1104 | +BINARY_TOC = NO |
1105 | + |
1106 | +# The TOC_EXPAND flag can be set to YES to add extra items for group members |
1107 | +# to the contents of the HTML help documentation and to the tree view. |
1108 | + |
1109 | +TOC_EXPAND = NO |
1110 | + |
1111 | +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and |
1112 | +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated |
1113 | +# that can be used as input for Qt's qhelpgenerator to generate a |
1114 | +# Qt Compressed Help (.qch) of the generated HTML documentation. |
1115 | + |
1116 | +GENERATE_QHP = NO |
1117 | + |
1118 | +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can |
1119 | +# be used to specify the file name of the resulting .qch file. |
1120 | +# The path specified is relative to the HTML output folder. |
1121 | + |
1122 | +QCH_FILE = |
1123 | + |
1124 | +# The QHP_NAMESPACE tag specifies the namespace to use when generating |
1125 | +# Qt Help Project output. For more information please see |
1126 | +# http://doc.trolltech.com/qthelpproject.html#namespace |
1127 | + |
1128 | +QHP_NAMESPACE = org.doxygen.Project |
1129 | + |
1130 | +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating |
1131 | +# Qt Help Project output. For more information please see |
1132 | +# http://doc.trolltech.com/qthelpproject.html#virtual-folders |
1133 | + |
1134 | +QHP_VIRTUAL_FOLDER = doc |
1135 | + |
1136 | +# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to |
1137 | +# add. For more information please see |
1138 | +# http://doc.trolltech.com/qthelpproject.html#custom-filters |
1139 | + |
1140 | +QHP_CUST_FILTER_NAME = |
1141 | + |
1142 | +# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the |
1143 | +# custom filter to add. For more information please see |
1144 | +# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters"> |
1145 | +# Qt Help Project / Custom Filters</a>. |
1146 | + |
1147 | +QHP_CUST_FILTER_ATTRS = |
1148 | + |
1149 | +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this |
1150 | +# project's |
1151 | +# filter section matches. |
1152 | +# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes"> |
1153 | +# Qt Help Project / Filter Attributes</a>. |
1154 | + |
1155 | +QHP_SECT_FILTER_ATTRS = |
1156 | + |
1157 | +# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can |
1158 | +# be used to specify the location of Qt's qhelpgenerator. |
1159 | +# If non-empty doxygen will try to run qhelpgenerator on the generated |
1160 | +# .qhp file. |
1161 | + |
1162 | +QHG_LOCATION = |
1163 | + |
1164 | +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files |
1165 | +# will be generated, which together with the HTML files, form an Eclipse help |
1166 | +# plugin. To install this plugin and make it available under the help contents |
1167 | +# menu in Eclipse, the contents of the directory containing the HTML and XML |
1168 | +# files needs to be copied into the plugins directory of eclipse. The name of |
1169 | +# the directory within the plugins directory should be the same as |
1170 | +# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before |
1171 | +# the help appears. |
1172 | + |
1173 | +GENERATE_ECLIPSEHELP = NO |
1174 | + |
1175 | +# A unique identifier for the eclipse help plugin. When installing the plugin |
1176 | +# the directory name containing the HTML and XML files should also have |
1177 | +# this name. |
1178 | + |
1179 | +ECLIPSE_DOC_ID = org.doxygen.Project |
1180 | + |
1181 | +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at |
1182 | +# top of each HTML page. The value NO (the default) enables the index and |
1183 | +# the value YES disables it. |
1184 | + |
1185 | +DISABLE_INDEX = NO |
1186 | + |
1187 | +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values |
1188 | +# (range [0,1..20]) that doxygen will group on one line in the generated HTML |
1189 | +# documentation. Note that a value of 0 will completely suppress the enum |
1190 | +# values from appearing in the overview section. |
1191 | + |
1192 | +ENUM_VALUES_PER_LINE = 1 |
1193 | + |
1194 | +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index |
1195 | +# structure should be generated to display hierarchical information. |
1196 | +# If the tag value is set to YES, a side panel will be generated |
1197 | +# containing a tree-like index structure (just like the one that |
1198 | +# is generated for HTML Help). For this to work a browser that supports |
1199 | +# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). |
1200 | +# Windows users are probably better off using the HTML help feature. |
1201 | + |
1202 | +GENERATE_TREEVIEW = YES |
1203 | + |
1204 | +# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, |
1205 | +# and Class Hierarchy pages using a tree view instead of an ordered list. |
1206 | + |
1207 | +USE_INLINE_TREES = YES |
1208 | + |
1209 | +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be |
1210 | +# used to set the initial width (in pixels) of the frame in which the tree |
1211 | +# is shown. |
1212 | + |
1213 | +TREEVIEW_WIDTH = 250 |
1214 | + |
1215 | +# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open |
1216 | +# links to external symbols imported via tag files in a separate window. |
1217 | + |
1218 | +EXT_LINKS_IN_WINDOW = NO |
1219 | + |
1220 | +# Use this tag to change the font size of Latex formulas included |
1221 | +# as images in the HTML documentation. The default is 10. Note that |
1222 | +# when you change the font size after a successful doxygen run you need |
1223 | +# to manually remove any form_*.png images from the HTML output directory |
1224 | +# to force them to be regenerated. |
1225 | + |
1226 | +FORMULA_FONTSIZE = 10 |
1227 | + |
1228 | +# Use the FORMULA_TRANPARENT tag to determine whether or not the images |
1229 | +# generated for formulas are transparent PNGs. Transparent PNGs are |
1230 | +# not supported properly for IE 6.0, but are supported on all modern browsers. |
1231 | +# Note that when changing this option you need to delete any form_*.png files |
1232 | +# in the HTML output before the changes have effect. |
1233 | + |
1234 | +FORMULA_TRANSPARENT = YES |
1235 | + |
1236 | +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax |
1237 | +# (see http://www.mathjax.org) which uses client side Javascript for the |
1238 | +# rendering instead of using prerendered bitmaps. Use this if you do not |
1239 | +# have LaTeX installed or if you want to formulas look prettier in the HTML |
1240 | +# output. When enabled you also need to install MathJax separately and |
1241 | +# configure the path to it using the MATHJAX_RELPATH option. |
1242 | + |
1243 | +USE_MATHJAX = NO |
1244 | + |
1245 | +# When MathJax is enabled you need to specify the location relative to the |
1246 | +# HTML output directory using the MATHJAX_RELPATH option. The destination |
1247 | +# directory should contain the MathJax.js script. For instance, if the mathjax |
1248 | +# directory is located at the same level as the HTML output directory, then |
1249 | +# MATHJAX_RELPATH should be ../mathjax. The default value points to the |
1250 | +# mathjax.org site, so you can quickly see the result without installing |
1251 | +# MathJax, but it is strongly recommended to install a local copy of MathJax |
1252 | +# before deployment. |
1253 | + |
1254 | +MATHJAX_RELPATH = http://www.mathjax.org/mathjax |
1255 | + |
1256 | +# When the SEARCHENGINE tag is enabled doxygen will generate a search box |
1257 | +# for the HTML output. The underlying search engine uses javascript |
1258 | +# and DHTML and should work on any modern browser. Note that when using |
1259 | +# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets |
1260 | +# (GENERATE_DOCSET) there is already a search function so this one should |
1261 | +# typically be disabled. For large projects the javascript based search engine |
1262 | +# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. |
1263 | + |
1264 | +SEARCHENGINE = NO |
1265 | + |
1266 | +# When the SERVER_BASED_SEARCH tag is enabled the search engine will be |
1267 | +# implemented using a PHP enabled web server instead of at the web client |
1268 | +# using Javascript. Doxygen will generate the search PHP script and index |
1269 | +# file to put on the web server. The advantage of the server |
1270 | +# based approach is that it scales better to large projects and allows |
1271 | +# full text search. The disadvantages are that it is more difficult to setup |
1272 | +# and does not have live searching capabilities. |
1273 | + |
1274 | +SERVER_BASED_SEARCH = NO |
1275 | + |
1276 | +#--------------------------------------------------------------------------- |
1277 | +# configuration options related to the LaTeX output |
1278 | +#--------------------------------------------------------------------------- |
1279 | + |
1280 | +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will |
1281 | +# generate Latex output. |
1282 | + |
1283 | +GENERATE_LATEX = NO |
1284 | + |
1285 | +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. |
1286 | +# If a relative path is entered the value of OUTPUT_DIRECTORY will be |
1287 | +# put in front of it. If left blank `latex' will be used as the default path. |
1288 | + |
1289 | +LATEX_OUTPUT = latex |
1290 | + |
1291 | +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be |
1292 | +# invoked. If left blank `latex' will be used as the default command name. |
1293 | +# Note that when enabling USE_PDFLATEX this option is only used for |
1294 | +# generating bitmaps for formulas in the HTML output, but not in the |
1295 | +# Makefile that is written to the output directory. |
1296 | + |
1297 | +LATEX_CMD_NAME = latex |
1298 | + |
1299 | +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to |
1300 | +# generate index for LaTeX. If left blank `makeindex' will be used as the |
1301 | +# default command name. |
1302 | + |
1303 | +MAKEINDEX_CMD_NAME = makeindex |
1304 | + |
1305 | +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact |
1306 | +# LaTeX documents. This may be useful for small projects and may help to |
1307 | +# save some trees in general. |
1308 | + |
1309 | +COMPACT_LATEX = NO |
1310 | + |
1311 | +# The PAPER_TYPE tag can be used to set the paper type that is used |
1312 | +# by the printer. Possible values are: a4, letter, legal and |
1313 | +# executive. If left blank a4wide will be used. |
1314 | + |
1315 | +PAPER_TYPE = a4 |
1316 | + |
1317 | +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX |
1318 | +# packages that should be included in the LaTeX output. |
1319 | + |
1320 | +EXTRA_PACKAGES = |
1321 | + |
1322 | +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for |
1323 | +# the generated latex document. The header should contain everything until |
1324 | +# the first chapter. If it is left blank doxygen will generate a |
1325 | +# standard header. Notice: only use this tag if you know what you are doing! |
1326 | + |
1327 | +LATEX_HEADER = |
1328 | + |
1329 | +# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for |
1330 | +# the generated latex document. The footer should contain everything after |
1331 | +# the last chapter. If it is left blank doxygen will generate a |
1332 | +# standard footer. Notice: only use this tag if you know what you are doing! |
1333 | + |
1334 | +LATEX_FOOTER = |
1335 | + |
1336 | +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated |
1337 | +# is prepared for conversion to pdf (using ps2pdf). The pdf file will |
1338 | +# contain links (just like the HTML output) instead of page references |
1339 | +# This makes the output suitable for online browsing using a pdf viewer. |
1340 | + |
1341 | +PDF_HYPERLINKS = YES |
1342 | + |
1343 | +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of |
1344 | +# plain latex in the generated Makefile. Set this option to YES to get a |
1345 | +# higher quality PDF documentation. |
1346 | + |
1347 | +USE_PDFLATEX = YES |
1348 | + |
1349 | +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. |
1350 | +# command to the generated LaTeX files. This will instruct LaTeX to keep |
1351 | +# running if errors occur, instead of asking the user for help. |
1352 | +# This option is also used when generating formulas in HTML. |
1353 | + |
1354 | +LATEX_BATCHMODE = NO |
1355 | + |
1356 | +# If LATEX_HIDE_INDICES is set to YES then doxygen will not |
1357 | +# include the index chapters (such as File Index, Compound Index, etc.) |
1358 | +# in the output. |
1359 | + |
1360 | +LATEX_HIDE_INDICES = NO |
1361 | + |
1362 | +# If LATEX_SOURCE_CODE is set to YES then doxygen will include |
1363 | +# source code with syntax highlighting in the LaTeX output. |
1364 | +# Note that which sources are shown also depends on other settings |
1365 | +# such as SOURCE_BROWSER. |
1366 | + |
1367 | +LATEX_SOURCE_CODE = NO |
1368 | + |
1369 | +#--------------------------------------------------------------------------- |
1370 | +# configuration options related to the RTF output |
1371 | +#--------------------------------------------------------------------------- |
1372 | + |
1373 | +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output |
1374 | +# The RTF output is optimized for Word 97 and may not look very pretty with |
1375 | +# other RTF readers or editors. |
1376 | + |
1377 | +GENERATE_RTF = NO |
1378 | + |
1379 | +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. |
1380 | +# If a relative path is entered the value of OUTPUT_DIRECTORY will be |
1381 | +# put in front of it. If left blank `rtf' will be used as the default path. |
1382 | + |
1383 | +RTF_OUTPUT = rtf |
1384 | + |
1385 | +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact |
1386 | +# RTF documents. This may be useful for small projects and may help to |
1387 | +# save some trees in general. |
1388 | + |
1389 | +COMPACT_RTF = NO |
1390 | + |
1391 | +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated |
1392 | +# will contain hyperlink fields. The RTF file will |
1393 | +# contain links (just like the HTML output) instead of page references. |
1394 | +# This makes the output suitable for online browsing using WORD or other |
1395 | +# programs which support those fields. |
1396 | +# Note: wordpad (write) and others do not support links. |
1397 | + |
1398 | +RTF_HYPERLINKS = NO |
1399 | + |
1400 | +# Load stylesheet definitions from file. Syntax is similar to doxygen's |
1401 | +# config file, i.e. a series of assignments. You only have to provide |
1402 | +# replacements, missing definitions are set to their default value. |
1403 | + |
1404 | +RTF_STYLESHEET_FILE = |
1405 | + |
1406 | +# Set optional variables used in the generation of an rtf document. |
1407 | +# Syntax is similar to doxygen's config file. |
1408 | + |
1409 | +RTF_EXTENSIONS_FILE = |
1410 | + |
1411 | +#--------------------------------------------------------------------------- |
1412 | +# configuration options related to the man page output |
1413 | +#--------------------------------------------------------------------------- |
1414 | + |
1415 | +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will |
1416 | +# generate man pages |
1417 | + |
1418 | +GENERATE_MAN = YES |
1419 | + |
1420 | +# The MAN_OUTPUT tag is used to specify where the man pages will be put. |
1421 | +# If a relative path is entered the value of OUTPUT_DIRECTORY will be |
1422 | +# put in front of it. If left blank `man' will be used as the default path. |
1423 | + |
1424 | +MAN_OUTPUT = man |
1425 | + |
1426 | +# The MAN_EXTENSION tag determines the extension that is added to |
1427 | +# the generated man pages (default is the subroutine's section .3) |
1428 | + |
1429 | +MAN_EXTENSION = .3 |
1430 | + |
1431 | +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, |
1432 | +# then it will generate one additional man file for each entity |
1433 | +# documented in the real man page(s). These additional files |
1434 | +# only source the real man page, but without them the man command |
1435 | +# would be unable to find the correct page. The default is NO. |
1436 | + |
1437 | +MAN_LINKS = NO |
1438 | + |
1439 | +#--------------------------------------------------------------------------- |
1440 | +# configuration options related to the XML output |
1441 | +#--------------------------------------------------------------------------- |
1442 | + |
1443 | +# If the GENERATE_XML tag is set to YES Doxygen will |
1444 | +# generate an XML file that captures the structure of |
1445 | +# the code including all documentation. |
1446 | + |
1447 | +GENERATE_XML = NO |
1448 | + |
1449 | +# The XML_OUTPUT tag is used to specify where the XML pages will be put. |
1450 | +# If a relative path is entered the value of OUTPUT_DIRECTORY will be |
1451 | +# put in front of it. If left blank `xml' will be used as the default path. |
1452 | + |
1453 | +XML_OUTPUT = xml |
1454 | + |
1455 | +# The XML_SCHEMA tag can be used to specify an XML schema, |
1456 | +# which can be used by a validating XML parser to check the |
1457 | +# syntax of the XML files. |
1458 | + |
1459 | +XML_SCHEMA = |
1460 | + |
1461 | +# The XML_DTD tag can be used to specify an XML DTD, |
1462 | +# which can be used by a validating XML parser to check the |
1463 | +# syntax of the XML files. |
1464 | + |
1465 | +XML_DTD = |
1466 | + |
1467 | +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will |
1468 | +# dump the program listings (including syntax highlighting |
1469 | +# and cross-referencing information) to the XML output. Note that |
1470 | +# enabling this will significantly increase the size of the XML output. |
1471 | + |
1472 | +XML_PROGRAMLISTING = YES |
1473 | + |
1474 | +#--------------------------------------------------------------------------- |
1475 | +# configuration options for the AutoGen Definitions output |
1476 | +#--------------------------------------------------------------------------- |
1477 | + |
1478 | +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will |
1479 | +# generate an AutoGen Definitions (see autogen.sf.net) file |
1480 | +# that captures the structure of the code including all |
1481 | +# documentation. Note that this feature is still experimental |
1482 | +# and incomplete at the moment. |
1483 | + |
1484 | +GENERATE_AUTOGEN_DEF = NO |
1485 | + |
1486 | +#--------------------------------------------------------------------------- |
1487 | +# configuration options related to the Perl module output |
1488 | +#--------------------------------------------------------------------------- |
1489 | + |
1490 | +# If the GENERATE_PERLMOD tag is set to YES Doxygen will |
1491 | +# generate a Perl module file that captures the structure of |
1492 | +# the code including all documentation. Note that this |
1493 | +# feature is still experimental and incomplete at the |
1494 | +# moment. |
1495 | + |
1496 | +GENERATE_PERLMOD = NO |
1497 | + |
1498 | +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate |
1499 | +# the necessary Makefile rules, Perl scripts and LaTeX code to be able |
1500 | +# to generate PDF and DVI output from the Perl module output. |
1501 | + |
1502 | +PERLMOD_LATEX = NO |
1503 | + |
1504 | +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be |
1505 | +# nicely formatted so it can be parsed by a human reader. This is useful |
1506 | +# if you want to understand what is going on. On the other hand, if this |
1507 | +# tag is set to NO the size of the Perl module output will be much smaller |
1508 | +# and Perl will parse it just the same. |
1509 | + |
1510 | +PERLMOD_PRETTY = YES |
1511 | + |
1512 | +# The names of the make variables in the generated doxyrules.make file |
1513 | +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. |
1514 | +# This is useful so different doxyrules.make files included by the same |
1515 | +# Makefile don't overwrite each other's variables. |
1516 | + |
1517 | +PERLMOD_MAKEVAR_PREFIX = |
1518 | + |
1519 | +#--------------------------------------------------------------------------- |
1520 | +# Configuration options related to the preprocessor |
1521 | +#--------------------------------------------------------------------------- |
1522 | + |
1523 | +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will |
1524 | +# evaluate all C-preprocessor directives found in the sources and include |
1525 | +# files. |
1526 | + |
1527 | +ENABLE_PREPROCESSING = YES |
1528 | + |
1529 | +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro |
1530 | +# names in the source code. If set to NO (the default) only conditional |
1531 | +# compilation will be performed. Macro expansion can be done in a controlled |
1532 | +# way by setting EXPAND_ONLY_PREDEF to YES. |
1533 | + |
1534 | +MACRO_EXPANSION = NO |
1535 | + |
1536 | +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES |
1537 | +# then the macro expansion is limited to the macros specified with the |
1538 | +# PREDEFINED and EXPAND_AS_DEFINED tags. |
1539 | + |
1540 | +EXPAND_ONLY_PREDEF = NO |
1541 | + |
1542 | +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files |
1543 | +# pointed to by INCLUDE_PATH will be searched when a #include is found. |
1544 | + |
1545 | +SEARCH_INCLUDES = YES |
1546 | + |
1547 | +# The INCLUDE_PATH tag can be used to specify one or more directories that |
1548 | +# contain include files that are not input files but should be processed by |
1549 | +# the preprocessor. |
1550 | + |
1551 | +INCLUDE_PATH = |
1552 | + |
1553 | +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard |
1554 | +# patterns (like *.h and *.hpp) to filter out the header-files in the |
1555 | +# directories. If left blank, the patterns specified with FILE_PATTERNS will |
1556 | +# be used. |
1557 | + |
1558 | +INCLUDE_FILE_PATTERNS = |
1559 | + |
1560 | +# The PREDEFINED tag can be used to specify one or more macro names that |
1561 | +# are defined before the preprocessor is started (similar to the -D option of |
1562 | +# gcc). The argument of the tag is a list of macros of the form: name |
1563 | +# or name=definition (no spaces). If the definition and the = are |
1564 | +# omitted =1 is assumed. To prevent a macro definition from being |
1565 | +# undefined via #undef or recursively expanded use the := operator |
1566 | +# instead of the = operator. |
1567 | + |
1568 | +PREDEFINED = |
1569 | + |
1570 | +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then |
1571 | +# this tag can be used to specify a list of macro names that should be expanded. |
1572 | +# The macro definition that is found in the sources will be used. |
1573 | +# Use the PREDEFINED tag if you want to use a different macro definition that |
1574 | +# overrules the definition found in the source code. |
1575 | + |
1576 | +EXPAND_AS_DEFINED = |
1577 | + |
1578 | +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then |
1579 | +# doxygen's preprocessor will remove all references to function-like macros |
1580 | +# that are alone on a line, have an all uppercase name, and do not end with a |
1581 | +# semicolon, because these will confuse the parser if not removed. |
1582 | + |
1583 | +SKIP_FUNCTION_MACROS = YES |
1584 | + |
1585 | +#--------------------------------------------------------------------------- |
1586 | +# Configuration::additions related to external references |
1587 | +#--------------------------------------------------------------------------- |
1588 | + |
1589 | +# The TAGFILES option can be used to specify one or more tagfiles. |
1590 | +# Optionally an initial location of the external documentation |
1591 | +# can be added for each tagfile. The format of a tag file without |
1592 | +# this location is as follows: |
1593 | +# TAGFILES = file1 file2 ... |
1594 | +# Adding location for the tag files is done as follows: |
1595 | +# TAGFILES = file1=loc1 "file2 = loc2" ... |
1596 | +# where "loc1" and "loc2" can be relative or absolute paths or |
1597 | +# URLs. If a location is present for each tag, the installdox tool |
1598 | +# does not have to be run to correct the links. |
1599 | +# Note that each tag file must have a unique name |
1600 | +# (where the name does NOT include the path) |
1601 | +# If a tag file is not located in the directory in which doxygen |
1602 | +# is run, you must also specify the path to the tagfile here. |
1603 | + |
1604 | +TAGFILES = |
1605 | + |
1606 | +# When a file name is specified after GENERATE_TAGFILE, doxygen will create |
1607 | +# a tag file that is based on the input files it reads. |
1608 | + |
1609 | +GENERATE_TAGFILE = |
1610 | + |
1611 | +# If the ALLEXTERNALS tag is set to YES all external classes will be listed |
1612 | +# in the class index. If set to NO only the inherited external classes |
1613 | +# will be listed. |
1614 | + |
1615 | +ALLEXTERNALS = NO |
1616 | + |
1617 | +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed |
1618 | +# in the modules index. If set to NO, only the current project's groups will |
1619 | +# be listed. |
1620 | + |
1621 | +EXTERNAL_GROUPS = YES |
1622 | + |
1623 | +# The PERL_PATH should be the absolute path and name of the perl script |
1624 | +# interpreter (i.e. the result of `which perl'). |
1625 | + |
1626 | +PERL_PATH = /usr/bin/perl |
1627 | + |
1628 | +#--------------------------------------------------------------------------- |
1629 | +# Configuration options related to the dot tool |
1630 | +#--------------------------------------------------------------------------- |
1631 | + |
1632 | +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will |
1633 | +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base |
1634 | +# or super classes. Setting the tag to NO turns the diagrams off. Note that |
1635 | +# this option also works with HAVE_DOT disabled, but it is recommended to |
1636 | +# install and use dot, since it yields more powerful graphs. |
1637 | + |
1638 | +CLASS_DIAGRAMS = NO |
1639 | + |
1640 | +# You can define message sequence charts within doxygen comments using the \msc |
1641 | +# command. Doxygen will then run the mscgen tool (see |
1642 | +# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the |
1643 | +# documentation. The MSCGEN_PATH tag allows you to specify the directory where |
1644 | +# the mscgen tool resides. If left empty the tool is assumed to be found in the |
1645 | +# default search path. |
1646 | + |
1647 | +MSCGEN_PATH = |
1648 | + |
1649 | +# If set to YES, the inheritance and collaboration graphs will hide |
1650 | +# inheritance and usage relations if the target is undocumented |
1651 | +# or is not a class. |
1652 | + |
1653 | +HIDE_UNDOC_RELATIONS = YES |
1654 | + |
1655 | +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is |
1656 | +# available from the path. This tool is part of Graphviz, a graph visualization |
1657 | +# toolkit from AT&T and Lucent Bell Labs. The other options in this section |
1658 | +# have no effect if this option is set to NO (the default) |
1659 | + |
1660 | +HAVE_DOT = NO |
1661 | + |
1662 | +# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is |
1663 | +# allowed to run in parallel. When set to 0 (the default) doxygen will |
1664 | +# base this on the number of processors available in the system. You can set it |
1665 | +# explicitly to a value larger than 0 to get control over the balance |
1666 | +# between CPU load and processing speed. |
1667 | + |
1668 | +DOT_NUM_THREADS = 0 |
1669 | + |
1670 | +# By default doxygen will write a font called Helvetica to the output |
1671 | +# directory and reference it in all dot files that doxygen generates. |
1672 | +# When you want a differently looking font you can specify the font name |
1673 | +# using DOT_FONTNAME. You need to make sure dot is able to find the font, |
1674 | +# which can be done by putting it in a standard location or by setting the |
1675 | +# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory |
1676 | +# containing the font. |
1677 | + |
1678 | +DOT_FONTNAME = Helvetica |
1679 | + |
1680 | +# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. |
1681 | +# The default size is 10pt. |
1682 | + |
1683 | +DOT_FONTSIZE = 10 |
1684 | + |
1685 | +# By default doxygen will tell dot to use the output directory to look for the |
1686 | +# FreeSans.ttf font (which doxygen will put there itself). If you specify a |
1687 | +# different font using DOT_FONTNAME you can set the path where dot |
1688 | +# can find it using this tag. |
1689 | + |
1690 | +DOT_FONTPATH = |
1691 | + |
1692 | +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen |
1693 | +# will generate a graph for each documented class showing the direct and |
1694 | +# indirect inheritance relations. Setting this tag to YES will force the |
1695 | +# the CLASS_DIAGRAMS tag to NO. |
1696 | + |
1697 | +CLASS_GRAPH = YES |
1698 | + |
1699 | +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen |
1700 | +# will generate a graph for each documented class showing the direct and |
1701 | +# indirect implementation dependencies (inheritance, containment, and |
1702 | +# class references variables) of the class with other documented classes. |
1703 | + |
1704 | +COLLABORATION_GRAPH = YES |
1705 | + |
1706 | +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen |
1707 | +# will generate a graph for groups, showing the direct groups dependencies |
1708 | + |
1709 | +GROUP_GRAPHS = YES |
1710 | + |
1711 | +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and |
1712 | +# collaboration diagrams in a style similar to the OMG's Unified Modeling |
1713 | +# Language. |
1714 | + |
1715 | +UML_LOOK = NO |
1716 | + |
1717 | +# If set to YES, the inheritance and collaboration graphs will show the |
1718 | +# relations between templates and their instances. |
1719 | + |
1720 | +TEMPLATE_RELATIONS = NO |
1721 | + |
1722 | +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT |
1723 | +# tags are set to YES then doxygen will generate a graph for each documented |
1724 | +# file showing the direct and indirect include dependencies of the file with |
1725 | +# other documented files. |
1726 | + |
1727 | +INCLUDE_GRAPH = YES |
1728 | + |
1729 | +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and |
1730 | +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each |
1731 | +# documented header file showing the documented files that directly or |
1732 | +# indirectly include this file. |
1733 | + |
1734 | +INCLUDED_BY_GRAPH = YES |
1735 | + |
1736 | +# If the CALL_GRAPH and HAVE_DOT options are set to YES then |
1737 | +# doxygen will generate a call dependency graph for every global function |
1738 | +# or class method. Note that enabling this option will significantly increase |
1739 | +# the time of a run. So in most cases it will be better to enable call graphs |
1740 | +# for selected functions only using the \callgraph command. |
1741 | + |
1742 | +CALL_GRAPH = NO |
1743 | + |
1744 | +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then |
1745 | +# doxygen will generate a caller dependency graph for every global function |
1746 | +# or class method. Note that enabling this option will significantly increase |
1747 | +# the time of a run. So in most cases it will be better to enable caller |
1748 | +# graphs for selected functions only using the \callergraph command. |
1749 | + |
1750 | +CALLER_GRAPH = NO |
1751 | + |
1752 | +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen |
1753 | +# will generate a graphical hierarchy of all classes instead of a textual one. |
1754 | + |
1755 | +GRAPHICAL_HIERARCHY = YES |
1756 | + |
1757 | +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES |
1758 | +# then doxygen will show the dependencies a directory has on other directories |
1759 | +# in a graphical way. The dependency relations are determined by the #include |
1760 | +# relations between the files in the directories. |
1761 | + |
1762 | +DIRECTORY_GRAPH = YES |
1763 | + |
1764 | +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images |
1765 | +# generated by dot. Possible values are svg, png, jpg, or gif. |
1766 | +# If left blank png will be used. |
1767 | + |
1768 | +DOT_IMAGE_FORMAT = png |
1769 | + |
1770 | +# The tag DOT_PATH can be used to specify the path where the dot tool can be |
1771 | +# found. If left blank, it is assumed the dot tool can be found in the path. |
1772 | + |
1773 | +DOT_PATH = |
1774 | + |
1775 | +# The DOTFILE_DIRS tag can be used to specify one or more directories that |
1776 | +# contain dot files that are included in the documentation (see the |
1777 | +# \dotfile command). |
1778 | + |
1779 | +DOTFILE_DIRS = |
1780 | + |
1781 | +# The MSCFILE_DIRS tag can be used to specify one or more directories that |
1782 | +# contain msc files that are included in the documentation (see the |
1783 | +# \mscfile command). |
1784 | + |
1785 | +MSCFILE_DIRS = |
1786 | + |
1787 | +# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of |
1788 | +# nodes that will be shown in the graph. If the number of nodes in a graph |
1789 | +# becomes larger than this value, doxygen will truncate the graph, which is |
1790 | +# visualized by representing a node as a red box. Note that doxygen if the |
1791 | +# number of direct children of the root node in a graph is already larger than |
1792 | +# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note |
1793 | +# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. |
1794 | + |
1795 | +DOT_GRAPH_MAX_NODES = 50 |
1796 | + |
1797 | +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the |
1798 | +# graphs generated by dot. A depth value of 3 means that only nodes reachable |
1799 | +# from the root by following a path via at most 3 edges will be shown. Nodes |
1800 | +# that lay further from the root node will be omitted. Note that setting this |
1801 | +# option to 1 or 2 may greatly reduce the computation time needed for large |
1802 | +# code bases. Also note that the size of a graph can be further restricted by |
1803 | +# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. |
1804 | + |
1805 | +MAX_DOT_GRAPH_DEPTH = 0 |
1806 | + |
1807 | +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent |
1808 | +# background. This is disabled by default, because dot on Windows does not |
1809 | +# seem to support this out of the box. Warning: Depending on the platform used, |
1810 | +# enabling this option may lead to badly anti-aliased labels on the edges of |
1811 | +# a graph (i.e. they become hard to read). |
1812 | + |
1813 | +DOT_TRANSPARENT = NO |
1814 | + |
1815 | +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output |
1816 | +# files in one run (i.e. multiple -o and -T options on the command line). This |
1817 | +# makes dot run faster, but since only newer versions of dot (>1.8.10) |
1818 | +# support this, this feature is disabled by default. |
1819 | + |
1820 | +DOT_MULTI_TARGETS = NO |
1821 | + |
1822 | +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will |
1823 | +# generate a legend page explaining the meaning of the various boxes and |
1824 | +# arrows in the dot generated graphs. |
1825 | + |
1826 | +GENERATE_LEGEND = YES |
1827 | + |
1828 | +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will |
1829 | +# remove the intermediate dot files that are used to generate |
1830 | +# the various graphs. |
1831 | + |
1832 | +DOT_CLEANUP = YES |
1833 | |
1834 | === added file 'doc/Makefile.am' |
1835 | --- doc/Makefile.am 1970-01-01 00:00:00 +0000 |
1836 | +++ doc/Makefile.am 2011-11-21 22:46:23 +0000 |
1837 | @@ -0,0 +1,42 @@ |
1838 | +## |
1839 | +## Makefile for the doc subdirectory of libgeis |
1840 | +## |
1841 | +## Copyright (C) 2010 Canonical Ltd. |
1842 | +## |
1843 | +## Process this file with automake to produce Makefile.in. |
1844 | +## |
1845 | +## This file is part of the libgeis project. This library is free |
1846 | +## software; you can redistribute it and/or modify it under the |
1847 | +## terms of the GNU General Public License as published by the |
1848 | +## Free Software Foundation; either version 3, or (at your option) |
1849 | +## any later version. |
1850 | +## |
1851 | +## This library is distributed in the hope that it will be useful, |
1852 | +## but WITHOUT ANY WARRANTY; without even the implied warranty of |
1853 | +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1854 | +## GNU General Public License for more details. |
1855 | +## |
1856 | +## You should have received a copy of the GNU General Public License along |
1857 | +## with this library; see the file COPYING3. If not see |
1858 | +## <http://www.gnu.org/licenses/>. |
1859 | +## |
1860 | + |
1861 | +api/html: |
1862 | + mkdir -p api/html |
1863 | + |
1864 | +doc-html: doc-html-doxygen |
1865 | + |
1866 | +doc-man: doc-man-doxygen |
1867 | + |
1868 | +doc-html-doxygen: |
1869 | + doxygen |
1870 | + |
1871 | +doc-man-doxygen: |
1872 | + doxygen |
1873 | + |
1874 | +install-data-local: api/html |
1875 | + $(INSTALL) -d $(DESTDIR)$(docdir) |
1876 | + cp -a api/html $(DESTDIR)$(docdir) |
1877 | + |
1878 | +clean-local: |
1879 | + -rm -rf *.html api |
1880 | |
1881 | === modified file 'include/utouch/frame-mtdev.h' |
1882 | --- include/utouch/frame-mtdev.h 2011-05-17 14:09:11 +0000 |
1883 | +++ include/utouch/frame-mtdev.h 2011-11-21 22:46:23 +0000 |
1884 | @@ -26,6 +26,14 @@ |
1885 | extern "C" { |
1886 | #endif |
1887 | |
1888 | +/** |
1889 | + * \addtogroup v1 |
1890 | + * @{ |
1891 | + * |
1892 | + * \defgroup v1-mtdev MTDev |
1893 | + * @{ |
1894 | + */ |
1895 | + |
1896 | #define MTDEV_NO_LEGACY_API |
1897 | |
1898 | #include <utouch/frame.h> |
1899 | @@ -40,6 +48,12 @@ |
1900 | const struct utouch_frame * |
1901 | utouch_frame_pump_mtdev(utouch_frame_handle fh, const struct input_event *ev); |
1902 | |
1903 | +/** |
1904 | + * @} |
1905 | + * |
1906 | + * @} |
1907 | + */ |
1908 | + |
1909 | #ifdef __cplusplus |
1910 | } |
1911 | #endif |
1912 | |
1913 | === modified file 'include/utouch/frame-xi2.h' |
1914 | --- include/utouch/frame-xi2.h 2011-05-17 14:09:11 +0000 |
1915 | +++ include/utouch/frame-xi2.h 2011-11-21 22:46:23 +0000 |
1916 | @@ -26,6 +26,14 @@ |
1917 | extern "C" { |
1918 | #endif |
1919 | |
1920 | +/** |
1921 | + * \addtogroup v1 |
1922 | + * @{ |
1923 | + * |
1924 | + * \defgroup v1-xi2 XI2 |
1925 | + * @{ |
1926 | + */ |
1927 | + |
1928 | #define MTDEV_NO_LEGACY_API |
1929 | |
1930 | #include <utouch/frame.h> |
1931 | @@ -42,6 +50,12 @@ |
1932 | const struct utouch_frame * |
1933 | utouch_frame_pump_xi2(utouch_frame_handle fh, const XIDeviceEvent *ev); |
1934 | |
1935 | +/** |
1936 | + * @} |
1937 | + * |
1938 | + * @} |
1939 | + */ |
1940 | + |
1941 | #ifdef __cplusplus |
1942 | } |
1943 | #endif |
1944 | |
1945 | === modified file 'include/utouch/frame.h' |
1946 | --- include/utouch/frame.h 2011-08-30 15:05:14 +0000 |
1947 | +++ include/utouch/frame.h 2011-11-21 22:46:23 +0000 |
1948 | @@ -19,8 +19,13 @@ |
1949 | * |
1950 | ****************************************************************************/ |
1951 | |
1952 | -#ifndef UTOUCH_FRAME_H |
1953 | -#define UTOUCH_FRAME_H |
1954 | +/** |
1955 | + * @file utouch/frame.h |
1956 | + * Definitions of the main and platform-generic API |
1957 | + */ |
1958 | + |
1959 | +#ifndef UTOUCH_FRAME_UTOUCH_FRAME_H_ |
1960 | +#define UTOUCH_FRAME_UTOUCH_FRAME_H_ |
1961 | |
1962 | #ifdef __cplusplus |
1963 | extern "C" { |
1964 | @@ -28,6 +33,12 @@ |
1965 | |
1966 | #include <stdint.h> |
1967 | |
1968 | +/** |
1969 | + * @defgroup v1 uTouch-Frame 1.x |
1970 | + * @{ |
1971 | + * @internal |
1972 | + */ |
1973 | + |
1974 | #define UTOUCH_FRAME_VERSION 0x00001010 |
1975 | |
1976 | /** |
1977 | @@ -318,9 +329,619 @@ |
1978 | void utouch_frame_set_coordinate_transform_callback(utouch_frame_handle fh, |
1979 | utouch_coordinate_transform_cb callback, |
1980 | void *user_data); |
1981 | +/** @} */ |
1982 | + |
1983 | +/** |
1984 | + * @defgroup v2 uTouch-Frame 2.x |
1985 | + * @{ |
1986 | + */ |
1987 | + |
1988 | +/** An object for the context of the uTouch Frame instance */ |
1989 | +typedef struct UFHandle_* UFHandle; |
1990 | +/** An object for an event */ |
1991 | +typedef struct UFEvent_* UFEvent; |
1992 | +/** An object for a frame of touches */ |
1993 | +typedef struct UFFrame_* UFFrame; |
1994 | +/** An object for a touch */ |
1995 | +typedef struct UFTouch_* UFTouch; |
1996 | +/** An object for a device */ |
1997 | +typedef struct UFDevice_* UFDevice; |
1998 | +/** An object for a device axis */ |
1999 | +typedef struct UFAxis_* UFAxis; |
2000 | +/** An object for a window ID */ |
2001 | +typedef uint64_t UFWindowId; |
2002 | +/** An object for a touch ID */ |
2003 | +typedef uint64_t UFTouchId; |
2004 | + |
2005 | +/** The status code denoting the result of a function call */ |
2006 | +typedef enum UFStatus { |
2007 | + UFStatusSuccess = 0, /**< The call was successful */ |
2008 | + UFStatusErrorGeneric, /**< A platform-dependent error occurred */ |
2009 | + UFStatusErrorResources, /**< An error occurred due to insufficient resources */ |
2010 | + UFStatusErrorNoEvent, /**< No events were available to get */ |
2011 | + UFStatusErrorUnknownProperty, /**< The requested property value was not set */ |
2012 | + UFStatusErrorInvalidTouch, /**< The requested touch does not exist */ |
2013 | + UFStatusErrorInvalidAxis, /**< The requested axis does not exist */ |
2014 | + UFStatusErrorUnsupported, /**< The requested function is not supported by the |
2015 | + window server */ |
2016 | +} UFStatus; |
2017 | + |
2018 | +/** Properties of a device */ |
2019 | +typedef enum UFDeviceProperty { |
2020 | + /** |
2021 | + * The name of the device |
2022 | + * |
2023 | + * Value type: const char * |
2024 | + * |
2025 | + * The uTouch frame library owns the string. The string is valid until an |
2026 | + * event notifying removal of the device is released. |
2027 | + */ |
2028 | + UFDevicePropertyName = 0, |
2029 | + /** |
2030 | + * Whether the device is a direct touch device |
2031 | + * |
2032 | + * Value type: int with boolean semantics |
2033 | + * |
2034 | + * A direct touch device is a device where there is a direct transformation |
2035 | + * from the touch location to the event location on the screen. An indirect |
2036 | + * touch device is a device where the touch has meaning relative to a position |
2037 | + * on the screen, such as the location of a cursor. A touchscreens is an |
2038 | + * example of a direct device, and a trackpad is an example of an indirect |
2039 | + * device. |
2040 | + */ |
2041 | + UFDevicePropertyDirect, |
2042 | + /** |
2043 | + * Whether the device is an independent touch device |
2044 | + * |
2045 | + * Value type: int with boolean semantics |
2046 | + * |
2047 | + * An independent device is an indirect device whose cursor moves |
2048 | + * independently of the touches on the device. A mouse with a touch area for |
2049 | + * gestures is an example of an independent device, and a trackpad is an |
2050 | + * example of a dependent device. |
2051 | + */ |
2052 | + UFDevicePropertyIndependent, |
2053 | + /** |
2054 | + * Whether the device is a semi-multitouch device |
2055 | + * |
2056 | + * Value type: int with boolean semantics |
2057 | + * |
2058 | + * A semi-multitouch device provides a bounding box of some touches on the |
2059 | + * touch surface. In contrast, a full-multitouch device provides accurate |
2060 | + * locations of each individual touch. |
2061 | + */ |
2062 | + UFDevicePropertySemiMT, |
2063 | + /** |
2064 | + * The maximum number of touches supported by the device |
2065 | + * |
2066 | + * Value type: unsigned int |
2067 | + */ |
2068 | + UFDevicePropertyMaxTouches, |
2069 | + /** |
2070 | + * The number of touch axes provided by the device |
2071 | + * |
2072 | + * Value type: unsigned int |
2073 | + */ |
2074 | + UFDevicePropertyNumAxes, |
2075 | +} UFDeviceProperty; |
2076 | + |
2077 | +/** Device touch axis types */ |
2078 | +typedef enum UFAxisType { |
2079 | + UFAxisTypeX = 0, /**< X coordinate */ |
2080 | + UFAxisTypeY, /**< Y coordinate */ |
2081 | + UFAxisTypeTouchMajor, /**< Width along major axis of contact area of touch */ |
2082 | + UFAxisTypeTouchMinor, /**< Width along minor axis of contact area of touch */ |
2083 | + UFAxisTypeWidthMajor, /**< Width along major axis of touch tool */ |
2084 | + UFAxisTypeWidthMinor, /**< Width along minor axis of touch tool */ |
2085 | + UFAxisTypeOrientation, /**< Orientation of major axis of contact ellipse */ |
2086 | + UFAxisTypeTool, /**< Tool type */ |
2087 | + UFAxisTypeBlobId, /**< Blob ID of group of touches */ |
2088 | + UFAxisTypeTrackingId, /**< Tracking ID */ |
2089 | + UFAxisTypePressure, /**< Pressure */ |
2090 | + UFAxisTypeDistance, /**< Hover distance */ |
2091 | +} UFAxisType; |
2092 | + |
2093 | +/** Event properties */ |
2094 | +typedef enum UFEventProperty { |
2095 | + /** |
2096 | + * Type of event |
2097 | + * |
2098 | + * Value type: UFEventType |
2099 | + */ |
2100 | + UFEventPropertyType = 0, |
2101 | + /** |
2102 | + * Device added or removed |
2103 | + * |
2104 | + * Value type: UFDevice |
2105 | + * |
2106 | + * This property is set only when the event type is UFEventTypeDeviceAdded |
2107 | + * or UFEventTypeDeviceRemoved. The object is owned by the library and is |
2108 | + * valid until an event notifying removal of the device is released. |
2109 | + */ |
2110 | + UFEventPropertyDevice, |
2111 | + /** |
2112 | + * Touch frame |
2113 | + * |
2114 | + * Value type: UFFrame |
2115 | + * |
2116 | + * This property is set only when the event type is UFEventTypeFrame. The |
2117 | + * object is owned by the library and is valid until the event is released. |
2118 | + */ |
2119 | + UFEventPropertyFrame, |
2120 | + /** |
2121 | + * Event time |
2122 | + * |
2123 | + * Value type: 64-bit unsigned int |
2124 | + * |
2125 | + * This property holds the time the event occurred in display server |
2126 | + * timespace. The time is provided in milliseconds (ms). If the event, such as |
2127 | + * device addition, occurred before the uTouch Frame context was created, the |
2128 | + * value will be 0. |
2129 | + */ |
2130 | + UFEventPropertyTime, |
2131 | +} UFEventProperty; |
2132 | + |
2133 | +/** Event types */ |
2134 | +typedef enum UFEventType { |
2135 | + UFEventTypeDeviceAdded = 0, /**< A new device has been added */ |
2136 | + UFEventTypeDeviceRemoved, /**< An existing device has been removed */ |
2137 | + UFEventTypeFrame, /**< The state of one or more touches has changed */ |
2138 | +} UFEventType; |
2139 | + |
2140 | +/** Touch frame properties */ |
2141 | +typedef enum UFFrameProperty { |
2142 | + /** |
2143 | + * The device for the frame |
2144 | + * |
2145 | + * Value type: UFDevice |
2146 | + */ |
2147 | + UFFramePropertyDevice = 0, |
2148 | + /** |
2149 | + * The window server ID of the window for the frame |
2150 | + * |
2151 | + * Value type: UFWindowId |
2152 | + */ |
2153 | + UFFramePropertyWindowId, |
2154 | + /** |
2155 | + * Number of touches in the frame |
2156 | + * |
2157 | + * Value type: unsigned int |
2158 | + * |
2159 | + * Some devices can track more touches than they can report data for. Only |
2160 | + * touches with X and Y position are provided in the frame. |
2161 | + */ |
2162 | + UFFramePropertyNumTouches, |
2163 | + /** |
2164 | + * Total number of active touches on the device |
2165 | + * |
2166 | + * Value type: unsigned int |
2167 | + * |
2168 | + * Some devices can track more touches than they can report data for. This |
2169 | + * value includes the number of reported and unreported touches. |
2170 | + */ |
2171 | + UFFramePropertyActiveTouches, |
2172 | +} UFFrameProperty; |
2173 | + |
2174 | +/** State of an individual touch */ |
2175 | +typedef enum UFTouchState { |
2176 | + UFTouchStateBegin = 0, /**< The touch began */ |
2177 | + UFTouchStateUpdate, /**< A value or property of the touch changed */ |
2178 | + UFTouchStateEnd, /**< The touch ended */ |
2179 | +} UFTouchState; |
2180 | + |
2181 | +/** Touch properties */ |
2182 | +typedef enum UFTouchProperty { |
2183 | + /** |
2184 | + * Window server ID of the touch |
2185 | + * |
2186 | + * Value type: UFTouchId |
2187 | + */ |
2188 | + UFTouchPropertyId = 0, |
2189 | + /** |
2190 | + * State of the touch |
2191 | + * |
2192 | + * Value type: UFTouchState |
2193 | + */ |
2194 | + UFTouchPropertyState, |
2195 | + /** |
2196 | + * Location along X axis of touch relative to event window |
2197 | + * |
2198 | + * Value type: float |
2199 | + * |
2200 | + * The window server may provide touch location in window coordinate space. |
2201 | + * This property will be set where available. |
2202 | + */ |
2203 | + UFTouchPropertyWindowX, |
2204 | + /** |
2205 | + * Location along Y axis of touch relative to event window |
2206 | + * |
2207 | + * Value type: float |
2208 | + * |
2209 | + * The window server may provide touch location in window coordinate space. |
2210 | + * This property will be set where available. |
2211 | + */ |
2212 | + UFTouchPropertyWindowY, |
2213 | + /** |
2214 | + * Time of last touch state change |
2215 | + * |
2216 | + * Value type: 64-bit unsigned int |
2217 | + * |
2218 | + * See UFEventPropertyTime for the semantics of the value. If the touch has |
2219 | + * not changed during this frame, the value of this property will be less than |
2220 | + * the value of the UFEventPropertyTime event property for this frame. |
2221 | + */ |
2222 | + UFTouchPropertyTime, |
2223 | + /** |
2224 | + * Start time of touch |
2225 | + * |
2226 | + * Value type: 64-bit unsigned int |
2227 | + * |
2228 | + * See UFEventPropertyTime for the semantics of the value. |
2229 | + */ |
2230 | + UFTouchPropertyStartTime, |
2231 | + /** |
2232 | + * Whether the touch is owned by the client |
2233 | + * |
2234 | + * Value type: int with boolean semantics |
2235 | + * |
2236 | + * Some window servers have the concept of touch ownership. This property |
2237 | + * is only valid when the server supports touch ownership. |
2238 | + */ |
2239 | + UFTouchPropertyOwned, |
2240 | + /** |
2241 | + * Whether the touch has physically ended before the touch sequence has ended |
2242 | + * |
2243 | + * Value type: int with boolean semantics |
2244 | + * |
2245 | + * Some window servers have the concept of touch ownership. If a touch has |
2246 | + * ended before the client receives ownership, this property will be set to |
2247 | + * true. The property will also be set to true when the touch has ended before |
2248 | + * the client has accepted or rejected ownership of the touch sequence. |
2249 | + */ |
2250 | + UFTouchPropertyPendingEnd, |
2251 | +} UFTouchProperty; |
2252 | + |
2253 | +/** |
2254 | + * Get the event file descriptor for the uTouch Frame context |
2255 | + * |
2256 | + * @param [in] handle The uTouch Frame context object |
2257 | + * @return A file descriptor for the context |
2258 | + * |
2259 | + * When events are available for processing, the file descriptor will be |
2260 | + * readable. Perform an 8-byte read from the file descriptor to clear the state. |
2261 | + * Refer to the EVENTFD(2) man page for more details. |
2262 | + */ |
2263 | +int frame_get_fd(UFHandle handle); |
2264 | + |
2265 | +/** |
2266 | + * Get an event from the uTouch Frame context |
2267 | + * |
2268 | + * @param [in] handle The context object |
2269 | + * @param [out] event The retrieved event |
2270 | + * @return UFStatusSuccess or UFStatusErrorNoEvent |
2271 | + * |
2272 | + * The reference count of the returned event is implicity incremented once. |
2273 | + */ |
2274 | +UFStatus frame_get_event(UFHandle handle, UFEvent *event); |
2275 | + |
2276 | +/** |
2277 | + * Get the value of a property of a device |
2278 | + * |
2279 | + * @param [in] device The device object (const) |
2280 | + * @param [in] property The property to retrieve a value for |
2281 | + * @param [out] value The value retrieved |
2282 | + * @return UFStatusSuccess or UFStatusErrorUnknownProperty |
2283 | + */ |
2284 | +UFStatus frame_device_get_property(UFDevice device, UFDeviceProperty property, |
2285 | + void *value); |
2286 | + |
2287 | +/** |
2288 | + * Get a device touch axis by index |
2289 | + * |
2290 | + * @param [in] device The device object (const) |
2291 | + * @param [in] index The index of the axis to get |
2292 | + * @param [out] axis The axis retrieved |
2293 | + * @return UFStatusSuccess or UFStatusErrorInvalidAxis |
2294 | + * |
2295 | + * The index value must be greater than or equal to 0 and less than the number |
2296 | + * axes of the device. |
2297 | + */ |
2298 | +UFStatus frame_device_get_axis_by_index(UFDevice device, unsigned int index, |
2299 | + UFAxis *axis); |
2300 | + |
2301 | +/** |
2302 | + * Get a device touch axis by axis type |
2303 | + * |
2304 | + * @param [in] device The device object (const) |
2305 | + * @param [in] type The axis type |
2306 | + * @param [out] axis The axis retrieved |
2307 | + * @return UFStatusSuccess or UFStatusErrorInvalidAxis |
2308 | + * |
2309 | + * UFStatusErrorInvalidAxis is returned if the device does not have an axis of |
2310 | + * the type requested. |
2311 | + */ |
2312 | +UFStatus frame_device_get_axis_by_type(UFDevice device, UFAxisType type, |
2313 | + UFAxis *axis); |
2314 | + |
2315 | +/** |
2316 | + * Get the type of a touch device axis |
2317 | + * |
2318 | + * @param [in] axis The touch device axis (const) |
2319 | + * @return The type of the axis |
2320 | + */ |
2321 | +UFAxisType frame_axis_get_type(UFAxis axis); |
2322 | + |
2323 | +/** |
2324 | + * Get the minimum value of a touch device axis |
2325 | + * |
2326 | + * @param [in] axis The touch device axis (const) |
2327 | + * @return The minimum value of the axis |
2328 | + */ |
2329 | +float frame_axis_get_minimum(UFAxis axis); |
2330 | + |
2331 | +/** |
2332 | + * Get the maximum value of a touch device axis |
2333 | + * |
2334 | + * @param [in] axis The touch device axis (const) |
2335 | + * @return The maximum value of the axis |
2336 | + */ |
2337 | +float frame_axis_get_maximum(UFAxis axis); |
2338 | + |
2339 | +/** |
2340 | + * Get the resolution of a touch device axis |
2341 | + * |
2342 | + * @param [in] axis The touch device axis (const) |
2343 | + * @return The resolution of the axis |
2344 | + */ |
2345 | +float frame_axis_get_resolution(UFAxis axis); |
2346 | + |
2347 | +/** |
2348 | + * Increment the reference count of an event |
2349 | + * |
2350 | + * @param [in] event The event object |
2351 | + */ |
2352 | +void frame_event_ref(UFEvent event); |
2353 | + |
2354 | +/** |
2355 | + * Decrement the reference count of an event |
2356 | + * |
2357 | + * @param [in] event The event object |
2358 | + * |
2359 | + * When the reference count reaches zero, the event is freed. |
2360 | + */ |
2361 | +void frame_event_unref(UFEvent event); |
2362 | + |
2363 | +/** |
2364 | + * Get the value of a property of an event |
2365 | + * |
2366 | + * @param [in] event The event object (const) |
2367 | + * @param [in] property The property to retrieve a value for |
2368 | + * @param [out] value The value retrieved |
2369 | + * @return UFStatusSuccess or UFStatusErrorUnknownProperty |
2370 | + */ |
2371 | +UFStatus frame_event_get_property(UFEvent event, UFEventProperty property, |
2372 | + void *value); |
2373 | + |
2374 | +/** |
2375 | + * Get the value of a property of a frame |
2376 | + * |
2377 | + * @param [in] frame The frame object (const) |
2378 | + * @param [in] property The property to retrieve a value for |
2379 | + * @param [out] value The value retrieved |
2380 | + * @return UFStatusSuccess or UFStatusErrorUnknownProperty |
2381 | + */ |
2382 | +UFStatus frame_frame_get_property(UFFrame frame, UFFrameProperty property, |
2383 | + void *value); |
2384 | + |
2385 | +/** |
2386 | + * Get a touch of a frame by index |
2387 | + * |
2388 | + * @param [in] frame The frame object (const) |
2389 | + * @param [in] index The index of the touch to get |
2390 | + * @param [out] touch The touch retrieved |
2391 | + * @return UFStatusSuccess or UFStatusErrorInvalidTouch |
2392 | + * |
2393 | + * The index value must be greater than or equal to 0 and less than the number |
2394 | + * touches reported in the frame. |
2395 | + */ |
2396 | +UFStatus frame_frame_get_touch_by_index(UFFrame frame, unsigned int index, |
2397 | + UFTouch *touch); |
2398 | + |
2399 | +/** |
2400 | + * Get a touch from a frame by the window server ID |
2401 | + * |
2402 | + * @param [in] frame The frame object (const) |
2403 | + * @param [in] touch_id The window server ID of the touch |
2404 | + * The value type of the touch ID is window server dependent. See |
2405 | + * UFTouchPropertyId for more details. |
2406 | + * @param [out] touch The touch object |
2407 | + * @return UFStatusSuccess or UFStatusErrorInvalidTouch |
2408 | + */ |
2409 | +UFStatus frame_frame_get_touch_by_id(UFFrame frame, UFTouchId touch_id, |
2410 | + UFTouch* touch); |
2411 | + |
2412 | +/** |
2413 | + * Get the previous value of a property of a touch |
2414 | + * |
2415 | + * @param [in] frame The current frame object (const) |
2416 | + * @param [in] touch The current touch object (const) |
2417 | + * @param [in] property The property to retrieve a value for |
2418 | + * @param [out] value The value retrieved |
2419 | + * @return UFStatusSuccess, UFStatusErrorUnknownProperty, or |
2420 | + * UFStatusErrorInvalidTouch |
2421 | + * |
2422 | + * The previous value is the value of the property in the previous frame. |
2423 | + * UFStatusErrorInvalidTouch is returned if the touch did not exist in the |
2424 | + * previous frame. |
2425 | + */ |
2426 | +UFStatus frame_frame_get_previous_touch_property(UFFrame frame, UFTouch touch, |
2427 | + UFTouchProperty property, |
2428 | + void *value); |
2429 | + |
2430 | +/** |
2431 | + * Get the previous value of an axis of a touch |
2432 | + * |
2433 | + * @param [in] frame The current frame object (const) |
2434 | + * @param [in] touch The current touch object (const) |
2435 | + * @param [in] type The axis to retrieve a value for |
2436 | + * @param [out] value The value retrieved |
2437 | + * @return UFStatusSuccess, UFStatusErrorInvalidAxis, or |
2438 | + * UFStatusErrorInvalidTouch |
2439 | + * |
2440 | + * The previous value is the value of the axis in the previous frame. |
2441 | + * UFStatusErrorInvalidTouch is returned if the touch did not exist in the |
2442 | + * previous frame. |
2443 | + */ |
2444 | +UFStatus frame_frame_get_previous_touch_value(UFFrame frame, UFTouch touch, |
2445 | + UFAxisType type, float* value); |
2446 | + |
2447 | +/** |
2448 | + * Get the value of a property of a touch |
2449 | + * |
2450 | + * @param [in] touch The touch object (const) |
2451 | + * @param [in] property The property to retrieve a value for |
2452 | + * @param [out] value The value retrieved |
2453 | + * @return UFStatusSuccess or UFStatusErrorUnknownProperty |
2454 | + */ |
2455 | +UFStatus frame_touch_get_property(UFTouch touch, UFTouchProperty property, |
2456 | + void *value); |
2457 | + |
2458 | +/** |
2459 | + * Get the value of an axis of a touch |
2460 | + * |
2461 | + * @param [in] touch The touch object (const) |
2462 | + * @param [in] type The axis to retrieve a value for |
2463 | + * @param [out] value The value retrieved |
2464 | + * @return UFStatusSuccess or UFStatusErrorInvalidAxis |
2465 | + */ |
2466 | +UFStatus frame_touch_get_value(UFTouch touch, UFAxisType type, float *value); |
2467 | + |
2468 | +/** |
2469 | + * @defgroup v2-helpers Helper Functions |
2470 | + * These helper functions may be used in place of the generic property getters. |
2471 | + * They are limited to properties that are guaranteed to exist in all instances |
2472 | + * of the objects. |
2473 | + * @{ |
2474 | + */ |
2475 | + |
2476 | +/** |
2477 | + * Get the type of an event |
2478 | + * |
2479 | + * @param [in] event The event object (const) |
2480 | + * @return The type of the event |
2481 | + */ |
2482 | +UFEventType frame_event_get_type(UFEvent event); |
2483 | + |
2484 | +/** |
2485 | + * Get the time of an event |
2486 | + * |
2487 | + * @param [in] event The event object (const) |
2488 | + * @return The time of the event |
2489 | + */ |
2490 | +uint64_t frame_event_get_time(UFEvent event); |
2491 | + |
2492 | +/** |
2493 | + * Get the number of axes of a device |
2494 | + * |
2495 | + * @param [in] device The device object (const) |
2496 | + * @return The number of axes |
2497 | + */ |
2498 | +unsigned int frame_device_get_num_axes(UFDevice device); |
2499 | + |
2500 | +/** |
2501 | + * Get the number of touches in the frame |
2502 | + * |
2503 | + * @param [in] frame The frame object (const) |
2504 | + * @return The number of touches |
2505 | + */ |
2506 | +uint32_t frame_frame_get_num_touches(UFFrame frame); |
2507 | + |
2508 | +/** |
2509 | + * Get the device of a frame |
2510 | + * |
2511 | + * @param [in] frame The frame context object (const) |
2512 | + * return The device of the window context |
2513 | + */ |
2514 | +UFDevice frame_frame_get_device(UFFrame frame); |
2515 | + |
2516 | +/** |
2517 | + * Get the window ID of a frame |
2518 | + * |
2519 | + * @param [in] frame The frame context object (const) |
2520 | + * @return The window server ID of the window of the frame |
2521 | + */ |
2522 | +UFWindowId frame_frame_get_window_id(UFFrame frame); |
2523 | + |
2524 | +/** |
2525 | + * Get the window server ID of a touch |
2526 | + * |
2527 | + * @param [in] touch The touch context object (const) |
2528 | + * @return The window server ID of the touch |
2529 | + */ |
2530 | +UFTouchId frame_touch_get_id(UFTouch touch); |
2531 | + |
2532 | +/** |
2533 | + * Get the state of a touch |
2534 | + * |
2535 | + * @param [in] touch The touch object (const) |
2536 | + * @return The state of the touch |
2537 | + */ |
2538 | +UFTouchState frame_touch_get_state(UFTouch touch); |
2539 | + |
2540 | +/** |
2541 | + * Get the X window coordinate of a touch |
2542 | + * |
2543 | + * @param [in] touch The touch object (const) |
2544 | + * @return The X window coordinate of the touch |
2545 | + */ |
2546 | +float frame_touch_get_window_x(UFTouch touch); |
2547 | + |
2548 | +/** |
2549 | + * Get the Y window coordinate of a touch |
2550 | + * |
2551 | + * @param [in] touch The touch object (const) |
2552 | + * @return The Y window coordinate of the touch |
2553 | + */ |
2554 | +float frame_touch_get_window_y(UFTouch touch); |
2555 | + |
2556 | +/** |
2557 | + * Get the X device coordinate of a touch |
2558 | + * |
2559 | + * @param [in] touch The touch object (const) |
2560 | + * @return The X device coordinate of the touch |
2561 | + */ |
2562 | +float frame_touch_get_device_x(UFTouch touch); |
2563 | + |
2564 | +/** |
2565 | + * Get the Y device coordinate of a touch |
2566 | + * |
2567 | + * @param [in] touch The touch object (const) |
2568 | + * @return The Y device coordinate of the touch |
2569 | + */ |
2570 | +float frame_touch_get_device_y(UFTouch touch); |
2571 | + |
2572 | +/** |
2573 | + * Get the time of a touch state change |
2574 | + * |
2575 | + * @param [in] touch The touch object (const) |
2576 | + * @return The time of the touch state change |
2577 | + */ |
2578 | +uint64_t frame_touch_get_time(UFTouch touch); |
2579 | + |
2580 | +/** |
2581 | + * Get the start time of a touch |
2582 | + * |
2583 | + * @param [in] touch The touch object (const) |
2584 | + * @return The start time of the touch |
2585 | + */ |
2586 | +uint64_t frame_touch_get_start_time(UFTouch touch); |
2587 | + |
2588 | +/** @} */ |
2589 | + |
2590 | +/** @} */ |
2591 | |
2592 | #ifdef __cplusplus |
2593 | } |
2594 | #endif |
2595 | |
2596 | -#endif |
2597 | +#endif // UTOUCH_FRAME_UTOUCH_FRAME_H_ |
2598 | |
2599 | === added file 'include/utouch/frame_x11.h' |
2600 | --- include/utouch/frame_x11.h 1970-01-01 00:00:00 +0000 |
2601 | +++ include/utouch/frame_x11.h 2011-11-21 22:46:23 +0000 |
2602 | @@ -0,0 +1,136 @@ |
2603 | +/***************************************************************************** |
2604 | + * |
2605 | + * utouch-frame - Touch Frame Library |
2606 | + * |
2607 | + * Copyright (C) 2010-2011 Canonical Ltd. |
2608 | + * |
2609 | + * This program is free software: you can redistribute it and/or modify it |
2610 | + * under the terms of the GNU General Public License as published by the |
2611 | + * Free Software Foundation, either version 3 of the License, or (at your |
2612 | + * option) any later version. |
2613 | + * |
2614 | + * This program is distributed in the hope that it will be useful, but |
2615 | + * WITHOUT ANY WARRANTY; without even the implied warranty of |
2616 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
2617 | + * General Public License for more details. |
2618 | + * |
2619 | + * You should have received a copy of the GNU General Public License along |
2620 | + * with this program. If not, see <http://www.gnu.org/licenses/>. |
2621 | + * |
2622 | + ****************************************************************************/ |
2623 | + |
2624 | +#ifndef UTOUCH_FRAME_XI2_H |
2625 | +#define UTOUCH_FRAME_XI2_H |
2626 | + |
2627 | +#include <utouch/frame.h> |
2628 | +#include <X11/Xlib.h> |
2629 | + |
2630 | +#ifdef __cplusplus |
2631 | +extern "C" { |
2632 | +#endif |
2633 | + |
2634 | +/** |
2635 | + * @addtogroup v2 |
2636 | + * @{ |
2637 | + * |
2638 | + * @defgroup v2-x11 X11 |
2639 | + * @{ |
2640 | + */ |
2641 | + |
2642 | +/** |
2643 | + * Create a new uTouch Frame context for an X11 window server |
2644 | + * |
2645 | + * @param [in] display The X11 server connection |
2646 | + * @param [out] handle The object for the new uTouch Frame instance |
2647 | + * @return UFStatusSuccess, UFStatusErrorResources, or UFStatusErrorGeneric |
2648 | + */ |
2649 | +UFStatus frame_x11_new(Display *display, UFHandle *handle); |
2650 | + |
2651 | +/** |
2652 | + * Delete an X11 uTouch Frame instance |
2653 | + * |
2654 | + * @param [in] handle The object for the uTouch Frame instance |
2655 | + */ |
2656 | +void frame_x11_delete(UFHandle handle); |
2657 | + |
2658 | +/** |
2659 | + * Process an X11 input event into the uTouch Frame instance |
2660 | + * |
2661 | + * @param [in] handle The uTouch Frame context |
2662 | + * @param [in] event The X11 generic input event cookie |
2663 | + * @return UFStatusSuccess or UFStatusErrorGeneric |
2664 | + * |
2665 | + * The uTouch-Frame library can process XIDeviceEvent and |
2666 | + * XIHierarchyEvent events. Processing these events requires additional event |
2667 | + * data. This data is obtained by calling XGetEventData on the XEvent. See the |
2668 | + * XGetEventData and XFreeEventData man pages for more details. |
2669 | + * |
2670 | + * This function will silently ignore any events other than those listed above. |
2671 | + */ |
2672 | +UFStatus frame_x11_process_event(UFHandle handle, XGenericEventCookie *xcookie); |
2673 | + |
2674 | +/** |
2675 | + * Accept ownership of a touch |
2676 | + * |
2677 | + * @param [in] device The device object for the touch (const) |
2678 | + * @param [in] window The window to accept the touch for |
2679 | + * @param [in] touch_id The touch ID object for the touch |
2680 | + * @return UFStatusSuccess, UFStatusErrorInvalidTouch |
2681 | + */ |
2682 | +UFStatus frame_x11_accept_touch(UFDevice device, UFWindowId window, |
2683 | + UFTouchId touch_id); |
2684 | + |
2685 | +/** |
2686 | + * Reject ownership of a touch |
2687 | + * |
2688 | + * @param [in] device The device object for the touch (const) |
2689 | + * @param [in] window The window to reject the touch for |
2690 | + * @param [in] touch_id The touch ID object for the touch |
2691 | + * @return UFStatusSuccess, UFStatusErrorInvalidTouch |
2692 | + */ |
2693 | +UFStatus frame_x11_reject_touch(UFDevice device, UFWindowId window, |
2694 | + UFTouchId touch_id); |
2695 | + |
2696 | +/** |
2697 | + * Get the X11 Window ID of a uTouch Frame window |
2698 | + * |
2699 | + * @param [in] window_id The uTouch Frame window ID object (const) |
2700 | + * @return The X11 window ID |
2701 | + */ |
2702 | +Window frame_x11_get_window_id(UFWindowId window_id); |
2703 | + |
2704 | +/** |
2705 | + * Create a new uTouch Frame window ID object for an X11 window ID |
2706 | + * |
2707 | + * @param [in] id The X11 ID of the window |
2708 | + * @return The new uTouch Frame window ID object |
2709 | + */ |
2710 | +UFWindowId frame_x11_create_window_id(Window id); |
2711 | + |
2712 | +/** |
2713 | + * Get the X11 touch ID of a uTouch Frame touch |
2714 | + * |
2715 | + * @param [in] touch_id The uTouch Frame touch ID object (const) |
2716 | + * @return The X11 touch ID |
2717 | + */ |
2718 | +unsigned int frame_x11_get_touch_id(UFTouchId touch_id); |
2719 | + |
2720 | +/** |
2721 | + * Create a new uTouch Frame touch ID object for an X11 touch ID |
2722 | + * |
2723 | + * @param [in] id The X11 ID of the touch |
2724 | + * @return The new uTouch Frame touch ID object |
2725 | + */ |
2726 | +UFTouchId frame_x11_create_touch_id(unsigned int id); |
2727 | + |
2728 | +/** |
2729 | + * @} |
2730 | + * |
2731 | + * @} |
2732 | + */ |
2733 | + |
2734 | +#ifdef __cplusplus |
2735 | +} |
2736 | +#endif |
2737 | + |
2738 | +#endif |
2739 | |
2740 | === modified file 'src/Makefile.am' |
2741 | --- src/Makefile.am 2011-06-13 20:40:50 +0000 |
2742 | +++ src/Makefile.am 2011-11-21 22:46:23 +0000 |
2743 | @@ -1,3 +1,4 @@ |
2744 | +AUTOMAKE_OPTIONS = subdir-objects |
2745 | |
2746 | version_script = $(srcdir)/libutouch-frame.ver |
2747 | |
2748 | @@ -11,14 +12,16 @@ |
2749 | $(EVEMU_LIBS) \ |
2750 | $(MTDEV_LIBS) |
2751 | |
2752 | +v1dir = v1 |
2753 | + |
2754 | libutouch_frame_la_SOURCES = \ |
2755 | - frame-impl.h \ |
2756 | - frame.c \ |
2757 | - frame-mtdev.c |
2758 | + v1/frame-impl.h \ |
2759 | + v1/frame.c \ |
2760 | + v1/frame-mtdev.c |
2761 | |
2762 | AM_CFLAGS = $(CWARNFLAGS) |
2763 | |
2764 | -INCLUDES = -I$(top_srcdir)/include/ |
2765 | +INCLUDES = -I$(top_srcdir)/include/ -I$(top_srcdir)/src |
2766 | |
2767 | libutouch_frameincludedir = $(includedir)/utouch |
2768 | libutouch_frameinclude_HEADERS = \ |
2769 | @@ -28,10 +31,41 @@ |
2770 | if HAVE_XI |
2771 | |
2772 | libutouch_frame_la_LDFLAGS += $(XINPUT_LIBS) $(X11_LIBS) |
2773 | -libutouch_frame_la_SOURCES += frame-xi2.c |
2774 | +libutouch_frame_la_SOURCES += v1/frame-xi2.c |
2775 | libutouch_frameinclude_HEADERS += $(top_srcdir)/include/utouch/frame-xi2.h |
2776 | |
2777 | +# The following is for uTouch-Frame v2 |
2778 | +v2dir = v2 |
2779 | + |
2780 | +libutouch_frame_la_SOURCES += \ |
2781 | + v2/axis.h \ |
2782 | + v2/axis.cpp \ |
2783 | + v2/device.h \ |
2784 | + v2/device.cpp \ |
2785 | + v2/event.h \ |
2786 | + v2/event.cpp \ |
2787 | + v2/frame.h \ |
2788 | + v2/frame.cpp \ |
2789 | + v2/handle.h \ |
2790 | + v2/handle.cpp \ |
2791 | + v2/mem_pool.h \ |
2792 | + v2/mem_pool_class.h \ |
2793 | + v2/touch.h \ |
2794 | + v2/touch.cpp \ |
2795 | + v2/value.h \ |
2796 | + v2/value.cpp \ |
2797 | + v2/window.h \ |
2798 | + v2/window.cpp \ |
2799 | + v2/x11/device_x11.h \ |
2800 | + v2/x11/device_x11.cpp \ |
2801 | + v2/x11/frame_x11.cpp \ |
2802 | + v2/x11/handle_x11.h \ |
2803 | + v2/x11/handle_x11.cpp \ |
2804 | + v2/x11/window_x11.h \ |
2805 | + v2/x11/window_x11.cpp |
2806 | + |
2807 | +libutouch_frameinclude_HEADERS += $(top_srcdir)/include/utouch/frame_x11.h |
2808 | + |
2809 | endif |
2810 | |
2811 | EXTRA_DIST = $(version_script) |
2812 | - |
2813 | |
2814 | === modified file 'src/libutouch-frame.ver' |
2815 | --- src/libutouch-frame.ver 2011-08-31 16:24:35 +0000 |
2816 | +++ src/libutouch-frame.ver 2011-11-21 22:46:23 +0000 |
2817 | @@ -24,3 +24,50 @@ |
2818 | utouch_frame_set_coordinate_transform_callback; |
2819 | } UTOUCH_FRAME_1.1; |
2820 | |
2821 | +UTOUCH_FRAME_2.0 { |
2822 | + global: |
2823 | + frame_get_fd; |
2824 | + frame_get_event; |
2825 | + frame_device_get_property; |
2826 | + frame_device_get_axis_by_index; |
2827 | + frame_device_get_axis_by_type; |
2828 | + frame_axis_get_type; |
2829 | + frame_axis_get_minimum; |
2830 | + frame_axis_get_maximum; |
2831 | + frame_axis_get_resolution; |
2832 | + frame_event_ref; |
2833 | + frame_event_unref; |
2834 | + frame_event_get_property; |
2835 | + frame_frame_get_property; |
2836 | + frame_frame_get_touch_by_index; |
2837 | + frame_frame_get_touch_by_id; |
2838 | + frame_frame_get_previous_touch_property; |
2839 | + frame_frame_get_previous_touch_value; |
2840 | + frame_touch_get_property; |
2841 | + frame_touch_get_value; |
2842 | + |
2843 | + frame_event_get_type; |
2844 | + frame_event_get_time; |
2845 | + frame_device_get_num_axes; |
2846 | + frame_frame_get_num_touches; |
2847 | + frame_frame_get_window_id; |
2848 | + frame_frame_get_device; |
2849 | + frame_touch_get_id; |
2850 | + frame_touch_get_state; |
2851 | + frame_touch_get_window_x; |
2852 | + frame_touch_get_window_y; |
2853 | + frame_touch_get_device_x; |
2854 | + frame_touch_get_device_y; |
2855 | + frame_touch_get_time; |
2856 | + frame_touch_get_start_time; |
2857 | + |
2858 | + frame_x11_new; |
2859 | + frame_x11_delete; |
2860 | + frame_x11_process_event; |
2861 | + frame_x11_accept_touch; |
2862 | + frame_x11_reject_touch; |
2863 | + frame_x11_get_window_id; |
2864 | + frame_x11_create_window_id; |
2865 | + frame_x11_get_touch_id; |
2866 | + frame_x11_create_touch_id; |
2867 | +} UTOUCH_FRAME_1.2; |
2868 | |
2869 | === added directory 'src/v1' |
2870 | === renamed file 'src/frame-impl.h' => 'src/v1/frame-impl.h' |
2871 | === renamed file 'src/frame-mtdev.c' => 'src/v1/frame-mtdev.c' |
2872 | === renamed file 'src/frame-xi2.c' => 'src/v1/frame-xi2.c' |
2873 | === renamed file 'src/frame.c' => 'src/v1/frame.c' |
2874 | === added directory 'src/v2' |
2875 | === added file 'src/v2/axis.cpp' |
2876 | --- src/v2/axis.cpp 1970-01-01 00:00:00 +0000 |
2877 | +++ src/v2/axis.cpp 2011-11-21 22:46:23 +0000 |
2878 | @@ -0,0 +1,54 @@ |
2879 | +/***************************************************************************** |
2880 | + * |
2881 | + * utouch-frame - Touch Frame Library |
2882 | + * |
2883 | + * Copyright (C) 2011 Canonical Ltd. |
2884 | + * |
2885 | + * This program is free software: you can redistribute it and/or modify it |
2886 | + * under the terms of the GNU General Public License as published by the |
2887 | + * Free Software Foundation, either version 3 of the License, or (at your |
2888 | + * option) any later version. |
2889 | + * |
2890 | + * This program is distributed in the hope that it will be useful, but |
2891 | + * WITHOUT ANY WARRANTY; without even the implied warranty of |
2892 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
2893 | + * General Public License for more details. |
2894 | + * |
2895 | + * You should have received a copy of the GNU General Public License along |
2896 | + * with this program. If not, see <http://www.gnu.org/licenses/>. |
2897 | + * |
2898 | + ****************************************************************************/ |
2899 | + |
2900 | +#include "v2/axis.h" |
2901 | + |
2902 | +#include "v2/value.h" |
2903 | + |
2904 | +namespace utouch { |
2905 | +namespace frame { |
2906 | + |
2907 | +UFAxis::UFAxis(UFAxisType type, float min, float max, float resolution) |
2908 | + : type_(type), min_(min), max_(max), resolution_(resolution) { |
2909 | +} |
2910 | + |
2911 | +} // namespace frame |
2912 | +} // namespace utouch |
2913 | + |
2914 | +extern "C" { |
2915 | + |
2916 | +UFAxisType frame_axis_get_type(UFAxis axis) { |
2917 | + return static_cast<const utouch::frame::UFAxis*>(axis)->type(); |
2918 | +} |
2919 | + |
2920 | +float frame_axis_get_minimum(UFAxis axis) { |
2921 | + return static_cast<const utouch::frame::UFAxis*>(axis)->min(); |
2922 | +} |
2923 | + |
2924 | +float frame_axis_get_maximum(UFAxis axis) { |
2925 | + return static_cast<const utouch::frame::UFAxis*>(axis)->max(); |
2926 | +} |
2927 | + |
2928 | +float frame_axis_get_resolution(UFAxis axis) { |
2929 | + return static_cast<const utouch::frame::UFAxis*>(axis)->resolution(); |
2930 | +} |
2931 | + |
2932 | +} // extern "C" |
2933 | |
2934 | === added file 'src/v2/axis.h' |
2935 | --- src/v2/axis.h 1970-01-01 00:00:00 +0000 |
2936 | +++ src/v2/axis.h 2011-11-21 22:46:23 +0000 |
2937 | @@ -0,0 +1,55 @@ |
2938 | +/***************************************************************************** |
2939 | + * |
2940 | + * utouch-frame - Touch Frame Library |
2941 | + * |
2942 | + * Copyright (C) 2011 Canonical Ltd. |
2943 | + * |
2944 | + * This program is free software: you can redistribute it and/or modify it |
2945 | + * under the terms of the GNU General Public License as published by the |
2946 | + * Free Software Foundation, either version 3 of the License, or (at your |
2947 | + * option) any later version. |
2948 | + * |
2949 | + * This program is distributed in the hope that it will be useful, but |
2950 | + * WITHOUT ANY WARRANTY; without even the implied warranty of |
2951 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
2952 | + * General Public License for more details. |
2953 | + * |
2954 | + * You should have received a copy of the GNU General Public License along |
2955 | + * with this program. If not, see <http://www.gnu.org/licenses/>. |
2956 | + * |
2957 | + ****************************************************************************/ |
2958 | + |
2959 | +#ifndef UTOUCH_FRAME_AXIS_H_ |
2960 | +#define UTOUCH_FRAME_AXIS_H_ |
2961 | + |
2962 | +#include "utouch/frame.h" |
2963 | +#include "v2/property.h" |
2964 | + |
2965 | +struct UFAxis_ {}; |
2966 | + |
2967 | +namespace utouch { |
2968 | +namespace frame { |
2969 | + |
2970 | +class UFAxis : public UFAxis_ { |
2971 | + public: |
2972 | + UFAxis(UFAxisType type, float min, float max, float resolution); |
2973 | + |
2974 | + UFAxisType type() const { return type_; } |
2975 | + float min() const { return min_; } |
2976 | + float max() const { return max_; } |
2977 | + float resolution() const { return resolution_; } |
2978 | + |
2979 | + UFAxis(const UFAxis&) = delete; |
2980 | + UFAxis& operator=(const UFAxis&) = delete; |
2981 | + |
2982 | + private: |
2983 | + const UFAxisType type_; |
2984 | + const float min_; |
2985 | + const float max_; |
2986 | + const float resolution_; |
2987 | +}; |
2988 | + |
2989 | +} // namespace frame |
2990 | +} // namespace utouch |
2991 | + |
2992 | +#endif // UTOUCH_FRAME_AXIS_H_ |
2993 | |
2994 | === added file 'src/v2/device.cpp' |
2995 | --- src/v2/device.cpp 1970-01-01 00:00:00 +0000 |
2996 | +++ src/v2/device.cpp 2011-11-21 22:46:23 +0000 |
2997 | @@ -0,0 +1,87 @@ |
2998 | +/***************************************************************************** |
2999 | + * |
3000 | + * utouch-frame - Touch Frame Library |
3001 | + * |
3002 | + * Copyright (C) 2011 Canonical Ltd. |
3003 | + * |
3004 | + * This program is free software: you can redistribute it and/or modify it |
3005 | + * under the terms of the GNU General Public License as published by the |
3006 | + * Free Software Foundation, either version 3 of the License, or (at your |
3007 | + * option) any later version. |
3008 | + * |
3009 | + * This program is distributed in the hope that it will be useful, but |
3010 | + * WITHOUT ANY WARRANTY; without even the implied warranty of |
3011 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
3012 | + * General Public License for more details. |
3013 | + * |
3014 | + * You should have received a copy of the GNU General Public License along |
3015 | + * with this program. If not, see <http://www.gnu.org/licenses/>. |
3016 | + * |
3017 | + ****************************************************************************/ |
3018 | + |
3019 | +#include "v2/device.h" |
3020 | + |
3021 | +#include <assert.h> |
3022 | + |
3023 | +#include "v2/axis.h" |
3024 | + |
3025 | +namespace utouch { |
3026 | +namespace frame { |
3027 | + |
3028 | +UFStatus UFDevice::GetAxisByIndex(unsigned int index, ::UFAxis* axis) const { |
3029 | + if (index >= axes_.size()) |
3030 | + return UFStatusErrorInvalidAxis; |
3031 | + |
3032 | + auto it = axes_.cbegin(); |
3033 | + std::advance(it, index); |
3034 | + |
3035 | + *axis = it->second.get(); |
3036 | + |
3037 | + return UFStatusSuccess; |
3038 | +} |
3039 | + |
3040 | +UFStatus UFDevice::GetAxisByType(UFAxisType type, ::UFAxis* axis) const { |
3041 | + auto it = axes_.find(type); |
3042 | + if (it == axes_.end()) |
3043 | + return UFStatusErrorInvalidAxis; |
3044 | + |
3045 | + *axis = it->second.get(); |
3046 | + |
3047 | + return UFStatusSuccess; |
3048 | +} |
3049 | + |
3050 | +} // namespace frame |
3051 | +} // namespace utouch |
3052 | + |
3053 | +extern "C" { |
3054 | + |
3055 | +UFStatus frame_device_get_property(UFDevice device, UFDeviceProperty property, |
3056 | + void* data) { |
3057 | + return static_cast<const utouch::frame::UFDevice*>(device)->GetProperty( |
3058 | + property, |
3059 | + data); |
3060 | +} |
3061 | + |
3062 | +UFStatus frame_device_get_axis_by_index(UFDevice device, unsigned int index, |
3063 | + UFAxis* axis) { |
3064 | + return static_cast<const utouch::frame::UFDevice*>(device)->GetAxisByIndex( |
3065 | + index, |
3066 | + axis); |
3067 | +} |
3068 | + |
3069 | +UFStatus frame_device_get_axis_by_type(UFDevice device, UFAxisType type, |
3070 | + UFAxis* axis) { |
3071 | + return static_cast<const utouch::frame::UFDevice*>(device)->GetAxisByType( |
3072 | + type, |
3073 | + axis); |
3074 | +} |
3075 | + |
3076 | +unsigned int frame_device_get_num_axes(UFDevice device) { |
3077 | + unsigned int num_axes; |
3078 | + UFStatus status = frame_device_get_property(device, UFDevicePropertyNumAxes, |
3079 | + &num_axes); |
3080 | + assert(status == UFStatusSuccess); |
3081 | + return num_axes; |
3082 | +} |
3083 | + |
3084 | +} // extern "C" |
3085 | |
3086 | === added file 'src/v2/device.h' |
3087 | --- src/v2/device.h 1970-01-01 00:00:00 +0000 |
3088 | +++ src/v2/device.h 2011-11-21 22:46:23 +0000 |
3089 | @@ -0,0 +1,56 @@ |
3090 | +/***************************************************************************** |
3091 | + * |
3092 | + * utouch-frame - Touch Frame Library |
3093 | + * |
3094 | + * Copyright (C) 2011 Canonical Ltd. |
3095 | + * |
3096 | + * This program is free software: you can redistribute it and/or modify it |
3097 | + * under the terms of the GNU General Public License as published by the |
3098 | + * Free Software Foundation, either version 3 of the License, or (at your |
3099 | + * option) any later version. |
3100 | + * |
3101 | + * This program is distributed in the hope that it will be useful, but |
3102 | + * WITHOUT ANY WARRANTY; without even the implied warranty of |
3103 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
3104 | + * General Public License for more details. |
3105 | + * |
3106 | + * You should have received a copy of the GNU General Public License along |
3107 | + * with this program. If not, see <http://www.gnu.org/licenses/>. |
3108 | + * |
3109 | + ****************************************************************************/ |
3110 | + |
3111 | +#ifndef UTOUCH_FRAME_DEVICE_H_ |
3112 | +#define UTOUCH_FRAME_DEVICE_H_ |
3113 | + |
3114 | +#include <map> |
3115 | +#include <memory> |
3116 | + |
3117 | +#include "utouch/frame.h" |
3118 | +#include "v2/axis.h" |
3119 | +#include "v2/typedefs.h" |
3120 | + |
3121 | +struct UFDevice_ {}; |
3122 | + |
3123 | +namespace utouch { |
3124 | +namespace frame { |
3125 | + |
3126 | +class UFDevice : public UFDevice_, public Property<UFDeviceProperty> { |
3127 | + public: |
3128 | + UFDevice() {} |
3129 | + |
3130 | + UFStatus GetAxisByIndex(unsigned int index, ::UFAxis* axis) const; |
3131 | + UFStatus GetAxisByType(UFAxisType type, ::UFAxis* axis) const; |
3132 | + |
3133 | + UFDevice(const UFDevice&) = delete; |
3134 | + UFDevice& operator=(const UFDevice&) = delete; |
3135 | + |
3136 | + protected: |
3137 | + typedef std::unique_ptr<UFAxis> UniqueUFAxis; |
3138 | + |
3139 | + std::map<UFAxisType, UniqueUFAxis> axes_; |
3140 | +}; |
3141 | + |
3142 | +} // namespace frame |
3143 | +} // namespace utouch |
3144 | + |
3145 | +#endif // UTOUCH_FRAME_DEVICE_H_ |
3146 | |
3147 | === added file 'src/v2/event.cpp' |
3148 | --- src/v2/event.cpp 1970-01-01 00:00:00 +0000 |
3149 | +++ src/v2/event.cpp 2011-11-21 22:46:23 +0000 |
3150 | @@ -0,0 +1,106 @@ |
3151 | +/***************************************************************************** |
3152 | + * |
3153 | + * utouch-frame - Touch Frame Library |
3154 | + * |
3155 | + * Copyright (C) 2011 Canonical Ltd. |
3156 | + * |
3157 | + * This program is free software: you can redistribute it and/or modify it |
3158 | + * under the terms of the GNU General Public License as published by the |
3159 | + * Free Software Foundation, either version 3 of the License, or (at your |
3160 | + * option) any later version. |
3161 | + * |
3162 | + * This program is distributed in the hope that it will be useful, but |
3163 | + * WITHOUT ANY WARRANTY; without even the implied warranty of |
3164 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
3165 | + * General Public License for more details. |
3166 | + * |
3167 | + * You should have received a copy of the GNU General Public License along |
3168 | + * with this program. If not, see <http://www.gnu.org/licenses/>. |
3169 | + * |
3170 | + ****************************************************************************/ |
3171 | + |
3172 | +#include <assert.h> |
3173 | + |
3174 | +#include "v2/event.h" |
3175 | +#include "v2/frame.h" |
3176 | + |
3177 | +namespace utouch { |
3178 | +namespace frame { |
3179 | + |
3180 | +UFEvent::UFEvent(UFEventType type, const Value* data, uint64_t time) |
3181 | + : ref_count_(1) { |
3182 | + const Value* value; |
3183 | + |
3184 | + value = new Value(type); |
3185 | + InsertProperty(UFEventPropertyType, value); |
3186 | + |
3187 | + switch (type) { |
3188 | + case UFEventTypeDeviceAdded: |
3189 | + case UFEventTypeDeviceRemoved: |
3190 | + InsertProperty(UFEventPropertyDevice, data); |
3191 | + break; |
3192 | + |
3193 | + case UFEventTypeFrame: |
3194 | + InsertProperty(UFEventPropertyFrame, data); |
3195 | + break; |
3196 | + } |
3197 | + |
3198 | + value = new Value(time); |
3199 | + InsertProperty(UFEventPropertyTime, value); |
3200 | +} |
3201 | + |
3202 | +void UFEvent::Ref() { |
3203 | + ++ref_count_; |
3204 | +} |
3205 | + |
3206 | +void UFEvent::Unref() { |
3207 | + --ref_count_; |
3208 | + if (ref_count_ == 0) |
3209 | + delete this; |
3210 | +} |
3211 | + |
3212 | +UFEvent::~UFEvent() { |
3213 | + ::UFFrame frame; |
3214 | + |
3215 | + if (GetProperty(UFEventPropertyFrame, &frame) == UFStatusSuccess) |
3216 | + static_cast<utouch::frame::UFFrame*>(frame)->ReleasePreviousFrame(); |
3217 | +} |
3218 | + |
3219 | +} // namespace frame |
3220 | +} // namespace utouch |
3221 | + |
3222 | +extern "C" { |
3223 | + |
3224 | +void frame_event_ref(UFEvent event) { |
3225 | + static_cast<utouch::frame::UFEvent*>(event)->Ref(); |
3226 | +} |
3227 | + |
3228 | +void frame_event_unref(UFEvent event) { |
3229 | + static_cast<utouch::frame::UFEvent*>(event)->Unref(); |
3230 | +} |
3231 | + |
3232 | +UFStatus frame_event_get_property(UFEvent event, UFEventProperty property, |
3233 | + void *data) { |
3234 | + return static_cast<const utouch::frame::UFEvent*>(event)->GetProperty(property, |
3235 | + data); |
3236 | +} |
3237 | + |
3238 | +UFEventType frame_event_get_type(UFEvent event) { |
3239 | + UFEventType type; |
3240 | + const utouch::frame::UFEvent* ufevent = |
3241 | + static_cast<const utouch::frame::UFEvent*>(event); |
3242 | + UFStatus status = ufevent->GetProperty(UFEventPropertyType, &type); |
3243 | + assert(status == UFStatusSuccess); |
3244 | + return type; |
3245 | +} |
3246 | + |
3247 | +uint64_t frame_event_get_time(UFEvent event) { |
3248 | + uint64_t time; |
3249 | + const utouch::frame::UFEvent* ufevent = |
3250 | + static_cast<const utouch::frame::UFEvent*>(event); |
3251 | + UFStatus status = ufevent->GetProperty(UFEventPropertyTime, &time); |
3252 | + assert(status == UFStatusSuccess); |
3253 | + return time; |
3254 | +} |
3255 | + |
3256 | +} // extern "C" |
3257 | |
3258 | === added file 'src/v2/event.h' |
3259 | --- src/v2/event.h 1970-01-01 00:00:00 +0000 |
3260 | +++ src/v2/event.h 2011-11-21 22:46:23 +0000 |
3261 | @@ -0,0 +1,55 @@ |
3262 | +/***************************************************************************** |
3263 | + * |
3264 | + * utouch-frame - Touch Frame Library |
3265 | + * |
3266 | + * Copyright (C) 2011 Canonical Ltd. |
3267 | + * |
3268 | + * This program is free software: you can redistribute it and/or modify it |
3269 | + * under the terms of the GNU General Public License as published by the |
3270 | + * Free Software Foundation, either version 3 of the License, or (at your |
3271 | + * option) any later version. |
3272 | + * |
3273 | + * This program is distributed in the hope that it will be useful, but |
3274 | + * WITHOUT ANY WARRANTY; without even the implied warranty of |
3275 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
3276 | + * General Public License for more details. |
3277 | + * |
3278 | + * You should have received a copy of the GNU General Public License along |
3279 | + * with this program. If not, see <http://www.gnu.org/licenses/>. |
3280 | + * |
3281 | + ****************************************************************************/ |
3282 | + |
3283 | +#ifndef UTOUCH_FRAME_EVENT_H_ |
3284 | +#define UTOUCH_FRAME_EVENT_H_ |
3285 | + |
3286 | +#include <stdint.h> |
3287 | + |
3288 | +#include "utouch/frame.h" |
3289 | +#include "v2/property.h" |
3290 | + |
3291 | +struct UFEvent_ {}; |
3292 | + |
3293 | +namespace utouch { |
3294 | +namespace frame { |
3295 | + |
3296 | +class Value; |
3297 | + |
3298 | +class UFEvent : public UFEvent_, public Property<UFEventProperty> { |
3299 | + public: |
3300 | + UFEvent(UFEventType type, const Value* data, uint64_t time); |
3301 | + ~UFEvent(); |
3302 | + |
3303 | + void Ref(); |
3304 | + void Unref(); |
3305 | + |
3306 | + UFEvent(const UFEvent&) = delete; |
3307 | + UFEvent& operator=(const UFEvent&) = delete; |
3308 | + |
3309 | + private: |
3310 | + unsigned int ref_count_; |
3311 | +}; |
3312 | + |
3313 | +} // namespace frame |
3314 | +} // namespace utouch |
3315 | + |
3316 | +#endif // UTOUCH_FRAME_EVENT_H |
3317 | |
3318 | === added file 'src/v2/frame.cpp' |
3319 | --- src/v2/frame.cpp 1970-01-01 00:00:00 +0000 |
3320 | +++ src/v2/frame.cpp 2011-11-21 22:46:23 +0000 |
3321 | @@ -0,0 +1,258 @@ |
3322 | +/***************************************************************************** |
3323 | + * |
3324 | + * utouch-frame - Touch Frame Library |
3325 | + * |
3326 | + * Copyright (C) 2011 Canonical Ltd. |
3327 | + * |
3328 | + * This program is free software: you can redistribute it and/or modify it |
3329 | + * under the terms of the GNU General Public License as published by the |
3330 | + * Free Software Foundation, either version 3 of the License, or (at your |
3331 | + * option) any later version. |
3332 | + * |
3333 | + * This program is distributed in the hope that it will be useful, but |
3334 | + * WITHOUT ANY WARRANTY; without even the implied warranty of |
3335 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
3336 | + * General Public License for more details. |
3337 | + * |
3338 | + * You should have received a copy of the GNU General Public License along |
3339 | + * with this program. If not, see <http://www.gnu.org/licenses/>. |
3340 | + * |
3341 | + ****************************************************************************/ |
3342 | + |
3343 | +#include "v2/frame.h" |
3344 | + |
3345 | +#include <assert.h> |
3346 | +#include <stdio.h> |
3347 | + |
3348 | +#include "v2/touch.h" |
3349 | +#include "v2/window.h" |
3350 | + |
3351 | +namespace utouch { |
3352 | +namespace frame { |
3353 | + |
3354 | +UFFrame::UFFrame(const SharedWindow& window, const SharedUFFrame& prev) |
3355 | + : prev_(prev), |
3356 | + window_(window) { |
3357 | + for (const SharedUFTouch& prev_touch : prev_->touches_array_) { |
3358 | + if (prev_touch->state() == UFTouchStateBegin) { |
3359 | + touches_map_[prev_touch->id()] = touches_array_.size(); |
3360 | + SharedUFTouch touch(prev->CopyTouch(prev_touch->id(), |
3361 | + UFTouchStateUpdate)); |
3362 | + touches_array_.push_back(touch); |
3363 | + } else if (prev_touch->state() == UFTouchStateUpdate) { |
3364 | + touches_map_[prev_touch->id()] = touches_array_.size(); |
3365 | + touches_array_.push_back(prev_touch); |
3366 | + } |
3367 | + } |
3368 | + |
3369 | + const Value* value = new Value(static_cast<int>(touches_map_.size())); |
3370 | + InsertProperty(UFFramePropertyNumTouches, value); |
3371 | + value = new Value(static_cast<int>(touches_map_.size())); |
3372 | + InsertProperty(UFFramePropertyActiveTouches, value); |
3373 | +} |
3374 | + |
3375 | +UFTouch* UFFrame::CopyTouch(UFTouchId touchid, UFTouchState new_state) const { |
3376 | + auto map_it = touches_map_.find(touchid); |
3377 | + if (map_it == touches_map_.end()) { |
3378 | + fprintf(stderr, "Failed to copy non-existent touch\n"); |
3379 | + return NULL; |
3380 | + } |
3381 | + |
3382 | + return new UFTouch(*touches_array_[map_it->second].get(), new_state); |
3383 | +} |
3384 | + |
3385 | +bool UFFrame::IsTouchOwned(UFTouchId touchid) { |
3386 | + auto map_it = touches_map_.find(touchid); |
3387 | + if (map_it == touches_map_.end()) |
3388 | + return false; |
3389 | + |
3390 | + SharedUFTouch& touch = touches_array_[map_it->second]; |
3391 | + |
3392 | + int owned; |
3393 | + UFStatus status = touch->GetProperty(UFTouchPropertyOwned, &owned); |
3394 | + if (status != UFStatusSuccess) |
3395 | + /* If the window server doesn't support touch ownership, then all touches |
3396 | + * are implicitly owned. */ |
3397 | + return true; |
3398 | + |
3399 | + return owned; |
3400 | +} |
3401 | + |
3402 | +namespace { |
3403 | + |
3404 | +void CopyStartTime(const SharedUFTouch& src, |
3405 | + const SharedUFTouch& dst) { |
3406 | + uint64_t start_time = 0; |
3407 | + UFStatus status = src->GetProperty(UFTouchPropertyStartTime, &start_time); |
3408 | + assert(status == UFStatusSuccess); |
3409 | + const Value* value = new Value(start_time); |
3410 | + dst->InsertProperty(UFTouchPropertyStartTime, value); |
3411 | +} |
3412 | + |
3413 | +} // namespace |
3414 | + |
3415 | +void UFFrame::UpdateTouch(const SharedUFTouch& touch) { |
3416 | + auto map_it = touches_map_.find(touch->id()); |
3417 | + |
3418 | + switch (touch->state()) { |
3419 | + case UFTouchStateBegin: |
3420 | + if (map_it != touches_map_.end()) { |
3421 | + CopyStartTime(touches_array_[map_it->second], touch); |
3422 | + touches_array_[map_it->second] = touch; |
3423 | + } else { |
3424 | + touches_map_[touch->id()] = touches_array_.size(); |
3425 | + touches_array_.push_back(touch); |
3426 | + |
3427 | + const Value *value = new Value(static_cast<int>(touches_map_.size())); |
3428 | + InsertProperty(UFFramePropertyNumTouches, value); |
3429 | + value = new Value(static_cast<int>(touches_map_.size())); |
3430 | + InsertProperty(UFFramePropertyActiveTouches, value); |
3431 | + } |
3432 | + break; |
3433 | + |
3434 | + case UFTouchStateUpdate: { |
3435 | + case UFTouchStateEnd: |
3436 | + if (map_it == touches_map_.end()) { |
3437 | + fprintf(stderr, "Warning: ignoring update for unknown touch %ju\n", |
3438 | + touch->id()); |
3439 | + break; |
3440 | + } |
3441 | + |
3442 | + CopyStartTime(touches_array_[map_it->second], touch); |
3443 | + touches_array_[map_it->second] = touch; |
3444 | + break; |
3445 | + } |
3446 | + } |
3447 | +} |
3448 | + |
3449 | +bool UFFrame::IsEnded() const { |
3450 | + for (const SharedUFTouch& touch : touches_array_) |
3451 | + if (touch->state() != UFTouchStateEnd) |
3452 | + return false; |
3453 | + |
3454 | + return true; |
3455 | +} |
3456 | + |
3457 | +UFStatus UFFrame::GetPreviousTouchProperty(const UFTouch* touch, |
3458 | + UFTouchProperty property, |
3459 | + void* value) const { |
3460 | + if (!prev_) |
3461 | + return UFStatusErrorInvalidTouch; |
3462 | + |
3463 | + auto it = prev_->touches_map_.find(touch->id()); |
3464 | + if (it == prev_->touches_map_.end()) |
3465 | + return UFStatusErrorInvalidTouch; |
3466 | + |
3467 | + return prev_->touches_array_[it->second]->GetProperty(property, value); |
3468 | +} |
3469 | + |
3470 | +UFStatus UFFrame::GetPreviousTouchValue(const UFTouch* touch, UFAxisType type, |
3471 | + float* value) const { |
3472 | + if (!prev_) |
3473 | + return UFStatusErrorInvalidTouch; |
3474 | + |
3475 | + auto it = prev_->touches_map_.find(touch->id()); |
3476 | + if (it == prev_->touches_map_.end()) |
3477 | + return UFStatusErrorInvalidTouch; |
3478 | + |
3479 | + return prev_->touches_array_[it->second]->GetValue(type, value); |
3480 | +} |
3481 | + |
3482 | +UFStatus UFFrame::GetTouchByIndex(unsigned int index, ::UFTouch* touch) const { |
3483 | + if (index >= touches_array_.size()) |
3484 | + return UFStatusErrorInvalidTouch; |
3485 | + |
3486 | + *touch = touches_array_[index].get(); |
3487 | + return UFStatusSuccess; |
3488 | +} |
3489 | + |
3490 | +UFStatus UFFrame::GetTouchById(UFTouchId touch_id, ::UFTouch* touch) const { |
3491 | + auto it = touches_map_.find(touch_id); |
3492 | + if (it == touches_map_.end()) |
3493 | + return UFStatusErrorInvalidTouch; |
3494 | + |
3495 | + *touch = touches_array_[it->second].get(); |
3496 | + |
3497 | + return UFStatusSuccess; |
3498 | +} |
3499 | + |
3500 | +void UFFrame::ReleasePreviousFrame() { |
3501 | + prev_.reset(); |
3502 | +} |
3503 | + |
3504 | +} // namespace frame |
3505 | +} // namespace utouch |
3506 | + |
3507 | +extern "C" { |
3508 | + |
3509 | +UFStatus frame_frame_get_property(UFFrame frame, UFFrameProperty property, |
3510 | + void *value) { |
3511 | + const utouch::frame::UFFrame* ufframe = |
3512 | + static_cast<const utouch::frame::UFFrame*>(frame); |
3513 | + return ufframe->GetProperty(property, value); |
3514 | +} |
3515 | + |
3516 | +UFStatus frame_frame_get_touch_by_index(UFFrame frame, unsigned int index, |
3517 | + UFTouch *touch) { |
3518 | + const utouch::frame::UFFrame* ufframe = |
3519 | + static_cast<const utouch::frame::UFFrame*>(frame); |
3520 | + return ufframe->GetTouchByIndex(index, touch); |
3521 | +} |
3522 | + |
3523 | +UFStatus frame_frame_get_touch_by_id(UFFrame frame, UFTouchId touch_id, |
3524 | + UFTouch *touch) { |
3525 | + const utouch::frame::UFFrame* ufframe = |
3526 | + static_cast<const utouch::frame::UFFrame*>(frame); |
3527 | + return ufframe->GetTouchById(touch_id, touch); |
3528 | +} |
3529 | + |
3530 | +UFStatus frame_frame_get_previous_touch_property(UFFrame frame, UFTouch touch, |
3531 | + UFTouchProperty property, |
3532 | + void *value) { |
3533 | + const utouch::frame::UFFrame* ufframe = |
3534 | + static_cast<const utouch::frame::UFFrame*>(frame); |
3535 | + return ufframe->GetPreviousTouchProperty( |
3536 | + static_cast<const utouch::frame::UFTouch*>(touch), |
3537 | + property, |
3538 | + value); |
3539 | +} |
3540 | + |
3541 | +UFStatus frame_frame_get_previous_touch_value(UFFrame frame, UFTouch touch, |
3542 | + UFAxisType type, float *value) { |
3543 | + const utouch::frame::UFFrame* ufframe = |
3544 | + static_cast<const utouch::frame::UFFrame*>(frame); |
3545 | + return ufframe->GetPreviousTouchValue( |
3546 | + static_cast<const utouch::frame::UFTouch*>(touch), |
3547 | + type, |
3548 | + value); |
3549 | +} |
3550 | + |
3551 | +UFWindowId frame_frame_get_window_id(UFFrame frame) { |
3552 | + UFWindowId window_id; |
3553 | + const utouch::frame::UFFrame* ufframe = |
3554 | + static_cast<const utouch::frame::UFFrame*>(frame); |
3555 | + UFStatus status = ufframe->GetProperty(UFFramePropertyWindowId, &window_id); |
3556 | + assert(status == UFStatusSuccess); |
3557 | + return window_id; |
3558 | +} |
3559 | + |
3560 | +uint32_t frame_frame_get_num_touches(UFFrame frame) { |
3561 | + uint64_t num_touches; |
3562 | + const utouch::frame::UFFrame* ufframe = |
3563 | + static_cast<const utouch::frame::UFFrame*>(frame); |
3564 | + UFStatus status = ufframe->GetProperty(UFFramePropertyNumTouches, |
3565 | + &num_touches); |
3566 | + assert(status == UFStatusSuccess); |
3567 | + return num_touches; |
3568 | +} |
3569 | + |
3570 | +UFDevice frame_frame_get_device(UFFrame frame) { |
3571 | + UFDevice device; |
3572 | + const utouch::frame::UFFrame* ufframe = |
3573 | + static_cast<const utouch::frame::UFFrame*>(frame); |
3574 | + UFStatus status = ufframe->GetProperty(UFFramePropertyDevice, &device); |
3575 | + assert(status == UFStatusSuccess); |
3576 | + return device; |
3577 | +} |
3578 | + |
3579 | +} // extern "C" |
3580 | |
3581 | === added file 'src/v2/frame.h' |
3582 | --- src/v2/frame.h 1970-01-01 00:00:00 +0000 |
3583 | +++ src/v2/frame.h 2011-11-21 22:46:23 +0000 |
3584 | @@ -0,0 +1,68 @@ |
3585 | +/***************************************************************************** |
3586 | + * |
3587 | + * utouch-frame - Touch Frame Library |
3588 | + * |
3589 | + * Copyright (C) 2011 Canonical Ltd. |
3590 | + * |
3591 | + * This program is free software: you can redistribute it and/or modify it |
3592 | + * under the terms of the GNU General Public License as published by the |
3593 | + * Free Software Foundation, either version 3 of the License, or (at your |
3594 | + * option) any later version. |
3595 | + * |
3596 | + * This program is distributed in the hope that it will be useful, but |
3597 | + * WITHOUT ANY WARRANTY; without even the implied warranty of |
3598 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
3599 | + * General Public License for more details. |
3600 | + * |
3601 | + * You should have received a copy of the GNU General Public License along |
3602 | + * with this program. If not, see <http://www.gnu.org/licenses/>. |
3603 | + * |
3604 | + ****************************************************************************/ |
3605 | + |
3606 | +#ifndef UTOUCH_FRAME_FRAME_H_ |
3607 | +#define UTOUCH_FRAME_FRAME_H_ |
3608 | + |
3609 | +#include <map> |
3610 | +#include <memory> |
3611 | +#include <vector> |
3612 | + |
3613 | +#include "utouch/frame.h" |
3614 | +#include "v2/property.h" |
3615 | +#include "v2/typedefs.h" |
3616 | + |
3617 | +struct UFFrame_ {}; |
3618 | + |
3619 | +namespace utouch { |
3620 | +namespace frame { |
3621 | + |
3622 | +class UFFrame : public UFFrame_, public Property<UFFrameProperty> { |
3623 | + public: |
3624 | + UFFrame() {} |
3625 | + UFFrame(const SharedWindow& window, const SharedUFFrame& prev); |
3626 | + |
3627 | + UFTouch* CopyTouch(UFTouchId touchid, UFTouchState new_state) const; |
3628 | + bool IsTouchOwned(UFTouchId touchid); |
3629 | + void UpdateTouch(const SharedUFTouch& touch); |
3630 | + bool IsEnded() const; |
3631 | + UFStatus GetPreviousTouchValue(const UFTouch* touch, UFAxisType type, |
3632 | + float* value) const; |
3633 | + UFStatus GetPreviousTouchProperty(const UFTouch* touch, |
3634 | + UFTouchProperty property, void* value) const; |
3635 | + UFStatus GetTouchByIndex(unsigned int index, ::UFTouch* touch) const; |
3636 | + UFStatus GetTouchById(UFTouchId touch_id, ::UFTouch* touch) const; |
3637 | + void ReleasePreviousFrame(); |
3638 | + |
3639 | + UFFrame(const UFFrame&) = delete; |
3640 | + UFFrame& operator=(const UFFrame&) = delete; |
3641 | + |
3642 | + private: |
3643 | + SharedUFFrame prev_; |
3644 | + SharedWindow window_; |
3645 | + std::vector<SharedUFTouch> touches_array_; |
3646 | + std::map<UFTouchId, unsigned int> touches_map_; |
3647 | +}; |
3648 | + |
3649 | +} // namespace frame |
3650 | +} // namespace utouch |
3651 | + |
3652 | +#endif // UTOUCH_FRAME_FRAME_H_ |
3653 | |
3654 | === added file 'src/v2/handle.cpp' |
3655 | --- src/v2/handle.cpp 1970-01-01 00:00:00 +0000 |
3656 | +++ src/v2/handle.cpp 2011-11-21 22:46:23 +0000 |
3657 | @@ -0,0 +1,87 @@ |
3658 | +/***************************************************************************** |
3659 | + * |
3660 | + * utouch-frame - Touch Frame Library |
3661 | + * |
3662 | + * Copyright (C) 2011 Canonical Ltd. |
3663 | + * |
3664 | + * This program is free software: you can redistribute it and/or modify it |
3665 | + * under the terms of the GNU General Public License as published by the |
3666 | + * Free Software Foundation, either version 3 of the License, or (at your |
3667 | + * option) any later version. |
3668 | + * |
3669 | + * This program is distributed in the hope that it will be useful, but |
3670 | + * WITHOUT ANY WARRANTY; without even the implied warranty of |
3671 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
3672 | + * General Public License for more details. |
3673 | + * |
3674 | + * You should have received a copy of the GNU General Public License along |
3675 | + * with this program. If not, see <http://www.gnu.org/licenses/>. |
3676 | + * |
3677 | + ****************************************************************************/ |
3678 | + |
3679 | +#include "v2/handle.h" |
3680 | + |
3681 | +#include <errno.h> |
3682 | +#include <stdio.h> |
3683 | +#include <sys/eventfd.h> |
3684 | +#include <unistd.h> |
3685 | + |
3686 | +#include <stdexcept> |
3687 | + |
3688 | +#include "v2/event.h" |
3689 | + |
3690 | +namespace utouch { |
3691 | +namespace frame { |
3692 | + |
3693 | +UFHandle::UFHandle() : event_fd_(-1) { |
3694 | + event_fd_ = eventfd(0, EFD_NONBLOCK); |
3695 | + if (event_fd_ == -1) { |
3696 | + fprintf(stderr, "Error: failed to create eventfd instance\n"); |
3697 | + throw std::runtime_error("Failed to create eventfd instance"); |
3698 | + } |
3699 | +} |
3700 | + |
3701 | +void UFHandle::EnqueueEvent(UFEvent* event) { |
3702 | + static const uint64_t num = 1; |
3703 | + |
3704 | + event_queue_.push(event); |
3705 | + if (write(event_fd_, &num, sizeof(num)) != sizeof(num)) |
3706 | + fprintf(stderr, "Warning: failed to update eventfd instance\n"); |
3707 | +} |
3708 | + |
3709 | +UFStatus UFHandle::GetEvent(::UFEvent* event) { |
3710 | + /* Clear event fd (see eventfd(2) man page) */ |
3711 | + uint64_t buf; |
3712 | + if (read(event_fd_, &buf, sizeof(buf)) != 8 && errno != EAGAIN) |
3713 | + fprintf(stderr, "Warning: failed to read data from event fd\n"); |
3714 | + |
3715 | + if (event_queue_.empty()) |
3716 | + return UFStatusErrorNoEvent; |
3717 | + |
3718 | + *event = event_queue_.front(); |
3719 | + event_queue_.pop(); |
3720 | + |
3721 | + return UFStatusSuccess; |
3722 | +} |
3723 | + |
3724 | +UFHandle::~UFHandle() { |
3725 | + while (!event_queue_.empty()) { |
3726 | + event_queue_.front()->Unref(); |
3727 | + event_queue_.pop(); |
3728 | + } |
3729 | +} |
3730 | + |
3731 | +} // namespace frame |
3732 | +} // namespace utouch |
3733 | + |
3734 | +extern "C" { |
3735 | + |
3736 | +int frame_get_fd(UFHandle handle) { |
3737 | + return static_cast<const utouch::frame::UFHandle*>(handle)->event_fd(); |
3738 | +} |
3739 | + |
3740 | +UFStatus frame_get_event(UFHandle handle, UFEvent *event) { |
3741 | + return static_cast<utouch::frame::UFHandle*>(handle)->GetEvent(event); |
3742 | +} |
3743 | + |
3744 | +} // extern "C" |
3745 | |
3746 | === added file 'src/v2/handle.h' |
3747 | --- src/v2/handle.h 1970-01-01 00:00:00 +0000 |
3748 | +++ src/v2/handle.h 2011-11-21 22:46:23 +0000 |
3749 | @@ -0,0 +1,59 @@ |
3750 | +/***************************************************************************** |
3751 | + * |
3752 | + * utouch-frame - Touch Frame Library |
3753 | + * |
3754 | + * Copyright (C) 2011 Canonical Ltd. |
3755 | + * |
3756 | + * This program is free software: you can redistribute it and/or modify it |
3757 | + * under the terms of the GNU General Public License as published by the |
3758 | + * Free Software Foundation, either version 3 of the License, or (at your |
3759 | + * option) any later version. |
3760 | + * |
3761 | + * This program is distributed in the hope that it will be useful, but |
3762 | + * WITHOUT ANY WARRANTY; without even the implied warranty of |
3763 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
3764 | + * General Public License for more details. |
3765 | + * |
3766 | + * You should have received a copy of the GNU General Public License along |
3767 | + * with this program. If not, see <http://www.gnu.org/licenses/>. |
3768 | + * |
3769 | + ****************************************************************************/ |
3770 | + |
3771 | +#ifndef UTOUCH_FRAME_HANDLE_H_ |
3772 | +#define UTOUCH_FRAME_HANDLE_H_ |
3773 | + |
3774 | +#include <queue> |
3775 | + |
3776 | +#include "utouch/frame.h" |
3777 | + |
3778 | +struct UFHandle_ {}; |
3779 | + |
3780 | +namespace utouch { |
3781 | +namespace frame { |
3782 | + |
3783 | +class UFEvent; |
3784 | + |
3785 | +class UFHandle : public UFHandle_ { |
3786 | + public: |
3787 | + UFHandle(); |
3788 | + ~UFHandle(); |
3789 | + |
3790 | + int event_fd() const { return event_fd_; } |
3791 | + UFStatus GetEvent(::UFEvent* event); |
3792 | + void ReleaseEvent(UFEvent event); |
3793 | + |
3794 | + protected: |
3795 | + void EnqueueEvent(UFEvent*); |
3796 | + |
3797 | + UFHandle(const UFHandle&) = delete; |
3798 | + UFHandle& operator=(const UFHandle&) = delete; |
3799 | + |
3800 | + private: |
3801 | + int event_fd_; |
3802 | + std::queue<UFEvent*> event_queue_; |
3803 | +}; |
3804 | + |
3805 | +} // namespace frame |
3806 | +} // namespace utouch |
3807 | + |
3808 | +#endif // UTOUCH_FRAME_HANDLE_H_ |
3809 | |
3810 | === added file 'src/v2/property.h' |
3811 | --- src/v2/property.h 1970-01-01 00:00:00 +0000 |
3812 | +++ src/v2/property.h 2011-11-21 22:46:23 +0000 |
3813 | @@ -0,0 +1,78 @@ |
3814 | +/***************************************************************************** |
3815 | + * |
3816 | + * utouch-frame - Touch Frame Library |
3817 | + * |
3818 | + * Copyright (C) 2011 Canonical Ltd. |
3819 | + * |
3820 | + * This program is free software: you can redistribute it and/or modify it |
3821 | + * under the terms of the GNU General Public License as published by the |
3822 | + * Free Software Foundation, either version 3 of the License, or (at your |
3823 | + * option) any later version. |
3824 | + * |
3825 | + * This program is distributed in the hope that it will be useful, but |
3826 | + * WITHOUT ANY WARRANTY; without even the implied warranty of |
3827 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
3828 | + * General Public License for more details. |
3829 | + * |
3830 | + * You should have received a copy of the GNU General Public License along |
3831 | + * with this program. If not, see <http://www.gnu.org/licenses/>. |
3832 | + * |
3833 | + ****************************************************************************/ |
3834 | + |
3835 | +#ifndef UTOUCH_FRAME_PROPERTY_H_ |
3836 | +#define UTOUCH_FRAME_PROPERTY_H_ |
3837 | + |
3838 | +#include <map> |
3839 | + |
3840 | +#include "v2/value.h" |
3841 | + |
3842 | +namespace utouch { |
3843 | +namespace frame { |
3844 | + |
3845 | +template<typename T> |
3846 | +class Property { |
3847 | + public: |
3848 | + Property() {} |
3849 | + explicit Property(const Property& property) { |
3850 | + for (const auto& pair : property.properties_) { |
3851 | + T property = pair.first; |
3852 | + Value* value = new Value(*pair.second); |
3853 | + properties_[property] = std::move(UniqueValue(value)); |
3854 | + } |
3855 | + } |
3856 | + |
3857 | + void InsertProperty(T property, const Value* value) { |
3858 | + properties_.erase(property); |
3859 | + properties_[property] = std::move(UniqueValue(value)); |
3860 | + } |
3861 | + |
3862 | + UFStatus GetProperty(T property, void* data) const { |
3863 | + auto it = properties_.find(property); |
3864 | + if (it == properties_.end()) |
3865 | + return UFStatusErrorUnknownProperty; |
3866 | + |
3867 | + it->second->GetValue(data); |
3868 | + |
3869 | + return UFStatusSuccess; |
3870 | + } |
3871 | + |
3872 | + bool IsPropertyEqual(T property, const void* data) const { |
3873 | + auto it = properties_.find(property); |
3874 | + if (it == properties_.end()) |
3875 | + return false; |
3876 | + |
3877 | + return it->second->IsEqual(data); |
3878 | + } |
3879 | + |
3880 | + Property& operator=(const Property&) = delete; |
3881 | + |
3882 | + private: |
3883 | + typedef std::unique_ptr<const Value> UniqueValue; |
3884 | + |
3885 | + std::map<T, UniqueValue> properties_; |
3886 | +}; |
3887 | + |
3888 | +} // namespace frame |
3889 | +} // namespace utouch |
3890 | + |
3891 | +#endif // UTOUCH_FRAME_PROPERTY_H_ |
3892 | |
3893 | === added file 'src/v2/touch.cpp' |
3894 | --- src/v2/touch.cpp 1970-01-01 00:00:00 +0000 |
3895 | +++ src/v2/touch.cpp 2011-11-21 22:46:23 +0000 |
3896 | @@ -0,0 +1,171 @@ |
3897 | +/***************************************************************************** |
3898 | + * |
3899 | + * utouch-frame - Touch Frame Library |
3900 | + * |
3901 | + * Copyright (C) 2011 Canonical Ltd. |
3902 | + * |
3903 | + * This program is free software: you can redistribute it and/or modify it |
3904 | + * under the terms of the GNU General Public License as published by the |
3905 | + * Free Software Foundation, either version 3 of the License, or (at your |
3906 | + * option) any later version. |
3907 | + * |
3908 | + * This program is distributed in the hope that it will be useful, but |
3909 | + * WITHOUT ANY WARRANTY; without even the implied warranty of |
3910 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
3911 | + * General Public License for more details. |
3912 | + * |
3913 | + * You should have received a copy of the GNU General Public License along |
3914 | + * with this program. If not, see <http://www.gnu.org/licenses/>. |
3915 | + * |
3916 | + ****************************************************************************/ |
3917 | + |
3918 | +#include "v2/touch.h" |
3919 | + |
3920 | +#include <assert.h> |
3921 | + |
3922 | +#include "v2/frame.h" |
3923 | + |
3924 | +namespace utouch { |
3925 | +namespace frame { |
3926 | + |
3927 | +UFTouch::UFTouch(UFTouchState state, UFTouchId id, float x, float y, |
3928 | + uint64_t time) |
3929 | + : id_(id), |
3930 | + state_(state) { |
3931 | + const Value* value; |
3932 | + |
3933 | + value = new Value(state); |
3934 | + InsertProperty(UFTouchPropertyState, value); |
3935 | + |
3936 | + value = new Value(id); |
3937 | + InsertProperty(UFTouchPropertyId, value); |
3938 | + |
3939 | + value = new Value(x); |
3940 | + InsertProperty(UFTouchPropertyWindowX, value); |
3941 | + |
3942 | + value = new Value(y); |
3943 | + InsertProperty(UFTouchPropertyWindowY, value); |
3944 | + |
3945 | + value = new Value(time); |
3946 | + InsertProperty(UFTouchPropertyTime, value); |
3947 | + |
3948 | + if (state == UFTouchStateBegin) { |
3949 | + value = new Value(time); |
3950 | + InsertProperty(UFTouchPropertyStartTime, value); |
3951 | + } |
3952 | +} |
3953 | + |
3954 | +UFTouch::UFTouch(const UFTouch& touch, UFTouchState new_state) |
3955 | + : Property(touch), |
3956 | + id_(touch.id_), |
3957 | + state_(new_state), |
3958 | + values_(touch.values_) { |
3959 | + const Value* value = new Value(new_state); |
3960 | + InsertProperty(UFTouchPropertyState, value); |
3961 | +} |
3962 | + |
3963 | +void UFTouch::SetValue(UFAxisType type, float value) { |
3964 | + values_[type] = value; |
3965 | +} |
3966 | + |
3967 | +UFStatus UFTouch::GetValue(UFAxisType type, float* value) const { |
3968 | + auto it = values_.find(type); |
3969 | + if (it == values_.end()) |
3970 | + return UFStatusErrorInvalidAxis; |
3971 | + |
3972 | + *value = it->second; |
3973 | + |
3974 | + return UFStatusSuccess; |
3975 | +} |
3976 | + |
3977 | +} // namespace frame |
3978 | +} // namespace utouch |
3979 | + |
3980 | +extern "C" { |
3981 | + |
3982 | +UFStatus frame_touch_get_property(UFTouch touch, UFTouchProperty property, |
3983 | + void* data) { |
3984 | + const utouch::frame::UFTouch* uftouch = |
3985 | + static_cast<const utouch::frame::UFTouch*>(touch); |
3986 | + return uftouch->GetProperty(property, data); |
3987 | +} |
3988 | + |
3989 | +UFStatus frame_touch_get_value(UFTouch touch, UFAxisType type, float* value) { |
3990 | + const utouch::frame::UFTouch* uftouch = |
3991 | + static_cast<const utouch::frame::UFTouch*>(touch); |
3992 | + return uftouch->GetValue(type, value); |
3993 | +} |
3994 | + |
3995 | +UFTouchId frame_touch_get_id(UFTouch touch) { |
3996 | + UFTouchId touch_id; |
3997 | + const utouch::frame::UFTouch* uftouch = |
3998 | + static_cast<const utouch::frame::UFTouch*>(touch); |
3999 | + UFStatus status = uftouch->GetProperty(UFTouchPropertyId, &touch_id); |
4000 | + assert(status == UFStatusSuccess); |
4001 | + return touch_id; |
4002 | +} |
4003 | + |
4004 | +UFTouchState frame_touch_get_state(UFTouch touch) { |
4005 | + UFTouchState state; |
4006 | + const utouch::frame::UFTouch* uftouch = |
4007 | + static_cast<const utouch::frame::UFTouch*>(touch); |
4008 | + UFStatus status = uftouch->GetProperty(UFTouchPropertyState, &state); |
4009 | + assert(status == UFStatusSuccess); |
4010 | + return state; |
4011 | +} |
4012 | + |
4013 | +float frame_touch_get_window_x(UFTouch touch) { |
4014 | + float x; |
4015 | + const utouch::frame::UFTouch* uftouch = |
4016 | + static_cast<const utouch::frame::UFTouch*>(touch); |
4017 | + UFStatus status = uftouch->GetProperty(UFTouchPropertyWindowX, &x); |
4018 | + assert(status == UFStatusSuccess); |
4019 | + return x; |
4020 | +} |
4021 | + |
4022 | +float frame_touch_get_window_y(UFTouch touch) { |
4023 | + float y; |
4024 | + const utouch::frame::UFTouch* uftouch = |
4025 | + static_cast<const utouch::frame::UFTouch*>(touch); |
4026 | + UFStatus status = uftouch->GetProperty(UFTouchPropertyWindowY, &y); |
4027 | + assert(status == UFStatusSuccess); |
4028 | + return y; |
4029 | +} |
4030 | + |
4031 | +float frame_touch_get_device_x(UFTouch touch) { |
4032 | + float x; |
4033 | + const utouch::frame::UFTouch* uftouch = |
4034 | + static_cast<const utouch::frame::UFTouch*>(touch); |
4035 | + UFStatus status = uftouch->GetValue(UFAxisTypeX, &x); |
4036 | + assert(status == UFStatusSuccess); |
4037 | + return x; |
4038 | +} |
4039 | + |
4040 | +float frame_touch_get_device_y(UFTouch touch) { |
4041 | + float y; |
4042 | + const utouch::frame::UFTouch* uftouch = |
4043 | + static_cast<const utouch::frame::UFTouch*>(touch); |
4044 | + UFStatus status = uftouch->GetValue(UFAxisTypeY, &y); |
4045 | + assert(status == UFStatusSuccess); |
4046 | + return y; |
4047 | +} |
4048 | + |
4049 | +uint64_t frame_touch_get_time(UFTouch touch) { |
4050 | + uint64_t time; |
4051 | + const utouch::frame::UFTouch* uftouch = |
4052 | + static_cast<const utouch::frame::UFTouch*>(touch); |
4053 | + UFStatus status = uftouch->GetProperty(UFTouchPropertyTime, &time); |
4054 | + assert(status == UFStatusSuccess); |
4055 | + return time; |
4056 | +} |
4057 | + |
4058 | +uint64_t frame_touch_get_start_time(UFTouch touch) { |
4059 | + uint64_t start_time; |
4060 | + const utouch::frame::UFTouch* uftouch = |
4061 | + static_cast<const utouch::frame::UFTouch*>(touch); |
4062 | + UFStatus status = uftouch->GetProperty(UFTouchPropertyTime, &start_time); |
4063 | + assert(status == UFStatusSuccess); |
4064 | + return start_time; |
4065 | +} |
4066 | + |
4067 | +} // extern "C" |
4068 | |
4069 | === added file 'src/v2/touch.h' |
4070 | --- src/v2/touch.h 1970-01-01 00:00:00 +0000 |
4071 | +++ src/v2/touch.h 2011-11-21 22:46:23 +0000 |
4072 | @@ -0,0 +1,63 @@ |
4073 | +/***************************************************************************** |
4074 | + * |
4075 | + * utouch-frame - Touch Frame Library |
4076 | + * |
4077 | + * Copyright (C) 2011 Canonical Ltd. |
4078 | + * |
4079 | + * This program is free software: you can redistribute it and/or modify it |
4080 | + * under the terms of the GNU General Public License as published by the |
4081 | + * Free Software Foundation, either version 3 of the License, or (at your |
4082 | + * option) any later version. |
4083 | + * |
4084 | + * This program is distributed in the hope that it will be useful, but |
4085 | + * WITHOUT ANY WARRANTY; without even the implied warranty of |
4086 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
4087 | + * General Public License for more details. |
4088 | + * |
4089 | + * You should have received a copy of the GNU General Public License along |
4090 | + * with this program. If not, see <http://www.gnu.org/licenses/>. |
4091 | + * |
4092 | + ****************************************************************************/ |
4093 | + |
4094 | +#ifndef UTOUCH_FRAME_TOUCH_H_ |
4095 | +#define UTOUCH_FRAME_TOUCH_H_ |
4096 | + |
4097 | +#include <stdint.h> |
4098 | + |
4099 | +#include <map> |
4100 | +#include <memory> |
4101 | + |
4102 | +#include "utouch/frame.h" |
4103 | +#include "v2/property.h" |
4104 | +#include "v2/typedefs.h" |
4105 | + |
4106 | +struct UFTouch_ {}; |
4107 | + |
4108 | +namespace utouch { |
4109 | +namespace frame { |
4110 | + |
4111 | +class UFTouch : public UFTouch_, public Property<UFTouchProperty> { |
4112 | + public: |
4113 | + UFTouch(UFTouchState state, UFTouchId id, float x, float y, |
4114 | + uint64_t time); |
4115 | + UFTouch(const UFTouch& touch, UFTouchState new_state); |
4116 | + |
4117 | + UFTouchId id() const { return id_; } |
4118 | + UFTouchState state() const { return state_; } |
4119 | + |
4120 | + void SetValue(UFAxisType type, float value); |
4121 | + UFStatus GetValue(UFAxisType type, float* value) const; |
4122 | + |
4123 | + UFTouch(const UFTouch&) = delete; |
4124 | + UFTouch& operator=(const UFTouch&) = delete; |
4125 | + |
4126 | + private: |
4127 | + const UFTouchId id_; |
4128 | + const UFTouchState state_; |
4129 | + std::map<UFAxisType, float> values_; |
4130 | +}; |
4131 | + |
4132 | +} // namespace frame |
4133 | +} // namespace utouch |
4134 | + |
4135 | +#endif // UTOUCH_FRAME_TOUCH_H_ |
4136 | |
4137 | === added file 'src/v2/typedefs.h' |
4138 | --- src/v2/typedefs.h 1970-01-01 00:00:00 +0000 |
4139 | +++ src/v2/typedefs.h 2011-11-21 22:46:23 +0000 |
4140 | @@ -0,0 +1,41 @@ |
4141 | +/***************************************************************************** |
4142 | + * |
4143 | + * utouch-frame - Touch Frame Library |
4144 | + * |
4145 | + * Copyright (C) 2011 Canonical Ltd. |
4146 | + * |
4147 | + * This program is free software: you can redistribute it and/or modify it |
4148 | + * under the terms of the GNU General Public License as published by the |
4149 | + * Free Software Foundation, either version 3 of the License, or (at your |
4150 | + * option) any later version. |
4151 | + * |
4152 | + * This program is distributed in the hope that it will be useful, but |
4153 | + * WITHOUT ANY WARRANTY; without even the implied warranty of |
4154 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
4155 | + * General Public License for more details. |
4156 | + * |
4157 | + * You should have received a copy of the GNU General Public License along |
4158 | + * with this program. If not, see <http://www.gnu.org/licenses/>. |
4159 | + * |
4160 | + ****************************************************************************/ |
4161 | + |
4162 | +#ifndef UTOUCH_FRAME_TYPEDEFS_H_ |
4163 | +#define UTOUCH_FRAME_TYPEDEFS_H_ |
4164 | + |
4165 | +namespace utouch { |
4166 | +namespace frame { |
4167 | + |
4168 | +class UFDevice; |
4169 | +class UFFrame; |
4170 | +class UFTouch; |
4171 | +class Window; |
4172 | + |
4173 | +typedef std::shared_ptr<UFDevice> SharedUFDevice; |
4174 | +typedef std::shared_ptr<UFFrame> SharedUFFrame; |
4175 | +typedef std::shared_ptr<UFTouch> SharedUFTouch; |
4176 | +typedef std::shared_ptr<Window> SharedWindow; |
4177 | + |
4178 | +} // namespace frame |
4179 | +} // namespace utouch |
4180 | + |
4181 | +#endif // UTOUCH_FRAME_TYPEDEFS_H_ |
4182 | |
4183 | === added file 'src/v2/value.cpp' |
4184 | --- src/v2/value.cpp 1970-01-01 00:00:00 +0000 |
4185 | +++ src/v2/value.cpp 2011-11-21 22:46:23 +0000 |
4186 | @@ -0,0 +1,201 @@ |
4187 | +/***************************************************************************** |
4188 | + * |
4189 | + * utouch-frame - Touch Frame Library |
4190 | + * |
4191 | + * Copyright (C) 2011 Canonical Ltd. |
4192 | + * |
4193 | + * This program is free software: you can redistribute it and/or modify it |
4194 | + * under the terms of the GNU General Public License as published by the |
4195 | + * Free Software Foundation, either version 3 of the License, or (at your |
4196 | + * option) any later version. |
4197 | + * |
4198 | + * This program is distributed in the hope that it will be useful, but |
4199 | + * WITHOUT ANY WARRANTY; without even the implied warranty of |
4200 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
4201 | + * General Public License for more details. |
4202 | + * |
4203 | + * You should have received a copy of the GNU General Public License along |
4204 | + * with this program. If not, see <http://www.gnu.org/licenses/>. |
4205 | + * |
4206 | + ****************************************************************************/ |
4207 | + |
4208 | +#include "v2/value.h" |
4209 | + |
4210 | +#include <stdlib.h> |
4211 | +#include <string.h> |
4212 | + |
4213 | +#include "v2/device.h" |
4214 | +#include "v2/frame.h" |
4215 | + |
4216 | +namespace utouch { |
4217 | +namespace frame { |
4218 | + |
4219 | +Value::Value(bool value) : type_(kBool), bool_(value) { |
4220 | +} |
4221 | + |
4222 | +Value::Value(int value) : type_(kInt), int_(value) { |
4223 | +} |
4224 | + |
4225 | +Value::Value(unsigned int value) : type_(kUnsignedInt), unsigned_int_(value) { |
4226 | +} |
4227 | + |
4228 | +Value::Value(float value) : type_(kFloat), float_(value) { |
4229 | +} |
4230 | + |
4231 | +#ifdef HAVE_LONG_UNSIGNED_VALUE |
4232 | +Value::Value(long unsigned int value) |
4233 | + : type_(kLongUnsignedInt), |
4234 | + long_unsigned_int_(value) { |
4235 | +} |
4236 | +#endif // HAVE_LONG_UNSIGNED_VALUE |
4237 | + |
4238 | +Value::Value(uint64_t value) : type_(kuint64_t), uint64_t_(value) { |
4239 | +} |
4240 | + |
4241 | +Value::Value(UFDevice* value) |
4242 | + : type_(kDevice), |
4243 | + unshared_device_(value) { |
4244 | +} |
4245 | + |
4246 | +Value::Value(const char* value) : type_(kString), string_(strdup(value)) { |
4247 | +} |
4248 | + |
4249 | +Value::Value(const SharedUFDevice& device) |
4250 | + : type_(kSharedDevice), |
4251 | + device_(new SharedUFDevice(device)) { |
4252 | +} |
4253 | + |
4254 | +Value::Value(const SharedUFFrame& frame) |
4255 | + : type_(kSharedFrame), |
4256 | + frame_(new SharedUFFrame(frame)) { |
4257 | +} |
4258 | + |
4259 | +Value::Value(const Value& value) |
4260 | + : type_(value.type_), |
4261 | + any_(value.any_) { |
4262 | + switch (type_) { |
4263 | + case kString: |
4264 | + string_ = strdup(value.string_); |
4265 | + break; |
4266 | + |
4267 | + case kSharedDevice: |
4268 | + device_ = new SharedUFDevice(*value.device_); |
4269 | + break; |
4270 | + |
4271 | + case kSharedFrame: |
4272 | + frame_ = new SharedUFFrame(*value.frame_); |
4273 | + break; |
4274 | + |
4275 | + default: |
4276 | + break; |
4277 | + } |
4278 | +} |
4279 | + |
4280 | +void Value::GetValue(void* data) const { |
4281 | + switch (type_) { |
4282 | + case kBool: |
4283 | + *reinterpret_cast<int*>(data) = bool_; |
4284 | + break; |
4285 | + |
4286 | + case kInt: |
4287 | + *reinterpret_cast<int*>(data) = int_; |
4288 | + break; |
4289 | + |
4290 | + case kUnsignedInt: |
4291 | + *reinterpret_cast<unsigned int*>(data) = unsigned_int_; |
4292 | + break; |
4293 | + |
4294 | + case kFloat: |
4295 | + *reinterpret_cast<float*>(data) = float_; |
4296 | + break; |
4297 | + |
4298 | +#ifdef HAVE_LONG_UNSIGNED_VALUE |
4299 | + case kLongUnsignedInt: |
4300 | + *reinterpret_cast<long unsigned int*>(data) = long_unsigned_int_; |
4301 | + break; |
4302 | +#endif // HAVE_LONG_UNSIGNED_VALUE |
4303 | + |
4304 | + case kuint64_t: |
4305 | + *reinterpret_cast<uint64_t*>(data) = uint64_t_; |
4306 | + break; |
4307 | + |
4308 | + case kString: |
4309 | + *reinterpret_cast<const char**>(data) = string_; |
4310 | + break; |
4311 | + |
4312 | + case kDevice: |
4313 | + *reinterpret_cast< ::UFDevice*>(data) = unshared_device_; |
4314 | + break; |
4315 | + |
4316 | + case kSharedDevice: |
4317 | + *reinterpret_cast< ::UFDevice*>(data) = device_->get(); |
4318 | + break; |
4319 | + |
4320 | + case kSharedFrame: |
4321 | + *reinterpret_cast< ::UFFrame*>(data) = frame_->get(); |
4322 | + break; |
4323 | + } |
4324 | +} |
4325 | + |
4326 | +bool Value::IsEqual(const void* data) const { |
4327 | + switch (type_) { |
4328 | + case kBool: |
4329 | + return (*reinterpret_cast<const int*>(data) == bool_); |
4330 | + |
4331 | + case kInt: |
4332 | + return (*reinterpret_cast<const int*>(data) == int_); |
4333 | + |
4334 | + case kUnsignedInt: |
4335 | + return (*reinterpret_cast<const unsigned int*>(data) == unsigned_int_); |
4336 | + |
4337 | + case kFloat: |
4338 | + return (*reinterpret_cast<const int*>(data) == float_); |
4339 | + |
4340 | +#ifdef HAVE_LONG_UNSIGNED_VALUE |
4341 | + case kLongUnsignedInt: |
4342 | + return (*reinterpret_cast<const long unsigned int*>(data) == |
4343 | + long_unsigned_int_); |
4344 | +#endif // HAVE_LONG_UNSIGNED_VALUE |
4345 | + |
4346 | + case kuint64_t: |
4347 | + return (*reinterpret_cast<const uint64_t*>(data) == uint64_t_); |
4348 | + |
4349 | + case kString: |
4350 | + return (strcmp(*reinterpret_cast<const char* const*>(data), |
4351 | + string_) == 0); |
4352 | + |
4353 | + case kDevice: |
4354 | + return (*reinterpret_cast<const ::UFDevice*>(data) == unshared_device_); |
4355 | + |
4356 | + case kSharedDevice: |
4357 | + return (*reinterpret_cast<const ::UFDevice*>(data) == device_->get()); |
4358 | + |
4359 | + case kSharedFrame: |
4360 | + return (*reinterpret_cast<const ::UFFrame*>(data) == frame_->get()); |
4361 | + |
4362 | + default: |
4363 | + return false; |
4364 | + } |
4365 | +} |
4366 | + |
4367 | +Value::~Value() { |
4368 | + switch (type_) { |
4369 | + case kString: |
4370 | + free(const_cast<char*>(string_)); |
4371 | + break; |
4372 | + |
4373 | + case kSharedDevice: |
4374 | + delete device_; |
4375 | + break; |
4376 | + |
4377 | + case kSharedFrame: |
4378 | + delete frame_; |
4379 | + break; |
4380 | + |
4381 | + default: |
4382 | + break; |
4383 | + } |
4384 | +} |
4385 | + |
4386 | +} // namespace frame |
4387 | +} // namespace utouch |
4388 | |
4389 | === added file 'src/v2/value.h' |
4390 | --- src/v2/value.h 1970-01-01 00:00:00 +0000 |
4391 | +++ src/v2/value.h 2011-11-21 22:46:23 +0000 |
4392 | @@ -0,0 +1,99 @@ |
4393 | +/***************************************************************************** |
4394 | + * |
4395 | + * utouch-frame - Touch Frame Library |
4396 | + * |
4397 | + * Copyright (C) 2011 Canonical Ltd. |
4398 | + * |
4399 | + * This program is free software: you can redistribute it and/or modify it |
4400 | + * under the terms of the GNU General Public License as published by the |
4401 | + * Free Software Foundation, either version 3 of the License, or (at your |
4402 | + * option) any later version. |
4403 | + * |
4404 | + * This program is distributed in the hope that it will be useful, but |
4405 | + * WITHOUT ANY WARRANTY; without even the implied warranty of |
4406 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
4407 | + * General Public License for more details. |
4408 | + * |
4409 | + * You should have received a copy of the GNU General Public License along |
4410 | + * with this program. If not, see <http://www.gnu.org/licenses/>. |
4411 | + * |
4412 | + ****************************************************************************/ |
4413 | + |
4414 | +#ifndef UTOUCH_FRAME_VALUE_H_ |
4415 | +#define UTOUCH_FRAME_VALUE_H_ |
4416 | + |
4417 | +#include <stdint.h> |
4418 | + |
4419 | +#include <memory> |
4420 | + |
4421 | +#include <X11/X.h> |
4422 | + |
4423 | +#include "utouch/frame.h" |
4424 | +#include "v2/typedefs.h" |
4425 | + |
4426 | +#if __SIZEOF_LONG__ != __SIZEOF_LONG_LONG__ |
4427 | +#define HAVE_LONG_UNSIGNED_VALUE |
4428 | +#endif |
4429 | + |
4430 | +namespace utouch { |
4431 | +namespace frame { |
4432 | + |
4433 | +class Value { |
4434 | + public: |
4435 | + explicit Value(bool value); |
4436 | + explicit Value(int value); |
4437 | + explicit Value(unsigned int value); |
4438 | + explicit Value(float value); |
4439 | +#ifdef HAVE_LONG_UNSIGNED_VALUE |
4440 | + explicit Value(long unsigned int value); |
4441 | +#endif // HAVE_LONG_UNSIGNED_VALUE |
4442 | + explicit Value(uint64_t value); |
4443 | + explicit Value(const char* value); |
4444 | + explicit Value(UFDevice* device); |
4445 | + explicit Value(const SharedUFDevice& device); |
4446 | + explicit Value(const SharedUFFrame& frame); |
4447 | + explicit Value(const Value& value); |
4448 | + ~Value(); |
4449 | + |
4450 | + void GetValue(void* data) const; |
4451 | + bool IsEqual(const void* data) const; |
4452 | + |
4453 | + Value& operator=(const Value&) = delete; |
4454 | + |
4455 | + private: |
4456 | + const enum { |
4457 | + kBool, |
4458 | + kInt, |
4459 | + kUnsignedInt, |
4460 | + kFloat, |
4461 | +#ifdef HAVE_LONG_UNSIGNED_VALUE |
4462 | + kLongUnsignedInt, |
4463 | +#endif // HAVE_LONG_UNSIGNED_VALUE |
4464 | + kuint64_t, |
4465 | + kString, |
4466 | + kDevice, |
4467 | + kSharedDevice, |
4468 | + kSharedFrame, |
4469 | + } type_; |
4470 | + |
4471 | + union { |
4472 | + const int bool_; |
4473 | + const int int_; |
4474 | + const unsigned int unsigned_int_; |
4475 | + const float float_; |
4476 | +#ifdef HAVE_LONG_UNSIGNED_VALUE |
4477 | + const long unsigned int long_unsigned_int_; |
4478 | +#endif // HAVE_LONG_UNSIGNED_VALUE |
4479 | + const uint64_t uint64_t_; |
4480 | + char* string_; |
4481 | + UFDevice* const unshared_device_; |
4482 | + SharedUFDevice* device_; |
4483 | + SharedUFFrame* frame_; |
4484 | + uint64_t const any_; /* Used to set any value */ |
4485 | + }; |
4486 | +}; |
4487 | + |
4488 | +} // namespace frame |
4489 | +} // namespace utouch |
4490 | + |
4491 | +#endif // UTOUCH_FRAME_VALUE_H_ |
4492 | |
4493 | === added file 'src/v2/window.cpp' |
4494 | --- src/v2/window.cpp 1970-01-01 00:00:00 +0000 |
4495 | +++ src/v2/window.cpp 2011-11-21 22:46:23 +0000 |
4496 | @@ -0,0 +1,47 @@ |
4497 | +/***************************************************************************** |
4498 | + * |
4499 | + * utouch-frame - Touch Frame Library |
4500 | + * |
4501 | + * Copyright (C) 2011 Canonical Ltd. |
4502 | + * |
4503 | + * This program is free software: you can redistribute it and/or modify it |
4504 | + * under the terms of the GNU General Public License as published by the |
4505 | + * Free Software Foundation, either version 3 of the License, or (at your |
4506 | + * option) any later version. |
4507 | + * |
4508 | + * This program is distributed in the hope that it will be useful, but |
4509 | + * WITHOUT ANY WARRANTY; without even the implied warranty of |
4510 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
4511 | + * General Public License for more details. |
4512 | + * |
4513 | + * You should have received a copy of the GNU General Public License along |
4514 | + * with this program. If not, see <http://www.gnu.org/licenses/>. |
4515 | + * |
4516 | + ****************************************************************************/ |
4517 | + |
4518 | +#include "v2/window.h" |
4519 | + |
4520 | +#include <assert.h> |
4521 | + |
4522 | +#include "v2/frame.h" |
4523 | + |
4524 | +namespace utouch { |
4525 | +namespace frame { |
4526 | + |
4527 | +Window::Window() : current_frame_(new UFFrame) { |
4528 | +} |
4529 | + |
4530 | +bool Window::IsTouchOwned(UFTouchId touchid) const { |
4531 | + return current_frame_->IsTouchOwned(touchid); |
4532 | +} |
4533 | + |
4534 | +void Window::ReleaseFrames() { |
4535 | + current_frame_ = SharedUFFrame(new UFFrame); |
4536 | +} |
4537 | + |
4538 | +bool Window::IsContextEnded() const { |
4539 | + return current_frame_->IsEnded(); |
4540 | +} |
4541 | + |
4542 | +} // namespace frame |
4543 | +} // namespace utouch |
4544 | |
4545 | === added file 'src/v2/window.h' |
4546 | --- src/v2/window.h 1970-01-01 00:00:00 +0000 |
4547 | +++ src/v2/window.h 2011-11-21 22:46:23 +0000 |
4548 | @@ -0,0 +1,53 @@ |
4549 | +/***************************************************************************** |
4550 | + * |
4551 | + * utouch-frame - Touch Frame Library |
4552 | + * |
4553 | + * Copyright (C) 2011 Canonical Ltd. |
4554 | + * |
4555 | + * This program is free software: you can redistribute it and/or modify it |
4556 | + * under the terms of the GNU General Public License as published by the |
4557 | + * Free Software Foundation, either version 3 of the License, or (at your |
4558 | + * option) any later version. |
4559 | + * |
4560 | + * This program is distributed in the hope that it will be useful, but |
4561 | + * WITHOUT ANY WARRANTY; without even the implied warranty of |
4562 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
4563 | + * General Public License for more details. |
4564 | + * |
4565 | + * You should have received a copy of the GNU General Public License along |
4566 | + * with this program. If not, see <http://www.gnu.org/licenses/>. |
4567 | + * |
4568 | + ****************************************************************************/ |
4569 | + |
4570 | +#ifndef UTOUCH_FRAME_WINDOW_H_ |
4571 | +#define UTOUCH_FRAME_WINDOW_H_ |
4572 | + |
4573 | +#include <map> |
4574 | +#include <memory> |
4575 | + |
4576 | +#include "utouch/frame.h" |
4577 | +#include "v2/property.h" |
4578 | +#include "v2/typedefs.h" |
4579 | + |
4580 | +namespace utouch { |
4581 | +namespace frame { |
4582 | + |
4583 | +class Window : public std::enable_shared_from_this<Window> { |
4584 | + public: |
4585 | + Window(); |
4586 | + |
4587 | + bool IsTouchOwned(UFTouchId touchid) const; |
4588 | + void ReleaseFrames(); |
4589 | + bool IsContextEnded() const; |
4590 | + |
4591 | + Window(const Window&) = delete; |
4592 | + Window& operator=(const Window&) = delete; |
4593 | + |
4594 | + protected: |
4595 | + SharedUFFrame current_frame_; |
4596 | +}; |
4597 | + |
4598 | +} // namespace frame |
4599 | +} // namespace utouch |
4600 | + |
4601 | +#endif // UTOUCH_FRAME_WINDOW_H_ |
4602 | |
4603 | === added directory 'src/v2/x11' |
4604 | === added file 'src/v2/x11/device_x11.cpp' |
4605 | --- src/v2/x11/device_x11.cpp 1970-01-01 00:00:00 +0000 |
4606 | +++ src/v2/x11/device_x11.cpp 2011-11-21 22:46:23 +0000 |
4607 | @@ -0,0 +1,222 @@ |
4608 | +/***************************************************************************** |
4609 | + * |
4610 | + * utouch-frame - Touch Frame Library |
4611 | + * |
4612 | + * Copyright (C) 2011 Canonical Ltd. |
4613 | + * |
4614 | + * This program is free software: you can redistribute it and/or modify it |
4615 | + * under the terms of the GNU General Public License as published by the |
4616 | + * Free Software Foundation, either version 3 of the License, or (at your |
4617 | + * option) any later version. |
4618 | + * |
4619 | + * This program is distributed in the hope that it will be useful, but |
4620 | + * WITHOUT ANY WARRANTY; without even the implied warranty of |
4621 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
4622 | + * General Public License for more details. |
4623 | + * |
4624 | + * You should have received a copy of the GNU General Public License along |
4625 | + * with this program. If not, see <http://www.gnu.org/licenses/>. |
4626 | + * |
4627 | + ****************************************************************************/ |
4628 | + |
4629 | +#include "v2/x11/device_x11.h" |
4630 | + |
4631 | +#include <stdio.h> |
4632 | +#include <string.h> |
4633 | + |
4634 | +#include <stdexcept> |
4635 | + |
4636 | +#include <xorg/xserver-properties.h> |
4637 | + |
4638 | +#include "v2/axis.h" |
4639 | +#include "v2/value.h" |
4640 | +#include "v2/x11/window_x11.h" |
4641 | + |
4642 | +namespace utouch { |
4643 | +namespace frame { |
4644 | + |
4645 | +namespace { |
4646 | + |
4647 | +UFAxisType UFAxisTypeForLabel(Display* display, Atom label) { |
4648 | + if (label == XInternAtom(display, AXIS_LABEL_PROP_ABS_MT_POSITION_X, True)) |
4649 | + return UFAxisTypeX; |
4650 | + if (label == XInternAtom(display, AXIS_LABEL_PROP_ABS_MT_POSITION_Y, True)) |
4651 | + return UFAxisTypeY; |
4652 | + if (label == XInternAtom(display, AXIS_LABEL_PROP_ABS_MT_TOUCH_MAJOR, |
4653 | + True)) |
4654 | + return UFAxisTypeTouchMajor; |
4655 | + if (label == XInternAtom(display, AXIS_LABEL_PROP_ABS_MT_TOUCH_MINOR, |
4656 | + True)) |
4657 | + return UFAxisTypeTouchMinor; |
4658 | + if (label == XInternAtom(display, AXIS_LABEL_PROP_ABS_MT_WIDTH_MAJOR, |
4659 | + True)) |
4660 | + return UFAxisTypeWidthMajor; |
4661 | + if (label == XInternAtom(display, AXIS_LABEL_PROP_ABS_MT_WIDTH_MINOR, |
4662 | + True)) |
4663 | + return UFAxisTypeWidthMinor; |
4664 | + if (label == XInternAtom(display, AXIS_LABEL_PROP_ABS_MT_ORIENTATION, |
4665 | + True)) |
4666 | + return UFAxisTypeOrientation; |
4667 | + if (label == XInternAtom(display, AXIS_LABEL_PROP_ABS_MT_TOOL_TYPE, True)) |
4668 | + return UFAxisTypeTool; |
4669 | + if (label == XInternAtom(display, AXIS_LABEL_PROP_ABS_MT_BLOB_ID, True)) |
4670 | + return UFAxisTypeBlobId; |
4671 | + if (label == XInternAtom(display, AXIS_LABEL_PROP_ABS_MT_TRACKING_ID, |
4672 | + True)) |
4673 | + return UFAxisTypeTrackingId; |
4674 | + if (label == XInternAtom(display, AXIS_LABEL_PROP_ABS_MT_PRESSURE, True)) |
4675 | + return UFAxisTypePressure; |
4676 | + |
4677 | + throw std::domain_error("Not a multitouch axis"); |
4678 | +} |
4679 | + |
4680 | +} // namespace |
4681 | + |
4682 | +UFDeviceX11::UFDeviceX11(Display* display, const XIDeviceInfo& info) |
4683 | + : display_(display), |
4684 | + id_(info.deviceid) { |
4685 | + const Value* value; |
4686 | + |
4687 | + value = new Value(info.name); |
4688 | + InsertProperty(UFDevicePropertyName, value); |
4689 | + |
4690 | + for (int i = 0; i < info.num_classes; ++i) { |
4691 | + switch (info.classes[i]->type) { |
4692 | + case XITouchClass: { |
4693 | + XITouchClassInfo* touch_info = |
4694 | + reinterpret_cast<XITouchClassInfo*>(info.classes[i]); |
4695 | + |
4696 | + value = new Value(touch_info->mode == XIDirectTouch); |
4697 | + InsertProperty(UFDevicePropertyDirect, value); |
4698 | + |
4699 | + value = new Value(touch_info->mode == XIIndependentPointer); |
4700 | + InsertProperty(UFDevicePropertyIndependent, value); |
4701 | + |
4702 | + value = new Value(false); |
4703 | + InsertProperty(UFDevicePropertySemiMT, value); |
4704 | + |
4705 | + value = new Value(touch_info->num_touches); |
4706 | + InsertProperty(UFDevicePropertyMaxTouches, value); |
4707 | + break; |
4708 | + } |
4709 | + |
4710 | + case XITouchValuatorClass: { |
4711 | + XITouchValuatorClassInfo* valuator_info = |
4712 | + reinterpret_cast<XITouchValuatorClassInfo*>(info.classes[i]); |
4713 | + |
4714 | + UFAxisType type; |
4715 | + try { |
4716 | + type = UFAxisTypeForLabel(display, valuator_info->label); |
4717 | + } catch (std::domain_error &error) { |
4718 | + break; |
4719 | + } |
4720 | + |
4721 | + /* Skip over broken tracking ID handling in prototype server */ |
4722 | + if (type == UFAxisTypeTrackingId) |
4723 | + break; |
4724 | + |
4725 | + UFAxis_* axis = new UFAxis(type, valuator_info->min, valuator_info->max, |
4726 | + valuator_info->resolution); |
4727 | + |
4728 | + axes_[type] = |
4729 | + std::move(UniqueUFAxis(static_cast<utouch::frame::UFAxis*>(axis))); |
4730 | + |
4731 | + axis_map_[valuator_info->number] = type; |
4732 | + |
4733 | + break; |
4734 | + } |
4735 | + |
4736 | + default: |
4737 | + break; |
4738 | + } |
4739 | + } |
4740 | + |
4741 | + value = new Value(static_cast<int>(axes_.size())); |
4742 | + InsertProperty(UFDevicePropertyNumAxes, value); |
4743 | +} |
4744 | + |
4745 | +bool UFDeviceX11::HandleDeviceEvent(const XIDeviceEvent* event, |
4746 | + SharedUFFrame* frame) { |
4747 | + WindowX11* window; |
4748 | + if (windows_.find(event->event) != windows_.end()) { |
4749 | + SharedWindow& shared_window = windows_[event->event]; |
4750 | + window = static_cast<WindowX11*>(shared_window.get()); |
4751 | + } else { |
4752 | + window = new WindowX11(event->event, shared_from_this(), display_); |
4753 | + windows_[event->event] = SharedWindow(window); |
4754 | + } |
4755 | + |
4756 | + if (!window->HandleDeviceEvent(event, frame)) |
4757 | + return false; |
4758 | + |
4759 | + if (window->IsContextEnded()) { |
4760 | + window->ReleaseFrames(); |
4761 | + windows_.erase(event->event); |
4762 | + } |
4763 | + |
4764 | + return true; |
4765 | +} |
4766 | + |
4767 | +bool UFDeviceX11::HandleOwnershipEvent(const XITouchOwnershipEvent* event, |
4768 | + SharedUFFrame* frame) { |
4769 | + /* We don't really know if the ownership event is for a particular window |
4770 | + * when using the Ubuntu prototype multitouch X server. We just take the first |
4771 | + * one for algorithmic completeness, and assume the utouch-frame client will |
4772 | + * work around this issue. */ |
4773 | + for (auto& pair : windows_) { |
4774 | + WindowX11* window = static_cast<WindowX11*>(pair.second.get()); |
4775 | + if (!window->IsTouchOwned(event->touchid)) |
4776 | + return window->HandleOwnershipEvent(event, frame); |
4777 | + } |
4778 | + |
4779 | + return false; |
4780 | +} |
4781 | + |
4782 | +UFStatus UFDeviceX11::AcceptTouch(::Window window_id, |
4783 | + UFTouchId touch_id) const { |
4784 | + auto it = windows_.find(window_id); |
4785 | + if (it != windows_.end()) { |
4786 | + WindowX11* window = static_cast<WindowX11*>(it->second.get()); |
4787 | + return window->AcceptTouch(touch_id); |
4788 | + } |
4789 | + |
4790 | + return UFStatusErrorInvalidTouch; |
4791 | +} |
4792 | + |
4793 | +UFStatus UFDeviceX11::RejectTouch(::Window window_id, |
4794 | + UFTouchId touch_id) const { |
4795 | + auto it = windows_.find(window_id); |
4796 | + if (it != windows_.end()) { |
4797 | + WindowX11* window = static_cast<WindowX11*>(it->second.get()); |
4798 | + return window->RejectTouch(touch_id); |
4799 | + } |
4800 | + |
4801 | + return UFStatusErrorInvalidTouch; |
4802 | +} |
4803 | + |
4804 | +void UFDeviceX11::ReleaseFrames() { |
4805 | + for (auto& pair : windows_) |
4806 | + pair.second->ReleaseFrames(); |
4807 | + windows_.clear(); |
4808 | +} |
4809 | + |
4810 | +} // namespace frame |
4811 | +} // namespace utouch |
4812 | + |
4813 | +extern "C" { |
4814 | + |
4815 | +UFStatus frame_x11_accept_touch(UFDevice device, ::Window window, |
4816 | + UFTouchId touch_id) { |
4817 | + utouch::frame::UFDeviceX11* device_x11 = |
4818 | + static_cast<utouch::frame::UFDeviceX11*>(device); |
4819 | + return device_x11->AcceptTouch(window, touch_id); |
4820 | +} |
4821 | + |
4822 | +UFStatus frame_x11_reject_touch(UFDevice device, ::Window window, |
4823 | + UFTouchId touch_id) { |
4824 | + utouch::frame::UFDeviceX11* device_x11 = |
4825 | + static_cast<utouch::frame::UFDeviceX11*>(device); |
4826 | + return device_x11->RejectTouch(window, touch_id); |
4827 | +} |
4828 | + |
4829 | +} // extern "C" |
4830 | |
4831 | === added file 'src/v2/x11/device_x11.h' |
4832 | --- src/v2/x11/device_x11.h 1970-01-01 00:00:00 +0000 |
4833 | +++ src/v2/x11/device_x11.h 2011-11-21 22:46:23 +0000 |
4834 | @@ -0,0 +1,66 @@ |
4835 | +/***************************************************************************** |
4836 | + * |
4837 | + * utouch-frame - Touch Frame Library |
4838 | + * |
4839 | + * Copyright (C) 2011 Canonical Ltd. |
4840 | + * |
4841 | + * This program is free software: you can redistribute it and/or modify it |
4842 | + * under the terms of the GNU General Public License as published by the |
4843 | + * Free Software Foundation, either version 3 of the License, or (at your |
4844 | + * option) any later version. |
4845 | + * |
4846 | + * This program is distributed in the hope that it will be useful, but |
4847 | + * WITHOUT ANY WARRANTY; without even the implied warranty of |
4848 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
4849 | + * General Public License for more details. |
4850 | + * |
4851 | + * You should have received a copy of the GNU General Public License along |
4852 | + * with this program. If not, see <http://www.gnu.org/licenses/>. |
4853 | + * |
4854 | + ****************************************************************************/ |
4855 | + |
4856 | +#ifndef UTOUCH_FRAME_DEVICE_X11_H_ |
4857 | +#define UTOUCH_FRAME_DEVICE_X11_H_ |
4858 | + |
4859 | +#include <map> |
4860 | + |
4861 | +#include <X11/Xlib.h> |
4862 | +#include <X11/extensions/XInput2.h> |
4863 | + |
4864 | +#include "utouch/frame.h" |
4865 | +#include "v2/device.h" |
4866 | +#include "v2/typedefs.h" |
4867 | + |
4868 | +namespace utouch { |
4869 | +namespace frame { |
4870 | + |
4871 | +class UFDeviceX11 |
4872 | + : public UFDevice, |
4873 | + public std::enable_shared_from_this<UFDeviceX11> { |
4874 | + public: |
4875 | + UFDeviceX11(Display* display, const XIDeviceInfo& info); |
4876 | + |
4877 | + int id() const { return id_; } |
4878 | + const std::map<int, UFAxisType>& axis_map() const { return axis_map_; } |
4879 | + |
4880 | + bool HandleDeviceEvent(const XIDeviceEvent* event, SharedUFFrame* frame); |
4881 | + bool HandleOwnershipEvent(const XITouchOwnershipEvent* event, |
4882 | + SharedUFFrame* frame); |
4883 | + UFStatus AcceptTouch(::Window window_id, UFTouchId touch_id) const; |
4884 | + UFStatus RejectTouch(::Window window_id, UFTouchId touch_id) const; |
4885 | + void ReleaseFrames(); |
4886 | + |
4887 | + UFDeviceX11(const UFDeviceX11&) = delete; |
4888 | + UFDeviceX11& operator=(const UFDeviceX11&) = delete; |
4889 | + |
4890 | + private: |
4891 | + Display* display_; |
4892 | + int id_; |
4893 | + std::map<int, UFAxisType> axis_map_; |
4894 | + std::map< ::Window, SharedWindow> windows_; |
4895 | +}; |
4896 | + |
4897 | +} // namespace frame |
4898 | +} // namespace utouch |
4899 | + |
4900 | +#endif // UTOUCH_FRAME_DEVICE_X11_H_ |
4901 | |
4902 | === added file 'src/v2/x11/frame_x11.cpp' |
4903 | --- src/v2/x11/frame_x11.cpp 1970-01-01 00:00:00 +0000 |
4904 | +++ src/v2/x11/frame_x11.cpp 2011-11-21 22:46:23 +0000 |
4905 | @@ -0,0 +1,74 @@ |
4906 | +/***************************************************************************** |
4907 | + * |
4908 | + * utouch-frame - Touch Frame Library |
4909 | + * |
4910 | + * Copyright (C) 2011 Canonical Ltd. |
4911 | + * |
4912 | + * This program is free software: you can redistribute it and/or modify it |
4913 | + * under the terms of the GNU General Public License as published by the |
4914 | + * Free Software Foundation, either version 3 of the License, or (at your |
4915 | + * option) any later version. |
4916 | + * |
4917 | + * This program is distributed in the hope that it will be useful, but |
4918 | + * WITHOUT ANY WARRANTY; without even the implied warranty of |
4919 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
4920 | + * General Public License for more details. |
4921 | + * |
4922 | + * You should have received a copy of the GNU General Public License along |
4923 | + * with this program. If not, see <http://www.gnu.org/licenses/>. |
4924 | + * |
4925 | + ****************************************************************************/ |
4926 | + |
4927 | +#include <stdlib.h> |
4928 | + |
4929 | +#include <X11/Xlib.h> |
4930 | + |
4931 | +#include "utouch/frame.h" |
4932 | +#include "utouch/frame_x11.h" |
4933 | +#include "v2/x11/handle_x11.h" |
4934 | + |
4935 | +extern "C" { |
4936 | + |
4937 | +UFStatus frame_x11_new(Display* display, ::UFHandle* handle) { |
4938 | + utouch::frame::UFHandleX11** handle_x11 = |
4939 | + reinterpret_cast<utouch::frame::UFHandleX11**>(handle); |
4940 | + |
4941 | + try { |
4942 | + *handle_x11 = new utouch::frame::UFHandleX11(display); |
4943 | + return UFStatusSuccess; |
4944 | + } catch (const std::exception& exception) { |
4945 | + *handle_x11 = NULL; |
4946 | + return UFStatusErrorResources; |
4947 | + } |
4948 | +} |
4949 | + |
4950 | +UFStatus frame_x11_process_event(UFHandle handle, |
4951 | + XGenericEventCookie* xcookie) { |
4952 | + utouch::frame::UFHandleX11* handle_x11 = |
4953 | + static_cast<utouch::frame::UFHandleX11*>(handle); |
4954 | + return handle_x11->ProcessEvent(xcookie); |
4955 | +} |
4956 | + |
4957 | +void frame_x11_delete(UFHandle handle) { |
4958 | + utouch::frame::UFHandleX11* handle_x11 = |
4959 | + static_cast<utouch::frame::UFHandleX11*>(handle); |
4960 | + delete handle_x11; |
4961 | +} |
4962 | + |
4963 | +Window frame_x11_get_window_id(UFWindowId window_id) { |
4964 | + return static_cast<Window>(window_id); |
4965 | +} |
4966 | + |
4967 | +UFWindowId frame_x11_create_window_id(Window id) { |
4968 | + return static_cast<UFWindowId>(id); |
4969 | +} |
4970 | + |
4971 | +unsigned int frame_x11_get_touch_id(UFTouchId touch_id) { |
4972 | + return static_cast<unsigned int>(touch_id); |
4973 | +} |
4974 | + |
4975 | +UFTouchId frame_x11_create_touch_id(unsigned int id) { |
4976 | + return static_cast<UFTouchId>(id); |
4977 | +} |
4978 | + |
4979 | +} // extern "C" |
4980 | |
4981 | === added file 'src/v2/x11/handle_x11.cpp' |
4982 | --- src/v2/x11/handle_x11.cpp 1970-01-01 00:00:00 +0000 |
4983 | +++ src/v2/x11/handle_x11.cpp 2011-11-21 22:46:23 +0000 |
4984 | @@ -0,0 +1,182 @@ |
4985 | +/***************************************************************************** |
4986 | + * |
4987 | + * utouch-frame - Touch Frame Library |
4988 | + * |
4989 | + * Copyright (C) 2011 Canonical Ltd. |
4990 | + * |
4991 | + * This program is free software: you can redistribute it and/or modify it |
4992 | + * under the terms of the GNU General Public License as published by the |
4993 | + * Free Software Foundation, either version 3 of the License, or (at your |
4994 | + * option) any later version. |
4995 | + * |
4996 | + * This program is distributed in the hope that it will be useful, but |
4997 | + * WITHOUT ANY WARRANTY; without even the implied warranty of |
4998 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
4999 | + * General Public License for more details. |
5000 | + * |
Every single comment I have made about accessor functions vs generic property getter/setter applies here too. In fact it applies even stronger. As an example, the Axis class has no use for a generic setter. None. Zilch. Zero. There are no new properties that can magically appear at runtime. They are all specified by the kernel interface, the type enum and they are all required arguments of the constructor. All it does is complexify the code and circumvent the type system making the entire thing more fragile.
And if opaque getters and setters are to be used, they better be used everywhere and always. For example, UFTouchClass has getters and setters for id and state but not others. Which is it gonna be?
UFHandleClass requires an Initialize call before it is usable. This is wrong. Either this needs to be done in the constructor or a static factory. It might be sensible not to use exceptions in this case since Frame is being used as a C library. I'm not quite sure what happens if an exception escapes the boundary.
There are multiple duplicate declarations of SharedUFDeviceC lass, SharedUFDeviceClass etc. There can be only one.
The PutEvent/GetEvent interface is a bit cryptic. Why is it called PutEvent if it just deletes the event. Should it not be ReleaseEvent? "Put" in a container object implies adding new stuff for further use. Actually, the entire interface seems a bit fishy to me. Could you give an example on how you envision it will be used and how it differs from the current API.
If this is going to be C++0x, then these sorts of structures:
for (unsigned int i = 0; i < prev_-> touches_ array_. size(); ++i) { touches_ array_[ i];
const SharedUFTouchClass& prev_touch = prev_->
should be replaced with auto iterators.
And so on and so on. I'm going to mark this as rejected simply to signal that there is a lot of work to be done.