The following modules are included in the standard distribution and can be loaded at run-time with mod.load() in Fluid or LoadModule() in C/C++.
Use the navigation bar on the right to peruse the available functionality of the selected module.
Beginners should start with the Core module, which includes the bulk of Parasol's functionality.
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. |
---|---|
Mismatch | The destination bitmap is not a close enough match to the source bitmap in order to perform the blit. |
InvalidState | The LINEAR flag was used when at least one bitmap is using a linear colourspace. |
NullArgs | The Dest parameter was not specified. |
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 | An attempt to gain exclusive access to a shared 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.
Parameter | Description |
---|---|
Bitmap | Pointer to the target Bitmap. |
X | The left-most coordinate of the rectangle. |
Y | The top-most coordinate of the rectangle. |
Width | The width of the rectangle. |
Height | The height of the rectangle. |
Colour | The colour value to use for the rectangle. |
Flags | Use FILL to fill the rectangle. Use of BLEND will enable blending. |
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. Blending is not enabled unless the BAF::BLEND
flag is defined and an alpha value is present in the Colour
.
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) |
Flips a bitmap around its horizontal or vertical axis.
Parameter | Description |
---|---|
Bitmap | Pointer to a bitmap object. |
Orientation | Set to either HORIZONTAL or VERTICAL . If set to neither, the function does nothing. |
The FlipBitmap() function is used to flip bitmap images on their horizontal or vertical axis. The amount of time required to flip a bitmap is dependent on the area of the bitmap you are trying to flip over and its total number of colours.
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. |
Size | The byte-size of the Info 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. |
---|---|
AllocMemory | A call to AllocMemory() failed to create a new memory block. |
NullArgs | Function call missing argument value(s) |
Returns the type of display supported.
This function returns the type of display supported by the loaded Display module. Current return values are:
Name | Description |
---|---|
DT::GLES | The display is driven by OpenGLES. |
DT::NATIVE | The display is native (supported by internal drivers). |
DT::WINGDI | The display is driven by Microsoft Windows drivers. |
DT::X11 | The display is driven by the X Window System (X11, X.Org, XFree86) |
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. |
---|---|
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. |
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. |
---|---|
AccessMemory | Access to a shared memory block was denied. |
NullArgs | Function call missing argument value(s) |
Retrieves display information for any surface object without having to access it directly.
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. |
---|---|
Failed | General failure. |
Search | The supplied Surface ID did not refer to a recognised surface object. |
Returns a bitmap that represents the video area covered by the surface object.
Parameter | Description |
---|---|
Surface | Object ID of the surface object that you want to lock. |
Bitmap | The resulting bitmap will be returned in this parameter. |
Info | Special flags may be returned in this parameter. If EXPOSE_CHANGES is returned, any changes must be exposed in order for them to be displayed to the user. |
Use the LockBitmap() function to gain direct access to the bitmap information of a surface object. Because the layering buffer will be inaccessible to the UI whilst you retain the lock, you must keep your access time to an absolute minimum or desktop performance may suffer.
Repeated calls to this function will nest. To release a surface bitmap, call the UnlockBitmap() function.
Okay | Operation successful. |
---|---|
Args | Invalid arguments passed to function. |
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.
Okay | Operation successful. |
---|---|
NoSupport | The pointer cannot be locked due to system limitations. |
AccessObject | Failed to access the pointer object. |
NullArgs | Function call missing argument value(s) |
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. |
---|---|
Args | Invalid arguments passed to function. |
Scales a value to the active display's DPI.
Parameter | Description |
---|---|
Value | The number to be scaled. |
ScaleToDPI() is a convenience function for scaling any value to the active display's current DPI setting. The value that you provide must be fixed in relation to the system wide default of 96 DPI. If the display's DPI varies differs to that, your 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, your value will be returned unscaled.
The scaled value is returned.
Sets a clipping region for a bitmap object.
Parameter | Description |
---|---|
Bitmap | The target bitmap. |
Number | The number of the clip region to set. |
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. |
Terminate | Set to true if this is the last clip region in the list, otherwise false . |
The SetClipRegion() method is used to manage the clipping regions assigned to a bitmap object. Each new bitmap that is created has at least one clip region assigned to it, but by using SetClipRegion() you can also define multiple clipping areas, which is useful for complex graphics management.
Each clipping region that you set is assigned a Number, starting from zero which is the default. Each time that you set a new clip region you must specify the number of the region that you wish to set. If you attempt to 'skip' regions - for instance, if you set regions 0, 1, 2 and 3, then skip 4 and set 5, the routine will set region 4 instead. If you have specified multiple clip regions and want to lower the count or reset the list, set the number of the last region that you want in your list and set the Terminate
parameter to true
to kill the regions specified beyond it.
The ClipLeft
, ClipTop
, ClipRight
and ClipBottom
fields in the target Bitmap
will be updated to reflect the overall area that is covered by the clipping regions that have been set.
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 ID's and their equivalent names are listed in the documentation for the _Pointer.Cursor_ 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. |
---|---|
NothingDone | There is nothing to process. |
Args | Invalid arguments passed to function. |
LockFailed | Failed to lock a required resource. |
NoSupport | The pointer cannot be set due to system limitations. |
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. |
---|---|
AccessObject | Failed to access the SystemPointer object. |
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. |
---|---|
Args | Invalid arguments passed to function. |
NoSupport | This request is not supported. |
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 null terminated byte 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 null terminated 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. |
Failed | The left mouse button is not held by the user. |
AccessObject | An attempt to gain exclusive access to a shared object failed. |
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, LONG 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 | For pen-based input, this type indicates the vertical tilt of the pen device. A value of 0 indicates that the pen is laid flat with nib at the bottom, 0.5 is 90 degrees, 1.0 is laid flat with nib at the top. |
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.
Unlocks any earlier call to gfx::LockBitmap().
Parameter | Description |
---|---|
Surface | The ID of the surface object that you are releasing. |
Bitmap | Pointer to the bitmap structure returned earlier by LockBitmap(). |
Call the UnlockBitmap() function to release a surface object from earlier calls to LockBitmap().
Okay | The bitmap has been unlocked successfully. |
---|---|
NullArgs | Function call missing argument value(s) |
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. |
---|---|
NotLocked | A lock is not present, or the lock belongs to another surface. |
AccessObject | Failed to access the pointer object. |
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. |
Universal values for alignment of graphics and text
Name | Description |
---|---|
ALIGN::BOTTOM | Align to bottom |
ALIGN::CENTER | Synonym for HORIZONTAL | VERTICAL |
ALIGN::HORIZONTAL | Align to horizontal center |
ALIGN::LEFT | Align to left |
ALIGN::MIDDLE | Synonym for HORIZONTAL | VERTICAL |
ALIGN::RIGHT | Align to right |
ALIGN::TOP | Align to top |
ALIGN::VERTICAL | Align to vertical center |
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. |
Bitmap flags
Name | Description |
---|---|
BMF::ACCELERATED_2D | 2D video acceleration is available. |
BMF::ACCELERATED_3D | 3D video acceleration is available. |
BMF::ALPHA_CHANNEL | For 32-bit images, indicates that an alpha channel is present. |
BMF::BLANK_PALETTE | Forces a blank/black palette on initialisation. |
BMF::CLEAR | Clear graphics on initialisation and when resizing. |
BMF::COMPRESSED | The bitmap data is compressed. |
BMF::FIXED_DEPTH | Prevent changing of bitmap depth after initialisation (e.g. via Resize() ). |
BMF::INVERSE_ALPHA | Indicates reverse alpha blending, higher values are transparent. |
BMF::MASK | Declare the Bitmap as a 1 or 8 bit mask. Must be set in conjunction with the Bitmap.BitsPerPixel field on initialisation. |
BMF::NEVER_SHRINK | Ignore resize requests that would shrink the size of the bitmap. |
BMF::NO_BLEND | Drawing routines that support this flag will not blend pixels. |
BMF::NO_DATA | Do not allocate memory in the Data field on initialisation. |
BMF::PREMUL | The RGB values are premultiplied (32-bit only). |
BMF::QUERIED | Automatically set after a Query() on the bitmap. |
BMF::TRANSPARENT | Indicates that the bitmap utilises a transparent colour. This is automatically set if the Bitmap.TransIndex or Bitmap.TransColour is defined, and support exists in functions such as CopyArea(). |
BMF::USER | This user flag can be used to tag bitmaps with special meaning. Not used internally. |
Bitmap types
Name | Description |
---|---|
BMP::CHUNKY | Chunky pixel mode (default). |
BMP::PLANAR | Planar pixel mode separates pixel bits across multiple planes. Commonly used for single bit bitmap masks. |
Name | Description |
---|---|
CEF::DELETE | Requests that the original file source is deleted if a successful paste operation takes place. |
CEF::EXTEND | Instead of replacing existing clipboard data, add the new data to the group. |
Clipboard types
Name | Description |
---|---|
CLIPTYPE::AUDIO | An audio clip that is recognised by the Sound class (such as wav's and mp3's). |
CLIPTYPE::DATA | Raw information that is uncategorised can be defined as a data clip. |
CLIPTYPE::FILE | Pure file references are stored as file clips. This type is typically used by file managers for moving and copying files. |
CLIPTYPE::IMAGE | Images that are recognised by the Picture class may be stored as this type (such as jpeg's and png files). |
CLIPTYPE::OBJECT | An object that has been deserialised into binary form. |
CLIPTYPE::TEXT | Plain text files such as ASCII and UTF-8 must be identified through this clip type. |
Clipboard flags
Name | Description |
---|---|
CPF::DRAG_DROP | Enables drag and drop mode. The clipboard content will be private and not share data with the host system in this mode. |
CPF::HISTORY_BUFFER | Enables the history buffer. Note that this results in active clipboard monitoring and the program will make copies of all potential clipboard content - whether it is used or not. |
CPF::HOST | This indicator is automatically set when a clipboard was created due to incoming content from the host system. |
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. |
Colour space options.
Name | Description |
---|---|
CS::CIE_LAB | Cartesian L*a*b* colour space defined by CIE 15. |
CS::CIE_LCH | Polar L*CHab colour space defined by CIE 15. |
CS::LINEAR_RGB | Linear RGB is used to improve colour balance in blending operations. |
CS::SRGB | The default colour-space is sRGB. |
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. |
Name | Description |
---|---|
CT::AUDIO | |
CT::DATA | |
CT::END | |
CT::FILE | |
CT::IMAGE | |
CT::OBJECT | |
CT::TEXT |
Name | Description |
---|---|
DMF::FIXED_CENTER_X | The CenterX field is a fixed size. |
DMF::FIXED_CENTER_Y | The CenterY field is a fixed size. |
DMF::FIXED_DEPTH | The Depth field is a fixed size. |
DMF::FIXED_HEIGHT | The Height field is a fixed size. |
DMF::FIXED_RADIUS_X | The RadiusX field is a fixed size. |
DMF::FIXED_RADIUS_Y | The RadiusY field is a fixed size. |
DMF::FIXED_WIDTH | The Width field is a fixed suze. |
DMF::FIXED_X | The X field is a fixed coordinate. |
DMF::FIXED_X_OFFSET | The XOffset field is a fixed coordinate. |
DMF::FIXED_Y | The Y field is a fixed coordinate. |
DMF::FIXED_Y_OFFSET | The YOffset field is a fixed coordinate. |
DMF::FIXED_Z | The Z field is a fixed coordinate. |
DMF::SCALED_CENTER_X | The CenterX field is scaled to this object's parent. |
DMF::SCALED_CENTER_Y | The CenterY field is scaled to this object's parent. |
DMF::SCALED_DEPTH | The Depth field is scaled to this object's parent. |
DMF::SCALED_HEIGHT | The Height field is scaled to this object's parent. |
DMF::SCALED_RADIUS_X | The RadiusX field is scaled to this object's parent. |
DMF::SCALED_RADIUS_Y | The RadiusY field is a scaled size to this object's parent. |
DMF::SCALED_WIDTH | The Width field is scaled to this object's parent. |
DMF::SCALED_X | The X field is scaled to this object's parent. |
DMF::SCALED_X_OFFSET | The XOffset field is scaled to this object's parent. |
DMF::SCALED_Y | The Y field is scaled to this object's parent. |
DMF::SCALED_Y_OFFSET | The YOffset field is scaled to this object's parent. |
DMF::SCALED_Z | The Z field is a scaled coordinate to this object's parent. |
DMF::STATUS_CHANGE_H | |
DMF::STATUS_CHANGE_V |
Possible modes for the Display class' PowerMode field.
Name | Description |
---|---|
DPMS::DEFAULT | Use the default DPMS mode as defined by the display driver. |
DPMS::OFF | Stop sending power to the display in order to turn it off (it may not be possible to restart the display without the user's intervention). |
DPMS::STANDBY | Puts the display into standby (reduced power) mode. |
DPMS::SUSPEND | Puts the display into suspend mode (blanks the display output while maintaining normal power levels). |
Name | Description |
---|---|
DRAG::ANCHOR | The surface is being dragged and the mouse pointer is anchored to the surface. |
DRAG::NONE | The surface is not being dragged. |
DRAG::NORMAL | The surface is being dragged. |
Name | Description |
---|---|
DSF::NO_DRAW | Drawing and exposures are disabled |
DSF::NO_EXPOSE | Drawing is enabled, exposures are disabled |
Flags for GetDisplayType().
Name | Description |
---|---|
DT::GLES | The display is driven by OpenGLES. |
DT::NATIVE | The display is native (supported by internal drivers). |
DT::WINGDI | The display is driven by Microsoft Windows drivers. |
DT::X11 | The display is driven by the X Window System (X11, X.Org, XFree86) |
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. |
Flags for the bitmap Flip method.
Name | Description |
---|---|
FLIP::HORIZONTAL | Flip the bitmap from top to bottom. |
FLIP::VERTICAL | Flip the bitmap from left to right. |
Flags for gamma operations.
Name | Description |
---|---|
GMF::SAVE | Save the provided settings permanently. |
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. |
Flags for RedrawSurface().
Name | Description |
---|---|
IRF::FORCE_DRAW | Forces redrawing to the surface buffer (overrides visibility checks). |
IRF::IGNORE_CHILDREN | Do not draw child surfaces (this includes volatile children). |
IRF::IGNORE_NV_CHILDREN | Do not draw child surfaces unless they are volatile. |
IRF::RELATIVE | Coordinate parameters are expressed in relative format. Right and Bottom reflect Width and Height respectively. |
IRF::SINGLE_BITMAP | Only draw children and/or siblings when they share our bitmap space. |
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 | For pen-based input, this type indicates the vertical tilt of the pen device. A value of 0 indicates that the pen is laid flat with nib at the bottom, 0.5 is 90 degrees, 1.0 is laid flat with nib at the top. |
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 |
drwLockBitmap() result flags
Name | Description |
---|---|
LVF::EXPOSE_CHANGES |
Flags for the Display class SetMonitor() method.
Name | Description |
---|---|
MON::AUTO_DETECT | Monitor settings to be auto-detected on startup. |
MON::BIT_6 | The device is limited to 6-bit colour production in real terms. |
Flags for the Pointer class.
Name | Description |
---|---|
PF::ANCHOR | Allow the pointer to be anchored. |
PF::UNUSED | |
PF::VISIBLE | Indicates that the pointer is currently visible. Read-only. |
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 Surface.MinWidth and Surface.MinHeight. |
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. |
Name | Description |
---|---|
RT::ROOT | Can be used by window surfaces to identify themselves as a root layer. |
Display flags.
Name | Description |
---|---|
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::NO_ACCELERATION | 2D graphics card acceleration is not available. |
SCR::POWERSAVE | Power saving is active (read-only). |
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::VISIBLE | Set if the screen is on display. |
Options for the Surface WindowType field.
Name | Description |
---|---|
SWIN::HOST | Default to the standard hosted window mode with full titlebar, borders and taskbar representation. |
SWIN::ICON_TRAY | Create a borderless (custom) window with icon tray representation. |
SWIN::NONE | Create a borderless (custom) window with no UI representation. |
SWIN::TASKBAR | Create a borderless (custom) window with taskbar representation. |
Events for WindowHook()
Name | Description |
---|---|
WH::CLOSE |
Field | Type | Description |
---|---|---|
Data | APTR | Pointer to the bitmap graphics data. |
Width | WORD | Pixel width of the bitmap. |
Height | WORD | Pixel height of the bitmap. |
LineWidth | LONG | The distance between bitmap lines, measured in bytes. |
BitsPerPixel | UBYTE | The number of bits per pixel (8, 15, 16, 24, 32). |
BytesPerPixel | UBYTE | The number of bytes per pixel (1, 2, 3, 4). |
Opacity | UBYTE | Opacity level of the source if CSRF::TRANSLUCENT is used. |
Version | UBYTE | Version of this structure. |
Colour | LONG | 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 | WORD | Offset all X coordinate references by the given value. |
YOffset | WORD | 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 | UBYTE | Right shift value for red (15/16 bit formats only) |
GreenShift | UBYTE | Right shift value for green |
BlueShift | UBYTE | Right shift value for blue |
AlphaShift | UBYTE | Right shift value for alpha |
RedMask | UBYTE | Unshifted mask value for red (ranges from 0x00 to 0xff) |
GreenMask | UBYTE | Unshifted mask value for green |
BlueMask | UBYTE | Unshifted mask value for blue |
AlphaMask | UBYTE | Unshifted mask value for alpha |
RedPos | UBYTE | Left shift/positional value for red |
GreenPos | UBYTE | Left shift/positional value for green |
BluePos | UBYTE | Left shift/positional value for blue |
AlphaPos | UBYTE | Left shift/positional value for alpha |
BitsPerPixel | UBYTE | Number of bits per pixel for this format. |
Field | Type | Description |
---|---|---|
Width | LONG | Maximum cursor width for custom cursors |
Height | LONG | Maximum cursor height for custom cursors |
Flags | LONG | Currently unused |
BitsPerPixel | WORD | Preferred bits-per-pixel setting for custom cursors |
Field | Type | Description |
---|---|---|
Display | OBJECTID | Object ID related to the display |
Flags | SCR | Display flags |
Width | WORD | Pixel width of the display |
Height | WORD | Pixel height of the display |
BitsPerPixel | WORD | Bits per pixel |
BytesPerPixel | WORD | Bytes per pixel |
AccelFlags | ACF | Flags describing supported hardware features. |
AmtColours | LONG | Total number of supported colours. |
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 |
Index | LONG | Display mode ID (internal) |
HDensity | LONG | Horizontal pixel density per inch. |
VDensity | LONG | Vertical pixel density per inch. |
Field | Type | Description |
---|---|---|
Next | const struct InputEvent * | Next event in the chain |
Value | DOUBLE | The value associated with the Type |
Timestamp | LARGE | 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 | UBYTE | Right shift value |
GreenShift | UBYTE | Green shift value |
BlueShift | UBYTE | Blue shift value |
AlphaShift | UBYTE | Alpha shift value |
RedMask | UBYTE | The unshifted red mask value (ranges from 0x00 to 0xff) |
GreenMask | UBYTE | The unshifted green mask value (ranges from 0x00 to 0xff) |
BlueMask | UBYTE | The unshifted blue mask value (ranges from 0x00 to 0xff) |
AlphaMask | UBYTE | The unshifted alpha mask value (ranges from 0x00 to 0xff) |
RedPos | UBYTE | Left shift/positional value for red |
GreenPos | UBYTE | Left shift/positional value for green |
BluePos | UBYTE | Left shift/positional value for blue |
AlphaPos | UBYTE | Left shift/positional value for alpha |
Field | Type | Description |
---|---|---|
X | LONG | Horizontal coordinate |
Y | LONG | Vertical coordinate |
Width | LONG | Width |
Height | LONG | Height |
AbsX | LONG | Absolute X |
AbsY | LONG | 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 | LONG | Horizontal coordinate |
Y | LONG | Vertical coordinate |
Width | LONG | Width of the surface area |
Height | LONG | Height of the surface area |
AbsX | LONG | Absolute X coordinate |
AbsY | LONG | Absolute Y coordinate |
Level | WORD | Branch level within the tree |
BitsPerPixel | BYTE | Bits per pixel of the bitmap |
BytesPerPixel | BYTE | Bytes per pixel of the bitmap |
LineWidth | LONG | Line width of the bitmap, in bytes |
Display mode.
Field | Type | Description |
---|---|---|
Width | LONG | Horizontal |
Height | LONG | Vertical |
Depth | LONG | bit depth |