Manages the display and positioning of 2-Dimensional rendered graphics.
The Surface class is used to manage the positioning, drawing and interaction with layered display interfaces. It works in conjunction with the Bitmap class for rendering graphics, and the Pointer class for user interaction.
On a platform such as Windows or Linux, the top-level surface will typically be hosted in an application window. On Android or when a full screen display is required, a surface can cover the entire display and be window-less. The top-level surface can act as a host to additional surfaces, which are referred to as children. Placing more surface objects inside of these children will create a hierarchy of many objects that requires sophisticated management that is provisioned by the Surface class.
Although pure surface based UI's are possible, clients should always pursue the more simplistic approach of using surfaces to host VectorScene objects that describe vector based interfaces. Doing so is in keeping with our goal of proving fully scalable interfaces to users, and we optimise features with that use-case in mind.
The Surface class consists of the following fields:
Access | Name | Type | Comment | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
AbsX | INT | The absolute horizontal position of a surface object. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This field returns the absolute horizontal position of a surface object. The absolute value is calculated based on the surface object's position relative to the top most surface object in the local hierarchy. It is possible to set this field, but only after initialisation of the surface object has occurred. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
AbsY | INT | The absolute vertical position of a surface object. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This field returns the absolute vertical position of a surface object. The absolute value is calculated based on the surface object's position relative to the top most surface object in the local hierarchy. It is possible to set this field, but only after initialisation of the surface object has occurred. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Align | ALIGN | This field allows you to align a surface area within its owner. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
If you would like to set an abstract position for a surface area, you can give it an alignment. This feature is most commonly used for horizontal and vertical centring, as aligning to the the edges of a surface area is already handled by existing dimension fields. Note that setting the alignment overrides any settings in related coordinate fields. Valid alignment flags are
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
BitsPerPixel | INT | Defines the number of bits per pixel for a surface. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The BitsPerPixel field may be set prior to initialisation in order to force a particular bits-per-pixel setting that may not match the display. This will result in the graphics system converting each pixel when drawing the surface to the display and as such is not recommended. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Bottom | INT | Returns the bottom-most coordinate of a surface object, Y + Height . | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
BottomLimit | INT | Prevents a surface object from moving beyond a given point at the bottom of its container. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
A client can prevent a surface object from moving beyond a given point at the bottom of its container by setting this field. If for example you were to set the BottomLimit to 5, then any attempt to move the surface object into or beyond the 5 units at the bottom of its container would fail. Limits only apply to movement, as induced through the Move() action. This means that limits can be over-ridden by setting the coordinate fields directly (which can be useful in certain cases). | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
BottomMargin | INT | Manipulates the bottom margin of a surface object. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The Surface class supports margin settings, which are similar to the concept of margins on printed paper. Margin values have no significant meaning or effect on a surface object itself, but they are often used by other objects and can be helpful in interface construction. For instance, the Window script uses margins to indicate the space available for placing graphics and other surface objects inside of it. By default, all margins are set to zero when a new surface object is created. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Buffer | OBJECTID | The ID of the bitmap that manages the surface's graphics. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Each surface is assigned a bitmap buffer that is referred to in this field. In many cases the bitmap will be shared between multiple surfaces. A client should avoid interacting with the buffer unless circumstances are such that there are no other means to get access to internal graphics information. Please note that the bitmap object represents an off-screen, temporary buffer. Drawing to the bitmap directly will have no impact on the display. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Colour | RGB8 | String-based field for setting the background colour. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
If the surface object should have a plain background colour, set this field to the colour value that you want to use. The colour must be specified in the standard format of Surface objects that do not have a colour will not be cleared when being drawn. The background will thus consist of 'junk' graphics and the background will need to be drawn using another method. This gives your the power to choose the fastest drawing model to suit your needs. If you set the Colour and later want to turn the background colour off, write a | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Cursor | PTC | A default cursor image can be set here for changing the mouse pointer. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The Cursor field provides a convenient way of setting the pointer's cursor image in a single operation. The mouse pointer will automatically switch to the specified cursor image when it enters the surface area. The available cursor image settings are listed in the Pointer⇒CursorID documentation. The Cursor field may be written with valid cursor names or their ID's, as you prefer.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Dimensions | DMF | Indicates currently active dimension settings. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The dimension settings of a surface object can be read from this field. The flags indicate the dimension fields that are in use, and whether the values are fixed or relative. It is strongly recommended that this field is never set manually, because the flags are automatically managed for the client when setting fields such as X and Width. If circumstances require manual configuration, take care to ensure that the flags do not conflict. For instance,
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Display | OBJECTID | Refers to the Display object that is managing the surface's graphics. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
All surfaces belong to a Display object that manages drawing to the user's video display. This field refers to the Display object of which the surface is a member. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Drag | OBJECTID | This object-based field is used to control the dragging of objects around the display. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Click-dragging of surfaces is enabled by utilising the Drag field. To use, write this field with reference to a Surface that is to be dragged when the user starts a click-drag operation. For instance, if you create a window with a title-bar at the top, you would set the Drag field of the title-bar to point to the object ID of the window. If necessary, you can set the Drag field to point back to your surface object (this can be useful for creating icons and other small widgets). To turn off dragging, set the field to zero. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
DragStatus | DRAG | Indicates the draggable state when dragging is enabled. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
If the surface is draggable, the DragStatus indicates the current state of the surface with respect to it being dragged.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Flags | RNF | Optional flags. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The Flags field allows special options to be set for a surface object. Use a logical-OR operation when setting this field so that existing flags are not overwritten. To not do so can produce unexpected behaviour.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Height | INT | Defines the height of a surface object. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The height of a surface object is manipulated through this field. Alternatively, use the Resize() action to adjust the Width and Height at the same time. A client can set the Height as a fixed value by default, or as a scaled value in conjunction with the Setting the Height while a surface object is on display causes an immediate graphical update to reflect the change. Any objects that are within the surface area will be re-drawn and resized as necessary. If a value less than zero is passed to an initialised surface, the height will be 'turned off' - this is convenient for pairing the Y and YOffset fields together for dynamic height adjustment. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
InsideHeight | INT | Defines the amount of space between the vertical margins. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
A client can determine the internal height of a surface object by reading the InsideHeight field. The returned value is the result of calculating this formula: If the TopMargin and BottomMargin fields are not set, the returned value will be equal to the surface object's height. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
InsideWidth | INT | Defines the amount of space between the horizontal margins. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
A client can determine the internal width of a surface object by reading the InsideWidth field. The returned value is the result of calculating this formula: If the LeftMargin and RightMargin fields are not set, the returned value will be equal to the surface object's width. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
LeftLimit | INT | Prevents a surface object from moving beyond a given point on the left-hand side. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
A client can prevent a surface object from moving beyond a given point at the left-hand side of its container by setting this field. If for example you were to set the LeftLimit to 3, then any attempt to move the surface object into or beyond the 3 units at the left of its container would fail. Limits only apply to movement, as induced through the Move() action. This means it is possible to override limits by setting the coordinate fields directly. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
LeftMargin | INT | Manipulates the left margin of a surface object. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The Surface class supports margin settings, which are similar to the concept of margins on printed paper. Margin values have no significant meaning or effect on a surface object itself, but they are often used by other objects and can be helpful in interface construction. For instance, the Window template uses margins to indicate the space available for placing graphics and other surface objects inside of it. By default, all margins are set to zero when a new surface object is created. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
MaxHeight | INT | Prevents the height of a surface object from exceeding a certain value. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
A client can limit the maximum height of a surface object by setting this field. Limiting the height affects resizing, making it impossible to use the Resize() action to extend beyond the height you specify. It is possible to circumvent the MaxHeight by setting the Height field directly. Note that the MaxHeight value refers to the inside-height of the surface area, thus the overall maximum height will include both the TopMargin and BottomMargin values. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
MaxWidth | INT | Prevents the width of a surface object from exceeding a certain value. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
A client can limit the maximum width of a surface object by setting this field. Limiting the width affects resizing, making it impossible to use the Resize() action to extend beyond the width you specify. It is possible to circumvent the MaxWidth by setting the Width field directly. Note that the MaxWidth value refers to the inside-width of the surface area, thus the overall maximum width will include both the LeftMargin and RightMargin values. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
MinHeight | INT | Prevents the height of a surface object from shrinking beyond a certain value. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
A client can prevent the height of a surface object from shrinking too far by setting this field. This feature specifically affects resizing, making it impossible to use the Resize() action to shrink the height of a surface object to a value less than the one you specify. It is possible to circumvent the MinHeight by setting the Height field directly. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
MinWidth | INT | Prevents the width of a surface object from shrinking beyond a certain value. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
A client can prevent the width of a surface object from shrinking too far by setting this field. This feature specifically affects resizing, making it impossible to use the Resize() action to shrink the width of a surface object to a value less than the one you specify. It is possible to circumvent the MinWidth by setting the Width field directly. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Modal | INT | Sets the surface as modal (prevents user interaction with other surfaces). | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
If | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Movement | INT | Limits the movement of a surface object to vertical or horizontal shifts. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The directions in which a surface object can move can be limited by setting the Movement field. By default, a surface object is capable of moving both horizontally and vertically. This field is only effective in relation to the Move action, and it is possible to circumvent the restrictions by setting the coordinate fields directly.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Opacity | DOUBLE | Affects the level of translucency applied to a surface object. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This field determines the translucency level of a surface area. The default setting is 100%, which means that the surface will be solid. Any other value that you set here will alter the impact of a surface over its destination area. High values will retain the boldness of the graphics, while low values can surface it close to invisible. Note: The translucent drawing routine works by drawing the surface content to its internal buffer first, then copying the graphics that are immediately in the background straight over the top with an alpha-blending routine. This is not always ideal and better results might be obtainable with the pre-copy feature. Please note that the use of translucency is realised at a significant cost to CPU usage. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Parent | OBJECTID | The parent for a surface is defined here. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The parent for child surfaces is defined here. Top level surfaces will have no parent. If the Parent field is not set prior to initialisation, the surface class will attempt to discover a valid parent by checking its ownership chain for a surface object. This behaviour can be switched off by setting a Parent of zero prior to initialisation. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PopOver | OBJECTID | Keeps a surface in front of another surface in the Z order. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Setting the PopOver field to a sibling surface ID will keep the surface in front of its sibling at all times. For dialog windows, it is recommended that the popover and modal options be combined together to prevent interaction with other surfaces created by the current program. Setting the PopOver field to zero will return the surface to its normal state. If an object that does not belong to the Surface class is detected, an attempt will be made to read that object's Surface field, if available. If this does not yield a valid surface then | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Right | INT | Returns the right-most coordinate of a surface object, X + Width . | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RightLimit | INT | Prevents a surface object from moving beyond a given point on the right-hand side. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
A client can prevent a surface object from moving beyond a given point at the right-hand side of its container by setting this field. If for example you were to set the RightLimit to 8, then any attempt to move the surface object into or beyond the 8 units at the right-hand side of its container would fail. Limits only apply to movement, as induced through the Move() action. This means that limits can be over-ridden by setting the coordinate fields directly (which can be useful in certain cases). | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RightMargin | INT | Manipulates the right margin of a surface object. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The Surface class supports margin settings, which are similar to the concept of margins on printed paper. Margin values have no significant meaning or effect on a surface object itself, but they are often used by other objects and can be helpful in interface construction. For instance, the Window template uses margins to indicate the space available for placing graphics and other surface objects inside of it. By default, all margins are set to zero when a new surface object is created. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Root | OBJECTID | Surface that is acting as a root for many surface children (useful when applying translucency) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
TopLimit | INT | Prevents a surface object from moving beyond a given point at the top of its container. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
A client can prevent a surface object from moving beyond a given point at the top of its container by setting this field. If for example you were to set the TopLimit to 10, then any attempt to move the surface object into or beyond the 10 units at the top of its container would fail. Limits only apply to movement, as induced through the Move() action. This means that limits can be over-ridden by setting the coordinate fields directly (which can be useful in certain cases). | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
TopMargin | INT | Manipulates the top margin of a surface object. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The Surface class supports margin settings, which are similar to the concept of margins on printed paper. Margin values have no significant meaning or effect on a surface object itself, but they are often used by other objects and can be helpful in interface construction. For instance, the Window template uses margins to indicate the space available for placing graphics and other surface objects inside of it. By default, all margins are set to zero when a new surface object is created. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
UserFocus | INT | Refers to the surface object that has the current focus. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns the surface object that has the primary user focus. Returns zero if no object has the focus. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Visible | INT | Indicates the visibility of a surface object. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
If you need to know if a surface object is visible or hidden, you can read this field to find out either way. A Visibility is directly affected by the Hide() and Show() actions if you wish to change the visibility of a surface object. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
VisibleHeight | INT | The visible height of the surface area, relative to its parents. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
To determine the visible area of a surface, read the VisibleX, VisibleY, VisibleWidth and VisibleHeight fields. The 'visible area' is determined by the position of the surface relative to its parents. For example, if the surface is 100 pixels across and smallest parent is 50 pixels across, the number of pixels visible to the user must be 50 pixels or less, depending on the position of the surface. If none of the surface area is visible then zero is returned. The result is never negative. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
VisibleWidth | INT | The visible width of the surface area, relative to its parents. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
To determine the visible area of a surface, read the VisibleX, VisibleY, VisibleWidth and VisibleHeight fields. The 'visible area' is determined by the position of the surface relative to its parents. For example, if the surface is 100 pixels across and smallest parent is 50 pixels across, the number of pixels visible to the user must be 50 pixels or less, depending on the position of the surface. If none of the surface area is visible then zero is returned. The result is never negative. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
VisibleX | INT | The first visible X coordinate of the surface area, relative to its parents. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
To determine the visible area of a surface, read the VisibleX, VisibleY, VisibleWidth and VisibleHeight fields. The 'visible area' is determined by the position of the surface relative to its parents. For example, if the surface is 100 pixels across and smallest parent is 50 pixels across, the number of pixels visible to the user must be 50 pixels or less, depending on the position of the surface. If none of the surface area is visible then zero is returned. The result is never negative. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
VisibleY | INT | The first visible Y coordinate of the surface area, relative to its parents. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
To determine the visible area of a surface, read the VisibleX, VisibleY, VisibleWidth and VisibleHeight fields. The 'visible area' is determined by the position of the surface relative to its parents. For example, if the surface is 100 pixels across and smallest parent is 50 pixels across, the number of pixels visible to the user must be 50 pixels or less, depending on the position of the surface. If none of the surface area is visible then zero is returned. The result is never negative. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Width | INT | Defines the width of a surface object. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The width of a surface object is manipulated through this field. Alternatively, use the Resize() action to adjust the Width and Height at the same time. A client can set the Width as a fixed value by default, or as a scaled value in conjunction with the Setting the Width while a surface object is on display causes an immediate graphical update to reflect the change. Any objects that are within the surface area will be re-drawn and resized as necessary. Width values of 0 or less are illegal, and will result in an | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
WindowHandle | APTR | Refers to a surface object's window handle, if relevant. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This field refers to the window handle of a surface object, but only if such a thing is relevant to the platform that the system is running on. Currently, this field is only usable when creating a primary surface object within an X11 window manager or Microsoft Windows. It is possible to set the WindowHandle field prior to initialisation if you want a surface object to be based on a window that already exists. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
WindowType | INT | Indicator for surfaces that represent themselves as a desktop window. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This field affects a surface's status on hosted desktops such as Windows and X11. It only affects top-level surfaces that have no parent - child surfaces ignore this field. Surfaces created in the desktop area will also ignore this field, as the desktop is treated as a parent. It is the responsibility of the developer to provide window gadgets such as titlebars and set the resize borders for custom surfaces.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
X | INT | Determines the horizontal position of a surface object. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The horizontal position of a surface object can be set through this field. You have the choice of setting a fixed coordinate (the default) or a scaled coordinate if you use the If you set the X while the surface object is on display, the position of the surface area will be updated immediately. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
XOffset | INT | Determines the horizontal offset of a surface object. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The XOffset has a dual purpose depending on whether or not it is set in conjunction with the X or Width fields. If set in conjunction with the X field, the width of the surface object will be from that X coordinate up to the width of the container, minus the value given in the XOffset. This means that the width of the surface object is dynamically calculated in relation to the width of its container. If the XOffset field is set in conjunction with a fixed or scaled width then the surface object will be positioned at an X coordinate calculated from the formula | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Y | INT | Determines the vertical position of a surface object. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The vertical position of a surface object can be set through this field. You have the choice of setting a fixed coordinate (the default) or a scaled coordinate if you use the If the value is changed while the surface is on display, its position will be updated immediately. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
YOffset | INT | Determines the vertical offset of a surface object. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The YOffset has a dual purpose depending on whether or not it is set in conjunction with the Y or Height fields. If set in conjunction with the Y field, the height of the surface object will be from that Y coordinate up to the height of the container, minus the value given in the YOffset. This means that the height of the surface object is dynamically calculated in relation to the height of its container. If the YOffset field is set in conjunction with a fixed or scaled height then the surface object will be positioned at a Y coordinate calculated from the formula |
The following actions are currently supported:
Name | Comment | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Activate | Shows a surface object on the display. | |||||||||||||||
Disable | Disables a surface object. | |||||||||||||||
Draw | Redraws the contents of a surface object. | |||||||||||||||
ERR acDraw(*Object, DOUBLE X, DOUBLE Y, DOUBLE Width, DOUBLE Height)
Calling the Draw action on a surface object will send redraw messages to every hook that has been attached to the surface object's drawing system. This has the effect of redrawing all graphics within the surface object. The procedure is as follows:
Please be aware that:
| ||||||||||||||||
Enable | Enables a disabled surface object. | |||||||||||||||
Focus | Changes the primary user focus to the surface object. | |||||||||||||||
Hide | Hides a surface object from the display. | |||||||||||||||
LostFocus | Informs a surface object that it has lost the user focus. | |||||||||||||||
Move | Moves a surface object to a new display position. | |||||||||||||||
ERR acMove(*Object, DOUBLE DeltaX, DOUBLE DeltaY, DOUBLE DeltaZ)
| ||||||||||||||||
MoveToBack | Moves a surface object to the back of its container. | |||||||||||||||
MoveToFront | Moves a surface object to the front of its container. | |||||||||||||||
MoveToPoint | Moves a surface object to an absolute coordinate. | |||||||||||||||
ERR acMoveToPoint(*Object, DOUBLE X, DOUBLE Y, DOUBLE Z, MTF Flags)
| ||||||||||||||||
Redimension | Moves and resizes a surface object in a single action call. | |||||||||||||||
ERR acRedimension(*Object, DOUBLE X, DOUBLE Y, DOUBLE Z, DOUBLE Width, DOUBLE Height, DOUBLE Depth)
| ||||||||||||||||
Resize | Alters the dimensions of a surface object. | |||||||||||||||
ERR acResize(*Object, DOUBLE Width, DOUBLE Height, DOUBLE Depth)
| ||||||||||||||||
SaveImage | Saves the graphics of a surface object. | |||||||||||||||
ERR acSaveImage(*Object, OBJECTID Dest, CLASSID ClassID)
To store the rendered image of a surface object, use the SaveImage() action. Calling SaveImage() on a surface object will cause it to render an image of its contents and save them to the given destination object. Any child surfaces in the region will also be included in the resulting image data. The image data will be saved in the data format that is indicated by the setting in the | ||||||||||||||||
Show | Shows a surface object on the display. |
The following methods are currently supported:
Name | Comment | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
AddCallback | Inserts a function hook into the drawing process of a surface object. | ||||||||||||||||||||||||||
ERR drw::AddCallback(OBJECTPTR Object, FUNCTION * Callback)
The AddCallback() method provides a hook for custom functions to draw directly to a surface. Whenever a surface object performs a redraw event, all functions inserted by this method will be called in their original subscription order with a direct reference to the Surface's target bitmap. The C/C++ prototype is The Fluid prototype is The subscriber can draw to the bitmap surface as it would with any freshly allocated bitmap object (refer to the Bitmap class). To get the width and height of the available drawing space, please read the Width and Height fields from the Surface object. If writing to the bitmap directly, please observe the bitmap's clipping region and the XOffset and YOffset values. Error Codes
| |||||||||||||||||||||||||||
ExposeToDisplay | Redraws a surface region to the display, preferably from its graphics buffer. | ||||||||||||||||||||||||||
ERR drw::ExposeToDisplay(OBJECTPTR Object, LONG X, LONG Y, LONG Width, LONG Height, EXF Flags)
Call the ExposeToDisplay() method to copy a surface region to the display. The functionality is identical to that of the ExposeSurface() function. Please refer to it for further documentation. Error Codes
| |||||||||||||||||||||||||||
InvalidateRegion | Redraws all of the content in a surface object. | ||||||||||||||||||||||||||
ERR drw::InvalidateRegion(OBJECTPTR Object, LONG X, LONG Y, LONG Width, LONG Height)
Invalidating a surface object will cause everything within a specified area to be redrawn. This includes child surface objects that intersect with the area that you have specified. Parent regions that overlap are not included in the redraw. To quickly redraw an entire surface object's content, call this method directly without supplying an argument structure. If you want to redraw a surface object and ignore all of its surface children then you should use the Draw action instead of this method. If you want to refresh a surface area to the display then you should use the ExposeToDisplay() method instead. Exposing will use the graphics buffer to refresh the graphics, thus avoiding the speed loss of a complete redraw. Error Codes
| |||||||||||||||||||||||||||
Minimise | For hosted surfaces only, this method will minimise the surface to an icon. | ||||||||||||||||||||||||||
ERR drw::Minimise(OBJECTPTR Object) If a surface is hosted in a desktop window, calling the Minimise() method will perform the default minimise action on that window. On a platform such as Microsoft Windows, this would normally result in the window being minimised to the task bar. Calling Minimise() on a surface that is already in the minimised state may result in the host window being restored to the desktop. This behaviour is platform dependent and should be manually tested to confirm its reliability on the host platform. | |||||||||||||||||||||||||||
RemoveCallback | Removes a callback previously inserted by AddCallback(). | ||||||||||||||||||||||||||
ERR drw::RemoveCallback(OBJECTPTR Object, FUNCTION * Callback)
The RemoveCallback() method is used to remove any callback that has been previously inserted by AddCallback(). This method is scope restricted, meaning that callbacks added by other objects will not be affected irrespective of the parameters that are passed to it. Error Codes
| |||||||||||||||||||||||||||
ResetDimensions | Changes the dimensions of a surface. | ||||||||||||||||||||||||||
ERR drw::ResetDimensions(OBJECTPTR Object, DOUBLE X, DOUBLE Y, DOUBLE XOffset, DOUBLE YOffset, DOUBLE Width, DOUBLE Height, DMF Dimensions)
The ResetDimensions() method provides a simple way of re-declaring the dimensions of a surface object. This is sometimes necessary when a surface needs to make a significant alteration to its display configuration. For instance if the width of the surface is declared through a combination of It is not necessary to define a value for every parameter - only the ones that are relevant to the new dimension settings. For instance if Error Codes
| |||||||||||||||||||||||||||
ScheduleRedraw | Schedules a redraw operation for the next frame. | ||||||||||||||||||||||||||
ERR drw::ScheduleRedraw(OBJECTPTR Object) Use ScheduleRedraw to indicate that a surface needs to be drawn to the display. The surface and all child surfaces will be drawn on the next frame cycle (typically 1/60th of a second). All manual draw operations for the target surface are ignored until the scheduled operation is completed. Scheduling is ideal in situations where a cluster of redraw events may occur within a tight time period, and it would be inefficient to draw those changes to the display individually. Note that redraw schedules do not 'see each other', meaning if a surface and a child are both scheduled, this will trigger two redraw operations when one would suffice. It is the client's responsibility to target the most relevant top-level surface for scheduling. Error Codes
| |||||||||||||||||||||||||||
SetDisplay | Changes the screen resolution (applies to top-level surface objects only). | ||||||||||||||||||||||||||
ERR drw::SetDisplay(OBJECTPTR Object, LONG X, LONG Y, LONG Width, LONG Height, LONG InsideWidth, LONG InsideHeight, LONG BitsPerPixel, DOUBLE RefreshRate, LONG Flags)
The SetDisplay method is used to change the screen resolution of the top-level surface object (which represents the screen display). It allows you to set the size of the display and you may also change the bitmap depth and the monitor's refresh rate. If successful, the change is immediate. This method exercises some intelligence in adjusting the display to your requested settings. For instance, if the requested width and/or height is not available, the closest display setting will be chosen. This method does not work on anything other than top-level surface objects. The current top-level surface object is usually named "SystemSurface" by default and can be searched for by that name. Error Codes
| |||||||||||||||||||||||||||
SetOpacity | Alters the opacity of a surface object. | ||||||||||||||||||||||||||
ERR drw::SetOpacity(OBJECTPTR Object, DOUBLE Value, DOUBLE Adjustment)
This method will change the opacity of the surface and execute a redraw to make the changes to the display. Error Codes
|
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. |
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. |
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 |
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. |
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. |
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 | 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 |
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. |
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 |
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 |
Class Info | |
---|---|
ID | ID_SURFACE |
Category | GUI |
Include | modules/surface.h |
Version | 1 |