ui/cocoa/toolkit.m

changeset 25
78ae3efe463f
parent 24
06bceda81a03
child 26
a137277f9173
equal deleted inserted replaced
24:06bceda81a03 25:78ae3efe463f
60 ui_stock_init(); 60 ui_stock_init();
61 61
62 uic_load_app_properties(); 62 uic_load_app_properties();
63 } 63 }
64 64
65 char* ui_appname() {
66 return application_name;
67 }
68
65 void ui_show(UiObject *obj) { 69 void ui_show(UiObject *obj) {
70 uic_check_group_widgets(obj->ctx);
66 if([obj->widget class] == [UiCocoaWindow class]) { 71 if([obj->widget class] == [UiCocoaWindow class]) {
67 UiCocoaWindow *window = (UiCocoaWindow*)obj->widget; 72 UiCocoaWindow *window = (UiCocoaWindow*)obj->widget;
68 [window makeKeyAndOrderFront:nil]; 73 [window makeKeyAndOrderFront:nil];
69 } else { 74 } else {
70 printf("Error: ui_show: Object is not a Window!\n"); 75 printf("Error: ui_show: Object is not a Window!\n");
71 } 76 }
72 } 77 }
73 78
74 void ui_set_enabled(UIWIDGET widget, int enabled) { 79 void ui_set_enabled(UIWIDGET widget, int enabled) {
75 //[widget setEnabled:enabled]; 80 [(id)widget setEnabled: enabled];
76 } 81 }
77 82
78 void ui_main() { 83 void ui_main() {
79 [NSApp run]; 84 [NSApp run];
80 [pool release]; 85 [pool release];

mercurial