/ gwprogressbarbox.h / Functions / Description

Functions



gw_progress_bar_box_create

Creates the progress bar box window.
GtkWindow * gw_progress_bar_box_create ( GtkWindow *window, gchar *title, gchar *subject, gchar *text, gfloat max, func_stop_progress_t stop, gpointer p);
This function creates the progress bar box window. If stop is NULL the default function is gw_progress_bar_box_ok_cancel_click().
Doesn't show the progress bar when max is 0.

Parameters
window parent window
title the window title
subject the window subject
text the message to display
max the maximum value of the progress bar
stop function to stop progress
p data to use with callbacks

Result: the message box window.
Returns NULL when an error occured..


gw_progress_bar_box_get_parent_window

Gets the parent window.
GtkWindow * gw_progress_bar_box_get_parent_window ( GtkWindow *w);
This function gets the parent window.

Parameters
w the progress bar box window to get parent window

Result: The parent window of the progress bar.
Returns NULL when an error occured..


gw_progress_bar_box_get_progress_bar

Gets the real progress bar.
GtkProgress * gw_progress_bar_box_get_progress_bar ( GtkWindow *w);
This function gets the real progress bar.

Parameters
w the progress bar box window to get the real progress bar

Result: The real progress bar.
Returns NULL when an error occured..


gw_progress_bar_box_get_ok_cancel_button

Gets the ok/cancel button.
GtkButton * gw_progress_bar_box_get_ok_cancel_button ( GtkWindow *w);
This function gets the ok/cancel button.

Parameters
w the progress bar box window to get the ok/cancel button

Result: The ok/cancel button.
Returns NULL when an error occured..


gw_progress_bar_box_get_iscancel_state

Checks if Ok/Cancel button is in "Cancel mode".
gboolean gw_progress_bar_box_get_iscancel_state ( GtkWindow *w);
This function checks if Ok/Cancel button is in "Cancel mode".


Parameters
w the progress bar box

Result: is in "Cancel mode".
Returns FALSE when an error occured..


gw_progress_bar_box_get_isok_state

Checks if Ok/Cancel button is in "Ok mode".
gboolean gw_progress_bar_box_get_isok_state ( GtkWindow *w);
This function checks if Ok/Cancel button is in "Ok mode".


Parameters
w the progress bar box

Result: is in "Ok mode".
Returns FALSE when an error occured..


gw_progress_bar_box_get_text

Gets the text of the progress bar.
gchar * gw_progress_bar_box_get_text ( GtkWindow *w);
This function gets the text of the progress bar.

Parameters
w the progress bar box window to get text

Result: The text of the progress bar. Must be freed with g_free().
Returns NULL when an error occured..


gw_progress_bar_box_get_state

Gets the state of the progress bar.
gint gw_progress_bar_box_get_state ( GtkWindow *w);
This function gets the state of the progress bar.

Parameters
w the progress bar box window to get text

Result: The state of the progress bar. It could be STATE_OK or STATE_CANCEL.
Returns -1 when an error occured..


gw_progress_bar_box_get_value

Gets the value of the progress bar.
gfloat gw_progress_bar_box_get_value ( GtkWindow *w);
This function gets the value of the progress bar.

Parameters
w the progress bar box window to get value

Result: The value of the progress bar.
Returns -1 when an error occured..


gw_progress_bar_box_get_percentage

Gets the percentage of the progress bar.
gfloat gw_progress_bar_box_get_percentage ( GtkWindow *w);
This function gets the percentage of the progress bar.

Parameters
w the progress bar box window to get percentage

Result: The percentage of the progress bar.
Returns -1 when an error occured..


gw_progress_bar_box_set_value

Sets a value to the progress bar.
gint gw_progress_bar_box_set_value ( GtkWindow *w, gfloat value);
This function sets a value to the progress bar.

Parameters
w the progress bar box window
value the value to set

Result: an error code.
Returns 0 when it's done.
Returns -1 when an error occured..


gw_progress_bar_box_add_value

Add a value to current statment of the progress bar.
gint gw_progress_bar_box_add_value ( GtkWindow *w, gfloat value);
This function adds a value to current statment of the progress bar.

