GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  AL_EMIT_USER_EVENT (3)

NAME

al_emit_user_event - Allegro 5 API

CONTENTS

Synopsis
Description
See Also

SYNOPSIS

C]
#include <allegro5/allegro.h>

bool al_emit_user_event(ALLEGRO_EVENT_SOURCE *src, ALLEGRO_EVENT *event, void (*dtor)(ALLEGRO_USER_EVENT *)) ]

DESCRIPTION

Emit a user event. The event source must have been initialised with al_init_user_event_source(3). Returns C]false] if the event source isn[aq]t registered with any queues, hence the event wouldn[aq]t have been delivered into any queues.

Events are I]copied] in and out of event queues, so after this function returns the memory pointed to by C]event] may be freed or reused. Some fields of the event being passed in may be modified by the function.

Reference counting will be performed if C]dtor] is not NULL. Whenever a copy of the event is made, the reference count increases. You need to call al_unref_user_event(3) to decrease the reference count once you are done with a user event that you have received from al_get_next_event(3), al_peek_next_event(3), al_wait_for_event(3), etc.

Once the reference count drops to zero C]dtor] will be called with a copy of the event as an argument. It should free the resources associated with the event, but I]not] the event itself (since it is just a copy).

If C]dtor] is NULL then reference counting will not be performed. It is safe, but unnecessary, to call al_unref_user_event(3) on non-reference counted user events.

SEE ALSO

ALLEGRO_USER_EVENT(3), al_unref_user_event(3)

Search for    or go to Top of page |  Section 3 |  Main Index


Allegro reference manual AL_EMIT_USER_EVENT (3)

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.