summaryrefslogtreecommitdiff
path: root/src/lisp.h
diff options
context:
space:
mode:
authorAlan Third <alan@idiocy.org>2018-06-23 15:26:26 +0100
committerAlan Third <alan@idiocy.org>2020-03-22 15:31:45 +0000
commit3316e78c120f69aa3ac12ff7345a79dd09654c9a (patch)
tree95dab41336265e82d71bc45c621733bfdbe06a74 /src/lisp.h
parent41f54289058ec42829cd19f7c469b2e4e325b830 (diff)
downloademacs-scratch/ns/next.tar.gz
Run NSApp loop in its own threadscratch/ns/next
* src/emacs.c (main) [HAVE_NS]: Rename to emacs_main. * src/lisp.h (emacs_main) [HAVE_NS]: Define function. * src/nsfns.m (Fns_do_applescript): Remove runloop. (Fx_create_frame): Initialize the frame on the main thread. * src/nsterm.h ([EmacsApp initLispThread:withArgv:]): New method. ([EmacsApp fd_handler:]): ([EmacsApp timeout_handler:]): ([EmacsApp sendFromMainThread:]): Remove function definitions. ([EmacsApp initLispThread:]): New function. ([EmacsThread initWithArgc:Argv:]): ([EmacsThread sendEmacsEvent:NSEvent:frameOrWindow:]): New functions. * src/nsterm.m (EV_TRAILER): Reduce to a single function. (EV_TRAILER2): Remove. (ns_init_events): (ns_finish_events): (hold_event): (ns_send_appdefined): (ns_run_loop_break): ([EmacsApp timeout_handler:]): ([EmacsApp sendFromMainThread:]): ([EmacsApp fd_handler:]): Remove functions. (ns_check_menu_open): ([EmacsApp newFrame:]): ([EmacsApp openFile:]): ([EmacsApp terminate:]): ([EmacsApp fulfillService:withArg:]): ([EmacsView changeFont:]): ([EmacsView keyDown:]): ([EmacsView insertText:]): ([EmacsView setmarkedtext:selectedRange:]): ([EmacsView deleteWorkingText:]): ([EmacsView doCommandBySelector:]): ([EmacsView mouseDown:]): ([EmacsView mouseMoved:]): ([EmacsView windowShouldClose:]): ([EmacsView windowDidResize:]): ([EmacsView windowDidBecomeKey]): ([EmacsView windowDidResignKey:]): ([EmacsView windowDidMove:]): ([EmacsView windowDidDeminiaturize:]): ([EmacsView windowDidExpose:]): ([EmacsView windowDidMiniaturize:]): ([EmacsView menuDown:]): ([EmacsView toolbarClicked:]): ([EmacsView toggleToolbar:]): ([EmacsView performDragOperation:]): ([EmacsScroller sendScrollEventAtLoc:fromEvent:]): Change event handling. ([EmacsApp applicationDidFinishLaunching:]): ([EmacsApp applicationDidResignActive:]): Remove call to ns_send_appdefined. (ns_read_socket): Change event handling, use thread local runloop. (ns_select): Remove unused fd_handler and runloop related code. (ns_term_init): Move some NS initialisation code to new main function and remove fd_handler related code. ([EmacsApp sendEvent:]): Stop run loop from exiting. ([EmacsApp initLispThread:withArgv:]): New method. ([EmacsThread initWithArgc:Argv:]): ([EmacsThread processEmacsEvent:]): ([EmacsThread sendEmacsEvent:NSEvent:frameOrWindow:]): New functions. (main): New function to initialise NS stuff and run emacs_main in its own thread. * src/systhread.c (sys_cond_broadcast): Remove NS runloop related code.
Diffstat (limited to 'src/lisp.h')
-rw-r--r--src/lisp.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lisp.h b/src/lisp.h
index a379977d353..34d97a8efc9 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -4717,6 +4717,10 @@ extern void syms_of_xterm (void);
extern char *get_keysym_name (int);
#endif /* HAVE_WINDOW_SYSTEM */
+#ifdef HAVE_NS
+extern int emacs_main (int, char **);
+#endif
+
/* Defined in xml.c. */
extern void syms_of_xml (void);
#ifdef HAVE_LIBXML2