[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 4a485410: Fix GNUstep build
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] master 4a485410: Fix GNUstep build |
Date: |
Tue, 23 May 2017 05:45:18 -0400 (EDT) |
branch: master
commit 4a485410ce74cafd4e9c344e31f7575464a16113
Author: Alan Third <address@hidden>
Commit: Paul Eggert <address@hidden>
Fix GNUstep build
* src/nsterm.h [NS_IMPL_GNUSTEP]: Add typedefs for Cocoa-only types.
(NSWindowStyleMaskUtilityWindow): #define to NSUtilityWindowMask in
GNUstep and old versions of macOS.
* src/nsfns.m (ns-set-mouse-absolute-pixel-position): Function only
works in cocoa, not GNUstep.
---
src/nsfns.m | 4 ++++
src/nsterm.h | 8 ++++++++
2 files changed, 12 insertions(+)
diff --git a/src/nsfns.m b/src/nsfns.m
index 00310c0..3833ee7 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -3046,6 +3046,9 @@ The coordinates X and Y are interpreted in pixels
relative to a position
\(0, 0) of the selected frame's display. */)
(Lisp_Object x, Lisp_Object y)
{
+#ifdef NS_IMPL_COCOA
+ /* GNUstep doesn't support CGWarpMouseCursorPosition, so none of
+ this will work. */
struct frame *f = SELECTED_FRAME ();
EmacsView *view = FRAME_NS_VIEW (f);
NSScreen *screen = [[view window] screen];
@@ -3072,6 +3075,7 @@ The coordinates X and Y are interpreted in pixels
relative to a position
CGPoint mouse_pos = CGPointMake(mouse_x, mouse_y);
CGWarpMouseCursorPosition (mouse_pos);
+#endif /* NS_IMPL_COCOA */
return Qnil;
}
diff --git a/src/nsterm.h b/src/nsterm.h
index 5da949e..443a40e 100644
--- a/src/nsterm.h
+++ b/src/nsterm.h
@@ -62,6 +62,13 @@ typedef CGFloat EmacsCGFloat;
typedef float EmacsCGFloat;
#endif
+/* FIXME: It looks as though instancetype will be supported in GNUstep
+ at some point, but I'm not sure what version. */
+#ifdef NS_IMPL_GNUSTEP
+typedef id instancetype;
+typedef int NSWindowStyleMask;
+#endif
+
/* ==========================================================================
Trace support
@@ -1290,6 +1297,7 @@ extern char gnustep_base_version[]; /* version tracking
*/
#define NSWindowStyleMaskMiniaturizable NSMiniaturizableWindowMask
#define NSWindowStyleMaskResizable NSResizableWindowMask
#define NSWindowStyleMaskTitled NSTitledWindowMask
+#define NSWindowStyleMaskUtilityWindow NSUtilityWindowMask
#define NSAlertStyleCritical NSCriticalAlertStyle
#define NSControlSizeRegular NSRegularControlSize
#endif
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 4a485410: Fix GNUstep build,
Paul Eggert <=