git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@146 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
NishiOwO
2025-10-04 04:10:45 +00:00
parent 280286f389
commit a696ee01f3
5 changed files with 82 additions and 7 deletions

28
src/widget/image.c Normal file
View File

@@ -0,0 +1,28 @@
/* $Id$ */
#include <Mw/Milsko.h>
static void create(MwWidget handle) {
MwSetDefault(handle);
}
static void draw(MwWidget handle) {
MwRect r;
MwLLPixmap px = MwGetVoid(handle, MwNpixmap);
r.x = 0;
r.y = 0;
r.width = MwGetInteger(handle, MwNwidth);
r.height = MwGetInteger(handle, MwNheight);
if(px != NULL) {
MwLLDrawPixmap(handle->lowlevel, &r, px);
}
}
MwClassRec MwImageClassRec = {
create, /* create */
NULL, /* destroy */
draw, /* draw */
NULL, /* click */
NULL /* parent_resize */
};
MwClass MwImageClass = &MwImageClassRec;