aboutsummaryrefslogtreecommitdiff
path: root/config.def.h
blob: 9ec917370ae150c66d17a66e91e591b06d1b0857 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#define COLTOINT(R,G,B)     (R<<16)+(G<<8)+B

const unsigned int maxzoom = 20;
const unsigned int fps = 30;
const char *def_palette_path    = "assets/default.gpl";
const char *def_theme_path      = "assets/ui.png";
const char *def_font            = "assets/unifont.bdf";
/* path to an external program for picking files. it should output only the picked file in stdout */
const char *cmd_file_picker     = NULL; /* NULL - will take input from terminal */
const unsigned int back_c       = COLTOINT(146, 161, 185);

static Key keys[] = {
	/* modifier         key                 function                    argument */
	{0,                 SDLK_EQUALS,        user_canvas_zoom_change,    {.i = 1}},
	{0,                 SDLK_MINUS,         user_canvas_zoom_change,    {.i = -1}},
	{0,                 SDLK_UP,            user_canvas_move_y,         {.i = 10}},
	{0,                 SDLK_DOWN,          user_canvas_move_y,         {.i = -10}},
	{0,                 SDLK_LEFT,          user_canvas_move_x,         {.i = 10}},
	{0,                 SDLK_RIGHT,         user_canvas_move_x,         {.i = -10}},
	{0,                 SDLK_u,             user_canvas_undo,           {.v = NULL}},
	{0,                 SDLK_r,             user_canvas_redo,           {.v = NULL}},
	{KMOD_LSHIFT,       SDLK_n,             user_canvas_create_new,     {.v = NULL}},
	{KMOD_LSHIFT,       SDLK_s,             user_canvas_save,           {.v = NULL}},
	{KMOD_LSHIFT,       SDLK_o,             user_canvas_open,           {.s = NULL}},
	{KMOD_LSHIFT,       SDLK_e,             user_canvas_export_png,     {.v = NULL}},
	{KMOD_LSHIFT,       SDLK_i,             user_canvas_import_png,     {.s = NULL}},
	{KMOD_RSHIFT,       SDLK_n,             user_canvas_create_new,     {.v = NULL}},
	{KMOD_RSHIFT,       SDLK_s,             user_canvas_save,           {.v = NULL}},
	{KMOD_RSHIFT,       SDLK_o,             user_canvas_open,           {.s = NULL}},
	{KMOD_RSHIFT,       SDLK_e,             user_canvas_export_png,     {.v = NULL}},
	{KMOD_RSHIFT,       SDLK_i,             user_canvas_import_png,     {.s = NULL}},
	{0,                 SDLK_j,             user_layer_add,             {.v = NULL}},
	{0,                 SDLK_b,             user_tool_change,           {.i = 0}},
	{0,                 SDLK_e,             user_tool_change,           {.i = 1}},
	{0,                 SDLK_f,             user_tool_change,           {.i = 2}},
	{0,                 SDLK_i,             user_tool_change,           {.i = 3}},
	{0,                 SDLK_LEFTBRACKET,   user_canvas_pal_col_chng,   {.i = -1}},
	{0,                 SDLK_RIGHTBRACKET,  user_canvas_pal_col_chng,   {.i = 1}},
};