Reference Manual - 1.0.1
DirectFB Interfaces   IDirectFBEventBuffer

No summary yet...

Methods of IDirectFBEventBuffer

Buffer handling

缓冲处理

Reset

Clear all events stored in this buffer.

清除掉指定缓冲区内的所有事件

Waiting for events

事件等待

WaitForEvent

Wait for the next event to occur. Thread is idle in the meantime.

等待下一个事件的出现,此时,线程是空闲的

WaitForEventWithTimeout

Block until next event to occur or timeout is reached. Thread is idle in the meantime.

阻塞至下一个事件的出现或则超时,此时,线程是空闲的

Fetching events

得到事件

GetEvent

Get the next event and remove it from the FIFO.

取得下一个事件,并把这个事件从FIFO队列中移出

PeekEvent

Get the next event but leave it there, i.e. do a preview.

仅仅取得下一个事件,像事先察看一样

HasEvent

Check if there is a pending event in the queue. This function returns DFB_OK if there is at least one event, DFB_BUFFER_EMPTY otherwise.

察看队列中是否有未处理的事件存在,如果有哪怕一个,就会返回DFB_OK状态值,否则返回DFB_BUFFER_EMPTY状态值。

Sending events

发送事件

PostEvent

Put an event into the FIFO.

以邮寄方式把一个事件发送到FIFO队列中。

WakeUp

Wake up any thread waiting for events in this buffer.

唤醒缓冲区内在等待事件的线程。此方法会引起WaitForEventWaitForEventWithTimeout的调用,和通过发送消息来唤醒等待事件线程相比,此方法适用性更大,它不会污染FIFO队列,且cpu和内存消耗也会小一些。

Special handling

CreateFileDescriptor

Create a file descriptor for reading events.

为读取事件创建一个文件描述符

Statistics

EnableStatistics

Enable/disable collection of event buffer statistics.

收集事件缓冲表的使能

GetStatistics

Query collected event buffer statistics.

查询事件缓冲的收集统计

Creative Commons License This work is licensed under a Creative Commons Attribution-Share Alike 3.0 License