2025-09-30 17:47:03 +00:00
|
|
|
/* $Id$ */
|
|
|
|
|
#include <Mw/Milsko.h>
|
|
|
|
|
|
|
|
|
|
int main() {
|
2025-10-10 11:45:27 +00:00
|
|
|
MwWidget window = MwVaCreateWidget(MwWindowClass, "window", NULL, MwDEFAULT, MwDEFAULT, 500, 500,
|
2025-10-04 00:45:41 +00:00
|
|
|
MwNtitle, "image image",
|
2025-09-30 17:47:03 +00:00
|
|
|
NULL);
|
2025-10-07 02:04:06 +00:00
|
|
|
MwWidget image = MwCreateWidget(MwImageClass, "image", window, 50, 50, 200, 400);
|
2025-10-14 07:04:11 +00:00
|
|
|
MwWidget image2 = MwCreateWidget(MwImageClass, "image", window, 250, 50, 200, 200);
|
|
|
|
|
MwWidget image3 = MwCreateWidget(MwImageClass, "image", window, 250, 250, 200, 200);
|
2025-09-30 21:58:05 +00:00
|
|
|
MwLLPixmap px = MwLoadImage(window, "examples/picture.png");
|
2025-10-07 02:04:06 +00:00
|
|
|
MwLLPixmap px2 = MwLoadImage(window, "examples/picture.jpg");
|
2025-10-14 07:04:11 +00:00
|
|
|
MwLLPixmap px3 = MwLoadImage(window, "resource/logo.png");
|
2025-09-30 17:47:03 +00:00
|
|
|
|
2025-10-23 17:04:35 +00:00
|
|
|
if(px == NULL)px = MwLoadImage(window, "../examples/picture.png");
|
|
|
|
|
if(px2 == NULL)px2 = MwLoadImage(window, "../examples/picture.jpg");
|
|
|
|
|
if(px3 == NULL)px3 = MwLoadImage(window, "../resource/logo.png");
|
|
|
|
|
|
2025-09-30 22:23:54 +00:00
|
|
|
MwVaApply(window,
|
|
|
|
|
MwNiconPixmap, px,
|
|
|
|
|
NULL);
|
|
|
|
|
|
2025-10-04 00:45:41 +00:00
|
|
|
MwVaApply(image,
|
2025-09-30 17:47:03 +00:00
|
|
|
MwNpixmap, px,
|
|
|
|
|
NULL);
|
2025-10-07 02:04:06 +00:00
|
|
|
MwVaApply(image2,
|
|
|
|
|
MwNpixmap, px2,
|
|
|
|
|
NULL);
|
2025-10-14 07:04:11 +00:00
|
|
|
MwVaApply(image3,
|
|
|
|
|
MwNpixmap, px3,
|
|
|
|
|
NULL);
|
2025-09-30 17:47:03 +00:00
|
|
|
|
|
|
|
|
MwLoop(window);
|
|
|
|
|
}
|