2025-09-28 09:08:53 +00:00
|
|
|
/* $Id$ */
|
|
|
|
|
|
2025-09-29 00:06:16 +00:00
|
|
|
#include <Mw/Mw.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 00:06:16 +00:00
|
|
|
MwWidget window = MwVaCreateWidget(MwWindowClass, "main", NULL, 0, 0, 400, 400,
|
|
|
|
|
MwNtitle, "hello world",
|
2025-09-28 09:08:53 +00:00
|
|
|
NULL);
|
2025-09-29 00:06:16 +00:00
|
|
|
MwWidget button = MwVaCreateWidget(MwButtonClass, "button", window, 50, 50, 300, 300, NULL);
|
2025-09-29 00:01:58 +00:00
|
|
|
|
2025-09-29 00:06:16 +00:00
|
|
|
MwAddUserHandler(button, MwNactivateHandler, handler, NULL);
|
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
|
|
|
}
|