@c -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2002, 2004
-@c Free Software Foundation, Inc.
+@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2002, 2003,
+@c 2004, 2005, 2006 Free Software Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@setfilename ../info/frames
@node Frames, Positions, Windows, Top
* Mouse Position:: Asking where the mouse is, or moving it.
* Pop-Up Menus:: Displaying a menu for the user to select from.
* Dialog Boxes:: Displaying a box to ask yes or no.
-* Pointer Shapes:: Specifying the shape of the mouse pointer.
+* Pointer Shape:: Specifying the shape of the mouse pointer.
* Window System Selections:: Transferring text to and from other X clients.
+* Drag and Drop:: Internals of Drag-and-Drop implementation.
* Color Names:: Getting the definitions of color names.
* Text Terminal Colors:: Defining colors for text-only terminals.
* Resources:: Getting resource values from the server.
@end defvar
@defvar after-make-frame-functions
-@tindex after-make-frame-functions
An abnormal hook run by @code{make-frame} after it creates the frame.
Each function in @code{after-make-frame-functions} receives one argument, the
frame just created.
* Initial Parameters:: Specifying frame parameters when you make a frame.
* Window Frame Parameters:: List of frame parameters for window systems.
* Size and Position:: Changing the size and position of a frame.
+* Geometry:: Parsing geometry specifications.
@end menu
@node Parameter Access
frame.
@defun frame-parameter frame parameter
-@tindex frame-parameter
This function returns the value of the parameter @var{parameter} (a
symbol) of @var{frame}. If @var{frame} is @code{nil}, it returns the
selected frame's parameter. If @var{frame} has no setting for
@table @code
@item border-width
-The width in pixels of the window border.
+The width in pixels of the frame's border.
@item internal-border-width
-The distance in pixels between text and border.
+The distance in pixels between text (or fringe) and the frame's border.
@item vertical-scroll-bars
Whether the frame has scroll bars for vertical scrolling, and which side
@item line-spacing
Additional space to leave below each text line, in pixels (a positive
-integer). @cref{Line Height}, for more information.
+integer). @xref{Line Height}, for more information.
@end table
@node Buffer Parameters
screen, in Emacs versions that did not support multiple frames. They
are semi-obsolete, but still work; they apply to the selected frame.
+@node Geometry
+@subsection Geometry
+
+ Here's how to examine the data in an X-style window geometry
+specification:
+
@defun x-parse-geometry geom
@cindex geometry specification
The function @code{x-parse-geometry} converts a standard X window
@code{x-popup-dialog} does not return.
@end defun
-@node Pointer Shapes
-@section Pointer Shapes
+@node Pointer Shape
+@section Pointer Shape
@cindex pointer shape
@cindex mouse pointer shape
- These variables specify which shape to use for the mouse pointer in
-various situations, when using the X Window System:
+ You can specify the mouse pointer style for particular text or
+images using the @code{pointer} text property, and for images with the
+@code{:pointer} and @code{:map} image properties. The values you can
+use in these properties are @code{text} (or @code{nil}), @code{arrow},
+@code{hand}, @code{vdrag}, @code{hdrag}, @code{modeline}, and
+@code{hourglass}. @code{text} stands for the usual mouse pointer
+style used over text.
+
+ Over void parts of the window (parts that do not correspond to any
+of the buffer contents), the mouse pointer usually uses the
+@code{arrow} style, but you can specify a different style (one of
+those above) by setting @code{void-text-area-pointer}.
+
+@defvar void-text-area-pointer
+This variable specifies the mouse pointer style for void text areas.
+These include the areas after the end of a line or below the last line
+in the buffer. The default is to use the @code{arrow} (non-text)
+pointer style.
+@end defvar
-@table @code
-@item x-pointer-shape
-@vindex x-pointer-shape
-This variable specifies the pointer shape to use ordinarily in the Emacs
-frame.
+ You can specify what the @code{text} pointer style really looks like
+by setting the variable @code{x-pointer-shape}.
-@item x-sensitive-text-pointer-shape
-@vindex x-sensitive-text-pointer-shape
+@defvar x-pointer-shape
+This variable specifies the pointer shape to use ordinarily in the
+Emacs frame, for the @code{text} pointer style.
+@end defvar
+
+@defvar x-sensitive-text-pointer-shape
This variable specifies the pointer shape to use when the mouse
is over mouse-sensitive text.
-@end table
+@end defvar
These variables affect newly created frames. They do not normally
-affect existing frames; however, if you set the mouse color of a frame,
-that also updates its pointer shapes based on the current values of
-these variables. @xref{Color Parameters}.
+affect existing frames; however, if you set the mouse color of a
+frame, that also installs the current value of those two variables.
+@xref{Color Parameters}.
The values you can use, to specify either of these pointer shapes, are
defined in the file @file{lisp/term/x-win.el}. Use @kbd{M-x apropos
but @code{t} on MS-Windows.
@end defopt
+@node Drag and Drop
+@section Drag and Drop
+
+@vindex x-dnd-test-function
+@vindex x-dnd-known-types
+ When a user drags something from another application over Emacs, that other
+application expects Emacs to tell it if Emacs can handle the data that is
+dragged. The variable @code{x-dnd-test-function} is used by Emacs to determine
+what to reply. The default value is @code{x-dnd-default-test-function}
+which accepts drops if the type of the data to be dropped is present in
+@code{x-dnd-known-types}. You can customize @code{x-dnd-test-function} and/or
+@code{x-dnd-known-types} if you want Emacs to accept or reject drops based
+on some other criteria.
+
+@vindex x-dnd-types-alist
+ If you want to change the way Emacs handles drop of different types
+or add a new type, customize @code{x-dnd-types-alist}. This requires
+detailed knowledge of what types other applications use for drag and
+drop.
+
+@vindex dnd-protocol-alist
+ When an URL is dropped on Emacs it may be a file, but it may also be
+another URL type (ftp, http, etc.). Emacs first checks
+@code{dnd-protocol-alist} to determine what to do with the URL. If
+there is no match there and if @code{browse-url-browser-function} is
+an alist, Emacs looks for a match there. If no match is found the
+text for the URL is inserted. If you want to alter Emacs behavior,
+you can customize these variables.
+
@node Color Names
@section Color Names
meaning of the term ``selected frame''.
@defun color-defined-p color &optional frame
-@tindex color-defined-p
This function reports whether a color name is meaningful. It returns
@code{t} if so; otherwise, @code{nil}. The argument @var{frame} says
which frame's display to ask about; if @var{frame} is omitted or
@end defun
@defun defined-colors &optional frame
-@tindex defined-colors
This function returns a list of the color names that are defined
and supported on frame @var{frame} (default, the selected frame).
If @var{frame} does not support colors, the value is @code{nil}.
@end defun
@defun color-supported-p color &optional frame background-p
-@tindex color-supported-p
This returns @code{t} if @var{frame} can really display the color
@var{color} (or at least something close to it). If @var{frame} is
omitted or @code{nil}, the question applies to the selected frame.
@end defun
@defun color-gray-p color &optional frame
-@tindex color-gray-p
This returns @code{t} if @var{color} is a shade of gray, as defined on
@var{frame}'s display. If @var{frame} is omitted or @code{nil}, the
question applies to the selected frame. If @var{color} is not a valid
@end defun
@defun color-values color &optional frame
-@tindex color-values
@cindex rgb value
This function returns a value that describes what @var{color} should
ideally look like on @var{frame}. If @var{color} is defined, the
the @var{frame} argument has no effect.
@defun tty-color-define name number &optional rgb frame
-@tindex tty-color-define
This function associates the color name @var{name} with
color number @var{number} on the terminal.
@end defun
@defun tty-color-clear &optional frame
-@tindex tty-color-clear
This function clears the table of defined colors for a text-only terminal.
@end defun
@defun tty-color-alist &optional frame
-@tindex tty-color-alist
This function returns an alist recording the known colors supported by a
text-only terminal.
@end defun
@defun tty-color-approximate rgb &optional frame
-@tindex tty-color-approximate
This function finds the closest color, among the known colors
supported for @var{display}, to that described by the rgb value
@var{rgb} (a list of color values). The return value is an element of
@end defun
@defun tty-color-translate color &optional frame
-@tindex tty-color-translate
This function finds the closest color to @var{color} among the known
colors supported for @var{display} and returns its index (an integer).
If the name @var{color} is not defined, the value is @code{nil}.
obtain information about displays.
@defun display-popup-menus-p &optional display
-@tindex display-popup-menus-p
This function returns @code{t} if popup menus are supported on
@var{display}, @code{nil} if not. Support for popup menus requires that
the mouse be available, since the user cannot choose menu items without
@end defun
@defun display-graphic-p &optional display
-@tindex display-graphic-p
@cindex frames, more than one on display
@cindex fonts, more than one on display
This function returns @code{t} if @var{display} is a graphic display
@end defun
@defun display-mouse-p &optional display
-@tindex display-mouse-p
@cindex mouse, availability
This function returns @code{t} if @var{display} has a mouse available,
@code{nil} if not.
@end defun
@defun display-color-p &optional display
-@tindex display-color-p
@findex x-display-color-p
This function returns @code{t} if the screen is a color screen.
It used to be called @code{x-display-color-p}, and that name
@end defun
@defun display-grayscale-p &optional display
-@tindex display-grayscale-p
This function returns @code{t} if the screen can display shades of gray.
(All color displays can do this.)
@end defun
@defun display-supports-face-attributes-p attributes &optional display
@anchor{Display Face Attribute Testing}
-@tindex display-supports-face-attributes-p
This function returns non-@code{nil} if all the face attributes in
@var{attributes} are supported (@pxref{Face Attributes}).
@end defun
@defun display-selections-p &optional display
-@tindex display-selections-p
This function returns @code{t} if @var{display} supports selections.
Windowed displays normally support selections, but they may also be
supported in some other cases.
@end defun
@defun display-screens &optional display
-@tindex display-screens
This function returns the number of screens associated with the display.
@end defun
@defun display-pixel-height &optional display
-@tindex display-pixel-height
This function returns the height of the screen in pixels.
On a character terminal, it gives the height in characters.
@end defun
@defun display-mm-height &optional display
-@tindex display-mm-height
This function returns the height of the screen in millimeters,
or @code{nil} if Emacs cannot get that information.
@end defun
@defun display-pixel-width &optional display
-@tindex display-pixel-width
This function returns the width of the screen in pixels.
On a character terminal, it gives the width in characters.
@end defun
@defun display-mm-width &optional display
-@tindex display-mm-width
This function returns the width of the screen in millimeters,
or @code{nil} if Emacs cannot get that information.
@end defun
@defun display-backing-store &optional display
-@tindex display-backing-store
This function returns the backing store capability of the display.
Backing store means recording the pixels of windows (and parts of
windows) that are not exposed, so that when exposed they can be
@end defun
@defun display-save-under &optional display
-@tindex display-save-under
This function returns non-@code{nil} if the display supports the
SaveUnder feature. That feature is used by pop-up windows
to save the pixels they obscure, so that they can pop down
@end defun
@defun display-planes &optional display
-@tindex display-planes
This function returns the number of planes the display supports.
This is typically the number of bits per pixel.
For a tty display, it is log to base two of the number of colors supported.
@end defun
@defun display-visual-class &optional display
-@tindex display-visual-class
This function returns the visual class for the screen. The value is one
of the symbols @code{static-gray}, @code{gray-scale},
@code{static-color}, @code{pseudo-color}, @code{true-color}, and
@end defun
@defun display-color-cells &optional display
-@tindex display-color-cells
This function returns the number of color cells the screen supports.
@end defun