Commit Graph

23 Commits

Author SHA1 Message Date
Niels De Graef 1dda60154c Use "Returns:" to annotate return values
To be able to annotate return values through GObject-introspection, you
need to make sure it is tagged with `Returns:` and not something else.
2019-08-03 07:53:47 +00:00
Michael Natterer 5f700549e7 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
luz.paz 7fdb963e01 Bug 794996 - Misc. typo fixes in comments in app/
Found via `codespell -q 3 --skip="./po*"`
2018-04-08 21:25:56 +02:00
Ell 275815c808 app: misc cleanup in gimpcoords-interpolate
Fix indentation, typos, style.  Use array parameters for the
control points, instead of using individual by-value parameters.
Use GArray* for the results, instead of GArray**.  Verify
arguments.

Adapt the rest of the code to the changes.
2018-02-03 05:58:42 -05:00
Michael Natterer f5ecc53f3e Fix a lot of warnings all over the place
Deprecated stuff, unused variables. Includes parts of a patch from
Shlomi Fish from bug #768855.
2016-10-31 01:36:35 +01:00
Alexia Death 7c00dcd71d app: use variable buffer length for a more stable direction 2014-11-17 21:36:06 +02:00
Alexia Death b161253939 app: refactor all motion managment to use scale factors passed with coords 2014-11-17 00:03:13 +02:00
Michael Natterer 47c987b09e Bug 676270 - cppcheck report
Fix a couple of harmless stuff pointed out in the report, and one
real bug: gimp_plug_in_close() was killing each process 10 times
on windows.
2012-08-04 03:20:36 +02:00
Michael Natterer 5b14564d8e app: GimpMotionBuffer: remove empty constructed()
and move buffer destruction from dispose() to finalize().
2011-04-18 15:54:03 +02:00
Michael Natterer 534b48cb0d app: add gimp_motion_buffer_get_last_motion_time() and use it
The last poking into the buffer is gone now.
2011-04-18 13:13:51 +02:00
Michael Natterer e028195cf3 app: rename process_stroke() and process_hover() to request_foo()
Because that's what we are doing by calling the functions: requesting
the emission of "stroke" and "hover" signals.
2011-04-18 11:32:10 +02:00
Michael Natterer 3fbbb9b333 app: GimpMotionBuffer API cleanup and refactoring
- start_stroke()/finih_stroke() -> begin_stroke()/end_stroke()
- process_event_queue() -> process_stroke()
- GimpMotionBuffer::motion() -> GimpMotionBuffer::stroke()
- add GimpMotionBuffer::hover() and process_hover()
- remove push_event_history() and pop_event_queue() from API

The thing works like this:

- Motion events are continuously fed into the buffer using motion_event()
- begin_stroke()/end_stroke() correspond to BUTTON_PRESS/BUTTON_RELEASE,
  the period between them is a "stroke"
- If motion_event() returns TRUE, we request "stroke" signals by calling
  process_stroke() and "hover" signals by calling process_hover()
2011-04-18 11:08:24 +02:00
Michael Natterer d62cf65030 app: rename gimp_motion_buffer_eval_event() to motion_event()
because it's feeding it motion events.
2011-04-18 01:09:57 +02:00
Michael Natterer 6f865eda2b app: add start_stroke() and finish_stroke() API to GimpMotionBuffer
where finish_stroke() is the former flush_event_queue() and
start_stroke() is used in BUTTON_PRESS instead of poking into the
motion buffer's internals. Also, call finish_stroke() also when the
tool is not active, so the event buffer is flushed (the "motion"
callback will ignore the events if the tool is not active).
2011-04-18 00:35:20 +02:00
Michael Natterer e3b1ed7728 app: remove the timeout in GObject::dispose() 2011-04-17 22:00:18 +02:00
Michael Natterer e822fb0d95 app: separate the queue flushing function from the timeout function
and add g_return_if_fail() to all public functions.
2011-04-17 21:58:03 +02:00
Michael Natterer 334e4c5d71 app: move process_event_queue() and flush_event_queue() to GimpMotionBuffer
and emit the buffer's "motion" signal when a motion is supposed
to happen. In GimpDisplayShell, connect to GimpMotionBuffer::motion()
and call the tool.
2011-04-17 21:46:29 +02:00
Michael Natterer fae0589767 app: minor cleanup gimp_motion_buffer_eval_event(), no logic change 2011-04-17 20:27:54 +02:00
Michael Natterer bb3eac557d app: add gimp_motion_buffer_pop_event_queue() and use it
instead of accessing and removing the queue's first element menually.
2011-04-17 20:20:18 +02:00
Michael Natterer aa7c31b802 app: s/gdouble inertia_factor/gboolean event_fill/ in eval_event()
Also remove "gdouble max_coord_smooth" from GimpTool and simply use
the existing motion mode for deciding whether or not to fill in
events.
2011-04-17 19:59:31 +02:00
Michael Natterer 41b469fcf5 app: gimp_motion_buffer_eval_event(): always set last_read_motion_time
We need it for correctly requesting device history, so we must
remember it also when returning FALSE and ignoring the event.
2011-04-17 19:34:02 +02:00
Michael Natterer 2dbaf7f490 app: set "last_read_motion_time" in gimp_motion_buffer_eval_event()
because it is called whenever we process a newly received event.
2011-04-17 19:05:49 +02:00
Michael Natterer e09520fb08 app: add GimpMotionBuffer class to swallow all the event smoothing code
This commit only adds the class and removes the members from
GimpDisplayShell, so everything looks more ugly than before, but
I wanted the member moving separate from any refactorings.
2011-04-17 18:53:42 +02:00