Chinaunix首页 | 论坛 | 博客
  • 博客访问: 612640
  • 博文数量: 1958
  • 博客积分: 44693
  • 博客等级: 大将
  • 技术积分: 22125
  • 用 户 组: 普通用户
  • 注册时间: 2011-01-29 15:19
文章分类

全部博文(1958)

文章存档

2012年(560)

2011年(1398)

分类: LINUX

2011-03-17 17:39:50

SDL_Event

Name

SDL_Event -- General event structure

Structure Definition

typedef union{ Uint8 type; //类型 SDL_ActiveEvent active; //激活 SDL_KeyboardEvent key; SDL_MouseMotionEvent motion; SDL_MouseButtonEvent button; SDL_JoyAxisEvent jaxis; SDL_JoyBallEvent jball; SDL_JoyHatEvent jhat; SDL_JoyButtonEvent jbutton; SDL_ResizeEvent resize; SDL_ExposeEvent expose; SDL_QuitEvent quit; SDL_UserEvent user; //SDL_UserEvent 这个类型的。用户定义事件。 SDL_SysWMEvent syswm; } SDL_Event;

Structure Data

type

The type of event

active

Activation event (see )

key

Keyboard event (see )

motion

Mouse motion event (see )

button

Mouse button event (see )

jaxis

Joystick axis motion event (see )

jball

Joystick trackball motion event (see )

jhat

Joystick hat motion event (see )

jbutton

Joystick button event (see )

resize

Application window resize event (see )

expose

Application window expose event (see )

quit

Application quit request event (see )

user

User defined event (see )

syswm

Undefined window manager event (see )

Description

The  union is the core to all event handling in SDL; it's probably the most important structure after .  is a union of all event structures used in SDL, using it is a simple matter of knowing which union member relates to which event type.

Event type

Event Structure

SDL_ACTIVEEVENT

SDL_KEYDOWN/UP

SDL_MOUSEMOTION

SDL_MOUSEBUTTONDOWN/UP

SDL_JOYAXISMOTION

SDL_JOYBALLMOTION

SDL_JOYHATMOTION

SDL_JOYBUTTONDOWN/UP

SDL_VIDEORESIZE

SDL_VIDEOEXPOSE

SDL_QUIT

SDL_USEREVENT

SDL_SYSWMEVENT

阅读(2486) | 评论(0) | 转发(1) |
0

上一篇:SDL_CondWait

下一篇:SDL_UserEvent

给主人留下些什么吧!~~