libswami Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy |
gboolean (*SwamiControlQueueTestFunc) (SwamiControlQueue *queue
,SwamiControl *control
,SwamiControlEvent *event
); SwamiControlQueue; SwamiControlQueue * swami_control_queue_new (void
); void swami_control_queue_add_event (SwamiControlQueue *queue
,SwamiControl *control
,SwamiControlEvent *event
); void swami_control_queue_run (SwamiControlQueue *queue
); void swami_control_queue_set_test_func (SwamiControlQueue *queue
,SwamiControlQueueTestFunc test_func
);
gboolean (*SwamiControlQueueTestFunc) (SwamiControlQueue *queue
,SwamiControl *control
,SwamiControlEvent *event
);
A callback function type used to test if an event should be added to a queue. An example of its usage would be a GUI queue which could test to see if the event is being sent within the GUI thread or not.
SwamiControlQueue * swami_control_queue_new (void
);
Create a new control queue object. These are used to queue control events which can then be run at a later time (within a GUI thread for example).
Returns : |
New control queue with a ref count of 1 that the caller owns. |
void swami_control_queue_add_event (SwamiControlQueue *queue
,SwamiControl *control
,SwamiControlEvent *event
);
Adds a control event to a queue. Does not run queue test function this is the responsibility of the caller (for added performance).
|
Swami control queue object |
|
Control to queue an event for |
|
Control event to queue |
void swami_control_queue_run (SwamiControlQueue *queue
);
Process a control event queue by sending queued events to controls.
|
Swami control queue object |
void swami_control_queue_set_test_func (SwamiControlQueue *queue
,SwamiControlQueueTestFunc test_func
);
Set the queue test function which is called for each event added (and should
therefore be fast) to determine if the event should be queued or sent
immediately. Note that swami_control_queue_add_event()
doesn't run the
test function, that is up to the caller (for increased performance).