Mercurial > pidgin
comparison plugins/gestures/stroke-draw.c @ 9855:b23e6f9c4d2e
[gaim-migrate @ 10734]
Non C99ers rejoice.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Tue, 24 Aug 2004 23:32:15 +0000 |
parents | 19fd43d52d18 |
children | 364a2ef907ae |
comparison
equal
deleted
inserted
replaced
9854:e389922bdea7 | 9855:b23e6f9c4d2e |
---|---|
31 #define GSTROKE_TIMEOUT_DURATION 10 | 31 #define GSTROKE_TIMEOUT_DURATION 10 |
32 | 32 |
33 #define GSTROKE_SIGNALS "gstroke_signals" | 33 #define GSTROKE_SIGNALS "gstroke_signals" |
34 | 34 |
35 struct gstroke_func_and_data { | 35 struct gstroke_func_and_data { |
36 void (*func)(GtkWidget *, void *); | 36 void (*func)(GtkWidget *, void *); |
37 gpointer data; | 37 gpointer data; |
38 }; | 38 }; |
39 | 39 |
40 | 40 |
41 /*FIXME: maybe it's better to just make 2 static variables, not a | 41 /*FIXME: maybe it's better to just make 2 static variables, not a |
42 structure */ | 42 structure */ |
43 struct mouse_position { | 43 struct mouse_position { |
44 struct s_point last_point; | 44 struct s_point last_point; |
45 gboolean invalid; | 45 gboolean invalid; |
46 }; | 46 }; |
47 | 47 |
48 | 48 |
49 static struct mouse_position last_mouse_position; | 49 static struct mouse_position last_mouse_position; |
50 static guint timer_id; | 50 static guint timer_id; |
95 } | 95 } |
96 | 96 |
97 static gint | 97 static gint |
98 gstroke_timeout (gpointer data) | 98 gstroke_timeout (gpointer data) |
99 { | 99 { |
100 g_return_val_if_fail(data != NULL, FALSE); | 100 GtkWidget *widget; |
101 GtkWidget *widget = GTK_WIDGET (data); | 101 |
102 record_stroke_segment (widget); | 102 g_return_val_if_fail(data != NULL, FALSE); |
103 | 103 |
104 return TRUE; | 104 widget = GTK_WIDGET (data); |
105 record_stroke_segment (widget); | |
106 | |
107 return TRUE; | |
105 } | 108 } |
106 | 109 |
107 static void gstroke_cancel(GdkEvent *event) | 110 static void gstroke_cancel(GdkEvent *event) |
108 { | 111 { |
109 last_mouse_position.invalid = TRUE; | 112 last_mouse_position.invalid = TRUE; |