Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

Image.h

Go to the documentation of this file.
00001 /*
00002  *    gui - [gega user interface] the flexible solution for user interface problems
00003  *    Copyright (C) 2002  Gergely Gati
00004  *
00005  *    This program is free software; you can redistribute it and/or modify
00006  *    it under the terms of the GNU General Public License as published by
00007  *    the Free Software Foundation; version 2 of the License.
00008  *
00009  *    This program is distributed in the hope that it will be useful,
00010  *    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  *    GNU General Public License for more details.
00013  *
00014  *    You should have received a copy of the GNU General Public License
00015  *    along with this program; if not, write to the Free Software
00016  *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00017  *
00018  *    Gergely Gati
00019  *      email:           g.gati@freemail.hu
00020  *      AIM screenname:  GatiGergely
00021  *      ICQ number:      93131690
00022  *
00023  */
00024 #ifndef __IMAGE_H
00025 #define __IMAGE_H
00026 
00027 #include "Gui.h"
00028 #include "Bases.h"
00029 #include "Tag.h"
00030 #include "port/Glw.h"
00031 
00032 #define IMAGE_MAXIMUM_SIZE  4096
00033 
00034 
00035 //Enum for calling BEGIN
00036 enum image_functions
00037 {
00038   IMG_CLEANUPIMAGE=IMG_FUNCBASE,
00039   IMG_GETINFO,
00040   IMG_RENDERIMAGE,
00041   IMG_PUTIMAGE,
00042   IMG_RENDERIMAGETILED,
00043   IMG_PUTIMAGETILED,
00044   IMG_INITIMAGE,
00045   IMG_REGISTERFORMAT,
00046   IMG_REGISTERFORMATCODE,
00047   IMG_FUNC_DONE
00048 };
00049 //Enum for calling END
00050 
00051 
00052 //newly defined tags BEGIN
00053 #define TAG_IMG_MODULE           (TAG_USER+100)
00054 #define TAG_IMG_IMGINFO          (TAG_USER+101)
00055 #define TAG_IMG_DEST             (TAG_USER+102)
00056 #define TAG_IMG_DESTSIZE         (TAG_USER+103)
00057 #define TAG_IMG_WIDTH            (TAG_USER+104)
00058 #define TAG_IMG_HEIGHT           (TAG_USER+105)
00059 #define TAG_IMG_WINDOW           (TAG_USER+106)
00060 #define TAG_IMG_RECT             (TAG_USER+107)
00061 #define TAG_IMG_IMGWIDTH         (TAG_USER+108)
00062 #define TAG_IMG_IMGHEIGHT        (TAG_USER+109)
00063 #define TAG_IMG_NAME             ((TAG_USER+110)|TAGT_STRING)
00064 #define TAG_IMG_IMG_INIT         (TAG_USER+111)
00065 #define TAG_IMG_IMG_RENDER       (TAG_USER+112)
00066 #define TAG_IMG_IMG_PUTIMAGE     (TAG_USER+113)
00067 #define TAG_IMG_IMG_CLEAN        (TAG_USER+114)
00068 #define TAG_IMG_CLEANUP          (TAG_USER+115)
00069 #define TAG_IMG_APP              (TAG_USER+116)
00070 #define TAG_IMG_IMG_RECOGNIZE    (TAG_USER+117)
00071 #define TAG_IMG_OBJECT           (TAG_USER+118)
00072 //newly defined tags END
00073 
00074 
00075 #define TAG_IMG_IMAGEIN      (TAG_USER+1)
00076 #define TAG_IMG_IMAGENAME    (TAG_USER+2)
00077 #define TAG_IMG_UPDATE       (TAG_USER+3)
00078 #define TAG_IMG_USERDATA     (TAG_USER+4)
00079 #define TAG_IMG_FREEAFTERUSE (TAG_USER+5)
00080 
00081 
00082 typedef struct ImageIn_s
00083 {
00084   u8 *data;
00085   int data_size;
00086 } ImageIn_t;
00087 
00088 typedef struct ImageInfo_s
00089 {
00090   ImageIn_t iim;
00091   char *format;
00092   int minwidth;
00093   int maxwidth;
00094   int minheight;
00095   int maxheight;
00096 } ImageInfo_t;
00097 
00098 struct Format_s;
00099 typedef struct Format_s Format_t;
00100 typedef struct Image_s Image_t;
00101 
00102 #ifdef __IMAGE_MODULE
00103   struct Image_s
00104   {
00105     ImageIn_t iim;          // ide: ImageInfo_t iinf -> ez lesz a publikus resz + egy void *formatdata
00106     char *format;
00107     int minwidth;
00108     int maxwidth;
00109     int minheight;
00110     int maxheight;
00111     void *formatdata;       // emiatt kell(ett) publikusnak lennie
00112     Format_t *formatpnt;    // csak Image.c
00113     int free_after_use;     // csak Image.c
00114     gui_App_t *app;         // csak Image.c
00115   };
00116 #endif
00117 
00118 u32 img_CallTL(int function, tag *taglist);
00119 u32 img_Call(int function, u32 firsttag, ...);
00120 
00121 //TAGLIST->
00122 
00123 //Prototypes BEGIN
00124 u32 img_CleanUpImage(u32 firsttag, ...);
00125 u32 img_CleanUpImageTL(tag *taglist);
00126 u32 img_GetInfo(u32 firsttag, ...);
00127 u32 img_GetInfoTL(tag *taglist);
00128 u32 img_RenderImage(u32 firsttag, ...);
00129 u32 img_RenderImageTL(tag *taglist);
00130 u32 img_PutImage(u32 firsttag, ...);
00131 u32 img_PutImageTL(tag *taglist);
00132 u32 img_RenderImageTiled(u32 firsttag, ...);
00133 u32 img_RenderImageTiledTL(tag *taglist);
00134 u32 img_PutImageTiled(u32 firsttag, ...);
00135 u32 img_PutImageTiledTL(tag *taglist);
00136 u32 img_InitImage(u32 firsttag, ...);
00137 u32 img_InitImageTL(tag *taglist);
00138 u32 img_RegisterFormat(u32 firsttag, ...);
00139 u32 img_RegisterFormatTL(tag *taglist);
00140 u32 img_RegisterFormatCode(u32 firsttag, ...);
00141 u32 img_RegisterFormatCodeTL(tag *taglist);
00142 //Prototypes END
00143 
00144 
00145 //system only
00146 int img_Init(void);
00147 void img_CleanUp(void);
00148 
00149 #endif

Generated on Tue Jan 7 12:11:22 2003 for THEGUI by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002