DwtWindow(3Dwt) DwtWindow(3Dwt)
Name
DwtWindow, DwtWindowCreate - Creates a window widget for simple applications to display in the main window widget work area.
Syntax
Widget DwtWindow(parent_widget, name, x, y, width,
height, callback)
Widget parent_widget;
char *name;
Position x, y;
Dimension width, height;
DwtCallbackPtr callback;
Widget DwtWindowCreate (parent_widget, name,
override_arglist, override_argcount)
Widget parent_widget;
char *name;
ArgList override_arglist;
int override_argcount;
Arguments
parent_widget
Specifies the parent widget ID.
name Specifies the name of the created widget.
x Specifies the placement, in pixels, of the left side of the widget window relative to the inner upper left corner of the parent
window. This argument sets the DwtNx core widget attribute.
y Specifies, in pixels, the placement of the top of the widget window relative to the inner upper left corner of the parent window.
This argument sets the DwtNy core widget attribute.
width Specifies in pixels the width of the widget window. This argument sets the DwtNwidth core widget attribute.
height Specifies in pixels the height of the widget window. This argument sets the DwtNheight core widget attribute.
callback Specifies the callback function or functions called when an Expose event occurs. This argument sets the DwtNexposeCallback
attribute associated with DwtWindowCreate.
override_arglist
Specifies the application override argument list.
override_argcount
Specifies the number of attributes in the application override argument list (override_arglist).
Description
The DwtWindow and DwtWindowCreate functions create an instance of the window widget and return its associated widget ID. The window widget
simplifies programming allowing you to create an application display directly in the main window widget work area. the window widget sim-
plifies programming by allowing you to create an application display directly in the main window widget work area. When calling DwtWindow,
you set the window widget attributes presented in the formal parameter list. For DwtWindowCreate, you specify a list of attribute
name/value pairs that represent all the possible window widget attributes.
Inherited Attributes
------------------------------------------------------------------
Attribute Name Data Type Default
------------------------------------------------------------------
Core Attributes
DwtNx Position Determined by the geome-
try manager
DwtNy Position Determined by the geome-
try manager
DwtNwidth Dimension Widget-specific
DwtNheight Dimension Widget-specific
DwtNborderWidth Dimension One pixel
DwtNborder Pixel Default foreground color
DwtNborderPixmap Pixmap NULL
DwtNbackground Pixel Default background color
DwtNbackgroundPixmap Pixmap NULL
DwtNcolormap Colormap Default color map
DwtNsensitive Boolean True
Setting the sensitivity
of the window causes all
widgets contained in
that window to be set to
the same sensitivity as
the window.
DwtNancestorSensitive Boolean The bitwise AND of the
parent widget's DwtNsen-
sitive and DwtNances-
torSensitive attributes
DwtNaccelerators XtTranslations NULL
DwtNdepth int Depth of the parent win-
dow
DwtNtranslations XtTranslations NULL
DwtNmappedWhenManaged Boolean True
DwtNscreen Screen * The parent screen
DwtNdestroyCallback DwtCallbackPtr NULL
Common Attributes
DwtNforeground Pixel Default foreground color
DwtNhighlight Pixel Default foreground color
DwtNhighlightPixmap Pixmap NULL
DwtNuserData Opaque * NULL
DwtNdirectionRToL unsigned char DwtDirectionRightDown
DwtNfont NOT SUPPORTED
DwtNhelpCallback NOT SUPPORTED
------------------------------------------------------------------
Widget-Specific Attributes
------------------------------------------------------
Attribute Name Data Type Default
------------------------------------------------------
DwtNexposeCallback DwtCallbackPtr NULL
------------------------------------------------------
DwtNexposeCallback
Specifies the callback function or functions called when the window had an Expose event. For this callback, the reason is
DwtCRExpose.
Return Values
These functions return the ID of the created widget.
Callback Information
The following structure is returned to your callback:
typedef struct {
int reason;
XExposeEvent *event;
Window w;
} DwtWindowCallbackStruct;
The reason member is set to a constant that represents the reason why this callback was invoked. For this callback, the reason member can
be set to:
DwtCRExpose The window widget had an
Expose event.
The event member is a pointer to the Xlib structure XExposeEvent. This structure is associated with exposure event processing, and,
specifically, with Expose events. For information on exposure event processing, see the Guide to the Xlib Library: C Language Binding.
The members of the XExposeEvent structure associated with Expose events are window, x, y, width, height, and count. The window member is
set to the window ID of the exposed (damaged) window. The x and y members are set to the coordinates relative to the drawable's origin and
indicate the upper-left corner of the rectangle. The width and height members are set to the size (extent) of the rectangle. The count
member is set to the number of Expose events that are to follow. If count is set to zero(0), no more Expose events follow for this win-
dow. However, if count is set to nonzero, at least count Expose events and possibly more follow for this window. Simple applications that
do not want to optimize redisplay by distinguishing between subareas of its windows can just ignore all Expose events with nonzero counts
and perform full redisplays on events with zero counts.
The w member is set to the X window ID where the Expose event occurred.
See Also
Guide to the XUI Toolkit: C Language Binding
Guide to the XUI Toolkit Intrinsics: C Language Binding
DwtWindow(3Dwt)