summaryrefslogtreecommitdiff
path: root/src/nsterm.h
diff options
context:
space:
mode:
authorAlan Third <alan@idiocy.org>2021-06-05 12:39:46 +0100
committerAlan Third <alan@idiocy.org>2021-07-31 11:13:05 +0100
commit1535c81f77153dd61426246be2e8afd33fa6909a (patch)
treebab94aad738e323d9b269a3616140051e4402cdf /src/nsterm.h
parenta4d2c88cdee90a3e4863a62c4ff69896d0c1a347 (diff)
downloademacs-1535c81f77153dd61426246be2e8afd33fa6909a.tar.gz
Tidy up NS port OS window handling
* src/nsterm.h (EmacsWindow): Move above EmacsView definition and add new method definitions. (EmacsView): Remove redundant bwidth variable, and change NSWindow to EmacsWindow. (EmacsFSWindow): Delete definition. * src/nsterm.m (ns_set_undecorated): Rewrite to work in GNUstep using the new OS window creating methods. ([EmacsView initFrameFromEmacs:]): Move all NSWindow related code to new init method in EmacsWindow, and use said method. ([EmacsView toggleFullScreen:]): Use EmacsWindow instead of NSWindow. ([EmacsWindow initWithEmacsFrame:]): ([EmacsWindow initWithEmacsFrame:fullscreen:screen:]): ([EmacsWindow borderWidth]): New methods. (EmacsFSWindow): Remove implementation.
Diffstat (limited to 'src/nsterm.h')
-rw-r--r--src/nsterm.h42
1 files changed, 19 insertions, 23 deletions
diff --git a/src/nsterm.h b/src/nsterm.h
index c61c6986556..40206cc4ded 100644
--- a/src/nsterm.h
+++ b/src/nsterm.h
@@ -406,6 +406,24 @@ typedef id instancetype;
@end
#endif
+/* EmacsWindow */
+@interface EmacsWindow : NSWindow
+{
+ NSPoint grabOffset;
+}
+
+#ifdef NS_IMPL_GNUSTEP
+- (NSInteger) orderedIndex;
+#endif
+
+- (instancetype)initWithEmacsFrame:(struct frame *)f;
+- (instancetype)initWithEmacsFrame:(struct frame *)f fullscreen:(BOOL)fullscreen screen:(NSScreen *)screen;
+- (NSInteger)borderWidth;
+- (BOOL)restackWindow:(NSWindow *)win above:(BOOL)above;
+- (void)setAppearance;
+@end
+
+
/* ==========================================================================
The main Emacs view
@@ -429,9 +447,8 @@ typedef id instancetype;
NSString *workingText;
BOOL processingCompose;
int fs_state, fs_before_fs, next_maximized;
- int bwidth;
int maximized_width, maximized_height;
- NSWindow *nonfs_window;
+ EmacsWindow *nonfs_window;
BOOL fs_is_native;
@public
struct frame *emacsframe;
@@ -485,27 +502,6 @@ typedef id instancetype;
@end
-/* Small utility used for processing resize events under Cocoa. */
-@interface EmacsWindow : NSWindow
-{
- NSPoint grabOffset;
-}
-
-#ifdef NS_IMPL_GNUSTEP
-- (NSInteger) orderedIndex;
-#endif
-
-- (BOOL)restackWindow:(NSWindow *)win above:(BOOL)above;
-- (void)setAppearance;
-@end
-
-
-/* Fullscreen version of the above. */
-@interface EmacsFSWindow : EmacsWindow
-{
-}
-@end
-
/* ==========================================================================
The main menu implementation