00001
00031 #ifndef _LIBINFO_H_
00032 #define _LIBINFO_H_
00033
00034 #ifdef __cplusplus
00035 extern "C" {
00036 #endif
00037
00038 #include <stdio.h>
00039 #include <stdlib.h>
00040 #include <string.h>
00041
00042
00043
00044 typedef unsigned char u8;
00045 typedef signed char s8;
00046 typedef unsigned short u16;
00047 typedef unsigned int u32;
00048
00049
00050 #define LI_UNSELECTED 0
00051 #define LI_SELECTED 1
00054
00055
00056
00057
00058
00059
00060
00061
00062 #define LI_OUTPUT_XPM
00063 #define LI_OUTPUT_PPM
00066
00067
00068
00069
00070
00071 u8 *LIBitmapUnselected;
00072 u8 *LIBitmapSelected;
00073 u8 *LIPaletteUnselected;
00074 u8 *LIPaletteSelected;
00076
00077 int LIWidth;
00078 int LIHeight;
00079 int LINumColoursUnselected;
00080 int LINumColoursSelected;
00082
00083 char *LIErrorString;
00085
00086 int LIReadDefIcon(const char *filename);
00087 int LIReadNewIcon(const char *filename);
00088 void LICleanUp(void);
00090
00091 #ifdef LI_OUTPUT_XPM
00092
00093 int LISetXPMTransparency(int colour, int image);
00094 int LIWriteXPM(char *filename, int image);
00095 void LIGetMemoryXPM(char **xpm, int image);
00097 #endif
00098 #ifdef LI_OUTPUT_PPM
00099
00100 int LIWritePPM(char *filename, int image);
00102 #endif
00103
00104
00105 char *LIGetVersion(void);
00106 char *LIGetDate(void);
00107 char *LIGetCopyright(void);
00110
00111
00112
00113
00114
00115
00116
00117 #define LIBINFO_VERSION "1.2 Beta"
00118 #define LIBINFO_DATE "03/02/2010"
00119 #define LIBINFO_COPYRIGHT "Copyright (C) 2003-2010 Gary Harris <garyjharris@users.sourceforge.net>"
00120
00121
00122 FILE *fileIcon;
00123
00124
00125 u16 magic, version, type;
00126 u32 image1, image2, tool, num_tooltypes;
00127
00128
00129 u16 Get16(u8 *p);
00130 u32 Get32(u8 *p);
00131 int Read8(u8 *buf, int len);
00132 int ReadHeader(void);
00133 int ReadIcon(int image);
00134 int ReadNewicon(int image, char *name);
00135 u8 *DecompressNewicon(u8 *src, char *name, int len, int bits);
00136 u8 *ReadString();
00137 int StartTooltypes();
00138 u8 *GetTooltype(char *name);
00139
00140 #ifdef LI_OUTPUT_XPM
00141
00142 int WriteXPM(char *filename, int width, int height, int ncols, u8 *palette, int image);
00143 void GetMemoryXPM(char **amigaicon_xpm, int width, int height, int ncols, u8 *palette, int image);
00144
00145 #endif
00146 #ifdef LI_OUTPUT_PPM
00147
00148 int WritePPM(char *filename, int width, int height, int ncols, u8 *palette, int image);
00149
00150 #endif
00151
00152 #ifdef __cplusplus
00153 }
00154 #endif
00155
00156 #endif
00157
00158
00159
00160
00161
00162
00163