X-Git-Url: https://git.hcoop.net/bpt/emacs.git/blobdiff_plain/eb7a410c147507ffdf0e84d163a014acb82b19a2..e7a526e3beb2ddadaad24ccd26d75fb55f7965bd:/src/nsterm.h diff --git a/src/nsterm.h b/src/nsterm.h index 07cfc2e022..fd8c9baa3e 100644 --- a/src/nsterm.h +++ b/src/nsterm.h @@ -51,6 +51,16 @@ along with GNU Emacs. If not, see . */ #ifdef __OBJC__ +/* CGFloat on GNUStep may be 4 or 8 byte, but functions expect float* for some + versions. + On Cocoa, functions expect CGFloat*. Make compatible type. */ +#if defined (NS_IMPL_COCOA) || GNUSTEP_GUI_MAJOR_VERSION > 0 || \ + GNUSTEP_GUI_MINOR_VERSION >= 22 +typedef CGFloat EmacsCGFloat; +#else +typedef float EmacsCGFloat; +#endif + /* ========================================================================== The Emacs application @@ -60,6 +70,10 @@ along with GNU Emacs. If not, see . */ /* We override sendEvent: as a means to stop/start the event loop */ @interface EmacsApp : NSApplication { +#ifdef NS_IMPL_GNUSTEP +@public + int nextappdefined; +#endif } - (void)logNotification: (NSNotification *)notification; - (void)sendEvent: (NSEvent *)theEvent; @@ -68,8 +82,18 @@ along with GNU Emacs. If not, see . */ - (void)fd_handler: (id)unused; - (void)timeout_handler: (NSTimer *)timedEntry; - (BOOL)fulfillService: (NSString *)name withArg: (NSString *)arg; +#ifdef NS_IMPL_GNUSTEP +- (void)sendFromMainThread:(id)unused; +#endif @end +#ifdef NS_IMPL_GNUSTEP +/* Dummy class to get rid of startup warnings. */ +@interface EmacsDocument : NSDocument +{ +} +@end +#endif /* ========================================================================== @@ -128,8 +152,7 @@ along with GNU Emacs. If not, see . */ #endif #ifdef NS_IMPL_GNUSTEP -/* Not declared, but useful. */ -- (void) unlockFocusNeedsFlush: (BOOL)needs; +- (void)windowDidMove: (id)sender; #endif @end @@ -199,10 +222,14 @@ along with GNU Emacs. If not, see . */ } - initForView: (EmacsView *)view withIdentifier: (NSString *)identifier; - (void) clearActive; +- (void) clearAll; - (BOOL) changed; -- (void) addDisplayItemWithImage: (EmacsImage *)img idx: (int)idx +- (void) addDisplayItemWithImage: (EmacsImage *)img + idx: (int)idx + tag: (int)tag helpText: (const char *)help enabled: (BOOL)enabled; + /* delegate methods */ - (NSToolbarItem *)toolbar: (NSToolbar *)toolbar itemForItemIdentifier: (NSString *)itemIdentifier @@ -267,14 +294,10 @@ along with GNU Emacs. If not, see . */ @interface EmacsSavePanel : NSSavePanel { } -- (NSString *) getFilename; -- (NSString *) getDirectory; @end @interface EmacsOpenPanel : NSOpenPanel { } -- (NSString *) getFilename; -- (NSString *) getDirectory; @end @interface EmacsFileDelegate : NSObject @@ -335,7 +358,7 @@ along with GNU Emacs. If not, see . */ NSResponder *prevResponder; /* offset to the bottom of knob of last mouse down */ - float last_mouse_offset; + CGFloat last_mouse_offset; float min_portion; int pixel_height; int last_hit_part; @@ -789,9 +812,9 @@ extern int ns_lisp_to_color (Lisp_Object color, NSColor **col); extern NSColor *ns_lookup_indexed_color (unsigned long idx, struct frame *f); extern unsigned long ns_index_color (NSColor *color, struct frame *f); extern void ns_free_indexed_color (unsigned long idx, struct frame *f); -extern const char *ns_get_pending_menu_title (); +extern const char *ns_get_pending_menu_title (void); extern void ns_check_menu_open (NSMenu *menu); -extern void ns_check_pending_open_menu (); +extern void ns_check_pending_open_menu (void); #endif /* C access to ObjC functionality */ @@ -840,6 +863,7 @@ extern int x_display_pixel_height (struct ns_display_info *); extern int x_display_pixel_width (struct ns_display_info *); /* This in nsterm.m */ +extern void x_destroy_window (struct frame *f); extern int ns_select (int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, EMACS_TIME *timeout, sigset_t *sigmask);