libswami Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy |
void (*SwamiControlFuncDestroy) (SwamiControlFunc *control
); SwamiControlFunc; #define SWAMI_CONTROL_FUNC_DATA (ctrl) SwamiControlFunc * swami_control_func_new (void
); void swami_control_func_assign_funcs (SwamiControlFunc *ctrlfunc
,SwamiControlGetValueFunc get_func
,SwamiControlSetValueFunc set_func
,SwamiControlFuncDestroy destroy_func
,gpointer user_data
);
GObject +----SwamiLock +----SwamiControl +----SwamiControlFunc +----SwamiControlMidi
void (*SwamiControlFuncDestroy) (SwamiControlFunc *control
);
A function to call when the function control is destroyed or when the
function callbacks are changed. This function should handle all cleanup
for the callback functions. This function is called with control
multi-thread write locked.
|
Function control object |
#define SWAMI_CONTROL_FUNC_DATA(ctrl) (SWAMI_CONTROL_FUNC (ctrl)->user_data)
SwamiControlFunc * swami_control_func_new (void
);
Create a new function callback control. Function controls are useful for easily creating custom controls using callback functions.
Returns : |
New function control with a refcount of 1 which the caller owns. |
void swami_control_func_assign_funcs (SwamiControlFunc *ctrlfunc
,SwamiControlGetValueFunc get_func
,SwamiControlSetValueFunc set_func
,SwamiControlFuncDestroy destroy_func
,gpointer user_data
);
Assigns callback functions to a Swami function control object.
These callback functions should handle the getting and setting of the
control's value. The value passed to these callback functions is initialized
to the type of the control's parameter spec and this type should not be
changed. The destroy_func
callback is called when the control is destroyed
or when the callback functions are changed and should do any needed cleanup.
The control is not locked for any of these callbacks and so must be done
in the callback if there are any thread sensitive operations.
|
Swami function control object |
|
Function to call to get control value or NULL if not a readable
value control (may still send events)
|
|
Function to call to set control value or NULL if not a writable
value control
|
|
Function to call when control is destroyed or function
callbacks are changed or NULL if no cleanup is needed.
|
|
User defined pointer (set in ctrlfunc instance).
|