Files
milsko/example.c
NishiOwO 3f9f192822 better focus
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@50 b9cfdab3-6d41-4d17-bbe4-086880011989
2025-09-29 05:05:47 +00:00

27 lines
557 B
C

/* $Id$ */
#include <Mw/Milsko.h>
void handler(MwWidget 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);
}