79 |
To create a new frame, call the function @code{make-frame}. |
To create a new frame, call the function @code{make-frame}. |
80 |
|
|
81 |
@defun make-frame &optional alist |
@defun make-frame &optional alist |
82 |
This function creates a new frame. If you are using a supported window |
This function creates and returns a new frame, displaying the current |
83 |
system, it makes a window frame; otherwise, it makes a terminal frame. |
buffer. If you are using a supported window system, it makes a window |
84 |
|
frame; otherwise, it makes a terminal frame. |
85 |
|
|
86 |
The argument is an alist specifying frame parameters. Any parameters |
The argument is an alist specifying frame parameters. Any parameters |
87 |
not mentioned in @var{alist} default according to the value of the |
not mentioned in @var{alist} default according to the value of the |
92 |
The set of possible parameters depends in principle on what kind of |
The set of possible parameters depends in principle on what kind of |
93 |
window system Emacs uses to display its frames. @xref{Window Frame |
window system Emacs uses to display its frames. @xref{Window Frame |
94 |
Parameters}, for documentation of individual parameters you can specify. |
Parameters}, for documentation of individual parameters you can specify. |
95 |
|
|
96 |
|
This function itself does not make the new frame the selected frame. |
97 |
|
@xref{Input Focus}. The previously selected frame remains selected. |
98 |
|
However, the window system may select the new frame for its own reasons, |
99 |
|
for instance if the frame appears under the mouse pointer and your |
100 |
|
setup is for focus to follow the pointer. |
101 |
@end defun |
@end defun |
102 |
|
|
103 |
@defvar before-make-frame-hook |
@defvar before-make-frame-hook |
145 |
terminal. |
terminal. |
146 |
|
|
147 |
@deffn Command make-frame-on-display display &optional parameters |
@deffn Command make-frame-on-display display &optional parameters |
148 |
This creates a new frame on display @var{display}, taking the other |
This creates and returns a new frame on display @var{display}, taking |
149 |
frame parameters from @var{parameters}. Aside from the @var{display} |
the other frame parameters from @var{parameters}. Aside from the |
150 |
argument, it is like @code{make-frame} (@pxref{Creating Frames}). |
@var{display} argument, it is like @code{make-frame} (@pxref{Creating |
151 |
|
Frames}). |
152 |
@end deffn |
@end deffn |
153 |
|
|
154 |
@defun x-display-list |
@defun x-display-list |
173 |
"*BorderWidth: 3\n*InternalBorder: 2\n" |
"*BorderWidth: 3\n*InternalBorder: 2\n" |
174 |
@end example |
@end example |
175 |
|
|
176 |
@xref{Resources}. |
@xref{X Resources,, X Resources, emacs, The GNU Emacs Manual}. |
177 |
|
|
178 |
If @var{must-succeed} is non-@code{nil}, failure to open the connection |
If @var{must-succeed} is non-@code{nil}, failure to open the connection |
179 |
terminates Emacs. Otherwise, it is an ordinary Lisp error. |
terminates Emacs. Otherwise, it is an ordinary Lisp error. |
215 |
|
|
216 |
@defun frame-parameter frame parameter |
@defun frame-parameter frame parameter |
217 |
@tindex frame-parameter |
@tindex frame-parameter |
218 |
This function returns the value of the parameter named @var{parameter} |
This function returns the value of the parameter @var{parameter} (a |
219 |
of @var{frame}. If @var{frame} is @code{nil}, it returns the |
symbol) of @var{frame}. If @var{frame} is @code{nil}, it returns the |
220 |
selected frame's parameter. |
selected frame's parameter. If @var{frame} has no setting for |
221 |
|
@var{parameter}, this function returns @code{nil}. |
222 |
@end defun |
@end defun |
223 |
|
|
224 |
@defun frame-parameters &optional frame |
@defun frame-parameters &optional frame |
239 |
@defun modify-all-frames-parameters alist |
@defun modify-all-frames-parameters alist |
240 |
This function alters the frame parameters of all existing frames |
This function alters the frame parameters of all existing frames |
241 |
according to @var{alist}, then modifies @code{default-frame-alist} |
according to @var{alist}, then modifies @code{default-frame-alist} |
242 |
to apply the same parameter values to frames that will be created |
(and, if necessary, @code{initial-frame-alist}) to apply the same |
243 |
henceforth. |
parameter values to frames that will be created henceforth. |
244 |
@end defun |
@end defun |
245 |
|
|
246 |
@node Initial Parameters |
@node Initial Parameters |
294 |
Emacs frames---the first frame, and subsequent frames. When using the X |
Emacs frames---the first frame, and subsequent frames. When using the X |
295 |
Window System, you can get the same results by means of X resources |
Window System, you can get the same results by means of X resources |
296 |
in many cases. |
in many cases. |
297 |
|
|
298 |
|
Setting this variable does not affect existing frames. |
299 |
@end defvar |
@end defvar |
300 |
|
|
301 |
See also @code{special-display-frame-alist}, in @ref{Choosing Window}. |
See also @code{special-display-frame-alist}. @xref{Definition of |
302 |
|
special-display-frame-alist}. |
303 |
|
|
304 |
If you use options that specify window appearance when you invoke Emacs, |
If you use options that specify window appearance when you invoke Emacs, |
305 |
they take effect by adding elements to @code{default-frame-alist}. One |
they take effect by adding elements to @code{default-frame-alist}. One |
380 |
pixels, counting from the left edge of the screen. This takes effect if |
pixels, counting from the left edge of the screen. This takes effect if |
381 |
and when the frame is iconified. |
and when the frame is iconified. |
382 |
|
|
383 |
|
If you specify a value for this parameter, then you must also specify |
384 |
|
a value for @code{icon-top} and vice versa. The window manager may |
385 |
|
ignore these two parameters. |
386 |
|
|
387 |
@item icon-top |
@item icon-top |
388 |
The screen position of the top edge @emph{of the frame's icon}, in |
The screen position of the top edge @emph{of the frame's icon}, in |
389 |
pixels, counting from the top edge of the screen. This takes effect if |
pixels, counting from the top edge of the screen. This takes effect if |
544 |
columns, so the actual default fringe widths for the frame may be |
columns, so the actual default fringe widths for the frame may be |
545 |
larger than the specified values. The extra width needed to reach an |
larger than the specified values. The extra width needed to reach an |
546 |
acceptable total is distributed evenly between the left and right |
acceptable total is distributed evenly between the left and right |
547 |
fringe. However, you can force one frame or the other to a precise |
fringe. However, you can force one fringe or the other to a precise |
548 |
width by specifying that width a negative integer. If both widths are |
width by specifying that width as a negative integer. If both widths are |
549 |
negative, only the left fringe gets the specified width. |
negative, only the left fringe gets the specified width. |
550 |
|
|
551 |
@item unsplittable |
@item unsplittable |
557 |
iconified. @xref{Visibility of Frames}. |
iconified. @xref{Visibility of Frames}. |
558 |
|
|
559 |
@item menu-bar-lines |
@item menu-bar-lines |
560 |
The number of lines to allocate at the top of the frame for a menu bar. |
The number of lines to allocate at the top of the frame for a menu |
561 |
The default is 1. @xref{Menu Bar}. (In Emacs versions that use the X |
bar. The default is 1. A value of @code{nil} means don't display a |
562 |
toolkit or GTK, there is only one menu bar line; all that matters about the |
menu bar. @xref{Menu Bar}. (The X toolkit and GTK allow at most one |
563 |
number you specify is whether it is greater than zero.) |
menu bar line; they treat larger values as 1.) |
564 |
|
|
565 |
|
@item tool-bar-lines |
566 |
|
The number of lines to use for the toolbar. A value of @code{nil} means |
567 |
|
don't display a tool bar. (GTK allows at most one tool bar line; it |
568 |
|
treats larger values as 1.) |
569 |
|
|
570 |
@item screen-gamma |
@item screen-gamma |
571 |
@cindex gamma correction |
@cindex gamma correction |
578 |
on a monitor with that gamma value. If you specify 2.2 for |
on a monitor with that gamma value. If you specify 2.2 for |
579 |
@code{screen-gamma}, that means no correction is needed. Other values |
@code{screen-gamma}, that means no correction is needed. Other values |
580 |
request correction, designed to make the corrected colors appear on |
request correction, designed to make the corrected colors appear on |
581 |
your screen they way they would have appeared without correction on an |
your screen the way they would have appeared without correction on an |
582 |
ordinary monitor with a gamma value of 2.2. |
ordinary monitor with a gamma value of 2.2. |
583 |
|
|
584 |
If your monitor displays colors too light, you should specify a |
If your monitor displays colors too light, you should specify a |
586 |
that makes colors darker. A screen gamma value of 1.5 may give good |
that makes colors darker. A screen gamma value of 1.5 may give good |
587 |
results for LCD color displays. |
results for LCD color displays. |
588 |
|
|
|
@item tool-bar-lines |
|
|
The number of lines to use for the toolbar. A value of @code{nil} means |
|
|
don't display a tool bar. (In Emacs versions that use GTK, there is |
|
|
only one tool bar line; all that matters about the number you specify |
|
|
is whether it is greater than zero.) |
|
|
|
|
589 |
@item line-spacing |
@item line-spacing |
590 |
Additional space put below text lines in pixels (a positive integer). |
Additional space put below text lines, in pixels (a positive integer) |
591 |
|
|
592 |
|
@item wait-for-wm |
593 |
|
If non-@code{nil}, tell Xt to wait for the window manager to confirm |
594 |
|
geometry changes. Some window managers, including versions of Fvwm2 |
595 |
|
and KDE, fail to confirm, so Xt hangs. Set this to @code{nil} to |
596 |
|
prevent hanging with those window managers. |
597 |
|
|
598 |
@ignore |
@ignore |
599 |
@item parent-id |
@item parent-id |
658 |
If non-@code{nil}, the color for the background of scroll bars. It is |
If non-@code{nil}, the color for the background of scroll bars. It is |
659 |
equivalent to the @code{:background} attribute of the |
equivalent to the @code{:background} attribute of the |
660 |
@code{scroll-bar} face. |
@code{scroll-bar} face. |
|
|
|
|
@item wait-for-wm |
|
|
If non-@code{nil}, tell Xt to wait for the window manager to confirm |
|
|
geometry changes. Some window managers, including versions of Fvwm2 |
|
|
and KDE, fail to confirm, so Xt hangs. Set this to @code{nil} to |
|
|
prevent hanging with those window managers. |
|
661 |
@end table |
@end table |
662 |
|
|
663 |
@node Size and Position |
@node Size and Position |
833 |
invisible frames). The default value of @code{frame-title-format} uses |
invisible frames). The default value of @code{frame-title-format} uses |
834 |
@code{multiple-frames} so as to put the buffer name in the frame title |
@code{multiple-frames} so as to put the buffer name in the frame title |
835 |
only when there is more than one frame. |
only when there is more than one frame. |
836 |
|
|
837 |
|
The value of this variable is not guaranteed to be accurate except |
838 |
|
while processing @code{frame-title-format} or |
839 |
|
@code{icon-title-format}. |
840 |
@end defvar |
@end defvar |
841 |
|
|
842 |
@node Deleting Frames |
@node Deleting Frames |
845 |
|
|
846 |
Frames remain potentially visible until you explicitly @dfn{delete} |
Frames remain potentially visible until you explicitly @dfn{delete} |
847 |
them. A deleted frame cannot appear on the screen, but continues to |
them. A deleted frame cannot appear on the screen, but continues to |
848 |
exist as a Lisp object until there are no references to it. There is no |
exist as a Lisp object until there are no references to it. |
|
way to cancel the deletion of a frame aside from restoring a saved frame |
|
|
configuration (@pxref{Frame Configurations}); this is similar to the |
|
|
way windows behave. |
|
849 |
|
|
850 |
@deffn Command delete-frame &optional frame force |
@deffn Command delete-frame &optional frame force |
851 |
@vindex delete-frame-functions |
@vindex delete-frame-functions |
852 |
This function deletes the frame @var{frame} after running the hook |
This function deletes the frame @var{frame}. Unless @var{frame} is a |
853 |
@code{delete-frame-functions} (each function gets one argument, |
tooltip, it first runs the hook @code{delete-frame-functions} (each |
854 |
@var{frame}). By default, @var{frame} is the selected frame. |
function gets one argument, @var{frame}). By default, @var{frame} is |
855 |
|
the selected frame. |
856 |
|
|
857 |
A frame cannot be deleted if its minibuffer is used by other frames. |
A frame cannot be deleted if its minibuffer is used by other frames. |
858 |
Normally, you cannot delete a frame if all other frames are invisible, |
Normally, you cannot delete a frame if all other frames are invisible, |
861 |
|
|
862 |
@defun frame-live-p frame |
@defun frame-live-p frame |
863 |
The function @code{frame-live-p} returns non-@code{nil} if the frame |
The function @code{frame-live-p} returns non-@code{nil} if the frame |
864 |
@var{frame} has not been deleted. |
@var{frame} has not been deleted. The possible non-@code{nil} return |
865 |
|
values are like those of @code{framep}. @xref{Frames}. |
866 |
@end defun |
@end defun |
867 |
|
|
868 |
Some window managers provide a command to delete a window. These work |
Some window managers provide a command to delete a window. These work |
947 |
selected window with @code{frame-selected-window}. |
selected window with @code{frame-selected-window}. |
948 |
|
|
949 |
@defun frame-selected-window &optional frame |
@defun frame-selected-window &optional frame |
950 |
This function returns the window on @var{frame} that is selected within |
This function returns the window on @var{frame} that is selected |
951 |
@var{frame}. If omitted or @code{nil}, @var{frame} defaults to the selected frame. |
within @var{frame}. If omitted or @code{nil}, @var{frame} defaults to |
952 |
|
the selected frame. |
953 |
@end defun |
@end defun |
954 |
|
|
955 |
@defun set-frame-selected-window frame window |
@defun set-frame-selected-window frame window |
956 |
This sets the selected window of frame @var{frame} to @var{window}. |
This sets the selected window of frame @var{frame} to @var{window}. |
957 |
If @var{frame} is @code{nil}, it operates on the selected frame. If |
If @var{frame} is @code{nil}, it operates on the selected frame. If |
958 |
@var{frame} is the selected frame, this makes @var{window} the |
@var{frame} is the selected frame, this makes @var{window} the |
959 |
selected window. |
selected window. This function returns @var{window}. |
960 |
@end defun |
@end defun |
961 |
|
|
962 |
Conversely, selecting a window for Emacs with @code{select-window} also |
Conversely, selecting a window for Emacs with @code{select-window} also |
963 |
makes that window selected within its frame. @xref{Selecting Windows}. |
makes that window selected within its frame. @xref{Selecting Windows}. |
964 |
|
|
965 |
Another function that (usually) returns one of the windows in a given |
Another function that (usually) returns one of the windows in a given |
966 |
frame is @code{minibuffer-window}. @xref{Minibuffer Misc}. |
frame is @code{minibuffer-window}. @xref{Definition of minibuffer-window}. |
967 |
|
|
968 |
@node Minibuffers and Frames |
@node Minibuffers and Frames |
969 |
@section Minibuffers and Frames |
@section Minibuffers and Frames |
970 |
|
|
971 |
Normally, each frame has its own minibuffer window at the bottom, which |
Normally, each frame has its own minibuffer window at the bottom, which |
972 |
is used whenever that frame is selected. If the frame has a minibuffer, |
is used whenever that frame is selected. If the frame has a minibuffer, |
973 |
you can get it with @code{minibuffer-window} (@pxref{Minibuffer Misc}). |
you can get it with @code{minibuffer-window} (@pxref{Definition of |
974 |
|
minibuffer-window}). |
975 |
|
|
976 |
However, you can also create a frame with no minibuffer. Such a frame |
However, you can also create a frame with no minibuffer. Such a frame |
977 |
must use the minibuffer window of some other frame. When you create the |
must use the minibuffer window of some other frame. When you create the |
986 |
|
|
987 |
@defvar default-minibuffer-frame |
@defvar default-minibuffer-frame |
988 |
This variable specifies the frame to use for the minibuffer window, by |
This variable specifies the frame to use for the minibuffer window, by |
989 |
default. It is always local to the current terminal and cannot be |
default. It does not affect existing frames. It is always local to |
990 |
buffer-local. @xref{Multiple Displays}. |
the current terminal and cannot be buffer-local. @xref{Multiple |
991 |
|
Displays}. |
992 |
@end defvar |
@end defvar |
993 |
|
|
994 |
@node Input Focus |
@node Input Focus |
1047 |
This function selects frame @var{frame}, temporarily disregarding the |
This function selects frame @var{frame}, temporarily disregarding the |
1048 |
focus of the X server if any. The selection of @var{frame} lasts until |
focus of the X server if any. The selection of @var{frame} lasts until |
1049 |
the next time the user does something to select a different frame, or |
the next time the user does something to select a different frame, or |
1050 |
until the next time this function is called. The specified @var{frame} |
until the next time this function is called. (If you are using a |
1051 |
|
window system, the previously selected frame may be restored as the |
1052 |
|
selected frame after return to the command loop, because it still may |
1053 |
|
have the window system's input focus.) The specified @var{frame} |
1054 |
becomes the selected frame, as explained above, and the terminal that |
becomes the selected frame, as explained above, and the terminal that |
1055 |
@var{frame} is on becomes the selected terminal. This function |
@var{frame} is on becomes the selected terminal. This function |
1056 |
returns @var{frame}, or @code{nil} if @var{frame} has been deleted. |
returns @var{frame}, or @code{nil} if @var{frame} has been deleted. |
1131 |
it makes the selected frame visible. |
it makes the selected frame visible. |
1132 |
@end deffn |
@end deffn |
1133 |
|
|
1134 |
@deffn Command make-frame-invisible &optional frame |
@deffn Command make-frame-invisible &optional frame force |
1135 |
This function makes frame @var{frame} invisible. If you omit |
This function makes frame @var{frame} invisible. If you omit |
1136 |
@var{frame}, it makes the selected frame invisible. |
@var{frame}, it makes the selected frame invisible. |
1137 |
|
|
1138 |
|
Unless @var{force} is non-@code{nil}, this function refuses to make |
1139 |
|
@var{frame} invisible if all other frames are invisible.. |
1140 |
@end deffn |
@end deffn |
1141 |
|
|
1142 |
@deffn Command iconify-frame &optional frame |
@deffn Command iconify-frame &optional frame |
1148 |
This returns the visibility status of frame @var{frame}. The value is |
This returns the visibility status of frame @var{frame}. The value is |
1149 |
@code{t} if @var{frame} is visible, @code{nil} if it is invisible, and |
@code{t} if @var{frame} is visible, @code{nil} if it is invisible, and |
1150 |
@code{icon} if it is iconified. |
@code{icon} if it is iconified. |
1151 |
|
|
1152 |
|
On a text-only terminal, all frames are considered visible, whether |
1153 |
|
they are currently being displayed or not, and this function returns |
1154 |
|
@code{t} for all frames. |
1155 |
@end defun |
@end defun |
1156 |
|
|
1157 |
The visibility status of a frame is also available as a frame |
The visibility status of a frame is also available as a frame |
1186 |
|
|
1187 |
@deffn Command raise-frame &optional frame |
@deffn Command raise-frame &optional frame |
1188 |
This function raises frame @var{frame} (default, the selected frame). |
This function raises frame @var{frame} (default, the selected frame). |
1189 |
|
If @var{frame} is invisible or iconified, this makes it visible. |
1190 |
@end deffn |
@end deffn |
1191 |
|
|
1192 |
@deffn Command lower-frame &optional frame |
@deffn Command lower-frame &optional frame |
1217 |
|
|
1218 |
@defun set-frame-configuration configuration &optional nodelete |
@defun set-frame-configuration configuration &optional nodelete |
1219 |
This function restores the state of frames described in |
This function restores the state of frames described in |
1220 |
@var{configuration}. |
@var{configuration}. However, this function does not restore deleted |
1221 |
|
frames. |
1222 |
|
|
1223 |
Ordinarily, this function deletes all existing frames not listed in |
Ordinarily, this function deletes all existing frames not listed in |
1224 |
@var{configuration}. But if @var{nodelete} is non-@code{nil}, the |
@var{configuration}. But if @var{nodelete} is non-@code{nil}, the |
1500 |
symbols. X clients including Emacs can read or set the selection for |
symbols. X clients including Emacs can read or set the selection for |
1501 |
any given type. |
any given type. |
1502 |
|
|
1503 |
@defun x-set-selection type data |
@deffn Command x-set-selection type data |
1504 |
This function sets a ``selection'' in the X server. It takes two |
This function sets a ``selection'' in the X server. It takes two |
1505 |
arguments: a selection type @var{type}, and the value to assign to it, |
arguments: a selection type @var{type}, and the value to assign to it, |
1506 |
@var{data}. If @var{data} is @code{nil}, it means to clear out the |
@var{data}. If @var{data} is @code{nil}, it means to clear out the |
1515 |
Each possible @var{type} has its own selection value, which changes |
Each possible @var{type} has its own selection value, which changes |
1516 |
independently. The usual values of @var{type} are @code{PRIMARY}, |
independently. The usual values of @var{type} are @code{PRIMARY}, |
1517 |
@code{SECONDARY} and @code{CLIPBOARD}; these are symbols with upper-case |
@code{SECONDARY} and @code{CLIPBOARD}; these are symbols with upper-case |
1518 |
names, in accord with X Window System conventions. The default is |
names, in accord with X Window System conventions. If @var{type} is |
1519 |
@code{PRIMARY}. |
@code{nil}, that stands for @code{PRIMARY}. |
1520 |
@end defun |
|
1521 |
|
This function returns @var{data}. |
1522 |
|
@end deffn |
1523 |
|
|
1524 |
@defun x-get-selection &optional type data-type |
@defun x-get-selection &optional type data-type |
1525 |
This function accesses selections set up by Emacs or by other X |
This function accesses selections set up by Emacs or by other X |
1613 |
@tindex defined-colors |
@tindex defined-colors |
1614 |
This function returns a list of the color names that are defined |
This function returns a list of the color names that are defined |
1615 |
and supported on frame @var{frame} (default, the selected frame). |
and supported on frame @var{frame} (default, the selected frame). |
1616 |
|
If @var{frame} does not support colors, the value is @code{nil}. |
1617 |
|
|
1618 |
@findex x-defined-colors |
@findex x-defined-colors |
1619 |
This function used to be called @code{x-defined-colors}, |
This function used to be called @code{x-defined-colors}, |
1638 |
@tindex color-gray-p |
@tindex color-gray-p |
1639 |
This returns @code{t} if @var{color} is a shade of gray, as defined on |
This returns @code{t} if @var{color} is a shade of gray, as defined on |
1640 |
@var{frame}'s display. If @var{frame} is omitted or @code{nil}, the |
@var{frame}'s display. If @var{frame} is omitted or @code{nil}, the |
1641 |
question applies to the selected frame. The argument @var{color} must |
question applies to the selected frame. If @var{color} is not a valid |
1642 |
be a valid color name. |
color name, this function returns @code{nil}. |
1643 |
@end defun |
@end defun |
1644 |
|
|
1645 |
@defun color-values color &optional frame |
@defun color-values color &optional frame |
1646 |
@tindex color-values |
@tindex color-values |
1647 |
This function returns a value that describes what @var{color} should |
This function returns a value that describes what @var{color} should |
1648 |
ideally look like. If @var{color} is defined, the value is a list of |
ideally look like on @var{frame}. If @var{color} is defined, the |
1649 |
three integers, which give the amount of red, the amount of green, and |
value is a list of three integers, which give the amount of red, the |
1650 |
the amount of blue. Each integer ranges in principle from 0 to 65535, |
amount of green, and the amount of blue. Each integer ranges in |
1651 |
but in practice no value seems to be above 65280. This kind |
principle from 0 to 65535, but some displays may not use the full |
1652 |
of three-element list is called an @dfn{rgb value}. |
range. This kind of three-element list is called an @dfn{rgb value}. |
1653 |
|
|
1654 |
If @var{color} is not defined, the value is @code{nil}. |
If @var{color} is not defined, the value is @code{nil}. |
1655 |
|
|
1694 |
Several of these functions use or return @dfn{rgb values}. An rgb |
Several of these functions use or return @dfn{rgb values}. An rgb |
1695 |
value is a list of three integers, which give the amount of red, the |
value is a list of three integers, which give the amount of red, the |
1696 |
amount of green, and the amount of blue. Each integer ranges in |
amount of green, and the amount of blue. Each integer ranges in |
1697 |
principle from 0 to 65535, but in practice the largest value used is |
principle from 0 to 65535, but some displays may not use the full range. . |
|
65280. |
|
1698 |
|
|
1699 |
These functions accept a display (either a frame or the name of a |
These functions accept a display (either a frame or the name of a |
1700 |
terminal) as an optional argument. We hope in the future to make Emacs |
terminal) as an optional argument. We hope in the future to make Emacs |
1736 |
@tindex tty-color-approximate |
@tindex tty-color-approximate |
1737 |
This function finds the closest color, among the known colors supported |
This function finds the closest color, among the known colors supported |
1738 |
for @var{display}, to that described by the rgb value @var{rgb}. |
for @var{display}, to that described by the rgb value @var{rgb}. |
1739 |
|
The return value is an element of @code{tty-color-alist}. |
1740 |
@end defun |
@end defun |
1741 |
|
|
1742 |
@defun tty-color-translate color &optional display |
@defun tty-color-translate color &optional display |
1743 |
@tindex tty-color-translate |
@tindex tty-color-translate |
1744 |
This function finds the closest color to @var{color} among the known |
This function finds the closest color to @var{color} among the known |
1745 |
colors supported for @var{display}. If the name @var{color} is not |
colors supported for @var{display} and returns its index (an integer). |
1746 |
defined, the value is @code{nil}. |
If the name @var{color} is not defined, the value is @code{nil}. |
1747 |
|
|
1748 |
@var{color} can be an X-style @code{"#@var{xxxyyyzzz}"} specification |
@var{color} can be an X-style @code{"#@var{xxxyyyzzz}"} specification |
1749 |
instead of an actual name. The format |
instead of an actual name. The format |
1783 |
or the value specified with the @samp{-name} or @samp{-rn} switches. |
or the value specified with the @samp{-name} or @samp{-rn} switches. |
1784 |
@end defvar |
@end defvar |
1785 |
|
|
1786 |
|
To illustrate some of the above, suppose that you have the line: |
1787 |
|
|
1788 |
|
@example |
1789 |
|
xterm.vt100.background: yellow |
1790 |
|
@end example |
1791 |
|
|
1792 |
|
@noindent |
1793 |
|
in in your X resources file (usually named @file{~/.Xdefaults} or |
1794 |
|
@file{~/.Xresources}). Then: |
1795 |
|
|
1796 |
|
@example |
1797 |
|
@group |
1798 |
|
(let ((x-resource-class "XTerm") (x-resource-name "xterm")) |
1799 |
|
(x-get-resource "vt100.background" "VT100.Background")) |
1800 |
|
@result{} "yellow" |
1801 |
|
@end group |
1802 |
|
@group |
1803 |
|
(let ((x-resource-class "XTerm") (x-resource-name "xterm")) |
1804 |
|
(x-get-resource "background" "VT100" "vt100" "Background")) |
1805 |
|
@result{} "yellow" |
1806 |
|
@end group |
1807 |
|
@end example |
1808 |
|
|
1809 |
@xref{X Resources,, X Resources, emacs, The GNU Emacs Manual}. |
@xref{X Resources,, X Resources, emacs, The GNU Emacs Manual}. |
1810 |
|
|
1811 |
@node Display Feature Testing |
@node Display Feature Testing |
1913 |
@defun display-pixel-height &optional display |
@defun display-pixel-height &optional display |
1914 |
@tindex display-pixel-height |
@tindex display-pixel-height |
1915 |
This function returns the height of the screen in pixels. |
This function returns the height of the screen in pixels. |
1916 |
|
On a character terminal, it gives the height in characters. |
1917 |
@end defun |
@end defun |
1918 |
|
|
1919 |
@defun display-mm-height &optional display |
@defun display-mm-height &optional display |
1925 |
@defun display-pixel-width &optional display |
@defun display-pixel-width &optional display |
1926 |
@tindex display-pixel-width |
@tindex display-pixel-width |
1927 |
This function returns the width of the screen in pixels. |
This function returns the width of the screen in pixels. |
1928 |
|
On a character terminal, it gives the width in characters. |
1929 |
@end defun |
@end defun |
1930 |
|
|
1931 |
@defun display-mm-width &optional display |
@defun display-mm-width &optional display |
1979 |
|
|
1980 |
@defun x-server-version &optional display |
@defun x-server-version &optional display |
1981 |
This function returns the list of version numbers of the X server |
This function returns the list of version numbers of the X server |
1982 |
running the display. |
running the display. The value is a list of three integers: the major |
1983 |
|
and minor version numbers, and the vendor-specific release number. |
1984 |
@end defun |
@end defun |
1985 |
|
|
1986 |
@defun x-server-vendor &optional display |
@defun x-server-vendor &optional display |
1987 |
This function returns the vendor that provided the X server software. |
This function returns the ``vendor'' that provided the X server software |
1988 |
|
(as a string). |
1989 |
@end defun |
@end defun |
1990 |
|
|
1991 |
@ignore |
@ignore |