[four-in-a-row/KaKnife/four-in-a-row-vala: 2/65] added stop_anim function
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [four-in-a-row/KaKnife/four-in-a-row-vala: 2/65] added stop_anim function
- Date: Sun, 16 Dec 2018 03:20:09 +0000 (UTC)
commit c99c447bcb6f3fe5318f2af68cf366a93a84d300
Author: Jacob Humphrey <jacob ryan humphrey gmail com>
Date: Fri Nov 2 21:11:06 2018 -0500
added stop_anim function
src/main.c | 10 +---------
src/main2.vala | 9 +++++++++
2 files changed, 10 insertions(+), 9 deletions(-)
---
diff --git a/src/main.c b/src/main.c
index 6eab827..b8f7086 100644
--- a/src/main.c
+++ b/src/main.c
@@ -183,15 +183,7 @@ on_animate (gint c)
-static void
-stop_anim (void)
-{
- if (timeout == 0)
- return;
- anim = ANIM_NONE;
- g_source_remove (timeout);
- timeout = 0;
-}
+
static void
game_init (void)
diff --git a/src/main2.vala b/src/main2.vala
index 4d3ed15..4af60ac 100644
--- a/src/main2.vala
+++ b/src/main2.vala
@@ -187,3 +187,12 @@ static void blink_tile (int r, int c, int t, int n) {
anim = AnimID.BLINK;
timeout = Timeout.add (SPEED_BLINK, on_animate);
}
+
+void stop_anim ()
+{
+ if (timeout == 0)
+ return;
+ anim = AnimID.NONE;
+ Source.remove(timeout);
+ timeout = 0;
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]