48 #define MGNCS_EXPORT __declspec(dllexport) 50 #define MGNCS_EXPORT __declspec(dllimport) 56 typedef struct Allocator{
57 void *(*alloc)(
void* pold,
size_t new_size);
58 size_t (*getsize)(
void* p);
59 void (*free)(
void* p);
62 Allocator * ncsGetDefaultAllocator(
void);
86 enum enumNCSImageDrawMode{
94 #define ALLOCA(size) alloca(size) 97 #define ALLOCA(size) malloc(size) 98 #define FREEA(p) free(p) 101 MGNCS_EXPORT
void ncsDrawImage(HDC hdc, PBITMAP pbmp,
const RECT * rc,
int mode,
int align,
int valign);
103 #define IMG_TYPE_UNKNOWN 0 104 #define IMG_TYPE_BITMAP 1 105 #define IMG_TYPE_ICON 2 106 #define IMG_TYPE_MYBITMAP 4 108 #define IMG_FLAG_IGNORE 0 109 #define IMG_FLAG_UNLOAD 1 110 #define IMG_FLAG_RELEASE_RES 2 111 typedef struct _ImageDrawInfo{
112 unsigned char img_type;
114 unsigned char drawMode;
115 unsigned char revert;
124 MGNCS_EXPORT
void ncsInitDrawInfo(ImageDrawInfo *idi);
126 MGNCS_EXPORT
void ncsCleanImageDrawInfo(ImageDrawInfo * idi);
128 MGNCS_EXPORT BOOL ncsSetImageDrawInfoByFile(ImageDrawInfo *idi,
const char* image_file,
int drawMode, BOOL bas_mybitmp);
130 MGNCS_EXPORT BOOL ncsSetImageDrawInfoByRes(ImageDrawInfo *idi, RES_KEY key,
int drawMode,
int res_type);
132 MGNCS_EXPORT BOOL ncsSetImageDrawInfo(ImageDrawInfo *idi,
void* pimg,
int drawMode,
int img_type);
135 MGNCS_EXPORT
void ncsImageDrawInfoDraw(ImageDrawInfo *idi, HDC hdc,
const RECT* prc,
int align,
int valign);
137 MGNCS_EXPORT BOOL ncsImageDrawInfoGetImageSize(ImageDrawInfo *idi,
int *px,
int *py);