home *** CD-ROM | disk | FTP | other *** search
- /*
- * Copyright 1991, 1992, 1993, 1994, Silicon Graphics, Inc.
- * All Rights Reserved.
- *
- * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
- * the contents of this file may not be disclosed to third parties, copied or
- * duplicated in any form, in whole or in part, without the prior written
- * permission of Silicon Graphics, Inc.
- *
- * RESTRICTED RIGHTS LEGEND:
- * Use, duplication or disclosure by the Government is subject to restrictions
- * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
- * and Computer Software clause at DFARS 252.227-7013, and/or in similar or
- * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
- * rights reserved under the Copyright Laws of the United States.
- */
- /*
- * interface to slider.c
- * Yossi Friedman, July 1988
- */
-
-
-
- /*
- * NAME
- * define_slider - set slider attributes
- *
- * SYNOPSIS
- * define_slider(progname, title, lo, hi, dflt, fun)
- * char *progname, *title;
- * float lo, hi, dflt;
- * void (*fun)();
- *
- * DESCRIPTION
- * Before using any slider, it has to be defined using define_slider.
- * define_slider only does some bookkeeping. It does not open any
- * windows, and should be called only once per slider (as an act of
- * initialization).
- *
- * The parameters are:
- * - prog_name: the name of the mother application;
- * - title: the name of the slider;
- * - lo, hi, dflt: the lowest, highest, and default values of the
- * slider;
- * - fun: a function to call when the slider value changes. It gets
- * called with the new slider value as an argument.
- *
- * Define_slider immediately calls fun with the default value.
- * Define_slider returns a slider id, which should be used in all
- * future references to the slider. A slider id is a small
- * nonnegative integer.
- */
- int define_slider(char *, char *, float, float, float, void (*)(float));
-
-
- /*
- * NAME
- * open_slider - open a window for a specified slider
- *
- * SYNOPSIS
- * long open_slider(sid)
- * int sid;
- *
- * DESCRIPTION
- * open_slider opens a window for the slider whose slider id is the
- * parameter, and returns the window id of the slider's window. if
- * the slider already has a window, open_slider simply pops it up
- * rather than actually opening it.
- */
- long open_slider(int);
-
-
- /*
- * NAME
- * close_dlier - close the window associated with a given slider
- *
- * SYNOPSIS
- * close_slider(sid)
- * int sid;
- *
- * DESCRIPTION
- * close_slider closes slider sid's window, if it had one.
- */
- int close_slider(int);
-
-
-
- /*
- * NAME
- * set_slider_default - override sider parameters
- *
- * SYNOPSIS
- * set_slider_default(sid, val)
- * int sid;
- * float val;
- *
- * DESCRIPTION
- * set_slider_default sets val as the new default value for slider
- * sid.
- */
- int set_slider_default(int, float);
-
-
-
- /*
- * NAME
- * set_slider - force new slider value
- *
- * SYNOPSIS
- * set_slider(sid, val)
- * int sid;
- * float val;
- *
- * DESCRIPTION
- * set_slider focres a specific slider value val for slider sid. In
- * addition to changing the displayed value, set_slider also calls
- * the `fun' with the new value.
- */
- int set_slider(int, float);
-
-
-
- /*
- * NAME
- * slider_event - handle events in the slider window
- *
- * SYNOPSIS
- * slider_event(sid, dev, val)
- * int sid;
- * short dev, val;
- *
- * DESCRIPTION
- * slider_event should be called by the event handler of the mother
- * application whenever an event happens inside the slider window
- * of slider sid. dev and val are the values returned from qread.
- *
- * The return value is 1 if the slider window is still open after
- * the event, and 0 if the event caused the slider window to be closed.
- */
- int slider_event(int, short, short);
-
-
-
- /*
- * NAME
- * do_slider - change slider state for the next frame
- *
- * SYNOPSIS
- * do_slider(sid)
- * int sid;
- *
- * DESCRIPTION
- * The mother application should call do_slider if the current window
- * is the window of slider sid. This should be done from inside the
- * main loop of the application, right after the event handler.
- */
- void do_slider(int);
-