⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 libfbx-gui.h

📁 libfxb是linux下只写操作framebuffer的一个轻量级的库。
💻 H
字号:
/* *  libfbx-gui.h -- Primary header file for libfbx gui *  (C)opyright 2000-2001 U4X Labs * *  Written by: Paul Mundt <lethal@u4xlabs.com> * 		Mon Dec 11 14:24:48 EST 2000 * *  $Id: libfbx-gui.h,v 1.13 2001/01/25 00:57:42 lethal Exp $ * *  	Basic layout of gui routines for the libfbx system. * *  See ChangeLog for modifications, CREDITS for credits. * *  All source herein is copyright U4X Labs and its original author.  *  Any code modifications or additions are (C)opyright the original  *  author and U4X Labs respectively. * *  libfbx is free software; you can redistribute it and/or modify it  *  under the terms of the GNU Lesser General Public License as  *  published by the Free Software Foundation; either version 2.1 of  *  the License, or (at your option) any later version. * *  libfbx is distributed in the hope that it will be useful, but  *  WITHOUT ANY WARRANTY; without even the implied warranty of *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  *  GNU Lesser General Public License for more details. * *  You should have received a copy of the GNU Lesser General Public *  License along with libfbx; if not, write to the Free Software  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 *  USA */#ifndef __LIBFBX_GUI_H#define __LIBFBX_GUI_H#ifdef __cplusplusextern "C" {#endif /* __cplusplus *//* Fixed States */#define FB_DIALOG_EXIT		0x01	/* close when activated */#define FB_DIALOG_SELECTED	0x02	/* currently selected */#define FB_DIALOG_MOUSEON	0x04	/* mouse is on object */#define FB_DIALOG_FOCUSED	0x08	/* focused on object */#define FB_DIALOG_DIRTY		0x10	/* needs to be redrawn */#define FB_DIALOG_DISABLED	0x20	/* grayed out */#define FB_DIALOG_HIDDEN	0x40	/* object is hidden *//* User Specified States */#define FB_DIALOG_USER		0x8000	/* beginning user flag *//* GUI Process Return Messages (Object to Handler) */#define FB_DIALOG_OK		0	/* normal return message */#define FB_DIALOG_CLOSE		1	/* request to close dialog */#define FB_DIALOG_REDRAW	2	/* reqest redraw of entire dialog */#define FB_DIALOG_REDRAWME	4	/* reqest to redraw this object */#define FB_DIALOG_WANTFOCUS	8	/* request for input focus */#define FB_DIALOG_USED_CHAR	16	/* object used a keypress message *//* GUI Object Messages (Handler to Object) */#define FB_MSG_START		1	/* perform any initialization */#define FB_MSG_END		2	/* perform any cleanup */#define FB_MSG_DRAW		3	/* draw the object */#define FB_MSG_CLICK		4	/* delivered when object is clicked */#define FB_MSG_DCLICK		5	/* double click */#define FB_MSG_KEY		6	/* keyboard shortcut */#define FB_MSG_CHAR		7	/* other keyboard input */#define FB_MSG_XCHAR		8	/* broadcast keyboard input (used when					   no objects claim a keypress) */#define FB_MSG_WANTFOCUS	9	/* object wants input focus */#define FB_MSG_GOTFOCUS		10	/* object received input focus */#define FB_MSG_LOSTFOCUS	11	/* object lost input focus */#define FB_MSG_GOTMOUSE		12	/* mouse entered object boundaries */#define FB_MSG_LOSTMOUSE	13	/* mouse left object boundaries */#define FB_MSG_IDLE		14	/* perform background tasks */#define FB_MSG_RADIO		15	/* clear radio buttons */#define FB_MSG_WHEEL		16	/* mouse wheel moved (keep?) */#define FB_MSG_LPRESS		17	/* left mouse button down */#define FB_MSG_LRELEASE		18	/* left mouse button up */#define FB_MSG_MPRESS		19	/* middle mouse button down */#define FB_MSG_MRELEASE		20	/* middle mouse button up */#define FB_MSG_RPRESS		21	/* right mouse button down */#define FB_MSG_RRELEASE		22	/* right mouse button up *//* User defined messages are above this value. * * It is recommended that rather than hard code * user message values, the programmer should * use (FB_MSG_USER + n) where n is some positive * number.  This way, a program will remain source * compatible with the FB_MSG #defines. */#define FB_MSG_USER		32typedef struct fb_dialog {	int (*message_handler)(int, struct fb_dialog *, int);	int x, y;	int width, height;	int fg_r, fg_g, fg_b;	int bg_r, bg_g, bg_b;	int key;	int flags;	char *text;	void *dummy, *dummy2, *dummy3;	fb_surface *img, *img2, *img3;	int d1, d2;} fb_dialog;/* libfbx-gui.c */void fb_draw_textbox(int x1, int y1, int x2, int y2, int r1, int g1, int b1, int r2, int g2, int b2, fb_surface *surface);void fb_draw_box(int x1, int y1, int x2, int y2, int r, int g, int b, fb_surface *surface);void fb_dotted_rect(int x1, int y1, int x2, int y2, 		    int fg_r, int fg_g, int fg_b, 		    int bg_r, int bg_g, int bg_b, 		    fb_surface *surface);int fb_gui_strlen(char *string);int fb_gui_puts(int x, int y, int center, int r, int g, int b, fb_surface *surface, char *string);/* libfbx-box.c */int fb_box_proc(int msg, fb_dialog *d, int c);int fb_shadow_box_proc(int msg, fb_dialog *d, int c);/* libfbx-button.c */int fb_button_proc(int msg, fb_dialog *d, int c);int fb_check_proc(int msg, fb_dialog *d, int c);int fb_icon_proc(int msg, fb_dialog *d, int c);#ifdef __cplusplus}#endif /* __cplusplus */#endif /* __LIBFBX_GUI_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -