[gimp] app: rename gimp_motion_buffer_eval_event() to motion_event()
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: rename gimp_motion_buffer_eval_event() to motion_event()
- Date: Sun, 17 Apr 2011 23:10:44 +0000 (UTC)
commit d62cf6503091751535e4946eea880960cd5ded5d
Author: Michael Natterer <mitch gimp org>
Date: Mon Apr 18 01:09:57 2011 +0200
app: rename gimp_motion_buffer_eval_event() to motion_event()
because it's feeding it motion events.
app/display/gimpdisplayshell-tool-events.c | 36 ++++++++--------
app/display/gimpmotionbuffer.c | 66 ++++++++++++++--------------
app/display/gimpmotionbuffer.h | 8 ++--
3 files changed, 55 insertions(+), 55 deletions(-)
---
diff --git a/app/display/gimpdisplayshell-tool-events.c b/app/display/gimpdisplayshell-tool-events.c
index 7223404..d5ee29a 100644
--- a/app/display/gimpdisplayshell-tool-events.c
+++ b/app/display/gimpdisplayshell-tool-events.c
@@ -917,12 +917,12 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
/* Early removal of useless events saves CPU time.
*/
- if (gimp_motion_buffer_eval_event (shell->motion_buffer,
- shell->scale_x,
- shell->scale_y,
- &image_coords,
- TRUE,
- history_events[i]->time))
+ if (gimp_motion_buffer_motion_event (shell->motion_buffer,
+ &image_coords,
+ history_events[i]->time,
+ shell->scale_x,
+ shell->scale_y,
+ TRUE))
{
gimp_motion_buffer_process_event_queue (shell->motion_buffer,
state,
@@ -938,12 +938,12 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
/* Early removal of useless events saves CPU time.
*/
- if (gimp_motion_buffer_eval_event (shell->motion_buffer,
- shell->scale_x,
- shell->scale_y,
- &image_coords,
- event_fill,
- time))
+ if (gimp_motion_buffer_motion_event (shell->motion_buffer,
+ &image_coords,
+ time,
+ shell->scale_x,
+ shell->scale_y,
+ event_fill))
{
gimp_motion_buffer_process_event_queue (shell->motion_buffer,
state,
@@ -959,12 +959,12 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
/* Early removal of useless events saves CPU time.
* Pass event_fill = FALSE since we are only hovering.
*/
- if (gimp_motion_buffer_eval_event (shell->motion_buffer,
- shell->scale_x,
- shell->scale_y,
- &image_coords,
- FALSE,
- time))
+ if (gimp_motion_buffer_motion_event (shell->motion_buffer,
+ &image_coords,
+ time,
+ shell->scale_x,
+ shell->scale_y,
+ FALSE))
{
GimpCoords buf_coords;
diff --git a/app/display/gimpmotionbuffer.c b/app/display/gimpmotionbuffer.c
index f10dc31..fa56966 100644
--- a/app/display/gimpmotionbuffer.c
+++ b/app/display/gimpmotionbuffer.c
@@ -216,7 +216,7 @@ gimp_motion_buffer_finish_stroke (GimpMotionBuffer *buffer)
}
/**
- * gimp_motion_buffer_eval_event:
+ * gimp_motion_buffer_motion_event:
* @buffer:
* @coords:
* @inertia_factor:
@@ -240,12 +240,12 @@ gimp_motion_buffer_finish_stroke (GimpMotionBuffer *buffer)
* Return value:
**/
gboolean
-gimp_motion_buffer_eval_event (GimpMotionBuffer *buffer,
- gdouble scale_x,
- gdouble scale_y,
- GimpCoords *coords,
- gboolean event_fill,
- guint32 time)
+gimp_motion_buffer_motion_event (GimpMotionBuffer *buffer,
+ GimpCoords *coords,
+ guint32 time,
+ gdouble scale_x,
+ gdouble scale_y,
+ gboolean event_fill)
{
gdouble delta_time = 0.001;
gdouble delta_x = 0.0;
@@ -427,32 +427,6 @@ gimp_motion_buffer_eval_event (GimpMotionBuffer *buffer,
}
void
-gimp_motion_buffer_push_event_history (GimpMotionBuffer *buffer,
- const GimpCoords *coords)
-{
- g_return_if_fail (GIMP_IS_MOTION_BUFFER (buffer));
- g_return_if_fail (coords != NULL);
-
- if (buffer->event_history->len == 4)
- g_array_remove_index (buffer->event_history, 0);
-
- g_array_append_val (buffer->event_history, *coords);
-}
-
-void
-gimp_motion_buffer_pop_event_queue (GimpMotionBuffer *buffer,
- GimpCoords *coords)
-{
- g_return_if_fail (GIMP_IS_MOTION_BUFFER (buffer));
- g_return_if_fail (coords != NULL);
- g_return_if_fail (buffer->event_queue->len > 0);
-
- *coords = g_array_index (buffer->event_queue, GimpCoords, 0);
-
- g_array_remove_index (buffer->event_queue, 0);
-}
-
-void
gimp_motion_buffer_process_event_queue (GimpMotionBuffer *buffer,
GdkModifierType state,
guint32 time)
@@ -502,6 +476,32 @@ gimp_motion_buffer_process_event_queue (GimpMotionBuffer *buffer,
}
}
+void
+gimp_motion_buffer_push_event_history (GimpMotionBuffer *buffer,
+ const GimpCoords *coords)
+{
+ g_return_if_fail (GIMP_IS_MOTION_BUFFER (buffer));
+ g_return_if_fail (coords != NULL);
+
+ if (buffer->event_history->len == 4)
+ g_array_remove_index (buffer->event_history, 0);
+
+ g_array_append_val (buffer->event_history, *coords);
+}
+
+void
+gimp_motion_buffer_pop_event_queue (GimpMotionBuffer *buffer,
+ GimpCoords *coords)
+{
+ g_return_if_fail (GIMP_IS_MOTION_BUFFER (buffer));
+ g_return_if_fail (coords != NULL);
+ g_return_if_fail (buffer->event_queue->len > 0);
+
+ *coords = g_array_index (buffer->event_queue, GimpCoords, 0);
+
+ g_array_remove_index (buffer->event_queue, 0);
+}
+
/* private functions */
diff --git a/app/display/gimpmotionbuffer.h b/app/display/gimpmotionbuffer.h
index 119d610..e040e20 100644
--- a/app/display/gimpmotionbuffer.h
+++ b/app/display/gimpmotionbuffer.h
@@ -78,12 +78,12 @@ void gimp_motion_buffer_start_stroke (GimpMotionBuffer *buffer,
GimpCoords *last_motion);
void gimp_motion_buffer_finish_stroke (GimpMotionBuffer *buffer);
-gboolean gimp_motion_buffer_eval_event (GimpMotionBuffer *buffer,
+gboolean gimp_motion_buffer_motion_event (GimpMotionBuffer *buffer,
+ GimpCoords *coords,
+ guint32 time,
gdouble scale_x,
gdouble scale_y,
- GimpCoords *coords,
- gboolean event_fill,
- guint32 time);
+ gboolean event_fill);
void gimp_motion_buffer_push_event_history (GimpMotionBuffer *buffer,
const GimpCoords *coords);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]