{"payload":{"allShortcutsEnabled":false,"fileTree":{"":{"items":[{"name":"VisualC-WinRT","path":"VisualC-WinRT","contentType":"directory"},{"name":"VisualC","path":"VisualC","contentType":"directory"},{"name":"Xcode-iOS","path":"Xcode-iOS","contentType":"directory"},{"name":"Xcode","path":"Xcode","contentType":"directory"},{"name":"acinclude","path":"acinclude","contentType":"directory"},{"name":"android-project","path":"android-project","contentType":"directory"},{"name":"build-scripts","path":"build-scripts","contentType":"directory"},{"name":"cmake","path":"cmake","contentType":"directory"},{"name":"debian","path":"debian","contentType":"directory"},{"name":"include","path":"include","contentType":"directory"},{"name":"premake","path":"premake","contentType":"directory"},{"name":"src","path":"src","contentType":"directory"},{"name":"test","path":"test","contentType":"directory"},{"name":"visualtest","path":"visualtest","contentType":"directory"},{"name":".hgignore","path":".hgignore","contentType":"file"},{"name":"Android.mk","path":"Android.mk","contentType":"file"},{"name":"BUGS.txt","path":"BUGS.txt","contentType":"file"},{"name":"CMakeLists.txt","path":"CMakeLists.txt","contentType":"file"},{"name":"COPYING.txt","path":"COPYING.txt","contentType":"file"},{"name":"CREDITS.txt","path":"CREDITS.txt","contentType":"file"},{"name":"INSTALL.txt","path":"INSTALL.txt","contentType":"file"},{"name":"Makefile.in","path":"Makefile.in","contentType":"file"},{"name":"Makefile.minimal","path":"Makefile.minimal","contentType":"file"},{"name":"Makefile.pandora","path":"Makefile.pandora","contentType":"file"},{"name":"Makefile.psp","path":"Makefile.psp","contentType":"file"},{"name":"Makefile.wiz","path":"Makefile.wiz","contentType":"file"},{"name":"README-SDL.txt","path":"README-SDL.txt","contentType":"file"},{"name":"README-android.txt","path":"README-android.txt","contentType":"file"},{"name":"README-cmake.txt","path":"README-cmake.txt","contentType":"file"},{"name":"README-directfb.txt","path":"README-directfb.txt","contentType":"file"},{"name":"README-dynapi.txt","path":"README-dynapi.txt","contentType":"file"},{"name":"README-gesture.txt","path":"README-gesture.txt","contentType":"file"},{"name":"README-hg.txt","path":"README-hg.txt","contentType":"file"},{"name":"README-ios.txt","path":"README-ios.txt","contentType":"file"},{"name":"README-linux.txt","path":"README-linux.txt","contentType":"file"},{"name":"README-macosx.txt","path":"README-macosx.txt","contentType":"file"},{"name":"README-nacl.txt","path":"README-nacl.txt","contentType":"file"},{"name":"README-pandora.txt","path":"README-pandora.txt","contentType":"file"},{"name":"README-platforms.txt","path":"README-platforms.txt","contentType":"file"},{"name":"README-porting.txt","path":"README-porting.txt","contentType":"file"},{"name":"README-psp.txt","path":"README-psp.txt","contentType":"file"},{"name":"README-raspberrypi.txt","path":"README-raspberrypi.txt","contentType":"file"},{"name":"README-touch.txt","path":"README-touch.txt","contentType":"file"},{"name":"README-wince.txt","path":"README-wince.txt","contentType":"file"},{"name":"README-windows.txt","path":"README-windows.txt","contentType":"file"},{"name":"README-winrt.txt","path":"README-winrt.txt","contentType":"file"},{"name":"README.txt","path":"README.txt","contentType":"file"},{"name":"SDL2.spec.in","path":"SDL2.spec.in","contentType":"file"},{"name":"TODO.txt","path":"TODO.txt","contentType":"file"},{"name":"VisualC.html","path":"VisualC.html","contentType":"file"},{"name":"WhatsNew.txt","path":"WhatsNew.txt","contentType":"file"},{"name":"autogen.sh","path":"autogen.sh","contentType":"file"},{"name":"cmake_uninstall.cmake.in","path":"cmake_uninstall.cmake.in","contentType":"file"},{"name":"configure","path":"configure","contentType":"file"},{"name":"configure.in","path":"configure.in","contentType":"file"},{"name":"sdl2-config.in","path":"sdl2-config.in","contentType":"file"},{"name":"sdl2.m4","path":"sdl2.m4","contentType":"file"},{"name":"sdl2.pc.in","path":"sdl2.pc.in","contentType":"file"}],"totalCount":58}},"fileTreeProcessingTime":2.3070209999999998,"foldersToFetch":[],"repo":{"id":330008801,"defaultBranch":"main","name":"SDL","ownerLogin":"libsdl-org","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2021-01-15T19:55:54.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/77683370?v=4","public":true,"private":false,"isOrgOwned":true},"symbolsExpanded":false,"treeExpanded":true,"refInfo":{"name":"a838a56d45b237888810ca4c76d9345fe98f27f6","listCacheKey":"v0:1709678518.0","canEdit":false,"refType":"tree","currentOid":"a838a56d45b237888810ca4c76d9345fe98f27f6"},"path":"README-gesture.txt","currentUser":null,"blob":{"rawLines":["===========================================================================\r","Dollar Gestures\r","===========================================================================\r","SDL Provides an implementation of the $1 gesture recognition system. This allows for recording, saving, loading, and performing single stroke gestures.\r","\r","Gestures can be performed with any number of fingers (the centroid of the fingers must follow the path of the gesture), but the number of fingers must be constant (a finger cannot go down in the middle of a gesture). The path of a gesture is considered the path from the time when the final finger went down, to the first time any finger comes up. \r","\r","Dollar gestures are assigned an Id based on a hash function. This is guaranteed to remain constant for a given gesture. There is a (small) chance that two different gestures will be assigned the same ID. In this case, simply re-recording one of the gestures should result in a different ID.\r","\r","Recording:\r","----------\r","To begin recording on a touch device call:\r","SDL_RecordGesture(SDL_TouchID touchId), where touchId is the id of the touch device you wish to record on, or -1 to record on all connected devices.\r","\r","Recording terminates as soon as a finger comes up. Recording is acknowledged by an SDL_DOLLARRECORD event.\r","A SDL_DOLLARRECORD event is a dgesture with the following fields:\r","\r","event.dgesture.touchId - the Id of the touch used to record the gesture.\r","event.dgesture.gestureId - the unique id of the recorded gesture.\r","\r","\r","Performing:\r","-----------\r","As long as there is a dollar gesture assigned to a touch, every finger-up event will also cause an SDL_DOLLARGESTURE event with the following fields:\r","\r","event.dgesture.touchId - the Id of the touch which performed the gesture.\r","event.dgesture.gestureId - the unique id of the closest gesture to the performed stroke.\r","event.dgesture.error - the difference between the gesture template and the actual performed gesture. Lower error is a better match.\r","event.dgesture.numFingers - the number of fingers used to draw the stroke.\r","\r","Most programs will want to define an appropriate error threshold and check to be sure that the error of a gesture is not abnormally high (an indicator that no gesture was performed).\r","\r","\r","\r","Saving:\r","-------\r","To save a template, call SDL_SaveDollarTemplate(gestureId, dst) where gestureId is the id of the gesture you want to save, and dst is an SDL_RWops pointer to the file where the gesture will be stored.\r","\r","To save all currently loaded templates, call SDL_SaveAllDollarTemplates(dst) where dst is an SDL_RWops pointer to the file where the gesture will be stored.\r","\r","Both functions return the number of gestures successfully saved.\r","\r","\r","Loading:\r","--------\r","To load templates from a file, call SDL_LoadDollarTemplates(touchId,src) where touchId is the id of the touch to load to (or -1 to load to all touch devices), and src is an SDL_RWops pointer to a gesture save file. \r","\r","SDL_LoadDollarTemplates returns the number of templates successfully loaded.\r","\r","\r","\r","===========================================================================\r","Multi Gestures\r","===========================================================================\r","SDL provides simple support for pinch/rotate/swipe gestures. \r","Every time a finger is moved an SDL_MULTIGESTURE event is sent with the following fields:\r","\r","event.mgesture.touchId - the Id of the touch on which the gesture was performed.\r","event.mgesture.x - the normalized x coordinate of the gesture. (0..1)\r","event.mgesture.y - the normalized y coordinate of the gesture. (0..1)\r","event.mgesture.dTheta - the amount that the fingers rotated during this motion.\r","event.mgesture.dDist - the amount that the fingers pinched during this motion.\r","event.mgesture.numFingers - the number of fingers used in the gesture.\r","\r","\r","===========================================================================\r","Notes\r","===========================================================================\r","For a complete example see test/testgesture.c\r","\r","Please direct questions/comments to:\r"," jim.tla+sdl_touch@gmail.com\r"],"stylingDirectives":[[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]],"colorizedLines":null,"csv":null,"csvError":null,"dependabotInfo":{"showConfigurationBanner":false,"configFilePath":null,"networkDependabotPath":"/libsdl-org/SDL/network/updates","dismissConfigurationNoticePath":"/settings/dismiss-notice/dependabot_configuration_notice","configurationNoticeDismissed":null},"displayName":"README-gesture.txt","displayUrl":"https://github.com/libsdl-org/SDL/blame/a838a56d45b237888810ca4c76d9345fe98f27f6/README-gesture.txt?raw=true","headerInfo":{"blobSize":"4.03 KB","deleteTooltip":"You must be signed in to make or propose changes","editTooltip":"You must be signed in to make or propose changes","ghDesktopPath":null,"isGitLfs":false,"onBranch":false,"shortPath":"c2cad7b","siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2Flibsdl-org%2FSDL%2Fblame%2Fa838a56d45b237888810ca4c76d9345fe98f27f6%2FREADME-gesture.txt","isCSV":false,"isRichtext":false,"toc":null,"lineInfo":{"truncatedLoc":"72","truncatedSloc":"48"},"mode":"file"},"image":false,"isCodeownersFile":null,"isPlain":false,"isValidLegacyIssueTemplate":false,"issueTemplate":null,"discussionTemplate":null,"language":"Text","languageID":372,"large":false,"planSupportInfo":{"repoIsFork":null,"repoOwnedByCurrentUser":null,"requestFullPath":"/libsdl-org/SDL/blame/a838a56d45b237888810ca4c76d9345fe98f27f6/README-gesture.txt","showFreeOrgGatedFeatureMessage":null,"showPlanSupportBanner":null,"upgradeDataAttributes":null,"upgradePath":null},"publishBannersInfo":{"dismissActionNoticePath":"/settings/dismiss-notice/publish_action_from_dockerfile","releasePath":"/libsdl-org/SDL/releases/new?marketplace=true","showPublishActionBanner":false},"rawBlobUrl":"https://github.com/libsdl-org/SDL/raw/a838a56d45b237888810ca4c76d9345fe98f27f6/README-gesture.txt","renderImageOrRaw":false,"richText":null,"renderedFileInfo":null,"shortPath":null,"symbolsEnabled":true,"tabSize":8,"topBannersInfo":{"overridingGlobalFundingFile":false,"globalPreferredFundingPath":null,"showInvalidCitationWarning":false,"citationHelpUrl":"https://docs.github.com/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/about-citation-files","actionsOnboardingTip":null},"truncated":false,"viewable":true,"workflowRedirectUrl":null,"symbols":{"timed_out":false,"not_analyzed":true,"symbols":[]}},"copilotInfo":null,"copilotAccessAllowed":false,"blame":{"ranges":{"1":{"start":1,"oldStart":1,"end":72,"oldEnd":72,"commitOid":"3dcb451f85773e07bef3c5d1668c58ea6755c7f1","reblamePath":null}},"commits":{"3dcb451f85773e07bef3c5d1668c58ea6755c7f1":{"oid":"3dcb451f85773e07bef3c5d1668c58ea6755c7f1","message":"Added a README file regarding WinRT support\n\nTo note, this file is currently formatted with CRLF line endings, rather than\nLF, to allow the file to be viewed with Notepad.","shortMessageHtmlLink":"Added a README file regarding WinRT support","authorAvatarUrl":"https://avatars.githubusercontent.com/u/475856?s=80&v=4","committerName":"David Ludwig","committerEmail":"dludwig@pobox.com","committedDate":"2014-04-09T21:29:19.000-04:00","firstParentOid":null}},"ignoreRevs":{"path":".git-blame-ignore-revs","present":false,"timedOut":null}},"csrf_tokens":{"/libsdl-org/SDL/branches":{"post":"A6yEPhAylHR7HszCOi6zIp_0zqE-fX0VJ6qBwImjpmp4lCE8hGG-X2PxywaEtTzcMBe-NWs21-34mqDqQvC7UA"},"/repos/preferences":{"post":"-H8-gD7eBCm8e0KBcwBnVBB2iFC4pgwh3NZcY8LGg1NVFctdJBwjepR_U732DF_VZAYkZRahNEJIBYUhFehkMw"}}},"title":"Blaming SDL/README-gesture.txt at a838a56d45b237888810ca4c76d9345fe98f27f6 ยท libsdl-org/SDL"}