The appearance and behavior of a window is largely determined by
window attributes. The ProXL primitives create_window/2
,
put_window_attributes/2
, and get_window_attributes/2
form
a family whose first argument is a windowable and whose second
argument is a list of attributes. The first two primitives give
attributes to a window, and the last allows you to inquire about the
current state of a window.
The available attributes are listed here. The right hand column describes the attribute, lists the values of the variable (describing them when necessary), and indicates the default value of V.
parent
(V)
x
(V)
y
(V)
position
(X,Y)
x(
X)
, y(
Y)
.
width
(V)
height
(V)
size
(W,H)
width(
W)
, height(
h)
.
depth
(V)
border_width
(V)
class
(V)
input_output
(default)
input_only
This attribute cannot be modified once a window is created.
visual
(V)
background
(V)
none
(default)
parent_relative
Due to the design of the X window system itself, this attribute cannot
be determined, but only modified.
border
(V)
copy_from_parent
(default)
Due to the design of the X window system itself, this attribute cannot
be determined, but only modified.
bit_gravity
(V)
north_west
north
north_east
west
center
east
south_west
south
south_east
static
forget
(default)
win_gravity
(V)
north_west
north
north_east
west
center
east
south_west
south
south_east
static
unmap
(default)
backing_store(
V)
not_useful
(default)
when_mapped
always
Note that some screens don't support backing store, and even those
that do may not always provide it when asked. Your application must
always be prepared to repaint its own windows.
backing_bit_planes
(V)
backing_store
is used, which
planes should be saved? V is a bit mask. The default is to
save all planes (i.e., V = -1).
backing_pixel
(V)
save_under
(V)
backing_store
(V), not all screens support
this, and those that do might not support it whenever asked to.
V may be either:
true
false
(default)
event_mask
(V)
do_not_propagate_mask
(V)
event_mask(
V)
or
do_not_propagate_mask(
V)
will be forwarded to this window's
parent.
override_redirect
(V)
false
true
colormap
(V)
copy_from_parent
(default)
cursor
(V)
none
Due to the design of the X window system itself, this attribute cannot
be determined, but only modified.
mapped
(V)
false
true
viewable
gc
(V)
property
(N,V)
property(
N,V)
attribute to
tell a window manager how to handle your windows.
callback
(E,F,V,C,G)
handle_events
procedure in order to exit the handle_events
loop. If V
is none
, then no result will be passed to handle_events
.
C is the context of the call, which is specified as the second
argument to handle_events/2
. This allows a callback's behavior
to depend on the context in which it occurs. See
pxl-ev for more information.
callback
(E,F,V,G)
callback(
E,F,V,_,G)
.
callback
(E,F,G)
callback(
E,F,none
,_,G)
.