Example #1
0
/* Returns the current progress as a percentage. */
int
clip_GTK_PROGRESSGETCURRENTPERCENTAGE(ClipMachine * cm)
{
	C_widget *cprg = _fetch_cw_arg(cm);
        CHECKCWID(cprg,GTK_IS_PROGRESS);
        _clip_retnd(cm,gtk_progress_get_current_percentage(GTK_PROGRESS(cprg->widget)));
	return 0;
err:
	return 1;
}
Example #2
0
gfloat gw_progress_bar_box_get_percentage ( GtkWindow *w)
{
	GtkProgress *progress_bar = NULL;
	gfloat percentage = -1;


#ifdef GW_DEBUG_GUI_COMPONENT
	g_print	( "*** GW - %s (%d) :: %s()\n",	__FILE__, __LINE__, __PRETTY_FUNCTION__);
#endif

	if ( w != NULL )
	{
		if ( (progress_bar = gw_progress_bar_box_get_progress_bar ( w)) != NULL )
		{
			percentage = gtk_progress_get_current_percentage ( progress_bar);
		}
	}

	return percentage;
}
Example #3
0
/*!
 \brief gets current fraction
 \param pbar is a pointer to the progressbar object
 \returns current fraction from the progressbar (0-1.0)
 */
gfloat mtx_progress_bar_get_fraction (MtxProgressBar *pbar)
{
	g_return_val_if_fail ((MTX_IS_PROGRESS_BAR (pbar)),0.0);
	return gtk_progress_get_current_percentage (GTK_PROGRESS (pbar));
}