X-Git-Url: https://git.hcoop.net/bpt/emacs.git/blobdiff_plain/06b583dec7cbde714c8fb991a1e123f612b66e3a..e7a526e3beb2ddadaad24ccd26d75fb55f7965bd:/src/nsterm.h diff --git a/src/nsterm.h b/src/nsterm.h index 41dbaf3c0f..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 @@ -331,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; @@ -573,8 +600,6 @@ extern Lisp_Object ns_display_name_list; extern struct ns_display_info *ns_display_info_for_name (Lisp_Object name); struct ns_display_info *check_x_display_info (Lisp_Object frame); -FRAME_PTR check_x_frame (Lisp_Object frame); - struct ns_output { @@ -760,7 +785,6 @@ extern void ns_clear_frame (struct frame *f); extern const char *ns_xlfd_to_fontname (const char *xlfd); -extern void check_ns (void); extern Lisp_Object ns_map_event_to_object (void); #ifdef __OBJC__ extern Lisp_Object ns_string_from_pasteboard (id pb); @@ -788,6 +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 (void); +extern void ns_check_menu_open (NSMenu *menu); +extern void ns_check_pending_open_menu (void); #endif /* C access to ObjC functionality */ @@ -836,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);