00001
00065 #ifndef INC_MI32_MICON_H
00066 #define INC_MI32_MICON_H
00067
00068 #ifndef INC_MI32_ICONID_H
00069 #include <mi32/iconid.h>
00070 #endif
00071
00072 #ifndef INC_MI32_SIMPLEAR_H
00073 #include <mi32/simplear.h>
00074 #endif
00075
00076 #ifndef GENERATING_DOXYGEN_OUTPUT
00077 namespace RVC {
00078 class STYLE;
00079 class STYLEPATTERN_BITMAP;
00080 class DESCRIPTOR;
00081 }
00082 class FILEPATH;
00083 #endif
00084
00085
00086
00087
00088
00090 enum MICONFLAGS {
00091 MICONFLAG_None = 0x0000,
00092 MICONFLAG_Stippled = 0x0001,
00093 MICONFLAG_DefaultBackground = 0x0002,
00094 MICONFLAG_StippledSelected = 0x0008,
00095 MICONFLAG_SizeMask = 0x0FF0,
00096 MICONFLAG_Size16 = 0x0100,
00097 MICONFLAG_Size32 = 0x0200,
00098 MICONFLAG_NoDarkenSelected = 0x1000,
00099 MICONFLAG_DisplayError = 0x2000,
00100 };
00101 #ifndef GENERATING_DOXYGEN_OUTPUT
00102 DEFINE_ENUM_OP_BITWISE(MICONFLAGS)
00103 #endif
00104
00105
00106 struct MICONSTRUCT {
00107 MIUNICODE group[16];
00108 MIUNICODE name[16];
00109 UINT8 height;
00110 UINT8 width;
00111 UINT8 resized;
00112 UINT8 spare;
00113 UINT32 refcount;
00114 MPIXEL bgpixel;
00115 ICONID id;
00116 void *privptr;
00117 };
00118
00119 DEPRECATED_MSG("Use MICONSTRUCT*") typedef MICONSTRUCT *MICON;
00120
00121
00122
00123
00124
00125
00126
00127
00130
00139 int MiconCreate (
00140 MICONSTRUCT **icon,
00141 const char *group,
00142 const char *name,
00143 MPIXEL bgpixel,
00144 UINT8 width,
00145 UINT8 height,
00146 UINT32 flags
00147 );
00148
00157 int MiconCreate (
00158 MICONSTRUCT **icon,
00159 ICONID iconid,
00160 MPIXEL bgpixel,
00161 UINT8 width,
00162 UINT8 height,
00163 UINT32 flags
00164 );
00165
00167 void MiconDestroy (
00168 MICONSTRUCT *icon
00169 );
00170
00172 inline UINT8 MiconGetHeight (
00173 const MICONSTRUCT *icon
00174 ) { return (icon->height); }
00175
00177 inline UINT8 MiconGetWidth (
00178 const MICONSTRUCT *icon
00179 ) { return (icon->width); }
00180
00182 ICONID MiconGenerateID (
00183 const char *name,
00184 const char *group = 0,
00185 int size = 16
00186 );
00187
00189 ERRVALUE MiconOpen (
00190 RVC::STYLE& Object,
00191 const FILEPATH& filepath,
00192 const MIUNICODE *group
00193 );
00194
00196 ERRVALUE MiconOpen (
00197 RVC::STYLE& Object,
00198 const MIUNICODE *group
00199 );
00200
00201 int MiconReadPatternExt (
00202 RVC::STYLE& StyleObj,
00203 INT32 pattnum,
00204 const MIUNICODE* name,
00205 int width,
00206 int height,
00207 SIMPLE_ARRAY<UINT8>& pattdata
00208 );
00209
00210 int MiconReadPatternExt (
00211 RVC::STYLE& StyleObj,
00212 INT32 pattnum,
00213 const MIUNICODE* name,
00214 int width,
00215 int height,
00216 RVC::STYLEPATTERN_BITMAP& Pattern
00217 );
00218
00228 int MiconRead (
00229 const char *group,
00230 const char *name,
00231 MICONSTRUCT **normalicon,
00232 MICONSTRUCT **armselicon,
00233 MPIXEL normalbg,
00234 MPIXEL armselbg,
00235 UINT32 flags,
00236 RVC::STYLE* StyleObj = 0
00237 );
00238
00248 int MiconRead (
00249 const char *group,
00250 const char *name,
00251 MICONSTRUCT **normalicon,
00252 MICONSTRUCT **armeselicon,
00253 UINT32 flags
00254 );
00255
00257 ERRVALUE MiconRead (
00258 ICONID iconid,
00259 MICONSTRUCT **normalicon,
00260 MICONSTRUCT **armselicon = 0,
00261 MICONFLAGS flags = MICONFLAG_None
00262 );
00263
00265 ERRVALUE MiconRead (
00266 ICONID iconid,
00267 MICONSTRUCT **normalicon,
00268 MICONSTRUCT **armselicon,
00269 MPIXEL normalbg,
00270 MPIXEL armselbg,
00271 MICONFLAGS flags = MICONFLAG_None
00272 );
00273
00279 ERRVALUE MiconRead (
00280 ICONID iconid,
00281 SIMPLE_ARRAY<UINT32>& data
00282 );
00283
00285 ERRVALUE MiconRead (
00286 ICONID iconid,
00287 RVC::STYLEPATTERN_BITMAP& pattern
00288 );
00289
00291 ERRVALUE MiconRead (
00292 const char *group,
00293 const char *name,
00294 RVC::STYLEPATTERN_BITMAP& pattern
00295 );
00296
00298
00299 #endif // INC_MI32_MICON_H