[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
XEmacs provides the concept of devices, which generalizes connections to an X server, a TTY device, etc. Most information about an X server that XEmacs is connected to can be determined through general console and device functions. See section Consoles and Devices. However, there are some features of the X Window System that do not generalize well, and they are covered specially here.
58.1 X Selections | Transferring text to and from other X clients. | |
58.2 X Server | Information about the X server connected to a particular device. | |
58.3 Miscellaneous X Functions and Variables | Other X-specific functions and variables. |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The X server records a set of selections which permit transfer of data between application programs. The various selections are distinguished by selection types, represented in XEmacs by symbols. X clients including XEmacs can read or set the selection for any given type.
This function sets a “selection” in the X server. It takes two arguments: a value, data, and the selection type type to assign it to. data may be a string, a cons of two markers, or an extent. In the latter cases, the selection is considered to be the text between the markers, or between the extent’s endpoints.
Each possible type has its own selection value, which changes
independently. The usual values of type are PRIMARY
and
SECONDARY
; these are symbols with upper-case names, in accord
with X Windows conventions. The default is PRIMARY
.
(In FSF Emacs, this function is called x-set-selection
and
takes different arguments.)
This function accesses selections set up by XEmacs or by other X clients. It returns the value of the current primary selection.
Assuming we own the selection, this function disowns it. If
secondary-p is non-nil
, the secondary selection instead of
the primary selection is discarded.
The X server also has a set of numbered cut buffers which can store text or other data being moved between applications. Cut buffers are considered obsolete, but XEmacs supports them for the sake of X clients that still use them.
This function returns the contents of cut buffer number n. (This
function is called x-get-cut-buffer
in FSF Emacs.)
This function stores string into the first cut buffer (cut buffer 0).
Normally, the contents of the first cut buffer are simply replaced by
string. However, if optional argument push is
non-nil
, the cut buffers are rotated. This means that the
previous value of the first cut buffer moves to the second cut buffer,
and the second to the third, and so on, moving the other values down
through the series of cut buffers, kill-ring-style. There are 8 cut
buffers altogether.
Cut buffers are considered obsolete; you should use selections instead.
This function has no effect if support for cut buffers was not compiled in.
This function is called x-set-cut-buffer
in FSF Emacs.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This section describes how to access and change the overall status of the X server XEmacs is using.
58.2.1 Resources | Getting resource values from the server. | |
58.2.2 Data about the X Server | Getting info about the X server. | |
58.2.3 Restricting Access to the Server by Other Apps | Restricting access to the server by other apps. |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This function return the default X device for resourcing. This is the first-created X device that still exists.
This function retrieves a resource value from the X resource manager.
string
,
integer
, natnum
, or boolean
, specifying the type of
object that the database is searched for.
global
.
If omitted, it defaults to global
.
default-x-device
.
nil
, means do not signal an
error if a bogus resource specification was retrieved (e.g. if a
non-integer was given when an integer was requested). In this case, a
warning is issued instead.
The resource names passed to this function are looked up relative to the locale.
If you want to search for a subresource, you just need to specify the resource levels in name and class. For example, name could be ‘"modeline.attributeFont"’, and class ‘"Face.AttributeFont"’.
Specifically,
|
is an interface to a C call something like
|
|
is an interface to a C call something like
|
|
is an interface to a C call something like
|
global
, a call
|
is an interface to a C call something like
|
Note that for global
, no prefix is added other than that of the
application itself; thus, you can use this locale to retrieve arbitrary
application resources, if you really want to.
The returned value of this function is nil
if the queried
resource is not found. If type is string
, a string is
returned, and if it is integer
, an integer is returned. If
type is boolean
, then the returned value is the list
(t)
for true, (nil)
for false, and is nil
to mean
“unspecified”.
This function adds a resource to the resource database for device. resource-line specifies the resource to add and should be a standard resource specification.
This variable holds The X application class of the XEmacs process. This controls, among other things, the name of the “app-defaults” file that XEmacs will use. For changes to this variable to take effect, they must be made before the connection to the X server is initialized, that is, this variable may only be changed before XEmacs is dumped, or by setting it in the file ‘lisp/term/x-win.el’.
By default, this variable is nil
at startup. When the connection
to the X server is first initialized, the X resource database will
be consulted and the value will be set according to whether any
resources are found for the application class “XEmacs”.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This section describes functions and a variable that you can use to get information about the capabilities and origin of the X server corresponding to a particular device. The device argument is generally optional and defaults to the selected device.
This function returns the list of version numbers of the X server device is on. The returned value is a list of three integers: the major and minor version numbers of the X protocol in use, and the vendor-specific release number.
This function returns the vendor supporting the X server device is on.
This function returns the visual class of the display device is
on. The value is one of the symbols static-gray
,
gray-scale
, static-color
, pseudo-color
,
true-color
, and direct-color
. (Note that this is different
from previous versions of XEmacs, which returned StaticGray
,
GrayScale
, etc.)
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This function grabs the keyboard on the given device (defaulting to the
selected one). So long as the keyboard is grabbed, all keyboard events
will be delivered to XEmacs—it is not possible for other X clients to
eavesdrop on them. Ungrab the keyboard with x-ungrab-keyboard
(use an unwind-protect
). Returns t
if the grab was
successful; nil
otherwise.
This function releases a keyboard grab made with x-grab-keyboard
.
This function grabs the pointer and restricts it to its current window.
If optional device argument is nil
, the selected device
will be used. If optional cursor argument is non-nil
,
change the pointer shape to that until x-ungrab-pointer
is called
(it should be an object returned by the make-cursor
function).
If the second optional argument ignore-keyboard is non-nil
,
ignore all keyboard events during the grab. Returns t
if the
grab is successful, nil
otherwise.
This function releases a pointer grab made with x-grab-pointer
.
If optional first arg device is nil
the selected device is
used. If it is t
the pointer will be released on all X devices.
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated by Aidan Kehoe on December 27, 2016 using texi2html 1.82.