![]() |
![]() |
![]() |
Grits Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
void (*GritsCallbackFunc) (GritsCallback *callback
,GritsOpenGL *opengl
,gpointer user_data
); struct GritsCallback; struct GritsCallbackClass; GritsCallback * grits_callback_new (GritsCallbackFunc draw_cb
,gpointer user_data
);
GritsCallback objects are used for custom drawing functions. A common example of this would be to render something which does not easily fit into a normal object. For instance, a Heads-Up-Display overlay.
Callbacks are an alternate to extending GritsObject with a new class and should be used when only once instance of the object will be needed.
void (*GritsCallbackFunc) (GritsCallback *callback
,GritsOpenGL *opengl
,gpointer user_data
);
A function to be called when the callback object is being rendered
|
the callback object to be drawn |
|
the user data associated with the callback |
GritsCallback * grits_callback_new (GritsCallbackFunc draw_cb
,gpointer user_data
);
Create a GritsCallback object with an associated function and user data.
|
user data to pass to the drawing function |
Returns : |
the new GritsCallback |