Mercurial > emacs
comparison src/keyboard.c @ 97043:9592c50233ab remove-carbon
Remove support for Mac Carbon.
* mactoolbox.c:
* macterm.h:
* macterm.c:
* macselect.c:
* macmenu.c:
* macgui.h:
* macfns.c:
* mac.c: Remove file.
* s/darwin.h:
* m/intel386.h:
* xfaces.c:
* xdisp.c:
* window.c:
* tparam.c:
* termhooks.h:
* termcap.c:
* term.c:
* syssignal.h:
* sysselect.h:
* sysdep.c:
* process.c:
* lread.c:
* lisp.h:
* keyboard.c:
* image.c:
* fringe.c:
* frame.h:
* frame.c:
* fontset.c:
* font.h:
* font.c:
* fns.c:
* fileio.c:
* emacs.c:
* dispnew.c:
* dispextern.h:
* config.in:
* atimer.c:
* Makefile.in: Remove code for Carbon
* erc.el: Remove code for Carbon.
Remove support for Mac Carbon.
* term/mac-win.el: Remove file
* international/mule-cmds.el:
* version.el:
* startup.el:
* simple.el:
* mwheel.el:
* mouse.el:
* loadup.el:
* isearch.el:
* info.el:
* frame.el:
* faces.el:
* disp-table.el:
* cus-start.el:
* cus-face.el:
* cus-edit.el:
* Makefile.in: Remove code for Carbon.
Remove support for Mac Carbon.
* makefile.w32-in:
* emacsclient.c: Remove code for Carbon.
* PROBLEMS:
* MACHINES: Remove mentions of Mac Carbon.
* ns-emacs.texi:
* faq.texi: Remove mentions of Mac Carbon.
* os.texi:
* frames.texi:
* display.texi: Remove mentions of Mac Carbon.
* xresources.texi: Remove mentions of Mac Carbon.
* make-tarball.txt:
* admin.el:
* FOR-RELEASE:
* CPP-DEFINES: Remove mentions of Mac Carbon.
Remove support for Mac Carbon.
* mac: Remove directory.
* make-dist:
* configure.in:
* README:
* Makefile.in:
* INSTALL: Remove code for Carbon.
* configure: Regenerate.
author | Dan Nicolaescu <dann@ics.uci.edu> |
---|---|
date | Sun, 27 Jul 2008 18:24:48 +0000 |
parents | 9697a5f0281d |
children | 840bd675fd85 |
comparison
equal
deleted
inserted
replaced
97042:0ac199626cb9 | 97043:9592c50233ab |
---|---|
74 | 74 |
75 #ifdef HAVE_NTGUI | 75 #ifdef HAVE_NTGUI |
76 #include "w32term.h" | 76 #include "w32term.h" |
77 #endif /* HAVE_NTGUI */ | 77 #endif /* HAVE_NTGUI */ |
78 | 78 |
79 #ifdef MAC_OS | |
80 #include "macterm.h" | |
81 #endif | |
82 | |
83 #ifdef HAVE_NS | 79 #ifdef HAVE_NS |
84 #include "nsterm.h" | 80 #include "nsterm.h" |
85 #endif | 81 #endif |
86 | 82 |
87 #ifndef USE_CRT_DLL | 83 #ifndef USE_CRT_DLL |
477 #endif | 473 #endif |
478 | 474 |
479 /* Symbols to denote kinds of events. */ | 475 /* Symbols to denote kinds of events. */ |
480 Lisp_Object Qfunction_key; | 476 Lisp_Object Qfunction_key; |
481 Lisp_Object Qmouse_click; | 477 Lisp_Object Qmouse_click; |
482 #if defined (WINDOWSNT) || defined (MAC_OS) | 478 #if defined (WINDOWSNT) |
483 Lisp_Object Qlanguage_change; | 479 Lisp_Object Qlanguage_change; |
484 #endif | 480 #endif |
485 Lisp_Object Qdrag_n_drop; | 481 Lisp_Object Qdrag_n_drop; |
486 Lisp_Object Qsave_session; | 482 Lisp_Object Qsave_session; |
487 #ifdef MAC_OS | |
488 Lisp_Object Qmac_apple_event; | |
489 #endif | |
490 #ifdef HAVE_DBUS | 483 #ifdef HAVE_DBUS |
491 Lisp_Object Qdbus_event; | 484 Lisp_Object Qdbus_event; |
492 #endif | 485 #endif |
493 /* Lisp_Object Qmouse_movement; - also an event header */ | 486 /* Lisp_Object Qmouse_movement; - also an event header */ |
494 | 487 |
4147 a window system. */ | 4140 a window system. */ |
4148 abort (); | 4141 abort (); |
4149 #endif | 4142 #endif |
4150 } | 4143 } |
4151 | 4144 |
4152 #if defined (HAVE_X11) || defined (HAVE_NTGUI) || defined (MAC_OS) \ | 4145 #if defined (HAVE_X11) || defined (HAVE_NTGUI) \ |
4153 || defined (HAVE_NS) | 4146 || defined (HAVE_NS) |
4154 else if (event->kind == DELETE_WINDOW_EVENT) | 4147 else if (event->kind == DELETE_WINDOW_EVENT) |
4155 { | 4148 { |
4156 /* Make an event (delete-frame (FRAME)). */ | 4149 /* Make an event (delete-frame (FRAME)). */ |
4157 obj = Fcons (event->frame_or_window, Qnil); | 4150 obj = Fcons (event->frame_or_window, Qnil); |
4158 obj = Fcons (Qdelete_frame, Fcons (obj, Qnil)); | 4151 obj = Fcons (Qdelete_frame, Fcons (obj, Qnil)); |
4159 kbd_fetch_ptr = event + 1; | 4152 kbd_fetch_ptr = event + 1; |
4160 } | 4153 } |
4161 #endif | 4154 #endif |
4162 #if defined (HAVE_X11) || defined (HAVE_NTGUI) || defined (MAC_OS) \ | 4155 #if defined (HAVE_X11) || defined (HAVE_NTGUI) \ |
4163 || defined (HAVE_NS) | 4156 || defined (HAVE_NS) |
4164 else if (event->kind == ICONIFY_EVENT) | 4157 else if (event->kind == ICONIFY_EVENT) |
4165 { | 4158 { |
4166 /* Make an event (iconify-frame (FRAME)). */ | 4159 /* Make an event (iconify-frame (FRAME)). */ |
4167 obj = Fcons (event->frame_or_window, Qnil); | 4160 obj = Fcons (event->frame_or_window, Qnil); |
4180 { | 4173 { |
4181 /* The value doesn't matter here; only the type is tested. */ | 4174 /* The value doesn't matter here; only the type is tested. */ |
4182 XSETBUFFER (obj, current_buffer); | 4175 XSETBUFFER (obj, current_buffer); |
4183 kbd_fetch_ptr = event + 1; | 4176 kbd_fetch_ptr = event + 1; |
4184 } | 4177 } |
4185 #if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) || defined (MAC_OS) \ | 4178 #if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) \ |
4186 || defined(HAVE_NS) || defined (USE_GTK) | 4179 || defined(HAVE_NS) || defined (USE_GTK) |
4187 else if (event->kind == MENU_BAR_ACTIVATE_EVENT) | 4180 else if (event->kind == MENU_BAR_ACTIVATE_EVENT) |
4188 { | 4181 { |
4189 kbd_fetch_ptr = event + 1; | 4182 kbd_fetch_ptr = event + 1; |
4190 input_pending = readable_events (0); | 4183 input_pending = readable_events (0); |
4191 if (FRAME_LIVE_P (XFRAME (event->frame_or_window))) | 4184 if (FRAME_LIVE_P (XFRAME (event->frame_or_window))) |
4192 x_activate_menubar (XFRAME (event->frame_or_window)); | 4185 x_activate_menubar (XFRAME (event->frame_or_window)); |
4193 } | 4186 } |
4194 #endif | 4187 #endif |
4195 #if defined (WINDOWSNT) || defined (MAC_OS) | 4188 #if defined (WINDOWSNT) |
4196 else if (event->kind == LANGUAGE_CHANGE_EVENT) | 4189 else if (event->kind == LANGUAGE_CHANGE_EVENT) |
4197 { | 4190 { |
4198 #ifdef MAC_OS | |
4199 /* Make an event (language-change (KEY_SCRIPT)). */ | |
4200 obj = Fcons (make_number (event->code), Qnil); | |
4201 #else | |
4202 /* Make an event (language-change (FRAME CHARSET LCID)). */ | 4191 /* Make an event (language-change (FRAME CHARSET LCID)). */ |
4203 obj = Fcons (event->frame_or_window, Qnil); | 4192 obj = Fcons (event->frame_or_window, Qnil); |
4204 #endif | |
4205 obj = Fcons (Qlanguage_change, Fcons (obj, Qnil)); | 4193 obj = Fcons (Qlanguage_change, Fcons (obj, Qnil)); |
4206 kbd_fetch_ptr = event + 1; | 4194 kbd_fetch_ptr = event + 1; |
4207 } | 4195 } |
4208 #endif | 4196 #endif |
4209 else if (event->kind == SAVE_SESSION_EVENT) | 4197 else if (event->kind == SAVE_SESSION_EVENT) |
4290 | 4278 |
4291 if (NILP (obj)) | 4279 if (NILP (obj)) |
4292 { | 4280 { |
4293 obj = make_lispy_event (event); | 4281 obj = make_lispy_event (event); |
4294 | 4282 |
4295 #if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) || defined(MAC_OS) \ | 4283 #if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) \ |
4296 || defined(HAVE_NS) || defined (USE_GTK) | 4284 || defined(HAVE_NS) || defined (USE_GTK) |
4297 /* If this was a menu selection, then set the flag to inhibit | 4285 /* If this was a menu selection, then set the flag to inhibit |
4298 writing to last_nonmenu_event. Don't do this if the event | 4286 writing to last_nonmenu_event. Don't do this if the event |
4299 we're returning is (menu-bar), though; that indicates the | 4287 we're returning is (menu-bar), though; that indicates the |
4300 beginning of the menu sequence, and we might as well leave | 4288 beginning of the menu sequence, and we might as well leave |
6093 Fcons (files, | 6081 Fcons (files, |
6094 Qnil))); | 6082 Qnil))); |
6095 } | 6083 } |
6096 #endif /* HAVE_MOUSE */ | 6084 #endif /* HAVE_MOUSE */ |
6097 | 6085 |
6098 #if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) || defined (MAC_OS) \ | 6086 #if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) \ |
6099 || defined(HAVE_NS) || defined (USE_GTK) | 6087 || defined(HAVE_NS) || defined (USE_GTK) |
6100 case MENU_BAR_EVENT: | 6088 case MENU_BAR_EVENT: |
6101 if (EQ (event->arg, event->frame_or_window)) | 6089 if (EQ (event->arg, event->frame_or_window)) |
6102 /* This is the prefix key. We translate this to | 6090 /* This is the prefix key. We translate this to |
6103 `(menu_bar)' because the code in keyboard.c for menu | 6091 `(menu_bar)' because the code in keyboard.c for menu |
6131 return intern (name); | 6119 return intern (name); |
6132 } | 6120 } |
6133 | 6121 |
6134 case SAVE_SESSION_EVENT: | 6122 case SAVE_SESSION_EVENT: |
6135 return Qsave_session; | 6123 return Qsave_session; |
6136 | |
6137 #ifdef MAC_OS | |
6138 case MAC_APPLE_EVENT: | |
6139 { | |
6140 Lisp_Object spec[2]; | |
6141 | |
6142 spec[0] = event->x; | |
6143 spec[1] = event->y; | |
6144 return Fcons (Qmac_apple_event, | |
6145 Fcons (Fvector (2, spec), | |
6146 Fcons (event->arg, Qnil))); | |
6147 } | |
6148 #endif | |
6149 | 6124 |
6150 #ifdef HAVE_DBUS | 6125 #ifdef HAVE_DBUS |
6151 case DBUS_EVENT: | 6126 case DBUS_EVENT: |
6152 { | 6127 { |
6153 return Fcons (Qdbus_event, event->arg); | 6128 return Fcons (Qdbus_event, event->arg); |
11765 | 11740 |
11766 Qfunction_key = intern ("function-key"); | 11741 Qfunction_key = intern ("function-key"); |
11767 staticpro (&Qfunction_key); | 11742 staticpro (&Qfunction_key); |
11768 Qmouse_click = intern ("mouse-click"); | 11743 Qmouse_click = intern ("mouse-click"); |
11769 staticpro (&Qmouse_click); | 11744 staticpro (&Qmouse_click); |
11770 #if defined (WINDOWSNT) || defined (MAC_OS) | 11745 #if defined (WINDOWSNT) |
11771 Qlanguage_change = intern ("language-change"); | 11746 Qlanguage_change = intern ("language-change"); |
11772 staticpro (&Qlanguage_change); | 11747 staticpro (&Qlanguage_change); |
11773 #endif | 11748 #endif |
11774 Qdrag_n_drop = intern ("drag-n-drop"); | 11749 Qdrag_n_drop = intern ("drag-n-drop"); |
11775 staticpro (&Qdrag_n_drop); | 11750 staticpro (&Qdrag_n_drop); |
11776 | 11751 |
11777 Qsave_session = intern ("save-session"); | 11752 Qsave_session = intern ("save-session"); |
11778 staticpro (&Qsave_session); | 11753 staticpro (&Qsave_session); |
11779 | |
11780 #ifdef MAC_OS | |
11781 Qmac_apple_event = intern ("mac-apple-event"); | |
11782 staticpro (&Qmac_apple_event); | |
11783 #endif | |
11784 | 11754 |
11785 #ifdef HAVE_DBUS | 11755 #ifdef HAVE_DBUS |
11786 Qdbus_event = intern ("dbus-event"); | 11756 Qdbus_event = intern ("dbus-event"); |
11787 staticpro (&Qdbus_event); | 11757 staticpro (&Qdbus_event); |
11788 #endif | 11758 #endif |