| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 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; |