Debian Codegraph @

lib/funcs.c

raw symbols ◀ ▶ SCIP
1 Debian patch touch this file
1 /* The Ace of Penguins - funcs.c
2 Copyright (C) 2001 DJ Delorie
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option)
7 any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17
18
19 #include <stdlib.h>
20 #include "funcs.h"
•21 #include "table.h"
22 #include "cards.h"
23
24 static void
25 default_click_cb(int x, int y, int b)
26 {
27 }
28
29 void (*click_cb)(int,int,int) = default_click_cb;
30
31 static void
32 default_drag_cb(int x, int y, int b)
33 {
34 }
35
36 void (*drag_cb)(int,int,int) = default_drag_cb;
37
38 static void
39 default_redraw_cb()
40 {
41 stack_redraw();
42 }
43
44 void (*redraw_cb)() = default_redraw_cb;
45
46 static void
47 default_init_cb()
48 {
49 }
50
51 void (*init_cb)() = default_init_cb;
52
53 static void
54 default_drop_cb(int x, int y, int b)
55 {
56 }
57
58 void (*drop_cb)(int,int,int) = default_drop_cb;
59
60 static void
61 default_key_cb(int x, int y, int k)
62 {
63 if (k == 3 || k == 27 || k == 'q')
64 exit(0);
65 }
66
67 void (*key_cb)(int,int,int) = default_key_cb;
68
69 static void
70 default_resize_cb(int w, int h)
71 {
72 table_no_resize();
73 }
74
75 void (*resize_cb)(int,int) = default_resize_cb;
76
77 static void
78 default_double_click_cb(int x, int y, int b)
79 {
80 click_cb(x, y, b);
81 }
82
83 void (*double_click_cb)(int,int,int) = default_double_click_cb;