Next: xwindow
Up: simxlib
Previous: xtextitems
x_window
NAME
x_window - part of Simula to Xlib interface
DESCRIPTION
Xlib_Window class X_Window(Parent);
ref(X_Window) Parent;
Matches the additional xlib functionality in windows on top
of what is provided from X_Drawable. All parameters that
have a pre-defined set of values, are available as constants
in this class.
constants
SUPERS: Xlib_Window, X_Drawable, Xlib_Drawable, Xlib_object
KIND: Abstract
INIT: see XWindow
Sequencing: (<any of the operations>)* Free
: Input=SelectInput/GetMyEventMask/SetDoNotPropagateMask/
: GetDoNotPropagateMask
:
Grab=SetInputFocus/GrabButton/UngrabButton/GrabKey/UngrabKey/
: GrabKeyboard/UngrabKeyboard/GrabPointer/UngrabPointer/
:
GrabServer/UngrabServer/AllowEvents/ChangeActivePointerGrab
: Visibility=MapWindow/MapRaised/UnmapWindow/MapSubwindows/
: WithdrawWindow/UnmapSubwindows
:
Drawing=ClearArea/ClearWindow/DefineCursor/UndefineCursor/
:
MoveWindow/ResizeWindow/MoveResizeWindow/TranslateCoordinates
: Hints=GetTransientForHint/SetTransientForHint/
: SetClassHint/SetNormalHints/SetSizeHints/SetZoomHints/
: SetWMHints/SetWMSizeHints/SetWMNormalHints
: Background=SetWindowColormap/SetWindowBackground/
: SetWindowBackgroundPixmap/
: SetWindowBackgroundPixmapParentRelative/
:
SetWindowBorderWidth/SetWindowBorder/SetWindowBorderPixmap
: ApplWin=SetStandardProperties/SetIconName/StoreName
:
Overlap=ReparentWindow/LowerWindow/RaiseWindow/CirculateSubwindows/
: CirculateSubwindowsUp/CirculateSubwindowsDown/
: RestackWindow/RestackWindowRelative
: Control=SetBitGravity/SetWindowGravity/SetBackingStore/
: SetBackingPlanes/SetBackingPixel/SetOverrideRedirect/
: UnSetOverrideRedirect/SetSaveUnder/UnSetSaveUnder
:
Enquery=GetIOclass/GetBitGravity/GetWindowGravity/GetBackingStore/
: GetBackingPlanes/GetBackingPixel/DoesSaveUnder/
:
HasColorMapInstalled/GetMapState/GetAllClientsEventMasks/
: /DoesOverrideRedirect
:
Database=ChangeProperty/DeleteProperty/ListProperties/SetWMProtocols
: Saveset=AddToSaveSet/ChangeSaveSet/RemoveFromSaveSet
INPUT MANAGEMENT
Input Event Masks
Avaiable event types are the following: NoEventMask
KeyPressMask KeyReleaseMask
ButtonPressMask ButtonReleaseMask EnterWindowMask
LeaveWindowMask PointerMotionMask
PointerMotionHintMask
Button1MotionMask Button2MotionMask Button3MotionMask
Button4MotionMask Button5MotionMask ButtonMotionMask
KeymapStateMask ExposureMask
VisibilityChangeMask
StructureNotifyMask ResizeRedirectMask
SubstructureNotifyMask
SubstructureRedirectMask FocusChangeMask
PropertyChangeMask ColormapChangeMask OwnerGrabButtonMask
Each value associated with an Event class. When Enabled,
objects of this class are sent to the controller of the
X_Window, see XProcess.
EventMasks are singel bit values and can be added together
to represent more than one event-class.
SelectInput
procedure SelectInput(Event_Mask);
integer Event_Mask;! Sum of Event-masks;
Enable the event types included in Event_Mask to be sent to
this window.
GetMyEventMask
integer procedure GetMyEventMask;
Returns Event_Mask selected for this window by this client.
SetDoNotPropagateMask
procedure SetDoNotPropagateMask(mask);
integer mask; ! Combination (+) of the Input Event Mask
values ;
Define which events should NOT be propagated to the parent
window in case they are not selected (by SelectInput) for
this window.
GetDoNotPropagateMask
integer procedure GetDoNotPropagateMask;
Returns the do_not_propagate_mask attribute (the set of
events that should not be propagated to the parent window).
Result is the sum of all Event_masks set (a bit each).
GRAB OPERATIONS
SetInputFocus
procedure SetInputFocus(revert_to,time);
integer revert_to;!=RevertTo(None/PointerRoot/Parent);
integer time;
Set the keyboard focus to this window.
GrabButton
procedure GrabButton(button, modifiers, owner_events,
event_mask, pointer_mode, keyboard_mode, confine_to,
cursor);
integer button;
integer modifiers;
integer event_mask;
integer pointer_mode; !=GrabModeSync/GrabModeAsync;
integer keyboard_mode;!=GrabModeSync/GrabModeAsync;
boolean owner_events;
ref(X_Window) confine_to;
ref(X_Cursor) cursor;
Grab a pointer button.
UngrabButton
procedure UngrabButton(button, modifiers);
integer button;
integer modifiers;
Release a button from a passive grab.
GrabKey
procedure GrabKey(keycode,modifiers,owner_events,
pointer_mode,keyboard_mode);
integer keycode;
integer modifiers;
integer pointer_mode;!=GrabModeSync/GrabModeAsync;
integer keyboard_mode;!=GrabModeSync/GrabModeAsync;
boolean owner_events;
Grab a key.
UngrabKey
procedure UngrabKey(keycode, modifiers);
integer keycode;
integer modifiers;
Release a key from a passive grab.
GrabKeyboard
procedure GrabKeyboard(owner_events,pointer_mode,
keyboard_mode,time);
boolean owner_events;
integer pointer_mode;!=GrabModeSync/GrabModeAsync;
integer keyboard_mode;!=GrabModeSync/GrabModeAsync;
integer time; !=0 for CurrentTime;
Grab the keyboard.
UngrabKeyboard
procedure UngrabKeyboard(time);
integer time;
Release the keyboard from an active grab.
GrabPointer
procedure
GrabPointer(owner_events,event_mask,pointer_mode,
keyboard_mode,confine_to,cursor,time);
integer event_mask;
integer pointer_mode;
integer keyboard_mode;
integer time; !=0 for CurrentTime;
boolean owner_events;
ref(X_Window) confine_to;
ref(X_Cursor) cursor;
Grab the pointer.
UngrabPointer
procedure UngrabPointer(time);
integer time; !=0 for CurrentTime;
Release the pointer from an active grab.
GrabServer
Procedure GrabServer;
Grab the server.
UngrabServer
Procedure UngrabServer;
Release the server from grab.
AllowEvents
procedure AllowEvents(event_mode, time);
integer
event_mode;!=(Async/Sync/Reply)(Pointer/Keyboard)/(A)SynchBoth;
integer time; !=0 for CurrentTime;
Control the behavior of keyboard and pointer events when
these resources are grabbed: Event_Mode can take the
following values:
AsyncPointer/SyncPointer/ReplayPointer/
AsyncKeyboard/SyncKeyboard/ReplayKeyboard/
AsyncBoth/SyncBoth
ChangeActivePointerGrab
procedure
ChangeActivePointerGrab(event_mask,cursor,time);
integer event_mask;
integer time;
ref(X_Cursor) cursor;
Change the parameters of an active pointer grab.
VISIBILITY OPERATIONS
MapWindow
procedure MapWindow;
Map this window. Does not change the stacking order.
MapRaised
procedure MapRaised;
Map this window on top of its siblings.
UnmapWindow
procedure UnmapWindow;
Unmap this window.
MapSubwindows
procedure MapSubwindows;
Map all subwindows of this window.
UnmapSubwindows
procedure UnmapSubwindows;
Unmap all the subwindows of this window.
WithdrawWindow
integer procedure WithdrawWindow;
Hides (?) the window. Returns a Status=?.
DRAWING OPERATIONS
ClearArea
procedure ClearArea(x,y,width,height,exposures);
integer x,y,width,height;
boolean exposures;
Clear a rectangular area in this window.
ClearWindow
procedure ClearWindow;
Clear the entire window.
DefineCursor
procedure DefineCursor(cursor);
ref(X_Cursor) cursor; !==None for parent's cursor ;
Assign a cursor to this window. None as parameter means
parets's cursor.
UndefineCursor
procedure UndefineCursor;
Disassociate the cursor from this window.
MoveWindow
procedure MoveWindow(x,y);
integer x,y;
Move this window.
ResizeWindow
procedure ResizeWindow(width,height);
integer width,height;
Change the size of this window.
MoveResizeWindow
procedure MoveResizeWindow(x,y,width,height);
integer x,y,width,height;
Change the size and position of this window.
TranslateCoordinates
boolean procedure TranslateCoordinates(src_w,src_x,src_y,
dest_x_return,dest_y_return,child_return);
name dest_x_return,dest_y_return,child_return;
ref(X_Window) src_w,child_return;
integer src_x,src_y; ! parameters;
integer dest_x_return,dest_y_return;! results;
Change the coordinate system, return True on success.
HINTS OPERATIONS
GetTransientForHint
ref(X_Window) procedure GetTransientForHint;
Returns the window contained in the 'XA_WM_TRANSIENT_FOR'
property of this window. Returns NONE on failure.
SetTransientForHint
procedure SetTransientForHint(prop_window);
ref(X_Window) prop_window;
Set the 'XA_WM_TRANSIENT_FOR' window for this window.
SetClassHint
procedure SetClassHint(class_hint);
ref(XClassHint) class_hint; ! Filled before call.;
Set the 'XA_WM_CLASS' property of this window.
SetNormalHints
procedure SetNormalHints(hints);
ref(XSizeHints) hints;! Filled before call.;
Set the size hints property of this window in normal state
(not zoomed or iconified).
SetSizeHints
procedure SetSizeHints(hints,property);
ref(XSizeHints) hints;! Filled before call.;
integer property; !???;
Set the value of any property of type 'XA_SIZE_HINTS'.
SetZoomHints
procedure SetZoomHints(zhints);
ref(XSizeHints) zhints;! Filled before call;
Set the size hints property to be used when this window is
zoomed.
SetWMHints
procedure SetWMHints(wmhints);
ref(XWMHints) wmhints;! Filled before call.;
Set a window manager hints property
---Not yet fully implemented /GH
SetWMSizeHints
procedure SetWMSizeHints(hints,property);
ref(XSizeHints) hints;! Filled before call;
integer property; !???;
Set this window's WM_SIZE_HINTS property.
SetWMNormalHints
procedure SetWMNormalHints(hints);
ref(XSizeHints) hints; !Filled before call.;
Set this window's XA_WM_NORMAL_HINTS property
---Not yet fully implemented / GH
BACKGROUND OPERATIONS
SetWindowColormap
procedure SetWindowColormap(cmap);
ref (Xlib_Colormap) cmap; !==NONE means copy from parent;
Set the colormap attribute of this window.
SetWindowBackground
procedure SetWindowBackground(background_pixel);
integer background_pixel;
Set the background pixel value attribute of this window.
SetWindowBackgroundPixmap
procedure SetWindowBackgroundPixmap(background_tile);
ref(X_Pixmap) background_tile; !==NONE means share with
parent;
Change the background tile attribute of this window.
SetWindowBackgroundPixmapParentRelative
procedure SetWindowBackgroundPixmapParentRelative;
Change the background tile attribute of this window to
"ParentRelative".
SetWindowBorderWidth
procedure SetWindowBorderWidth(width);
integer width;
Change the border width of this window.
SetWindowBorder
procedure SetWindowBorder(border_pixel);
integer border_pixel;
Change the window border pixel value attribute and repaint
the border.
SetWindowBorderPixmap
procedure SetWindowBorderPixmap(border_tile);
ref(X_Pixmap) border_tile; !==NONE means no Pixmap. ;
Change the window border tile attribute and repaint the
border.
APPLWIN OPERATIONS
SetStandardProperties
procedure SetStandardProperties(window_name,icon_name,
icon_pixmap,argv,argc,hints);
text window_name,icon_name;
ref(XSizeHints) hints;
ref(X_Pixmap) icon_pixmap; ! NONE can be used ;
integer argc;
integer argv;
Set the minimum set of properties for the window manager in
one call.
Obsolete - to be superseded by SetWMProperties /GH
SetIconName
procedure SetIconName(icon_name);
text icon_name;
Set the name to be displayed in this window's icon.
Obsolete - to be superseded by SetWMIconName /GH
StoreName
procedure StoreName(window_name);
text window_name;
Set the name to be displayed on this window's frame.
Obsolete - to be superseded by XSetWMName /GH .
OVERLAP OPERATIONS
ReparentWindow
procedure ReparentWindow(newparent,x,y);
ref(X_Window) newparent;
integer x,y; ! New position ;
Move this window in the window hierarchy.
LowerWindow
procedure LowerWindow;
Lower this window in the stacking order.
RaiseWindow
procedure RaiseWindow;
Raise this window to the top of the stacking order.
CirculateSubwindows
procedure CirculateSubwindows(direction);
integer direction;!=RaiseLowest/LowerHighest;
Circulate the stacking order of this window's children,up or
down.
CirculateSubwindowsUp
procedure CirculateSubwindowsUp;
Circulate the top child to the bottom of the stacking order.
CirculateSubwindowsDown
procedure CirculateSubwindowsDown;
Circulate the bottom child to the top of the stacking order.
RestackWindow
procedure RestackWindow(stackmode);
integer stackmode; !=Above/Below/TopIf/BottomIf/Opposite;
Restacks this window. StackMode is one of the values:
Above Below TopIf BottomIf Opposite
RestackWindowRelative
procedure RestackWindowRelative(sibling, stackmode);
ref(X_Window) sibling;
integer stackmode; !=Above/Below/TopIf/BottomIf/Opposite;
Restacks this window relative to a sibling.
CONTROL OPERATIONS
SetBitGravity
procedure SetBitGravity(gravity);
integer gravity;! one of the Bit Gravity values ;
To control how bits are moved when window is resized. The
parameter Gravity should have one of the following values:
ForgetGravity NorthWestGravity NorthGravity
NorthEastGravity
WestGravity CenterGravity EastGravity SouthWestGravity
SouthGravity SouthEastGravity StaticGravity
SetWindowGravity
procedure SetWindowGravity(gravity);
integer gravity; ! one of the Gravity values ;
To control the repositioning of subwindows when this window
is resized. For Garvity values, see above.
SetBackingStore
procedure SetBackingStore(hint);
integer hint; !=NotUseful/WhenMapped/Always ;
To advise the server if saving a copy of this window would
be useful.
SetBackingPlanes
procedure SetBackingPlanes(planeMask);
integer planeMask; ! planes to be preserved if
possible/AllPlanes ;
To tell the server which planes to save in case the server
saves a copy of the window. Constant 'AllPlanes' can be
used.
SetBackingPixel
procedure SetBackingPixel(pixel);
integer pixel; ! value to use in restoring planes ;
To tell the server what pixel to be used in planes not saved
by the server (in case the server saves other planes)
SetOverrideRedirect
procedure SetOverrideRedirect;
Allow this window to be mapped, moved, resized, etc. without
intervention from the window manager.
UnSetOverrideRedirect
procedure UnSetOverrideRedirect;
Allow the window manager to modify mapping, moving,
resizing, etc. requests again.
SetSaveUnder
procedure SetSaveUnder;
Set the Save Under property. This makes the server save the
bits under this window before it is mapped, and restore them
again when it is unmapped.
UnSetSaveUnder
procedure UnSetSaveUnder;
Unset the Save Under property.
ENQUERIES
GetIOclass
integer procedure GetIOclass;
Returns the "window class" attribute (InputOutput or
InputOnly)
GetBitGravity
integer procedure GetBitGravity;
Returns the bit_gravity attribute.
GetWindowGravity
integer procedure GetWindowGravity;
Returns the win_gravity attribute.
GetBackingStore
integer procedure GetBackingStore;
Returns the backing_store attribute:
NotUseful/WhenMapped/Always.
GetBackingPlanes
integer procedure GetBackingPlanes;
Returns the backing_planes attribute (what planes to
preserve if possible).
GetBackingPixel
integer procedure GetBackingPixel;
Returns the backing_pixel attribute (what value to use when
restoring non-preserved planes).
DoesSaveUnder
boolean procedure DoesSaveUnder;
Returns TRUE if the Save Under property is set.
HasColorMapInstalled
boolean procedure HasColorMapInstalled;
Returns TRUE if a color map is currently installed.
GetMapState
integer procedure GetMapState;
Returns the map_state attribute:
IsUnmapped/IsUnviewable/IsViewable.
GetAllClientsEventMasks
integer procedure GetAllClientsEventMasks;
Returns the all_event_masks attribute (the set of events all
clients have selected for this window).
DoesOverrideRedirect
boolean procedure DoesOverrideRedirect;
Returns the override_redirect attribute (TRUE if override
redirect is in effect).
DATABASE OPERATIONS
ChangeProperty
procedure ChangeProperty(property,type,format,mode,data);
name data;
integer property;
integer type;
integer format;
integer Mode;!=PropMode(Replace/Prepend/Append);
text data;
Change a property associated with this window.
DeleteProperty
procedure DeleteProperty(property);
integer property;
Delete a property of this window.
ListProperties
ref(XIntegerArray) procedure ListProperties;
Get the property list for a window.
SetWMProtocols
procedure SetWMProtocols(WMProtocol,protocols);
integer array WMProtocol;! Atom values for 'WM_'-strings;
integer protocols; ! items 1:protocols valid.;
Change the WindowManager handling of this window.
SAVESET OPERATIONS
AddToSaveSet
procedure AddToSaveSet;
Add this window to the client's save set.
ChangeSaveSet
procedure ChangeSaveSet(change_mode);
integer change_mode;!= SetModeInsert/SetModeDelete;
Add or remove this window from the client's save set.
RemoveFromSaveSet
procedure RemoveFromSaveSet;
Remove this window from the client's save set.