Name
hw_PostSatelliteEvent -- post a satellite event to queue (V5.2)
Synopsis
void hw_PostSatelliteEvent(APTR handle, int type, APTR typedata);
Function
This function posts an event that has happened in a display satellite to the satellite's root display. You have to pass the satellite handle as returned by hw_AttachDisplaySatellite() in parameter 1 and the event type and its data in parameters 2 and 3. The following event types are currently supported:

HWSATEVT_MOUSEMOVE:
This event indicates that the mouse has been moved in the display satellite. You need to pass a pointer to a struct hwSatelliteEventMouse in typedata. The structure looks like this:

 
struct hwSatelliteEventMouse
{
    int MouseX;
    int MouseY;
    int ButtonDown;
};

The following members need to be initialized for HWSATEVT_MOUSEMOVE:

MouseX:
This must be set to the mouse cursor's current x position, relative to the upper-left corner of the display satellite.

MouseY:
This must be set to the mouse cursor's current y position, relative to the upper-left corner of the display satellite.

HWSATEVT_LEFTMOUSE:
This event indicates that the left mouse button has been pressed or released in the display satellite. You need to pass a pointer to a struct hwSatelliteEventMouse in typedata. The structure looks like this:

 
struct hwSatelliteEventMouse
{
    int MouseX;
    int MouseY;
    int ButtonDown;
};

The following members need to be initialized for HWSATEVT_LEFTMOUSE:

MouseX:
This must be set to the mouse cursor's current x position, relative to the upper-left corner of the display satellite.

MouseY:
This must be set to the mouse cursor's current y position, relative to the upper-left corner of the display satellite.

ButtonDown:
This must be set to True or False depending on whether the left mouse button is down or not.

HWSATEVT_RIGHTMOUSE:
This event indicates that the right mouse button has been pressed or released in the display satellite. You need to pass a pointer to a struct hwSatelliteEventMouse in typedata. The structure looks like this:

 
struct hwSatelliteEventMouse
{
    int MouseX;
    int MouseY;
    int ButtonDown;
};

The following members need to be initialized for HWSATEVT_RIGHTMOUSE:

MouseX:
This must be set to the mouse cursor's current x position, relative to the upper-left corner of the display satellite.

MouseY:
This must be set to the mouse cursor's current y position, relative to the upper-left corner of the display satellite.

ButtonDown:
This must be set to True or False depending on whether the right mouse button is down or not.

HWSATEVT_MIDMOUSE:
This event indicates that the middle mouse button has been pressed or released in the display satellite. You need to pass a pointer to a struct hwSatelliteEventMouse in typedata. The structure looks like this:

 
struct hwSatelliteEventMouse
{
    int MouseX;
    int MouseY;
    int ButtonDown;
};

The following members need to be initialized for HWSATEVT_MIDMOUSE:

MouseX:
This must be set to the mouse cursor's current x position, relative to the upper-left corner of the display satellite.

MouseY:
This must be set to the mouse cursor's current y position, relative to the upper-left corner of the display satellite.

ButtonDown:
This must be set to True or False depending on whether the middle mouse button is down or not.

HWSATEVT_MOUSEWHEEL:
This event indicates that the mouse wheel has been rotated in the display satellite. You need to pass a pointer to a struct hwSatelliteEventMouse in typedata. The structure looks like this:

 
struct hwSatelliteEventMouse
{
    int MouseX;
    int MouseY;
    int ButtonDown;
};

The following members need to be initialized for HWSATEVT_LEFTMOUSE:

MouseX:
This must be set to the mouse cursor's current x position, relative to the upper-left corner of the display satellite.

MouseY:
This must be set to the mouse cursor's current y position, relative to the upper-left corner of the display satellite.

ButtonDown:
This must be set to True if the wheel has been spinned downwards or False if it has been spinned in upwards direction.

HWSATEVT_KEYBOARD:
A keyboard event has occurred in the display satellite. You need to pass a pointer to a struct hwSatelliteEventKeyboard in typedata. The structure looks like this:

 
struct hwSatelliteEventKeyboard
{
    int KeyID;
    int KeyDown;
    ULONG Qualifiers;
};

The individual structure members need to be initialized like this:

KeyID:
This must be set to the identifier of the key this event is referring to. This can be either the 8-bit character code of a ISO 8859-1 key or one of the following special keys:

 
HWKEY_CURSOR_UP
HWKEY_CURSOR_DOWN
HWKEY_CURSOR_RIGHT
HWKEY_CURSOR_LEFT
HWKEY_HELP
HWKEY_F1
HWKEY_F2
HWKEY_F3
HWKEY_F4
HWKEY_F5
HWKEY_F6
HWKEY_F7
HWKEY_F8
HWKEY_F9
HWKEY_F10
HWKEY_F11
HWKEY_F12
HWKEY_F13
HWKEY_F14
HWKEY_F15
HWKEY_F16
HWKEY_BACKSPACE
HWKEY_TAB
HWKEY_ENTER
HWKEY_RETURN
HWKEY_ESC
HWKEY_SPACE
HWKEY_DEL
HWKEY_INSERT
HWKEY_HOME
HWKEY_END
HWKEY_PAGEUP
HWKEY_PAGEDOWN
HWKEY_PRINT
HWKEY_PAUSE

