ALLEGRO_USER_EVENT man page on DragonFly

Man page or keyword search:  
man Server   44335 pages
apropos Keyword Search (all sections)
Output format
DragonFly logo
[printable version]

ALLEGRO_USER_EVENT(3)					 ALLEGRO_USER_EVENT(3)

NAME
       ALLEGRO_USER_EVENT - Allegro 5 API

SYNOPSIS
	      #include <allegro5/allegro.h>

	      typedef struct ALLEGRO_USER_EVENT ALLEGRO_USER_EVENT;

DESCRIPTION
       An  event  structure  that can be emitted by user event sources.	 These
       are the public fields:

       · ALLEGRO_EVENT_SOURCE *source;

       · intptr_t data1;

       · intptr_t data2;

       · intptr_t data3;

       · intptr_t data4;

       Like all other event types this	structure  is  a  part	of  the	 ALLE‐
       GRO_EVENT union.	 To access the fields in an ALLEGRO_EVENT variable ev,
       you would use:

       · ev.user.source

       · ev.user.data1

       · ev.user.data2

       · ev.user.data3

       · ev.user.data4

       To create a new user event you would do this:

	      ALLEGRO_EVENT_SOURCE my_event_source;
	      ALLEGRO_EVENT my_event;
	      float some_var;

	      al_init_user_event_source(&my_event_source);

	      my_event.user.type = ALLEGRO_GET_EVENT_TYPE('M','I','N','E');
	      my_event.user.data1 = 1;
	      my_event.user.data2 = &some_var;

	      al_emit_user_event(&my_event_source, &my_event, NULL);

       Event type identifiers for  user	 events	 are  assigned	by  the	 user.
       Please  see  the	 documentation	for  ALLEGRO_GET_EVENT_TYPE(3) for the
       rules you should follow when assigning identifiers.

SEE ALSO
       al_emit_user_event(3), ALLEGRO_GET_EVENT_TYPE(3)

Allegro reference manual				 ALLEGRO_USER_EVENT(3)
[top]

List of man pages available for DragonFly

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net