/programs/cmm/lib/kolibri.h |
---|
203,6 → 203,12 |
$int 0x40 |
} |
:void RefreshWindow(dword ID_REFRESH,ID_ACTIVE) |
{ |
ActivateWindow(ID_REFRESH); |
ActivateWindow(ID_ACTIVE); |
} |
inline fastcall int MinimizeWindow() |
{ |
EAX = 18; |
537,19 → 543,6 |
$int 0x40 |
} |
inline RefreshWindow(dword ID_REFRESH,ID_ACTIVE) |
{ |
EAX = 18; |
EBX = 22; |
ECX = 3; |
EDX = ID_REFRESH; |
$int 0x40 |
EAX = 18; |
EBX = 3; |
EDX = ID_ACTIVE; |
$int 0x40 |
} |
:void UnsafeDefineButton(dword x,y,w,h,id,color) |
{ |
EAX = 8; |
/programs/cmm/lib/obj/box_lib.h |
---|
161,7 → 161,7 |
word start_y; |
dword ext_col; |
dword int_col; |
dword draw_text_flag; // 0-not,1-yes |
dword flags; // see FR_FLAGS |
dword text_pointer; |
dword text_position; // 0-up,1-bottom |
dword font_number; // 0-monospace,1-variable |
170,6 → 170,18 |
dword font_backgr_color; |
}; |
// FR_FLAGS = [x][yyy][z] |
// z - Caption |
// yyy - BorderStyle |
// x - BackStyle |
#define FR_CAPTION 00001b // [z] |
#define FR_DOUBLE 00000b // [yyy] |
#define FR_RAISED 00010b // [yyy] |
#define FR_SUNKEN 00100b // [yyy] |
#define FR_ETCHED 00110b // [yyy] |
#define FR_RIDGED 01000b // [yyy] |
#define FR_FILLED 10000b // [x] |
:frame frame123 = { 0, 260, 10, 60, 16, NULL, 0xFFFfff, 1, NULL, 0, 1, 12, 0x000111, 0xCCCccc }; |
:void DrawFrame(dword x,y,w,h,text) |
{ |
183,6 → 195,7 |
frame123.size_x = w; |
frame123.size_y = h; |
frame123.text_pointer = text; |
if (!text) frame123.flags=0; else frame123.flags=FR_CAPTION; |
frame_draw stdcall (#frame123); |
} |
/programs/cmm/lib/obj/libimg.h |
---|
88,7 → 88,9 |
#define Image_bpp8g 7 // grayscale |
#define Image_bpp2i 8 |
#define Image_bpp4i 9 |
#define Image_bpp8a 10 // grayscale with alpha channel; application layer only!!! kernel doesn't handle this image type, libimg can only create and destroy such images |
#define Image_bpp8a 10 // grayscale with alpha channel; application layer only!!! |
// kernel doesn't handle this image type, |
// libimg can only create and destroy such images |
:dword load_image(dword filename) |
191,8 → 193,8 |
); |
} |
//NOTICE: DO NOT FORGOT TO INIT libio AND libimg!!! |
:void save_image(dword _image, _w, _h, _path) |
//NOTICE: DO NOT FORGET TO INIT libio AND libimg!!! |
:void save_image(dword _image_pointer, _w, _h, _path) |
{ |
char save_success_message[4096+200]; |
dword encoded_data=0; |
206,7 → 208,7 |
} |
else { |
EDI = image_ptr; |
memmov(EDI._Image.Data, _image, _w * _h * 3); |
memmov(EDI._Image.Data, _image_pointer, _w * _h * 3); |
encoded_data = encode_image(image_ptr, LIBIMG_FORMAT_PNG, 0, #encoded_size); |