2
XView Attributes
This section lists all XView attributes in alphabetical order. Each attribute’s description is in
the format shown by the entry on this page. Only the fields appropriate to the particular attri-
bute are shown.
INTRODUCTION
This field provides a brief description of the attribute.
Return Type: The return type describes the type that the attribute should return on a call to xv_get().
Note that this return type is normally coerced by the programmer. This field is only
shown when the attribute is valid with xv_get().
Argument: This shows the first programmer supplied value associated with the attribute. If an attri-
bute has multiple values, then the type of each value is shown in multiple Argument
fields.
Valid Values: Shows a list {in brackets} of values that are valid for the attribute.
Default: The default field shows the default value for the attribute.
Procs: Shows the attribute’s valid procedures. In this field, xv_create, xv_find, xv_get,
and xv_set exclude the xv_ prefix.
Objects: The objects field shows the valid object or objects for the attribute. Attributes are divided
into three classes: generic, common, and specific. (For more information, refer to the
XView Programming Manual, Section 2.2.3, Types of Attributes.)
Callback:
returntype
function_name_proc(arg1, arg2, arg3)
type1 arg1;
type2 *arg2;
type3 *arg3;
The callback field shows the application programmer defined callback procedure associ-
ated with the attribute. If there are multiple callbacks associated with the attribute, each
callback has its own Callback field. The function’s return value is provided, along with a
description of its arguments, if any.
Usage: If an example is provided it will be shown in this field.
See Also: Where there are numbers, they refer to chapters and sections in the XView Programming
Manual, where the attribute is described (letters refer to appendices). A list of related
attributes and/or other related information may also be shown.
XView Attributes
XView Attributes 31
ATTR_LIST
Specifies a NULL-terminated attribute-value list. It has no value type or default, but when used, it must
be the first attribute in an attribute-value list. ATTR_STANDARD_SIZE, defined in attr.h, defines the
maximum size of the attribute-value list.
Argument: Attr_avlist
Procs: create,set
Objects: All
Usage:
xv_create(object, pkg,
ATTR_LIST, avlist,
other_attrs, ..., 0);
See Also: 25.2.2.1, attr_create_list() in Section 3, Procedures and Macros
CANVAS_AUTO_CLEAR
Same as the
OPENWIN_AUTO_CLEAR attribute.
CANVAS_AUTO_EXPAND
If TRUE, canvas width and height are never allowed to be less than the edges of the canvas window.
Argument: Bool
Default:
TRUE
Procs: create, get, set
Objects: Canvas
See Also: 5.4.1
CANVAS_AUTO_SHRINK
If
TRUE, canvas width and height are never allowed to be greater than the edges of the canvas win-
dow.
Argument: Bool
Default:
TRUE
Procs: create, get, set
Objects: Canvas
See Also: 5.4.1
CANVAS_CMS_REPAINT
Specifies whether the canvas repaint procedure is called whenever a new colormap segment is set on
the canvas, and/or the foreground and background colors of the canvas are changed.
Argument: Bool
Default:
FALSE
Procs: create, get, set
Objects: Canvas
See Also: 5.3
CANVAS_FIXED_IMAGE
Sets the BitGravity for the canvas paint windows to be NorthWestGravity when TRUE or
ForgetGravity when
FALSE.
Argument: Bool
Default:
TRUE
Procs: create, get, set
Objects: Canvas
See Also: 5.2 ,
WIN_BIT_GRAVITY, CANVAS_RESIZE_PROC
32 XView Reference Manual
CANVAS_HEIGHT
Specifies the height of the canvas paint window in pixels.
Argument: int
Default: 0
Procs: create, get, set
Objects: Canvas
See Also: 5.4.2,
CANVAS_MIN_PAINT_HEIGHT, CANVAS_WIDTH, XV_RECT
CANVAS_MIN_PAINT_HEIGHT
Specifies the minimum height of the canvas’ paint window(s) in pixels. Any attempt to change the
CANVAS_HEIGHT to be smaller than this value will have the effect of setting it to the value of
CANVAS_MIN_PAINT_HEIGHT.
Argument: int
Default: 0
Procs: create, get, set
Objects: Canvas
See Also: 5.4.1,
CANVAS_AUTO_EXPAND, CANVAS_AUTO_SHRINK, CANVAS_HEIGHT,
CANVAS_WIDTH
CANVAS_MIN_PAINT_WIDTH
Specifies the minimum width of the canvas’ paint window(s) in pixels. Any attempt to change the
CANVAS_WIDTH
to be smaller than this value will have the effect of setting it to the value of
CANVAS_MIN_PAINT_WIDTH.
Argument: int
Default: 0
Procs: create, get, set
Objects: Canvas
See Also: 5.4.1,
CANVAS_AU TO_EXPAND, CANVAS_AUTO_SHRINK,
CANVAS_HEIGHT, CANVAS_WIDTH
CANVAS_NO_CLIPPING
This attribute is for SunView compatibility. For more information, refer to the manual Converting
SunView Applications.
CANVAS_NTH_PAINT_WINDOW
Returns the paint window associated with the nth view, and takes an argument of the value of n. 0 is
the index of the first view.
NULL is returned if the view does not exist.
Return Type: Xv_Window
Argument: int
Procs: get
Objects: Canvas
Usage:
Canvas canvas;
Xv_Window paint_window;
paint_window = (Xv_Window)xv_get(canvas,
CANVAS_NTH_PAINT_WINDOW, 1);
The example above will return the second paint window of the canvas.
See Also: 5.6.3.2
XView Attributes
XView Attributes 33
CANVAS_PAINT_CANVAS_WINDOW
Gets the canvas from a canvas paint window.
Return Type: Canvas
Procs: get
Objects: Canvas_paint_window
See Also:
CANVAS_VIEW_CANVAS_WINDOW
CANVAS_PAINT_VIEW_WINDOW
Gets the canvas view from a given canvas paint window.
Return Type: Canvas
Procs: get
Objects: Canvas_paint_window
See Also:
CANVAS_VIEW_PAINT_WINDOW
CANVAS_PAINTWINDOW_ATTRS
Distributes specified attribute values across all paint windows in a given canvas. It takes an in-line
attribute-value list of window attributes.
Argument: A-V list
Procs: create, set
Objects: Canvas
Usage:
xv_set(canvas, CANVAS_PAINTWINDOW_ATTR,
WIN_EVENT_PROC, canvas_event,
WIN_FOREGROUND_COLOR, 0
NULL,
NULL);
See Also: 20.3
CANVAS_REPAINT_PROC
Names a procedure called when canvas paint window has been damaged and must be repaired
(repainted).
Argument void (*canvas_repaint_proc)()
Default:
NULL
Procs: create, get, set
Objects: Canvas
Callback: (Used when
CANVAS_X_PAINT_WINDOW set to FALSE)
void
canvas_repaint_proc(canvas, paint_window, repaint_area)
Canvas canvas;
Xv_Window paint_window;
Rectlist *repaint_area;
canvas is the canvas that was damaged.
paint_window is the window to repaint.
repaint_area is a pointer to the list of Rects that is to be repainted.
34 XView Reference Manual
Callback 2: (Used when CANVAS_X_PAINT_WINDOW set to TRUE)
When CANVAS_X_PAINT_WINDOW is TRUE, the CANVAS_REPAINT_PROC callback is
called with the following parameters:
void
canvas_repaint_proc(canvas, paint_window, display, xid,
xrectlist)
Canvas canvas;
Xv_Window paint_window;
Display *display;
Window xid;
Xv_xrectlist *xrects;
canvas is the canvas that was damaged.
paint_window is the window to repaint.
display is the display handle to the X11 server connection.
xid is the X11 window identifier for the canvas paint window.
The Xv_xrectlist structure, defined in <xview/xv_xrect.h>, contains an array
of XRectangles and a count that specifies the repaint area for the canvas paint win-
dow.
See Also: 5.3,
CANVAS_RESIZE_PROC, CANVAS_X_PAINT_WINDOW, WIN_EVENT_PROC
CANVAS_RESIZE_PROC
Names a procedure called when the canvas paint window’s width or height changes. Note that if
CANVAS_FIXED_IMAGE is set to TRUE, which it is by default, the resize procedure will not be called
when the canvas is resized smaller.
Argument: void (*canvas_resize_proc)()
Default:
NULL
Procs: create, get, set
Objects: Canvas
Callback:
void
canvas_resize_proc(canvas, width, height)
Canvas canvas;
int width;
int height;
canvas is the canvas being resized.
width and height are the new dimensions of the canvas.
See Also: 5.4.3,
CANVAS_FIXED_IMAGE, CANVAS_REPAINT_PROC, WIN_BIT_GRAVITY
CANVAS_RETAINED
Specifies whether the X server should attempt to retain backing store for the canvas paint windows.
Note that this does not guarantee that the window is retained as the server may not be able to comply.
Argument: Bool
Default:
TRUE
Procs: create, get, set
Objects: Canvas
See Also: 5.2
XView Attributes
XView Attributes 35

Get Volume 7B: XView Reference Manual now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.