#ifndef _MOUSE_H
#define _MOUSE_H
/*=
Mouse
1100
**/

// Introduction
/**
Mouse API is almost explainded at the top of this guide, but here it
is some other usefull functions (macros, in fact).
**/


#define raydium_mouse_hide() glutSetCursor(GLUT_CURSOR_NONE);
/**
Hides mouse cursor.
**/

#define raydium_mouse_show() glutSetCursor(GLUT_CURSOR_LEFT_ARROW);
/**
Shows mouse cursor.
**/

__rayapi void raydium_mouse_move(int x, int y);
/**
Moves cursor to (##x##,##y##) position (in pixel).
Example if you want to move cursor at window's center:
%%(c)raydium_mouse_move(raydium_window_tx/2, raydium_window_ty/2);%%
**/

__rayapi signed char raydium_mouse_isvisible(void);
/**
Returns true or false (0 or 1), if the mouse is visible or not.
See ##raydium_mouse_show()## and ##raydium_mouse_hide()## above.
**/

__rayapi void raydium_mouse_init (void);
/**
Internal use.
**/

__rayapi void raydium_mouse_click_callback (int but, int state, int x, int y);
/**
Internal callback.
**/

__rayapi void raydium_mouse_move_callback (int x, int y);
/**
Internal callback.
**/

__rayapi int raydium_mouse_button_pressed (int button);
/**
returns ##button## state. (See first part of this document)
**/

// Mouse Wheel
/**
To get the mouse wheel status you have to check directly the variable
##raydium_mouse_click##.
 -Value 4 means "mouse wheel up".
 -Value 5 means "mouse wheel down".
Usage example:
%%(c)
if (raydium_mouse_click==4)
	zoom*=1.1f;
if (raydium_mouse_click==5)
	zoom*=0.9f;
%%
This piece of code will change the value of zoom according mouse wheel.
**/

__rayapi void raydium_mouse_grab_delta(int *x, int *y);
/**
This function will "grab" the mouse and return mouse moves since last call.
Output parameters ##x## and ##y## will gives you the delta.

You can yse this function for any "FPS like" mouse look controls, or any other
situation where you need to known how far the user moves the mouse since
the last frame.

This function now use a box model, so its compliant with all window sizes,
even odd ones.
**/

#endif
*a);
/**
Since OpenAL is very sensitive to malformed values, this function is used
internally to check consistency of provided ALfloat arrays.
**/

__rayapi void raydium_sound_InitSource (int src);
/**
Internal use.
**/

__rayapi int raydium_sound_LoadWav (const char *fname);
/**
This function tries to load the ##fname## wav file into a buffer, if
successful, it returns the source id, else 0.
**/

__rayapi int raydium_sound_SourceVerify (int src);
/**
Internal id checks.
**/

__rayapi int raydium_sound_SetSourceLoop (int src, signed char loop);
/**
Modifies the ##loop## property of the ##src## source (loops if loop is non-zero,
default value for a source is "true").
Returns 0 if ok, -1 if error.
**/

__rayapi int raydium_sound_GetSourcePitch (int src, ALfloat * p);
/**
Returns current pitch for ##src## source.
**/

__rayapi int raydium_sound_SetSourcePitch (int src, ALfloat p);
/**
Sets pitch for ##src## source.
Current OpenAL spec is not clear about pitch's limits. Raydium will
clamp values to to ]0,2] interval.
**/

__rayapi int raydium_sound_GetSourceGain (int src, ALfloat * g);
/**
Returns current gain ("volume") for ##src## source.
**/

__rayapi int raydium_sound_SetSourceGain (int src, ALfloat g);
/**
Sets gain ("volume") for ##src## source.
Current OpenAL spec is not clear about pitch's limits. Raydium do not allows
negative values, but no upper limit is set.
Warning: some OpenAL implementations will provide strange gain curves. More
work is needed on this issue.
**/

__rayapi int raydium_sound_SetSourceRefDist(int src, ALfloat distance);
/**
Sets reference distance for source ##src##. The reference distance is
the distance where the sound will be half-volume.
**/

__rayapi int raydium_sound_SetSourcePos (int src, ALfloat Pos[]);
/**
Sets 3D position of ##src## source.
##Pos## is a 3 * ALfloat array.
**/

__rayapi int raydium_sound_SetSourcePosCamera(int src);
/**
Sets 3D position of ##src## source on the current camera position.
**/

__rayapi int raydium_sound_GetSourcePos (int src, ALfloat * Pos[]);
/**
Returns current 3D po