#include <CoreFoundation/CoreFoundation.h>
#include <Cocoa/Cocoa.h>
#include <CoreVideo/CoreVideo.h>
#include <OpenGL/OpenGL.h>

@interface Window : NSWindow
@end

@interface Controller : NSWindowController<NSWindowDelegate>
@end

@interface View : NSOpenGLView<NSSharingServiceDelegate>
{
    @public Window* wnd;
    NSOpenGLContext* glctx;
    bool cursor_visible;
    bool cursor_inside;
    bool cursor_ignore;
    NSTrackingArea* trackingArea;
}
- (void)close;
- (void)terminateGL;
- (void)async_lock;
- (void)async_unlock;
- (void)async_swap;
- (std::string)pick_file:(NSArray<NSString*>*)types;
- (std::string)pick_file_save:(NSArray<NSString*>*)types;
- (std::string)pick_dir;
- (void)share_file:(NSString*)file_path;
- (void)hockeyapp_crash;
- (void)show_cursor:(bool)visible;
- (std::string)clipboard_get_string;
- (bool)clipboard_set_string:(const std::string&)s;
@end

@interface AppOSX : NSApplication<NSApplicationDelegate>
{
    Window* window;
    Controller* controller;
    View* view;
}
- (void)init_dirs;
- (void)save_ui_state;
@end
