XSTune

SYNTAX

        wid=XSTune(parent,x,y,min,max,data)

        XSWidget *wid,*parent;
        int  x,y,min,max,*data;

DESCRIPTION

XSTune create a fine tune widget inside the selected parent, in the position x,y with fixed size 33x16. When you click in the up arrow, the variable *data will be incremented upto max value; when you click in the down arrow, the variable *data will be decremented downto min value. Only integer values are supported and the variable only will be incremented or decremented by 1.

All operations of XSTune in the X server are delayed until XSCheckEvent is executed.

Example

#include <xstep.h>
#include <stdlib.h>
#include <stdio.h>

int main(int argc,char **argv) {

	XSWidget *d1,*w1;
	int		pointer=0;
	
	d1=XSDesktop(getenv("DISPLAY"),argv,argc);
	w1=XSWindow(d1,0,0,400,400,"popup example");
	   XSTune(w1,8,8,0,100,&pointer);
	   XSButton(w1,-8,-8,72,24,"Close",XSWindowClose);
	
	while(XSCheckEvent(d1,XS_BLOCK))
		printf("pointer value: %d\n",pointer);

	return 0;
}