SameBoy/Cocoa/GBView.h

32 lines
1007 B
Objective-C
Raw Normal View History

2016-03-30 23:07:55 +03:00
#import <Cocoa/Cocoa.h>
2017-10-13 00:02:02 +03:00
#include <Core/gb.h>
#import <JoyKit/JoyKit.h>
2021-05-30 20:55:04 +03:00
#import "GBOSDView.h"
@class Document;
2016-03-30 23:07:55 +03:00
2020-03-26 20:54:18 +02:00
typedef enum {
GB_FRAME_BLENDING_MODE_DISABLED,
GB_FRAME_BLENDING_MODE_SIMPLE,
GB_FRAME_BLENDING_MODE_ACCURATE,
GB_FRAME_BLENDING_MODE_ACCURATE_EVEN = GB_FRAME_BLENDING_MODE_ACCURATE,
GB_FRAME_BLENDING_MODE_ACCURATE_ODD,
} GB_frame_blending_mode_t;
@interface GBView : NSView<JOYListener>
2016-03-30 23:07:55 +03:00
- (void) flip;
- (uint32_t *) pixels;
2021-01-13 13:59:28 -05:00
@property (nonatomic, weak) IBOutlet Document *document;
@property (nonatomic) GB_gameboy_t *gb;
2020-03-26 20:54:18 +02:00
@property (nonatomic) GB_frame_blending_mode_t frameBlendingMode;
2021-10-23 13:36:58 +03:00
@property (nonatomic, getter=isMouseHidingEnabled) bool mouseHidingEnabled;
2021-01-13 13:59:28 -05:00
@property (nonatomic) bool isRewinding;
@property (nonatomic, strong) NSView *internalView;
2021-05-30 20:55:04 +03:00
@property (weak) GBOSDView *osdView;
- (void) createInternalView;
- (uint32_t *)currentBuffer;
- (uint32_t *)previousBuffer;
- (void)screenSizeChanged;
2020-04-29 16:05:31 +03:00
- (void)setRumble: (double)amp;
2021-10-23 13:26:44 +03:00
- (NSImage *)renderToImage;
2016-03-30 23:07:55 +03:00
@end