comparison src/xfns.c @ 103052:e68707cf48a5

* keyboard.c (Fset_input_meta_mode): Doc fix. * dispnew.c (Fsend_string_to_terminal): Doc fix. * data.c (Fterminal_local_value, Fset_terminal_local_value): Doc fixes. * coding.c (Fterminal_coding_system): Doc fix. * xfns.c (Fx_display_grayscale_p, Fx_display_pixel_width) (Fx_display_pixel_height, Fx_display_planes) (Fx_display_color_cells, Fx_server_max_request_size) (Fx_server_vendor, Fx_server_version, Fx_display_screens) (Fx_display_mm_height, Fx_display_mm_width) (Fx_display_backing_store, Fx_display_visual_class) (Fx_display_save_under, Fx_close_connection, Fx_synchronize): Doc fixes, replacing "terminal id" with "terminal object". (check_x_display_info): Handle terminal objects instead of terminal ids.
author Chong Yidong <cyd@stupidchicken.com>
date Wed, 22 Apr 2009 04:32:21 +0000
parents ce4d81298570
children 1867be80e595
comparison
equal deleted inserted replaced
103051:ccf9a356f1a1 103052:e68707cf48a5
245 error ("Non-X frame used"); 245 error ("Non-X frame used");
246 return f; 246 return f;
247 } 247 }
248 248
249 /* Let the user specify an X display with a Lisp object. 249 /* Let the user specify an X display with a Lisp object.
250 OBJECT may be nil, a frame or a terminal id. 250 OBJECT may be nil, a frame or a terminal object.
251 nil stands for the selected frame--or, if that is not an X frame, 251 nil stands for the selected frame--or, if that is not an X frame,
252 the first X display on the list. */ 252 the first X display on the list. */
253 253
254 struct x_display_info * 254 struct x_display_info *
255 check_x_display_info (object) 255 check_x_display_info (object)
266 else if (x_display_list != 0) 266 else if (x_display_list != 0)
267 dpyinfo = x_display_list; 267 dpyinfo = x_display_list;
268 else 268 else
269 error ("X windows are not in use or not initialized"); 269 error ("X windows are not in use or not initialized");
270 } 270 }
271 else if (INTEGERP (object)) 271 else if (TERMINALP (object))
272 { 272 {
273 struct terminal *t = get_terminal (object, 1); 273 struct terminal *t = get_terminal (object, 1);
274 274
275 if (t->type != output_x_window) 275 if (t->type != output_x_window)
276 error ("Terminal %d is not an X display", XINT (object)); 276 error ("Terminal %d is not an X display", XINT (object));
3637 DEFUN ("x-display-grayscale-p", Fx_display_grayscale_p, Sx_display_grayscale_p, 3637 DEFUN ("x-display-grayscale-p", Fx_display_grayscale_p, Sx_display_grayscale_p,
3638 0, 1, 0, 3638 0, 1, 0,
3639 doc: /* Return t if the X display supports shades of gray. 3639 doc: /* Return t if the X display supports shades of gray.
3640 Note that color displays do support shades of gray. 3640 Note that color displays do support shades of gray.
3641 The optional argument TERMINAL specifies which display to ask about. 3641 The optional argument TERMINAL specifies which display to ask about.
3642 TERMINAL should be a terminal id, a frame or a display name (a string). 3642 TERMINAL should be a terminal object, a frame or a display name (a string).
3643 If omitted or nil, that stands for the selected frame's display. */) 3643 If omitted or nil, that stands for the selected frame's display. */)
3644 (terminal) 3644 (terminal)
3645 Lisp_Object terminal; 3645 Lisp_Object terminal;
3646 { 3646 {
3647 struct x_display_info *dpyinfo = check_x_display_info (terminal); 3647 struct x_display_info *dpyinfo = check_x_display_info (terminal);
3666 3666
3667 DEFUN ("x-display-pixel-width", Fx_display_pixel_width, Sx_display_pixel_width, 3667 DEFUN ("x-display-pixel-width", Fx_display_pixel_width, Sx_display_pixel_width,
3668 0, 1, 0, 3668 0, 1, 0,
3669 doc: /* Return the width in pixels of the X display TERMINAL. 3669 doc: /* Return the width in pixels of the X display TERMINAL.
3670 The optional argument TERMINAL specifies which display to ask about. 3670 The optional argument TERMINAL specifies which display to ask about.
3671 TERMINAL should be a terminal id, a frame or a display name (a string). 3671 TERMINAL should be a terminal object, a frame or a display name (a string).
3672 If omitted or nil, that stands for the selected frame's display. */) 3672 If omitted or nil, that stands for the selected frame's display. */)
3673 (terminal) 3673 (terminal)
3674 Lisp_Object terminal; 3674 Lisp_Object terminal;
3675 { 3675 {
3676 struct x_display_info *dpyinfo = check_x_display_info (terminal); 3676 struct x_display_info *dpyinfo = check_x_display_info (terminal);
3680 3680
3681 DEFUN ("x-display-pixel-height", Fx_display_pixel_height, 3681 DEFUN ("x-display-pixel-height", Fx_display_pixel_height,
3682 Sx_display_pixel_height, 0, 1, 0, 3682 Sx_display_pixel_height, 0, 1, 0,
3683 doc: /* Return the height in pixels of the X display TERMINAL. 3683 doc: /* Return the height in pixels of the X display TERMINAL.
3684 The optional argument TERMINAL specifies which display to ask about. 3684 The optional argument TERMINAL specifies which display to ask about.
3685 TERMINAL should be a terminal id, a frame or a display name (a string). 3685 TERMINAL should be a terminal object, a frame or a display name (a string).
3686 If omitted or nil, that stands for the selected frame's display. */) 3686 If omitted or nil, that stands for the selected frame's display. */)
3687 (terminal) 3687 (terminal)
3688 Lisp_Object terminal; 3688 Lisp_Object terminal;
3689 { 3689 {
3690 struct x_display_info *dpyinfo = check_x_display_info (terminal); 3690 struct x_display_info *dpyinfo = check_x_display_info (terminal);
3694 3694
3695 DEFUN ("x-display-planes", Fx_display_planes, Sx_display_planes, 3695 DEFUN ("x-display-planes", Fx_display_planes, Sx_display_planes,
3696 0, 1, 0, 3696 0, 1, 0,
3697 doc: /* Return the number of bitplanes of the X display TERMINAL. 3697 doc: /* Return the number of bitplanes of the X display TERMINAL.
3698 The optional argument TERMINAL specifies which display to ask about. 3698 The optional argument TERMINAL specifies which display to ask about.
3699 TERMINAL should be a terminal id, a frame or a display name (a string). 3699 TERMINAL should be a terminal object, a frame or a display name (a string).
3700 If omitted or nil, that stands for the selected frame's display. */) 3700 If omitted or nil, that stands for the selected frame's display. */)
3701 (terminal) 3701 (terminal)
3702 Lisp_Object terminal; 3702 Lisp_Object terminal;
3703 { 3703 {
3704 struct x_display_info *dpyinfo = check_x_display_info (terminal); 3704 struct x_display_info *dpyinfo = check_x_display_info (terminal);
3708 3708
3709 DEFUN ("x-display-color-cells", Fx_display_color_cells, Sx_display_color_cells, 3709 DEFUN ("x-display-color-cells", Fx_display_color_cells, Sx_display_color_cells,
3710 0, 1, 0, 3710 0, 1, 0,
3711 doc: /* Return the number of color cells of the X display TERMINAL. 3711 doc: /* Return the number of color cells of the X display TERMINAL.
3712 The optional argument TERMINAL specifies which display to ask about. 3712 The optional argument TERMINAL specifies which display to ask about.
3713 TERMINAL should be a terminal id, a frame or a display name (a string). 3713 TERMINAL should be a terminal object, a frame or a display name (a string).
3714 If omitted or nil, that stands for the selected frame's display. */) 3714 If omitted or nil, that stands for the selected frame's display. */)
3715 (terminal) 3715 (terminal)
3716 Lisp_Object terminal; 3716 Lisp_Object terminal;
3717 { 3717 {
3718 struct x_display_info *dpyinfo = check_x_display_info (terminal); 3718 struct x_display_info *dpyinfo = check_x_display_info (terminal);
3733 DEFUN ("x-server-max-request-size", Fx_server_max_request_size, 3733 DEFUN ("x-server-max-request-size", Fx_server_max_request_size,
3734 Sx_server_max_request_size, 3734 Sx_server_max_request_size,
3735 0, 1, 0, 3735 0, 1, 0,
3736 doc: /* Return the maximum request size of the X server of display TERMINAL. 3736 doc: /* Return the maximum request size of the X server of display TERMINAL.
3737 The optional argument TERMINAL specifies which display to ask about. 3737 The optional argument TERMINAL specifies which display to ask about.
3738 TERMINAL should be a terminal id, a frame or a display name (a string). 3738 TERMINAL should be a terminal object, a frame or a display name (a string).
3739 If omitted or nil, that stands for the selected frame's display. */) 3739 If omitted or nil, that stands for the selected frame's display. */)
3740 (terminal) 3740 (terminal)
3741 Lisp_Object terminal; 3741 Lisp_Object terminal;
3742 { 3742 {
3743 struct x_display_info *dpyinfo = check_x_display_info (terminal); 3743 struct x_display_info *dpyinfo = check_x_display_info (terminal);
3748 DEFUN ("x-server-vendor", Fx_server_vendor, Sx_server_vendor, 0, 1, 0, 3748 DEFUN ("x-server-vendor", Fx_server_vendor, Sx_server_vendor, 0, 1, 0,
3749 doc: /* Return the "vendor ID" string of the X server of display TERMINAL. 3749 doc: /* Return the "vendor ID" string of the X server of display TERMINAL.
3750 \(Labelling every distributor as a "vendor" embodies the false assumption 3750 \(Labelling every distributor as a "vendor" embodies the false assumption
3751 that operating systems cannot be developed and distributed noncommercially.) 3751 that operating systems cannot be developed and distributed noncommercially.)
3752 The optional argument TERMINAL specifies which display to ask about. 3752 The optional argument TERMINAL specifies which display to ask about.
3753 TERMINAL should be a terminal id, a frame or a display name (a string). 3753 TERMINAL should be a terminal object, a frame or a display name (a string).
3754 If omitted or nil, that stands for the selected frame's display. */) 3754 If omitted or nil, that stands for the selected frame's display. */)
3755 (terminal) 3755 (terminal)
3756 Lisp_Object terminal; 3756 Lisp_Object terminal;
3757 { 3757 {
3758 struct x_display_info *dpyinfo = check_x_display_info (terminal); 3758 struct x_display_info *dpyinfo = check_x_display_info (terminal);
3767 The value is a list of three integers: the major and minor 3767 The value is a list of three integers: the major and minor
3768 version numbers of the X Protocol in use, and the distributor-specific release 3768 version numbers of the X Protocol in use, and the distributor-specific release
3769 number. See also the function `x-server-vendor'. 3769 number. See also the function `x-server-vendor'.
3770 3770
3771 The optional argument TERMINAL specifies which display to ask about. 3771 The optional argument TERMINAL specifies which display to ask about.
3772 TERMINAL should be a terminal id, a frame or a display name (a string). 3772 TERMINAL should be a terminal object, a frame or a display name (a string).
3773 If omitted or nil, that stands for the selected frame's display. */) 3773 If omitted or nil, that stands for the selected frame's display. */)
3774 (terminal) 3774 (terminal)
3775 Lisp_Object terminal; 3775 Lisp_Object terminal;
3776 { 3776 {
3777 struct x_display_info *dpyinfo = check_x_display_info (terminal); 3777 struct x_display_info *dpyinfo = check_x_display_info (terminal);
3783 } 3783 }
3784 3784
3785 DEFUN ("x-display-screens", Fx_display_screens, Sx_display_screens, 0, 1, 0, 3785 DEFUN ("x-display-screens", Fx_display_screens, Sx_display_screens, 0, 1, 0,
3786 doc: /* Return the number of screens on the X server of display TERMINAL. 3786 doc: /* Return the number of screens on the X server of display TERMINAL.
3787 The optional argument TERMINAL specifies which display to ask about. 3787 The optional argument TERMINAL specifies which display to ask about.
3788 TERMINAL should be a terminal id, a frame or a display name (a string). 3788 TERMINAL should be a terminal object, a frame or a display name (a string).
3789 If omitted or nil, that stands for the selected frame's display. */) 3789 If omitted or nil, that stands for the selected frame's display. */)
3790 (terminal) 3790 (terminal)
3791 Lisp_Object terminal; 3791 Lisp_Object terminal;
3792 { 3792 {
3793 struct x_display_info *dpyinfo = check_x_display_info (terminal); 3793 struct x_display_info *dpyinfo = check_x_display_info (terminal);
3796 } 3796 }
3797 3797
3798 DEFUN ("x-display-mm-height", Fx_display_mm_height, Sx_display_mm_height, 0, 1, 0, 3798 DEFUN ("x-display-mm-height", Fx_display_mm_height, Sx_display_mm_height, 0, 1, 0,
3799 doc: /* Return the height in millimeters of the X display TERMINAL. 3799 doc: /* Return the height in millimeters of the X display TERMINAL.
3800 The optional argument TERMINAL specifies which display to ask about. 3800 The optional argument TERMINAL specifies which display to ask about.
3801 TERMINAL should be a terminal id, a frame or a display name (a string). 3801 TERMINAL should be a terminal object, a frame or a display name (a string).
3802 If omitted or nil, that stands for the selected frame's display. */) 3802 If omitted or nil, that stands for the selected frame's display. */)
3803 (terminal) 3803 (terminal)
3804 Lisp_Object terminal; 3804 Lisp_Object terminal;
3805 { 3805 {
3806 struct x_display_info *dpyinfo = check_x_display_info (terminal); 3806 struct x_display_info *dpyinfo = check_x_display_info (terminal);
3809 } 3809 }
3810 3810
3811 DEFUN ("x-display-mm-width", Fx_display_mm_width, Sx_display_mm_width, 0, 1, 0, 3811 DEFUN ("x-display-mm-width", Fx_display_mm_width, Sx_display_mm_width, 0, 1, 0,
3812 doc: /* Return the width in millimeters of the X display TERMINAL. 3812 doc: /* Return the width in millimeters of the X display TERMINAL.
3813 The optional argument TERMINAL specifies which display to ask about. 3813 The optional argument TERMINAL specifies which display to ask about.
3814 TERMINAL should be a terminal id, a frame or a display name (a string). 3814 TERMINAL should be a terminal object, a frame or a display name (a string).
3815 If omitted or nil, that stands for the selected frame's display. */) 3815 If omitted or nil, that stands for the selected frame's display. */)
3816 (terminal) 3816 (terminal)
3817 Lisp_Object terminal; 3817 Lisp_Object terminal;
3818 { 3818 {
3819 struct x_display_info *dpyinfo = check_x_display_info (terminal); 3819 struct x_display_info *dpyinfo = check_x_display_info (terminal);
3824 DEFUN ("x-display-backing-store", Fx_display_backing_store, 3824 DEFUN ("x-display-backing-store", Fx_display_backing_store,
3825 Sx_display_backing_store, 0, 1, 0, 3825 Sx_display_backing_store, 0, 1, 0,
3826 doc: /* Return an indication of whether X display TERMINAL does backing store. 3826 doc: /* Return an indication of whether X display TERMINAL does backing store.
3827 The value may be `always', `when-mapped', or `not-useful'. 3827 The value may be `always', `when-mapped', or `not-useful'.
3828 The optional argument TERMINAL specifies which display to ask about. 3828 The optional argument TERMINAL specifies which display to ask about.
3829 TERMINAL should be a terminal id, a frame or a display name (a string). 3829 TERMINAL should be a terminal object, a frame or a display name (a string).
3830 If omitted or nil, that stands for the selected frame's display. */) 3830 If omitted or nil, that stands for the selected frame's display. */)
3831 (terminal) 3831 (terminal)
3832 Lisp_Object terminal; 3832 Lisp_Object terminal;
3833 { 3833 {
3834 struct x_display_info *dpyinfo = check_x_display_info (terminal); 3834 struct x_display_info *dpyinfo = check_x_display_info (terminal);
3861 doc: /* Return the visual class of the X display TERMINAL. 3861 doc: /* Return the visual class of the X display TERMINAL.
3862 The value is one of the symbols `static-gray', `gray-scale', 3862 The value is one of the symbols `static-gray', `gray-scale',
3863 `static-color', `pseudo-color', `true-color', or `direct-color'. 3863 `static-color', `pseudo-color', `true-color', or `direct-color'.
3864 3864
3865 The optional argument TERMINAL specifies which display to ask about. 3865 The optional argument TERMINAL specifies which display to ask about.
3866 TERMINAL should a terminal id, a frame or a display name (a string). 3866 TERMINAL should a terminal object, a frame or a display name (a string).
3867 If omitted or nil, that stands for the selected frame's display. */) 3867 If omitted or nil, that stands for the selected frame's display. */)
3868 (terminal) 3868 (terminal)
3869 Lisp_Object terminal; 3869 Lisp_Object terminal;
3870 { 3870 {
3871 struct x_display_info *dpyinfo = check_x_display_info (terminal); 3871 struct x_display_info *dpyinfo = check_x_display_info (terminal);
3901 3901
3902 DEFUN ("x-display-save-under", Fx_display_save_under, 3902 DEFUN ("x-display-save-under", Fx_display_save_under,
3903 Sx_display_save_under, 0, 1, 0, 3903 Sx_display_save_under, 0, 1, 0,
3904 doc: /* Return t if the X display TERMINAL supports the save-under feature. 3904 doc: /* Return t if the X display TERMINAL supports the save-under feature.
3905 The optional argument TERMINAL specifies which display to ask about. 3905 The optional argument TERMINAL specifies which display to ask about.
3906 TERMINAL should be a terminal id, a frame or a display name (a string). 3906 TERMINAL should be a terminal object, a frame or a display name (a string).
3907 If omitted or nil, that stands for the selected frame's display. */) 3907 If omitted or nil, that stands for the selected frame's display. */)
3908 (terminal) 3908 (terminal)
3909 Lisp_Object terminal; 3909 Lisp_Object terminal;
3910 { 3910 {
3911 struct x_display_info *dpyinfo = check_x_display_info (terminal); 3911 struct x_display_info *dpyinfo = check_x_display_info (terminal);
4172 } 4172 }
4173 4173
4174 DEFUN ("x-close-connection", Fx_close_connection, 4174 DEFUN ("x-close-connection", Fx_close_connection,
4175 Sx_close_connection, 1, 1, 0, 4175 Sx_close_connection, 1, 1, 0,
4176 doc: /* Close the connection to TERMINAL's X server. 4176 doc: /* Close the connection to TERMINAL's X server.
4177 For TERMINAL, specify a terminal id, a frame or a display name (a 4177 For TERMINAL, specify a terminal object, a frame or a display name (a
4178 string). If TERMINAL is nil, that stands for the selected frame's 4178 string). If TERMINAL is nil, that stands for the selected frame's
4179 terminal. */) 4179 terminal. */)
4180 (terminal) 4180 (terminal)
4181 Lisp_Object terminal; 4181 Lisp_Object terminal;
4182 { 4182 {
4208 If ON is nil, allow buffering of requests. 4208 If ON is nil, allow buffering of requests.
4209 Turning on synchronization prohibits the Xlib routines from buffering 4209 Turning on synchronization prohibits the Xlib routines from buffering
4210 requests and seriously degrades performance, but makes debugging much 4210 requests and seriously degrades performance, but makes debugging much
4211 easier. 4211 easier.
4212 The optional second argument TERMINAL specifies which display to act on. 4212 The optional second argument TERMINAL specifies which display to act on.
4213 TERMINAL should be a terminal id, a frame or a display name (a string). 4213 TERMINAL should be a terminal object, a frame or a display name (a string).
4214 If TERMINAL is omitted or nil, that stands for the selected frame's display. */) 4214 If TERMINAL is omitted or nil, that stands for the selected frame's display. */)
4215 (on, terminal) 4215 (on, terminal)
4216 Lisp_Object terminal, on; 4216 Lisp_Object terminal, on;
4217 { 4217 {
4218 struct x_display_info *dpyinfo = check_x_display_info (terminal); 4218 struct x_display_info *dpyinfo = check_x_display_info (terminal);