#include "../ui/toolkit.h"
#include "../common/context.h"
#include "../common/object.h"
@interface UiApplicationDelegate : NSObject<NSApplicationDelegate> {
}
- (
void)applicationWillTerminate:(NSNotification*)notification;
- (
BOOL)applicationShouldHandleReopen:(NSApplication *)app hasVisibleWindows:(
BOOL)visible;
- (
BOOL)application:(NSApplication *)application openFile:(NSString *)filename;
@end
@interface EventWrapper : NSObject {
void *data;
ui_callback callback;
int value;
}
- (EventWrapper*) initWithData: (
void*)data callback:(ui_callback) f;
- (
void*) data;
- (
void) setData:(
void*)d;
- (ui_callback) callback;
- (
void) setCallback: (ui_callback)f;
- (
int) intval;
- (
void) setIntval:(
int)i;
- (
BOOL)handleEvent:(id)sender;
- (
BOOL)handleStateEvent:(id)sender;
- (
BOOL)handleToggleEvent:(id)sender;
@end
@interface UiThread : NSObject {
UiObject *obj;
ui_threadfunc job_func;
void *job_data;
ui_callback finish_callback;
void *finish_data;
}
- (id) initWithObject:(UiObject*)object;
- (
void) setJobFunction:(ui_threadfunc)func;
- (
void) setJobData:(
void*)data;
- (
void) setFinishCallback:(ui_callback)callback;
- (
void) setFinishData:(
void*)data;
- (
void) start;
- (
void) runJob:(id)n;
- (
void) finish:(id)n;
@end