Adds uiProgressBarValue() in unix
This commit is contained in:
parent
6270af8cf9
commit
e07a7b3d05
4
ui.h
4
ui.h
|
@ -187,8 +187,10 @@ _UI_EXTERN uiSlider *uiNewSlider(int min, int max);
|
||||||
|
|
||||||
typedef struct uiProgressBar uiProgressBar;
|
typedef struct uiProgressBar uiProgressBar;
|
||||||
#define uiProgressBar(this) ((uiProgressBar *) (this))
|
#define uiProgressBar(this) ((uiProgressBar *) (this))
|
||||||
// TODO uiProgressBarValue()
|
_UI_EXTERN int uiProgressBarValue(uiProgressBar *p);
|
||||||
_UI_EXTERN void uiProgressBarSetValue(uiProgressBar *p, int n);
|
_UI_EXTERN void uiProgressBarSetValue(uiProgressBar *p, int n);
|
||||||
|
_UI_EXTERN int uiProgressBarIndeterminate(uiProgressBar *p);
|
||||||
|
_UI_EXTERN void uiProgressBarSetindeterminate(uiProgressBar *p, int indeterminate);
|
||||||
_UI_EXTERN uiProgressBar *uiNewProgressBar(void);
|
_UI_EXTERN uiProgressBar *uiNewProgressBar(void);
|
||||||
|
|
||||||
typedef struct uiSeparator uiSeparator;
|
typedef struct uiSeparator uiSeparator;
|
||||||
|
|
|
@ -9,6 +9,11 @@ struct uiProgressBar {
|
||||||
|
|
||||||
uiUnixControlAllDefaults(uiProgressBar)
|
uiUnixControlAllDefaults(uiProgressBar)
|
||||||
|
|
||||||
|
int uiProgressBarValue(uiProgressBar *p)
|
||||||
|
{
|
||||||
|
return (int) (gtk_progress_bar_get_fraction(p->pbar) * 100);
|
||||||
|
}
|
||||||
|
|
||||||
void uiProgressBarSetValue(uiProgressBar *p, int value)
|
void uiProgressBarSetValue(uiProgressBar *p, int value)
|
||||||
{
|
{
|
||||||
if (value < 0 || value > 100)
|
if (value < 0 || value > 100)
|
||||||
|
|
Loading…
Reference in New Issue