[ << ] | [ < ] | [ 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 device functions. @xref{Devices}. However, there are some features of the X Window System that do not generalize well, and they are covered specially here.
1.1 X Selections | Transferring text to and from other X clients. | |
1.2 X Server | Information about the X server connected to a particular device. | |
1.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), moving the other values down through the series of cut buffers,
kill-ring-style. (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.
1.2.1 Resources | Getting resource values from the server. | |
1.2.2 Data about the X Server | Getting info about the X server. | |
1.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,
(x-get-resource "foreground" "Foreground" 'string some-buffer)
is an interface to a C call something like
XrmGetResource (db, "xemacs.buffer.buffer-name.foreground",
"Emacs.EmacsLocaleType.EmacsBuffer.Foreground",
"String");
(x-get-resource "foreground" "Foreground" 'string some-frame)
is an interface to a C call something like
XrmGetResource (db, "xemacs.frame.frame-name.foreground",
"Emacs.EmacsLocaleType.EmacsFrame.Foreground",
"String");
(x-get-resource "foreground" "Foreground" 'string some-device)
is an interface to a C call something like
XrmGetResource (db, "xemacs.device.device-name.foreground",
"Emacs.EmacsLocaleType.EmacsDevice.Foreground",
"String");
global
, a call
(x-get-resource "foreground" "Foreground" 'string 'global)
is an interface to a C call something like
XrmGetResource (db, "xemacs.foreground",
"Emacs.Foreground",
"String");
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’.
[ << ] | [ < ] | [ 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.
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This variable holds a list of the directories in which X bitmap files
may be found. If nil
, this is initialized from the
‘"*bitmapFilePath"’ resource. This is used by the
make-image-instance
function (however, note that if the
environment variable ‘XBMLANGPATH’ is set, it is consulted first).
This variable holds the search path used by read-color
to find
‘rgb.txt’.
This function returns true if keysym names a keysym that the X library knows about. Valid keysyms are listed in the files ‘/usr/include/X11/keysymdef.h’ and in ‘/usr/lib/X11/XKeysymDB’, or whatever the equivalents are on your system.
This function returns the ID of the X11 window. This gives us a chance to manipulate the Emacs window from within a different program. Since the ID is an unsigned long, we return it as a string.
If non-nil
, synthetic events are allowed. nil
means
they are ignored. Beware: allowing XEmacs to process SendEvents opens a
big security hole.
With a true arg, make the connection to the X server synchronous. With
false, make it asynchronous. Synchronous connections are much slower,
but are useful for debugging. (If you get X errors, make the connection
synchronous, and use a debugger to set a breakpoint on
x_error_handler
. Your backtrace of the C stack will now be
useful. In asynchronous mode, the stack above x_error_handler
isn’t helpful because of buffering.) If device is not specified,
the selected device is assumed.
Calling this function is the same as calling the C function
XSynchronize
, or starting the program with the ‘-sync’
command line argument.
If non-zero, debug information about events that XEmacs sees is displayed. Information is displayed on stderr. Currently defined values are:
[Top] | [Contents] | [Index] | [ ? ] |
This document was generated on December 6, 2024 using texi2html 5.0.
The buttons in the navigation panels have the following meaning:
Button | Name | Go to | From 1.2.3 go to |
---|---|---|---|
[ << ] | FastBack | Beginning of this chapter or previous chapter | 1 |
[ < ] | Back | Previous section in reading order | 1.2.2 |
[ Up ] | Up | Up section | 1.2 |
[ > ] | Forward | Next section in reading order | 1.2.4 |
[ >> ] | FastForward | Next chapter | 2 |
[Top] | Top | Cover (top) of document | |
[Contents] | Contents | Table of contents | |
[Index] | Index | Index | |
[ ? ] | About | About (help) |
where the Example assumes that the current position is at Subsubsection One-Two-Three of a document of the following structure:
This document was generated on December 6, 2024 using texi2html 5.0.