Mercurial > emacs
comparison src/macterm.c @ 71178:d098ef877d70
(tsm_document_id) [USE_MAC_TSM]: New variable.
(Qtext_input, Qupdate_active_input_area, Qunicode_for_key_event)
[USE_MAC_TSM]: Likewise.
(syms_of_macterm) [USE_MAC_TSM]: Intern and staticpro them.
(Qbefore_string) [USE_MAC_TSM]: Add extern.
(do_app_resume, do_app_suspend) [USE_MAC_TSM]: Call
ActivateTSMDocument/DeactivateTSMDocument.
(mac_store_event_ref_as_apple_event): Call mac_post_mouse_moved_event.
(mac_handle_window_event) [USE_MAC_TSM]: Handle
kEventWindowFocusAcquired/kEventWindowFocusRelinquish.
(mac_handle_text_input_event) [USE_MAC_TSM]: New function.
(install_window_handler) [USE_MAC_TSM]: Install it. Register
kEventWindowFocusAcquired/kEventWindowFocusRelinquish.
(keycode_to_xkeysym_table): Add entry for f16.
(XTread_socket) [USE_MAC_TSM]: Set/reset read_socket_inev
before/after passing keystroke event to toolbox dispatcher.
(init_tsm) [USE_MAC_TSM]: New function.
(mac_initialize) [USE_MAC_TSM]: Call it.
(Vmac_ts_active_input_overlay) [USE_MAC_TSM]: New defvar.
author | YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> |
---|---|
date | Sat, 03 Jun 2006 02:34:11 +0000 |
parents | a40a279936e8 |
children | 11061a67f09a |
comparison
equal
deleted
inserted
replaced
71177:cd3f4a38aae5 | 71178:d098ef877d70 |
---|---|
8504 #endif | 8504 #endif |
8505 #if USE_MAC_FONT_PANEL | 8505 #if USE_MAC_FONT_PANEL |
8506 extern Lisp_Object Qfont; | 8506 extern Lisp_Object Qfont; |
8507 static Lisp_Object Qpanel_closed, Qselection; | 8507 static Lisp_Object Qpanel_closed, Qselection; |
8508 #endif | 8508 #endif |
8509 #if USE_MAC_TSM | |
8510 static TSMDocumentID tsm_document_id; | |
8511 static Lisp_Object Qtext_input; | |
8512 static Lisp_Object Qupdate_active_input_area, Qunicode_for_key_event; | |
8513 static Lisp_Object Vmac_ts_active_input_overlay; | |
8514 extern Lisp_Object Qbefore_string; | |
8515 #endif | |
8509 #endif | 8516 #endif |
8510 extern int mac_ready_for_apple_events; | 8517 extern int mac_ready_for_apple_events; |
8511 extern Lisp_Object Qundefined; | 8518 extern Lisp_Object Qundefined; |
8512 extern void init_apple_event_handler P_ ((void)); | 8519 extern void init_apple_event_handler P_ ((void)); |
8513 extern void mac_find_apple_event_spec P_ ((AEEventClass, AEEventID, | 8520 extern void mac_find_apple_event_spec P_ ((AEEventClass, AEEventID, |
8855 } | 8862 } |
8856 | 8863 |
8857 static void | 8864 static void |
8858 do_app_resume () | 8865 do_app_resume () |
8859 { | 8866 { |
8860 /* Window-activate events will do the job. */ | 8867 #if USE_MAC_TSM |
8868 ActivateTSMDocument (tsm_document_id); | |
8869 #endif | |
8861 } | 8870 } |
8862 | 8871 |
8863 static void | 8872 static void |
8864 do_app_suspend () | 8873 do_app_suspend () |
8865 { | 8874 { |
8866 /* Window-deactivate events will do the job. */ | 8875 #if USE_MAC_TSM |
8876 DeactivateTSMDocument (tsm_document_id); | |
8877 #endif | |
8867 } | 8878 } |
8868 | 8879 |
8869 | 8880 |
8870 static void | 8881 static void |
8871 do_apple_menu (SInt16 menu_item) | 8882 do_apple_menu (SInt16 menu_item) |
9121 &apple_event); | 9132 &apple_event); |
9122 if (err == noErr) | 9133 if (err == noErr) |
9123 { | 9134 { |
9124 mac_store_apple_event (class_key, id_key, &apple_event); | 9135 mac_store_apple_event (class_key, id_key, &apple_event); |
9125 AEDisposeDesc (&apple_event); | 9136 AEDisposeDesc (&apple_event); |
9137 /* Post a harmless event so as to wake up from | |
9138 ReceiveNextEvent. */ | |
9139 mac_post_mouse_moved_event (); | |
9126 } | 9140 } |
9127 } | 9141 } |
9128 } | 9142 } |
9129 | 9143 |
9130 return err; | 9144 return err; |
9308 Qwindow, | 9322 Qwindow, |
9309 Qtoolbar_switch_mode, | 9323 Qtoolbar_switch_mode, |
9310 event, num_params, | 9324 event, num_params, |
9311 names, types); | 9325 names, types); |
9312 } | 9326 } |
9327 return err == noErr ? noErr : result; | |
9328 #endif | |
9329 | |
9330 #if USE_MAC_TSM | |
9331 case kEventWindowFocusAcquired: | |
9332 result = CallNextEventHandler (next_handler, event); | |
9333 err = ActivateTSMDocument (tsm_document_id); | |
9334 return err == noErr ? noErr : result; | |
9335 | |
9336 case kEventWindowFocusRelinquish: | |
9337 result = CallNextEventHandler (next_handler, event); | |
9338 err = DeactivateTSMDocument (tsm_document_id); | |
9313 return err == noErr ? noErr : result; | 9339 return err == noErr ? noErr : result; |
9314 #endif | 9340 #endif |
9315 } | 9341 } |
9316 | 9342 |
9317 return eventNotHandledErr; | 9343 return eventNotHandledErr; |
9436 | 9462 |
9437 return err == noErr ? noErr : eventNotHandledErr; | 9463 return err == noErr ? noErr : eventNotHandledErr; |
9438 } | 9464 } |
9439 #endif | 9465 #endif |
9440 | 9466 |
9467 #if USE_MAC_TSM | |
9468 static pascal OSStatus | |
9469 mac_handle_text_input_event (next_handler, event, data) | |
9470 EventHandlerCallRef next_handler; | |
9471 EventRef event; | |
9472 void *data; | |
9473 { | |
9474 OSStatus result, err = noErr; | |
9475 Lisp_Object id_key = Qnil; | |
9476 int num_params; | |
9477 EventParamName *names; | |
9478 EventParamType *types; | |
9479 static UInt32 seqno_uaia = 0; | |
9480 static EventParamName names_uaia[] = | |
9481 {kEventParamTextInputSendComponentInstance, | |
9482 kEventParamTextInputSendRefCon, | |
9483 kEventParamTextInputSendSLRec, | |
9484 kEventParamTextInputSendFixLen, | |
9485 kEventParamTextInputSendText, | |
9486 kEventParamTextInputSendUpdateRng, | |
9487 kEventParamTextInputSendHiliteRng, | |
9488 kEventParamTextInputSendClauseRng, | |
9489 kEventParamTextInputSendPinRng, | |
9490 kEventParamTextInputSendTextServiceEncoding, | |
9491 kEventParamTextInputSendTextServiceMacEncoding, | |
9492 EVENT_PARAM_TEXT_INPUT_SEQUENCE_NUMBER}; | |
9493 static EventParamType types_uaia[] = | |
9494 {typeComponentInstance, | |
9495 typeLongInteger, | |
9496 typeIntlWritingCode, | |
9497 typeLongInteger, | |
9498 typeUnicodeText, | |
9499 typeTextRangeArray, | |
9500 typeTextRangeArray, | |
9501 typeOffsetArray, | |
9502 typeTextRange, | |
9503 typeUInt32, | |
9504 typeUInt32, | |
9505 typeUInt32}; | |
9506 static EventParamName names_ufke[] = | |
9507 {kEventParamTextInputSendComponentInstance, | |
9508 kEventParamTextInputSendRefCon, | |
9509 kEventParamTextInputSendSLRec, | |
9510 kEventParamTextInputSendText}; | |
9511 static EventParamType types_ufke[] = | |
9512 {typeComponentInstance, | |
9513 typeLongInteger, | |
9514 typeIntlWritingCode, | |
9515 typeUnicodeText}; | |
9516 | |
9517 result = CallNextEventHandler (next_handler, event); | |
9518 | |
9519 switch (GetEventKind (event)) | |
9520 { | |
9521 case kEventTextInputUpdateActiveInputArea: | |
9522 id_key = Qupdate_active_input_area; | |
9523 num_params = sizeof (names_uaia) / sizeof (names_uaia[0]); | |
9524 names = names_uaia; | |
9525 types = types_uaia; | |
9526 SetEventParameter (event, EVENT_PARAM_TEXT_INPUT_SEQUENCE_NUMBER, | |
9527 typeUInt32, sizeof (UInt32), &seqno_uaia); | |
9528 seqno_uaia++; | |
9529 break; | |
9530 | |
9531 case kEventTextInputUnicodeForKeyEvent: | |
9532 { | |
9533 EventRef kbd_event; | |
9534 UInt32 actual_size, modifiers, mapped_modifiers; | |
9535 UniChar code; | |
9536 | |
9537 err = GetEventParameter (event, kEventParamTextInputSendKeyboardEvent, | |
9538 typeEventRef, NULL, sizeof (EventRef), NULL, | |
9539 &kbd_event); | |
9540 if (err == noErr) | |
9541 err = GetEventParameter (kbd_event, kEventParamKeyModifiers, | |
9542 typeUInt32, NULL, | |
9543 sizeof (UInt32), NULL, &modifiers); | |
9544 if (err == noErr) | |
9545 { | |
9546 mapped_modifiers = | |
9547 (NILP (Vmac_control_modifier) ? 0 : controlKey) | |
9548 | (NILP (Vmac_option_modifier) ? 0 : optionKey) | |
9549 | (NILP (Vmac_command_modifier) ? 0 : cmdKey); | |
9550 #ifdef MAC_OSX | |
9551 mapped_modifiers |= | |
9552 (NILP (Vmac_function_modifier) ? 0 : kEventKeyModifierFnMask); | |
9553 #endif | |
9554 if (modifiers & mapped_modifiers) | |
9555 /* There're mapped modifier keys. Process it in | |
9556 XTread_socket. */ | |
9557 return eventNotHandledErr; | |
9558 } | |
9559 if (err == noErr) | |
9560 err = GetEventParameter (kbd_event, kEventParamKeyUnicodes, | |
9561 typeUnicodeText, NULL, 0, &actual_size, | |
9562 NULL); | |
9563 if (err == noErr) | |
9564 { | |
9565 if (actual_size == sizeof (UniChar)) | |
9566 err = GetEventParameter (kbd_event, kEventParamKeyUnicodes, | |
9567 typeUnicodeText, NULL, | |
9568 sizeof (UniChar), NULL, &code); | |
9569 if (err == noErr && code < 0x80) | |
9570 { | |
9571 /* ASCII character. Process it in XTread_socket. */ | |
9572 if (read_socket_inev && code >= 0x20) | |
9573 { | |
9574 struct frame *f = mac_focus_frame (&one_mac_display_info); | |
9575 | |
9576 read_socket_inev->kind = ASCII_KEYSTROKE_EVENT; | |
9577 read_socket_inev->code = code; | |
9578 read_socket_inev->modifiers = | |
9579 (extra_keyboard_modifiers | |
9580 & (meta_modifier | alt_modifier | |
9581 | hyper_modifier | super_modifier)); | |
9582 XSETFRAME (read_socket_inev->frame_or_window, f); | |
9583 } | |
9584 return eventNotHandledErr; | |
9585 } | |
9586 } | |
9587 } | |
9588 /* Non-ASCII keystrokes without mapped modifiers are processed | |
9589 at the Lisp level. */ | |
9590 id_key = Qunicode_for_key_event; | |
9591 num_params = sizeof (names_ufke) / sizeof (names_ufke[0]); | |
9592 names = names_ufke; | |
9593 types = types_ufke; | |
9594 break; | |
9595 | |
9596 case kEventTextInputOffsetToPos: | |
9597 { | |
9598 struct frame *f; | |
9599 struct window *w; | |
9600 Point p; | |
9601 | |
9602 if (!OVERLAYP (Vmac_ts_active_input_overlay)) | |
9603 return eventNotHandledErr; | |
9604 | |
9605 /* Strictly speaking, this is not always correct because | |
9606 previous events may change some states about display. */ | |
9607 if (NILP (Foverlay_get (Vmac_ts_active_input_overlay, Qbefore_string))) | |
9608 { | |
9609 /* Active input area is displayed in the echo area. */ | |
9610 w = XWINDOW (echo_area_window); | |
9611 f = WINDOW_XFRAME (w); | |
9612 } | |
9613 else | |
9614 { | |
9615 /* Active input area is displayed around the current point. */ | |
9616 f = SELECTED_FRAME (); | |
9617 w = XWINDOW (f->selected_window); | |
9618 } | |
9619 | |
9620 p.h = (WINDOW_TO_FRAME_PIXEL_X (w, w->cursor.x) | |
9621 + WINDOW_LEFT_FRINGE_WIDTH (w)); | |
9622 p.v = (WINDOW_TO_FRAME_PIXEL_Y (w, w->cursor.y) | |
9623 + FONT_BASE (FRAME_FONT (f))); | |
9624 SetPortWindowPort (FRAME_MAC_WINDOW (f)); | |
9625 LocalToGlobal (&p); | |
9626 err = SetEventParameter (event, kEventParamTextInputReplyPoint, | |
9627 typeQDPoint, sizeof (typeQDPoint), &p); | |
9628 } | |
9629 break; | |
9630 | |
9631 default: | |
9632 abort (); | |
9633 } | |
9634 | |
9635 if (!NILP (id_key)) | |
9636 err = mac_store_event_ref_as_apple_event (0, 0, Qtext_input, id_key, | |
9637 event, num_params, | |
9638 names, types); | |
9639 | |
9640 return err == noErr ? noErr : result; | |
9641 } | |
9642 #endif | |
9643 | |
9441 #ifdef MAC_OSX | 9644 #ifdef MAC_OSX |
9442 OSStatus | 9645 OSStatus |
9443 mac_store_service_event (event) | 9646 mac_store_service_event (event) |
9444 EventRef event; | 9647 EventRef event; |
9445 { | 9648 { |
9497 {kEventClassWindow, kEventWindowExpanded}, | 9700 {kEventClassWindow, kEventWindowExpanded}, |
9498 {kEventClassWindow, kEventWindowCollapsed}, | 9701 {kEventClassWindow, kEventWindowCollapsed}, |
9499 #ifdef MAC_OSX | 9702 #ifdef MAC_OSX |
9500 {kEventClassWindow, kEventWindowToolbarSwitchMode}, | 9703 {kEventClassWindow, kEventWindowToolbarSwitchMode}, |
9501 #endif | 9704 #endif |
9705 #if USE_MAC_TSM | |
9706 {kEventClassWindow, kEventWindowFocusAcquired}, | |
9707 {kEventClassWindow, kEventWindowFocusRelinquish}, | |
9708 #endif | |
9502 }; | 9709 }; |
9503 EventTypeSpec specs_mouse[] = {{kEventClassMouse, kEventMouseWheelMoved}}; | 9710 EventTypeSpec specs_mouse[] = {{kEventClassMouse, kEventMouseWheelMoved}}; |
9504 static EventHandlerUPP handle_window_eventUPP = NULL; | 9711 static EventHandlerUPP handle_window_eventUPP = NULL; |
9505 static EventHandlerUPP handle_mouse_eventUPP = NULL; | 9712 static EventHandlerUPP handle_mouse_eventUPP = NULL; |
9506 #if USE_MAC_FONT_PANEL | 9713 #if USE_MAC_FONT_PANEL |
9507 EventTypeSpec specs_font[] = {{kEventClassFont, kEventFontPanelClosed}, | 9714 EventTypeSpec specs_font[] = {{kEventClassFont, kEventFontPanelClosed}, |
9508 {kEventClassFont, kEventFontSelection}}; | 9715 {kEventClassFont, kEventFontSelection}}; |
9509 static EventHandlerUPP handle_font_eventUPP = NULL; | 9716 static EventHandlerUPP handle_font_eventUPP = NULL; |
9510 #endif | 9717 #endif |
9718 #if USE_MAC_TSM | |
9719 EventTypeSpec specs_text_input[] = | |
9720 {{kEventClassTextInput, kEventTextInputUpdateActiveInputArea}, | |
9721 {kEventClassTextInput, kEventTextInputUnicodeForKeyEvent}, | |
9722 {kEventClassTextInput, kEventTextInputOffsetToPos}}; | |
9723 static EventHandlerUPP handle_text_input_eventUPP = NULL; | |
9724 #endif | |
9511 | 9725 |
9512 if (handle_window_eventUPP == NULL) | 9726 if (handle_window_eventUPP == NULL) |
9513 handle_window_eventUPP = NewEventHandlerUPP (mac_handle_window_event); | 9727 handle_window_eventUPP = NewEventHandlerUPP (mac_handle_window_event); |
9514 if (handle_mouse_eventUPP == NULL) | 9728 if (handle_mouse_eventUPP == NULL) |
9515 handle_mouse_eventUPP = NewEventHandlerUPP (mac_handle_mouse_event); | 9729 handle_mouse_eventUPP = NewEventHandlerUPP (mac_handle_mouse_event); |
9516 #if USE_MAC_FONT_PANEL | 9730 #if USE_MAC_FONT_PANEL |
9517 if (handle_font_eventUPP == NULL) | 9731 if (handle_font_eventUPP == NULL) |
9518 handle_font_eventUPP = NewEventHandlerUPP (mac_handle_font_event); | 9732 handle_font_eventUPP = NewEventHandlerUPP (mac_handle_font_event); |
9733 #endif | |
9734 #if USE_MAC_TSM | |
9735 if (handle_text_input_eventUPP == NULL) | |
9736 handle_text_input_eventUPP = | |
9737 NewEventHandlerUPP (mac_handle_text_input_event); | |
9519 #endif | 9738 #endif |
9520 err = InstallWindowEventHandler (window, handle_window_eventUPP, | 9739 err = InstallWindowEventHandler (window, handle_window_eventUPP, |
9521 GetEventTypeCount (specs_window), | 9740 GetEventTypeCount (specs_window), |
9522 specs_window, NULL, NULL); | 9741 specs_window, NULL, NULL); |
9523 if (err == noErr) | 9742 if (err == noErr) |
9527 #if USE_MAC_FONT_PANEL | 9746 #if USE_MAC_FONT_PANEL |
9528 if (err == noErr) | 9747 if (err == noErr) |
9529 err = InstallWindowEventHandler (window, handle_font_eventUPP, | 9748 err = InstallWindowEventHandler (window, handle_font_eventUPP, |
9530 GetEventTypeCount (specs_font), | 9749 GetEventTypeCount (specs_font), |
9531 specs_font, NULL, NULL); | 9750 specs_font, NULL, NULL); |
9751 #endif | |
9752 #if USE_MAC_TSM | |
9753 if (err == noErr) | |
9754 err = InstallWindowEventHandler (window, handle_text_input_eventUPP, | |
9755 GetEventTypeCount (specs_text_input), | |
9756 specs_text_input, window, NULL); | |
9532 #endif | 9757 #endif |
9533 #endif | 9758 #endif |
9534 if (err == noErr) | 9759 if (err == noErr) |
9535 err = install_drag_handler (window); | 9760 err = install_drag_handler (window); |
9536 | 9761 |
9653 /*0x58*/ 0xb6 /*kp-6*/, 0xb7 /*kp-7*/, 0, 0xb8 /*kp-8*/, | 9878 /*0x58*/ 0xb6 /*kp-6*/, 0xb7 /*kp-7*/, 0, 0xb8 /*kp-8*/, |
9654 /*0x5C*/ 0xb9 /*kp-9*/, 0, 0, 0, | 9879 /*0x5C*/ 0xb9 /*kp-9*/, 0, 0, 0, |
9655 | 9880 |
9656 /*0x60*/ 0xc2 /*f5*/, 0xc3 /*f6*/, 0xc4 /*f7*/, 0xc0 /*f3*/, | 9881 /*0x60*/ 0xc2 /*f5*/, 0xc3 /*f6*/, 0xc4 /*f7*/, 0xc0 /*f3*/, |
9657 /*0x64*/ 0xc5 /*f8*/, 0xc6 /*f9*/, 0, 0xc8 /*f11*/, | 9882 /*0x64*/ 0xc5 /*f8*/, 0xc6 /*f9*/, 0, 0xc8 /*f11*/, |
9658 /*0x68*/ 0, 0xca /*f13*/, 0, 0xcb /*f14*/, | 9883 /*0x68*/ 0, 0xca /*f13*/, 0xcd /*f16*/, 0xcb /*f14*/, |
9659 /*0x6C*/ 0, 0xc7 /*f10*/, 0x0a /*fn+enter on laptops*/, 0xc9 /*f12*/, | 9884 /*0x6C*/ 0, 0xc7 /*f10*/, 0x0a /*fn+enter on laptops*/, 0xc9 /*f12*/, |
9660 | 9885 |
9661 /*0x70*/ 0, 0xcc /*f15*/, 0x6a /*help*/, 0x50 /*home*/, | 9886 /*0x70*/ 0, 0xcc /*f15*/, 0x6a /*help*/, 0x50 /*home*/, |
9662 /*0x74*/ 0x55 /*pgup*/, 0xff /*delete*/, 0xc1 /*f4*/, 0x57 /*end*/, | 9887 /*0x74*/ 0x55 /*pgup*/, 0xff /*delete*/, 0xc1 /*f4*/, 0x57 /*end*/, |
9663 /*0x78*/ 0xbf /*f2*/, 0x56 /*pgdown*/, 0xbe /*f1*/, 0x51 /*left*/, | 9888 /*0x78*/ 0xbf /*f2*/, 0x56 /*pgdown*/, 0xbe /*f1*/, 0x51 /*left*/, |
10361 "eventNotHandledErr" and we can process it | 10586 "eventNotHandledErr" and we can process it |
10362 normally. */ | 10587 normally. */ |
10363 if (!(mapped_modifiers | 10588 if (!(mapped_modifiers |
10364 & ~(mac_pass_command_to_system ? cmdKey : 0) | 10589 & ~(mac_pass_command_to_system ? cmdKey : 0) |
10365 & ~(mac_pass_control_to_system ? controlKey : 0))) | 10590 & ~(mac_pass_control_to_system ? controlKey : 0))) |
10366 if (SendEventToEventTarget (eventRef, toolbox_dispatcher) | 10591 { |
10367 != eventNotHandledErr) | 10592 OSStatus err; |
10593 | |
10594 read_socket_inev = &inev; | |
10595 err = SendEventToEventTarget (eventRef, toolbox_dispatcher); | |
10596 read_socket_inev = NULL; | |
10597 if (err != eventNotHandledErr) | |
10368 break; | 10598 break; |
10599 } | |
10369 #endif | 10600 #endif |
10370 if (er.what == keyUp) | 10601 if (er.what == keyUp) |
10371 break; | 10602 break; |
10372 | 10603 |
10373 ObscureCursor (); | 10604 ObscureCursor (); |
10393 event.timestamp = timestamp; | 10624 event.timestamp = timestamp; |
10394 kbd_buffer_store_event (&event); | 10625 kbd_buffer_store_event (&event); |
10395 count++; | 10626 count++; |
10396 last_key_script = current_key_script; | 10627 last_key_script = current_key_script; |
10397 } | 10628 } |
10629 | |
10630 #if USE_MAC_TSM | |
10631 if (inev.kind != NO_EVENT) | |
10632 break; | |
10633 #endif | |
10398 | 10634 |
10399 #ifdef MAC_OSX | 10635 #ifdef MAC_OSX |
10400 if (mapped_modifiers & kEventKeyModifierFnMask | 10636 if (mapped_modifiers & kEventKeyModifierFnMask |
10401 && keycode <= 0x7f | 10637 && keycode <= 0x7f |
10402 && fn_keycode_to_keycode_table[keycode]) | 10638 && fn_keycode_to_keycode_table[keycode]) |
11002 SetMenuItemCommandID (GetMenuHandle (M_APPLE), I_ABOUT, kHICommandAbout); | 11238 SetMenuItemCommandID (GetMenuHandle (M_APPLE), I_ABOUT, kHICommandAbout); |
11003 #endif | 11239 #endif |
11004 #endif | 11240 #endif |
11005 } | 11241 } |
11006 | 11242 |
11243 #if USE_MAC_TSM | |
11244 static void | |
11245 init_tsm () | |
11246 { | |
11247 static InterfaceTypeList types = {kUnicodeDocument}; | |
11248 | |
11249 NewTSMDocument (sizeof (types) / sizeof (types[0]), types, | |
11250 &tsm_document_id, 0); | |
11251 } | |
11252 #endif | |
11007 | 11253 |
11008 /* Set up use of X before we make the first connection. */ | 11254 /* Set up use of X before we make the first connection. */ |
11009 | 11255 |
11010 extern frame_parm_handler mac_frame_parm_handlers[]; | 11256 extern frame_parm_handler mac_frame_parm_handlers[]; |
11011 | 11257 |
11096 #endif /* MAC_OSX */ | 11342 #endif /* MAC_OSX */ |
11097 | 11343 |
11098 init_command_handler (); | 11344 init_command_handler (); |
11099 | 11345 |
11100 init_menu_bar (); | 11346 init_menu_bar (); |
11347 | |
11348 #if USE_MAC_TSM | |
11349 init_tsm (); | |
11350 #endif | |
11101 #endif /* USE_CARBON_EVENTS */ | 11351 #endif /* USE_CARBON_EVENTS */ |
11102 | 11352 |
11103 #ifdef MAC_OSX | 11353 #ifdef MAC_OSX |
11104 init_coercion_handler (); | 11354 init_coercion_handler (); |
11105 | 11355 |
11151 #endif | 11401 #endif |
11152 | 11402 |
11153 Qservice = intern ("service"); staticpro (&Qservice); | 11403 Qservice = intern ("service"); staticpro (&Qservice); |
11154 Qpaste = intern ("paste"); staticpro (&Qpaste); | 11404 Qpaste = intern ("paste"); staticpro (&Qpaste); |
11155 Qperform = intern ("perform"); staticpro (&Qperform); | 11405 Qperform = intern ("perform"); staticpro (&Qperform); |
11406 #endif | |
11407 #if USE_MAC_TSM | |
11408 Qtext_input = intern ("text-input"); staticpro (&Qtext_input); | |
11409 Qupdate_active_input_area = intern ("update-active-input-area"); | |
11410 staticpro (&Qupdate_active_input_area); | |
11411 Qunicode_for_key_event = intern ("unicode-for-key-event"); | |
11412 staticpro (&Qunicode_for_key_event); | |
11156 #endif | 11413 #endif |
11157 #endif | 11414 #endif |
11158 | 11415 |
11159 #ifdef MAC_OSX | 11416 #ifdef MAC_OSX |
11160 Fprovide (intern ("mac-carbon"), Qnil); | 11417 Fprovide (intern ("mac-carbon"), Qnil); |
11294 make_hash_table (Qequal, make_number (DEFAULT_HASH_SIZE), | 11551 make_hash_table (Qequal, make_number (DEFAULT_HASH_SIZE), |
11295 make_float (DEFAULT_REHASH_SIZE), | 11552 make_float (DEFAULT_REHASH_SIZE), |
11296 make_float (DEFAULT_REHASH_THRESHOLD), | 11553 make_float (DEFAULT_REHASH_THRESHOLD), |
11297 Qnil, Qnil, Qnil); | 11554 Qnil, Qnil, Qnil); |
11298 #endif | 11555 #endif |
11556 #if USE_MAC_TSM | |
11557 DEFVAR_LISP ("mac-ts-active-input-overlay", &Vmac_ts_active_input_overlay, | |
11558 doc: /* Overlay used to display Mac TSM active input area. */); | |
11559 Vmac_ts_active_input_overlay = Qnil; | |
11560 #endif | |
11299 } | 11561 } |
11300 | 11562 |
11301 /* arch-tag: f2259165-4454-4c04-a029-a133c8af7b5b | 11563 /* arch-tag: f2259165-4454-4c04-a029-a133c8af7b5b |
11302 (do not change this comment) */ | 11564 (do not change this comment) */ |