Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

image_Pnm_id.c

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 #include "Image.h"
00025 #include "Bases.h"
00026 #include "Module.h"
00027 #include "debug.h"
00028 #include "Common.h"
00029 
00030 static bases_Modules_t *api;
00031 VERSION("Pnm.image_id",1,0,"Gergely Gati","g.gati@freemail.hu");
00032 
00033 
00034 static int pnm_Recognize(u8 *data, int data_size)
00035 {
00036   int ret=-1;
00037 
00038   debug_Begin();
00039 
00040   if(data[0]=='P'&&(data[1]=='6'||data[1]=='5')) ret=0;
00041 
00042   debug_End();
00043 
00044   return(ret);
00045 }
00046 
00047 
00048 static int pnm_Init(u32 module)
00049 {
00050   int ret=-1;
00051 
00052   debug_Begin();
00053 
00054   ret=api->img_Call(IMG_REGISTERFORMAT,
00055                 TAG_IMG_NAME,(u32)"pnm",
00056                 TAG_IMG_MODULE,module,
00057                 TAG_IMG_IMG_RECOGNIZE,pnm_Recognize,
00058                 TAG_DONE);
00059 
00060   debug_End();
00061 
00062   return(ret);
00063 }
00064 
00065 EXPORT int module_Init(u32 module, bases_Modules_t *bases)
00066 {
00067     api=bases;
00068     return(pnm_Init(module));
00069 }

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