Macros | Functions
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:

Go to the source code of this file.

Macros

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

Functions

_GLFWjoystick_glfwAllocJoystick (const char *name, const char *guid, int axisCount, int buttonCount, int hatCount)
 
void _glfwFreeJoystick (_GLFWjoystick *js)
 
void _glfwInputChar (_GLFWwindow *window, unsigned int codepoint, int mods, GLFWbool plain)
 
void _glfwInputCursorEnter (_GLFWwindow *window, GLFWbool entered)
 
void _glfwInputCursorPos (_GLFWwindow *window, double xpos, double ypos)
 
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)
 
void _glfwInputKey (_GLFWwindow *window, int key, int scancode, int action, int mods)
 
void _glfwInputMouseClick (_GLFWwindow *window, int button, int action, int mods)
 
void _glfwInputScroll (_GLFWwindow *window, double xoffset, double yoffset)
 
static _GLFWmappingfindMapping (const char *guid)
 
static _GLFWmappingfindValidMapping (const _GLFWjoystick *js)
 
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 const char * glfwGetClipboardString (GLFWwindow *handle)
 Returns the contents of the clipboard as a string. More...
 
GLFWAPI void glfwGetCursorPos (GLFWwindow *handle, double *xpos, double *ypos)
 Retrieves the position of the cursor relative to the client area of the window. 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 int glfwGetInputMode (GLFWwindow *handle, int mode)
 Returns the value of an input option for the specified window. 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 char * glfwGetJoystickGUID (int jid)
 Returns the SDL comaptible GUID 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 voidglfwGetJoystickUserPointer (int jid)
 Returns the user pointer of the specified joystick. More...
 
GLFWAPI int glfwGetKey (GLFWwindow *handle, int key)
 Returns the last reported state of a keyboard key for the specified window. 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 glfwGetMouseButton (GLFWwindow *handle, int button)
 Returns the last reported state of a mouse button for the specified window. More...
 
GLFWAPI double glfwGetTime (void)
 Returns the value of the GLFW timer. More...
 
GLFWAPI uint64_t glfwGetTimerFrequency (void)
 Returns the frequency, in Hz, of the raw timer. More...
 
GLFWAPI uint64_t glfwGetTimerValue (void)
 Returns the current value of the raw timer. More...
 
GLFWAPI int glfwJoystickIsGamepad (int jid)
 Returns whether the specified joystick has a gamepad mapping. More...
 
GLFWAPI int glfwJoystickPresent (int jid)
 Returns whether the specified joystick is present. 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 void glfwSetClipboardString (GLFWwindow *handle, const char *string)
 Sets the clipboard to the specified string. More...
 
GLFWAPI void glfwSetCursor (GLFWwindow *windowHandle, GLFWcursor *cursorHandle)
 Sets the cursor for the window. More...
 
GLFWAPI GLFWcursorenterfun glfwSetCursorEnterCallback (GLFWwindow *handle, GLFWcursorenterfun cbfun)
 Sets the cursor enter/exit callback. More...
 
GLFWAPI void glfwSetCursorPos (GLFWwindow *handle, double xpos, double ypos)
 Sets the position of the cursor, relative to the client area of the window. More...
 
GLFWAPI GLFWcursorposfun glfwSetCursorPosCallback (GLFWwindow *handle, GLFWcursorposfun cbfun)
 Sets the cursor position callback. More...
 
GLFWAPI GLFWdropfun glfwSetDropCallback (GLFWwindow *handle, GLFWdropfun cbfun)
 Sets the file drop callback. More...
 
GLFWAPI void glfwSetInputMode (GLFWwindow *handle, int mode, int value)
 Sets an input option for the specified window. More...
 
GLFWAPI GLFWjoystickfun glfwSetJoystickCallback (GLFWjoystickfun cbfun)
 Sets the joystick configuration callback. More...
 
GLFWAPI void glfwSetJoystickUserPointer (int jid, void *pointer)
 Sets the user pointer of the specified joystick. More...
 
GLFWAPI GLFWkeyfun glfwSetKeyCallback (GLFWwindow *handle, GLFWkeyfun cbfun)
 Sets the key callback. More...
 
GLFWAPI GLFWmousebuttonfun glfwSetMouseButtonCallback (GLFWwindow *handle, GLFWmousebuttonfun cbfun)
 Sets the mouse button callback. More...
 
GLFWAPI GLFWscrollfun glfwSetScrollCallback (GLFWwindow *handle, GLFWscrollfun cbfun)
 Sets the scroll callback. More...
 
GLFWAPI void glfwSetTime (double time)
 Sets the GLFW timer. More...
 
GLFWAPI int glfwUpdateGamepadMappings (const char *string)
 Adds the specified SDL_GameControllerDB gamepad mappings. More...
 
static GLFWbool isValidElementForJoystick (const _GLFWmapelement *e, const _GLFWjoystick *js)
 
static GLFWbool parseMapping (_GLFWmapping *mapping, const char *string)
 

Macro Definition Documentation

#define _GLFW_JOYSTICK_AXIS   1

Definition at line 40 of file input.c.

#define _GLFW_JOYSTICK_BUTTON   2

Definition at line 41 of file input.c.

#define _GLFW_JOYSTICK_HATBIT   3

Definition at line 42 of file input.c.

#define _GLFW_STICK   3

Definition at line 37 of file input.c.

Function Documentation

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

Definition at line 411 of file input.c.

void _glfwFreeJoystick ( _GLFWjoystick js)

Definition at line 447 of file input.c.

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

Definition at line 290 of file input.c.

void _glfwInputCursorEnter ( _GLFWwindow window,
GLFWbool  entered 
)

Definition at line 352 of file input.c.

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

Definition at line 338 of file input.c.

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

Definition at line 360 of file input.c.

void _glfwInputJoystick ( _GLFWjoystick js,
int  event 
)

Definition at line 368 of file input.c.

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

Definition at line 378 of file input.c.

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

Definition at line 385 of file input.c.

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

Definition at line 392 of file input.c.

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

Definition at line 259 of file input.c.

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

Definition at line 318 of file input.c.

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

Definition at line 310 of file input.c.

static _GLFWmapping* findMapping ( const char *  guid)
static

Definition at line 46 of file input.c.

static _GLFWmapping* findValidMapping ( const _GLFWjoystick js)
static

Definition at line 76 of file input.c.

static GLFWbool isValidElementForJoystick ( const _GLFWmapelement e,
const _GLFWjoystick js 
)
static

Definition at line 61 of file input.c.

static GLFWbool parseMapping ( _GLFWmapping mapping,
const char *  string 
)
static

Definition at line 113 of file input.c.



librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:50:26