## gtk_renderingWindowWidget

gtk_renderingWindowWidget —

## Synopsis

    struct      RenderingWindow_struct;
    typedef     RenderingWindow;
    GtkWidget*  renderingWindow_new             (char *windowRef,
                                                 char *window_name,
                                                 char *class_name,
                                                 int width,
                                                 int height);
    void        renderingWindowSet_pickEventListener
                                                (RenderingWindow *window,
                                                 CallbackFunctions *userCallbacks);
    void        renderingWindowSet_observeEventListener
                                                (RenderingWindow *window,
                                                 CallbackFunctions *userCallbacks);
    void        renderingWindowStop_defaultIneractiveMode
                                                (RenderingWindow *window);
    void        renderingWindowStart_defaultIneractiveMode
                                                (RenderingWindow *window);
    void        renderingWindowBlock_defaultIneractiveMode
                                                (RenderingWindow *window);
    void        renderingWindowUnblock_defaultIneractiveMode
                                                (RenderingWindow *window);
    void        renderingWindowRemove_interactiveEventListener
                                                (RenderingWindow *window);
    void        renderingWindowGet_openGLAreaSize
                                                (RenderingWindow *window,
                                                 unsigned int *width,
                                                 unsigned int *height);
    void        renderingWindowPush_message     (RenderingWindow *window,
                                                 gchar *message);
    void        renderingWindowPop_message      (RenderingWindow *window);
    GdkPixbuf*  renderingWindowGet_backgroundImage
                                                (RenderingWindow *window,
                                                 guchar **rowData,
                                                 gboolean *hasAlphaChannel,
                                                 int *width,
                                                 int *height);
    void        renderingWindowFree_backgroundImage
                                                (RenderingWindow *window);
    void        renderingWindowLoad_file        ();
    gboolean    renderingWindowDump             (RenderingWindow *window,
                                                 DumpType *format,
                                                 GString *buffer,
                                                 char *fileName,
                                                 gint width,
                                                 gint height,
                                                 voidDataFunc functionWait,
                                                 gpointer data);
    void        renderingWindowRedraw           (RenderingWindow *window,
                                                 gboolean forceRedraw);
    void        renderingWindowSet_visuData     (RenderingWindow *window,
                                                 VisuData *data);
    VisuData*   renderingWindowGet_visuData     (RenderingWindow *window);

## Description

## Details

### struct RenderingWindow_struct

    struct RenderingWindow_struct;

Private structure to store informations of a RenderingWindow object.

### RenderingWindow

    typedef struct RenderingWindow_struct        RenderingWindow;

Short form for a RenderingWindow_struct structure.

### renderingWindow_new ()

    GtkWidget*  renderingWindow_new             (char *windowRef,
                                                 char *window_name,
                                                 char *class_name,
                                                 int width,
                                                 int height);

A RenderingWindow widget is a GtkWindow that have an area for OpenGL drawing and a statusBar with many stuff like action buttons, real status bar for notifications, ...

`windowRef` : |
`window_name` : | the name of the window ;
`class_name` : | the class of the window ;
`width` : | its desired width ;
`height` : | its desired height.
Returns : | a newly created RenderingWindow widget.

### renderingWindowSet_pickEventListener ()

    void        renderingWindowSet_pickEventListener
                                                (RenderingWindow *window,
                                                 CallbackFunctions *userCallbacks);

Bring up the interactive mode listeners (clic, drag...) for pick mode and connect then to the given methods pointed by `userCallbacks`. Values in `userCallbacks` are copied and the pointer can be freed after this call.

`window` : | a valid RenderingWindow object ;
`userCallbacks` : | methods to be called depending on listeners.

### renderingWindowSet_observeEventListener ()

    void        renderingWindowSet_observeEventListener
                                                (RenderingWindow *window,
                                                 CallbackFunctions *userCallbacks);

Bring up the interactive mode listeners (clic, drag...) for observe mode and connect then to the given methods pointed by `userCallbacks`. Values in `userCallbacks` are copied and the pointer can be freed after this call.

`window` : | a valid RenderingWindow object ;
`userCallbacks` : | methods to be called depending on listeners.

### renderingWindowStop_defaultIneractiveMode ()

    void        renderingWindowStop_defaultIneractiveMode
                                                (RenderingWindow *window);

Stop all default interactive mode.

`window` : | a valid RenderingWindow object.

### renderingWindowStart_defaultIneractiveMode ()

    void        renderingWindowStart_defaultIneractiveMode
                                                (RenderingWindow *window);

Start all default interactive mode. It doesn't work if the default interactive mode has been stopped by `renderingWindowBlock_defaultIneractiveMode()`. Use `renderingWindowUnblock_defaultIneractiveMode()` instead to restart it.

