Skip to content

Commit

Permalink
Remove unused mac code
Browse files Browse the repository at this point in the history
  • Loading branch information
dannye committed Oct 29, 2024
1 parent 7a3aa21 commit f08464b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 50 deletions.
28 changes: 0 additions & 28 deletions src/cocoa.h
Original file line number Diff line number Diff line change
@@ -1,29 +1,6 @@
#ifndef COCOA_H
#define COCOA_H

// From $SDKROOT/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSText.h
#ifdef __OBJC__
#import <AppKit/NSText.h>
#else
enum {
NSEnterCharacter = 0x0003,
NSBackspaceCharacter = 0x0008,
NSTabCharacter = 0x0009,
NSNewlineCharacter = 0x000a,
NSFormFeedCharacter = 0x000c,
NSCarriageReturnCharacter = 0x000d,
NSBackTabCharacter = 0x0019,
NSEscapeCharacter = 0x001b,
NSDeleteCharacter = 0x007f,
NSLineSeparatorCharacter = 0x2028,
NSParagraphSeparatorCharacter = 0x2029,
NSUpArrowFunctionKey = 0xf700,
NSDownArrowFunctionKey = 0xf701,
NSLeftArrowFunctionKey = 0xf702,
NSRightArrowFunctionKey = 0xf703
};
#endif

#pragma warning(push, 0)
#include <FL/Fl_Window.H>
#pragma warning(pop)
Expand All @@ -33,11 +10,6 @@ enum cocoa_appearance {
COCOA_APPEARANCE_DARK_AQUA
};

void cocoa_set_window_transparency(const Fl_Window *w, double alpha);
bool cocoa_is_maximized(const Fl_Window *w);
void cocoa_maximize(const Fl_Window *w);
bool cocoa_is_fullscreen(const Fl_Window *w);
void cocoa_fullscreen(const Fl_Window *w, bool state);
void cocoa_set_appearance(const Fl_Window *w, enum cocoa_appearance appearance_id);
bool cocoa_is_dark_mode();

Expand Down
22 changes: 0 additions & 22 deletions src/cocoa.mm
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,6 @@

#include "cocoa.h"

void cocoa_set_window_transparency(const Fl_Window *w, double alpha) {
[fl_xid(w) setAlphaValue:alpha];
}

bool cocoa_is_maximized(const Fl_Window *w) {
return [fl_xid(w) isZoomed];
}

void cocoa_maximize(const Fl_Window *w) {
[fl_xid(w) setFrame:[[fl_xid(w) screen] frame] display:true];
}

bool cocoa_is_fullscreen(const Fl_Window *w) {
return ([fl_xid(w) styleMask] & NSWindowStyleMaskFullScreen) == NSWindowStyleMaskFullScreen;
}

void cocoa_fullscreen(const Fl_Window *w, bool state) {
if (state != cocoa_is_fullscreen(w)) {
[fl_xid(w) toggleFullScreen:nil];
}
}

void cocoa_set_appearance(const Fl_Window *w, enum cocoa_appearance appearance_id) {
NSAppearance *appearance;
switch (appearance_id) {
Expand Down

0 comments on commit f08464b

Please sign in to comment.