CopyArea | CopyRawBitmap | DrawPixel | DrawRGBPixel | DrawRectangle | GetColourFormat | ReadPixel | ReadRGBPixel | Resample | SetClipRegion | Sync
AccessPointer | GetCursorInfo | GetCursorPos | GetRelativeCursorPos | LockCursor | RestoreCursor | SetCursor | SetCursorPos | SetCustomCursor | StartCursorDrag | UnlockCursor
GetDisplayInfo | GetDisplayType | ScaleToDPI | SetHostOption
GetInputTypeName | SubscribeInput | UnsubscribeInput
CheckIfChild | CopySurface | ExposeSurface | GetModalSurface | GetSurfaceCoords | GetSurfaceFlags | GetSurfaceInfo | GetUserFocus | GetVisibleArea | SetModalSurface | WindowHook
BitmapSurface | ColourFormat | CursorInfo | DisplayInfo | InputEvent | PixelFormat | SurfaceCoords | SurfaceInfo | xrMode
Bitmap | Clipboard | Controller | Display | Pointer | Surface
ACF | BAF | BDF | CRF | CSRF | EXF | HOST | JET | JTYPE | PTC | RNF | SCR | WH
Returns a lock on the default pointer object.
Use AccessPointer() to grab a lock on the default pointer object that is active in the system. This is typically the first object created from the Pointer class with a name of SystemPointer.
Call ReleaseObject() to free the lock once it is no longer required.
Returns the address of the default pointer object.
Check if a surface is the child of another surface.
| Parameter | Description |
|---|---|
| Parent | The surface that is assumed to be the parent. |
| Child | The child surface to check. |
This function checks if a surface identified by the Child value is the child of the surface identified by the Parent value. ERR::True is returned if the surface is confirmed as being a child of the parent, or if the Child and Parent values are equal. All other return codes indicate false or failure.
| True | The Child surface belongs to the Parent. |
|---|---|
| False | The Child surface is not a child of Parent. |
| NullArgs | Function call missing argument value(s) |
Copies a rectangular area from one bitmap to another.
| Parameter | Description |
|---|---|
| Bitmap | The source bitmap. |
| Dest | Pointer to the destination bitmap. |
| Flags | Optional flags. |
| X | The horizontal position of the area to be copied. |
| Y | The vertical position of the area to be copied. |
| Width | The width of the area. |
| Height | The height of the area. |
| XDest | The horizontal position to copy the area to. |
| YDest | The vertical position to copy the area to. |
This function copies rectangular areas from one bitmap to another. It performs a straight region-copy only, using the fastest method available. Bitmaps may be of a different type (e.g. bit depth), however this will result in performance penalties. The copy process will respect the clipping region defined in both the source and destination bitmap objects.
If the TRANSPARENT flag is set in the source object, all colours that match the Bitmap⇒TransIndex field will be ignored in the copy operation.
To enable dithering, pass BAF::DITHER in the Flags parameter. The drawing algorithm will use dithering if the source needs to be down-sampled to the target bitmap's bit depth. To enable alpha blending, set BAF::BLEND (the source bitmap will also need to have the BMF::ALPHA_CHANNEL flag set to indicate that an alpha channel is available).
The quality of 32-bit alpha blending can be improved by selecting the BAF::LINEAR flag. This enables an additional computation whereby each RGB value is converted to linear sRGB colour space before performing the blend. The discernible value of using this option largely depends on the level of opaqueness of either bitmap. Note that this option is not usable if either bitmap is already in a linear colourspace (ERR::InvalidState will be returned if that is the case).
| Okay | Operation successful. |
|---|---|
| NotInitialised | The source Bitmap has not been initialised. |
| InvalidState | The LINEAR flag was used when at least one bitmap is using a linear colourspace. |
| NullArgs | The Dest parameter was not specified. |
| InvalidObject | The Dest parameter does not refer to a Bitmap object. |
Copies graphics data from an arbitrary surface to a bitmap.
| Parameter | Description |
|---|---|
| Surface | Description of the surface source. |
| Dest | Destination bitmap. |
| Flags | Optional flags. |
| X | Horizontal source coordinate. |
| Y | Vertical source coordinate. |
| Width | Source width. |
| Height | Source height. |
| XDest | Horizontal destination coordinate. |
| YDest | Vertical destination coordinate. |
This function will copy data from a described surface to a destination bitmap object. You are required to provide the function with a full description of the source in a BitmapSurface structure.
The X, Y, Width and Height parameters define the area from the source that you wish to copy. The XDest and YDest parameters define the top left corner that you will blit the graphics to in the destination.
| Okay | Operation successful. |
|---|---|
| Args | Invalid arguments passed to function |
| NullArgs | Function call missing argument value(s) |
Copies surface graphics data into any bitmap object
| Parameter | Description |
|---|---|
| Surface | The ID of the surface object to copy from. |
| Bitmap | Must reference a target Bitmap object. |
| Flags | Optional flags. |
| X | The horizontal source coordinate. |
| Y | The vertical source coordinate. |
| Width | The width of the graphic that will be copied. |
| Height | The height of the graphic that will be copied. |
| XDest | The horizontal target coordinate. |
| YDest | The vertical target coordinate. |
This function will copy the graphics data from any surface object to a target Bitmap. This is the fastest and most convenient way to get graphics information out of any surface. As surfaces are buffered, it is guaranteed that the result will not be obscured by any overlapping surfaces that are on the display.
| Okay | Operation successful. |
|---|---|
| Search | The supplied Surface ID did not refer to a recognised surface object |
| AccessObject | Attempting to lock an object failed |
| NullArgs | Function call missing argument value(s) |
Draws a single pixel to a bitmap.
| Parameter | Description |
|---|---|
| Bitmap | The target bitmap object. |
| X | The horizontal coordinate of the pixel. |
| Y | The vertical coordinate of the pixel. |
| Colour | The colour value to use for the pixel. |
This function draws a pixel to the coordinates (X, Y) on a bitmap with a colour determined by the Colour index. This function will check the given coordinates to make sure that the pixel is inside the bitmap's clipping area.
Draws a 24 bit pixel to a Bitmap.
| Parameter | Description |
|---|---|
| Bitmap | The target bitmap object. |
| X | Horizontal coordinate of the pixel. |
| Y | Vertical coordinate of the pixel. |
| RGB | The colour to be drawn, in RGB format. |
This function draws an RGB8 colour to the (X, Y) position of a target Bitmap. The function will check the given coordinates to ensure that the pixel is inside the bitmap's clipping area.
Draws rectangles, both filled and unfilled.
This function draws both filled and unfilled rectangles. The rectangle is drawn to the target bitmap at position (X, Y) with dimensions determined by the specified Width and Height. If the Flags parameter defines BAF::FILL then the rectangle will be filled, otherwise only the outline will be drawn. The colour of the rectangle is determined by the pixel value in the Colour parameter. Alpha blending is not supported.
Exposes the content of a surface to the display.
| Parameter | Description |
|---|---|
| Surface | The ID of the surface object that will be exposed. |
| X | The horizontal coordinate of the area to expose. |
| Y | The vertical coordinate of the area to expose. |
| Width | The width of the expose area. |
| Height | The height of the expose area. |
| Flags | Optional flags - using CHILDREN will expose all intersecting child regions. |
This expose routine will expose all content within a defined surface area, copying it to the display. This will include all child surfaces that intersect with the region being exposed if you set the EXF::CHILDREN flag.
| Okay | Operation successful. |
|---|---|
| Search | The Surface ID does not refer to an existing surface object |
| NullArgs | Function call missing argument value(s) |
Generates the values for a ColourFormat structure for a given bit depth.
| Parameter | Description |
|---|---|
| Format | Pointer to an empty ColourFormat structure. |
| BitsPerPixel | The depth that you would like to generate colour values for. Ignored if mask values are set. |
| RedMask | Red component bit mask value. Set this value to zero if the BitsPerPixel parameter is used. |
| GreenMask | Green component bit mask value. |
| BlueMask | Blue component bit mask value. |
| AlphaMask | Alpha component bit mask value. |
This function will generate the values for a ColourFormat structure, for either a given bit depth or customised colour bit values. The ColourFormat structure is used by internal bitmap routines to pack and unpack bit values to and from bitmap memory.
The ColourFormat structure is supported by the following macros for packing and unpacking colour bit values:
Colour = CFPackPixel(Format,Red,Green,Blue) Colour = CFPackPixelA(Format,Red,Green,Blue,Alpha) Colour = CFPackAlpha(Format,Alpha) Red = CFUnpackRed(Format,Colour) Green = CFUnpackGreen(Format,Colour) Blue = CFUnpackBlue(Format,Colour) Alpha = CFUnpackAlpha(Format,Colour)
Retrieves graphics information from the active mouse cursor.
| Parameter | Description |
|---|---|
| Info | Pointer to a CursorInfo structure. |
The GetCursorInfo() function is used to retrieve useful information on the graphics structure of the mouse cursor. It will return the maximum possible dimensions for custom cursor graphics and indicates the optimal bits-per-pixel setting for the hardware cursor.
If there is no cursor (e.g. this is likely on touch-screen devices) then all field values will be set to zero.
Note: If the hardware cursor is monochrome, the bits-per-pixel setting will be set to 2 on return. This does not indicate a 4 colour cursor image; rather colour 0 is the mask, 1 is the foreground colour (black), 2 is the background colour (white) and 3 is an XOR pixel. When creating the bitmap, always set the palette to the RGB values that are wanted. The mask colour for the bitmap must refer to colour index 0.
| Okay | Operation successful. |
|---|---|
| NoSupport | The device does not support a cursor (common for touch screen displays). |
| NullArgs | Function call missing argument value(s) |
Returns the coordinates of the UI pointer.
| Parameter | Description |
|---|---|
| X | Variable that will store the pointer's horizontal coordinate. |
| Y | Variable that will store the pointer's vertical coordinate. |
This function will return the current coordinates of the mouse cursor. If the device is touch-screen based then the coordinates will reflect the last position that a touch event occurred.
| Okay | Operation successful. |
|---|---|
| AccessObject | Failed to access the SystemPointer object. |
Retrieves display information.
| Parameter | Description |
|---|---|
| Display | Object ID of the display to be analysed. |
| Info | This reference will receive a pointer to a DisplayInfo structure. |
The GetDisplayInfo() function returns information about a display, which includes information such as its size and bit depth. If the system is running on a hosted display (e.g. Windows or X11) then GetDisplayInfo() can also be used to retrieve information about the default monitor by using a Display of zero.
The resulting DisplayInfo structure values remain good until the next call to this function, at which point they will be overwritten.
| Okay | Operation successful. |
|---|---|
| TimeOut | Function timed-out before successful completion |
| AccessObject | Attempting to lock an object failed |
| AllocMemory | Failed to create a new memory block |
| SystemCall | A call to the host system has failed |
| NullArgs | Function call missing argument value(s) |
Returns the selected display driver's backend type.
This function reports the backend identity of the driver selected during Display module initialisation. Explicit and automatic driver selection therefore return the same type when they resolve to the same backend. Current values are:
| Name | Description |
|---|
Returns an integer indicating the display type.
Returns the string name for an input type.
| Parameter | Description |
|---|---|
| Type | JET type integer. |
This function converts JET integer constants to their string equivalent.
A string describing the input Type is returned, or NULL if the Type is invalid.
Returns the current modal surface (if defined).
This function returns the modal surface for the running process. Returns zero if no modal surface is active.
The UID of the modal surface, or zero.
Returns the coordinates of the pointer cursor, relative to a surface object.
| Parameter | Description |
|---|---|
| Surface | Unique ID of the surface that the coordinates need to be relative to. |
| X | Variable that will store the pointer's horizontal coordinate. |
| Y | Variable that will store the pointer's vertical coordinate. |
This function is used to retrieve the current coordinates of the pointer cursor. The coordinates are relative to the surface object that is specified in the Surface argument.
The X and Y parameters will not be set if a failure occurs.
| Okay | Operation successful. |
|---|---|
| Search | A search routine in this function failed |
| AccessObject | Failed to access the SystemPointer object. |
Returns the dimensions of a surface.
| Parameter | Description |
|---|---|
| Surface | The surface to query. If zero, the top-level display is queried. |
| X | The X coordinate of the surface is returned here. |
| Y | The Y coordinate of the surface is returned here. |
| AbsX | The absolute X coordinate of the surface is returned here. |
| AbsY | The absolute Y coordinate of the surface is returned here. |
| Width | The width of the surface is returned here. |
| Height | The height of the surface is returned here. |
GetSurfaceCoords() retrieves the dimensions that describe a surface object's area as X, Y, Width and Height. This is the fastest way to retrieve surface dimensions when access to the object structure is not already available.
| Okay | Operation successful. |
|---|---|
| Search | The supplied Surface ID did not refer to a recognised surface object. |
| SystemCall | A call to the host system has failed |
Retrieves the Flags field from a Surface.
| Parameter | Description |
|---|---|
| Surface | The surface to query. If zero, the top-level surface is queried. |
| Flags | The flags value is returned here. |
This function returns the current Flags field from a Surface. It provides the same result as reading the field directly, however it is considered advantageous in circumstances where the overhead of locking a surface object for a read operation is undesirable.
For information on the available flags, please refer to the Surface⇒Flags field.
| Okay | Operation successful. |
|---|---|
| Search | A search routine in this function failed |
| NullArgs | Function call missing argument value(s) |
Retrieves display information for any surface object, whilst avoiding direct access.
| Parameter | Description |
|---|---|
| Surface | The unique ID of a Surface to query. If zero, the root surface is returned. |
| Info | This parameter will receive a SurfaceInfo pointer that describes the surface object. |
GetSurfaceInfo() is used for quickly retrieving basic information from surfaces, allowing the client to bypass the AccessObject() function. The resulting structure values are good only up until the next call to this function, at which point those values will be overwritten.
| Okay | Operation successful. |
|---|---|
| Search | The supplied SurfaceID did not refer to a recognised surface object. |
| NullArgs | Function call missing argument value(s) |
Returns the ID of the surface that currently has the user's focus.
This function returns the unique ID of the surface that has the user's focus.
Returns the ID of the surface object that has the user focus, or zero on failure.
Returns the visible region of a Surface.
| Parameter | Description |
|---|---|
| Surface | The surface to query. If zero, the top-level display will be queried. |
| X | The X coordinate of the visible area. |
| Y | The Y coordinate of the visible area. |
| AbsX | The absolute X coordinate of the visible area. |
| AbsY | The absolute Y coordinate of the visible area. |
| Width | The visible width of the surface. |
| Height | The visible height of the surface. |
The GetVisibleArea() function returns the visible area of a Surface, which is based on its position within its parent surfaces. The resulting coordinates are relative to point 0,0 of the queried surface. If the surface is not obscured, then the resulting coordinates will be (0,0),(Width,Height).
| Okay | Operation successful. |
|---|---|
| Search | The supplied Surface ID did not refer to a recognised surface object. |
| SystemCall | A call to the host system has failed |
Anchors the cursor so that it cannot move without explicit movement signals.
| Parameter | Description |
|---|---|
| Surface | Refers to the surface object that the pointer should send movement signals to. |
The LockCursor() function will lock the current pointer position and pass UserMovement signals to the surface referenced in the Surface parameter. The pointer will not move unless the SetCursorPos() function is called. The anchor is granted on a time-limited basis. It is necessary to reissue the anchor every time that a UserMovement signal is intercepted. Failure to reissue the anchor will return the pointer to its normal state, typically within 200 microseconds.
The anchor can be released at any time by calling the UnlockCursor() function.
| NoSupport | The pointer cannot be locked due to system limitations. |
|---|
Reads a pixel's colour from the target bitmap.
| Parameter | Description |
|---|---|
| Bitmap | Pointer to a bitmap object. |
| X | The horizontal coordinate of the pixel. |
| Y | The vertical coordinate of the pixel. |
This function reads a pixel from a bitmap area and returns its colour index (if the Bitmap is indexed with a palette) or its packed pixel value. Zero is returned if the pixel is out of bounds.
The colour value of the pixel will be returned. Zero is returned if the pixel is out of bounds.
Reads a pixel's colour from the target bitmap.
| Parameter | Description |
|---|---|
| Bitmap | Pointer to a bitmap object. |
| X | The horizontal coordinate of the pixel. |
| Y | The vertical coordinate of the pixel. |
| RGB | The colour values will be stored in this RGB8 structure. |
This function reads a pixel from a bitmap surface and returns the value in an RGB8 structure that remains good up until the next call to this function. Zero is returned in the alpha component if the pixel is out of bounds.
This function is thread-safe if the target Bitmap is locked.
Resamples a bitmap by dithering it to a new set of colour masks.
| Parameter | Description |
|---|---|
| Bitmap | The bitmap object to be resampled. |
| ColourFormat | The new colour format to be applied to the bitmap. |
The Resample() function provides a means for resampling a bitmap to a new colour format without changing the actual bit depth of the image. It uses dithering so as to retain the quality of the image when down-sampling. This function is generally used to 'pre-dither' true colour bitmaps in preparation for copying to bitmaps with lower colour quality.
You are required to supply a ColourFormat structure that describes the colour format that you would like to apply to the bitmap's image data.
| Okay | Operation successful. |
|---|---|
| NullArgs | Function call missing argument value(s) |
Returns the pointer image to its original state.
| Parameter | Description |
|---|---|
| Cursor | The cursor image that the pointer will be restored to (0 for the default). |
| Owner | The ownership ID that was given in the initial call to SetCursor(). |
Use the RestoreCursor() function to undo an earlier call to SetCursor(). It is necessary to provide the same OwnerID that was used in the original call to SetCursor().
To release ownership of the cursor without changing the current cursor image, use a Cursor setting of PTC::NOCHANGE.
| Okay | Operation successful. |
|---|
Scales a value to the active display's DPI.
| Parameter | Description |
|---|---|
| Value | The number to be scaled. |
ScaleToDPI() is a convenience function for scaling a value to the display's current DPI setting. The provided value must be relative to the system wide default of 96 DPI. If the display's DPI is not equal to 96, the value will be scaled to match. For instance, an 8 point font at 96 DPI would be scaled to 20 points if the display was 240 DPI.
If the DPI of the display is unknown, the value will be returned unscaled.
The scaled value is returned.
Sets a clipping region for a bitmap object.
| Parameter | Description |
|---|---|
| Bitmap | The target bitmap. |
| Left | The horizontal start of the clip region. |
| Top | The vertical start of the clip region. |
| Right | The right-most edge of the clip region. |
| Bottom | The bottom-most edge of the clip region. |
The SetClipRegion() method is used to manage the clipping region assigned to a bitmap object. The ClipLeft, ClipTop, ClipRight and ClipBottom fields in the target Bitmap will be updated to reflect the area covered by the provided parameter values.
Sets the cursor image and can anchor the pointer to any surface.
| Parameter | Description |
|---|---|
| Surface | Refers to the surface object that the pointer should anchor itself to, if the RESTRICT flag is used. Otherwise, this parameter can be set to a surface that the new cursor image should be limited to. The object referred to here must be publicly accessible to all tasks. |
| Flags | Optional flags that affect the cursor. |
| Cursor | The ID of the cursor image that is to be set. |
| Name | The name of the cursor image that is to be set (if Cursor is zero). |
| Owner | The object nominated as the owner of the anchor, and/or owner of the cursor image setting. |
Use the SetCursor() function to change the pointer image and/or restrict the movement of the pointer to a surface area.
To change the cursor image, set the Cursor or Name parameters to define the new image. Valid cursor IDs and their equivalent names are listed in the documentation for the Pointer⇒CursorID field. If the Surface field is set to a valid surface, the cursor image will switch back to its default once the pointer moves outside of the surface's area. If both the Cursor and Name parameters are NULL, the cursor image will remain unchanged from its current image.
The SetCursor() function accepts the following flags in the Flags parameter:
| Name | Description |
|---|---|
| CRF::BUFFER | Use of the BUFFER option allows the cursor request to be buffered in the event that the cursor is locked at the time of calling the SetCursor() function. Use of this flag is highly recommended in most circumstances, but may not be used in conjunction with the ANCHOR option. |
| CRF::LMB | Release the cursor after the left mouse button is held and released. |
| CRF::MMB | Release the cursor after the middle mouse button is held and released. |
| CRF::NO_BUTTONS | Set the cursor only on the condition that the user is not holding down any buttons. ERR::NothingDone is returned if the user has a button held down. |
| CRF::RESTRICT | Similar to the anchor option, but allows the pointer to move within the surface referred to by ObjectID. |
| CRF::RMB | Release the cursor after the right mouse button is held and released. |
The Owner parameter is used as a locking mechanism to prevent the cursor from being changed whilst it is locked. We recommend that it is set to an object ID such as the program's task ID. As the owner, the cursor remains under your program's control until RestoreCursor() is called.
| Okay | Operation successful. |
|---|---|
| True | Operation successful. |
| NothingDone | Nothing to do for the requested operation |
| Args | Invalid arguments passed to function |
| LockFailed | Failed to lock a required resource |
| OutOfRange | The cursor ID is outside of acceptable range. |
| AccessObject | Failed to access the mouse pointer. |
Changes the position of the pointer cursor.
| Parameter | Description |
|---|---|
| X | The new horizontal coordinate for the pointer. |
| Y | The new vertical coordinate for the pointer. |
Changes the position of the pointer cursor using coordinates relative to the entire display.
| Okay | Operation successful. |
|---|
Sets the cursor to a customised bitmap image.
| Parameter | Description |
|---|---|
| Surface | Refers to the Surface object that the pointer should restrict itself to, if the RESTRICT flag is used. Otherwise, this parameter can be set to a surface that the new cursor image should be limited to. The object referred to here must be publicly accessible to all tasks. |
| Flags | Optional flags affecting the cursor are set here. |
| Bitmap | The Bitmap to set for the mouse cursor. |
| HotX | The horizontal position of the cursor hot-spot. |
| HotY | The vertical position of the cursor hot-spot. |
| Owner | The object nominated as the owner of the anchor. |
Use the SetCustomCursor() function to change the pointer image and/or anchor the position of the pointer so that it cannot move without permission. The functionality provided is identical to that of the SetCursor() function with some minor adjustments to allow custom images to be set.
The Bitmap that is provided should be within the width, height and bits-per-pixel settings that are returned by the GetCursorInfo() function. If the basic settings are outside the allowable parameters, the Bitmap will be trimmed or resampled appropriately when the cursor is downloaded to the video card.
It may be possible to speed up the creation of custom cursors by drawing directly to the pointer's internal bitmap buffer rather than supplying a fresh bitmap. To do this, the Bitmap parameter must be NULL and it is necessary to draw to the pointer's bitmap before calling SetCustomCursor(). Note that the bitmap is always returned as a 32-bit, alpha-enabled graphics area. The following code illustrates this process:
if (auto pointer = gfx::AccessPointer()) {
if (ScopedObjectLock<objBitmap> bitmap(pointer->BitmapID, 3000); bitmap.granted()) {
// Adjust clipping to match the cursor size.
buffer->Clip.Right = CursorWidth;
buffer->Clip.Bottom = CursorHeight;
if (buffer->Clip.Right > buffer->Width) buffer->Clip.Right = buffer->Width;
if (buffer->Clip.Bottom > buffer->Height) buffer->Clip.Bottom = buffer->Height;
// Draw to the bitmap here.
...
gfx::SetCustomCursor(ObjectID, NULL, NULL, 1, 1, glTaskID, NULL);
}
gfx::ReleasePointer(pointer);
}
| Okay | Operation successful. |
|---|---|
| NothingDone | Nothing to do for the requested operation |
| LockFailed | Failed to lock a required resource |
| OutOfRange | A value is outside of the valid range |
| AccessObject | Failed to access the internally maintained image object. |
Alter options associated with the host display system.
| Parameter | Description |
|---|---|
| Option | One of TRAY_ICON, TASKBAR or STICK_TO_FRONT. |
| Value | The value to be applied to the option. |
For internal usage only.
| Okay | Operation successful. |
|---|
Enables a modal surface for the current task.
| Parameter | Description |
|---|---|
| Surface | The surface to enable as modal. |
Any surface that is created by a task can be enabled as a modal surface. A surface that has been enabled as modal becomes the central point for all GUI interaction with the task. All other I/O between the user and surfaces maintained by the task will be ignored for as long as the target surface remains modal.
A task can switch off the current modal surface by calling this function with a Surface parameter of zero.
If a surface is modal at the time that this function is called, it is not possible to switch to a new modal surface until the current modal state is dropped.
The object ID of the previous modal surface is returned (zero if there was no currently modal surface).
Attaches an item to the cursor for the purpose of drag and drop.
| Parameter | Description |
|---|---|
| Source | Refers to an object that is managing the source data. |
| Item | A custom number that represents the item being dragged from the source. |
| Datatypes | A character array that lists the datatypes supported by the source item, in order of conversion preference. |
| Surface | A 32-bit composite surface that represents the item being dragged. |
This function starts a drag and drop operation with the mouse cursor. The user must be holding the primary mouse button to initiate the drag and drop operation.
A Source object ID is required that indicates the origin of the item being dragged and will be used to retrieve the data on completion of the drag and drop operation. An Item number, which is optional, identifies the item being dragged from the Source object.
The type of data represented by the source item and all other supportable data types are specified in the Datatypes parameter as a character array. The array is arranged in order of preference, starting with the item's native data type. Acceptable data type values are listed in the documentation for the DataFeed action.
The Surface parameter allows for a composite surface to be dragged by the mouse cursor as a graphical representation of the source Item. It is recommended that the graphic be 32x32 pixels in size and no bigger than 64x64 pixels. The Surface will be hidden on completion of the drag and drop operation.
If the call to StartCursorDrag() is successful, the mouse cursor will operate in drag and drop mode. The UserMovement and UserClickRelease actions normally reported from the SystemPointer will now include the JD_DRAGITEM flag in the ButtonFlags parameter. When the user releases the primary mouse button, the drag and drop operation will stop and the DragDrop action will be passed to the surface immediately underneath the mouse cursor. Objects that are monitoring for the DragDrop action on that surface can then contact the Source object with a DataFeed DragDropRequest. The resulting data is then passed to the requesting object with a DragDropResult on the DataFeed.
| Okay | Operation successful. |
|---|---|
| InUse | A drag and drop operation has already been started. |
| AccessObject | Attempting to lock an object failed |
| InvalidState | The left mouse button is not held by the user. |
| NullArgs | Function call missing argument value(s) |
Subscribe to incoming input messages for any active surface object.
| Parameter | Description |
|---|---|
| Callback | Reference to a callback function that will receive input messages. |
| SurfaceFilter | Optional. Only the input messages that match the given Surface ID will be received. |
| Mask | Combine JTYPE flags to define the input messages required by the client. Set to 0xffffffff if all messages are required. |
| DeviceFilter | Optional. Only the input messages that match the given device ID will be received. NOTE - Support not yet implemented, set to zero. |
| Handle | A handle for the subscription is returned here. |
The SubscribeInput() function provides a systematic way of receiving input events as they occur. Coverage is limited to device events that are linked to the display (i.e. events from track pads, mouse pointers, graphics tablets and touch screens). Keyboard devices are not included.
The client is required to remove the subscription with UnsubscribeInput() once tracking is no longer required.
Input events can be filtered so that they are received in relation to surfaces and devices. An input mask can also be applied so that only certain types of events are received.
A callback is required for receiving the input events. The following C++ code illustrates a method for processing events in the callback:
ERR consume_input_events(const InputEvent *Events, int Handle)
{
for (auto e=Events; e; e=e->Next) {
if (((e->Flags & JTYPE::BUTTON) != JTYPE::NIL) and (e->Value > 0)) {
process_click(Self, e->RecipientID, e->X, e->Y);
}
}
return ERR::Okay;
}
All processable events are referenced in the InputEvent structure in the Events parameter.
JET constants are as follows and take note of CROSSED_IN and CROSSED_OUT which are software generated and not a device event:
| Name | Description |
|---|---|
| JET::ABS_XY | The X, Y values are defined as absolute coordinates, relative to the top-left of the display |
| JET::BUTTON_1 | Left mouse button; XBox A button, PS square button. Value is pressure sensitive, ranging between 0 - 1.0 (0 is released, 1.0 is fully depressed) |
| JET::BUTTON_10 | Non-specific button assignment |
| JET::BUTTON_2 | Right mouse button; XBox X button, PS cross button |
| JET::BUTTON_3 | Middle mouse button; XBox Y button, PS triangle |
| JET::BUTTON_4 | Alt. mouse button 1; XBox B button, PS circle |
| JET::BUTTON_5 | Alt. mouse button 2 |
| JET::BUTTON_6 | Non-specific button assignment |
| JET::BUTTON_7 | Non-specific button assignment |
| JET::BUTTON_8 | Non-specific button assignment |
| JET::BUTTON_9 | Non-specific button assignment |
| JET::CROSSED_IN | This message is sent by the input system when the mouse pointer enters an area for the first time. The message value refers to the object ID of the container being monitored for movement |
| JET::CROSSED_OUT | This message is sent by the input system when the mouse pointer leaves an area. The message value refers to the object ID of the container being monitored for movement |
| JET::DEVICE_TILT_XY | Controller tilted on the X/Y axis. Value indicates angle, -ve = left, +ve = right |
| JET::DEVICE_TILT_Z | Controller is rising or falling. Value expressed as 'speed', |
| JET::DISPLAY_EDGE | Recently supplied input occurred at the edge of the display |
| JET::PEN_TILT_XY | Pen tilt angle. 0 is pointing down directly with nib at bottom, 0.5 is 90 degrees, 1.0 is inversed (eraser at bottom) |
| JET::PRESSURE | Amount of pressure applied, ranges from 0 (none) to 1.0 (normal) and possibly higher if user presses hard enough |
| JET::WHEEL | Mouse wheel rotation - the value generally reflects the number of 'clicks' rotated on the wheel |
| JET::WHEEL_TILT | Some mouse wheels can be tilted to the left or right. Ranges from -1.0 to +1.0 |
The JTYPE values for the Flags field are as follows. Note that these flags also serve as input masks for the SubscribeInput() function, so to receive a message of the given type the appropriate JTYPE flag must have been set in the original subscription call.
| Name | Description |
|---|---|
| JTYPE::ANALOG | Analog movement (ranging from -1.0 to 1.0) |
| JTYPE::ANCHORED | Cursor has been anchored with LockCursor() |
| JTYPE::BUTTON | Input is a physical button or switch |
| JTYPE::CROSSING | Crossing events manage the entering and leaving of an area |
| JTYPE::DBL_CLICK | Set by the input system if the Type is a button and the button has been clicked in quick succession so as to be classed as a double-click |
| JTYPE::DIGITAL | D-Pad or digital joystick source (restricted to +/- 1) |
| JTYPE::DRAGGED | Set if sufficient movement occurred between the original click and its point of release (usually requires a 3 or more pixel difference) |
| JTYPE::DRAG_ITEM | This special flag is set by the input system if the pointer is click-dragging an object at the time of the event |
| JTYPE::EXT_MOVEMENT | Extended or indirect movement information. This covers all types of movement that are unconnected to coordinate positioning - mouse wheel movement and pen tilt are two such examples |
| JTYPE::MOVEMENT | X/Y coordinate movement only. Movement such as the wheel mouse spinning is not covered by this type as it does not influence the coordinate system |
| JTYPE::REPEATED | Input is a repeated entry (i.e. user is holding down a button and a repetition timer is being triggered) |
| JTYPE::SECONDARY | Indicates to the receiver of this message that it is not the primary/original recipient |
| Okay | Operation successful. |
|---|---|
| NullArgs | Function call missing argument value(s) |
Waits for the completion of all active bitmap operations.
| Parameter | Description |
|---|---|
| Bitmap | Pointer to the bitmap that you want to synchronise or NULL to sleep on the graphics accelerator. |
The Sync() function will wait for all current video operations to complete before it returns. This ensures that it is safe to write to video memory with the CPU, preventing any possibility of clashes with the onboard graphics chip.
Undoes an earlier call to LockCursor()
| Parameter | Description |
|---|---|
| Surface | Refers to the surface object used for calling LockCursor(). |
Call this function to undo any earlier calls to LockCursor() and return the mouse pointer to its regular state.
| Okay | Operation successful. |
|---|---|
| ResourceNotLocked | The pointer is not anchored to the given Surface. |
| AccessObject | Attempting to lock an object failed |
| NullArgs | Function call missing argument value(s) |
Removes an input subscription.
| Parameter | Description |
|---|---|
| Handle | Reference to a handle returned by SubscribeInput(). |
This function removes an input subscription that has been created with SubscribeInput().
| Okay | Operation successful. |
|---|---|
| NotFound | A search routine in this function failed |
| NullArgs | Function call missing argument value(s) |
Adds a function hook for receiving window messages from a host desktop.
| Parameter | Description |
|---|---|
| SurfaceID | A hosted surface to be monitored. |
| Event | A window hook event. |
| Callback | A function to callback when the event is triggered. |
Adds a function hook for receiving window events from a host desktop.
| Okay | Operation successful. |
|---|---|
| NullArgs | Function call missing argument value(s) |
Acceleration flags for GetDisplayInfo().
| Name | Description |
|---|---|
| ACF::SOFTWARE_BLIT | Software blitting is used (or forced) for this display. |
| ACF::VIDEO_BLIT | Video blitting is supported for this display. |
Instructions for basic graphics operations.
| Name | Description |
|---|---|
| BAF::BLEND | Enable alpha blending to the destination if the source supports an alpha channel. |
| BAF::COPY | Special CopyArea() option that avoids blending when the destination pixel is empty. |
| BAF::DITHER | Perform dithering if the colour formats differ between the source and destination. |
| BAF::FILL | For primitive operations such as DrawRectangle(), this will fill the shape with a solid colour or texture. |
| BAF::LINEAR | Use linear interpolation to improve the quality of alpha blending. |
CopySurface() flags
| Name | Description |
|---|---|
| BDF::DITHER | Allow the use of dithering to improve image quality at a cost of speed. |
| BDF::REDRAW | Redraw the surface before performing the copy operation. |
Flags for the SetCursor() function.
| Name | Description |
|---|---|
| CRF::BUFFER | Use of the BUFFER option allows the cursor request to be buffered in the event that the cursor is locked at the time of calling the SetCursor() function. Use of this flag is highly recommended in most circumstances, but may not be used in conjunction with the ANCHOR option. |
| CRF::LMB | Release the cursor after the left mouse button is held and released. |
| CRF::MMB | Release the cursor after the middle mouse button is held and released. |
| CRF::NO_BUTTONS | Set the cursor only on the condition that the user is not holding down any buttons. ERR::NothingDone is returned if the user has a button held down. |
| CRF::RESTRICT | Similar to the anchor option, but allows the pointer to move within the surface referred to by ObjectID. |
| CRF::RMB | Release the cursor after the right mouse button is held and released. |
Flags for CopySurface().
| Name | Description |
|---|---|
| CSRF::ALPHA | Enable alpha blending if the source is in 32-bit colour format with an alpha channel. |
| CSRF::CLIP | Enable clipping of the source coordinates. |
| CSRF::DEFAULT_FORMAT | Ignore the colour format defined in the source surface (if any) and generate a default format based on the BitsPerPixel value. |
| CSRF::OFFSET | Adjust X and Y coordinates by the offset values defined in the Surface⇒XOffset and Surface⇒YOffset fields. |
| CSRF::TRANSLUCENT | Perform a translucent copy operation, using the strength value specified in the Surface⇒Opacity field. |
| CSRF::TRANSPARENT | Enable transparent copying, whereby colours matching the source's Colour field will be ignored. |
Optional flags for the ExposeSurface() function.
| Name | Description |
|---|---|
| EXF::ABSOLUTE | The supplied coordinates for exposure are absolute (relative to the display). |
| EXF::ABSOLUTE_COORDS | The supplied coordinates for exposure are absolute (relative to the display). |
| EXF::CHILDREN | If set, all child surfaces that intersect with exposed region will be included in the expose operation. |
| EXF::REDRAW_VOLATILE | Redraw every volatile object that intersects with the expose region, including internal volatile children. |
| EXF::REDRAW_VOLATILE_OVERLAP | Only redraw volatile objects that obscure the expose region from a position outside of the target surface and its children. Useful if no redrawing has occurred in the surface, but the surface has moved to a new position and the parents need to be redrawn. |
| Name | Description |
|---|---|
| HOST::STICK_TO_FRONT | The hosted display sticks to the front. |
| HOST::TASKBAR | The hosted display is given a taskbar button. |
| HOST::TRANSLUCENCE | Change the alpha channel level for the entire window. |
| HOST::TRANSPARENT | Defines an RGB colour that is to be used as transparent. |
| HOST::TRAY_ICON | All new displays are represented in the system tray when this option is active. |
JET constants are documented in GetInputEvent()
| Name | Description |
|---|---|
| JET::ABS_XY | The X, Y values are defined as absolute coordinates, relative to the top-left of the display |
| JET::BUTTON_1 | Left mouse button; XBox A button, PS square button. Value is pressure sensitive, ranging between 0 - 1.0 (0 is released, 1.0 is fully depressed) |
| JET::BUTTON_10 | Non-specific button assignment |
| JET::BUTTON_2 | Right mouse button; XBox X button, PS cross button |
| JET::BUTTON_3 | Middle mouse button; XBox Y button, PS triangle |
| JET::BUTTON_4 | Alt. mouse button 1; XBox B button, PS circle |
| JET::BUTTON_5 | Alt. mouse button 2 |
| JET::BUTTON_6 | Non-specific button assignment |
| JET::BUTTON_7 | Non-specific button assignment |
| JET::BUTTON_8 | Non-specific button assignment |
| JET::BUTTON_9 | Non-specific button assignment |
| JET::CROSSED_IN | This message is sent by the input system when the mouse pointer enters an area for the first time. The message value refers to the object ID of the container being monitored for movement |
| JET::CROSSED_OUT | This message is sent by the input system when the mouse pointer leaves an area. The message value refers to the object ID of the container being monitored for movement |
| JET::DEVICE_TILT_XY | Controller tilted on the X/Y axis. Value indicates angle, -ve = left, +ve = right |
| JET::DEVICE_TILT_Z | Controller is rising or falling. Value expressed as 'speed', |
| JET::DISPLAY_EDGE | Recently supplied input occurred at the edge of the display |
| JET::PEN_TILT_XY | Pen tilt angle. 0 is pointing down directly with nib at bottom, 0.5 is 90 degrees, 1.0 is inversed (eraser at bottom) |
| JET::PRESSURE | Amount of pressure applied, ranges from 0 (none) to 1.0 (normal) and possibly higher if user presses hard enough |
| JET::WHEEL | Mouse wheel rotation - the value generally reflects the number of 'clicks' rotated on the wheel |
| JET::WHEEL_TILT | Some mouse wheels can be tilted to the left or right. Ranges from -1.0 to +1.0 |
JTYPE flags are used to categorise input types
| Name | Description |
|---|---|
| JTYPE::ANALOG | Analog movement (ranging from -1.0 to 1.0) |
| JTYPE::ANCHORED | Cursor has been anchored with LockCursor() |
| JTYPE::BUTTON | Input is a physical button or switch |
| JTYPE::CROSSING | Crossing events manage the entering and leaving of an area |
| JTYPE::DBL_CLICK | Set by the input system if the Type is a button and the button has been clicked in quick succession so as to be classed as a double-click |
| JTYPE::DIGITAL | D-Pad or digital joystick source (restricted to +/- 1) |
| JTYPE::DRAGGED | Set if sufficient movement occurred between the original click and its point of release (usually requires a 3 or more pixel difference) |
| JTYPE::DRAG_ITEM | This special flag is set by the input system if the pointer is click-dragging an object at the time of the event |
| JTYPE::EXT_MOVEMENT | Extended or indirect movement information. This covers all types of movement that are unconnected to coordinate positioning - mouse wheel movement and pen tilt are two such examples |
| JTYPE::MOVEMENT | X/Y coordinate movement only. Movement such as the wheel mouse spinning is not covered by this type as it does not influence the coordinate system |
| JTYPE::REPEATED | Input is a repeated entry (i.e. user is holding down a button and a repetition timer is being triggered) |
| JTYPE::SECONDARY | Indicates to the receiver of this message that it is not the primary/original recipient |
Predefined cursor styles
| Name | Description |
|---|---|
| PTC::CROSSHAIR | The cross hair is used for targeting specific pixel points (common in paint programs). |
| PTC::CUSTOM | Works in conjunction with the SetCustomCursor() function to represent a program defined bitmap. |
| PTC::DEFAULT | The default cursor (usually an arrow pointing to the upper left). |
| PTC::DRAGGABLE | Used to indicate that a surface or object can be dragged by the user. |
| PTC::END | |
| PTC::HAND | The hand cursor is often used for indicating click-able content (hyper-links, icons etc). |
| PTC::HAND_LEFT | Similar to the standard hand cursor, but points to the left. |
| PTC::HAND_RIGHT | Similar to the standard hand cursor, but points to the right. |
| PTC::INVISIBLE | The cursor graphic is invisible (but will continue to operate as normal in all other respects). |
| PTC::MAGNIFIER | Represents a magnifying glass. |
| PTC::NO_CHANGE | |
| PTC::PAINTBRUSH | The paintbrush cursor is typically employed by paint programs. |
| PTC::SIZE_BOTTOM | Sizing cursor - for resizing the bottom edge of any rectangular area. |
| PTC::SIZE_BOTTOM_LEFT | Sizing cursor - for resizing the bottom left corner of any rectangular area. |
| PTC::SIZE_BOTTOM_RIGHT | Sizing cursor - for resizing the bottom right corner of any rectangular area. |
| PTC::SIZE_LEFT | Sizing cursor - for resizing the left edge of any rectangular area. |
| PTC::SIZE_RIGHT | Sizing cursor - for resizing the right edge of any rectangular area. |
| PTC::SIZE_TOP | Sizing cursor - for resizing the top edge of any rectangular area. |
| PTC::SIZE_TOP_LEFT | Sizing cursor - for resizing the top left corner of any rectangular area. |
| PTC::SIZE_TOP_RIGHT | Sizing cursor - for resizing the top right corner of any rectangular area. |
| PTC::SIZING | Multi-directional sizing cursor - for resizing in any direction. |
| PTC::SLEEP | The sleep cursor is used to inform the user that the computer is busy. |
| PTC::SPLIT_HORIZONTAL | The horizontal split cursor is typically used for splitting rectangles in half, or dragging a horizontal split within a large rectangular space. |
| PTC::SPLIT_VERTICAL | The vertical split cursor is typically used for splitting rectangles in half, or dragging a vertical split within a large rectangular space. |
| PTC::STOP | The stop cursor is used to inform the user that an operation is not possible (e.g. drag and drop to an unsupported object area). |
| PTC::TEXT | The text cursor is popular for the precise positioning of text cursors. |
Switches for the Surface class' Flags field.
| Name | Description |
|---|---|
| RNF::AFTER_COPY | Read-only. Indicates that after-copy mode has been enabled. |
| RNF::ASPECT_RATIO | When resizing, enforce the aspect ratio as defined by the diagonal from Surface⇒MinWidth, Surface⇒MinHeight to Surface⇒MaxWidth, Surface⇒MaxHeight. |
| RNF::AUTO_QUIT | The surface object will send a quit message to its supporting process when and if the Close method is called. This flag is typically used when a surface object represents a core window for an application. |
| RNF::COMPOSITE | Do not copy background information into the surface buffer - composite on the fly instead |
| RNF::DISABLED | This flag is set if the Disable action has been called on a surface object. Calling the Enable action will turn off the flag setting. |
| RNF::FIXED_BUFFER | Passes the NEVER_SHRINK option to the surface bitmap |
| RNF::FIXED_DEPTH | The target buffer always remains at the same depth |
| RNF::FULL_SCREEN | Allow the surface to open as a new screen display |
| RNF::GRAB_FOCUS | Helps application windows manage the user's focus within the window |
| RNF::HAS_FOCUS | Read-only. If set, this flag indicates that the surface object currently has the focus. |
| RNF::HOST | Define host on initialisation to create a container that can host surfaces from other processes. |
| RNF::IGNORE_FOCUS | Focus is diverted directly to the parent |
| RNF::INIT_ONLY | Synonym for HOST | TRANSPARENT | DISABLED | PRECOPY | VIDEO | FIXED_BUFFER | PERVASIVE_COPY | FIXED_DEPTH | FULL_SCREEN | IGNORE_FOCUS |
| RNF::NO_FOCUS | Prevents any kind of focussing on this object; no circumvention is possible |
| RNF::NO_HORIZONTAL | Turns off all horizontal movement (applies to the Move() action only). |
| RNF::NO_PRECOMPOSITE | Do not copy background information into the surface buffer - composite on the fly instead |
| RNF::NO_VERTICAL | Turns off all vertical movement (applies to the Move() action only). |
| RNF::PERVASIVE_COPY | This flag can be set in conjunction with after-copy mode. It forces the after-copy support routine to copy graphics over the entire surface area, rather than avoiding the graphics of child surfaces. |
| RNF::POST_COMPOSITE | Do not copy background information into the surface buffer - composite on the fly instead |
| RNF::PRECOPY | Enables pre-copy mode, which means that all graphics behind the surface object are copied into the bitmap buffer prior to any redraw. This mode can have a noticable impact on CPU time when drawing. |
| RNF::READ_ONLY | Synonym for HAS_FOCUS | CURSOR | AFTER_COPY |
| RNF::STICKY | Prevents any response to the Move action. It can be circumvented by writing to coordinate fields directly. |
| RNF::STICK_TO_BACK | Enable if the surface object must stick to the back of its container. |
| RNF::STICK_TO_FRONT | Enable if the surface object must stick to the front of its container. |
| RNF::TOTAL_REDRAW | Perform a total redraw of the entire surface when drawing - no partial draws |
| RNF::TRANSPARENT | Enables transparency, which means that the internal graphics routines will ignore this surface during redraws. It is typically used when creating containers that will host other surfaces. |
| RNF::VIDEO | Set this flag if you would like the surface object's data to be managed in video memory only. While this can give some speed advantages, be warned that video based surfaces are limited to write-only operations. |
| RNF::VISIBLE | If a surface object is visible to the user, the VISIBLE flag will be set. If the flag is not set, the surface object is hidden. |
| RNF::VOLATILE | Synonym for PRECOPY | AFTER_COPY | CURSOR |
| RNF::WRITE_ONLY | Set this flag if you would like the surface object's data to be managed in video memory only. While this can give some speed advantages, be warned that video based surfaces are limited to write-only operations. |
Display flags.
| Name | Description |
|---|---|
| SCR::ACTIVE | The display is participating in the desktop view - this does not guarantee it is visible. |
| SCR::ALPHA_BLEND | Enables alpha channel blending (if display is hosted and 32-bit). |
| SCR::AUTO_SAVE | Saves settings to the global display state when the object is freed. |
| SCR::BIT_6 | Display is limited to 6-bit output per colour gun. |
| SCR::BORDERLESS | If display is hosted, create it as a popup / borderless window. |
| SCR::BUFFER | Set if you would like a complementing buffer in video RAM. |
| SCR::COMPOSITE | Enables alpha channel blending (if display is hosted and 32-bit). |
| SCR::CUSTOM_WINDOW | The display has been created with a custom window reference. |
| SCR::DPMS_ENABLED | Power saving through DPMS is supported. |
| SCR::FLIPPABLE | If SCR::BUFFER is used, this flag may be set by the display manager if it is possible to flip the buffer. |
| SCR::GRAB_CONTROLLERS | Grab controllers for receiving input when the display has the focus. |
| SCR::GTF_ENABLED | GTF frequency timings are supported. |
| SCR::HOSTED | The display is a desktop hosted window. |
| SCR::MAXIMISE | Special win32 flag. |
| SCR::MAXSIZE | For GetDisplayInfo() only, indicates that the width and height values indicate the display's maximum size. |
| SCR::MIRRORED | The display is a mirrored copy. |
| SCR::NO_ACCELERATION | 2D graphics card acceleration is not available. |
| SCR::POWERSAVE | Power saving is active (read-only). |
| SCR::PRIMARY | The display is flagged as being the primary. |
| SCR::READ_ONLY | Synonym for MAXIMISE | CUSTOM_WINDOW | FLIPPABLE | GTF_ENABLED | DPMS_ENABLED | POWERSAVE | HOSTED | MAXSIZE | REFRESH | BIT_6 | VISIBLE | NO_ACCELERATION |
| SCR::REFRESH | For GetDisplayInfo() only, used to indicate that a display change has recently occurred and cache refresh is required. |
| SCR::ROTATED | True if the display is rotated. |
| SCR::VIRTUAL | The display is virtual or not visible (device not switched on). |
| SCR::VISIBLE | Set if the screen is on display. |
Events for WindowHook()
| Name | Description |
|---|---|
| WH::CLOSE |
| Field | Type | Description |
|---|---|---|
| Data | APTR | Pointer to the bitmap graphics data. |
| Width | INT16 | Pixel width of the bitmap. |
| Height | INT16 | Pixel height of the bitmap. |
| LineWidth | INT | The distance between bitmap lines, measured in bytes. |
| BitsPerPixel | UINT8 | The number of bits per pixel (8, 15, 16, 24, 32). |
| BytesPerPixel | UINT8 | The number of bytes per pixel (1, 2, 3, 4). |
| Opacity | UINT8 | Opacity level of the source if CSRF::TRANSLUCENT is used. |
| Version | UINT8 | Version of this structure. |
| Colour | INT | Colour index to use if CSRF::TRANSPARENT is used. |
| Clip | struct ClipRectangle | A clipping rectangle will restrict drawing operations to this region if CSRF::CLIP is used. |
| XOffset | INT16 | Offset all X coordinate references by the given value. |
| YOffset | INT16 | Offset all Y coordinate references by the given value. |
| Format | struct ColourFormat | The colour format of this bitmap's pixels, or alternatively use CSRF::DEFAULT_FORMAT. |
| Field | Type | Description |
|---|---|---|
| RedShift | UINT8 | Right shift value for red (15/16 bit formats only) |
| GreenShift | UINT8 | Right shift value for green |
| BlueShift | UINT8 | Right shift value for blue |
| AlphaShift | UINT8 | Right shift value for alpha |
| RedMask | UINT8 | Unshifted mask value for red (ranges from 0x00 to 0xff) |
| GreenMask | UINT8 | Unshifted mask value for green |
| BlueMask | UINT8 | Unshifted mask value for blue |
| AlphaMask | UINT8 | Unshifted mask value for alpha |
| RedPos | UINT8 | Left shift/positional value for red |
| GreenPos | UINT8 | Left shift/positional value for green |
| BluePos | UINT8 | Left shift/positional value for blue |
| AlphaPos | UINT8 | Left shift/positional value for alpha |
| BitsPerPixel | UINT8 | Number of bits per pixel for this format. |
| Field | Type | Description |
|---|---|---|
| Width | INT | Maximum cursor width for custom cursors |
| Height | INT | Maximum cursor height for custom cursors |
| Flags | INT | Currently unused |
| BitsPerPixel | INT16 | Preferred bits-per-pixel setting for custom cursors |
| Field | Type | Description |
|---|---|---|
| PixelFormat | struct PixelFormat | The colour format to use for each pixel. |
| MinRefresh | FLOAT | Minimum refresh rate |
| MaxRefresh | FLOAT | Maximum refresh rate |
| RefreshRate | FLOAT | Recommended refresh rate |
| Display | OBJECTID | Object ID related to the display |
| AccelFlags | ACF | Flags describing supported hardware features. |
| Flags | SCR | Display flags |
| AmtColours | INT | Total number of supported colours. |
| Index | INT | Display mode ID (internal) |
| HDensity | INT | Horizontal pixel density per inch. |
| VDensity | INT | Vertical pixel density per inch. |
| HostedX | INT | Horizontal display position in virtual desktop coordinates |
| HostedY | INT | Vertical display position in virtual desktop coordinates |
| MonitorX | INT | Horizontal position of the monitor, relative to the primary monitor |
| MonitorY | INT | Vertical position of the monitor, relative to the primary monitor |
| MonitorWidth | INT | Pixel width of the monitor |
| MonitorHeight | INT | Pixel height of the monitor |
| VirtualX | INT | Horizontal position of the complete desktop spanning all monitors |
| VirtualY | INT | Vertical position of the complete desktop spanning all monitors |
| VirtualWidth | INT | Width of the complete desktop spanning all monitors |
| VirtualHeight | INT | Height of the complete desktop spanning all monitors |
| PhysicalWidth | INT | Width in millimeters, 0 if unknown |
| PhysicalHeight | INT | Height in millimeters, 0 if unknown |
| Width | INT16 | Pixel width of the display bitmap |
| Height | INT16 | Pixel height of the display bitmap |
| BitsPerPixel | INT16 | Bits per pixel |
| BytesPerPixel | INT16 | Bytes per pixel |
| Field | Type | Description |
|---|---|---|
| Next | const struct InputEvent * | Next event in the chain |
| Value | DOUBLE | The value associated with the Type |
| Timestamp | INT64 | PreciseTime() of the recorded input |
| RecipientID | OBJECTID | Surface that the input message is being conveyed to |
| OverID | OBJECTID | Surface that is directly under the mouse pointer at the time of the event |
| AbsX | DOUBLE | Absolute horizontal position of mouse cursor (relative to the top left of the display) |
| AbsY | DOUBLE | Absolute vertical position of mouse cursor (relative to the top left of the display) |
| X | DOUBLE | Horizontal position relative to the surface that the pointer is over - unless a mouse button is held or pointer is anchored - then the coordinates are relative to the click-held surface |
| Y | DOUBLE | Vertical position relative to the surface that the pointer is over - unless a mouse button is held or pointer is anchored - then the coordinates are relative to the click-held surface |
| DeviceID | OBJECTID | The hardware device that this event originated from |
| Type | JET | JET constant that describes the event |
| Flags | JTYPE | Broad descriptors for the given Type (see JTYPE flags). Automatically defined when delivered to the pointer object |
| Mask | JTYPE | Mask to use for checking against subscribers |
Carries instructions to pack or unpack RGBA colours.
| Field | Type | Description |
|---|---|---|
| RedShift | UINT8 | Right shift value |
| GreenShift | UINT8 | Green shift value |
| BlueShift | UINT8 | Blue shift value |
| AlphaShift | UINT8 | Alpha shift value |
| RedMask | UINT8 | The unshifted red mask value (ranges from 0x00 to 0xff) |
| GreenMask | UINT8 | The unshifted green mask value (ranges from 0x00 to 0xff) |
| BlueMask | UINT8 | The unshifted blue mask value (ranges from 0x00 to 0xff) |
| AlphaMask | UINT8 | The unshifted alpha mask value (ranges from 0x00 to 0xff) |
| RedPos | UINT8 | Left shift/positional value for red |
| GreenPos | UINT8 | Left shift/positional value for green |
| BluePos | UINT8 | Left shift/positional value for blue |
| AlphaPos | UINT8 | Left shift/positional value for alpha |
| Pad | UINT | Padding |
| Field | Type | Description |
|---|---|---|
| X | INT | Horizontal coordinate |
| Y | INT | Vertical coordinate |
| Width | INT | Width |
| Height | INT | Height |
| AbsX | INT | Absolute X |
| AbsY | INT | Absolute Y |
| Field | Type | Description |
|---|---|---|
| Data | APTR | Bitmap data memory ID |
| ParentID | OBJECTID | Object that contains the surface area |
| BitmapID | OBJECTID | Surface bitmap buffer |
| DisplayID | OBJECTID | Refers to the display if this object is at root level |
| Flags | RNF | Surface flags |
| X | INT | Horizontal coordinate |
| Y | INT | Vertical coordinate |
| Width | INT | Width of the surface area |
| Height | INT | Height of the surface area |
| AbsX | INT | Absolute X coordinate |
| AbsY | INT | Absolute Y coordinate |
| Level | INT16 | Branch level within the tree |
| BitsPerPixel | INT8 | Bits per pixel of the bitmap |
| BytesPerPixel | INT8 | Bytes per pixel of the bitmap |
| LineWidth | INT | Line width of the bitmap, in bytes |
Display mode.
| Field | Type | Description |
|---|---|---|
| Width | INT | Horizontal |
| Height | INT | Vertical |
| Depth | INT | bit depth |