[ Previous | Next | Contents | Glossary | Home | Search ]
Ultimedia Services Version 2 for AIX: Programmer's Guide and Reference

UMSImageWindow Object

The UMSImageWindow object is an Ultimedia Services Version 2 feature and does not apply to Ultimedia Services Version 1.2.1.

This class inherits from the UMSXWindow and UMSNegotiatorSink classes.

The UMSImageWindow object provides a way to display images in a window in X. This is a base class that can provide generic X Windowing System support. Other classes inherit from this one to provide access to hardware accelerations that are available. You must call the methods inherited from the UMSXWindow class in order to provide an active connection to an X server before using the methods defined in this class. It provides scaling of the image if it is supported in hardware. This object does not handle its own exposure events.

To learn more about the UMSImageWindow object, see:

For introductory information, see Image Window and Negotiator Objects.

Enumeration Lists

enum ReturnCode {
   Success,
   Failure,
   NullPointer,
   ValueOutOfRange,
   ValueChanged,
   NotSupported,
   DeviceNotFound,
   DeviceNotAvail,
   DisplayNotSet,
   OutOfMemory,
   UnsupportedFormat,
   InvalidArgument,
   DeviceError,
   InvalidWindow
   };

Method Descriptions

ReturnCode set_image_size(in long width, in long height)

Description

This method sets the size of the images provided to the display_image() method. If the set_display_size() method has not been called or if the display does not support scaling then this also sets the size that the image is displayed on the screen.

Arguments
in long width The width of the images provided to the display_image() method in pixels.
in long height The height of the images provided to the display_image() method in pixels.
Return Values

Success

Failure

ValueOutOfRange

ReturnCode get_image_size(out long width, out long height)

Description

This method allows you to get the currently set width and height for the images provided to the display_image() method.

Arguments
out long width The width of the images provided to the display_image() method in pixels.
out long height The height of the images provided to the display_image() method in pixels.
Return Values

Success

Failure

NullPointer

ReturnCode display_image(in Sequence<octet> image)

Description

This method displays the image in the window.

Arguments
in Sequence<octet> image The image to be displayed.
Return Values

Success

Failure

NullPointer

ReturnCode set_display_size(in long width, in long height, out long w, out long h)

Description

This method sets the size in pixels that the image is displayed on the screen. This value can be different from the image size if the display supports scaling. The current image is not redisplayed if this is called because of a change in window size.

Arguments
in long width The width in pixels that the image has when displayed on the screen.
n long height The height in pixels that the image has when displayed on the screen.
out long w The best match to width that the display can support. The return code is ValueChanged if it isn't the same as width.
out long h The best match to height that the display can support. The return code is ValueChanged if it isn't the same as height.
Return Values

Success

Failure

ValueOutOfRange

NullPointer

ValueChanged

ReturnCode get_display_size(out long width, out long height)

Description

This method allows the caller to get the current width and height in pixels that an image is displayed.

Arguments
out long width The width in pixels.
out long height The height in pixels.
Return Values

Success

Failure

NullPointer

For introductory information, see Image Window and Negotiator Objects.


[ Previous | Next | Contents | Glossary | Home | Search ]