diff options
| author | Dan Nicolaescu | 2008-07-22 16:24:39 +0000 |
|---|---|---|
| committer | Dan Nicolaescu | 2008-07-22 16:24:39 +0000 |
| commit | 1baa62364ead97b5d7e5c08feb6d253e61ccadef (patch) | |
| tree | 05e59fa2561843811d6e7834fcd84378cd0ebeb7 /src | |
| parent | 11b8fe144d7f598fc90dbeb50fd540da178affb8 (diff) | |
| download | emacs-1baa62364ead97b5d7e5c08feb6d253e61ccadef.tar.gz emacs-1baa62364ead97b5d7e5c08feb6d253e61ccadef.zip | |
(syms_of_nsterm): Move to the end of file.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 2 | ||||
| -rw-r--r-- | src/nsterm.m | 293 |
2 files changed, 148 insertions, 147 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 6c8748ab4bd..d545e9e4ef8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | 2008-07-22 Dan Nicolaescu <dann@ics.uci.edu> | 1 | 2008-07-22 Dan Nicolaescu <dann@ics.uci.edu> |
| 2 | 2 | ||
| 3 | * nsterm.m (syms_of_nsterm): Move to the end of file. | ||
| 4 | |||
| 3 | * dispnew.c (init_display): Remove code for X10. | 5 | * dispnew.c (init_display): Remove code for X10. |
| 4 | 6 | ||
| 5 | 2008-07-22 Jason Rumney <jasonr@gnu.org> | 7 | 2008-07-22 Jason Rumney <jasonr@gnu.org> |
diff --git a/src/nsterm.m b/src/nsterm.m index 30472c6f8da..72638825ef7 100644 --- a/src/nsterm.m +++ b/src/nsterm.m | |||
| @@ -3716,7 +3716,7 @@ ns_term_init (Lisp_Object display_name) | |||
| 3716 | /* count object allocs (About, click icon); on OS X use ObjectAlloc tool */ | 3716 | /* count object allocs (About, click icon); on OS X use ObjectAlloc tool */ |
| 3717 | /*GSDebugAllocationActive (YES); */ | 3717 | /*GSDebugAllocationActive (YES); */ |
| 3718 | BLOCK_INPUT; | 3718 | BLOCK_INPUT; |
| 3719 | handling_signal = 0; | 3719 | handling_signal = 0; |
| 3720 | 3720 | ||
| 3721 | if (!ns_initialized) | 3721 | if (!ns_initialized) |
| 3722 | { | 3722 | { |
| @@ -3947,152 +3947,6 @@ ns_term_shutdown (int sig) | |||
| 3947 | } | 3947 | } |
| 3948 | 3948 | ||
| 3949 | 3949 | ||
| 3950 | void | ||
| 3951 | syms_of_nsterm () | ||
| 3952 | { | ||
| 3953 | NSTRACE (syms_of_nsterm); | ||
| 3954 | DEFVAR_LISP ("ns-input-file", &ns_input_file, | ||
| 3955 | "The file specified in the last NS event."); | ||
| 3956 | ns_input_file =Qnil; | ||
| 3957 | |||
| 3958 | DEFVAR_LISP ("ns-input-text", &ns_input_text, | ||
| 3959 | "The data received in the last NS text drag event."); | ||
| 3960 | ns_input_text =Qnil; | ||
| 3961 | |||
| 3962 | DEFVAR_LISP ("ns-working-text", &ns_working_text, | ||
| 3963 | "String for visualizing working composition sequence."); | ||
| 3964 | ns_working_text =Qnil; | ||
| 3965 | |||
| 3966 | DEFVAR_LISP ("ns-input-font", &ns_input_font, | ||
| 3967 | "The font specified in the last NS event."); | ||
| 3968 | ns_input_font =Qnil; | ||
| 3969 | |||
| 3970 | DEFVAR_LISP ("ns-input-fontsize", &ns_input_fontsize, | ||
| 3971 | "The fontsize specified in the last NS event."); | ||
| 3972 | ns_input_fontsize =Qnil; | ||
| 3973 | |||
| 3974 | DEFVAR_LISP ("ns-input-line", &ns_input_line, | ||
| 3975 | "The line specified in the last NS event."); | ||
| 3976 | ns_input_line =Qnil; | ||
| 3977 | |||
| 3978 | DEFVAR_LISP ("ns-input-color", &ns_input_color, | ||
| 3979 | "The color specified in the last NS event."); | ||
| 3980 | ns_input_color =Qnil; | ||
| 3981 | |||
| 3982 | DEFVAR_LISP ("ns-input-spi-name", &ns_input_spi_name, | ||
| 3983 | "The service name specified in the last NS event."); | ||
| 3984 | ns_input_spi_name =Qnil; | ||
| 3985 | |||
| 3986 | DEFVAR_LISP ("ns-input-spi-arg", &ns_input_spi_arg, | ||
| 3987 | "The service argument specified in the last NS event."); | ||
| 3988 | ns_input_spi_arg =Qnil; | ||
| 3989 | |||
| 3990 | DEFVAR_LISP ("ns-alternate-modifier", &ns_alternate_modifier, | ||
| 3991 | "This variable describes the behavior of the alternate or option key.\n\ | ||
| 3992 | Set to control, meta, alt, super, or hyper means it is taken to be that key.\n\ | ||
| 3993 | Set to none means that the alternate / option key is not interpreted by Emacs\n\ | ||
| 3994 | at all, allowing it to be used at a lower level for accented character entry."); | ||
| 3995 | |||
| 3996 | DEFVAR_LISP ("ns-command-modifier", &ns_command_modifier, | ||
| 3997 | "This variable describes the behavior of the command key.\n\ | ||
| 3998 | Set to control, meta, alt, super, or hyper means it is taken to be that key."); | ||
| 3999 | |||
| 4000 | DEFVAR_LISP ("ns-control-modifier", &ns_control_modifier, | ||
| 4001 | "This variable describes the behavior of the control key.\n\ | ||
| 4002 | Set to control, meta, alt, super, or hyper means it is taken to be that key."); | ||
| 4003 | |||
| 4004 | DEFVAR_LISP ("ns-function-modifier", &ns_function_modifier, | ||
| 4005 | "This variable describes the behavior of the function key (on laptops).\n\ | ||
| 4006 | Set to control, meta, alt, super, or hyper means it is taken to be that key.\n\ | ||
| 4007 | Set to none means that the function key is not interpreted by Emacs at all,\n\ | ||
| 4008 | allowing it to be used at a lower level for accented character entry."); | ||
| 4009 | |||
| 4010 | DEFVAR_LISP ("ns-cursor-blink-rate", &ns_cursor_blink_rate, | ||
| 4011 | "Rate at which the Emacs cursor blinks (in seconds).\n\ | ||
| 4012 | Set to nil to disable blinking."); | ||
| 4013 | |||
| 4014 | DEFVAR_LISP ("ns-cursor-blink-mode", &ns_cursor_blink_mode, | ||
| 4015 | "Internal variable -- use M-x blink-cursor-mode or preferences\n\ | ||
| 4016 | panel to control this setting."); | ||
| 4017 | |||
| 4018 | DEFVAR_LISP ("ns-expand-space", &ns_expand_space, | ||
| 4019 | "Amount by which spacing between lines is expanded (positive)\n\ | ||
| 4020 | or shrunk (negative). Zero (the default) means standard line height.\n\ | ||
| 4021 | (This variable should only be read, never set.)"); | ||
| 4022 | |||
| 4023 | DEFVAR_LISP ("ns-antialias-text", &ns_antialias_text, | ||
| 4024 | "Non-nil (the default) means to render text antialiased. Only has an effect on OS X Panther and above."); | ||
| 4025 | |||
| 4026 | DEFVAR_LISP ("ns-use-qd-smoothing", &ns_use_qd_smoothing, | ||
| 4027 | "Whether to render text using QuickDraw (less heavy) antialiasing. Only has an effect on OS X Panther and above. Default is nil (use Quartz smoothing)."); | ||
| 4028 | |||
| 4029 | DEFVAR_LISP ("ns-use-system-highlight-color", | ||
| 4030 | &ns_use_system_highlight_color, | ||
| 4031 | "Whether to use the system default (on OS X only) for the highlight color. Nil means to use standard emacs (prior to version 21) 'grey'."); | ||
| 4032 | |||
| 4033 | staticpro (&ns_display_name_list); | ||
| 4034 | ns_display_name_list = Qnil; | ||
| 4035 | |||
| 4036 | staticpro (&last_mouse_motion_frame); | ||
| 4037 | last_mouse_motion_frame = Qnil; | ||
| 4038 | |||
| 4039 | /*23: now apparently we need to tell emacs what modifiers there are.. */ | ||
| 4040 | Qmodifier_value = intern ("modifier-value"); | ||
| 4041 | Qalt = intern ("alt"); | ||
| 4042 | Fput (Qalt, Qmodifier_value, make_number (alt_modifier)); | ||
| 4043 | Qhyper = intern ("hyper"); | ||
| 4044 | Fput (Qhyper, Qmodifier_value, make_number (hyper_modifier)); | ||
| 4045 | Qmeta = intern ("meta"); | ||
| 4046 | Fput (Qmeta, Qmodifier_value, make_number (meta_modifier)); | ||
| 4047 | Qsuper = intern ("super"); | ||
| 4048 | Fput (Qsuper, Qmodifier_value, make_number (super_modifier)); | ||
| 4049 | Qcontrol = intern ("control"); | ||
| 4050 | Fput (Qcontrol, Qmodifier_value, make_number (ctrl_modifier)); | ||
| 4051 | |||
| 4052 | /* FIXME: move to common code */ | ||
| 4053 | DEFVAR_LISP ("x-toolkit-scroll-bars", &Vx_toolkit_scroll_bars, | ||
| 4054 | doc: /* If not nil, Emacs uses toolkit scroll bars. */); | ||
| 4055 | #ifdef USE_TOOLKIT_SCROLL_BARS | ||
| 4056 | Vx_toolkit_scroll_bars = Qt; | ||
| 4057 | #else | ||
| 4058 | Vx_toolkit_scroll_bars = Qnil; | ||
| 4059 | #endif | ||
| 4060 | |||
| 4061 | /* these are unsupported but we need the declarations to avoid whining | ||
| 4062 | messages from cus-start.el */ | ||
| 4063 | DEFVAR_BOOL ("x-use-underline-position-properties", | ||
| 4064 | &x_use_underline_position_properties, | ||
| 4065 | doc: /* NOT SUPPORTED UNDER NS. | ||
| 4066 | *Non-nil means make use of UNDERLINE_POSITION font properties. | ||
| 4067 | A value of nil means ignore them. If you encounter fonts with bogus | ||
| 4068 | UNDERLINE_POSITION font properties, for example 7x13 on XFree prior | ||
| 4069 | to 4.1, set this to nil. | ||
| 4070 | |||
| 4071 | NOTE: Not supported on Mac yet. */); | ||
| 4072 | x_use_underline_position_properties = 0; | ||
| 4073 | |||
| 4074 | DEFVAR_BOOL ("x-underline-at-descent-line", | ||
| 4075 | &x_underline_at_descent_line, | ||
| 4076 | doc: /* NOT SUPPORTED UNDER NS. | ||
| 4077 | *Non-nil means to draw the underline at the same place as the descent line. | ||
| 4078 | A value of nil means to draw the underline according to the value of the | ||
| 4079 | variable `x-use-underline-position-properties', which is usually at the | ||
| 4080 | baseline level. The default value is nil. */); | ||
| 4081 | x_underline_at_descent_line = 0; | ||
| 4082 | |||
| 4083 | /* Tell emacs about this window system. */ | ||
| 4084 | Fprovide (intern ("ns-windowing"), Qnil); | ||
| 4085 | /* TODO: try to move this back into lisp, ns-win.el loaded too late | ||
| 4086 | right now */ | ||
| 4087 | { | ||
| 4088 | Lisp_Object args[3] = { intern ("ns-version-string"), build_string ("9.0"), | ||
| 4089 | build_string ("NS Window system port version number.") }; | ||
| 4090 | Fdefconst (Flist (3, args)); | ||
| 4091 | } | ||
| 4092 | } | ||
| 4093 | |||
| 4094 | |||
| 4095 | |||
| 4096 | /* ========================================================================== | 3950 | /* ========================================================================== |
| 4097 | 3951 | ||
| 4098 | EmacsApp implementation | 3952 | EmacsApp implementation |
| @@ -6599,4 +6453,149 @@ ns_xlfd_to_fontname (const char *xlfd) | |||
| 6599 | return ret; | 6453 | return ret; |
| 6600 | } | 6454 | } |
| 6601 | 6455 | ||
| 6456 | void | ||
| 6457 | syms_of_nsterm () | ||
| 6458 | { | ||
| 6459 | NSTRACE (syms_of_nsterm); | ||
| 6460 | DEFVAR_LISP ("ns-input-file", &ns_input_file, | ||
| 6461 | "The file specified in the last NS event."); | ||
| 6462 | ns_input_file =Qnil; | ||
| 6463 | |||
| 6464 | DEFVAR_LISP ("ns-input-text", &ns_input_text, | ||
| 6465 | "The data received in the last NS text drag event."); | ||
| 6466 | ns_input_text =Qnil; | ||
| 6467 | |||
| 6468 | DEFVAR_LISP ("ns-working-text", &ns_working_text, | ||
| 6469 | "String for visualizing working composition sequence."); | ||
| 6470 | ns_working_text =Qnil; | ||
| 6471 | |||
| 6472 | DEFVAR_LISP ("ns-input-font", &ns_input_font, | ||
| 6473 | "The font specified in the last NS event."); | ||
| 6474 | ns_input_font =Qnil; | ||
| 6475 | |||
| 6476 | DEFVAR_LISP ("ns-input-fontsize", &ns_input_fontsize, | ||
| 6477 | "The fontsize specified in the last NS event."); | ||
| 6478 | ns_input_fontsize =Qnil; | ||
| 6479 | |||
| 6480 | DEFVAR_LISP ("ns-input-line", &ns_input_line, | ||
| 6481 | "The line specified in the last NS event."); | ||
| 6482 | ns_input_line =Qnil; | ||
| 6483 | |||
| 6484 | DEFVAR_LISP ("ns-input-color", &ns_input_color, | ||
| 6485 | "The color specified in the last NS event."); | ||
| 6486 | ns_input_color =Qnil; | ||
| 6487 | |||
| 6488 | DEFVAR_LISP ("ns-input-spi-name", &ns_input_spi_name, | ||
| 6489 | "The service name specified in the last NS event."); | ||
| 6490 | ns_input_spi_name =Qnil; | ||
| 6491 | |||
| 6492 | DEFVAR_LISP ("ns-input-spi-arg", &ns_input_spi_arg, | ||
| 6493 | "The service argument specified in the last NS event."); | ||
| 6494 | ns_input_spi_arg =Qnil; | ||
| 6495 | |||
| 6496 | DEFVAR_LISP ("ns-alternate-modifier", &ns_alternate_modifier, | ||
| 6497 | "This variable describes the behavior of the alternate or option key.\n\ | ||
| 6498 | Set to control, meta, alt, super, or hyper means it is taken to be that key.\n\ | ||
| 6499 | Set to none means that the alternate / option key is not interpreted by Emacs\n\ | ||
| 6500 | at all, allowing it to be used at a lower level for accented character entry."); | ||
| 6501 | |||
| 6502 | DEFVAR_LISP ("ns-command-modifier", &ns_command_modifier, | ||
| 6503 | "This variable describes the behavior of the command key.\n\ | ||
| 6504 | Set to control, meta, alt, super, or hyper means it is taken to be that key."); | ||
| 6505 | |||
| 6506 | DEFVAR_LISP ("ns-control-modifier", &ns_control_modifier, | ||
| 6507 | "This variable describes the behavior of the control key.\n\ | ||
| 6508 | Set to control, meta, alt, super, or hyper means it is taken to be that key."); | ||
| 6509 | |||
| 6510 | DEFVAR_LISP ("ns-function-modifier", &ns_function_modifier, | ||
| 6511 | "This variable describes the behavior of the function key (on laptops).\n\ | ||
| 6512 | Set to control, meta, alt, super, or hyper means it is taken to be that key.\n\ | ||
| 6513 | Set to none means that the function key is not interpreted by Emacs at all,\n\ | ||
| 6514 | allowing it to be used at a lower level for accented character entry."); | ||
| 6515 | |||
| 6516 | DEFVAR_LISP ("ns-cursor-blink-rate", &ns_cursor_blink_rate, | ||
| 6517 | "Rate at which the Emacs cursor blinks (in seconds).\n\ | ||
| 6518 | Set to nil to disable blinking."); | ||
| 6519 | |||
| 6520 | DEFVAR_LISP ("ns-cursor-blink-mode", &ns_cursor_blink_mode, | ||
| 6521 | "Internal variable -- use M-x blink-cursor-mode or preferences\n\ | ||
| 6522 | panel to control this setting."); | ||
| 6523 | |||
| 6524 | DEFVAR_LISP ("ns-expand-space", &ns_expand_space, | ||
| 6525 | "Amount by which spacing between lines is expanded (positive)\n\ | ||
| 6526 | or shrunk (negative). Zero (the default) means standard line height.\n\ | ||
| 6527 | (This variable should only be read, never set.)"); | ||
| 6528 | |||
| 6529 | DEFVAR_LISP ("ns-antialias-text", &ns_antialias_text, | ||
| 6530 | "Non-nil (the default) means to render text antialiased. Only has an effect on OS X Panther and above."); | ||
| 6531 | |||
| 6532 | DEFVAR_LISP ("ns-use-qd-smoothing", &ns_use_qd_smoothing, | ||
| 6533 | "Whether to render text using QuickDraw (less heavy) antialiasing. Only has an effect on OS X Panther and above. Default is nil (use Quartz smoothing)."); | ||
| 6534 | |||
| 6535 | DEFVAR_LISP ("ns-use-system-highlight-color", | ||
| 6536 | &ns_use_system_highlight_color, | ||
| 6537 | "Whether to use the system default (on OS X only) for the highlight color. Nil means to use standard emacs (prior to version 21) 'grey'."); | ||
| 6538 | |||
| 6539 | staticpro (&ns_display_name_list); | ||
| 6540 | ns_display_name_list = Qnil; | ||
| 6541 | |||
| 6542 | staticpro (&last_mouse_motion_frame); | ||
| 6543 | last_mouse_motion_frame = Qnil; | ||
| 6544 | |||
| 6545 | /*23: now apparently we need to tell emacs what modifiers there are.. */ | ||
| 6546 | Qmodifier_value = intern ("modifier-value"); | ||
| 6547 | Qalt = intern ("alt"); | ||
| 6548 | Fput (Qalt, Qmodifier_value, make_number (alt_modifier)); | ||
| 6549 | Qhyper = intern ("hyper"); | ||
| 6550 | Fput (Qhyper, Qmodifier_value, make_number (hyper_modifier)); | ||
| 6551 | Qmeta = intern ("meta"); | ||
| 6552 | Fput (Qmeta, Qmodifier_value, make_number (meta_modifier)); | ||
| 6553 | Qsuper = intern ("super"); | ||
| 6554 | Fput (Qsuper, Qmodifier_value, make_number (super_modifier)); | ||
| 6555 | Qcontrol = intern ("control"); | ||
| 6556 | Fput (Qcontrol, Qmodifier_value, make_number (ctrl_modifier)); | ||
| 6557 | |||
| 6558 | /*PENDING: move to common code */ | ||
| 6559 | DEFVAR_LISP ("x-toolkit-scroll-bars", &Vx_toolkit_scroll_bars, | ||
| 6560 | doc: /* If not nil, Emacs uses toolkit scroll bars. */); | ||
| 6561 | #ifdef USE_TOOLKIT_SCROLL_BARS | ||
| 6562 | Vx_toolkit_scroll_bars = Qt; | ||
| 6563 | #else | ||
| 6564 | Vx_toolkit_scroll_bars = Qnil; | ||
| 6565 | #endif | ||
| 6566 | |||
| 6567 | /* these are unsupported but we need the declarations to avoid whining | ||
| 6568 | messages from cus-start.el */ | ||
| 6569 | DEFVAR_BOOL ("x-use-underline-position-properties", | ||
| 6570 | &x_use_underline_position_properties, | ||
| 6571 | doc: /* NOT SUPPORTED UNDER NS. | ||
| 6572 | *Non-nil means make use of UNDERLINE_POSITION font properties. | ||
| 6573 | A value of nil means ignore them. If you encounter fonts with bogus | ||
| 6574 | UNDERLINE_POSITION font properties, for example 7x13 on XFree prior | ||
| 6575 | to 4.1, set this to nil. | ||
| 6576 | |||
| 6577 | NOTE: Not supported on Mac yet. */); | ||
| 6578 | x_use_underline_position_properties = 0; | ||
| 6579 | |||
| 6580 | DEFVAR_BOOL ("x-underline-at-descent-line", | ||
| 6581 | &x_underline_at_descent_line, | ||
| 6582 | doc: /* NOT SUPPORTED UNDER NS. | ||
| 6583 | *Non-nil means to draw the underline at the same place as the descent line. | ||
| 6584 | A value of nil means to draw the underline according to the value of the | ||
| 6585 | variable `x-use-underline-position-properties', which is usually at the | ||
| 6586 | baseline level. The default value is nil. */); | ||
| 6587 | x_underline_at_descent_line = 0; | ||
| 6588 | |||
| 6589 | /* Tell emacs about this window system. */ | ||
| 6590 | Fprovide (intern ("ns-windowing"), Qnil); | ||
| 6591 | /* PENDING: try to move this back into lisp, ns-win.el loaded too late | ||
| 6592 | right now */ | ||
| 6593 | { | ||
| 6594 | Lisp_Object args[3] = { intern ("ns-version-string"), build_string ("9.0"), | ||
| 6595 | build_string ("NS Window system port version number.") }; | ||
| 6596 | Fdefconst (Flist (3, args)); | ||
| 6597 | } | ||
| 6598 | } | ||
| 6599 | |||
| 6600 | |||
| 6602 | // arch-tag: 6eaa8f7d-a69b-4e1c-b43d-ab31defbe0d2 | 6601 | // arch-tag: 6eaa8f7d-a69b-4e1c-b43d-ab31defbe0d2 |