comparison src/macterm.c @ 83423:b64b7e867d0a

Merged from miles@gnu.org--gnu-2005 (patch 677) Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-677 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-463
author Karoly Lorentey <lorentey@elte.hu>
date Mon, 26 Dec 2005 03:16:59 +0000
parents fe870a866ce7 ea51bc4acb2e
children d0eee3282e6b
comparison
equal deleted inserted replaced
83422:1f5d64c4df6f 83423:b64b7e867d0a
91 91
92 /* Non-nil means Emacs uses toolkit scroll bars. */ 92 /* Non-nil means Emacs uses toolkit scroll bars. */
93 93
94 Lisp_Object Vx_toolkit_scroll_bars; 94 Lisp_Object Vx_toolkit_scroll_bars;
95 95
96 /* If Non-nil, the text will be rendered using Core Graphics text rendering which may anti-alias the text. */ 96 /* If non-zero, the text will be rendered using Core Graphics text
97 Lisp_Object Vmac_use_core_graphics; 97 rendering which may anti-alias the text. */
98 int mac_use_core_graphics;
98 99
99 100
100 /* Non-zero means that a HELP_EVENT has been generated since Emacs 101 /* Non-zero means that a HELP_EVENT has been generated since Emacs
101 start. */ 102 start. */
102 103
103 static int any_help_event_p; 104 static int any_help_event_p;
104 105
105 /* Last window where we saw the mouse. Used by mouse-autoselect-window. */ 106 /* Last window where we saw the mouse. Used by mouse-autoselect-window. */
106 static Lisp_Object last_window; 107 static Lisp_Object last_window;
108
109 /* Non-zero means make use of UNDERLINE_POSITION font properties.
110 (Not yet supported.) */
111 int x_use_underline_position_properties;
107 112
108 /* This is a chain of structures for all the X displays currently in 113 /* This is a chain of structures for all the X displays currently in
109 use. */ 114 use. */
110 115
111 struct x_display_info *x_display_list; 116 struct x_display_info *x_display_list;
197 202
198 extern EMACS_INT extra_keyboard_modifiers; 203 extern EMACS_INT extra_keyboard_modifiers;
199 204
200 /* The keysyms to use for the various modifiers. */ 205 /* The keysyms to use for the various modifiers. */
201 206
202 static Lisp_Object Qalt, Qhyper, Qsuper, Qcontrol, 207 static Lisp_Object Qalt, Qhyper, Qsuper, Qcontrol, Qmeta, Qmodifier_value;
203 Qmeta, Qmodifier_value;
204 208
205 extern int inhibit_window_system; 209 extern int inhibit_window_system;
206 210
207 #if __MRC__ && !TARGET_API_MAC_CARBON 211 #if __MRC__ && !TARGET_API_MAC_CARBON
208 QDGlobals qd; /* QuickDraw global information structure. */ 212 QDGlobals qd; /* QuickDraw global information structure. */
685 char *buf; 689 char *buf;
686 int nchars, mode, bytes_per_char; 690 int nchars, mode, bytes_per_char;
687 { 691 {
688 #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1020 692 #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1020
689 UInt32 textFlags, savedFlags; 693 UInt32 textFlags, savedFlags;
690 if (!NILP(Vmac_use_core_graphics)) { 694 if (mac_use_core_graphics) {
691 textFlags = kQDUseCGTextRendering; 695 textFlags = kQDUseCGTextRendering;
692 savedFlags = SwapQDTextFlags(textFlags); 696 savedFlags = SwapQDTextFlags(textFlags);
693 } 697 }
694 #endif 698 #endif
695 699
721 GC_FONT (gc)->mac_style, 725 GC_FONT (gc)->mac_style,
722 &text_layout); 726 &text_layout);
723 if (err == noErr) 727 if (err == noErr)
724 { 728 {
725 #ifdef MAC_OSX 729 #ifdef MAC_OSX
726 if (NILP (Vmac_use_core_graphics)) 730 if (!mac_use_core_graphics)
727 { 731 {
728 #endif 732 #endif
729 mac_begin_clip (GC_CLIP_REGION (gc)); 733 mac_begin_clip (GC_CLIP_REGION (gc));
730 MoveTo (x, y); 734 MoveTo (x, y);
731 ATSUDrawText (text_layout, 735 ATSUDrawText (text_layout,
800 #endif 804 #endif
801 805
802 if (mode != srcOr) 806 if (mode != srcOr)
803 RGBBackColor (GC_BACK_COLOR (FRAME_NORMAL_GC (f))); 807 RGBBackColor (GC_BACK_COLOR (FRAME_NORMAL_GC (f)));
804 #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1020 808 #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1020
805 if (!NILP(Vmac_use_core_graphics)) 809 if (mac_use_core_graphics)
806 SwapQDTextFlags(savedFlags); 810 SwapQDTextFlags(savedFlags);
807 #endif 811 #endif
808 } 812 }
809 813
810 814
893 int i; 897 int i;
894 CGContextRef context; 898 CGContextRef context;
895 CGGlyph *glyphs; 899 CGGlyph *glyphs;
896 CGSize *advances; 900 CGSize *advances;
897 901
898 if (NILP (Vmac_use_core_graphics) || GC_FONT (gc)->cg_font == NULL) 902 if (!mac_use_core_graphics || GC_FONT (gc)->cg_font == NULL)
899 return 0; 903 return 0;
900 904
901 port = GetWindowPort (FRAME_MAC_WINDOW (f)); 905 port = GetWindowPort (FRAME_MAC_WINDOW (f));
902 port_height = FRAME_PIXEL_HEIGHT (f); 906 port_height = FRAME_PIXEL_HEIGHT (f);
903 gx = x; 907 gx = x;
8107 /* True if the option and command modifiers should be used to emulate 8111 /* True if the option and command modifiers should be used to emulate
8108 a three button mouse */ 8112 a three button mouse */
8109 Lisp_Object Vmac_emulate_three_button_mouse; 8113 Lisp_Object Vmac_emulate_three_button_mouse;
8110 8114
8111 #if USE_CARBON_EVENTS 8115 #if USE_CARBON_EVENTS
8112 /* True if the mouse wheel button (i.e. button 4) should map to 8116 /* Non-zero if the mouse wheel button (i.e. button 4) should map to
8113 mouse-2, instead of mouse-3. */ 8117 mouse-2, instead of mouse-3. */
8114 Lisp_Object Vmac_wheel_button_is_mouse_2; 8118 int mac_wheel_button_is_mouse_2;
8115 8119
8116 /* If Non-nil, the Mac "Command" key is passed on to the Mac Toolbox 8120 /* If non-zero, the Mac "Command" key is passed on to the Mac Toolbox
8117 for processing before Emacs sees it. */ 8121 for processing before Emacs sees it. */
8118 Lisp_Object Vmac_pass_command_to_system; 8122 int mac_pass_command_to_system;
8119 8123
8120 /* If Non-nil, the Mac "Control" key is passed on to the Mac Toolbox 8124 /* If non-zero, the Mac "Control" key is passed on to the Mac Toolbox
8121 for processing before Emacs sees it. */ 8125 for processing before Emacs sees it. */
8122 Lisp_Object Vmac_pass_control_to_system; 8126 int mac_pass_control_to_system;
8123 #endif 8127 #endif
8124 8128
8125 /* Points to the variable `inev' in the function XTread_socket. It is 8129 /* Points to the variable `inev' in the function XTread_socket. It is
8126 used for passing an input event to the function back from 8130 used for passing an input event to the function back from
8127 Carbon/Apple event handlers. */ 8131 Carbon/Apple event handlers. */
8173 #endif 8177 #endif
8174 { 8178 {
8175 unsigned int result = 0; 8179 unsigned int result = 0;
8176 if (mods & shiftKey) 8180 if (mods & shiftKey)
8177 result |= shift_modifier; 8181 result |= shift_modifier;
8178
8179
8180 8182
8181 /* Deactivated to simplify configuration: 8183 /* Deactivated to simplify configuration:
8182 if Vmac_option_modifier is non-NIL, we fully process the Option 8184 if Vmac_option_modifier is non-NIL, we fully process the Option
8183 key. Otherwise, we only process it if an additional Ctrl or Command 8185 key. Otherwise, we only process it if an additional Ctrl or Command
8184 is pressed. That way the system may convert the character to a 8186 is pressed. That way the system may convert the character to a
8263 GetEventParameter (ref, kEventParamKeyModifiers, typeUInt32, NULL, 8265 GetEventParameter (ref, kEventParamKeyModifiers, typeUInt32, NULL,
8264 sizeof (UInt32), NULL, &mods); 8266 sizeof (UInt32), NULL, &mods);
8265 return mac_get_emulated_btn(mods); 8267 return mac_get_emulated_btn(mods);
8266 } 8268 }
8267 case kEventMouseButtonSecondary: 8269 case kEventMouseButtonSecondary:
8268 return NILP (Vmac_wheel_button_is_mouse_2) ? 1 : 2; 8270 return mac_wheel_button_is_mouse_2 ? 2 : 1;
8269 case kEventMouseButtonTertiary: 8271 case kEventMouseButtonTertiary:
8270 case 4: /* 4 is the number for the mouse wheel button */ 8272 case 4: /* 4 is the number for the mouse wheel button */
8271 return NILP (Vmac_wheel_button_is_mouse_2) ? 2 : 1; 8273 return mac_wheel_button_is_mouse_2 ? 1 : 2;
8272 default: 8274 default:
8273 return 0; 8275 return 0;
8274 } 8276 }
8275 } 8277 }
8276 8278
8777 UInt32 modifiers; 8779 UInt32 modifiers;
8778 static EventParamName names[] = {kEventParamDirectObject, 8780 static EventParamName names[] = {kEventParamDirectObject,
8779 kEventParamKeyModifiers}; 8781 kEventParamKeyModifiers};
8780 static EventParamType types[] = {typeHICommand, 8782 static EventParamType types[] = {typeHICommand,
8781 typeUInt32}; 8783 typeUInt32};
8782 static UInt32 sizes[] = {sizeof (HICommand),
8783 sizeof (UInt32)};
8784 err = create_apple_event_from_event_ref (event, 2, names, types, 8784 err = create_apple_event_from_event_ref (event, 2, names, types,
8785 sizes, &apple_event); 8785 &apple_event);
8786 if (err == noErr) 8786 if (err == noErr)
8787 { 8787 {
8788 err = mac_store_apple_event (class_key, id_key, &apple_event); 8788 err = mac_store_apple_event (class_key, id_key, &apple_event);
8789 AEDisposeDesc (&apple_event); 8789 AEDisposeDesc (&apple_event);
8790 } 8790 }
8964 8964
8965 switch (GetEventKind (event)) 8965 switch (GetEventKind (event))
8966 { 8966 {
8967 case kEventServicePaste: 8967 case kEventServicePaste:
8968 id_key = Qpaste; 8968 id_key = Qpaste;
8969 err = create_apple_event_from_event_ref (event, 0, NULL, 8969 err = create_apple_event_from_event_ref (event, 0, NULL, NULL,
8970 NULL, NULL, &apple_event); 8970 &apple_event);
8971 break; 8971 break;
8972 8972
8973 case kEventServicePerform: 8973 case kEventServicePerform:
8974 { 8974 {
8975 static EventParamName names[] = {kEventParamServiceMessageName, 8975 static EventParamName names[] = {kEventParamServiceMessageName,
8976 kEventParamServiceUserData}; 8976 kEventParamServiceUserData};
8977 static EventParamType types[] = {typeCFStringRef, 8977 static EventParamType types[] = {typeCFStringRef,
8978 typeCFStringRef}; 8978 typeCFStringRef};
8979 static UInt32 sizes[] = {sizeof (CFStringRef),
8980 sizeof (CFStringRef)};
8981 8979
8982 id_key = Qperform; 8980 id_key = Qperform;
8983 err = create_apple_event_from_event_ref (event, 2, names, types, 8981 err = create_apple_event_from_event_ref (event, 2, names, types,
8984 sizes, &apple_event); 8982 &apple_event);
8985 } 8983 }
8986 break; 8984 break;
8987 8985
8988 default: 8986 default:
8989 abort (); 8987 abort ();
9189 event.modifiers = mac_to_emacs_modifiers (modifiers); 9187 event.modifiers = mac_to_emacs_modifiers (modifiers);
9190 event.timestamp = TickCount () * (1000 / 60); 9188 event.timestamp = TickCount () * (1000 / 60);
9191 XSETINT (event.x, mouse.h); 9189 XSETINT (event.x, mouse.h);
9192 XSETINT (event.y, mouse.v); 9190 XSETINT (event.y, mouse.v);
9193 XSETFRAME (frame, f); 9191 XSETFRAME (frame, f);
9194 event.frame_or_window = Fcons (frame, file_list); 9192 event.frame_or_window = frame;
9195 event.arg = Qnil; 9193 event.arg = file_list;
9196 /* Post to the interrupt queue */ 9194 /* Post to the interrupt queue */
9197 kbd_buffer_store_event (&event); 9195 kbd_buffer_store_event (&event);
9198 /* MAC_TODO: Mimic behavior of windows by switching contexts to Emacs */ 9196 /* MAC_TODO: Mimic behavior of windows by switching contexts to Emacs */
9199 { 9197 {
9200 ProcessSerialNumber psn; 9198 ProcessSerialNumber psn;
9409 } 9407 }
9410 9408
9411 static int 9409 static int
9412 backtranslate_modified_keycode(int mods, int keycode, int def) 9410 backtranslate_modified_keycode(int mods, int keycode, int def)
9413 { 9411 {
9414 if (mods & 9412 EventModifiers mapped_modifiers =
9415 (controlKey | 9413 (NILP (Vmac_control_modifier) ? 0 : controlKey)
9416 (NILP (Vmac_option_modifier) ? 0 : optionKey) | 9414 | (NILP (Vmac_option_modifier) ? 0 : optionKey)
9417 cmdKey)) 9415 | (NILP (Vmac_command_modifier) ? 0 : cmdKey);
9416
9417 if (mods & mapped_modifiers)
9418 { 9418 {
9419 /* This code comes from Keyboard Resource, 9419 /* This code comes from Keyboard Resource,
9420 Appendix C of IM - Text. This is necessary 9420 Appendix C of IM - Text. This is necessary
9421 since shift is ignored in KCHR table 9421 since shift is ignored in KCHR table
9422 translation when option or command is pressed. 9422 translation when option or command is pressed.
9427 Not done for combinations with the option key (alt) 9427 Not done for combinations with the option key (alt)
9428 unless it is to be caught by Emacs: this is 9428 unless it is to be caught by Emacs: this is
9429 to preserve key combinations translated by the OS 9429 to preserve key combinations translated by the OS
9430 such as Alt-3. 9430 such as Alt-3.
9431 */ 9431 */
9432 /* mask off option and command */ 9432 /* Mask off modifier keys that are mapped to some Emacs
9433 int new_modifiers = mods & 0xe600; 9433 modifiers. */
9434 int new_modifiers = mods & ~mapped_modifiers;
9434 /* set high byte of keycode to modifier high byte*/ 9435 /* set high byte of keycode to modifier high byte*/
9435 int new_keycode = keycode | new_modifiers; 9436 int new_keycode = keycode | new_modifiers;
9436 Ptr kchr_ptr = (Ptr) GetScriptManagerVariable (smKCHRCache); 9437 Ptr kchr_ptr = (Ptr) GetScriptManagerVariable (smKCHRCache);
9437 unsigned long some_state = 0; 9438 unsigned long some_state = 0;
9438 return (int) KeyTranslate (kchr_ptr, new_keycode, 9439 return (int) KeyTranslate (kchr_ptr, new_keycode,
9439 &some_state) & 0xff; 9440 &some_state) & 0xff;
9440 /* TO DO: Recognize two separate resulting characters, "for 9441 /* TO DO: Recognize two separate resulting characters, "for
9441 example, when the user presses Option-E followed by N, you 9442 example, when the user presses Option-E followed by N, you
9442 can map this through the KeyTranslate function using the 9443 can map this through the KeyTranslate function using the
9443 U.S. 'KCHR' resource to produce ´n, which KeyTranslate 9444 U.S. 'KCHR' resource to produce ´n, which KeyTranslate
9444 returns as two characters in the bytes labeled Character code 9445 returns as two characters in the bytes labeled Character code
9988 /* When using Carbon Events, we need to pass raw keyboard 9989 /* When using Carbon Events, we need to pass raw keyboard
9989 events to the TSM ourselves. If TSM handles it, it 9990 events to the TSM ourselves. If TSM handles it, it
9990 will pass back noErr, otherwise it will pass back 9991 will pass back noErr, otherwise it will pass back
9991 "eventNotHandledErr" and we can process it 9992 "eventNotHandledErr" and we can process it
9992 normally. */ 9993 normally. */
9993 if ((!NILP (Vmac_pass_command_to_system) 9994 if ((mac_pass_command_to_system
9994 || !(er.modifiers & cmdKey)) 9995 || !(er.modifiers & cmdKey))
9995 && (!NILP (Vmac_pass_control_to_system) 9996 && (mac_pass_control_to_system
9996 || !(er.modifiers & controlKey)) 9997 || !(er.modifiers & controlKey))
9997 && (NILP (Vmac_option_modifier) 9998 && (NILP (Vmac_option_modifier)
9998 || !(er.modifiers & optionKey))) 9999 || !(er.modifiers & optionKey)))
9999 if (SendEventToEventTarget (eventRef, toolbox_dispatcher) 10000 if (SendEventToEventTarget (eventRef, toolbox_dispatcher)
10000 != eventNotHandledErr) 10001 != eventNotHandledErr)
10059 inev.code = 0xff00 | xkeysym; 10060 inev.code = 0xff00 | xkeysym;
10060 inev.kind = NON_ASCII_KEYSTROKE_EVENT; 10061 inev.kind = NON_ASCII_KEYSTROKE_EVENT;
10061 } 10062 }
10062 else 10063 else
10063 { 10064 {
10064
10065 inev.code = 10065 inev.code =
10066 backtranslate_modified_keycode(er.modifiers, keycode, 10066 backtranslate_modified_keycode(er.modifiers, keycode,
10067 er.message & charCodeMask); 10067 er.message & charCodeMask);
10068 inev.kind = ASCII_KEYSTROKE_EVENT; 10068 inev.kind = ASCII_KEYSTROKE_EVENT;
10069
10070 } 10069 }
10071 } 10070 }
10072 10071
10073 #if USE_CARBON_EVENTS 10072 #if USE_CARBON_EVENTS
10074 inev.modifiers = mac_event_to_emacs_modifiers (eventRef); 10073 inev.modifiers = mac_event_to_emacs_modifiers (eventRef);
10709 #if USE_ATSUI 10708 #if USE_ATSUI
10710 staticpro (&atsu_font_id_hash); 10709 staticpro (&atsu_font_id_hash);
10711 atsu_font_id_hash = Qnil; 10710 atsu_font_id_hash = Qnil;
10712 #endif 10711 #endif
10713 10712
10713 /* We don't yet support this, but defining this here avoids whining
10714 from cus-start.el and other places, like "M-x set-variable". */
10715 DEFVAR_BOOL ("x-use-underline-position-properties",
10716 &x_use_underline_position_properties,
10717 doc: /* *Non-nil means make use of UNDERLINE_POSITION font properties.
10718 nil means ignore them. If you encounter fonts with bogus
10719 UNDERLINE_POSITION font properties, for example 7x13 on XFree prior
10720 to 4.1, set this to nil.
10721
10722 NOTE: Not supported on Mac yet. */);
10723 x_use_underline_position_properties = 0;
10724
10714 DEFVAR_LISP ("x-toolkit-scroll-bars", &Vx_toolkit_scroll_bars, 10725 DEFVAR_LISP ("x-toolkit-scroll-bars", &Vx_toolkit_scroll_bars,
10715 doc: /* If not nil, Emacs uses toolkit scroll bars. */); 10726 doc: /* If not nil, Emacs uses toolkit scroll bars. */);
10716 #ifdef USE_TOOLKIT_SCROLL_BARS 10727 #ifdef USE_TOOLKIT_SCROLL_BARS
10717 Vx_toolkit_scroll_bars = Qt; 10728 Vx_toolkit_scroll_bars = Qt;
10718 #else 10729 #else
10723 last_mouse_motion_frame = Qnil; 10734 last_mouse_motion_frame = Qnil;
10724 10735
10725 /* Variables to configure modifier key assignment. */ 10736 /* Variables to configure modifier key assignment. */
10726 10737
10727 DEFVAR_LISP ("mac-control-modifier", &Vmac_control_modifier, 10738 DEFVAR_LISP ("mac-control-modifier", &Vmac_control_modifier,
10728 doc: /* Modifier key assumed when the Mac control key is pressed. 10739 doc: /* *Modifier key assumed when the Mac control key is pressed.
10729 The value can be `alt', `control', `hyper', or `super' for the 10740 The value can be `control', `meta', `alt', `hyper', or `super' for the
10730 respective modifier. The default is `control'. */); 10741 respective modifier. The default is `control'. */);
10731 Vmac_control_modifier = Qcontrol; 10742 Vmac_control_modifier = Qcontrol;
10732 10743
10733 DEFVAR_LISP ("mac-option-modifier", &Vmac_option_modifier, 10744 DEFVAR_LISP ("mac-option-modifier", &Vmac_option_modifier,
10734 doc: /* Modifier key assumed when the Mac alt/option key is pressed. 10745 doc: /* *Modifier key assumed when the Mac alt/option key is pressed.
10735 The value can be `alt', `control', `hyper', or `super' for the 10746 The value can be `control', `meta', `alt', `hyper', or `super' for the
10736 respective modifier. If the value is nil then the key will act as the 10747 respective modifier. If the value is nil then the key will act as the
10737 normal Mac control modifier, and the option key can be used to compose 10748 normal Mac control modifier, and the option key can be used to compose
10738 characters depending on the chosen Mac keyboard setting. */); 10749 characters depending on the chosen Mac keyboard setting. */);
10739 Vmac_option_modifier = Qnil; 10750 Vmac_option_modifier = Qnil;
10740 10751
10741 DEFVAR_LISP ("mac-command-modifier", &Vmac_command_modifier, 10752 DEFVAR_LISP ("mac-command-modifier", &Vmac_command_modifier,
10742 doc: /* Modifier key assumed when the Mac command key is pressed. 10753 doc: /* *Modifier key assumed when the Mac command key is pressed.
10743 The value can be `alt', `control', `hyper', or `super' for the 10754 The value can be `control', `meta', `alt', `hyper', or `super' for the
10744 respective modifier. The default is `meta'. */); 10755 respective modifier. The default is `meta'. */);
10745 Vmac_command_modifier = Qmeta; 10756 Vmac_command_modifier = Qmeta;
10746 10757
10747 DEFVAR_LISP ("mac-function-modifier", &Vmac_function_modifier, 10758 DEFVAR_LISP ("mac-function-modifier", &Vmac_function_modifier,
10748 doc: /* Modifier key assumed when the Mac function key is pressed. 10759 doc: /* *Modifier key assumed when the Mac function key is pressed.
10749 The value can be `alt', `control', `hyper', or `super' for the 10760 The value can be `control', `meta', `alt', `hyper', or `super' for the
10750 respective modifier. Note that remapping the function key may lead to 10761 respective modifier. Note that remapping the function key may lead to
10751 unexpected results for some keys on non-US/GB keyboards. */); 10762 unexpected results for some keys on non-US/GB keyboards. */);
10752 Vmac_function_modifier = Qnil; 10763 Vmac_function_modifier = Qnil;
10753 10764
10754 DEFVAR_LISP ("mac-emulate-three-button-mouse", 10765 DEFVAR_LISP ("mac-emulate-three-button-mouse",
10755 &Vmac_emulate_three_button_mouse, 10766 &Vmac_emulate_three_button_mouse,
10756 doc: /* Specify a way of three button mouse emulation. 10767 doc: /* *Specify a way of three button mouse emulation.
10757 The value can be nil, t, or the symbol `reverse'. 10768 The value can be nil, t, or the symbol `reverse'.
10758 nil means that no emulation should be done and the modifiers should be 10769 nil means that no emulation should be done and the modifiers should be
10759 placed on the mouse-1 event. 10770 placed on the mouse-1 event.
10760 t means that when the option-key is held down while pressing the mouse 10771 t means that when the option-key is held down while pressing the mouse
10761 button, the click will register as mouse-2 and while the command-key 10772 button, the click will register as mouse-2 and while the command-key
10763 The symbol `reverse' means that the option-key will register for 10774 The symbol `reverse' means that the option-key will register for
10764 mouse-3 and the command-key will register for mouse-2. */); 10775 mouse-3 and the command-key will register for mouse-2. */);
10765 Vmac_emulate_three_button_mouse = Qnil; 10776 Vmac_emulate_three_button_mouse = Qnil;
10766 10777
10767 #if USE_CARBON_EVENTS 10778 #if USE_CARBON_EVENTS
10768 DEFVAR_LISP ("mac-wheel-button-is-mouse-2", &Vmac_wheel_button_is_mouse_2, 10779 DEFVAR_BOOL ("mac-wheel-button-is-mouse-2", &mac_wheel_button_is_mouse_2,
10769 doc: /* Non-nil if the wheel button is mouse-2 and the right click mouse-3. 10780 doc: /* *Non-nil if the wheel button is mouse-2 and the right click mouse-3.
10770 Otherwise, the right click will be treated as mouse-2 and the wheel 10781 Otherwise, the right click will be treated as mouse-2 and the wheel
10771 button will be mouse-3. */); 10782 button will be mouse-3. */);
10772 Vmac_wheel_button_is_mouse_2 = Qt; 10783 mac_wheel_button_is_mouse_2 = 1;
10773 10784
10774 DEFVAR_LISP ("mac-pass-command-to-system", &Vmac_pass_command_to_system, 10785 DEFVAR_BOOL ("mac-pass-command-to-system", &mac_pass_command_to_system,
10775 doc: /* Non-nil if command key presses are passed on to the Mac Toolbox. */); 10786 doc: /* *Non-nil if command key presses are passed on to the Mac Toolbox. */);
10776 Vmac_pass_command_to_system = Qt; 10787 mac_pass_command_to_system = 1;
10777 10788
10778 DEFVAR_LISP ("mac-pass-control-to-system", &Vmac_pass_control_to_system, 10789 DEFVAR_BOOL ("mac-pass-control-to-system", &mac_pass_control_to_system,
10779 doc: /* Non-nil if control key presses are passed on to the Mac Toolbox. */); 10790 doc: /* *Non-nil if control key presses are passed on to the Mac Toolbox. */);
10780 Vmac_pass_control_to_system = Qt; 10791 mac_pass_control_to_system = 1;
10781 10792
10782 #endif 10793 #endif
10783 10794
10784 DEFVAR_LISP ("mac-allow-anti-aliasing", &Vmac_use_core_graphics, 10795 DEFVAR_BOOL ("mac-allow-anti-aliasing", &mac_use_core_graphics,
10785 doc: /* If non-nil, allow anti-aliasing. 10796 doc: /* *If non-nil, allow anti-aliasing.
10786 The text will be rendered using Core Graphics text rendering which 10797 The text will be rendered using Core Graphics text rendering which
10787 may anti-alias the text. */); 10798 may anti-alias the text. */);
10788 Vmac_use_core_graphics = Qnil; 10799 mac_use_core_graphics = 0;
10789 10800
10790 /* Register an entry for `mac-roman' so that it can be used when 10801 /* Register an entry for `mac-roman' so that it can be used when
10791 creating the terminal frame on Mac OS 9 before loading 10802 creating the terminal frame on Mac OS 9 before loading
10792 term/mac-win.elc. */ 10803 term/mac-win.elc. */
10793 DEFVAR_LISP ("mac-charset-info-alist", &Vmac_charset_info_alist, 10804 DEFVAR_LISP ("mac-charset-info-alist", &Vmac_charset_info_alist,