60 #define MGNCS_EXPORT __declspec(dllexport)
62 #define MGNCS_EXPORT __declspec(dllimport)
68 typedef struct Allocator{
69 void *(*alloc)(
void* pold,
size_t new_size);
70 size_t (*getsize)(
void* p);
71 void (*free)(
void* p);
74 Allocator * ncsGetDefaultAllocator(
void);
98 enum enumNCSImageDrawMode{
106 #define ALLOCA(size) alloca(size)
109 #define ALLOCA(size) malloc(size)
110 #define FREEA(p) free(p)
113 MGNCS_EXPORT
void ncsDrawImage(HDC hdc, PBITMAP pbmp,
const RECT * rc,
int mode,
int align,
int valign);
115 #define IMG_TYPE_UNKNOWN 0
116 #define IMG_TYPE_BITMAP 1
117 #define IMG_TYPE_ICON 2
118 #define IMG_TYPE_MYBITMAP 4
120 #define IMG_FLAG_IGNORE 0
121 #define IMG_FLAG_UNLOAD 1
122 #define IMG_FLAG_RELEASE_RES 2
123 typedef struct _ImageDrawInfo{
124 unsigned char img_type;
126 unsigned char drawMode;
127 unsigned char revert;
136 MGNCS_EXPORT
void ncsInitDrawInfo(ImageDrawInfo *idi);
138 MGNCS_EXPORT
void ncsCleanImageDrawInfo(ImageDrawInfo * idi);
140 MGNCS_EXPORT BOOL ncsSetImageDrawInfoByFile(ImageDrawInfo *idi,
const char* image_file,
int drawMode, BOOL bas_mybitmp);
142 MGNCS_EXPORT BOOL ncsSetImageDrawInfoByRes(ImageDrawInfo *idi, RES_KEY key,
int drawMode,
int res_type);
144 MGNCS_EXPORT BOOL ncsSetImageDrawInfo(ImageDrawInfo *idi,
void* pimg,
int drawMode,
int img_type);
147 MGNCS_EXPORT
void ncsImageDrawInfoDraw(ImageDrawInfo *idi, HDC hdc,
const RECT* prc,
int align,
int valign);
149 MGNCS_EXPORT BOOL ncsImageDrawInfoGetImageSize(ImageDrawInfo *idi,
int *px,
int *py);