Files
milsko/examples/example.c
NishiOwO 979fb4f708 clean
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@51 b9cfdab3-6d41-4d17-bbe4-086880011989
2025-09-29 05:15:42 +00:00

31 lines
609 B
C

/* $Id$ */
#include <Mw/Milsko.h>
void handler(MwWidget handle, void* user_data, void* call_data){
(void)handle;
(void)user_data;
(void)call_data;
printf("hello world!\n");
}
int main(){
int y, x;
MwWidget window = MwVaCreateWidget(MwWindowClass, "main", NULL, 0, 0, 400, 260,
MwNtitle, "hello world",
NULL);
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);
MwAddUserHandler(button, MwNactivateHandler, handler, NULL);
}
}
MwLoop(window);
}