Wise&mystical  1.0
Project about Europe
Loading...
Searching...
No Matches
input.c File Reference
#include "internal.h"
#include <assert.h>
#include <float.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
+ Include dependency graph for input.c:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define _GLFW_STICK   3
 
#define _GLFW_JOYSTICK_AXIS   1
 
#define _GLFW_JOYSTICK_BUTTON   2
 
#define _GLFW_JOYSTICK_HATBIT   3
 

Functions

void _glfwInputKey (_GLFWwindow *window, int key, int scancode, int action, int mods)
 
void _glfwInputChar (_GLFWwindow *window, unsigned int codepoint, int mods, GLFWbool plain)
 
void _glfwInputScroll (_GLFWwindow *window, double xoffset, double yoffset)
 
void _glfwInputMouseClick (_GLFWwindow *window, int button, int action, int mods)
 
void _glfwInputCursorPos (_GLFWwindow *window, double xpos, double ypos)
 
void _glfwInputCursorEnter (_GLFWwindow *window, GLFWbool entered)
 
void _glfwInputDrop (_GLFWwindow *window, int count, const char **paths)
 
void _glfwInputJoystick (_GLFWjoystick *js, int event)
 
void _glfwInputJoystickAxis (_GLFWjoystick *js, int axis, float value)
 
void _glfwInputJoystickButton (_GLFWjoystick *js, int button, char value)
 
void _glfwInputJoystickHat (_GLFWjoystick *js, int hat, char value)
 
_GLFWjoystick_glfwAllocJoystick (const char *name, const char *guid, int axisCount, int buttonCount, int hatCount)
 
void _glfwFreeJoystick (_GLFWjoystick *js)
 
void _glfwCenterCursorInContentArea (_GLFWwindow *window)
 
GLFWAPI int glfwGetInputMode (GLFWwindow *handle, int mode)
 Returns the value of an input option for the specified window. More...
 
GLFWAPI void glfwSetInputMode (GLFWwindow *handle, int mode, int value)
 Sets an input option for the specified window. More...
 
GLFWAPI int glfwRawMouseMotionSupported (void)
 Returns whether raw mouse motion is supported. More...
 
GLFWAPI const char * glfwGetKeyName (int key, int scancode)
 Returns the layout-specific name of the specified printable key. More...
 
GLFWAPI int glfwGetKeyScancode (int key)
 Returns the platform-specific scancode of the specified key. More...
 
GLFWAPI int glfwGetKey (GLFWwindow *handle, int key)
 Returns the last reported state of a keyboard key for the specified window. More...
 
GLFWAPI int glfwGetMouseButton (GLFWwindow *handle, int button)
 Returns the last reported state of a mouse button for the specified window. More...
 
GLFWAPI void glfwGetCursorPos (GLFWwindow *handle, double *xpos, double *ypos)
 Retrieves the position of the cursor relative to the content area of the window. More...
 
GLFWAPI void glfwSetCursorPos (GLFWwindow *handle, double xpos, double ypos)
 Sets the position of the cursor, relative to the content area of the window. More...
 
GLFWAPI GLFWcursorglfwCreateCursor (const GLFWimage *image, int xhot, int yhot)
 Creates a custom cursor. More...
 
GLFWAPI GLFWcursorglfwCreateStandardCursor (int shape)
 Creates a cursor with a standard shape. More...
 
GLFWAPI void glfwDestroyCursor (GLFWcursor *handle)
 Destroys a cursor. More...
 
GLFWAPI void glfwSetCursor (GLFWwindow *windowHandle, GLFWcursor *cursorHandle)
 Sets the cursor for the window. More...
 
GLFWAPI GLFWkeyfun glfwSetKeyCallback (GLFWwindow *handle, GLFWkeyfun cbfun)
 Sets the key callback. More...
 
GLFWAPI GLFWcharfun glfwSetCharCallback (GLFWwindow *handle, GLFWcharfun cbfun)
 Sets the Unicode character callback. More...
 
GLFWAPI GLFWcharmodsfun glfwSetCharModsCallback (GLFWwindow *handle, GLFWcharmodsfun cbfun)
 Sets the Unicode character with modifiers callback. More...
 
GLFWAPI GLFWmousebuttonfun glfwSetMouseButtonCallback (GLFWwindow *handle, GLFWmousebuttonfun cbfun)
 Sets the mouse button callback. More...
 
GLFWAPI GLFWcursorposfun glfwSetCursorPosCallback (GLFWwindow *handle, GLFWcursorposfun cbfun)
 Sets the cursor position callback. More...
 
GLFWAPI GLFWcursorenterfun glfwSetCursorEnterCallback (GLFWwindow *handle, GLFWcursorenterfun cbfun)
 Sets the cursor enter/leave callback. More...
 
GLFWAPI GLFWscrollfun glfwSetScrollCallback (GLFWwindow *handle, GLFWscrollfun cbfun)
 Sets the scroll callback. More...
 
GLFWAPI GLFWdropfun glfwSetDropCallback (GLFWwindow *handle, GLFWdropfun cbfun)
 Sets the path drop callback. More...
 
GLFWAPI int glfwJoystickPresent (int jid)
 Returns whether the specified joystick is present. More...
 
GLFWAPI const float * glfwGetJoystickAxes (int jid, int *count)
 Returns the values of all axes of the specified joystick. More...
 
GLFWAPI const unsigned char * glfwGetJoystickButtons (int jid, int *count)
 Returns the state of all buttons of the specified joystick. More...
 
