2025-09-28 09:08:53 +00:00
|
|
|
/* $Id$ */
|
|
|
|
|
|
2025-09-29 00:10:20 +00:00
|
|
|
#include <Mw/Milsko.h>
|
2025-09-28 09:08:53 +00:00
|
|
|
|
2025-09-29 00:06:16 +00:00
|
|
|
void handler(MwWidget handle, void* user_data, void* call_data){
|
2025-09-28 22:21:51 +00:00
|
|
|
printf("hello world!\n");
|
|
|
|
|
}
|
|
|
|
|
|
2025-09-28 09:08:53 +00:00
|
|
|
int main(){
|
2025-09-29 05:05:47 +00:00
|
|
|
int y, x;
|
|
|
|
|
MwWidget window = MwVaCreateWidget(MwWindowClass, "main", NULL, 0, 0, 400, 260,
|
2025-09-29 00:06:16 +00:00
|
|
|
MwNtitle, "hello world",
|
2025-09-28 09:08:53 +00:00
|
|
|
NULL);
|
2025-09-29 00:01:58 +00:00
|
|
|
|
2025-09-29 05:05:47 +00:00
|
|
|
for(y = 0; y < 5; y++){
|
|
|
|
|
for(x = 0; x < 2; x++){
|
|
|
|
|
MwWidget button = MwVaCreateWidget(MwButtonClass, "button", window, 5 + 195 * x, 5 + 50 * y, 195, 50,
|
|
|
|
|
MwNtext, "lorem ipsum",
|
|
|
|
|
NULL);
|
2025-09-29 04:48:59 +00:00
|
|
|
|
2025-09-29 05:05:47 +00:00
|
|
|
MwAddUserHandler(button, MwNactivateHandler, handler, NULL);
|
|
|
|
|
}
|
2025-09-29 04:48:59 +00:00
|
|
|
}
|
2025-09-28 22:21:51 +00:00
|
|
|
|
2025-09-29 00:06:16 +00:00
|
|
|
MwLoop(window);
|
2025-09-28 09:08:53 +00:00
|
|
|
}
|