Parcourir la source

* Put back all the shit in struct caca_event to avoid breaking existing

applications. I'll think of a migration path later.
tags/v0.99.beta14
Sam Hocevar sam il y a 17 ans
Parent
révision
725f29ee8e
1 fichiers modifiés avec 19 ajouts et 11 suppressions
  1. +19
    -11
      caca/caca.h

+ 19
- 11
caca/caca.h Voir le fichier

@@ -46,17 +46,6 @@ typedef struct caca_display caca_display_t;
/** \e libcaca event structure */
typedef struct caca_event caca_event_t;

/** \brief Handling of user events.
*
* This structure is filled by caca_get_event() when an event is received.
* It is an opaque structure that should only be accessed through
* caca_event_get_type() and similar functions.
*/
struct caca_event
{
unsigned char opaque_structure[32];
};

/** \brief User event type enumeration.
*
* This enum serves two purposes:
@@ -78,6 +67,25 @@ enum caca_event_type
CACA_EVENT_ANY = 0xffff /**< Bitmask for any event. */
};

/** \brief Handling of user events.
*
* This structure is filled by caca_get_event() when an event is received.
* It is an opaque structure that should only be accessed through
* caca_event_get_type() and similar functions. The struct members may no
* longer be directly accessible in future versions.
*/
struct caca_event
{
enum caca_event_type type;
union
{
struct { unsigned int x, y, button; } mouse;
struct { unsigned int w, h; } resize;
struct { unsigned int ch; unsigned long int utf32; char utf8[8]; } key;
} data;
unsigned char padding[16];
};

/** \brief Special key values.
*
* Special key values returned by caca_get_event() for which there is no


Chargement…
Annuler
Enregistrer