Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ XsmVideoMap(3X) — NEWS-os 4.1C

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

XmDrawingArea(3XM)

Composite(3XM)

Constraint(3XM)

Core(3XM)

XmManager(3XM)

XsmCreateVideoMap(3X)

XsmQueryVideo(3X)

XsmGetVideoStatus(3X)

XsmVideoMap(3X)  —  NEWS-OS Programmer’s Manual

NAME

XsmVideoMap — VideoMap widget class

SYNOPSIS

#include <X11/Xsm/VideoMap.h>

DESCRIPTION

VideoMap is a subclass of the OSF/Motif VideoMap.  This widget has a number of video display capabilities and is easily adaptable to a variety of purposes.  As with VideoMap, callbacks notify the application when graphics need to be drawn (exposure events or widget resize) and when the widget receives input from the keyboard or mouse.  Callbacks also occur when video display is initiated and when it is terminated.  Applications are responsible for defining appearance and behavior as needed in response to VideoMap callbacks. 

VideoMap is also a composite widget and subclass of XmManager that supports minimal geometry management for multiple widget or gadget children. 

Classes

VideoMap inherits behavior and resources from the Core, Composite, Constraint, and XmManager classes. 

The class pointer is xmVideoMapWidgetClass. 

The class name is XsmVideoMap. 

New Resources

The following table defines a set of widget resources used by the programmer to specify data.  The programmer can also set the resource values for the inherited classes to set attributes for this widget.  To reference a resource by name or by class in a .Xdefaults file, remove the XsmN or XsmC prefix and use the remaining letters.  To specify one of the defined values for a resource in a .Xdefaults file, remove the Xsm prefix and use the remaining letters (in either lowercase or uppercase, but include any underscores between words).  The codes in the “Access” column indicate if the given resource can be set at widget creation time (C), set by using XtSetValues (S), retrieved by using XtGetValues (G), or is not applicable (N/A). 

VideoMap Resource Set
Name Class Type Default Access
XsmNmaxVideo XsmCMaxVideo int dynamic G
XsmNaccessVideo XsmCAccessVideo int 0 CSG
XsmNgrabVideo XsmCGrabVideo Boolean False CSG
XsmNrenderVideo XsmCRenderVideo Boolean False CSG
XsmNframeRate XsmCFrameRate int 0 CSG
XsmNvideoAdjust XsmCVideoAdjust int 0 CSG
XsmNvideoAreaX XsmCVideoAreaX int 0 CSG
XsmNvideoAreaY XsmCVideoAreaY int 0 CSG
AreaWidth XsmNvideoAreaWidth AreaWidth XsmCVideoAreaWidth int 0 CSG
AreaHeight XsmNvideoAreaHeight AreaHeight XsmCVideoAreaHeight int 0 CSG
XsmNvideoX XsmCVideoX int 0 CSG
XsmNvideoY XsmCVideoY int 0 CSG
XsmNvideoWidth XsmCVideoWidth int 0 CSG
XsmNvideoHeight XsmCVideoHeight int 0 CSG
Callback XsmNrenderVideoCallback XsmCCallback List XtCallbackList NULL C
Callback XsmNstopVideoCallback XsmCCallback List XtCallbackList NULL C

XsmNmaxVideo
Specifies the number of video screens that can be displayed when a widget is created. This value is dependent on the graphics board currently being used. It is set to 1 if the NWB-254 is installed and to 0 in all other cases. The value cannot be set by or altered by the user.

XsmNaccessVideo
Sets the ID number of the video display function to be used. The range of valid values is 0 through XsmNmaxVideo − 1. It should be set to 0 for graphics boards lacking video functions.

XsmNgrabVideo
Specifies whether or not the video function set using XsmNaccessVideo should be grabbed. Grabbing takes place if it is set to True, and is disabled if it is set to False. If grabbing is enabled, any requests to use video functions received from another VideoMap are ignored. On the other hand, if another VideoMap resource has already grabbed the video function, this value cannot be set to True using XtSetValues. 

