]> code.delx.au - gnu-emacs/blobdiff - lispref/frames.texi
(Creating Frames, Parameter Access, Pointer Shape)
[gnu-emacs] / lispref / frames.texi
index bc6d54c41b008e43e9220be5b2dab2ec82801020..09887d000ddac52c33c4a1d741dc66a74bdda308 100644 (file)
@@ -1,7 +1,7 @@
 @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
@@ -62,8 +62,9 @@ The frame is displayed on an MS-DOS terminal.
 * 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.
@@ -106,7 +107,6 @@ frame.
 @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.
@@ -205,6 +205,7 @@ parameters @code{foreground-color}, @code{background-color},
 * 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
@@ -214,7 +215,6 @@ These functions let you read and change the parameter values of a
 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
@@ -465,10 +465,10 @@ frame, or control their sizes.
 
 @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
@@ -515,7 +515,7 @@ it treats larger values as 1.)
 
 @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
@@ -825,6 +825,12 @@ The argument @var{pretend} has the same meaning as in
 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
@@ -1556,30 +1562,48 @@ for instance using the window manager, then this produces a quit and
 @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
@@ -1678,6 +1702,35 @@ access the clipboard at all.  The default is @code{nil} on most systems,
 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
 
@@ -1703,7 +1756,6 @@ valid, and what they look like.  In some cases, the value depends on the
 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
@@ -1721,7 +1773,6 @@ and that name is still supported as an alias.
 @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}.
@@ -1732,7 +1783,6 @@ and that name is still supported as an alias.
 @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.
@@ -1746,7 +1796,6 @@ The argument @var{color} must be a valid color name.
 @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
@@ -1754,7 +1803,6 @@ color name, this function returns @code{nil}.
 @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
@@ -1814,7 +1862,6 @@ selected frame's terminal; @pxref{Input Focus}).  At present, though,
 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.
 
@@ -1826,12 +1873,10 @@ Emacs will not know what it looks like.
 @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.
 
@@ -1843,7 +1888,6 @@ and blue) that says what the color actually looks like.
 @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
@@ -1851,7 +1895,6 @@ supported for @var{display}, to that described by the rgb value
 @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}.
@@ -1933,7 +1976,6 @@ refers to the selected frame's display, @pxref{Input Focus}).
 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
@@ -1941,7 +1983,6 @@ a mouse.
 @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
@@ -1951,14 +1992,12 @@ false for text-only terminals.
 @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
@@ -1966,14 +2005,12 @@ is still supported as an alias.
 @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}).
 
@@ -1999,7 +2036,6 @@ italic.
 @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.
@@ -2013,36 +2049,30 @@ images, Emacs cannot display a tool bar.
 @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
@@ -2054,7 +2084,6 @@ when the question is inapplicable to a certain kind of display.
 @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
@@ -2062,14 +2091,12 @@ quickly.
 @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
@@ -2077,7 +2104,6 @@ of the symbols @code{static-gray}, @code{gray-scale},
 @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