瀏覽代碼

* 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 17 年之前
父節點
當前提交
725f29ee8e
共有 1 個檔案被更改,包括 19 行新增11 行删除
  1. +19
    -11
      caca/caca.h

+ 19
- 11
caca/caca.h 查看文件

@@ -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


Loading…
取消
儲存