`window` : | a valid RenderingWindow object.

### renderingWindowBlock_defaultIneractiveMode ()

    void        renderingWindowBlock_defaultIneractiveMode
                                                (RenderingWindow *window);

Stop all default interactive mode and prevent tem to restart until `renderingWindowUnblock_defaultIneractiveMode()` is called.

`window` : | a valid RenderingWindow object.

### renderingWindowUnblock_defaultIneractiveMode ()

    void        renderingWindowUnblock_defaultIneractiveMode
                                                (RenderingWindow *window);

Unblock and start the default interactive mode.

`window` : | a valid RenderingWindow object.

### renderingWindowRemove_interactiveEventListener ()

    void        renderingWindowRemove_interactiveEventListener
                                                (RenderingWindow *window);

`window` : |

### renderingWindowGet_openGLAreaSize ()

    void        renderingWindowGet_openGLAreaSize
                                                (RenderingWindow *window,
                                                 unsigned int *width,
                                                 unsigned int *height);

Retrieve the size of the OpenGL area (not the size of the rendering window).

`window` : | a valid RenderingWindow object ;
`width` : | a location to store the width ;
`height` : | a location to store the height.

### renderingWindowPush_message ()

    void        renderingWindowPush_message     (RenderingWindow *window,
                                                 gchar *message);

Use this method to add some informations on the status bar.

`window` : | a valid RenderingWindow object ;
`message` : | an UTF8 string to print on the status bar.

### renderingWindowPop_message ()

    void        renderingWindowPop_message      (RenderingWindow *window);

`window` : |

### renderingWindowGet_backgroundImage ()

    GdkPixbuf*  renderingWindowGet_backgroundImage
                                                (RenderingWindow *window,
                                                 guchar **rowData,
                                                 gboolean *hasAlphaChannel,
                                                 int *width,
                                                 int *height);

Use this method to load an image in memory (according to GdkPixbuf specification) and retrieve the row data in memory.

`window` : | a valid RenderingWindow object ;
`rowData` : | a pointer to be set on the data in memory ;
`hasAlphaChannel` : | a pointer to store if the loaded iage has an alpha channel ;
`width` : | store the width ;
`height` : | store the height.
Returns : | a pointer to GdkPixbuf that is own by the `window` object. his image stay in memory until a call to `renderigWindowFree_backgroundImage()` occurs.

### renderingWindowFree_backgroundImage ()

    void        renderingWindowFree_backgroundImage
                                                (RenderingWindow *window);

Free loaded background image if exists.

`window` : | a valid RenderingWindow object.

### renderingWindowLoad_file ()

    void        renderingWindowLoad_file        ();

Do as if the load button has been pushed.

### renderingWindowDump ()

    gboolean    renderingWindowDump             (RenderingWindow *window,
                                                 DumpType *format,
                                                 GString *buffer,
                                                 char *fileName,
                                                 gint width,
                                                 gint height,
                                                 voidDataFunc functionWait,
                                                 gpointer data);

Call this method to dump the given `window` to a file.

`window` : | a valid RenderingWindow object ;
`format` : | a DumpType object, corresponding to the write method ;
`buffer` : | a GString to store some error (not NULL) ;
`fileName` : | a string that defined the file to write to ;
`width` : | an integer ;
`height` : | an integer ;
`functionWait` : | a method to call periodically during the dump ;
`data` : | some pointer on object to be passed to the wait function.
Returns : | TRUE if everything went right.

### renderingWindowRedraw ()

    void        renderingWindowRedraw           (RenderingWindow *window,
                                                 gboolean forceRedraw);

Update the OpenGL area of the rendering window if the opengl option is set to immediate. If not, use `forceRedraw` to redraw.

`window` : | a valid RenderingWindow object ;
`forceRedraw` : | a boolean.

### renderingWindowSet_visuData ()

    void        renderingWindowSet_visuData     (RenderingWindow *window,
                                                 VisuData *data);

This method is used to attach a VisuData object to a given window. When, `data` is not NULL, this method emit the dataReadyForRendering signal, and all modules that needs to draw something should catch this signal and draw in the rendering window. If `data` is NULL, the dataNotReadyForRendering is emitted instead.

`window` : | a valid RenderingWindow object ;
`data` : | a VisuData to render in the given `window` (can be NULL).

### renderingWindowGet_visuData ()

    VisuData*   renderingWindowGet_visuData     (RenderingWindow *window);

This method is used to get the VisuData attached to a window.

`window` : | a valid RenderingWindow object.
Returns : | the VisuData attached to the `window` or NULL if none.