KeyDown:
This must be set to either True or False indicating whether the specified key is currently pressed.

Qualifiers:
This must be set to a combination of qualifiers like shift and alt that are currently pressed. See GetQualifiers for a list of available qualifiers. Don't forget that the internal control bit HWKEY_QUAL_MASK must always be set.

Note that HWSATEVT_KEYBOARD can only be used for ISO 8859-1 characters and control keys. To post a Unicode key to the satellite's root display, use HWSATEVT_VANILLAKEY instead (see below for details).

HWSATEVT_RAWKEY:
A raw keyboard event has occurred in the display satellite. You need to pass a pointer to a struct hwSatelliteEventKeyboard in typedata. The structure looks like this:

 
struct hwSatelliteEventKeyboard
{
    int KeyID;
    int KeyDown;
    ULONG Qualifiers;
};

The individual structure members need to be initialized like this:

KeyID:
This must be set to the identifier of the key this event is referring to. This can be one of the HWKEY_XXX keys listed above in HWSATEVT_KEYBOARD, the ASCII codes A-Z and 0-9 or one of the following special raw keys:

 
HWKEY_NP0
HWKEY_NP1
HWKEY_NP2
HWKEY_NP3
HWKEY_NP4
HWKEY_NP5
HWKEY_NP6
HWKEY_NP7
HWKEY_NP8
HWKEY_NP9
HWKEY_NPMUL
HWKEY_NPADD
HWKEY_NPSUB
HWKEY_NPDEC
HWKEY_NPDIV
HWKEY_LSHIFT
HWKEY_RSHIFT
HWKEY_LALT
HWKEY_RALT
HWKEY_LCOMMAND
HWKEY_RCOMMAND
HWKEY_LCONTROL
HWKEY_RCONTROL

KeyDown:
This must be set to either True or False indicating whether the specified key is currently pressed.

Qualifiers:
This must be set to a combination of qualifiers like shift and alt that are currently pressed. See GetQualifiers for a list of available qualifiers. Don't forget that the internal control bit HWKEY_QUAL_MASK must always be set.

(V7.1)

HWSATEVT_VANILLAKEY:
Post a Unicode key event to the satellite's root display. In contrast to HWSATEVT_KEYBOARD, HWSATEVT_VANILLAKEY must only be used to post printable characters (including the space character). It must not be used for control keys. These should be posted as HWSATEVT_KEYBOARD events only (see above for details). In contrast to HWSATEVT_KEYBOARD, HWSATEVT_VANILLAKEY supports the full Unicode character range. You need to pass a pointer to a struct hwSatelliteEventKeyboard in typedata. The structure looks like this:

 
struct hwSatelliteEventKeyboard
{
    int KeyID;
    int KeyDown;
    ULONG Qualifiers;
};

The individual structure members need to be initialized like this:

KeyID:
This must be set to the Unicode character code of the key event you want to post.

KeyDown:
This is ignored for HWSATEVT_VANILLAKEY.

Qualifiers:
This is ignored for HWSATEVT_VANILLAKEY.

(V7.0)

HWSATEVT_DROPFILE:
This event can be used to post an event to the satellite's root display which indicates that files have been dropped on a display satellite. You need to pass a pointer to a struct hwSatelliteEventDropFile in typedata. The structure looks like this:

 
struct hwSatelliteEventDropFile
{
    int MouseX;
    int MouseY;
    STRPTR DropFiles;
};

The individual structure members need to be initialized like this:

MouseX:
This must be set to the x-coordinate (relative to the satellite's upper-left corner) where the user dropped the file(s).

MouseY:
This must be set to the y-coordinate (relative to the satellite's upper-left corner) where the user dropped the file(s).

DropFiles:
This must be set to a list of filenames that have been dropped on the satellite. The individual filenames need to contain fully qualified paths and must be separated from one another by a single NULL terminator byte whereas the complete list is terminated by two NULL terminator bytes to signal the list end to Hollywood.

(V7.0)

See hw_AttachDisplaySatellite for more information on display satellites.

Designer compatibility
Unsupported

Inputs
handle
display satellite handle allocated by hw_AttachDisplaySatellite()
type
type of event to post (see above)
typedata
event-dependent data (see above)

Show TOC