ZDE improvements - global zbitmap_t structure added, added native support for buttons...
[ZeXOS.git] / apps / zde / appcl.h
blobebc2e07fad16633d9eb8ae1b7d4d52722087498b
1 /*
2 * ZeX/OS
3 * Copyright (C) 2009 Tomas 'ZeXx86' Jedrzejek (zexx86@zexos.org)
4 * Copyright (C) 2010 Tomas 'ZeXx86' Jedrzejek (zexx86@zexos.org)
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 3 of the License, or
9 * (at your option) any later version.
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.
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
21 #ifndef _APPCL_H
22 #define _APPCL_H
24 #include "bitmap.h"
26 #define APPCL_STATE_REDRAW 0x1
27 #define APPCL_STATE_RECVOK 0x2
28 #define APPCL_STATE_EXIT 0x4
29 #define APPCL_STATE_RESIZE 0x8
30 #define APPCL_STATE_LBUTTON 0x10
31 #define APPCL_STATE_RBUTTON 0x20
32 #define APPCL_STATE_MBUTTON 0x40
34 typedef struct {
35 unsigned state;
36 unsigned short x;
37 unsigned short y;
38 unsigned short sizex;
39 unsigned short sizey;
40 short mousex;
41 short mousey;
42 unsigned char kbd;
43 } __attribute__ ((__packed__)) appcl_t;
45 extern appcl_t *zgui_window ();
46 extern void zgui_puts (unsigned short x, unsigned short y, char *str, unsigned color);
47 extern int zgui_button (unsigned short x, unsigned short y, char *str);
48 extern int zgui_resize (unsigned short x, unsigned short y);
49 extern unsigned zgui_event ();
50 extern int zgui_init ();
51 extern int zgui_exit ();
53 #endif