Bubbles help (with BubbleGEM) Some examples The AV protocol
Programming guideline of WinDom

BubbleGEM and the AV-protocol

When a bubble is drawn on the screen, BubbleGEM application takes the control of AES. If you click a mouse button, or if you hit a key the bubble disapears but as BubbleGEM has get the event, your application don't receive any event (MU_BUTTON event or MU_KEYBD event) but it could be very interesting the application receives these events (to make the application more reactiv from the user point of view). For that purpose, BubbleGEM sent to the application a message:

The application should react by transform these messages in MU_BUTTON event and MU_KEYBD. It can be done in WinDom by sending the AP_BUTTON and AP_KEYBD messages to the application.

Example:

/* Handle the AV_SENDKEY message */

void AvSendKey( void) {
	ApplWrite( app.id, AP_KEYBD, evnt.buff[3], evnt.buff[4]);
}

/* Handle the AV_SENDCLICK message */

void AvSendClick( void) {
	ApplWrite( app.id, AP_BUTTON, evnt.buff[3], evnt.buff[4]);
}

/* in the main part : declare the previous functions */

int main( void) {
	...;

	EvntAttach( NULL, AV_SENDCLICK, AvSendClick);
	EvntAttach( NULL, AV_SENDKEY,   AvSendKey);

	...;
}
Now, your application understands the AV_SENDKEY/BUTTON messages.