Update NTK.
[nondaw.git] / sequencer / src / gui / draw.H
blob4a66213428f3557ea7b032d5144a0ff0f400fff1
2 #pragma once
4 /* enum { */
5 /*   EMPTY, */
6 /*   FULL, */
7 /*   PARTIAL, */
8 /*   CONTINUED, */
9 /*   HIT, */
10 /*   RING, */
11 /*   SELECTED, */
12 /*   LINE, */
13 /*   PLAYHEAD */
14 /* }; */
16 /* canvas node states */
17 enum {
18 /* real */
19     EMPTY,                                                      /* nothing */
20     FULL,                                                       /* dot or dash head */
21     PARTIAL,
22     CONTINUED,                                                  /* dash tail */
23     SELECTED,
24 /* virtual */
25     HIT,                                                        /* playhead hit */
26     LINE,                                                       /* beat line */
27     PLAYHEAD,
28     MAX_STATE,
31 #define MAX_REAL_STATE HIT
33 #define STATE_MASK 0x0F
34 #define STATE_FLAG_MASK (~ (STATE_MASK) )
36 /* flags */
37 enum {
38     F_PLAYHEAD  = 1 << 0,                                     /* playhead is on item */
39     F_P1        = 1 << 1,
40     F_P2        = 1 << 2,
41     F_SELECTION = 1 << 3                                      /* item is part of the selection box */
44 /* shapes */
45 enum {
46     SQUARE,
47     BOX
50 const int ruler_height = 14;
52 void init_colors ( void );
53 int gui_draw_ruler ( int x, int y, int w, int div_w, int div, int ofs, int p1, int p2 );
54 int gui_draw_string ( int x, int y, int w, int h, int color, const char *s, bool draw );
55 void gui_draw_shape ( int x, int y, int w, int h, int shape, int state, int flags, int color );
56 void gui_clear_area ( int x, int y, int w, int h );
57 void gui_status ( const char *fmt, ... );