/*************************************************************************** * __________ __ ___. * Open \______ \ ____ ____ | | _\_ |__ _______ ___ * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ * \/ \/ \/ \/ \/ * $Id: $ * * Copyright (C) 2007 Mark Arigo * * All files in this archive are subject to the GNU General Public License. * See the file COPYING in the source tree root for full license agreement. * * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * ****************************************************************************/ #ifndef _GUI_IMG_H #define _GUI_IMG_H #include "screen_access.h" struct gui_img { struct bitmap bm; int x; /* x-pos */ int y; /* y-pos */ int width; /* image width (same as bm.width) */ int height; /* image height. If there are subimages, then this is the height of each subimage. The total bitmap height is bm.height. */ unsigned short nb_subimg; /* number of sub images */ unsigned short subimg_index;/* subimage to display (zero-based): 0, 1, ... (nb_subimg-1) */ unsigned short cond_index; /* the index of the conditional the image is in */ bool loaded; /* load state */ bool display; /* is to be displayed */ bool always_display; /* not using the preload/display mechanism */ }; int gui_image_load(char* filename, struct gui_img* img, unsigned char* buffer, int bufsize, int format); void gui_image_draw(struct screen *display, struct gui_img* img); #endif