ZDE improvements - global zbitmap_t structure added, added native support for buttons...
[ZeXOS.git] / apps / zde / icon.h
blobda5e519ee112af19b251eb780607d61b654d2691
1 /*
2 * ZeX/OS
3 * Copyright (C) 2008 Tomas 'ZeXx86' Jedrzejek (zexx86@zexos.org)
4 * Copyright (C) 2009 Tomas 'ZeXx86' Jedrzejek (zexx86@zexos.org)
5 * Copyright (C) 2010 Tomas 'ZeXx86' Jedrzejek (zexx86@zexos.org)
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
22 #ifndef _ICON_H
23 #define _ICON_H
25 #include "window.h"
27 #define VFS_FILEATTR_FILE 0x1
28 #define VFS_FILEATTR_DIR 0x2
29 #define VFS_FILEATTR_HIDDEN 0x4
30 #define VFS_FILEATTR_SYSTEM 0x8
31 #define VFS_FILEATTR_BIN 0x10
32 #define VFS_FILEATTR_READ 0x20
33 #define VFS_FILEATTR_WRITE 0x40
34 #define VFS_FILEATTR_MOUNTED 0x80
35 #define VFS_FILEATTR_DEVICE 0x100
37 typedef struct zde_icon_context {
38 struct zde_icon_context *next, *prev;
40 unsigned short x;
41 unsigned short y;
42 unsigned short *bitmap;
43 unsigned short name_len;
44 char *name;
45 void *(*entry) (void *);
46 void *arg;
47 void *object;
48 char type;
49 } zde_icon_t;
51 extern zde_icon_t *create_icon (char *name, int type, void *(*entry) (void *), void *arg);
52 extern zde_icon_t *create_icon_window (char *name, int type, void *(*entry) (void *), void *arg, zde_win_t *window);
53 extern unsigned destroy_icon_window (zde_win_t *window);
54 extern int draw_icon_desktop ();
55 extern int draw_icon_window (zde_win_t *window);
56 extern int init_icon ();
58 #endif