XsmNrenderVideo
Specifies whether or not video is to be displayed. It should be set to True in order to enable video display, and to False to disable it. Note that if another VideoMap resource has already grabbed the video function, this value cannot be set to True using XtSetValues. 

XsmNframeRate
Specifies the number of video frames to be displayed per second. Live video is frozen when the value is 0. The range of values which can be set depends on the video map board being used. The setting can be checked using the XsmQueryVideo(3X) convenience function described later. 

XsmNvideoAdjust
If this resource is set to True, the video image is displayed in the center of the widget window at the largest size available.

XsmNvideoAreaX
Specifies the X coordinate of the upper left-hand corner (not including the margin) of the video display area, relative to the position in which the widget is to be displayed. This resource value is set automatically if XsmNvideoAdjust is True. 

XsmNvideoAreaY
Specifies the Y coordinate of the upper left-hand corner (not including the margin) of the video display area, relative to the position in which the widget is to be displayed. This resource value is set automatically if XsmNvideoAdjust is True. 

XsmNvideoAreaWidth
Specifies the width of the video display area in segments. This resource value is set automatically if XsmNvideoAdjust is True. 

XsmNvideoAreaHeight
Specifies the height of the video display area in segments. This resource value is set automatically if XsmNvideoAdjust is True. 

XsmNvideoX
Specifies the X coordinate of the video image mapped to the upper left-hand corner of the video display area, relative to the upper left-hand corner of the video. This resource value is set to 0 if XsmNvideoAdjust is True. 

XsmNvideoY
Specifies the Y coordinate of the video image mapped to the upper left-hand corner of the video display area, relative to the upper left-hand corner of the video. This resource value is set to 0 if XsmNvideoAdjust is True. 

XsmNvideoWidth
Specifies the video width in pixels. The range of allowable of video width settings is dependent on the video map board being used. The setting can be checked using the XsmQueryVideo(3X) convenience function described later.  This resource value is set automatically if XsmNvideoAdjust is True. 

XsmNvideoHeight
Specifies the video height in pixels. The range of allowable of video height settings is dependent on the video map board being used. The setting can be checked using the XsmQueryVideo(3X) convenience function described later.  This resource value is set automatically if XsmNvideoAdjust is True. 

XsmNrenderVideoCallback
Specifies a list of callbacks to be invoked when video display starts.
The callback reason is XsmCR_RENDER_VIDEO. 

XsmNstopVideoCallback
Specifies a list of callbacks to be invoked when video display terminates.
The callback reason is XsmCR_STOP_VIDEO. 

Inherited Resources

VideoMap inherits behavior and resources from the following superclasses.  For a complete description of each resource, refer to the manual page for that superclass. 

DrawingArea Resource Set
Name Class Type Default Access
Callback XmNexposeCallback XmCCallback List XtCallbackList NULL C
Callback XmNinputCallback XmCCallback List XtCallbackList NULL C
XmNmarginHeight XmCMarginHeight short 10 CSG
XmNmarginWidth XmCMarginWidth short 10 CSG
Callback XmNresizeCallback XmCCallback List XtCallbackList NULL C
XmNresizePolicy XmCResizePolicy unsigned char XmRESIZE_ANY CSG

XmManager Resource Set
Name Class Type Default Access
ShadowColor XmNbottomShadowColor XmCForeground Pixel Unspecified CSG
ShadowPixmap XmNbottomShadowPixmap ShadowPixmap XmCBottomShadowPixmap Pixmap _PIXMAP XmUNSPECIFIED_PIXMAP CSG
XmNforeground XmCForeground Pixel Unspecified CSG
XmNhelpCallback XmCCallback kList XtCallbackList NULL C
Color XmNhighlightColor XmCforeground Pixel Black CSG
Pixmap XmNhighlightPixmap Pixmap XmCHighlightPixmap Pixmap Unspecified CSG
Thickness XmNshadowThickness Thickness XmCShadowThickness short 0 CSG
Color XmNtopShadowColor XmCBackground Pixel dynamic CSG
Pixmap XmCTopShadowPixmap Pixmap XmCTopShadowPixmap Pixmap _PIXMAP XmUNSPECIFIED_PIXMAP CSG
XmMunitType XmCUnitType unsigned char XmPIXELS CSG
XmNuserData XmCUserData caddr_t NULL CSG

