GEOS SDK TechDocs
|
|
3 Exported Message Ranges
|
3.2 Input Messages
Because many objects, both Generic UI objects and others, work together to control the behavior of the system windows, a number of messages have been set up in an exported range so that they may be shared among classes.
The following messages are sent to objects responsible for updating views, and if you subclass content objects, you may wish to intercept these messages.
@importMessage MetaWindowMessages, void MSG_META_EXPOSED(
WindowHandle win);
This message is sent to a Window's exposure object any time a portion of the window is visible on screen, has become invalid, and needs to be redrawn. Correct response is to create a GState on the passed window, call
GrBeginUpdate()
with it, redraw the window, and finish by calling
GrEndUpdate()
and freeing the GState. Drawing will be clipped to the invalid area of the window at the time that
GrBeginUpdate()
is called. Invalidations occurring during the redraw will result in the reduction in the size of the update region, and result in another
MSG_META_EXPOSED
being generated, to repair the new "invalid" area.
Source: Window system.
Destination: Individual window's exposure object; View's output descriptor.
Interception: Required, in order for window to be properly updated. Note that
VisContentClass
provides default handler which creates GState, calls
GrBeginUpdate()
, calls
MSG_VIS_DRAW
on itself, then calls
GrEndUpdate()
.
Parameters:
win
Window handle which may be passed to
GrCreateGState()
.
Return: Nothing.
The following messages are part of the high level windowing mechanism. Most of these messages are passed around at the GenSystem level, and most object classes defined by applications will not intercept them. Instead, system objects will intercept these messages and pass appropriate messages on to application objects.
@importMessage MetaWindowMessages, void MSG_META_WIN_CHANGE();
Sent to the System Input Object (Normally the UI's GenSystem obj), when the pointer position, as passed to the window system in calls to
WinMovePtr()
, has possibly moved outside of the window that it was in. The object should respond by calling
WinChangeAck()
, which will cause enter and leave events to be generated for all windows affected by the pointer's change.
Source: Window system (
WinMovePtr()
).
Destination: System Input object (usually the GenSystem object).
Interception: Must be handled via call to
WinChangeAck()
.
Parameters: None.
Return: Nothing.
@importMessage MetaWindowMessages, void MSG_META_IMPLIED_WIN_CHANGE(
optr inputObj,
WindowHandle ptrWin);
Sent to the System Input Object (Normally the UI's GenSystem obj) in response to a call to
WinChangeAck()
, to inform it which window the mouse has moved into. The system input object is responsible for passing this message on to the Input object of affected geodes.
Source: Window system (
WinChageAck()
).
Destination: Initially System Input Object (usually the
GenSystemClass
object), though is relayed on to Geode Input Object (usually a
GenApplicationClass
object).
Interception: May be intercepted to learn when an implied window change has occurred, but subclasses should not change any default functionality.
Parameters: inputObj Window which has implied grab (or zero if there is no implied grab).
Return: Nothing.
@importMessage MetaWindowMessages, void MSG_META_RAW_UNIV_ENTER(
optr inputObj,
WindowHandle ptrWin);
This message is generated by the window system whenever the mouse crosses into a window. This message is sent to the window's input object. This is sent whenever the mouse pointer crosses a window boundary, regardless of any existing window grab.
Source: Window system (
WinChangeAck()
).
Destination: Initially System input object (usually the
GenSystemClass
object), though is relayed on to Geode Input Object (usually a
GenApplicationClass
object), and finally onto individual Window's Input Object.
Interception: May be intercepted to track current status of whether mouse is within window or not. Specific UIs rely on these messages to control auto-raise, click-to-raise arming, and correct implied and active mouse grab interaction behavior.
Parameters: inputObj Input Object of window method refers to.
Return: Nothing.
@importMessage MetaWindowMessages, void MSG_META_RAW_UNIV_LEAVE(
optr inputObj,
WindowHandle ptrWin);
This message is generated by the window system whenever the mouse crosses out of a window. This message is sent to the window's input object. This is sent whenever the mouse pointer crosses a window boundary, regardless of any existing window grab.
Source: Window system (
WinChangeAck()
).
Destination: Initially System Input Object (usually the
GenSystemClass
object), though is relayed on to Geode Input Object (usually a
GenApplicationClass
object), and finally onto individual Window's Input Object.
Interception: May be intercepted to track current status of whether mouse is within window or not. Specific UIs rely on these messages to control auto-raise, click-to-raise arming, and correct implied and active mouse grab interaction behavior.
Parameters: inputObj Input Object of window method refers to.
Return: Nothing.
GEOS SDK TechDocs
|
|
3 Exported Message Ranges
|
3.2 Input Messages