http://mulliner.org/bluetooth/xkbdbthid-0.1_src.tar.gz
[xkbdbthid.git] / xkbd-0.8.15_bthid / src / button.h
1 /* 
2    xkbd - xlib based onscreen keyboard.
3
4    Copyright (C) 2001 Matthew Allum
5
6    This program is free software; you can redistribute it and/or modify
7    it under the terms of the GNU General Public License as published by
8    the Free Software Foundation; either version 2, or (at your option)
9    any later version.
10
11    This program is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14    GNU General Public License for more details.
15 */
16
17 #ifndef _BUTTON_H_
18 #define _BUTTON_H_
19
20 button* button_new(keyboard *k);
21
22 int _max3( int a, int b, int c );
23
24 GC _createGC(Display *display, Window win);
25
26 int _XColorFromStr(Display *display, XColor *col, const char *defstr);
27
28 void button_set_layout(button *b, char *txt);
29
30 void button_set_bg_col(button *b, char *txt);
31
32 void button_set_fg_col(button *b, char *txt);
33
34 void button_set_pixmap(button *b, char *txt);
35
36 void button_set_txt(button *b, char *txt);
37
38 void button_set_scancode(button *b, char *txt);
39
40 void button_set_txt_ks(button *b, char *txt);
41
42 void button_set_shift_txt(button *b, char *txt);
43
44 void button_set_shift_ks(button *b, char *txt);
45
46 void button_set_mod_txt(button *b, char *txt);
47
48 void button_set_mod_ks(button *b, char *txt);
49 void button_set_slide_ks(button *b, char *txt, int dir);
50 int _button_get_txt_size(button *b, char *txt);
51 int button_calc_c_width(button *b);
52
53 int button_calc_c_height(button *b);
54
55 int button_get_c_height(button *b);
56
57 int button_set_b_size(button *b, int size);
58
59 void button_render(button *b, int mode);
60 void button_paint(button *b);
61
62 int button_get_abs_x(button *b);
63 int button_get_abs_y(button *b);
64
65 #endif