VisuObject

VisuObject — A general object to store the signals.

Synopsis

#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);

Object Hierarchy

  GObject
   +----VisuObject

Signals

  "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

Description

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.

Details

VISU_OBJECT_INSTANCE

#define VISU_OBJECT_INSTANCE visu_object_class_getStatic()

This routine is used to get the global VisuObject object to listen to its signals.


VISU_REDRAW_ADD

#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.


VISU_REDRAW_FORCE

#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 VisuObject

struct VisuObject;

This structure describes a VisuObject object.


struct VisuObjectClass

struct VisuObjectClass {
  GObjectClass parent;
};

This structure describes the class VisuObjectClass.

GObjectClass parent;

an object to inherit from.

visu_object_class_getStatic ()

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]

visu_object_getRendering ()

VisuRendering *     visu_object_getRendering            (VisuObject *obj);

Get the current method used to render the data.

obj :

a VisuObject object.

Returns :

the rendering method attached to obj. [transfer none]

visu_object_load ()

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.

obj :

a VisuObject object.

data :

a VisuData object ;

nSet :

an integer ;

cancel :

a GCancellable object. [allow-none]

error :

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().

visu_object_redraw ()

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.

data :

a string. [allow-none][type utf8]

Returns :

FALSE to stop the emission as soon as done.

visu_object_redrawForce ()

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.

data :

a string. [allow-none][type utf8]

Returns :

FALSE to stop the emission as soon as done.

visu_object_setLoadMessage ()

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.

obj :

a VisuObject object.

mess :

a string.

Since 3.6


visu_object_setLoadMessageFunc ()

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().

obj :

a VisuObject object.

func :

a function to print a message. [scope call]

data :

user data.

Since 3.6


visu_object_setRendering ()

gboolean            visu_object_setRendering            (VisuObject *obj,
                                                         VisuRendering *method);

Choose the method used to render the data.

obj :

a VisuObject object.

method :

a VisuRendering method. [transfer full]

Returns :

TRUE if the rendering method of obj is actually changed.

Signal Details

The "DirectoryChanged" signal

void                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 #).

visuObj :

the object emitting the signal.

kind :

a flag.

user_data :

user data set when the signal handler was connected.

Since 3.6


The "OpenGLAskForReDraw" signal

void                user_function                      (VisuObject *visuObj,
                                                        gpointer    user_data)      : No Hooks

Internal signal, use VISU_REDRAW_ADD() instead.

visuObj :

the object emitting the signal.

user_data :

user data set when the signal handler was connected.

The "OpenGLForceReDraw" signal

void                user_function                      (VisuObject *visuObj,
                                                        gpointer    user_data)      : No Hooks

Internal signal, use VISU_REDRAW_FORCE() instead.

visuObj :

the object emitting the signal.

user_data :

user data set when the signal handler was connected.

The "colorNewAvailable" signal

void                user_function                      (VisuObject *visuObj,
                                                        gpointer    color,
                                                        gpointer    user_data)      : No Hooks

A new ToolColor is available.

visuObj :

the object emitting the signal.

color :

the newly created ToolColor.

user_data :

user data set when the signal handler was connected.

Since 3.2


The "dataLoaded" signal

void                user_function                      (VisuObject *visuObj,
                                                        GObject    *dataObj,
                                                        gpointer    user_data)      : No Hooks

The given dataObj is fully populated and ready for usage.

visuObj :

the object emitting the signal.

dataObj :

the newly created VisuData.

user_data :

user data set when the signal handler was connected.

Since 3.1


The "dataNew" signal

void                user_function                      (VisuObject *visuObj,
                                                        GObject    *dataObj,
                                                        gpointer    user_data)      : No Hooks

A new VisuData is available.

visuObj :

the object emitting the signal.

dataObj :

the newly created VisuData.

user_data :

user data set when the signal handler was connected.

Since 3.2


The "dataRendered" signal

void                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).

visuObj :

the object emitting the signal.

dataObj :

the VisuData object to be rendered on view.

view :

the view to render to.

user_data :

user data set when the signal handler was connected.

The "dataUnRendered" signal

void                user_function                      (VisuObject *visuObj,
                                                        GObject    *dataObj,
                                                        GObject    *view,
                                                        gpointer    user_data)      : No Hooks

The given dataObj is not rendered anymore on view.

visuObj :

the object emitting the signal.

dataObj :

the VisuData object that was rendered on view.

view :

the view dataObj was rendered to.

user_data :

user data set when the signal handler was connected.

Since 3.7


The "entryParsed" signal

void                user_function                      (VisuObject *visuObj,
                                                        gchar      *key,
                                                        gpointer    user_data)      : No Hooks

The entry key of a configuration file has just been successfully parsed.

visuObj :

the object emitting the signal.

key :

the key that has been parsed.

user_data :

user data set when the signal handler was connected.

Since 3.7


The "renderingChanged" signal

void                user_function                      (VisuObject *visuObj,
                                                        gpointer    meth,
                                                        gpointer    user_data)      : No Hooks

The rendering method has been changed.

visuObj :

the object emitting the signal.

meth :

the newly chosen VisuRendering method.

user_data :

user data set when the signal handler was connected.

The "resourcesLoaded" signal

void                user_function                      (VisuObject *visuObj,
                                                        GObject    *dataObj,
                                                        gpointer    user_data)      : No Hooks

The resource file has been read.

visuObj :

the object emitting the signal.

dataObj :

the associated VisuData.

user_data :

user data set when the signal handler was connected.

The "shadeNewAvailable" signal

void                user_function                      (VisuObject *visuObj,
                                                        gpointer    shade,
                                                        gpointer    user_data)      : No Hooks

A new ToolShade is available.

visuObj :

the object emitting the signal.

shade :

the newly created ToolShade.

user_data :

user data set when the signal handler was connected.

Since 3.7


The "viewNew" signal

void                user_function                      (VisuObject *visuObj,
                                                        GObject    *view,
                                                        gpointer    user_data)      : No Hooks

A new VisuGlView is available.

visuObj :

the object emitting the signal.

view :

the newly created VisuGlView.

user_data :

user data set when the signal handler was connected.

Since 3.7