GLFWAPI const unsigned char * glfwGetJoystickHats (int jid, int *count)
 Returns the state of all hats of the specified joystick. More...
 
GLFWAPI const char * glfwGetJoystickName (int jid)
 Returns the name of the specified joystick. More...
 
GLFWAPI const char * glfwGetJoystickGUID (int jid)
 Returns the SDL compatible GUID of the specified joystick. More...
 
GLFWAPI void glfwSetJoystickUserPointer (int jid, void *pointer)
 Sets the user pointer of the specified joystick. More...
 
GLFWAPI void * glfwGetJoystickUserPointer (int jid)
 Returns the user pointer of the specified joystick. More...
 
GLFWAPI GLFWjoystickfun glfwSetJoystickCallback (GLFWjoystickfun cbfun)
 Sets the joystick configuration callback. More...
 
GLFWAPI int glfwUpdateGamepadMappings (const char *string)
 Adds the specified SDL_GameControllerDB gamepad mappings. More...
 
GLFWAPI int glfwJoystickIsGamepad (int jid)
 Returns whether the specified joystick has a gamepad mapping. More...
 
GLFWAPI const char * glfwGetGamepadName (int jid)
 Returns the human-readable gamepad name for the specified joystick. More...
 
GLFWAPI int glfwGetGamepadState (int jid, GLFWgamepadstate *state)
 Retrieves the state of the specified joystick remapped as a gamepad. More...
 
GLFWAPI void glfwSetClipboardString (GLFWwindow *handle, const char *string)
 Sets the clipboard to the specified string. More...
 
GLFWAPI const char * glfwGetClipboardString (GLFWwindow *handle)
 Returns the contents of the clipboard as a string. More...
 
GLFWAPI double glfwGetTime (void)
 Returns the GLFW time. More...
 
GLFWAPI void glfwSetTime (double time)
 Sets the GLFW time. More...
 
GLFWAPI uint64_t glfwGetTimerValue (void)
 Returns the current value of the raw timer. More...
 
GLFWAPI uint64_t glfwGetTimerFrequency (void)
 Returns the frequency, in Hz, of the raw timer. More...
 

Macro Definition Documentation

◆ _GLFW_JOYSTICK_AXIS

#define _GLFW_JOYSTICK_AXIS   1

Definition at line 42 of file input.c.

◆ _GLFW_JOYSTICK_BUTTON

#define _GLFW_JOYSTICK_BUTTON   2

Definition at line 43 of file input.c.

◆ _GLFW_JOYSTICK_HATBIT

#define _GLFW_JOYSTICK_HATBIT   3

Definition at line 44 of file input.c.

◆ _GLFW_STICK

#define _GLFW_STICK   3

Definition at line 39 of file input.c.

Function Documentation

◆ _glfwAllocJoystick()

_GLFWjoystick * _glfwAllocJoystick ( const char *  name,
const char *  guid,
int  axisCount,
int  buttonCount,
int  hatCount 
)

Definition at line 429 of file input.c.

+ Here is the caller graph for this function:

◆ _glfwCenterCursorInContentArea()

void _glfwCenterCursorInContentArea ( _GLFWwindow window)

Definition at line 475 of file input.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _glfwFreeJoystick()

void _glfwFreeJoystick ( _GLFWjoystick js)

Definition at line 465 of file input.c.

◆ _glfwInputChar()

void _glfwInputChar ( _GLFWwindow window,
unsigned int  codepoint,
int  mods,
GLFWbool  plain 
)

Definition at line 308 of file input.c.

◆ _glfwInputCursorEnter()

void _glfwInputCursorEnter ( _GLFWwindow window,
GLFWbool  entered 
)

Definition at line 370 of file input.c.

+ Here is the caller graph for this function:

◆ _glfwInputCursorPos()

void _glfwInputCursorPos ( _GLFWwindow window,
double  xpos,
double  ypos 
)

Definition at line 356 of file input.c.

◆ _glfwInputDrop()

void _glfwInputDrop ( _GLFWwindow window,
int  count,
const char **  paths 
)

Definition at line 378 of file input.c.

◆ _glfwInputJoystick()

void _glfwInputJoystick ( _GLFWjoystick js,
int  event 
)

Definition at line 386 of file input.c.

+ Here is the caller graph for this function:

◆ _glfwInputJoystickAxis()

void _glfwInputJoystickAxis ( _GLFWjoystick js,
int  axis,
float  value 
)

Definition at line 396 of file input.c.

+ Here is the caller graph for this function:

◆ _glfwInputJoystickButton()

void _glfwInputJoystickButton ( _GLFWjoystick js,
int  button,
char  value 
)

Definition at line 403 of file input.c.

+ Here is the caller graph for this function:

◆ _glfwInputJoystickHat()

void _glfwInputJoystickHat ( _GLFWjoystick js,
int  hat,
char  value 
)

Definition at line 410 of file input.c.

+ Here is the caller graph for this function:

◆ _glfwInputKey()

void _glfwInputKey ( _GLFWwindow window,
int  key,
int  scancode,
int  action,
int  mods 
)

Definition at line 277 of file input.c.

+ Here is the caller graph for this function:

◆ _glfwInputMouseClick()

void _glfwInputMouseClick ( _GLFWwindow window,
int  button,
int  action,
int  mods 
)

Definition at line 336 of file input.c.

+ Here is the caller graph for this function:

◆ _glfwInputScroll()

void _glfwInputScroll ( _GLFWwindow window,
double  xoffset,
double  yoffset 
)

Definition at line 328 of file input.c.