mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-03 16:10:50 +00:00
clean
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@51 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
30
examples/example.c
Normal file
30
examples/example.c
Normal file
@@ -0,0 +1,30 @@
|
||||
/* $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);
|
||||
}
|
||||
Reference in New Issue
Block a user