Merge lp:~bratsche/libgrip/rename-to-libgrip into lp:libgrip
- rename-to-libgrip
- Merge into trunk
Proposed by
Cody Russell
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 13 | ||||
Proposed branch: | lp:~bratsche/libgrip/rename-to-libgrip | ||||
Merge into: | lp:libgrip | ||||
Diff against target: |
1718 lines (+528/-399) 14 files modified
INSTALL (+189/-60) Makefile.am (+6/-6) autogen.sh (+1/-1) configure.ac (+37/-37) examples/pygrip/pygrip.py (+11/-11) examples/rectangle-mover/Makefile.am (+1/-1) examples/rectangle-mover/gesture.c (+37/-37) libgrip.pc.in (+3/-3) src/Makefile.am (+42/-42) src/grip.h (+6/-6) src/gripgesturemanager.c (+125/-125) src/gripgesturemanager.h (+65/-65) src/griptypebuiltins.c.in (+1/-1) src/griptypebuiltins.h.in (+4/-4) |
||||
To merge this branch: | bzr merge lp:~bratsche/libgrip/rename-to-libgrip | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Duncan McGreggor (community) | Approve | ||
Review via email: mp+41471@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
- 12. By Cody Russell
-
Move pygrope to pygrip
- 13. By Cody Russell
-
Rename pygrope files
Revision history for this message
Duncan McGreggor (oubiwann) wrote : | # |
Thanks for the fix push, Cody! Looks great. +1 for merge.
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'INSTALL' |
2 | --- INSTALL 2010-10-12 15:42:04 +0000 |
3 | +++ INSTALL 2010-11-22 15:13:53 +0000 |
4 | @@ -1,16 +1,25 @@ |
5 | Installation Instructions |
6 | ************************* |
7 | |
8 | -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free |
9 | -Software Foundation, Inc. |
10 | +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, |
11 | +2006, 2007, 2008, 2009 Free Software Foundation, Inc. |
12 | |
13 | -This file is free documentation; the Free Software Foundation gives |
14 | -unlimited permission to copy, distribute and modify it. |
15 | + Copying and distribution of this file, with or without modification, |
16 | +are permitted in any medium without royalty provided the copyright |
17 | +notice and this notice are preserved. This file is offered as-is, |
18 | +without warranty of any kind. |
19 | |
20 | Basic Installation |
21 | ================== |
22 | |
23 | -These are generic installation instructions. |
24 | + Briefly, the shell commands `./configure; make; make install' should |
25 | +configure, build, and install this package. The following |
26 | +more-detailed instructions are generic; see the `README' file for |
27 | +instructions specific to this package. Some packages provide this |
28 | +`INSTALL' file but do not implement all of the features documented |
29 | +below. The lack of an optional feature in a given package is not |
30 | +necessarily a bug. More recommendations for GNU packages can be found |
31 | +in *note Makefile Conventions: (standards)Makefile Conventions. |
32 | |
33 | The `configure' shell script attempts to guess correct values for |
34 | various system-dependent variables used during compilation. It uses |
35 | @@ -23,9 +32,9 @@ |
36 | |
37 | It can also use an optional file (typically called `config.cache' |
38 | and enabled with `--cache-file=config.cache' or simply `-C') that saves |
39 | -the results of its tests to speed up reconfiguring. (Caching is |
40 | +the results of its tests to speed up reconfiguring. Caching is |
41 | disabled by default to prevent problems with accidental use of stale |
42 | -cache files.) |
43 | +cache files. |
44 | |
45 | If you need to do unusual things to compile the package, please try |
46 | to figure out how `configure' could check whether to do them, and mail |
47 | @@ -35,30 +44,37 @@ |
48 | may remove or edit it. |
49 | |
50 | The file `configure.ac' (or `configure.in') is used to create |
51 | -`configure' by a program called `autoconf'. You only need |
52 | -`configure.ac' if you want to change it or regenerate `configure' using |
53 | -a newer version of `autoconf'. |
54 | +`configure' by a program called `autoconf'. You need `configure.ac' if |
55 | +you want to change it or regenerate `configure' using a newer version |
56 | +of `autoconf'. |
57 | |
58 | -The simplest way to compile this package is: |
59 | + The simplest way to compile this package is: |
60 | |
61 | 1. `cd' to the directory containing the package's source code and type |
62 | - `./configure' to configure the package for your system. If you're |
63 | - using `csh' on an old version of System V, you might need to type |
64 | - `sh ./configure' instead to prevent `csh' from trying to execute |
65 | - `configure' itself. |
66 | + `./configure' to configure the package for your system. |
67 | |
68 | - Running `configure' takes awhile. While running, it prints some |
69 | - messages telling which features it is checking for. |
70 | + Running `configure' might take a while. While running, it prints |
71 | + some messages telling which features it is checking for. |
72 | |
73 | 2. Type `make' to compile the package. |
74 | |
75 | 3. Optionally, type `make check' to run any self-tests that come with |
76 | - the package. |
77 | + the package, generally using the just-built uninstalled binaries. |
78 | |
79 | 4. Type `make install' to install the programs and any data files and |
80 | - documentation. |
81 | - |
82 | - 5. You can remove the program binaries and object files from the |
83 | + documentation. When installing into a prefix owned by root, it is |
84 | + recommended that the package be configured and built as a regular |
85 | + user, and only the `make install' phase executed with root |
86 | + privileges. |
87 | + |
88 | + 5. Optionally, type `make installcheck' to repeat any self-tests, but |
89 | + this time using the binaries in their final installed location. |
90 | + This target does not install anything. Running this target as a |
91 | + regular user, particularly if the prior `make install' required |
92 | + root privileges, verifies that the installation completed |
93 | + correctly. |
94 | + |
95 | + 6. You can remove the program binaries and object files from the |
96 | source code directory by typing `make clean'. To also remove the |
97 | files that `configure' created (so you can compile the package for |
98 | a different kind of computer), type `make distclean'. There is |
99 | @@ -67,45 +83,69 @@ |
100 | all sorts of other programs in order to regenerate files that came |
101 | with the distribution. |
102 | |
103 | + 7. Often, you can also type `make uninstall' to remove the installed |
104 | + files again. In practice, not all packages have tested that |
105 | + uninstallation works correctly, even though it is required by the |
106 | + GNU Coding Standards. |
107 | + |
108 | + 8. Some packages, particularly those that use Automake, provide `make |
109 | + distcheck', which can by used by developers to test that all other |
110 | + targets like `make install' and `make uninstall' work correctly. |
111 | + This target is generally not run by end users. |
112 | + |
113 | Compilers and Options |
114 | ===================== |
115 | |
116 | -Some systems require unusual options for compilation or linking that the |
117 | -`configure' script does not know about. Run `./configure --help' for |
118 | -details on some of the pertinent environment variables. |
119 | + Some systems require unusual options for compilation or linking that |
120 | +the `configure' script does not know about. Run `./configure --help' |
121 | +for details on some of the pertinent environment variables. |
122 | |
123 | You can give `configure' initial values for configuration parameters |
124 | by setting variables in the command line or in the environment. Here |
125 | is an example: |
126 | |
127 | - ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix |
128 | + ./configure CC=c99 CFLAGS=-g LIBS=-lposix |
129 | |
130 | *Note Defining Variables::, for more details. |
131 | |
132 | Compiling For Multiple Architectures |
133 | ==================================== |
134 | |
135 | -You can compile the package for more than one kind of computer at the |
136 | + You can compile the package for more than one kind of computer at the |
137 | same time, by placing the object files for each architecture in their |
138 | -own directory. To do this, you must use a version of `make' that |
139 | -supports the `VPATH' variable, such as GNU `make'. `cd' to the |
140 | +own directory. To do this, you can use GNU `make'. `cd' to the |
141 | directory where you want the object files and executables to go and run |
142 | the `configure' script. `configure' automatically checks for the |
143 | -source code in the directory that `configure' is in and in `..'. |
144 | - |
145 | - If you have to use a `make' that does not support the `VPATH' |
146 | -variable, you have to compile the package for one architecture at a |
147 | -time in the source code directory. After you have installed the |
148 | -package for one architecture, use `make distclean' before reconfiguring |
149 | -for another architecture. |
150 | +source code in the directory that `configure' is in and in `..'. This |
151 | +is known as a "VPATH" build. |
152 | + |
153 | + With a non-GNU `make', it is safer to compile the package for one |
154 | +architecture at a time in the source code directory. After you have |
155 | +installed the package for one architecture, use `make distclean' before |
156 | +reconfiguring for another architecture. |
157 | + |
158 | + On MacOS X 10.5 and later systems, you can create libraries and |
159 | +executables that work on multiple system types--known as "fat" or |
160 | +"universal" binaries--by specifying multiple `-arch' options to the |
161 | +compiler but only a single `-arch' option to the preprocessor. Like |
162 | +this: |
163 | + |
164 | + ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ |
165 | + CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ |
166 | + CPP="gcc -E" CXXCPP="g++ -E" |
167 | + |
168 | + This is not guaranteed to produce working output in all cases, you |
169 | +may have to build one architecture at a time and combine the results |
170 | +using the `lipo' tool if you have problems. |
171 | |
172 | Installation Names |
173 | ================== |
174 | |
175 | -By default, `make install' installs the package's commands under |
176 | + By default, `make install' installs the package's commands under |
177 | `/usr/local/bin', include files under `/usr/local/include', etc. You |
178 | can specify an installation prefix other than `/usr/local' by giving |
179 | -`configure' the option `--prefix=PREFIX'. |
180 | +`configure' the option `--prefix=PREFIX', where PREFIX must be an |
181 | +absolute file name. |
182 | |
183 | You can specify separate installation prefixes for |
184 | architecture-specific files and architecture-independent files. If you |
185 | @@ -116,16 +156,47 @@ |
186 | In addition, if you use an unusual directory layout you can give |
187 | options like `--bindir=DIR' to specify different values for particular |
188 | kinds of files. Run `configure --help' for a list of the directories |
189 | -you can set and what kinds of files go in them. |
190 | +you can set and what kinds of files go in them. In general, the |
191 | +default for these options is expressed in terms of `${prefix}', so that |
192 | +specifying just `--prefix' will affect all of the other directory |
193 | +specifications that were not explicitly provided. |
194 | + |
195 | + The most portable way to affect installation locations is to pass the |
196 | +correct locations to `configure'; however, many packages provide one or |
197 | +both of the following shortcuts of passing variable assignments to the |
198 | +`make install' command line to change installation locations without |
199 | +having to reconfigure or recompile. |
200 | + |
201 | + The first method involves providing an override variable for each |
202 | +affected directory. For example, `make install |
203 | +prefix=/alternate/directory' will choose an alternate location for all |
204 | +directory configuration variables that were expressed in terms of |
205 | +`${prefix}'. Any directories that were specified during `configure', |
206 | +but not in terms of `${prefix}', must each be overridden at install |
207 | +time for the entire installation to be relocated. The approach of |
208 | +makefile variable overrides for each directory variable is required by |
209 | +the GNU Coding Standards, and ideally causes no recompilation. |
210 | +However, some platforms have known limitations with the semantics of |
211 | +shared libraries that end up requiring recompilation when using this |
212 | +method, particularly noticeable in packages that use GNU Libtool. |
213 | + |
214 | + The second method involves providing the `DESTDIR' variable. For |
215 | +example, `make install DESTDIR=/alternate/directory' will prepend |
216 | +`/alternate/directory' before all installation names. The approach of |
217 | +`DESTDIR' overrides is not required by the GNU Coding Standards, and |
218 | +does not work on platforms that have drive letters. On the other hand, |
219 | +it does better at avoiding recompilation issues, and works well even |
220 | +when some directory options were not specified in terms of `${prefix}' |
221 | +at `configure' time. |
222 | + |
223 | +Optional Features |
224 | +================= |
225 | |
226 | If the package supports it, you can cause programs to be installed |
227 | with an extra prefix or suffix on their names by giving `configure' the |
228 | option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. |
229 | |
230 | -Optional Features |
231 | -================= |
232 | - |
233 | -Some packages pay attention to `--enable-FEATURE' options to |
234 | + Some packages pay attention to `--enable-FEATURE' options to |
235 | `configure', where FEATURE indicates an optional part of the package. |
236 | They may also pay attention to `--with-PACKAGE' options, where PACKAGE |
237 | is something like `gnu-as' or `x' (for the X Window System). The |
238 | @@ -137,14 +208,53 @@ |
239 | you can use the `configure' options `--x-includes=DIR' and |
240 | `--x-libraries=DIR' to specify their locations. |
241 | |
242 | + Some packages offer the ability to configure how verbose the |
243 | +execution of `make' will be. For these packages, running `./configure |
244 | +--enable-silent-rules' sets the default to minimal output, which can be |
245 | +overridden with `make V=1'; while running `./configure |
246 | +--disable-silent-rules' sets the default to verbose, which can be |
247 | +overridden with `make V=0'. |
248 | + |
249 | +Particular systems |
250 | +================== |
251 | + |
252 | + On HP-UX, the default C compiler is not ANSI C compatible. If GNU |
253 | +CC is not installed, it is recommended to use the following options in |
254 | +order to use an ANSI C compiler: |
255 | + |
256 | + ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" |
257 | + |
258 | +and if that doesn't work, install pre-built binaries of GCC for HP-UX. |
259 | + |
260 | + On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot |
261 | +parse its `<wchar.h>' header file. The option `-nodtk' can be used as |
262 | +a workaround. If GNU CC is not installed, it is therefore recommended |
263 | +to try |
264 | + |
265 | + ./configure CC="cc" |
266 | + |
267 | +and if that doesn't work, try |
268 | + |
269 | + ./configure CC="cc -nodtk" |
270 | + |
271 | + On Solaris, don't put `/usr/ucb' early in your `PATH'. This |
272 | +directory contains several dysfunctional programs; working variants of |
273 | +these programs are available in `/usr/bin'. So, if you need `/usr/ucb' |
274 | +in your `PATH', put it _after_ `/usr/bin'. |
275 | + |
276 | + On Haiku, software installed for all users goes in `/boot/common', |
277 | +not `/usr/local'. It is recommended to use the following options: |
278 | + |
279 | + ./configure --prefix=/boot/common |
280 | + |
281 | Specifying the System Type |
282 | ========================== |
283 | |
284 | -There may be some features `configure' cannot figure out automatically, |
285 | -but needs to determine by the type of machine the package will run on. |
286 | -Usually, assuming the package is built to be run on the _same_ |
287 | -architectures, `configure' can figure that out, but if it prints a |
288 | -message saying it cannot guess the machine type, give it the |
289 | + There may be some features `configure' cannot figure out |
290 | +automatically, but needs to determine by the type of machine the package |
291 | +will run on. Usually, assuming the package is built to be run on the |
292 | +_same_ architectures, `configure' can figure that out, but if it prints |
293 | +a message saying it cannot guess the machine type, give it the |
294 | `--build=TYPE' option. TYPE can either be a short name for the system |
295 | type, such as `sun4', or a canonical name which has the form: |
296 | |
297 | @@ -152,7 +262,8 @@ |
298 | |
299 | where SYSTEM can have one of these forms: |
300 | |
301 | - OS KERNEL-OS |
302 | + OS |
303 | + KERNEL-OS |
304 | |
305 | See the file `config.sub' for the possible values of each field. If |
306 | `config.sub' isn't included in this package, then this package doesn't |
307 | @@ -170,9 +281,9 @@ |
308 | Sharing Defaults |
309 | ================ |
310 | |
311 | -If you want to set default values for `configure' scripts to share, you |
312 | -can create a site shell script called `config.site' that gives default |
313 | -values for variables like `CC', `cache_file', and `prefix'. |
314 | + If you want to set default values for `configure' scripts to share, |
315 | +you can create a site shell script called `config.site' that gives |
316 | +default values for variables like `CC', `cache_file', and `prefix'. |
317 | `configure' looks for `PREFIX/share/config.site' if it exists, then |
318 | `PREFIX/etc/config.site' if it exists. Or, you can set the |
319 | `CONFIG_SITE' environment variable to the location of the site script. |
320 | @@ -181,7 +292,7 @@ |
321 | Defining Variables |
322 | ================== |
323 | |
324 | -Variables not defined in a site shell script can be set in the |
325 | + Variables not defined in a site shell script can be set in the |
326 | environment passed to `configure'. However, some packages may run |
327 | configure again during the build, and the customized values of these |
328 | variables may be lost. In order to avoid this problem, you should set |
329 | @@ -190,21 +301,29 @@ |
330 | ./configure CC=/usr/local2/bin/gcc |
331 | |
332 | causes the specified `gcc' to be used as the C compiler (unless it is |
333 | -overridden in the site shell script). Here is a another example: |
334 | - |
335 | - /bin/bash ./configure CONFIG_SHELL=/bin/bash |
336 | - |
337 | -Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent |
338 | -configuration-related scripts to be executed by `/bin/bash'. |
339 | +overridden in the site shell script). |
340 | + |
341 | +Unfortunately, this technique does not work for `CONFIG_SHELL' due to |
342 | +an Autoconf bug. Until the bug is fixed you can use this workaround: |
343 | + |
344 | + CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash |
345 | |
346 | `configure' Invocation |
347 | ====================== |
348 | |
349 | -`configure' recognizes the following options to control how it operates. |
350 | + `configure' recognizes the following options to control how it |
351 | +operates. |
352 | |
353 | `--help' |
354 | `-h' |
355 | - Print a summary of the options to `configure', and exit. |
356 | + Print a summary of all of the options to `configure', and exit. |
357 | + |
358 | +`--help=short' |
359 | +`--help=recursive' |
360 | + Print a summary of the options unique to this package's |
361 | + `configure', and exit. The `short' variant lists options used |
362 | + only in the top level, while the `recursive' variant lists options |
363 | + also present in any nested packages. |
364 | |
365 | `--version' |
366 | `-V' |
367 | @@ -231,6 +350,16 @@ |
368 | Look for the package's source code in directory DIR. Usually |
369 | `configure' can determine that directory automatically. |
370 | |
371 | +`--prefix=DIR' |
372 | + Use DIR as the installation prefix. *note Installation Names:: |
373 | + for more details, including other options available for fine-tuning |
374 | + the installation locations. |
375 | + |
376 | +`--no-create' |
377 | +`-n' |
378 | + Run the configure checks, but stop before creating any output |
379 | + files. |
380 | + |
381 | `configure' also accepts some other, not widely useful, options. Run |
382 | `configure --help' for more details. |
383 | |
384 | |
385 | === modified file 'Makefile.am' |
386 | --- Makefile.am 2010-11-17 18:25:47 +0000 |
387 | +++ Makefile.am 2010-11-22 15:13:53 +0000 |
388 | @@ -6,15 +6,15 @@ |
389 | |
390 | SUBDIRS = build src examples/rectangle-mover |
391 | |
392 | -libgrope-0.1.pc: libgrope.pc |
393 | - $(QUIET_GEN) cp -f libgrope.pc libgrope-0.1.pc |
394 | +libgrip-0.1.pc: libgrip.pc |
395 | + $(QUIET_GEN) cp -f libgrip.pc libgrip-0.1.pc |
396 | |
397 | pkgconfigdir = $(libdir)/pkgconfig |
398 | -pkgconfig_DATA = libgrope-0.1.pc |
399 | +pkgconfig_DATA = libgrip-0.1.pc |
400 | |
401 | -CLEANFILES = libgrope-0.1.pc |
402 | -DISTCLEANFILES = libgrope.pc grope*.tar.gz |
403 | -EXTRA_DIST = libgrope.pc.in m4/introspection.m4 |
404 | +CLEANFILES = libgrip-0.1.pc |
405 | +DISTCLEANFILES = libgrip.pc grip*.tar.gz |
406 | +EXTRA_DIST = libgrip.pc.in m4/introspection.m4 |
407 | |
408 | DISTCHECK_CONFIGURE_FLAGS = --disable-gtk-doc |
409 | |
410 | |
411 | === modified file 'autogen.sh' |
412 | --- autogen.sh 2010-10-12 15:42:04 +0000 |
413 | +++ autogen.sh 2010-11-22 15:13:53 +0000 |
414 | @@ -1,6 +1,6 @@ |
415 | #!/bin/sh |
416 | |
417 | -PKG_NAME="grope" |
418 | +PKG_NAME="grip" |
419 | |
420 | which gnome-autogen.sh || { |
421 | echo "You need gnome-common from GNOME git" |
422 | |
423 | === modified file 'configure.ac' |
424 | --- configure.ac 2010-11-17 18:25:47 +0000 |
425 | +++ configure.ac 2010-11-22 15:13:53 +0000 |
426 | @@ -1,25 +1,25 @@ |
427 | # |
428 | # shamelessly stolen from clutter-gtk |
429 | # |
430 | -m4_define([grope_major_version], [0]) |
431 | -m4_define([grope_minor_version], [1]) |
432 | -m4_define([grope_micro_version], [0]) |
433 | - |
434 | -m4_define([grope_api_version], |
435 | - [grope_major_version.grope_minor_version]) |
436 | -m4_define([grope_version], |
437 | - [grope_major_version.grope_minor_version.grope_micro_version]) |
438 | - |
439 | -m4_define([grope_interface_age], [0]) |
440 | -m4_define([grope_binary_age], |
441 | - [m4_eval(100 * grope_minor_version + grope_micro_version)]) |
442 | +m4_define([grip_major_version], [0]) |
443 | +m4_define([grip_minor_version], [1]) |
444 | +m4_define([grip_micro_version], [0]) |
445 | + |
446 | +m4_define([grip_api_version], |
447 | + [grip_major_version.grip_minor_version]) |
448 | +m4_define([grip_version], |
449 | + [grip_major_version.grip_minor_version.grip_micro_version]) |
450 | + |
451 | +m4_define([grip_interface_age], [0]) |
452 | +m4_define([grip_binary_age], |
453 | + [m4_eval(100 * grip_minor_version + grip_micro_version)]) |
454 | |
455 | AC_PREREQ(2.59) |
456 | |
457 | -AC_INIT([grope], |
458 | - [grope_version], |
459 | - [https://bugs.launchpad.net/libgrope]) |
460 | -AC_CONFIG_SRCDIR([src/grope.h]) |
461 | +AC_INIT([grip], |
462 | + [grip_version], |
463 | + [https://bugs.launchpad.net/libgrip]) |
464 | +AC_CONFIG_SRCDIR([src/grip.h]) |
465 | AC_CONFIG_MACRO_DIR([build/autotools]) |
466 | |
467 | AM_CONFIG_HEADER([config.h]) |
468 | @@ -27,27 +27,27 @@ |
469 | AM_INIT_AUTOMAKE([1.9]) |
470 | AM_MAINTAINER_MODE |
471 | |
472 | -GROPE_MAJOR_VERSION=grope_major_version |
473 | -GROPE_MINOR_VERSION=grope_minor_version |
474 | -GROPE_MICRO_VERSION=grope_micro_version |
475 | -GROPE_VERSION=grope_version |
476 | -AC_SUBST(GROPE_MAJOR_VERSION) |
477 | -AC_SUBST(GROPE_MINOR_VERSION) |
478 | -AC_SUBST(GROPE_MICRO_VERSION) |
479 | -AC_SUBST(GROPE_VERSION) |
480 | +GRIP_MAJOR_VERSION=grip_major_version |
481 | +GRIP_MINOR_VERSION=grip_minor_version |
482 | +GRIP_MICRO_VERSION=grip_micro_version |
483 | +GRIP_VERSION=grip_version |
484 | +AC_SUBST(GRIP_MAJOR_VERSION) |
485 | +AC_SUBST(GRIP_MINOR_VERSION) |
486 | +AC_SUBST(GRIP_MICRO_VERSION) |
487 | +AC_SUBST(GRIP_VERSION) |
488 | |
489 | m4_define([lt_current], |
490 | - [m4_eval(100 * grope_minor_version + grope_micro_version - grope_interface_age)]) |
491 | -m4_define([lt_revision], [grope_interface_age]) |
492 | -m4_define([lt_age], [m4_eval(grope_binary_age - grope_interface_age)]) |
493 | -GROPE_LT_CURRENT=lt_current |
494 | -GROPE_LT_REV=lt_revision |
495 | -GROPE_LT_AGE=lt_age |
496 | -GROPE_LT_VERSION="$GROPE_LT_CURRENT:$GROPE_LT_REV:$GROPE_LT_AGE" |
497 | -GROPE_LT_LDFLAGS="-version-info $GROPE_LT_VERSION" |
498 | + [m4_eval(100 * grip_minor_version + grip_micro_version - grip_interface_age)]) |
499 | +m4_define([lt_revision], [grip_interface_age]) |
500 | +m4_define([lt_age], [m4_eval(grip_binary_age - grip_interface_age)]) |
501 | +GRIP_LT_CURRENT=lt_current |
502 | +GRIP_LT_REV=lt_revision |
503 | +GRIP_LT_AGE=lt_age |
504 | +GRIP_LT_VERSION="$GRIP_LT_CURRENT:$GRIP_LT_REV:$GRIP_LT_AGE" |
505 | +GRIP_LT_LDFLAGS="-version-info $GRIP_LT_VERSION" |
506 | |
507 | -AC_SUBST(GROPE_LT_VERSION) |
508 | -AC_SUBST(GROPE_LT_LDFLAGS) |
509 | +AC_SUBST(GRIP_LT_VERSION) |
510 | +AC_SUBST(GRIP_LT_LDFLAGS) |
511 | |
512 | dnl =========================================================================== |
513 | |
514 | @@ -87,7 +87,7 @@ |
515 | AC_SUBST(GCC_FLAGS) |
516 | |
517 | # use strict compiler flags only on development releases |
518 | -m4_define([maintainer_flags_default], [m4_if(m4_eval(grope_minor_version % 2), [1], [yes], [no])]) |
519 | +m4_define([maintainer_flags_default], [m4_if(m4_eval(grip_minor_version % 2), [1], [yes], [no])]) |
520 | AC_ARG_ENABLE([maintainer-flags], |
521 | [AC_HELP_STRING([--enable-maintainer-flags=@<:@no/yes@:>@], |
522 | [Use strict compiler flags @<:@default=no@:>@])], |
523 | @@ -120,13 +120,13 @@ |
524 | build/autotools/shave |
525 | src/Makefile |
526 | examples/rectangle-mover/Makefile |
527 | - libgrope.pc |
528 | + libgrip.pc |
529 | ]) |
530 | |
531 | AC_OUTPUT |
532 | |
533 | echo "" |
534 | -echo " grope $VERSION" |
535 | +echo " grip $VERSION" |
536 | echo " ===============================" |
537 | echo "" |
538 | echo " Prefix : ${prefix}" |
539 | |
540 | === renamed directory 'examples/pygrope' => 'examples/pygrip' |
541 | === renamed file 'examples/pygrope/pygrope-gestures.xml' => 'examples/pygrip/pygrip-gestures.xml' |
542 | === renamed file 'examples/pygrope/pygrope.py' => 'examples/pygrip/pygrip.py' |
543 | --- examples/pygrope/pygrope.py 2010-11-17 18:09:57 +0000 |
544 | +++ examples/pygrip/pygrip.py 2010-11-22 15:13:53 +0000 |
545 | @@ -1,11 +1,11 @@ |
546 | import pygtk |
547 | from gi.repository import Gtk |
548 | -from gi.repository import Grope |
549 | - |
550 | - |
551 | -# XXX For now, we'll use Grope directly. Once we have a good sense of what's |
552 | -# going to be needed in general for general Python code using Grope, we might |
553 | -# want to put that stuff in a wrapper grope module, and import everything from |
554 | +from gi.repository import Grip |
555 | + |
556 | + |
557 | +# XXX For now, we'll use Grip directly. Once we have a good sense of what's |
558 | +# going to be needed in general for general Python code using Grip, we might |
559 | +# want to put that stuff in a wrapper grip module, and import everything from |
560 | # there instead. |
561 | |
562 | |
563 | @@ -13,18 +13,18 @@ |
564 | |
565 | def __init__(self): |
566 | builder = Gtk.Builder() |
567 | - builder.add_from_file("pygrope-gestures.xml") |
568 | + builder.add_from_file("pygrip-gestures.xml") |
569 | builder.connect_signals(self) |
570 | self.window = builder.get_object("window1") |
571 | self.window.show() |
572 | |
573 | def window_mapped(self, widget, data=None): |
574 | # The gesture manager is only going to be needed for GTK2, since GTK3 |
575 | - # will have the gesture API natively. Conversely, pygrope will only be |
576 | + # will have the gesture API natively. Conversely, pygrip will only be |
577 | # for GTK2, since PyGTK3 will having the bindings. |
578 | - gesture_manager = Grope.GestureManager() |
579 | + gesture_manager = Grip.GestureManager() |
580 | # For the purpose of this example, we are registering all gestures; we |
581 | - # could limit this by choosing a different pygrope.GROPE_GESTURE_* |
582 | + # could limit this by choosing a different pygrip.GRIP_GESTURE_* |
583 | # mask. Similarly, we're using one set of callbacks for all the |
584 | # gestures; we could have different callbacks for different registered |
585 | # gestures. |
586 | @@ -32,7 +32,7 @@ |
587 | # reverted to the older API until the new one is merged to trunk. |
588 | finger_count = 2 |
589 | gesture_manager.register_window( |
590 | - self.window, Grope.GestureType.PINCH, finger_count,self.callback, |
591 | + self.window, Grip.GestureType.PINCH, finger_count,self.callback, |
592 | None, None) |
593 | |
594 | def callback(self, window, time_type, gesture_type, gesture_event): |
595 | |
596 | === modified file 'examples/rectangle-mover/Makefile.am' |
597 | --- examples/rectangle-mover/Makefile.am 2010-11-05 18:42:35 +0000 |
598 | +++ examples/rectangle-mover/Makefile.am 2010-11-22 15:13:53 +0000 |
599 | @@ -12,4 +12,4 @@ |
600 | $(GTK_CFLAGS) \ |
601 | $(MAINTAINER_CFLAGS) |
602 | |
603 | -gesture_LDADD = $(top_builddir)/src/libgrope-0.1.la |
604 | +gesture_LDADD = $(top_builddir)/src/libgrip-0.1.la |
605 | |
606 | === modified file 'examples/rectangle-mover/gesture.c' |
607 | --- examples/rectangle-mover/gesture.c 2010-11-18 21:40:02 +0000 |
608 | +++ examples/rectangle-mover/gesture.c 2010-11-22 15:13:53 +0000 |
609 | @@ -2,7 +2,7 @@ |
610 | #include <string.h> |
611 | #include <signal.h> |
612 | |
613 | -#include "gropegesturemanager.h" |
614 | +#include "gripgesturemanager.h" |
615 | |
616 | static gint rotate = 0; |
617 | static gdouble scale = 1.0; |
618 | @@ -62,15 +62,15 @@ |
619 | |
620 | static void |
621 | gesture_callback (GtkWindow *window, |
622 | - GropeTimeType time_type, |
623 | - GropeGestureEvent *event, |
624 | + GripTimeType time_type, |
625 | + GripGestureEvent *event, |
626 | gpointer user_data) |
627 | { |
628 | - if (time_type == GROPE_TIME_START) |
629 | + if (time_type == GRIP_TIME_START) |
630 | { |
631 | in_touch++; |
632 | } |
633 | - else if (time_type == GROPE_TIME_END) |
634 | + else if (time_type == GRIP_TIME_END) |
635 | { |
636 | in_touch--; |
637 | } |
638 | @@ -78,32 +78,32 @@ |
639 | { |
640 | switch (event->type) |
641 | { |
642 | - case GROPE_GESTURE_DRAG: |
643 | + case GRIP_GESTURE_DRAG: |
644 | { |
645 | - GropeEventGestureDrag *e = (GropeEventGestureDrag *)event; |
646 | + GripEventGestureDrag *e = (GripEventGestureDrag *)event; |
647 | |
648 | translate[0] += e->delta_x; |
649 | translate[1] += e->delta_y; |
650 | } |
651 | break; |
652 | |
653 | - case GROPE_GESTURE_PINCH: |
654 | + case GRIP_GESTURE_PINCH: |
655 | { |
656 | - GropeEventGesturePinch *e = (GropeEventGesturePinch *)event; |
657 | + GripEventGesturePinch *e = (GripEventGesturePinch *)event; |
658 | |
659 | scale += e->radius_delta / 100; |
660 | } |
661 | break; |
662 | |
663 | - case GROPE_GESTURE_ROTATE: |
664 | + case GRIP_GESTURE_ROTATE: |
665 | { |
666 | - GropeEventGestureRotate *e = (GropeEventGestureRotate *)event; |
667 | + GripEventGestureRotate *e = (GripEventGestureRotate *)event; |
668 | |
669 | rotate += e->angle_delta * 100; |
670 | } |
671 | break; |
672 | |
673 | - case GROPE_GESTURE_TAP: |
674 | + case GRIP_GESTURE_TAP: |
675 | break; |
676 | } |
677 | } |
678 | @@ -114,33 +114,33 @@ |
679 | static void |
680 | window_mapped (GtkWidget *widget) |
681 | { |
682 | - GropeGestureManager *manager = grope_gesture_manager_get (); |
683 | + GripGestureManager *manager = grip_gesture_manager_get (); |
684 | GtkWindow *window = GTK_WINDOW (widget); |
685 | |
686 | - grope_gesture_manager_register_window (manager, |
687 | - window, |
688 | - GROPE_GESTURE_PINCH, |
689 | - 2, |
690 | - gesture_callback, |
691 | - NULL, NULL); |
692 | - |
693 | - grope_gesture_manager_register_window (manager, |
694 | - window, |
695 | - GROPE_GESTURE_ROTATE, |
696 | - 2, |
697 | - gesture_callback, |
698 | - NULL, NULL); |
699 | - |
700 | - grope_gesture_manager_register_window (manager, |
701 | - window, |
702 | - GROPE_GESTURE_DRAG, |
703 | - 2, |
704 | - gesture_callback, |
705 | - NULL, NULL); |
706 | - |
707 | - grope_gesture_manager_register_window (manager, |
708 | - window, |
709 | - GROPE_GESTURE_TAP, |
710 | + grip_gesture_manager_register_window (manager, |
711 | + window, |
712 | + GRIP_GESTURE_PINCH, |
713 | + 2, |
714 | + gesture_callback, |
715 | + NULL, NULL); |
716 | + |
717 | + grip_gesture_manager_register_window (manager, |
718 | + window, |
719 | + GRIP_GESTURE_ROTATE, |
720 | + 2, |
721 | + gesture_callback, |
722 | + NULL, NULL); |
723 | + |
724 | + grip_gesture_manager_register_window (manager, |
725 | + window, |
726 | + GRIP_GESTURE_DRAG, |
727 | + 2, |
728 | + gesture_callback, |
729 | + NULL, NULL); |
730 | + |
731 | + grip_gesture_manager_register_window (manager, |
732 | + window, |
733 | + GRIP_GESTURE_TAP, |
734 | 2, |
735 | gesture_callback, |
736 | NULL, NULL); |
737 | |
738 | === renamed file 'libgrope.pc.in' => 'libgrip.pc.in' |
739 | --- libgrope.pc.in 2010-10-12 15:42:04 +0000 |
740 | +++ libgrip.pc.in 2010-11-22 15:13:53 +0000 |
741 | @@ -3,9 +3,9 @@ |
742 | libdir=@libdir@ |
743 | includedir=@includedir@ |
744 | |
745 | -Name: libgrope |
746 | +Name: libgrip |
747 | Description: Multitouch gesture library |
748 | Version: @VERSION@ |
749 | -Libs: -L${libdir} -lgrope-0.1 |
750 | -Cflags: -I${includedir}/libgrope-0.1 |
751 | +Libs: -L${libdir} -lgrip-0.1 |
752 | +Cflags: -I${includedir}/libgrip-0.1 |
753 | Requires: gtk+-2.0 |
754 | |
755 | === modified file 'src/Makefile.am' |
756 | --- src/Makefile.am 2010-11-10 20:01:11 +0000 |
757 | +++ src/Makefile.am 2010-11-22 15:13:53 +0000 |
758 | @@ -1,29 +1,29 @@ |
759 | -grope_built_public_sources = \ |
760 | - gropetypebuiltins.h |
761 | +grip_built_public_sources = \ |
762 | + griptypebuiltins.h |
763 | |
764 | stamp_files = \ |
765 | - gropetypebuiltins.h \ |
766 | - gropetypebuiltins.c |
767 | + griptypebuiltins.h \ |
768 | + griptypebuiltins.c |
769 | |
770 | sources_h = \ |
771 | - gropegesturemanager.h |
772 | + gripgesturemanager.h |
773 | |
774 | EXTRA_DIST = \ |
775 | - gropetypebuiltins.h.in \ |
776 | - gropetypebuiltins.c.in |
777 | - |
778 | -gropetypebuiltins.h: stamp-gropetypebuiltins.h |
779 | - |
780 | -stamp-gropetypebuiltins.h: $(sources_h) |
781 | - ( cd $(srcdir) && $(GLIB_MKENUMS) --template gropetypebuiltins.h.in \ |
782 | + griptypebuiltins.h.in \ |
783 | + griptypebuiltins.c.in |
784 | + |
785 | +griptypebuiltins.h: stamp-griptypebuiltins.h |
786 | + |
787 | +stamp-griptypebuiltins.h: $(sources_h) |
788 | + ( cd $(srcdir) && $(GLIB_MKENUMS) --template griptypebuiltins.h.in \ |
789 | $(sources_h) ) >> xgen-gtbh \ |
790 | - && (cmp -s xgen-gtbh gropetypebuiltins.h || cp xgen-gtbh gropetypebuiltins.h ) \ |
791 | + && (cmp -s xgen-gtbh griptypebuiltins.h || cp xgen-gtbh griptypebuiltins.h ) \ |
792 | && rm -f xgen-gtbh && echo timestamp > $(@F) |
793 | |
794 | -gropetypebuiltins.c: stamp-gropetypebuiltins.h |
795 | - ( cd $(srcdir) && $(GLIB_MKENUMS) --template gropetypebuiltins.c.in \ |
796 | +griptypebuiltins.c: stamp-griptypebuiltins.h |
797 | + ( cd $(srcdir) && $(GLIB_MKENUMS) --template griptypebuiltins.c.in \ |
798 | $(sources_h) ) > xgen-gtbc \ |
799 | - && cp xgen-gtbc gropetypebuiltins.c && rm -f xgen-gtbc |
800 | + && cp xgen-gtbc griptypebuiltins.c && rm -f xgen-gtbc |
801 | |
802 | CLEANFILES = |
803 | |
804 | @@ -34,19 +34,19 @@ |
805 | introspection_sources = $(patsubst %,$(srcdir)/%,$(sources_h)) |
806 | |
807 | irscanner_headers = $(patsubst %,$(srcdir)/%,$(sources_h)) |
808 | -Grope-0.1.gir: $(INTROSPECTION_SCANNER) $(irscanner_headers) Makefile.am |
809 | +Grip-0.1.gir: $(INTROSPECTION_SCANNER) $(irscanner_headers) Makefile.am |
810 | $(INTROSPECTION_SCANNER) \ |
811 | - -v --namespace Grope \ |
812 | + -v --namespace Grip \ |
813 | --nsversion=0.1 \ |
814 | --add-include-path=$(srcdir) $(GTK_CFLAGS) \ |
815 | --include=GObject-2.0 \ |
816 | --include=GLib-2.0 \ |
817 | --include=Gtk-2.0 \ |
818 | - --library=grope-0.1 \ |
819 | - --output Grope-0.1.gir $(irscanner_headers) \ |
820 | - $(addprefix --c-include=src/, $(grope_headers)) |
821 | + --library=grip-0.1 \ |
822 | + --output Grip-0.1.gir $(irscanner_headers) \ |
823 | + $(addprefix --c-include=src/, $(grip_headers)) |
824 | |
825 | -BUILT_GIRSOURCES += Grope-0.1.gir |
826 | +BUILT_GIRSOURCES += Grip-0.1.gir |
827 | |
828 | girdir = $(datadir)/gir-1.0 |
829 | gir_DATA = $(BUILT_GIRSOURCES) |
830 | @@ -70,7 +70,7 @@ |
831 | INCLUDES = \ |
832 | -I$(srcdir) \ |
833 | -I$(top_srcdir) \ |
834 | - -DG_LOG_DOMAIN=\"GROPE\" \ |
835 | + -DG_LOG_DOMAIN=\"GRIP\" \ |
836 | -DPREFIX=\"$(prefix)"\" \ |
837 | -DLIBDIR=\"$(libdir)"\" \ |
838 | -DG_DISABLE_DEPRECATED \ |
839 | @@ -84,24 +84,24 @@ |
840 | $(GEIS_CFLAGS) \ |
841 | $(MAINTAINER_CFLAGS) |
842 | |
843 | -lib_LTLIBRARIES = libgrope-0.1.la |
844 | - |
845 | -libgrope_0_1_la_SOURCES = \ |
846 | - gropegesturemanager.c \ |
847 | - gropetypebuiltins.c |
848 | - |
849 | -libgropeincludedir=$(includedir)/libgrope-0.1/libgrope |
850 | - |
851 | -libgropeinclude_HEADERS = \ |
852 | - gropegesturemanager.h \ |
853 | - grope.h |
854 | - |
855 | -libgrope_0_1_la_LIBADD = $(GTK_LIBS) $(GEIS_LIBS) |
856 | -libgrope_0_1_la_LDFLAGS = $(GTK_LT_LDFLAGS) |
857 | - |
858 | -gropeheadersdir = $(includedir)/grope-0.1/grope |
859 | +lib_LTLIBRARIES = libgrip-0.1.la |
860 | + |
861 | +libgrip_0_1_la_SOURCES = \ |
862 | + gripgesturemanager.c \ |
863 | + griptypebuiltins.c |
864 | + |
865 | +libgripincludedir=$(includedir)/libgrip-0.1/libgrip |
866 | + |
867 | +libgripinclude_HEADERS = \ |
868 | + gripgesturemanager.h \ |
869 | + grip.h |
870 | + |
871 | +libgrip_0_1_la_LIBADD = $(GTK_LIBS) $(GEIS_LIBS) |
872 | +libgrip_0_1_la_LDFLAGS = $(GTK_LT_LDFLAGS) |
873 | + |
874 | +gripheadersdir = $(includedir)/grip-0.1/grip |
875 | |
876 | DISTCLEANFILES = \ |
877 | - stamp-gropetypebuiltins.h \ |
878 | - gropetypebuiltins.h \ |
879 | - gropetypebuiltins.c |
880 | \ No newline at end of file |
881 | + stamp-griptypebuiltins.h \ |
882 | + griptypebuiltins.h \ |
883 | + griptypebuiltins.c |
884 | \ No newline at end of file |
885 | |
886 | === renamed file 'src/grope.h' => 'src/grip.h' |
887 | --- src/grope.h 2010-11-09 21:00:30 +0000 |
888 | +++ src/grip.h 2010-11-22 15:13:53 +0000 |
889 | @@ -23,9 +23,9 @@ |
890 | * Cody Russell <crussell@canonical.com> |
891 | */ |
892 | |
893 | -#ifndef __GROPE_H__ |
894 | -#define __GROPE_H__ |
895 | - |
896 | -#include <libgrope/gropegesturemanager.h> |
897 | - |
898 | -#endif /* __GROPE_H__ */ |
899 | +#ifndef __GRIP_H__ |
900 | +#define __GRIP_H__ |
901 | + |
902 | +#include <libgrip/gripgesturemanager.h> |
903 | + |
904 | +#endif /* __GRIP_H__ */ |
905 | |
906 | === renamed file 'src/gropegesturemanager.c' => 'src/gripgesturemanager.c' |
907 | --- src/gropegesturemanager.c 2010-11-19 00:18:08 +0000 |
908 | +++ src/gripgesturemanager.c 2010-11-22 15:13:53 +0000 |
909 | @@ -23,29 +23,29 @@ |
910 | * Cody Russell <crussell@canonical.com> |
911 | */ |
912 | |
913 | -#include "gropegesturemanager.h" |
914 | +#include "gripgesturemanager.h" |
915 | |
916 | #include <gdk/gdkx.h> |
917 | #include <geis/geis.h> |
918 | |
919 | -typedef struct _GropeGestureRegistration GropeGestureRegistration; |
920 | -typedef struct _GropeGestureBinding GropeGestureBinding; |
921 | +typedef struct _GripGestureRegistration GripGestureRegistration; |
922 | +typedef struct _GripGestureBinding GripGestureBinding; |
923 | |
924 | -struct _GropeGestureManagerPrivate |
925 | +struct _GripGestureManagerPrivate |
926 | { |
927 | GHashTable *hash; |
928 | }; |
929 | |
930 | -struct _GropeGestureBinding |
931 | +struct _GripGestureBinding |
932 | { |
933 | - GropeGestureType type; |
934 | - gint touches; |
935 | - GropeGestureCallback callback; |
936 | - gpointer data; |
937 | - GDestroyNotify destroy; |
938 | + GripGestureType type; |
939 | + gint touches; |
940 | + GripGestureCallback callback; |
941 | + gpointer data; |
942 | + GDestroyNotify destroy; |
943 | }; |
944 | |
945 | -struct _GropeGestureRegistration |
946 | +struct _GripGestureRegistration |
947 | { |
948 | GtkWindow *window; |
949 | GList *bindings; |
950 | @@ -83,7 +83,7 @@ |
951 | GeisSize attr_count, |
952 | GeisGestureAttr *attrs); |
953 | |
954 | -static GropeGestureManager *manager_singleton = NULL; |
955 | +static GripGestureManager *manager_singleton = NULL; |
956 | static GeisGestureFuncs gesture_funcs = { |
957 | gesture_added, |
958 | gesture_removed, |
959 | @@ -92,14 +92,14 @@ |
960 | gesture_finish |
961 | }; |
962 | |
963 | -G_DEFINE_TYPE (GropeGestureManager, grope_gesture_manager, G_TYPE_OBJECT) |
964 | +G_DEFINE_TYPE (GripGestureManager, grip_gesture_manager, G_TYPE_OBJECT) |
965 | |
966 | -#define GROPE_GESTURE_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GROPE_TYPE_GESTURE_MANAGER, GropeGestureManagerPrivate)) |
967 | +#define GRIP_GESTURE_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GRIP_TYPE_GESTURE_MANAGER, GripGestureManagerPrivate)) |
968 | |
969 | static void |
970 | -grope_gesture_manager_dispose (GObject *object) |
971 | +grip_gesture_manager_dispose (GObject *object) |
972 | { |
973 | - GropeGestureManagerPrivate *priv = GROPE_GESTURE_MANAGER (object)->priv; |
974 | + GripGestureManagerPrivate *priv = GRIP_GESTURE_MANAGER (object)->priv; |
975 | |
976 | if (priv->hash != NULL) |
977 | { |
978 | @@ -109,14 +109,14 @@ |
979 | } |
980 | |
981 | static void |
982 | -grope_gesture_manager_finalize (GObject *object) |
983 | +grip_gesture_manager_finalize (GObject *object) |
984 | { |
985 | } |
986 | |
987 | static GObject * |
988 | -grope_gesture_manager_constructor (GType type, |
989 | - guint n_params, |
990 | - GObjectConstructParam *params) |
991 | +grip_gesture_manager_constructor (GType type, |
992 | + guint n_params, |
993 | + GObjectConstructParam *params) |
994 | { |
995 | GObject *object; |
996 | |
997 | @@ -126,11 +126,11 @@ |
998 | } |
999 | else |
1000 | { |
1001 | - object = G_OBJECT_CLASS (grope_gesture_manager_parent_class)->constructor (type, |
1002 | - n_params, |
1003 | - params); |
1004 | + object = G_OBJECT_CLASS (grip_gesture_manager_parent_class)->constructor (type, |
1005 | + n_params, |
1006 | + params); |
1007 | |
1008 | - manager_singleton = GROPE_GESTURE_MANAGER (object); |
1009 | + manager_singleton = GRIP_GESTURE_MANAGER (object); |
1010 | g_object_add_weak_pointer (object, (gpointer) &manager_singleton); |
1011 | } |
1012 | |
1013 | @@ -138,25 +138,25 @@ |
1014 | } |
1015 | |
1016 | static void |
1017 | -grope_gesture_manager_class_init (GropeGestureManagerClass *class) |
1018 | +grip_gesture_manager_class_init (GripGestureManagerClass *class) |
1019 | { |
1020 | GObjectClass *gobject_class; |
1021 | |
1022 | gobject_class = G_OBJECT_CLASS (class); |
1023 | |
1024 | - grope_gesture_manager_parent_class = g_type_class_peek_parent (class); |
1025 | - |
1026 | - g_type_class_add_private (gobject_class, sizeof (GropeGestureManagerPrivate)); |
1027 | - |
1028 | - gobject_class->constructor = grope_gesture_manager_constructor; |
1029 | - gobject_class->dispose = grope_gesture_manager_dispose; |
1030 | - gobject_class->finalize = grope_gesture_manager_finalize; |
1031 | + grip_gesture_manager_parent_class = g_type_class_peek_parent (class); |
1032 | + |
1033 | + g_type_class_add_private (gobject_class, sizeof (GripGestureManagerPrivate)); |
1034 | + |
1035 | + gobject_class->constructor = grip_gesture_manager_constructor; |
1036 | + gobject_class->dispose = grip_gesture_manager_dispose; |
1037 | + gobject_class->finalize = grip_gesture_manager_finalize; |
1038 | } |
1039 | |
1040 | static gint |
1041 | -pinch_gesture_handle_properties (GropeEventGesturePinch *event, |
1042 | - GeisSize attr_count, |
1043 | - GeisGestureAttr *attrs) |
1044 | +pinch_gesture_handle_properties (GripEventGesturePinch *event, |
1045 | + GeisSize attr_count, |
1046 | + GeisGestureAttr *attrs) |
1047 | { |
1048 | gint i = 0; |
1049 | gint touches = 0; |
1050 | @@ -204,9 +204,9 @@ |
1051 | } |
1052 | |
1053 | static gint |
1054 | -drag_gesture_handle_properties (GropeEventGestureDrag *event, |
1055 | - GeisSize attr_count, |
1056 | - GeisGestureAttr *attrs) |
1057 | +drag_gesture_handle_properties (GripEventGestureDrag *event, |
1058 | + GeisSize attr_count, |
1059 | + GeisGestureAttr *attrs) |
1060 | { |
1061 | gint i; |
1062 | gint touches = 0; |
1063 | @@ -269,9 +269,9 @@ |
1064 | } |
1065 | |
1066 | static gint |
1067 | -rotate_gesture_handle_properties (GropeEventGestureRotate *event, |
1068 | - GeisSize attr_count, |
1069 | - GeisGestureAttr *attrs) |
1070 | +rotate_gesture_handle_properties (GripEventGestureRotate *event, |
1071 | + GeisSize attr_count, |
1072 | + GeisGestureAttr *attrs) |
1073 | { |
1074 | gint i; |
1075 | gint touches = 0; |
1076 | @@ -319,9 +319,9 @@ |
1077 | } |
1078 | |
1079 | static gint |
1080 | -tap_gesture_handle_properties (GropeEventGestureTap *event, |
1081 | - GeisSize attr_count, |
1082 | - GeisGestureAttr *attrs) |
1083 | +tap_gesture_handle_properties (GripEventGestureTap *event, |
1084 | + GeisSize attr_count, |
1085 | + GeisGestureAttr *attrs) |
1086 | { |
1087 | gint i; |
1088 | gint touches = 0; |
1089 | @@ -383,18 +383,18 @@ |
1090 | GeisSize attr_count, |
1091 | GeisGestureAttr *attrs) |
1092 | { |
1093 | - GropeGestureRegistration *reg = (GropeGestureRegistration *)cookie; |
1094 | + GripGestureRegistration *reg = (GripGestureRegistration *)cookie; |
1095 | GList *l = NULL; |
1096 | |
1097 | for (l = reg->bindings; l != NULL; l = l->next) |
1098 | { |
1099 | - GropeGestureBinding *binding = (GropeGestureBinding *)l->data; |
1100 | + GripGestureBinding *binding = (GripGestureBinding *)l->data; |
1101 | |
1102 | if (binding->type == type) |
1103 | { |
1104 | - if (type == GROPE_GESTURE_DRAG) |
1105 | + if (type == GRIP_GESTURE_DRAG) |
1106 | { |
1107 | - GropeEventGestureDrag drag; |
1108 | + GripEventGestureDrag drag; |
1109 | |
1110 | drag.type = type; |
1111 | drag.id = id; |
1112 | @@ -405,14 +405,14 @@ |
1113 | if (drag.fingers == binding->touches) |
1114 | { |
1115 | binding->callback (reg->window, |
1116 | - GROPE_TIME_START, |
1117 | - ((GropeGestureEvent*)&drag), |
1118 | + GRIP_TIME_START, |
1119 | + ((GripGestureEvent*)&drag), |
1120 | binding->data); |
1121 | } |
1122 | } |
1123 | - else if (type == GROPE_GESTURE_PINCH) |
1124 | + else if (type == GRIP_GESTURE_PINCH) |
1125 | { |
1126 | - GropeEventGesturePinch pinch; |
1127 | + GripEventGesturePinch pinch; |
1128 | |
1129 | pinch.type = type; |
1130 | pinch.id = id; |
1131 | @@ -423,14 +423,14 @@ |
1132 | if (pinch.fingers == binding->touches) |
1133 | { |
1134 | binding->callback (reg->window, |
1135 | - GROPE_TIME_START, |
1136 | - ((GropeGestureEvent*)&pinch), |
1137 | + GRIP_TIME_START, |
1138 | + ((GripGestureEvent*)&pinch), |
1139 | binding->data); |
1140 | } |
1141 | } |
1142 | - else if (type == GROPE_GESTURE_ROTATE) |
1143 | + else if (type == GRIP_GESTURE_ROTATE) |
1144 | { |
1145 | - GropeEventGestureRotate rotate; |
1146 | + GripEventGestureRotate rotate; |
1147 | |
1148 | rotate.type = type; |
1149 | rotate.id = id; |
1150 | @@ -441,14 +441,14 @@ |
1151 | if (rotate.fingers == binding->touches) |
1152 | { |
1153 | binding->callback (reg->window, |
1154 | - GROPE_TIME_START, |
1155 | - ((GropeGestureEvent*)&rotate), |
1156 | + GRIP_TIME_START, |
1157 | + ((GripGestureEvent*)&rotate), |
1158 | binding->data); |
1159 | } |
1160 | } |
1161 | - else if (type == GROPE_GESTURE_TAP) |
1162 | + else if (type == GRIP_GESTURE_TAP) |
1163 | { |
1164 | - GropeEventGestureTap tap; |
1165 | + GripEventGestureTap tap; |
1166 | |
1167 | tap.type = type; |
1168 | tap.id = id; |
1169 | @@ -459,8 +459,8 @@ |
1170 | if (tap.fingers == binding->touches) |
1171 | { |
1172 | binding->callback (reg->window, |
1173 | - GROPE_TIME_START, |
1174 | - ((GropeGestureEvent*)&tap), |
1175 | + GRIP_TIME_START, |
1176 | + ((GripGestureEvent*)&tap), |
1177 | binding->data); |
1178 | } |
1179 | } |
1180 | @@ -477,18 +477,18 @@ |
1181 | GeisSize attr_count, |
1182 | GeisGestureAttr *attrs) |
1183 | { |
1184 | - GropeGestureRegistration *reg = (GropeGestureRegistration *)cookie; |
1185 | + GripGestureRegistration *reg = (GripGestureRegistration *)cookie; |
1186 | GList *l = NULL; |
1187 | |
1188 | for (l = reg->bindings; l != NULL; l = l->next) |
1189 | { |
1190 | - GropeGestureBinding *binding = (GropeGestureBinding *)l->data; |
1191 | + GripGestureBinding *binding = (GripGestureBinding *)l->data; |
1192 | |
1193 | if (binding->type == type) |
1194 | { |
1195 | - if (type == GROPE_GESTURE_DRAG) |
1196 | + if (type == GRIP_GESTURE_DRAG) |
1197 | { |
1198 | - GropeEventGestureDrag drag; |
1199 | + GripEventGestureDrag drag; |
1200 | |
1201 | drag.type = type; |
1202 | drag.id = id; |
1203 | @@ -499,14 +499,14 @@ |
1204 | if (drag.fingers == binding->touches) |
1205 | { |
1206 | binding->callback (reg->window, |
1207 | - GROPE_TIME_UPDATE, |
1208 | - ((GropeGestureEvent*)&drag), |
1209 | + GRIP_TIME_UPDATE, |
1210 | + ((GripGestureEvent*)&drag), |
1211 | binding->data); |
1212 | } |
1213 | } |
1214 | - else if (type == GROPE_GESTURE_PINCH) |
1215 | + else if (type == GRIP_GESTURE_PINCH) |
1216 | { |
1217 | - GropeEventGesturePinch pinch; |
1218 | + GripEventGesturePinch pinch; |
1219 | |
1220 | pinch.type = type; |
1221 | pinch.id = id; |
1222 | @@ -517,14 +517,14 @@ |
1223 | if (pinch.fingers == binding->touches) |
1224 | { |
1225 | binding->callback (reg->window, |
1226 | - GROPE_TIME_UPDATE, |
1227 | - ((GropeGestureEvent*)&pinch), |
1228 | + GRIP_TIME_UPDATE, |
1229 | + ((GripGestureEvent*)&pinch), |
1230 | binding->data); |
1231 | } |
1232 | } |
1233 | - else if (type == GROPE_GESTURE_ROTATE) |
1234 | + else if (type == GRIP_GESTURE_ROTATE) |
1235 | { |
1236 | - GropeEventGestureRotate rotate; |
1237 | + GripEventGestureRotate rotate; |
1238 | |
1239 | rotate.type = type; |
1240 | rotate.id = id; |
1241 | @@ -535,14 +535,14 @@ |
1242 | if (rotate.fingers == binding->touches) |
1243 | { |
1244 | binding->callback (reg->window, |
1245 | - GROPE_TIME_UPDATE, |
1246 | - ((GropeGestureEvent*)&rotate), |
1247 | + GRIP_TIME_UPDATE, |
1248 | + ((GripGestureEvent*)&rotate), |
1249 | binding->data); |
1250 | } |
1251 | } |
1252 | - else if (type == GROPE_GESTURE_TAP) |
1253 | + else if (type == GRIP_GESTURE_TAP) |
1254 | { |
1255 | - GropeEventGestureTap tap; |
1256 | + GripEventGestureTap tap; |
1257 | |
1258 | tap.type = type; |
1259 | tap.id = id; |
1260 | @@ -553,8 +553,8 @@ |
1261 | if (tap.fingers == binding->touches) |
1262 | { |
1263 | binding->callback (reg->window, |
1264 | - GROPE_TIME_UPDATE, |
1265 | - ((GropeGestureEvent*)&tap), |
1266 | + GRIP_TIME_UPDATE, |
1267 | + ((GripGestureEvent*)&tap), |
1268 | binding->data); |
1269 | } |
1270 | } |
1271 | @@ -569,18 +569,18 @@ |
1272 | GeisSize attr_count, |
1273 | GeisGestureAttr *attrs) |
1274 | { |
1275 | - GropeGestureRegistration *reg = (GropeGestureRegistration *)cookie; |
1276 | + GripGestureRegistration *reg = (GripGestureRegistration *)cookie; |
1277 | GList *l = NULL; |
1278 | |
1279 | for (l = reg->bindings; l != NULL; l = l->next) |
1280 | { |
1281 | - GropeGestureBinding *binding = (GropeGestureBinding *)l->data; |
1282 | + GripGestureBinding *binding = (GripGestureBinding *)l->data; |
1283 | |
1284 | if (binding->type == type) |
1285 | { |
1286 | - if (type == GROPE_GESTURE_DRAG) |
1287 | + if (type == GRIP_GESTURE_DRAG) |
1288 | { |
1289 | - GropeEventGestureDrag drag; |
1290 | + GripEventGestureDrag drag; |
1291 | |
1292 | drag.type = type; |
1293 | drag.id = id; |
1294 | @@ -591,14 +591,14 @@ |
1295 | if (drag.fingers == binding->touches) |
1296 | { |
1297 | binding->callback (reg->window, |
1298 | - GROPE_TIME_END, |
1299 | - ((GropeGestureEvent*)&drag), |
1300 | + GRIP_TIME_END, |
1301 | + ((GripGestureEvent*)&drag), |
1302 | binding->data); |
1303 | } |
1304 | } |
1305 | - else if (type == GROPE_GESTURE_PINCH) |
1306 | + else if (type == GRIP_GESTURE_PINCH) |
1307 | { |
1308 | - GropeEventGesturePinch pinch; |
1309 | + GripEventGesturePinch pinch; |
1310 | |
1311 | pinch.type = type; |
1312 | pinch.id = id; |
1313 | @@ -609,14 +609,14 @@ |
1314 | if (pinch.fingers == binding->touches) |
1315 | { |
1316 | binding->callback (reg->window, |
1317 | - GROPE_TIME_END, |
1318 | - ((GropeGestureEvent*)&pinch), |
1319 | + GRIP_TIME_END, |
1320 | + ((GripGestureEvent*)&pinch), |
1321 | binding->data); |
1322 | } |
1323 | } |
1324 | - else if (type == GROPE_GESTURE_ROTATE) |
1325 | + else if (type == GRIP_GESTURE_ROTATE) |
1326 | { |
1327 | - GropeEventGestureRotate rotate; |
1328 | + GripEventGestureRotate rotate; |
1329 | |
1330 | rotate.type = type; |
1331 | rotate.id = id; |
1332 | @@ -627,14 +627,14 @@ |
1333 | if (rotate.fingers == binding->touches) |
1334 | { |
1335 | binding->callback (reg->window, |
1336 | - GROPE_TIME_END, |
1337 | - ((GropeGestureEvent*)&rotate), |
1338 | + GRIP_TIME_END, |
1339 | + ((GripGestureEvent*)&rotate), |
1340 | binding->data); |
1341 | } |
1342 | } |
1343 | - else if (type == GROPE_GESTURE_TAP) |
1344 | + else if (type == GRIP_GESTURE_TAP) |
1345 | { |
1346 | - GropeEventGestureTap tap; |
1347 | + GripEventGestureTap tap; |
1348 | |
1349 | tap.type = type; |
1350 | tap.id = id; |
1351 | @@ -645,8 +645,8 @@ |
1352 | if (tap.fingers == binding->touches) |
1353 | { |
1354 | binding->callback (reg->window, |
1355 | - GROPE_TIME_END, |
1356 | - ((GropeGestureEvent*)&tap), |
1357 | + GRIP_TIME_END, |
1358 | + ((GripGestureEvent*)&tap), |
1359 | binding->data); |
1360 | } |
1361 | } |
1362 | @@ -655,11 +655,11 @@ |
1363 | } |
1364 | |
1365 | static void |
1366 | -grope_gesture_manager_init (GropeGestureManager *item) |
1367 | +grip_gesture_manager_init (GripGestureManager *item) |
1368 | { |
1369 | - GropeGestureManagerPrivate *priv; |
1370 | + GripGestureManagerPrivate *priv; |
1371 | |
1372 | - priv = item->priv = GROPE_GESTURE_MANAGER_GET_PRIVATE (item); |
1373 | + priv = item->priv = GRIP_GESTURE_MANAGER_GET_PRIVATE (item); |
1374 | |
1375 | priv->hash = g_hash_table_new (g_direct_hash, g_direct_equal); |
1376 | } |
1377 | @@ -669,7 +669,7 @@ |
1378 | GIOCondition condition, |
1379 | gpointer data) |
1380 | { |
1381 | - GropeGestureRegistration *reg = (GropeGestureRegistration *)data; |
1382 | + GripGestureRegistration *reg = (GripGestureRegistration *)data; |
1383 | |
1384 | geis_event_dispatch (reg->instance); |
1385 | |
1386 | @@ -680,14 +680,14 @@ |
1387 | window_destroyed_cb (GtkObject *object, |
1388 | gpointer user_data) |
1389 | { |
1390 | - GropeGestureManager *manager = (GropeGestureManager *)user_data; |
1391 | - GropeGestureManagerPrivate *priv = manager->priv; |
1392 | - GropeGestureRegistration *reg = g_hash_table_lookup (priv->hash, object); |
1393 | + GripGestureManager *manager = (GripGestureManager *)user_data; |
1394 | + GripGestureManagerPrivate *priv = manager->priv; |
1395 | + GripGestureRegistration *reg = g_hash_table_lookup (priv->hash, object); |
1396 | GList *list; |
1397 | |
1398 | for (list = reg->bindings; list != NULL; list = list->next) |
1399 | { |
1400 | - GropeGestureBinding *binding = (GropeGestureBinding *)list->data; |
1401 | + GripGestureBinding *binding = (GripGestureBinding *)list->data; |
1402 | |
1403 | if (binding->destroy) |
1404 | { |
1405 | @@ -711,15 +711,15 @@ |
1406 | |
1407 | |
1408 | /* Public API */ |
1409 | -GropeGestureManager * |
1410 | -grope_gesture_manager_get (void) |
1411 | +GripGestureManager * |
1412 | +grip_gesture_manager_get (void) |
1413 | { |
1414 | - return g_object_new (GROPE_TYPE_GESTURE_MANAGER, NULL); |
1415 | + return g_object_new (GRIP_TYPE_GESTURE_MANAGER, NULL); |
1416 | } |
1417 | |
1418 | /** |
1419 | - * grope_gesture_manager_register_window: |
1420 | - * @manager: A #GropeGestureManager instance. |
1421 | + * grip_gesture_manager_register_window: |
1422 | + * @manager: A #GripGestureManager instance. |
1423 | * @window: A #GtkWindow to register the gesture event for. |
1424 | * @gesture_type: The type of gesture event to register. |
1425 | * @touch_points: Number of touch points for this gesture. |
1426 | @@ -729,23 +729,23 @@ |
1427 | * |
1428 | * Registers a toplevel window to receive gesture events. |
1429 | * The callback parameters provided will be called by the |
1430 | - * #GropeGestureManager whenever the user initiates a gesture |
1431 | + * #GripGestureManager whenever the user initiates a gesture |
1432 | * on the specified window. |
1433 | */ |
1434 | void |
1435 | -grope_gesture_manager_register_window (GropeGestureManager *manager, |
1436 | - GtkWindow *window, |
1437 | - GropeGestureType gesture_type, |
1438 | - gint touch_points, |
1439 | - GropeGestureCallback callback, |
1440 | - gpointer user_data, |
1441 | - GDestroyNotify destroy) |
1442 | +grip_gesture_manager_register_window (GripGestureManager *manager, |
1443 | + GtkWindow *window, |
1444 | + GripGestureType gesture_type, |
1445 | + gint touch_points, |
1446 | + GripGestureCallback callback, |
1447 | + gpointer user_data, |
1448 | + GDestroyNotify destroy) |
1449 | { |
1450 | - GropeGestureManagerPrivate *priv; |
1451 | - GropeGestureRegistration *reg; |
1452 | - GropeGestureBinding *binding; |
1453 | + GripGestureManagerPrivate *priv; |
1454 | + GripGestureRegistration *reg; |
1455 | + GripGestureBinding *binding; |
1456 | |
1457 | - g_return_if_fail (GROPE_IS_GESTURE_MANAGER (manager)); |
1458 | + g_return_if_fail (GRIP_IS_GESTURE_MANAGER (manager)); |
1459 | g_return_if_fail (GTK_IS_WINDOW (window)); |
1460 | g_return_if_fail (gtk_widget_get_realized (GTK_WIDGET (window))); |
1461 | |
1462 | @@ -787,7 +787,7 @@ |
1463 | return; |
1464 | } |
1465 | |
1466 | - reg = g_new0 (GropeGestureRegistration, 1); |
1467 | + reg = g_new0 (GripGestureRegistration, 1); |
1468 | |
1469 | reg->window = window; |
1470 | reg->instance = instance; |
1471 | @@ -813,7 +813,7 @@ |
1472 | } |
1473 | |
1474 | /* XXX - check for duplicates in reg->bindings first */ |
1475 | - binding = g_new0 (GropeGestureBinding, 1); |
1476 | + binding = g_new0 (GripGestureBinding, 1); |
1477 | |
1478 | binding->type = gesture_type; |
1479 | binding->touches = touch_points; |
1480 | |
1481 | === renamed file 'src/gropegesturemanager.h' => 'src/gripgesturemanager.h' |
1482 | --- src/gropegesturemanager.h 2010-11-18 21:40:02 +0000 |
1483 | +++ src/gripgesturemanager.h 2010-11-22 15:13:53 +0000 |
1484 | @@ -23,46 +23,46 @@ |
1485 | * Cody Russell <crussell@canonical.com> |
1486 | */ |
1487 | |
1488 | -#ifndef __GROPE_GESTURE_MANAGER_H__ |
1489 | -#define __GROPE_GESTURE_MANAGER_H__ |
1490 | +#ifndef __GRIP_GESTURE_MANAGER_H__ |
1491 | +#define __GRIP_GESTURE_MANAGER_H__ |
1492 | |
1493 | #include <gtk/gtk.h> |
1494 | |
1495 | G_BEGIN_DECLS |
1496 | |
1497 | -#define GROPE_TYPE_GESTURE_MANAGER (grope_gesture_manager_get_type ()) |
1498 | -#define GROPE_GESTURE_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GROPE_TYPE_GESTURE_MANAGER, GropeGestureManager)) |
1499 | -#define GROPE_GESTURE_MANAGER_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), GROPE_TYPE_GESTURE_MANAGER, GropeGestureManagerClass)) |
1500 | -#define GROPE_IS_GESTURE_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GROPE_TYPE_GESTURE_MANAGER)) |
1501 | -#define GROPE_IS_GESTURE_MANAGER_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), GROPE_TYPE_GESTURE_MANAGER)) |
1502 | -#define GROPE_GESTURE_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GROPE_TYPE_GESTURE_MANAGER, GropeGestureManagerClass)) |
1503 | - |
1504 | -typedef struct _GropeGestureManager GropeGestureManager; |
1505 | -typedef struct _GropeGestureManagerClass GropeGestureManagerClass; |
1506 | -typedef struct _GropeGestureManagerPrivate GropeGestureManagerPrivate; |
1507 | - |
1508 | -typedef union _GropeGestureEvent GropeGestureEvent; |
1509 | -typedef struct _GropeEventGestureDrag GropeEventGestureDrag; |
1510 | -typedef struct _GropeEventGesturePinch GropeEventGesturePinch; |
1511 | -typedef struct _GropeEventGestureRotate GropeEventGestureRotate; |
1512 | -typedef struct _GropeEventGestureTap GropeEventGestureTap; |
1513 | - |
1514 | -typedef enum { |
1515 | - GROPE_GESTURE_DRAG = 0, |
1516 | - GROPE_GESTURE_PINCH = 1, |
1517 | - GROPE_GESTURE_ROTATE = 2, |
1518 | - GROPE_GESTURE_TAP = 15 |
1519 | -} GropeGestureType; |
1520 | - |
1521 | -typedef enum { |
1522 | - GROPE_TIME_START, |
1523 | - GROPE_TIME_UPDATE, |
1524 | - GROPE_TIME_END |
1525 | -} GropeTimeType; |
1526 | - |
1527 | -struct _GropeEventGestureDrag |
1528 | +#define GRIP_TYPE_GESTURE_MANAGER (grip_gesture_manager_get_type ()) |
1529 | +#define GRIP_GESTURE_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GRIP_TYPE_GESTURE_MANAGER, GripGestureManager)) |
1530 | +#define GRIP_GESTURE_MANAGER_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), GRIP_TYPE_GESTURE_MANAGER, GripGestureManagerClass)) |
1531 | +#define GRIP_IS_GESTURE_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GRIP_TYPE_GESTURE_MANAGER)) |
1532 | +#define GRIP_IS_GESTURE_MANAGER_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), GRIP_TYPE_GESTURE_MANAGER)) |
1533 | +#define GRIP_GESTURE_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GRIP_TYPE_GESTURE_MANAGER, GripGestureManagerClass)) |
1534 | + |
1535 | +typedef struct _GripGestureManager GripGestureManager; |
1536 | +typedef struct _GripGestureManagerClass GripGestureManagerClass; |
1537 | +typedef struct _GripGestureManagerPrivate GripGestureManagerPrivate; |
1538 | + |
1539 | +typedef union _GripGestureEvent GripGestureEvent; |
1540 | +typedef struct _GripEventGestureDrag GripEventGestureDrag; |
1541 | +typedef struct _GripEventGesturePinch GripEventGesturePinch; |
1542 | +typedef struct _GripEventGestureRotate GripEventGestureRotate; |
1543 | +typedef struct _GripEventGestureTap GripEventGestureTap; |
1544 | + |
1545 | +typedef enum { |
1546 | + GRIP_GESTURE_DRAG = 0, |
1547 | + GRIP_GESTURE_PINCH = 1, |
1548 | + GRIP_GESTURE_ROTATE = 2, |
1549 | + GRIP_GESTURE_TAP = 15 |
1550 | +} GripGestureType; |
1551 | + |
1552 | +typedef enum { |
1553 | + GRIP_TIME_START, |
1554 | + GRIP_TIME_UPDATE, |
1555 | + GRIP_TIME_END |
1556 | +} GripTimeType; |
1557 | + |
1558 | +struct _GripEventGestureDrag |
1559 | { |
1560 | - GropeGestureType type; |
1561 | + GripGestureType type; |
1562 | guint id; |
1563 | GdkWindow *window; |
1564 | GdkWindow *root; |
1565 | @@ -79,9 +79,9 @@ |
1566 | gdouble position_y; |
1567 | }; |
1568 | |
1569 | -struct _GropeEventGesturePinch |
1570 | +struct _GripEventGesturePinch |
1571 | { |
1572 | - GropeGestureType type; |
1573 | + GripGestureType type; |
1574 | guint id; |
1575 | GdkWindow *window; |
1576 | GdkWindow *root; |
1577 | @@ -95,9 +95,9 @@ |
1578 | gdouble radius; |
1579 | }; |
1580 | |
1581 | -struct _GropeEventGestureRotate |
1582 | +struct _GripEventGestureRotate |
1583 | { |
1584 | - GropeGestureType type; |
1585 | + GripGestureType type; |
1586 | guint id; |
1587 | GdkWindow *window; |
1588 | GdkWindow *root; |
1589 | @@ -111,9 +111,9 @@ |
1590 | gdouble angle; |
1591 | }; |
1592 | |
1593 | -struct _GropeEventGestureTap |
1594 | +struct _GripEventGestureTap |
1595 | { |
1596 | - GropeGestureType type; |
1597 | + GripGestureType type; |
1598 | guint id; |
1599 | GdkWindow *window; |
1600 | GdkWindow *root; |
1601 | @@ -126,54 +126,54 @@ |
1602 | gfloat position_y; |
1603 | }; |
1604 | |
1605 | -union _GropeGestureEvent |
1606 | +union _GripGestureEvent |
1607 | { |
1608 | - GropeGestureType type; |
1609 | - GropeEventGestureDrag drag; |
1610 | - GropeEventGesturePinch pinch; |
1611 | - GropeEventGestureRotate rotate; |
1612 | - GropeEventGestureTap tap; |
1613 | + GripGestureType type; |
1614 | + GripEventGestureDrag drag; |
1615 | + GripEventGesturePinch pinch; |
1616 | + GripEventGestureRotate rotate; |
1617 | + GripEventGestureTap tap; |
1618 | }; |
1619 | |
1620 | /** |
1621 | - GropeGestureManager |
1622 | + GripGestureManager |
1623 | @parent: #GObject. |
1624 | |
1625 | A singleton manager into which a window may be registered to receive |
1626 | multitouch gesture events. |
1627 | */ |
1628 | -struct _GropeGestureManager |
1629 | +struct _GripGestureManager |
1630 | { |
1631 | GObject parent_instance; |
1632 | |
1633 | /*< Private >*/ |
1634 | - GropeGestureManagerPrivate *priv; |
1635 | + GripGestureManagerPrivate *priv; |
1636 | }; |
1637 | |
1638 | /** |
1639 | - GropeGestureManagerClass |
1640 | + GripGestureManagerClass |
1641 | @parent_class: #GObjectClass |
1642 | */ |
1643 | -struct _GropeGestureManagerClass |
1644 | +struct _GripGestureManagerClass |
1645 | { |
1646 | GObjectClass parent_class; |
1647 | }; |
1648 | |
1649 | -typedef void (* GropeGestureCallback) (GtkWindow *window, |
1650 | - GropeTimeType time, |
1651 | - GropeGestureEvent *gesture, |
1652 | - gpointer user_data); |
1653 | +typedef void (* GripGestureCallback) (GtkWindow *window, |
1654 | + GripTimeType time, |
1655 | + GripGestureEvent *gesture, |
1656 | + gpointer user_data); |
1657 | |
1658 | -GType grope_gesture_manager_get_type (void) G_GNUC_CONST; |
1659 | -GropeGestureManager *grope_gesture_manager_get (void); |
1660 | -void grope_gesture_manager_register_window (GropeGestureManager *manager, |
1661 | - GtkWindow *window, |
1662 | - GropeGestureType gesture_type, |
1663 | - gint touch_points, |
1664 | - GropeGestureCallback callback, |
1665 | - gpointer user_data, |
1666 | - GDestroyNotify destroy); |
1667 | +GType grip_gesture_manager_get_type (void) G_GNUC_CONST; |
1668 | +GripGestureManager *grip_gesture_manager_get (void); |
1669 | +void grip_gesture_manager_register_window (GripGestureManager *manager, |
1670 | + GtkWindow *window, |
1671 | + GripGestureType gesture_type, |
1672 | + gint touch_points, |
1673 | + GripGestureCallback callback, |
1674 | + gpointer user_data, |
1675 | + GDestroyNotify destroy); |
1676 | |
1677 | G_END_DECLS |
1678 | |
1679 | -#endif /* __GROPE_GESTURE_MANAGER_H__ */ |
1680 | +#endif /* __GRIP_GESTURE_MANAGER_H__ */ |
1681 | |
1682 | === renamed file 'src/gropetypebuiltins.c.in' => 'src/griptypebuiltins.c.in' |
1683 | --- src/gropetypebuiltins.c.in 2010-11-09 18:03:34 +0000 |
1684 | +++ src/griptypebuiltins.c.in 2010-11-22 15:13:53 +0000 |
1685 | @@ -1,5 +1,5 @@ |
1686 | /*** BEGIN file-header ***/ |
1687 | -#include "gropetypebuiltins.h" |
1688 | +#include "griptypebuiltins.h" |
1689 | /*** END file-header ***/ |
1690 | |
1691 | /*** BEGIN file-production ***/ |
1692 | |
1693 | === renamed file 'src/gropetypebuiltins.h.in' => 'src/griptypebuiltins.h.in' |
1694 | --- src/gropetypebuiltins.h.in 2010-11-09 18:03:34 +0000 |
1695 | +++ src/griptypebuiltins.h.in 2010-11-22 15:13:53 +0000 |
1696 | @@ -1,6 +1,6 @@ |
1697 | /*** BEGIN file-header ***/ |
1698 | -#ifndef __GROPE_ENUM_TYPES_H__ |
1699 | -#define __GROPE_ENUM_TYPES_H__ |
1700 | +#ifndef __GRIP_ENUM_TYPES_H__ |
1701 | +#define __GRIP_ENUM_TYPES_H__ |
1702 | |
1703 | #include <glib-object.h> |
1704 | |
1705 | @@ -15,12 +15,12 @@ |
1706 | /*** BEGIN file-tail ***/ |
1707 | G_END_DECLS |
1708 | |
1709 | -#endif /* !__GROPE_ENUM_TYPES_H__ */ |
1710 | +#endif /* !__GRIP_ENUM_TYPES_H__ */ |
1711 | /*** END file-tail ***/ |
1712 | |
1713 | /*** BEGIN value-header ***/ |
1714 | GType @enum_name@_get_type (void) G_GNUC_CONST; |
1715 | -#define GROPE_TYPE_@ENUMSHORT@ (@enum_name@_get_type()) |
1716 | +#define GRIP_TYPE_@ENUMSHORT@ (@enum_name@_get_type()) |
1717 | |
1718 | /*** END value-header ***/ |
1719 |
1) Can you also rename the pygrope example to pygrip? The files under the pygrope directory will also need to be renamed.
Other than that, looks great -- nice quick response, man :-)