A Scrollbar is a gadget used to provide a scrollbar similar in appearance
to the standard RISC OS window scrollbars. They consist of two direction
arrows (up/down or left/right), and a resizable 'sausage' between.
The sausage moves when one of the adjustor icons are clicked on, the sausage
is dragged by the mouse, or the SetBounds method is called. The sausage will
resize automatically, if necessary, when the SetBounds method is called.

Bits in the flags word for a scrollbar have the following meaning:

	Bit	Meaning when set
	0	gadget has a vertical scrollbar
	1	gadget has a horizontal scrollbar

The Scrollbar gadget requires the Window module, version 1.32 or greater.

Scrollbar methods
=================

Scrollbar_GetState
------------------
On entry
	R0 = flags
	R1 = Window object id
	R2 = ???
	R3 = Gadget component id

On exit
	R0 = state
		bit 0 set means gadget has a vertical scrollbar
		bit 1 set means gadget has a horizontal scrollbar

C veneer
extern _kernel_oserror *scrollbar_get_state(unsigned int flags,
			ObjectId object_id, ComponentId component_id,
			unsigned int *state);

Scrollbar_SetState
------------------
On entry
	R0 = flags
	R1 = Window object id
	R2 = ???
	R3 = Gadget component id
	R4 = state
		bit 0 set means gadget has a vertical scrollbar
		bit 1 set means gadget has a horizontal scrollbar

On exit
	R1-R9 preserved

C veneer
extern _kernel_oserror *scrollbar_set_state(unsigned int flags,
			ObjectId object_id, ComponentId component_id,
			unsigned int state);

Scrollbar_SetBounds
-------------------
On entry
	R0 = flags
		bit 0 set means change the lower bound
		bit 1 set means change the upper bound
		bit 2 set means change the visible length
	R1 = Window object id
	R2 = ???
	R3 = Gadget component id
	R4 = new lower bound
	R5 = new upper bound
	R6 = new visible length

On exit
	R1-R9 preserved

C veneer
extern _kernel_oserror *scrollbar_set_bounds(unsigned int flags,
			ObjectId object_id, ComponentId component_id,
			unsigned int lower_bound, unsigned int upper_bound,
			unsigned int visible_len);

Scrollbar_GetBounds
-------------------
On entry
	R0 = flags
		bit 0 set means return the lower bound
		bit 1 set means return the upper bound
		bit 2 set means return the visible length
	R1 = Window object id
	R2 = ???
	R3 = Gadget component id

On exit
	R0 = lower bound
	R1 = upper bound
	R2 = visible length

C veneer
extern _kernel_oserror *scrollbar_get_bounds(unsigned int flags,
			ObjectId object_id, ComponentId component_id,
			unsigned int *lower_bound, unsigned int *upper_bound,
			unsigned int *visible_len);

Scrollbar_SetValue
------------------
On entry
	R0 = flags
	R1 = Window object id
	R2 = ???
	R3 = Gadget component id
	R4 = new value

On exit
	R1-R9 preserved

C veneer
extern _kernel_oserror *scrollbar_set_value(unsigned int flags,
			ObjectId object_id, ComponentId component_id,
			unsigned int new_value);

Scrollbar_GetValue
------------------
On entry
	R0 = flags
	R1 = Window object id
	R2 = ???
	R3 = Gadget component id

On exit
	R0 holds current value

C veneer
extern _kernel_oserror *scrollbar_get_value(unsigned int flags,
			ObjectId object_id, ComponentId component_id,
			unsigned int *value);

Scrollbar_SetIncrements
-----------------------
On entry
	R0 = flags
		bit 0 set means set line increment
		bit 1 set means set page increment
	R1 = Window object id
	R2 = ???
	R3 = Gadget component id
	R4 = new line increment
	R5 = new page increment

On exit
	R1-R9 preserved

C veneer
extern _kernel_oserror *scrollbar_set_increments(unsigned int flags,
			ObjectId object_id, ComponentId component_id,
			unsigned int line_inc, unsigned int page_inc);

Scrollbar_GetIncrements
-----------------------
On entry
	R0 = flags
		bit 0 set means return line increment
		bit 1 set means return page increment
	R1 = Window object id
	R2 = ???
	R3 = Gadget component id

On exit
	R0 = line increment
	R1 = page increment

C veneer
extern _kernel_oserror *scrollbar_get_increments(unsigned int flags,
			ObjectId object_id, ComponentId component_id,
			unsigned int *line, unsigned int *page);

Scrollbar_SetEvent
------------------
On entry
	R0 = flags
	R1 = Window object id
	R2 = ???
	R3 = Gadget component id
	R4 = Toolbox event code

On exit
	R1-R9 preserved

C veneer
extern _kernel_oserror *scrollbar_set_event(unsigned int flags,
			ObjectId object_id, ComponentId component_id,
			unsigned int event);

Scrollbar_GetEvent
------------------
On entry
	R0 = flags
	R1 = Window object id
	R2 = ???
	R3 = Gadget component id

On exit
	R0 holds Toolbox event code

C veneer
extern _kernel_oserror *scrollbar_get_event(unsigned int flags,
			ObjectId object_id, ComponentId component_id,
			unsigned int *event);
