This is multi-frame.c in view mode; [Download] [Up]
/* Functions for all window systems Copyright (C) 1989, 1992, 1993 Free Software Foundation. This file is part of GNU Emacs. GNU Emacs is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GNU Emacs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Emacs; see the file COPYING. If not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "config.h" #ifdef HAVE_WINDOW_SYSTEM #include <stdio.h> #include "lisp.h" #include "dispextern.h" #include "frame.h" #include "multi-frame.h" #include "window.h" #include "termhooks.h" #include "blockinput.h" #include "paths.h" #define COMPILING_MULTI_TERM #ifdef HAVE_X_WINDOWS #include "xterm.h" #endif #ifdef HAVE_NS #include "nsterm.h" #endif extern Lisp_Object Qx, Qns, Vwindow_system; Lisp_Object QATOM; Lisp_Object QATOM_PAIR; Lisp_Object QCLIPBOARD; Lisp_Object QCUT_BUFFER0; Lisp_Object QCUT_BUFFER1; Lisp_Object QCUT_BUFFER2; Lisp_Object QCUT_BUFFER3; Lisp_Object QCUT_BUFFER4; Lisp_Object QCUT_BUFFER5; Lisp_Object QCUT_BUFFER6; Lisp_Object QCUT_BUFFER7; Lisp_Object QDELETE; Lisp_Object QEMACS_TMP; Lisp_Object QINCR; Lisp_Object QINTEGER; Lisp_Object QMULTIPLE; Lisp_Object QNULL; Lisp_Object QPRIMARY; Lisp_Object QSECONDARY; Lisp_Object QSTRING; Lisp_Object QTARGETS; Lisp_Object QTEXT; Lisp_Object QTIMESTAMP; Lisp_Object QFILE_NAME; Lisp_Object Qauto_lower; Lisp_Object Qauto_raise; Lisp_Object Qbackground_color; Lisp_Object Qbar; Lisp_Object Qborder_color; Lisp_Object Qborder_width; Lisp_Object Qbox; Lisp_Object Qbuffered; Lisp_Object Qcursor_color; Lisp_Object Qcursor_type; Lisp_Object Qdisplay; Lisp_Object Qface; Lisp_Object Qfontsize; Lisp_Object Qforeground_color; Lisp_Object Qgeometry; Lisp_Object Qheight; Lisp_Object Qicon_left; Lisp_Object Qicon_top; Lisp_Object Qicon_type; Lisp_Object Qicon_name; Lisp_Object Qinternal_border_width; Lisp_Object Qleft; Lisp_Object Qminibuffer; Lisp_Object Qmouse_color; Lisp_Object Qmouse_face; Lisp_Object Qname; Lisp_Object Qnone; Lisp_Object Qonly; Lisp_Object Qparent_id; Lisp_Object Qpixmap_spec_p; Lisp_Object Qpriority; Lisp_Object Qretained; Lisp_Object Qreverse_color; Lisp_Object Qright; Lisp_Object Qscroll_bar_width; Lisp_Object Qsuppress_icon; Lisp_Object Qtop; Lisp_Object Qundefined_color; Lisp_Object Qunderline; Lisp_Object Qunsplittable; Lisp_Object Qvertical_scroll_bars; Lisp_Object Qvisibility; Lisp_Object Qwidth; Lisp_Object Qwindow; Lisp_Object Qwindow_id; Lisp_Object Qresource_name; Lisp_Object Quser_position; Lisp_Object Quser_size; Lisp_Object Vlost_selection_hooks; Lisp_Object Vsent_selection_hooks; /* Search path for bitmap files. */ Lisp_Object Vbitmap_file_path; /* This is an association list whose elements are of the form ( SELECTION-NAME SELECTION-VALUE SELECTION-TIMESTAMP FRAME) SELECTION-NAME is a lisp symbol, whose name is the name of an X Atom. SELECTION-VALUE is the value that emacs owns for that selection. It may be any kind of Lisp object. SELECTION-TIMESTAMP is the time at which emacs began owning this selection, as a cons of two 16-bit numbers (making a 32 bit time.) FRAME is the frame for which we made the selection. If there is an entry in this alist, then it can be assumed that Emacs owns that selection. The only (eq) parts of this list that are visible from Lisp are the selection-values. */ Lisp_Object Vselection_alist; /* This is an alist whose CARs are selection-types (whose names are the same as the names of X Atoms) and whose CDRs are the names of Lisp functions to call to convert the given Emacs selection value to a string representing the given selection type. This is for Lisp-level extension of the emacs selection handling. */ Lisp_Object Vselection_converter_alist; /* If the selection owner takes too long to reply to a selection request, we give up on it. This is in milliseconds (0 = no timeout.) */ int selection_timeout; /* face counter for when we don't have a window-system */ static int term_next_face_id; /* The number of the face to use to indicate the region. */ int region_face; /* Nonzero if we can use mouse menus. */ int have_menus_p () { #ifdef HAVE_MENUS if (EQ(Vwindow_system,Qx)) return x_have_menus_p (); #endif #ifdef HAVE_NS if (EQ(Vwindow_system,Qns)) return ns_have_menus_p (); #endif return 0; } DEFUN ("close-connection", Fclose_connection, Sclose_connection, 1, 1, 0, "Close the connection to DISPLAY's server.\n\ For more details see the window system specific function.") (display) Lisp_Object display; { #ifdef HAVE_X_WINDOWS if (EQ(Vwindow_system,Qx)) return Fx_close_connection(); #endif #ifdef HAVE_NS if (EQ(Vwindow_system,Qns)) return Fns_close_connection(); #endif return Qnil; } DEFUN ("color-defined-p", Fcolor_defined_p, Scolor_defined_p, 1, 2, 0, "Return non-nil if color COLOR is supported on frame FRAME.\n\ If FRAME is omitted or nil, use the selected frame.") (color, frame) Lisp_Object color, frame; { #ifdef HAVE_X_WINDOWS if (EQ(Vwindow_system,Qx)) return Fx_color_defined_p(color, frame); #endif #ifdef HAVE_NS if (EQ(Vwindow_system,Qns)) return Fns_color_defined_p(color, frame); #endif error("Window system unavailable."); } DEFUN ("color-values", Fcolor_values, Scolor_values, 1, 2, 0, "Return a description of the color named COLOR on frame FRAME.\n\ For more details see the window system specific function.") (color, frame) Lisp_Object color, frame; { #ifdef HAVE_X_WINDOWS if (EQ(Vwindow_system,Qx)) return Fx_color_values(color, frame); #endif #ifdef HAVE_NS if (EQ(Vwindow_system,Qns)) return Fns_color_values(color, frame); #endif error("Window system unavailable."); } DEFUN ("create-frame", Fcreate_frame, Screate_frame, 1, 1, 0, "Make a new window in the current window system.\n\ For more details see the window system specific function.") (parms) Lisp_Object parms; { #ifdef HAVE_X_WINDOWS if (EQ(Vwindow_system,Qx)) return Fx_create_frame(parms); #endif #ifdef HAVE_NS if (EQ(Vwindow_system,Qns)) return Fns_create_frame(parms); #endif error("Window system unavailable."); } DEFUN ("disown-selection-internal", Fdisown_selection_internal, Sdisown_selection_internal, 1, 2, 0, "If we own the selection SELECTION, disown it.") (selection, time) Lisp_Object selection; Lisp_Object time; { #ifdef HAVE_X_WINDOWS if (EQ(Vwindow_system,Qx)) return Fx_disown_selection_internal(selection,time); #endif #ifdef HAVE_NS if (EQ(Vwindow_system,Qns)) return Fns_disown_selection_internal(selection,time); #endif error("Window system unavailable."); } DEFUN ("display-color-p", Fdisplay_color_p, Sdisplay_color_p, 0, 1, 0, "Return t if the display supports color.\n\ The optional argument DISPLAY specifies which display to ask about.\n\ DISPLAY should be either a frame or a display name (a string).\n\ If omitted or nil, that stands for the selected frame's display.") (display) Lisp_Object display; { #ifdef HAVE_X_WINDOWS if (EQ(Vwindow_system,Qx)) return Fx_display_color_p (display); #endif #ifdef HAVE_NS if (EQ(Vwindow_system,Qns)) return Fns_display_color_p (display); #endif error("Window system unavailable."); } DEFUN ("display-grayscale-p", Fdisplay_grayscale_p, Sdisplay_grayscale_p, 0, 1, 0, "Return t if the display supports shades of gray.\n\ Note that color displays do support shades of gray.\n\ The optional argument DISPLAY specifies which display to ask about.\n\ DISPLAY should be either a frame or a display name (a string).\n\ If omitted or nil, that stands for the selected frame's display.") (display) Lisp_Object display; { #ifdef HAVE_X_WINDOWS if (EQ(Vwindow_system,Qx)) return Fx_display_grayscale_p (display); #endif #ifdef HAVE_NS if (EQ(Vwindow_system,Qns)) return Fns_display_grayscale_p (display); #endif error("Window system unavailable."); } DEFUN ("display-pixel-width", Fdisplay_pixel_width, Sdisplay_pixel_width, 0, 1, 0, "Returns the width in pixels of the display DISPLAY.\n\ The optional argument DISPLAY specifies which display to ask about.\n\ DISPLAY should be either a frame or a display name (a string).\n\ If omitted or nil, that stands for the selected frame's display.") (display) Lisp_Object display; { #ifdef HAVE_X_WINDOWS if (EQ(Vwindow_system,Qx)) return Fx_display_pixel_width(display); #endif #ifdef HAVE_NS if (EQ(Vwindow_system,Qns)) return Fns_display_pixel_width(display); #endif error("Window system unavailable."); } DEFUN ("display-pixel-height", Fdisplay_pixel_height, Sdisplay_pixel_height, 0, 1, 0, "Returns the height in pixels of the display DISPLAY.\n\ The optional argument DISPLAY specifies which display to ask about.\n\ DISPLAY should be either a frame or a display name (a string).\n\ If omitted or nil, that stands for the selected frame's display.") (display) Lisp_Object display; { #ifdef HAVE_X_WINDOWS if (EQ(Vwindow_system,Qx)) return Fx_display_pixel_height(display); #endif #ifdef HAVE_NS if (EQ(Vwindow_system,Qns)) return Fns_display_pixel_height(display); #endif error("Window system unavailable."); } DEFUN ("display-planes", Fdisplay_planes, Sdisplay_planes, 0, 1, 0, "Returns the number of bitplanes of the display DISPLAY.\n\ The optional argument DISPLAY specifies which display to ask about.\n\ DISPLAY should be either a frame or a display name (a string).\n\ If omitted or nil, that stands for the selected frame's display.") (display) Lisp_Object display; { #ifdef HAVE_X_WINDOWS if (EQ(Vwindow_system,Qx)) return Fx_display_planes(display); #endif #ifdef HAVE_NS if (EQ(Vwindow_system,Qns)) return Fns_display_planes(display); #endif error("Window system unavailable."); } DEFUN ("display-color-cells", Fdisplay_color_cells, Sdisplay_color_cells, 0, 1, 0, "Returns the number of color cells of the display DISPLAY.\n\ The optional argument DISPLAY specifies which display to ask about.\n\ DISPLAY should be either a frame or a display name (a string).\n\ If omitted or nil, that stands for the selected frame's display.") (display) Lisp_Object display; { #ifdef HAVE_X_WINDOWS if (EQ(Vwindow_system,Qx)) return Fx_display_color_cells(display); #endif #ifdef HAVE_NS if (EQ(Vwindow_system,Qns)) return Fns_display_color_cells(display); #endif error("Window system unavailable."); } DEFUN ("server-max-request-size", Fserver_max_request_size, Sserver_max_request_size, 0, 1, 0, "Returns the maximum request size of the server of display DISPLAY.\n\ The optional argument DISPLAY specifies which display to ask about.\n\ DISPLAY should be either a frame or a display name (a string).\n\ If omitted or nil, that stands for the selected frame's display.") (display) Lisp_Object display; { #ifdef HAVE_X_WINDOWS if (EQ(Vwindow_system,Qx)) return Fx_server_max_request_size(display); #endif #ifdef HAVE_NS if (EQ(Vwindow_system,Qns)) return Fns_server_max_request_size(display); #endif error("Window system unavailable."); } DEFUN ("server-vendor", Fserver_vendor, Sserver_vendor, 0, 1, 0, "Returns the vendor ID string of the server of display DISPLAY.\n\ The optional argument DISPLAY specifies which display to ask about.\n\ DISPLAY should be either a frame or a display name (a string).\n\ If omitted or nil, that stands for the selected frame's display.") (display) Lisp_Object display; { #ifdef HAVE_X_WINDOWS if (EQ(Vwindow_system,Qx)) return Fx_server_vendor(display); #endif #ifdef HAVE_NS if (EQ(Vwindow_system,Qns)) return Fns_server_vendor(display); #endif error("Window system unavailable."); } DEFUN ("server-version", Fserver_version, Sserver_version, 0, 1, 0, "Returns the version numbers of the server of display DISPLAY.\n\ See also the function `server-vendor'.\n\n\ The optional argument DISPLAY specifies which display to ask about.\n\ DISPLAY should be either a frame or a display name (a string).\n\ If omitted or nil, that stands for the selected frame's display.\n\n\ For more details see the window system specific function.") (display) Lisp_Object display; { #ifdef HAVE_X_WINDOWS if (EQ(Vwindow_system,Qx)) return Fx_server_version(display); #endif #ifdef HAVE_NS if (EQ(Vwindow_system,Qns)) return Fns_server_version(display); #endif error("Window system unavailable."); } DEFUN ("display-screens", Fdisplay_screens, Sdisplay_screens, 0, 1, 0, "Returns the number of screens on the server of display DISPLAY.\n\ The optional argument DISPLAY specifies which display to ask about.\n\ DISPLAY should be either a frame or a display name (a string).\n\ If omitted or nil, that stands for the selected frame's display.") (display) Lisp_Object display; { #ifdef HAVE_X_WINDOWS if (EQ(Vwindow_system,Qx)) return Fx_display_screens(display); #endif #ifdef HAVE_NS if (EQ(Vwindow_system,Qns)) return Fns_display_screens(display); #endif error("Window system unavailable."); } DEFUN ("display-mm-height", Fdisplay_mm_height, Sdisplay_mm_height, 0, 1, 0, "Returns the height in millimeters of the display DISPLAY.\n\ The optional argument DISPLAY specifies which display to ask about.\n\ DISPLAY should be either a frame or a display name (a string).\n\ If omitted or nil, that stands for the selected frame's display.") (display) Lisp_Object display; { #ifdef HAVE_X_WINDOWS if (EQ(Vwindow_system,Qx)) return Fx_display_mm_height(display); #endif #ifdef HAVE_NS if (EQ(Vwindow_system,Qns)) return Fns_display_mm_height(display); #endif error("Window system unavailable."); } DEFUN ("display-mm-width", Fdisplay_mm_width, Sdisplay_mm_width, 0, 1, 0, "Returns the width in millimeters of the display DISPLAY.\n\ The optional argument DISPLAY specifies which display to ask about.\n\ DISPLAY should be either a frame or a display name (a string).\n\ If omitted or nil, that stands for the selected frame's display.") (display) Lisp_Object display; { #ifdef HAVE_X_WINDOWS if (EQ(Vwindow_system,Qx)) return Fx_display_mm_width(display); #endif #ifdef HAVE_NS if (EQ(Vwindow_system,Qns)) return Fns_display_mm_width(display); #endif error("Window system unavailable."); } DEFUN ("display-backing-store", Fdisplay_backing_store, Sdisplay_backing_store, 0, 1, 0, "Returns an indication of whether display DISPLAY does backing store.\n\ The value may be `always', `when-mapped', or `not-useful'.\n\ The optional argument DISPLAY specifies which display to ask about.\n\ DISPLAY should be either a frame or a display name (a string).\n\ If omitted or nil, that stands for the selected frame's display.") (display) Lisp_Object display; { #ifdef HAVE_X_WINDOWS if (EQ(Vwindow_system,Qx)) return Fx_display_backing_store(display); #endif #ifdef HAVE_NS if (EQ(Vwindow_system,Qns)) return Fns_display_backing_store(display); #endif error("Window system unavailable."); } DEFUN ("display-visual-class", Fdisplay_visual_class, Sdisplay_visual_class, 0, 1, 0, "Returns the visual class of the display DISPLAY.\n\ The value is one of the symbols `static-gray', `gray-scale',\n\ `static-color', `pseudo-color', `true-color', or `direct-color'.\n\n\ The optional argument DISPLAY specifies which display to ask about.\n\ DISPLAY should be either a frame or a display name (a string).\n\ If omitted or nil, that stands for the selected frame's display.") (display) Lisp_Object display; { #ifdef HAVE_X_WINDOWS if (EQ(Vwindow_system,Qx)) return Fx_display_visual_class(display); #endif #ifdef HAVE_NS if (EQ(Vwindow_system,Qns)) return Fns_display_visual_class(display); #endif error("Window system unavailable."); } DEFUN ("display-save-under", Fdisplay_save_under, Sdisplay_save_under, 0, 1, 0, "Returns t if the display DISPLAY supports the save-under feature.\n\ The optional argument DISPLAY specifies which display to ask about.\n\ DISPLAY should be either a frame or a display name (a string).\n\ If omitted or nil, that stands for the selected frame's display.") (display) Lisp_Object display; { #ifdef HAVE_X_WINDOWS if (EQ(Vwindow_system,Qx)) return Fx_display_save_under(display); #endif #ifdef HAVE_NS if (EQ(Vwindow_system,Qns)) return Fns_display_save_under(display); #endif error("Window system unavailable."); } DEFUN ("get-cut-buffer-internal", Fget_cut_buffer_internal, Sget_cut_buffer_internal, 1, 1, 0, "Returns the value of the named cut buffer.") (buffer) Lisp_Object buffer; { #ifdef HAVE_X_WINDOWS if (EQ(Vwindow_system,Qx)) return Fx_get_cut_buffer_internal(buffer); #endif #ifdef HAVE_NS if (EQ(Vwindow_system,Qns)) return Fns_get_cut_buffer_internal(buffer); #endif error("Window system unavailable."); } DEFUN ("get-resource", Fget_resource, Sget_resource, 2, 4, 0, "Return the appropriate value from the defaults database.\n\ For more details see the window system specific function.") (attribute, class, component, subclass) Lisp_Object attribute, class, component, subclass; { #ifdef HAVE_X_WINDOWS if (EQ(Vwindow_system,Qx)) return Fx_get_resource(attribute,class,component,subclass); #endif #ifdef HAVE_NS if (EQ(Vwindow_system,Qns)) return Fns_get_resource(attribute,class); #endif error("Window system unavailable."); } DEFUN ("set-resource", Fset_resource, Sset_resource, 3, 3, 0, "Sets the appropriate value in the defaults database.\n\ For more details see the window system specific function.") (attribute, class, value) Lisp_Object attribute, class, value; { #ifdef HAVE_NS if (EQ(Vwindow_system,Qns)) return Fns_set_resource(attribute,class,value); #endif error("Window system unavailable."); } DEFUN ("get-selection-internal", Fget_selection_internal, Sget_selection_internal, 2, 2, 0, "Return the text selected from some window.\n\ For more details see the window system specific function.") (selection_symbol, target_type) Lisp_Object selection_symbol, target_type; { #ifdef HAVE_X_WINDOWS if (EQ(Vwindow_system,Qx)) return Fx_get_selection_internal(selection_symbol,target_type); #endif #ifdef HAVE_NS if (EQ(Vwindow_system,Qns)) return Fns_get_selection_internal(selection_symbol,target_type); #endif error("Window system unavailable."); } DEFUN ("hide-emacs", Fhide_emacs, Shide_emacs, 1, 1, 0, "If ON is non-nil, the entire emacs application is hidden.\n\ Otherwise if emacs is hidden, it is unhidden.") (on) Lisp_Object on; { #ifdef HAVE_NS if (EQ(Vwindow_system,Qns)) return Fns_hide_emacs(on); #endif error("Window system unavailable."); } DEFUN ("internal-next-face-id", Finternal_next_face_id, Sinternal_next_face_id, 0, 0, 0, "...") () { #ifdef HAVE_X_WINDOWS if (EQ(Vwindow_system,Qx)) return Fx_internal_next_face_id(); #endif #ifdef HAVE_NS if (EQ(Vwindow_system,Qns)) return Fns_internal_next_face_id(); #endif if (NILP(Vwindow_system)) return make_number (term_next_face_id++); error("Window system unavailable."); } DEFUN ("list-fonts", Flist_fonts, Slist_fonts, 1, 3, 0, "Return a list of the names of available fonts matching PATTERN.\n\ If optional arguments FACE and FRAME are specified, return only fonts\n\ the same size as FACE on FRAME.\n\ \n\ PATTERN is a string, perhaps with wildcard characters;\n\ the * character matches any substring, and\n\ the ? character matches any single character.\n\ PATTERN is case-insensitive.\n\ FACE is a face name - a symbol.\n\ \n\ The return value is a list of strings, suitable as arguments to\n\ set-face-font.\n\ \n\ The list does not include fonts Emacs can't use (i.e. proportional\n\ fonts), even if they match PATTERN and FACE.") (pattern, face, frame) Lisp_Object pattern, face, frame; { #ifdef HAVE_X_WINDOWS if (EQ(Vwindow_system,Qx)) return Fx_list_fonts(pattern,face,frame); #endif #ifdef HAVE_NS if (EQ(Vwindow_system,Qns)) return Fns_list_fonts(pattern,face,frame); #endif error("Window system unavailable."); } DEFUN ("make-face-internal", Fmake_face_internal, Smake_face_internal, 1, 1, 0, "Create face number FACE-ID on all frames.") (faceid) Lisp_Object faceid; { #ifdef HAVE_X_WINDOWS if (EQ(Vwindow_system,Qx)) return Fx_make_face_internal(faceid); #endif #ifdef HAVE_NS if (EQ(Vwindow_system,Qns)) return Fns_make_face_internal(faceid); #endif if (NILP(Vwindow_system)) return Qnil; error("Window system unavailable."); } DEFUN ("open-connection", Fopen_connection, Sopen_connection, 1, 3, 0, "Open connection to window system.\n\ For more details see the window system specific function.") (display, resource_string, must_succeed) Lisp_Object display, resource_string, must_succeed; { #ifdef HAVE_X_WINDOWS if (EQ(Vwindow_system,Qx)) return Fx_open_connection(display, resource_string, must_succeed); #endif #ifdef HAVE_NS if (EQ(Vwindow_system,Qns)) return Fns_open_connection(display, resource_string, must_succeed); #endif error("Window system unavailable."); } DEFUN ("own-selection-internal", Fown_selection_internal, Sown_selection_internal, 2, 2, 0, "Assert a selection.\n\ For more details see the window system specific function.") (selection_name, selection_value) Lisp_Object selection_name,selection_value; { #ifdef HAVE_X_WINDOWS if (EQ(Vwindow_system,Qx)) return Fx_own_selection_internal(selection_name,selection_value); #endif #ifdef HAVE_NS if (EQ(Vwindow_system,Qns)) return Fns_own_selection_internal(selection_name,selection_value); #endif error("Window system unavailable."); } DEFUN ("pixmap-spec-p", Fpixmap_spec_p, Spixmap_spec_p, 1, 1, 0, "Return t if OBJECT is a valid pixmap specification.") (object) Lisp_Object object; { #ifdef HAVE_X_WINDOWS if (EQ(Vwindow_system,Qx)) return Fx_pixmap_spec_p (object); #endif #ifdef HAVE_NS if (EQ(Vwindow_system,Qns)) return Fns_pixmap_spec_p (object); #endif error("Window system unavailable."); } DEFUN ("popup-menu", Fpopup_menu, Spopup_menu, 1, 2, 0, "Pop up a deck-of-cards menu and return user's selection.\n\ For more details see the window system specific function.") (position,menu) Lisp_Object position,menu; { #ifdef HAVE_X_WINDOWS if (EQ(Vwindow_system,Qx) || NILP(Vwindow_system)) return Fx_popup_menu(position,menu); #endif #ifdef HAVE_NS if (EQ(Vwindow_system,Qns) || NILP(Vwindow_system)) return Fns_popup_menu(position,menu); #endif if (NILP(Vwindow_system)) return Qnil; error("Window system unavailable."); } DEFUN ("popup-dialog", Fpopup_dialog, Spopup_dialog, 2, 2, 0, "Pop up a dialog box and return user's selection.\n\ For more details see the window system specific function.") (position,contents) Lisp_Object position,contents; { #ifdef HAVE_X_WINDOWS if (EQ(Vwindow_system,Qx)) return Fx_popup_dialog(position,contents); #endif #ifdef HAVE_NS if (EQ(Vwindow_system,Qns)) return Fns_popup_dialog(position,contents); #endif error("Window system unavailable."); } DEFUN ("rotate-cut-buffers-internal", Frotate_cut_buffers_internal, Srotate_cut_buffers_internal, 1, 1, 0, "Rotate the values of the cut buffers by the given number of steps;\n\ positive means move values forward, negative means backward.") (n) Lisp_Object n; { #ifdef HAVE_X_WINDOWS if (EQ(Vwindow_system,Qx)) return Fx_rotate_cut_buffers_internal(n); #endif #ifdef HAVE_NS if (EQ(Vwindow_system,Qns)) return Fns_rotate_cut_buffers_internal(n); #endif error("Window system unavailable."); } DEFUN ("selection-exists-p", Fselection_exists_p, Sselection_exists_p, 0, 1, 0, "Whether there is an owner for the given selection.\n\ For more details see the window system specific function.") (selection) Lisp_Object selection; { #ifdef HAVE_X_WINDOWS if (EQ(Vwindow_system,Qx)) return Fx_selection_exists_p(selection); #endif #ifdef HAVE_NS if (EQ(Vwindow_system,Qns)) return Fns_selection_exists_p(selection); #endif error("Window system unavailable."); } DEFUN ("selection-owner-p", Fselection_owner_p, Sselection_owner_p, 0, 1, 0, "Whether the current Emacs process owns the given selection.\n\ For more details see the window system specific function.") (selection) Lisp_Object selection; { #ifdef HAVE_X_WINDOWS if (EQ(Vwindow_system,Qx)) return Fx_selection_owner_p(selection); #endif #ifdef HAVE_NS if (EQ(Vwindow_system,Qns)) return Fns_selection_owner_p(selection); #endif error("Window system unavailable."); } DEFUN ("set-face-attribute-internal", Fset_face_attribute_internal, Sset_face_attribute_internal, 4, 4, 0, "") (face_id, attr_name, attr_value, frame) Lisp_Object face_id, attr_name, attr_value, frame; { CHECK_FRAME (frame, 0); #ifdef HAVE_X_WINDOWS if (FRAME_X_P(XFRAME(frame))) return Fx_set_face_attribute_internal(face_id, attr_name, attr_value, frame); #endif #ifdef HAVE_NS if (FRAME_NS_P(XFRAME(frame))) return Fns_set_face_attribute_internal(face_id, attr_name, attr_value, frame); #endif error("Window system unavailable."); } DEFUN ("store-cut-buffer-internal", Fstore_cut_buffer_internal, Sstore_cut_buffer_internal, 2, 2, 0, "Sets the value of the named cut buffer (typically CUT_BUFFER0).") (buffer, string) Lisp_Object buffer, string; { #ifdef HAVE_X_WINDOWS if (EQ(Vwindow_system,Qx)) return Fx_store_cut_buffer_internal(buffer, string); #endif #ifdef HAVE_NS if (EQ(Vwindow_system,Qns)) return Fns_store_cut_buffer_internal(buffer, string); #endif error("Window system unavailable."); } DEFUN ("display-list", Fdisplay_list, Sdisplay_list, 0, 0, 0, "Return the list of display names that Emacs has connections to.") () { #ifdef HAVE_X_WINDOWS if (EQ (Vwindow_system, Qx)) return Fx_display_list (); #endif #ifdef HAVE_NS if (EQ (Vwindow_system, Qns)) return Fns_display_list (); #endif error("Window system unavailable."); } DEFUN ("synchronize", Fsynchronize, Ssynchronize, 1, 2, 0, "If ON is non-nil, report window system errors as soon as the\n\ erring request is made.\n\ If ON is nil, allow buffering of requests.") (on, display) Lisp_Object on, display; { #ifdef HAVE_X_WINDOWS if (EQ(Vwindow_system,Qx)) return Fx_synchronize(on, display); #endif #ifdef HAVE_NS if (EQ(Vwindow_system,Qns)) return Fns_synchronize(on, display); #endif error("Window system unavailable."); } DEFUN ("focus-frame", Ffocus_frame, Sfocus_frame, 1, 1, 0, "This function is obsolete, and does nothing.") (frame) Lisp_Object frame; { return Qnil; } DEFUN ("unfocus-frame", Funfocus_frame, Sunfocus_frame, 0, 0, 0, "This function is obsolete, and does nothing.") () { return Qnil; } void char_height() { /* XXX */ } void char_width() { /* XXX */ } void clear_face_cache(void) { #ifdef HAVE_X_WINDOWS if (EQ(Vwindow_system,Qx)) { x_clear_face_cache(); return; } #endif #ifdef HAVE_NS if (EQ(Vwindow_system,Qns)) { ns_clear_face_cache(); return; } #endif } int compute_char_face(struct frame *f, struct window *w,int pos, int region_beg,int region_end,int *endptr,int limit, int mouse) { #ifdef HAVE_X_WINDOWS if (FRAME_X_P(f)) return x_compute_char_face(f,w,pos,region_beg,region_end,endptr,limit,mouse); #endif #ifdef HAVE_NS if (FRAME_NS_P(f)) return ns_compute_char_face(f,w,pos,region_beg,region_end,endptr,limit,mouse); #endif return 0; } int compute_glyph_face(struct frame *f, int face_code, int current_face) { #ifdef HAVE_X_WINDOWS if (FRAME_X_P(f)) return x_compute_glyph_face(f,face_code,current_face); #endif #ifdef HAVE_NS if (FRAME_NS_P(f)) return ns_compute_glyph_face(f,face_code,current_face); #endif return 0; } int compute_glyph_face_1(struct frame *f, Lisp_Object face_name, int current_face) { #ifdef HAVE_X_WINDOWS if (FRAME_X_P(f)) return x_compute_glyph_face_1(f,face_name,current_face); #endif #ifdef HAVE_NS if (FRAME_NS_P(f)) return ns_compute_glyph_face_1(f,face_name,current_face); #endif return 0; } void destroy_window(struct frame *f) { #ifdef HAVE_X_WINDOWS if (FRAME_X_P (f)) { x_destroy_window (f); return; } #endif #ifdef HAVE_NS if (FRAME_NS_P(f)) { ns_destroy_window (f); return; } #endif return; } void explicitly_set_name(struct frame *f, Lisp_Object arg, Lisp_Object oldval) { #ifdef HAVE_X_WINDOWS if (FRAME_X_P (f)) { x_explicitly_set_name (f,arg,oldval); return; } #endif #ifdef HAVE_NS if (FRAME_NS_P(f)) { ns_explicitly_set_name (f,arg,oldval); return; } #endif return; } void face_name_id_number() { /* XXX */ } void focus_on_frame(struct frame *f) { #ifdef HAVE_X_WINDOWS if (FRAME_X_P (f)) { x_focus_on_frame (f); return; } #endif #ifdef HAVE_NS if (FRAME_NS_P(f)) { ns_focus_on_frame (f); return; } #endif return; } void font_height() { /* XXX */ } void font_width() { /* XXX */ } void free_frame_faces() { /* XXX */ } void handle_selection_clear(struct input_event *event) { #ifdef HAVE_X_WINDOWS if (EQ(Vwindow_system,Qx)) { x_handle_selection_clear(event); return; } #endif #ifdef HAVE_NS if (EQ(Vwindow_system,Qns)) { ns_handle_selection_clear(event); return; } #endif } void handle_selection_request(struct input_event *event) { #ifdef HAVE_X_WINDOWS if (EQ(Vwindow_system,Qx)) { x_handle_selection_request(event); return; } #endif #ifdef HAVE_NS if (EQ(Vwindow_system,Qns)) { ns_handle_selection_request(event); return; } #endif } void iconify_frame(struct frame *f) { #ifdef HAVE_X_WINDOWS if (FRAME_X_P (f)) { x_iconify_frame (f); return; } #endif #ifdef HAVE_NS if (FRAME_NS_P(f)) { ns_iconify_frame (f); return; } #endif return; } void implicitly_set_name(struct frame *f, Lisp_Object arg, Lisp_Object oldval) { #ifdef HAVE_X_WINDOWS if (FRAME_X_P (f)) { x_implicitly_set_name (f,arg,oldval); return; } #endif #ifdef HAVE_NS if (FRAME_NS_P(f)) { ns_implicitly_set_name (f,arg,oldval); return; } #endif return; } void init_frame_faces() { /* XXX */ } void lower_frame() { /* XXX */ } void make_frame_invisible() { /* XXX */ } void make_frame_visible() { /* XXX */ } void new_font() { /* XXX */ } void next_face_id() { /* XXX */ } void pixel_height() { /* XXX */ } void pixel_width() { /* XXX */ } void raise_frame() { /* XXX */ } void recompute_basic_faces() { /* XXX */ } void report_frame_params() { /* XXX */ } void set_autolower() { /* XXX */ } void set_autoraise() { /* XXX */ } void set_background_color() { /* XXX */ } void set_doc_edited() { /* XXX */ } void set_font() { /* XXX */ } void set_foreground_color() { /* XXX */ } void set_frame_parameters() { /* XXX */ } void set_internal_border_width() { /* XXX */ } void set_mouse_position() { /* XXX */ } void set_name() { /* XXX */ } void set_offset() { /* XXX */ } void set_vertical_scroll_bars() { /* XXX */ } void set_visibility() { /* XXX */ } void set_window_size() { /* XXX */ } void unfocus_frame(struct frame *f) { #ifdef HAVE_X_WINDOWS if (FRAME_X_P(f)) { x_unfocus_frame (f); return; } #endif #ifdef HAVE_NS if (FRAME_NS_P(f)) { ns_unfocus_frame (f); return; } #endif return; } void glyph_to_pixel_coords(struct frame *f,int x,int y,int *pix_x,int *pix_y) { #ifdef HAVE_X_WINDOWS if (FRAME_X_P(f)) { x_glyph_to_pixel_coords(f,x,y,pix_x,pix_y); return; } #endif #ifdef HAVE_NS if (FRAME_NS_P(f)) { ns_glyph_to_pixel_coords(f,x,y,pix_x,pix_y); return; } #endif return; } void pixel_to_glyph_coords(struct frame *f,int pix_x,int pix_y,int *x,int *y, void *bounds,int noclip) { #ifdef HAVE_X_WINDOWS if (FRAME_X_P(f)) { x_pixel_to_glyph_coords(f,pix_x,pix_y,x,y,bounds,noclip); return; } #endif #ifdef HAVE_NS if (FRAME_NS_P(f)) { ns_pixel_to_glyph_coords(f,pix_x,pix_y,x,y,bounds,noclip); return; } #endif return; } Lisp_Object get_focus_frame (frame) struct frame *frame; { #ifdef HAVE_X_WINDOWS if (EQ(Vwindow_system,Qx)) return x_get_focus_frame (frame); #endif #ifdef HAVE_NS if (EQ(Vwindow_system,Qns)) return ns_get_focus_frame (frame); #endif return Qnil; } void win_sync(Lisp_Object f) { /* FIXME/cl */ /* CHECK_FRAME (f,0); */ #ifdef HAVE_X_WINDOWS if (FRAME_X_P(XFRAME(f))) { x_sync(f); return; } #endif #ifdef HAVE_NS if (FRAME_NS_P(XFRAME(f))) { ns_sync(f); return; } #endif return; } void set_frame_menubar (struct frame *f, int first_time, int deep_p) { #ifdef HAVE_X_WINDOWS #ifdef USE_X_TOOLKIT if (FRAME_X_P(f)) { x_set_frame_menubar(f,first_time, deep_p); return; } #endif #endif #ifdef HAVE_NS if (FRAME_NS_P(f)) { ns_set_frame_menubar(f,first_time, deep_p); return; } #endif return; } syms_of_multi_frame() { DEFVAR_INT ("region-face", ®ion_face, "Face number to use to highlight the region\n\ The region is highlighted with this face\n\ when Transient Mark mode is enabled and the mark is active."); Vselection_alist = Qnil; staticpro (&Vselection_alist); DEFVAR_LISP ("selection-converter-alist", &Vselection_converter_alist, "An alist associating GUI selection-types with functions.\n\ These functions are called to convert the selection, with three args:\n\ the name of the selection (typically `PRIMARY', `SECONDARY', or `CLIPBOARD');\n\ a desired type to which the selection should be converted;\n\ and the local selection value (whatever was given to `own-selection').\n\ \n\ The function should return the value to send to the X server\n\ \(typically a string). A return value of nil\n\ means that the conversion could not be done.\n\ A return value which is the symbol `NULL'\n\ means that a side-effect was executed,\n\ and there is no meaningful selection value."); Vselection_converter_alist = Qnil; DEFVAR_LISP ("lost-selection-hooks", &Vlost_selection_hooks, "A list of functions to be called when Emacs loses an selection.\n\ \(This happens when some other client makes its own selection\n\ or when a Lisp program explicitly clears the selection.)\n\ The functions are called with one argument, the selection type\n\ \(a symbol, typically `PRIMARY', `SECONDARY', or `CLIPBOARD')."); Vlost_selection_hooks = Qnil; DEFVAR_LISP ("sent-selection-hooks", &Vsent_selection_hooks, "A list of functions to be called when Emacs answers a selection request.\n\ The functions are called with four arguments:\n\ - the selection name (typically `PRIMARY', `SECONDARY', or `CLIPBOARD');\n\ - the selection-type which Emacs was asked to convert the\n\ selection into before sending (for example, `STRING' or `LENGTH');\n\ - a flag indicating success or failure for responding to the request.\n\ We might have failed (and declined the request) for any number of reasons,\n\ including being asked for a selection that we no longer own, or being asked\n\ to convert into a type that we don't know about or that is inappropriate.\n\ This hook doesn't let you change the behavior of Emacs's selection replies,\n\ it merely informs you that they have happened."); Vsent_selection_hooks = Qnil; DEFVAR_INT ("selection-timeout", &selection_timeout, "Number of milliseconds to wait for a selection reply.\n\ If the selection owner doesn't reply in this time, we give up.\n\ A value of 0 means wait as long as necessary. This is initialized from the\n\ \"*selectionTimeout\" resource."); selection_timeout = 0; DEFVAR_LISP ("bitmap-file-path", &Vbitmap_file_path, "List of directories to search for bitmap files."); Vbitmap_file_path = decode_env_path ((char *) 0, PATH_BITMAPS); defsubr (&Sclose_connection); defsubr (&Scolor_defined_p); defsubr (&Scolor_values); defsubr (&Screate_frame); defsubr (&Sdisown_selection_internal); defsubr (&Sdisplay_backing_store); defsubr (&Sdisplay_color_cells); defsubr (&Sdisplay_color_p); defsubr (&Sdisplay_grayscale_p); defsubr (&Sdisplay_mm_height); defsubr (&Sdisplay_mm_width); defsubr (&Sdisplay_pixel_height); defsubr (&Sdisplay_pixel_width); defsubr (&Sdisplay_planes); defsubr (&Sdisplay_save_under); defsubr (&Sdisplay_screens); defsubr (&Sdisplay_visual_class); defsubr (&Sget_cut_buffer_internal); defsubr (&Sset_resource); defsubr (&Sget_resource); defsubr (&Sget_selection_internal); defsubr (&Shide_emacs); defsubr (&Sinternal_next_face_id); defsubr (&Slist_fonts); defsubr (&Smake_face_internal); defsubr (&Sopen_connection); defsubr (&Sown_selection_internal); defsubr (&Spopup_menu); defsubr (&Spopup_dialog); defsubr (&Srotate_cut_buffers_internal); defsubr (&Sselection_exists_p); defsubr (&Sselection_owner_p); defsubr (&Sserver_max_request_size); defsubr (&Sserver_vendor); defsubr (&Sserver_version); defsubr (&Sset_face_attribute_internal); defsubr (&Sstore_cut_buffer_internal); defsubr (&Ssynchronize); defsubr (&Sfocus_frame); defsubr (&Sunfocus_frame); defsubr (&Sdisplay_list); Qauto_raise = intern ("auto-raise"); staticpro (&Qauto_raise); Qauto_lower = intern ("auto-lower"); staticpro (&Qauto_lower); Qbackground_color = intern ("background-color"); staticpro (&Qbackground_color); Qbar = intern ("bar"); staticpro (&Qbar); Qborder_color = intern ("border-color"); staticpro (&Qborder_color); Qborder_width = intern ("border-width"); staticpro (&Qborder_width); Qbox = intern ("box"); staticpro (&Qbox); Qcursor_color = intern ("cursor-color"); staticpro (&Qcursor_color); Qcursor_type = intern ("cursor-type"); staticpro (&Qcursor_type); Qfontsize = intern ("fontsize"); staticpro (&Qfontsize); Qforeground_color = intern ("foreground-color"); staticpro (&Qforeground_color); Qgeometry = intern ("geometry"); staticpro (&Qgeometry); Qicon_left = intern ("icon-left"); staticpro (&Qicon_left); Qicon_top = intern ("icon-top"); staticpro (&Qicon_top); Qicon_type = intern ("icon-type"); staticpro (&Qicon_type); Qicon_name = intern ("icon-name"); staticpro (&Qicon_name); Qinternal_border_width = intern ("internal-border-width"); staticpro (&Qinternal_border_width); Qleft = intern ("left"); staticpro (&Qleft); Qmouse_color = intern ("mouse-color"); staticpro (&Qmouse_color); Qname = intern ("name"); staticpro (&Qname); Qnone = intern ("none"); staticpro (&Qnone); Qparent_id = intern ("parent-id"); staticpro (&Qparent_id); Qscroll_bar_width = intern ("scroll-bar-width"); staticpro (&Qscroll_bar_width); Qsuppress_icon = intern ("suppress-icon"); staticpro (&Qsuppress_icon); Qtop = intern ("top"); staticpro (&Qtop); Qundefined_color = intern ("undefined-color"); staticpro (&Qundefined_color); Qunderline = intern ("underline"); staticpro (&Qunderline); Qvertical_scroll_bars = intern ("vertical-scroll-bars"); staticpro (&Qvertical_scroll_bars); Qvisibility = intern ("visibility"); staticpro (&Qvisibility); Qwindow_id = intern ("window-id"); staticpro (&Qwindow_id); Qwindow = intern ("window"); staticpro (&Qwindow); Qface = intern ("face"); staticpro (&Qface); Qpriority = intern ("priority"); staticpro (&Qpriority); Qbuffered = intern ("buffered"); staticpro (&Qbuffered); Qleft = intern ("left"); staticpro (&Qleft); Qright = intern ("right"); staticpro (&Qright); Qresource_name = intern ("resource-name"); staticpro (&Qresource_name); Quser_position = intern ("user-position"); staticpro (&Quser_position); Quser_size = intern ("user-size"); staticpro (&Quser_size); Qmouse_face = intern ("mouse-face"); staticpro (&Qmouse_face); Qdisplay = intern ("display"); staticpro (&Qdisplay); Qpixmap_spec_p = intern ("pixmap-spec-p"); staticpro (&Qpixmap_spec_p); QPRIMARY = intern ("PRIMARY"); staticpro (&QPRIMARY); QSECONDARY = intern ("SECONDARY"); staticpro (&QSECONDARY); QSTRING = intern ("STRING"); staticpro (&QSTRING); QINTEGER = intern ("INTEGER"); staticpro (&QINTEGER); QCLIPBOARD = intern ("CLIPBOARD"); staticpro (&QCLIPBOARD); QTIMESTAMP = intern ("TIMESTAMP"); staticpro (&QTIMESTAMP); QTEXT = intern ("TEXT"); staticpro (&QTEXT); QFILE_NAME = intern ("FILE_NAME"); staticpro (&QFILE_NAME); QTIMESTAMP = intern ("TIMESTAMP"); staticpro (&QTIMESTAMP); QDELETE = intern ("DELETE"); staticpro (&QDELETE); QMULTIPLE = intern ("MULTIPLE"); staticpro (&QMULTIPLE); QINCR = intern ("INCR"); staticpro (&QINCR); QEMACS_TMP = intern ("_EMACS_TMP_"); staticpro (&QEMACS_TMP); QTARGETS = intern ("TARGETS"); staticpro (&QTARGETS); QATOM = intern ("ATOM"); staticpro (&QATOM); QATOM_PAIR = intern ("ATOM_PAIR"); staticpro (&QATOM_PAIR); QNULL = intern ("NULL"); staticpro (&QNULL); QCUT_BUFFER0 = intern ("CUT_BUFFER0"); staticpro (&QCUT_BUFFER0); QCUT_BUFFER1 = intern ("CUT_BUFFER1"); staticpro (&QCUT_BUFFER1); QCUT_BUFFER2 = intern ("CUT_BUFFER2"); staticpro (&QCUT_BUFFER2); QCUT_BUFFER3 = intern ("CUT_BUFFER3"); staticpro (&QCUT_BUFFER3); QCUT_BUFFER4 = intern ("CUT_BUFFER4"); staticpro (&QCUT_BUFFER4); QCUT_BUFFER5 = intern ("CUT_BUFFER5"); staticpro (&QCUT_BUFFER5); QCUT_BUFFER6 = intern ("CUT_BUFFER6"); staticpro (&QCUT_BUFFER6); QCUT_BUFFER7 = intern ("CUT_BUFFER7"); staticpro (&QCUT_BUFFER7); } #endif
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.