![]() |
![]() |
![]() |
V_Sim API - Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Signals |
#define VISU_OBJECT_INSTANCE #define VISU_REDRAW_ADD #define VISU_REDRAW_FORCE struct VisuObject; struct VisuObjectClass; VisuObject * visu_object_class_getStatic (); VisuRendering * visu_object_getRendering (VisuObject *obj
); gboolean visu_object_load (VisuObject *obj
,VisuData *data
,int nSet
,GCancellable *cancel
,GError **error
); gboolean visu_object_redraw (gpointer data
); gboolean visu_object_redrawForce (gpointer data
); void visu_object_setLoadMessage (VisuObject *obj
,const gchar *mess
); void visu_object_setLoadMessageFunc (VisuObject *obj
,GFunc func
,gpointer data
); gboolean visu_object_setRendering (VisuObject *obj
,VisuRendering *method
);
"DirectoryChanged" :No Hooks
"OpenGLAskForReDraw" :No Hooks
"OpenGLForceReDraw" :No Hooks
"colorNewAvailable" :No Hooks
"dataLoaded" :No Hooks
"dataNew" :No Hooks
"dataRendered" :No Hooks
"dataUnRendered" :No Hooks
"entryParsed" :No Hooks
"renderingChanged" :No Hooks
"resourcesLoaded" :No Hooks
"shadeNewAvailable" :No Hooks
"viewNew" :No Hooks
At the present time, the signals are global to all V_Sim, owned by a variable include in each parts called visu. This is wherre these signals are defined.
#define VISU_OBJECT_INSTANCE visu_object_class_getStatic()
This routine is used to get the global VisuObject object to listen to its signals.
#define VISU_REDRAW_ADD g_idle_add(visu_object_redraw, (gpointer)__func__)
A macro to ask V_Sim to redraw the rendering area at next idle time, except if the deferred redraw option is set.
#define VISU_REDRAW_FORCE g_idle_add(visu_object_redrawForce, (gpointer)__func__)
Force V_Sim to redraw at the next idle time, whatever value for the deferred redraw option.
struct VisuObjectClass { GObjectClass parent; };
This structure describes the class VisuObjectClass.
GObjectClass |
an object to inherit from. |
VisuObject * visu_object_class_getStatic ();
Internal routine to access the VisuObject object instanciated by default. Use VISU_OBJECT_INSTANCE instead.
Returns : |
the default VisuObject used by V_Sim. [transfer none] |
VisuRendering * visu_object_getRendering (VisuObject *obj
);
Get the current method used to render the data.
|
a VisuObject object. |
Returns : |
the rendering method attached to obj . [transfer none]
|
gboolean visu_object_load (VisuObject *obj
,VisuData *data
,int nSet
,GCancellable *cancel
,GError **error
);
This calls the load method of the current rendering
method. Some informations may be store in error
if the returned
value is FALSE.
The file(s) which is(are) opened is(are) stored in the
VisuData. The nSet
argument is used to load a specific set of
nodes if the input format supports it. If nSet
is 0, then the
default set of nodes is loaded.
|
a VisuObject object. |
|
a VisuData object ; |
|
an integer ; |
|
a GCancellable object. [allow-none] |
|
a pointer to store a possible error, location must be initialized to (GError*)0. |
Returns : |
TRUE if everithing is OK, if FALSE, the error is set and
should be freed with g_error_free() . |
gboolean visu_object_redraw (gpointer data
);
Call the signal OpenGLAskForReDraw. The API is adapted to the routine to be added in the gloop. Use VISU_REDRAW_ADD instead of this routine.
|
a string. [allow-none][type utf8] |
Returns : |
FALSE to stop the emission as soon as done. |
gboolean visu_object_redrawForce (gpointer data
);
Call the signal OpenGLForceReDraw. The API is adapted to the routine to be added in the gloop. Use VISU_REDRAW_FORCE instead of this routine.
|
a string. [allow-none][type utf8] |
Returns : |
FALSE to stop the emission as soon as done. |
void visu_object_setLoadMessage (VisuObject *obj
,const gchar *mess
);
If a message function on load action has been set by
visu_object_setLoadMessageFunc()
, then the given mess
is given as
argument to this function.
|
a VisuObject object. |
|
a string. |
Since 3.6
void visu_object_setLoadMessageFunc (VisuObject *obj
,GFunc func
,gpointer data
);
When a load process is running, on can defined a message function
that may be called to output message to the user using
visu_object_setLoadMessage()
.
|
a VisuObject object. |
|
a function to print a message. [scope call] |
|
user data. |
Since 3.6
gboolean visu_object_setRendering (VisuObject *obj
,VisuRendering *method
);
Choose the method used to render the data.
|
a VisuObject object. |
|
a VisuRendering method. [transfer full] |
Returns : |
TRUE if the rendering method of obj is actually changed. |
"DirectoryChanged"
signalvoid user_function (VisuObject *visuObj,
guint kind,
gpointer user_data) : No Hooks
The current directory has been changed. The kind of directory is
defined by kind
(see #).
|
the object emitting the signal. |
|
a flag. |
|
user data set when the signal handler was connected. |
Since 3.6
"OpenGLAskForReDraw"
signalvoid user_function (VisuObject *visuObj,
gpointer user_data) : No Hooks
Internal signal, use VISU_REDRAW_ADD()
instead.
|
the object emitting the signal. |
|
user data set when the signal handler was connected. |
"OpenGLForceReDraw"
signalvoid user_function (VisuObject *visuObj,
gpointer user_data) : No Hooks
Internal signal, use VISU_REDRAW_FORCE()
instead.
|
the object emitting the signal. |
|
user data set when the signal handler was connected. |
"colorNewAvailable"
signalvoid user_function (VisuObject *visuObj,
gpointer color,
gpointer user_data) : No Hooks
A new ToolColor is available.
|
the object emitting the signal. |
|
the newly created ToolColor. |
|
user data set when the signal handler was connected. |
Since 3.2
"dataLoaded"
signalvoid user_function (VisuObject *visuObj,
GObject *dataObj,
gpointer user_data) : No Hooks
The given dataObj
is fully populated and ready for usage.
|
the object emitting the signal. |
|
the newly created VisuData. |
|
user data set when the signal handler was connected. |
Since 3.1
"dataNew"
signalvoid user_function (VisuObject *visuObj,
GObject *dataObj,
gpointer user_data) : No Hooks
A new VisuData is available.
|
the object emitting the signal. |
|
the newly created VisuData. |
|
user data set when the signal handler was connected. |
Since 3.2
"dataRendered"
signalvoid user_function (VisuObject *visuObj,
GObject *dataObj,
GObject *view,
gpointer user_data) : No Hooks
The given dataObj
is fully set up and ready for rendering (no
further internal modifications will occur).
|
the object emitting the signal. |
|
the VisuData object to be rendered on view . |
|
the view to render to. |
|
user data set when the signal handler was connected. |
"dataUnRendered"
signalvoid user_function (VisuObject *visuObj,
GObject *dataObj,
GObject *view,
gpointer user_data) : No Hooks
The given dataObj
is not rendered anymore on view
.
|
the object emitting the signal. |
|
the VisuData object that was rendered on view . |
|
the view dataObj was rendered to. |
|
user data set when the signal handler was connected. |
Since 3.7
"entryParsed"
signalvoid user_function (VisuObject *visuObj,
gchar *key,
gpointer user_data) : No Hooks
The entry key
of a configuration file has just been successfully parsed.
|
the object emitting the signal. |
|
the key that has been parsed. |
|
user data set when the signal handler was connected. |
Since 3.7
"renderingChanged"
signalvoid user_function (VisuObject *visuObj,
gpointer meth,
gpointer user_data) : No Hooks
The rendering method has been changed.
|
the object emitting the signal. |
|
the newly chosen VisuRendering method. |
|
user data set when the signal handler was connected. |
"resourcesLoaded"
signalvoid user_function (VisuObject *visuObj,
GObject *dataObj,
gpointer user_data) : No Hooks
The resource file has been read.
|
the object emitting the signal. |
|
the associated VisuData. |
|
user data set when the signal handler was connected. |
"shadeNewAvailable"
signalvoid user_function (VisuObject *visuObj,
gpointer shade,
gpointer user_data) : No Hooks
A new ToolShade is available.
|
the object emitting the signal. |
|
the newly created ToolShade. |
|
user data set when the signal handler was connected. |
Since 3.7
"viewNew"
signalvoid user_function (VisuObject *visuObj,
GObject *view,
gpointer user_data) : No Hooks
A new VisuGlView is available.
|
the object emitting the signal. |
|
the newly created VisuGlView. |
|
user data set when the signal handler was connected. |
Since 3.7