bsnes/hiro/cocoa/window.hpp
Tim Allen 653bb378ee Update to v096r03 release.
byuu says:

Changelog:
- fixed icarus to save settings properly
- fixed higan's full screen toggle on OS X
- increased "Add Codes" button width to avoid text clipping
- implemented cocoa/canvas.cpp
- added 1s delay after mapping inputs before re-enabling the window
  (wasn't actually necessary, but already added it)
- fixed setEnabled(false) on Cocoa's ListView and TextEdit widgets
- updated nall::programpath() to use GetModuleFileName on Windows
- GB: system uses open collector logic, so unmapped reads return 0xFF,
  not 0x00 (passes blargg's cpu_instrs again) [gekkio]
2016-01-08 20:23:46 +11:00

66 lines
1.8 KiB
C++

#if defined(Hiro_Window)
@interface CocoaWindow : NSWindow <NSWindowDelegate> {
@public
hiro::mWindow* window;
NSMenu* menuBar;
NSMenu* rootMenu;
NSMenuItem* disableGatekeeperAutoRearm;
NSTextField* statusBar;
}
-(id) initWith:(hiro::mWindow&)window;
-(BOOL) canBecomeKeyWindow;
-(BOOL) canBecomeMainWindow;
-(void) windowDidBecomeMain:(NSNotification*)notification;
-(void) windowDidMove:(NSNotification*)notification;
-(void) windowDidResize:(NSNotification*)notification;
-(BOOL) windowShouldClose:(id)sender;
-(NSDragOperation) draggingEntered:(id<NSDraggingInfo>)sender;
-(BOOL) performDragOperation:(id<NSDraggingInfo>)sender;
-(NSMenu*) menuBar;
-(void) menuAbout;
-(void) menuPreferences;
-(void) menuDisableGatekeeperAutoRearm;
-(void) menuQuit;
-(NSTextField*) statusBar;
@end
namespace hiro {
struct pWindow : pObject {
Declare(Window, Object)
auto append(sLayout layout) -> void;
auto append(sMenuBar menuBar) -> void;
auto append(sStatusBar statusBar) -> void;
auto focused() const -> bool override;
auto frameMargin() const -> Geometry;
auto remove(sLayout layout) -> void;
auto remove(sMenuBar menuBar) -> void;
auto remove(sStatusBar statusBar) -> void;
auto setBackgroundColor(Color color) -> void;
auto setDroppable(bool droppable) -> void;
auto setFocused() -> void override;
auto setFullScreen(bool fullScreen) -> void;
auto setGeometry(Geometry geometry) -> void;
auto setModal(bool modal) -> void;
auto setResizable(bool resizable) -> void;
auto setTitle(const string& text) -> void;
auto setVisible(bool visible) -> void;
auto moveEvent() -> void;
auto sizeEvent() -> void;
auto statusBarHeight() -> uint;
auto statusBarReposition() -> void;
auto _append(mWidget& widget) -> void;
auto _geometry() -> Geometry;
CocoaWindow* cocoaWindow = nullptr;
Geometry windowedGeometry;
};
}
#endif