Parameters
w the progress bar box window
value the value to set

Result: an error code.
Returns 0 when it's done.
Returns -1 when an error occured..


gw_progress_bar_box_set_percentage

Sets a percentage to the progress bar.
gint gw_progress_bar_box_set_percentage ( GtkWindow *w, gfloat percentage);
This function sets a percentage to the progress bar.

Parameters
w the progress bar box window
percentage the percentage to set

Result: an error code.
Returns 0 when it's done.
Returns -1 when an error occured..


gw_progress_bar_box_set_text

Sets a text to the progress bar box.
gint gw_progress_bar_box_set_text ( GtkWindow *w, gchar *file_name);
This function sets a text to the progress bar box.

Parameters
w the progress bar box window
text the text to set

Result: an error code.
Returns 0 when it's done.
Returns -1 when an error occured..


gw_progress_bar_box_set_state

Sets the state of the progress bar box.
gint gw_progress_bar_box_set_state ( GtkWindow *w, gint state);
This function sets the state of the progress bar box.

Parameters
w the progress bar box window
state the state of progress bar (STATE_OK or STATE_CANCEL)

Result: an error code.
Returns 0 when it's done.
Returns -1 when an error occured..


gw_progress_bar_box_set_ok_state

Sets Ok/Cancel button in Ok mode.
gint gw_progress_bar_box_set_ok_state ( GtkWindow *w);
This function sets in "Ok mode" the Ok/Cancel button.


Parameters
w the progress bar box

Result: an error code.
Returns 0 when it's done.
Returns -1 when an error occured..


gw_progress_bar_box_set_cancel_state

Sets Ok/Cancel button in Cancel mode.
gint gw_progress_bar_box_set_cancel_state ( GtkWindow *w);
This function sets in "Cancel mode" the Ok/Cancel button.


Parameters
w the progress bar box

Result: an error code.
Returns 0 when it's done.
Returns -1 when an error occured..


gw_progress_bar_box_ok_cancel_click

Do Ok or Cancel for the progress bar box.
gboolean gw_progress_bar_box_ok_cancel_click ( GtkWidget *bt, GtkWindow *w);
This function execute the ok or cancel function for the progress bar box.
This function call when the user click on ok/cancel button.


Parameters
w the progress bar box

Result: an error code.
Returns TRUE when it's done.
Returns FALSE when an error occured..


gw_progress_bar_box_ok_click

Ok the progress bar box.
gboolean gw_progress_bar_box_ok_click ( GtkWidget *bt, GtkWindow *w);
This function oks the progress bar box. This is the default ok callback function.
This function call when the user click on ok button, but doesn't do nothing.


Parameters
w the progress bar box

Result: an error code.
Returns TRUE when it's done.
Returns FALSE when an error occured..


gw_progress_bar_box_cancel_click

Cancels the progress bar box.
gboolean gw_progress_bar_box_cancel_click ( GtkWidget *bt, GtkWindow *w);
This function cancels the progress bar box. this is the default cancel callback function.
This function call when the user click on cancel button, but doesn't do nothing.


Parameters
w the progress bar box

Result: an error code.
Returns TRUE when it's done.
Returns FALSE when an error occured..


gw_progress_bar_box_destroy

Destroys the progress bar box window.
gboolean gw_progress_bar_box_destroy ( GtkObject *w, gpointer *p);
This function destroys the progress bar box window.
Warning : today this function doesn't do nothing. Before implements this function, must to change the signals connexions in gw_progress_bar_box_create().

Parameters
w the object invoker
p a pointer (free today)

Result: Return TRUE when it's done.
Returns FALSE when an error occured.


gw_progress_bar_box_dignal_do_nothing

Does nothing.
gboolean gw_progress_bar_box_signal_do_nothing ( GtkObject *ob, gpointer p);


#endif
This function doesn't do anything. It's must be connect to a signal to cancel it.

Parameters
ob the object invoker
p a pointer (free today)

Result: Return TRUE when it's done.
Returns FALSE when an error occured..