Composite Resource Set
Name Class Type Default Access
Position XmNinsertPosition Position XmCInsertPosition XmRFunction NULL CSG

Core Resource Set
Name Class Type Default Access
rators XmNaccelerators rators XmCAccelerators lations XtTranslations NULL CSG
Sensitive XmNancestorSensitive XmCSensitive Boolean True G
XmNbackground XmCBackground Pixel Unspecified CSG
Pixmap XmNbackgroundPixmap XmCPixmap Pixmap _PIXMAP XmUNSPECIFIED_PIXMAP CSG
XmNborderColor XmCBorderColor Pixel Black CSG
XmNborderPixmap XmCPixmap Pixmap _PIXMAP XmUNSPECIFIED_PIXMAP CSG
XmNborderWidth XmCBorderWidth Dimension 0 CSG
XmNcolormap XmCColormap Colormap FromParent XtCopyFromParent CG
XmNdepth XmCDepth int FromParent XtCopyFromParent CG
Callback XmNdestroyCallback XmCCallback List XtCallbackList NULL C
XmNheight XmCHeight Dimension 0 CSG
WhenManaged XmNmappedWhenManaged WhenManaged XmCMappedWhenManaged Boolean True CSG
XmNscreen XmCScreen Pointer XtCopyScreen CG
XmNsensitive XmCSensitive Boolean True CSG
XmNtransactions XmCTransactions XtTransactions NULL CSG
XmNwidth XmCWidth Dimension 0 CSG
XmNx XmCPosition Position 0 CSG
XmNy XmCPosition Position 0 CSG

Callback Information

A pointer to the following structure is passed to each callback. 

typedef struct
{
intreason ;
XEvent∗ event ;
Windowwindow ;
Windowparticipant ;
intframerate ;
Xrectanglevideo ;
Xrectanglevideo_area ;
intreserved[24] ;
} XsmVideoMapCallbackStruct;

reasonIndicates why the callback was invoked.  Either XsmCR_RENDER_VIDEO or XsmCR_STOP_VIDEO is returned in reason.

eventPoints to the XEvent that triggered the callback. 

windowIs set to the widget window. 

participant
When reason is XsmCR_RENDER_VIDEO, participant is set to the window whose video display function just used.  When reason is XsmCR_STOP_VIDEO, participant is set to the window whose video display function to be used next.  When the video display size or diplay geometry is changed, two events, XsmCR_STOP_VIDEO and XsmCR_RENDER_VIDEO, are triggerd in the same VideoMap: in such a case, participant is set to the same value as in window.

framerateThe frame rate of the video screen image is set.  When reason is XsmCR_RENDER_VIDEO, the frame rate specified at rendering the video screen is set in framerate. When reason is XsmCR_STOP_VIDEO, the framerate used in the previous video screen is set. 

videoThe origin and the size of video screen are set.  When reason is XsmCR_RENDER_VIDEO, the values specified at rendering the video screen are set in video. When reason is XsmCR_STOP_VIDEO, the values used in the previous video screen are set. 

video_area
The display area of video screen is set. When reason is XsmCR_RENDER_VIDEO, the display area specified at rendering the video screen is set in video_area. When reason is XsmCR_STOP_VIDEO, the display area of the video screen which is just stopped is set. 

Behavior

VideoMap inherits the behavior of DrawingArea. 

Default Translations

VideoMap inherits the default translations of DrawingArea. 

Keyboard Traverse

For information on keyboard traverse, refer to the “Behavior” and “Default Translation” sections of the XmManager(3XM) manual page. 

SEE ALSO

XmDrawingArea(3XM) Composite(3XM) Constraint(3XM) Core(3XM) XmManager(3XM) XsmCreateVideoMap(3X) XsmQueryVideo(3X) XsmGetVideoStatus(3X)

NEWS-OSRelease 4.1C

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026