CANVAS_VIEW_CANVAS_WINDOW
Gets the canvas from a canvas view window.
Argument: Canvas
Procs: get
Objects: Canvas_view
See Also:
CANVAS_PAINT_CANVAS_WINDOW, CANVAS_VIEW_PAINT_WINDOW
CANVAS_VIEW_PAINT_WINDOW
This attribute is used to get the canvas paint window associated with a given canvas view.
Return Type: Canvas_paint_window
Procs: get
Objects: Canvas_view
Usage:
Canvas_view view;
Xv_Window paint_window;
paint_window = (Xv_Window)xv_get(view,
CANVAS_VIEW_PAINT_WINDOW);
See Also: 5.6.3.1,
CANVAS_PAINT_CANVAS_WINDOW, CANVAS_PAINT_VIEW_WINDOW
CANVAS_VIEWABLE_RECT
Gets the visible part of the specified paint window in the paint window’s coordinates. This attribute
operates on a Canvas object and requires as an argument, a handle to one of the canvas’ paint win-
dows. The Rect* returned should not be freed, as it points to static storage.
Return Type: Rect *
Argument: Canvas_paint_window
Procs: get
Objects: Canvas
Usage:
Rect *rect;
Xv_Window canvas_pw = canvas_paint_window(canvas);
rect = (Rect *) xv_get(canvas,
CANVAS_VIEWABLE_RECT,canvas_pw);
See Also: 5.3
CANVAS_WIDTH
Specifies the width of the canvas paint window in pixels.
Argument: int
Default: In general, the canvas inherits its parent’s width.
Procs: create, get, set
Objects: Canvas
See Also: 5.4.2,
CANVAS_MIN_PAINT_WIDTH
CANVAS_X_PAINT_WINDOW
This attribute controls the parameters used in the CANVAS_REPAINT_PROC. Setting this attribute to
TRUE
will cause the CANVAS_REPAINT_PROC to be called back with the parameters canvas,
paint_window, display, xid, and xrectlist; setting CANVAS_X_PAINT_WINDOW to
FALSE will cause it to be called back with canvas, paint_window, and repaint_area.
36 XView Reference Manual
Argument: Bool
Default: FALSE
Procs: create, get, set
Objects: Canvas
See Also: 5.3, CANVAS_REPAINT_PROC
CMS_BACKGROUND_PIXEL
Returns the background pixel (index 0) in a colormap segment.
Return Type: unsigned long
Default: None
Procs: get
Objects: Cms
See Also: 21.3.1
CMS_COLOR_COUNT
Used to specify the number of colors being set with CMS_COLORS or CMS_X_COLORS. This can be
used in conjunction with CMS_INDEX to set a range of the colors in the cms.
Argument: unsigned int
Default:
CMS_SIZE for a non-control cms, or CMS_SIZE - CMS_CONTROL_COLORS for a control
cms.
Procs: create,set
Objects: Cms
Usage: To set the colors in the array colors to the range from 10 to 14 in a cms, you would do the
following:
XColor colors[5];
xv_set(cms,
CMS_X_COLORS, colors,
CMS_INDEX, 10,
CMS_COLOR_COUNT, 5,
NULL);
See Also: 21.2.0.1
CMS_COLORS
Specifies the colors to be loaded into the colormap segment. Colors are specified as an array of
Xv_singlecolor.
Argument: Xv_singlecolor
Default: None
Procs: create,get,set
Objects: Cms
See Also: 21.2.1.2
CMS_CONTROL_CMS
Indicates whether this colormap segment is a control colormap segment for use by control objects
(like panel items and scrollbars).
Argument: int
Default:
FALSE
Procs: create,get
Objects: Cms
See Also: 21.5
XView Attributes
XView Attributes 37
CMS_FOREGROUND_PIXEL
Returns the foreground pixel (index CMS_SIZE-1) in a colormap segment.
Return Type: unsigned long
Default: None
Procs: get
Objects: Cms
See Also: 21.3.1
CMS_INDEX
Specifies the starting index to CMS_COLOR_COUNT entries into the colormap.
Argument: unsigned long
Default: 0 (If control cms,
CMS_CONTROL_COLORS)
Procs: create, set
Objects: Cms
See Also: 21.2.0.1,
CMS_COLOR_COUNT
CMS_INDEX_TABLE
Used to translate the logical indices of the window’s colormap segment into actual pixel values.
Return Type: unsigned long *
Default: N/A
Procs: get
Objects: Cms
See Also: 21.3.0.1
CMS_NAME
Specifies the name of the colormap segment.
Argument: char *
Default: Unique name generated internally
Procs: create, get, set
Objects: Cms
See Also: 21.6
CMS_NAMED_COLORS
Specifies the names of the colors to be loaded into the colormap segment. The NULL-terminated list of
color names is parsed by XParseColor().
Argument: List of char *
Default: None
Procs: create, set
Objects: Cms
See Also: 21.2.1.1
CMS_PIXEL
Translates a logical index into the actual colormap pixel value.
Argument: unsigned long
Default: None
Procs: get
Objects: Cms
Usage:
unsigned long pixel;
pixel=(unsigned long)xv_get(cms, CMS_PIXEL, 2);
See Also: 21.3.0.1
38 XView Reference Manual
CMS_SCREEN
Returns the screen with which the colormap segment is associated.
Return Type: Xv_Screen
Default: Default screen
Procs: get
Objects: Cms
CMS_SIZE
Specifies the size of the colormap segment.
Argument: int
Default: XV_DEFAULT_CMS_SIZE or CMS_CONTROL_COLORS, for a control cms
Procs: create, get
Objects: Cms
See Also: 21.2.0.1
CMS_TYPE
Specifies the type of the colormap segment. If set to XV_STATIC_CMS , then only read-only colors
can be allocated from the cms. If set to
XV_DYNAMIC_CMS , then only read-write colors can be allocat-
ed from the cms.
XV_DYNAMIC_CMS can only be used with a dynamic visual.
Argument: Cms_type
Default:
XV_STATIC_CMS
Procs: create
Objects: Cms
See Also: 21.1.1
CMS_X_COLORS
Specifies the colors to be loaded into the colormap segment. Colors are specified as an array of
XColor.
Argument: XColor *
Default: None
Procs: create, set, get
Objects: Cms
See Also: 21.2.1.2
CURSOR_BACKGROUND_COLOR
Specifies the background color of a cursor as an RGB triplet.
Argument: Xv_singlecolor *
Default: white (255, 255, 255)
Procs: create, get, set
Objects: Xv_Cursor
See Also: 13.4
CURSOR_DRAG_STATE
Indicates whether the cursor is over a neutral zone (CURSOR_NEUTRAL), a valid drop zone
(CURSOR_ACCEPT), or an invalid drop zone (CURSOR_REJECT). The shape of the cursor varies
depending on the state. Note that the current drag and drop protocol does not support a “reject” cursor.
Argument: Cursor_drag_state
Default:
CURSOR_NEUTRAL
Proc: create,get
Objects: Cursor
See Also: 13.5,
CURSOR_DRAG_TYPE, CURSOR_STRING
XView Attributes
XView Attributes 39
CURSOR_DRAG_TYPE
Indicates whether the cursor is “move” (CURSOR_MOVE) or “copy” (CURSOR_DUPLICATE ). The dupli-
cate version has a shadow. When combined with CURSOR_STRING, you get either a text move or
text duplicate cursor.
Argument: Cursor_drag_type
Default:
CURSOR_MOVE
Procs: create,get
Objects: Cursor
See Also: 13.5,
CURSOR_DRAG_STATE, CURSOR_STRING
CURSOR_FOREGROUND_COLOR
Specifies the foreground color of a cursor as an RGB triplet.
Argument: Xv_singlecolor *
Default: black (0, 0, 0)
Procs: create, get, set
Objects: Xv_Cursor
See Also: 13.4
CURSOR_IMAGE
Specifies the cursor’s image.
Argument: Server_image
Default: None
Procs: create, get, set
Objects: Xv_Cursor
See Also: 13.1
CURSOR_MASK_CHAR
Specifies the index into the mask shape font. Predefined shapes are defined in <xview/cursor.h>.
Argument: unsigned int
Default: None
Procs: create, get, set
Objects: Xv_Cursor
Usage:
xv_set(cursor,
CURSOR_MASK_CHAR, OLC_BASIC_MASK_PTR
NULL);
See Also: 13.2,
CURSOR_SRC_CHAR
CURSOR_OP
The value for this attribute is the rasterop (defined in <pixrect.h>) which will be used to paint the cur-
sor.
Argument: int
Default: {
PIX_SRC | PIX_DST }
Procs: create, get, set
Objects: Xv_Cursor
40 XView Reference Manual
Get Volume 7B: XView Reference Manual now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.