GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - libsdl-org/SDL_gesture: SDL2's gesture API split out into a single-header library.

BranchesTags
Open more actions menu

Latest commit

 

History

29 Commits
29 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
cmake
cmake
 
 
test
test
 
 
.editorconfig
.editorconfig
 
 
CMakeLists.txt
CMakeLists.txt
 
 
LICENSE.txt
LICENSE.txt
 
 
README.md
README.md
 
 
SDL_gesture.h
SDL_gesture.h
 
 

Repository files navigation

SDL_gesture

SDL3 is removing the Gesture API that was available in SDL2, so as a migration path, we are providing an equivalent as a single-header library that you can drop into your SDL3-based project.

We do not make formal releases of this code; just grab the latest and drop it into your project!

There's a lot of files in here

You only need SDL_gesture.h ...all the other stuff, including the CMake project files, are for the test app, which helps us make sure the header works, but you do not need any of these files to use the library.

Usage:

  • Copy SDL_gesture.h into your project.

  • Wherever you need access to this functionality, #include the header, after including SDL.h.

  • In ONLY ONE PLACE in your project, make sure you've #defined SDL_GESTURE_IMPLEMENTATION before including the header:

    #define SDL_GESTURE_IMPLEMENTATION 1
    #include "SDL_gesture.h"

    This will make the header include not just function declarations and such but also its implementation code.

  • To use the API, call this somewhere near startup, after SDL_Init:

    Gesture_Init();

    and then, before you call SDL_Quit at the end of your program:

    Gesture_Quit();

    Now you will get Gesture events from the SDL event queue.

  • SDL_RecordGesture, SDL_SaveAllDollarTemplates, SDL_SaveDollarTemplate, and SDL_LoadDollarTemplates work as before, they are just prefixed with "Gesture_" instead of "SDL_". Same with event types.

  • It is safe to add this to SDL2-based projects, as it will just use SDL2's existing API under the hood.

About

SDL2's gesture API split out into a single-header library.

Resources

Readme
Zlib license
Activity
Custom properties

Stars

34 stars

Watchers

5 watching

Forks

8 forks
Report repository

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.