├── docs ├── package-list ├── script.js ├── overview-frame.html ├── uk │ └── co │ │ └── electronstudio │ │ └── sdl2gdx │ │ ├── tests │ │ ├── package-frame.html │ │ ├── package-summary.html │ │ ├── package-tree.html │ │ └── SDLHotplugTest.html │ │ ├── package-frame.html │ │ ├── package-tree.html │ │ ├── package-summary.html │ │ ├── SDL2Controllers.html │ │ └── RumbleController.html ├── org │ └── libsdl │ │ ├── package-frame.html │ │ ├── package-tree.html │ │ ├── package-summary.html │ │ ├── GameController.html │ │ ├── SDL_Error.html │ │ ├── SDL_GameControllerID.html │ │ └── SDL.Event.html ├── allclasses-noframe.html ├── index.html ├── allclasses-frame.html ├── deprecated-list.html ├── overview-summary.html ├── serialized-form.html ├── help-doc.html └── overview-tree.html ├── libs ├── windows32 │ └── sdl2gdx.dll ├── linux64 │ └── libsdl2gdx64.so ├── windows64 │ └── sdl2gdx64.dll └── macosx64 │ └── libsdl2gdx64.dylib ├── src ├── org │ └── libsdl │ │ ├── GameController.java │ │ ├── SDL_Error.java │ │ ├── SDL_GameControllerID.java │ │ ├── SDL_JoystickID.java │ │ └── SDL_GameController.java ├── uk │ └── co │ │ └── electronstudio │ │ └── sdl2gdx │ │ ├── SDL2Controllers.java │ │ ├── RumbleController.java │ │ ├── tests │ │ ├── SDLHotplugTest.java │ │ └── SDLTest.java │ │ ├── SDL2ControllerManager.java │ │ └── NativesBuild.java └── com │ └── badlogic │ └── gdx │ ├── controllers │ ├── desktop │ │ └── DesktopControllerManager.java │ └── lwjgl3 │ │ └── Lwjgl3ControllerManager.java │ └── jnigen │ └── BuildExecutorFixed.java ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── LICENSE ├── overview.html ├── .gitignore ├── ADVANCED.md ├── gradlew.bat ├── BUILDING.md ├── README.md └── gradlew /docs/package-list: -------------------------------------------------------------------------------- 1 | org.libsdl 2 | uk.co.electronstudio.sdl2gdx 3 | uk.co.electronstudio.sdl2gdx.tests 4 | -------------------------------------------------------------------------------- /libs/windows32/sdl2gdx.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/electronstudio/sdl2gdx/HEAD/libs/windows32/sdl2gdx.dll -------------------------------------------------------------------------------- /libs/linux64/libsdl2gdx64.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/electronstudio/sdl2gdx/HEAD/libs/linux64/libsdl2gdx64.so -------------------------------------------------------------------------------- /libs/windows64/sdl2gdx64.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/electronstudio/sdl2gdx/HEAD/libs/windows64/sdl2gdx64.dll -------------------------------------------------------------------------------- /libs/macosx64/libsdl2gdx64.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/electronstudio/sdl2gdx/HEAD/libs/macosx64/libsdl2gdx64.dylib -------------------------------------------------------------------------------- /src/org/libsdl/GameController.java: -------------------------------------------------------------------------------- 1 | package org.libsdl; 2 | 3 | public class GameController { 4 | 5 | 6 | 7 | } 8 | 9 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/electronstudio/sdl2gdx/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /src/uk/co/electronstudio/sdl2gdx/SDL2Controllers.java: -------------------------------------------------------------------------------- 1 | package uk.co.electronstudio.sdl2gdx; 2 | 3 | public class SDL2Controllers { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /src/org/libsdl/SDL_Error.java: -------------------------------------------------------------------------------- 1 | package org.libsdl; 2 | 3 | public class SDL_Error extends Exception{ 4 | public SDL_Error() { 5 | super(SDL.SDL_GetError()); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2020 Electron Studio 2 | 3 | This project is released under 4 | 5 | GNU GENERAL PUBLIC LICENSE WITH THE CLASSPATH EXCEPTION 6 | 7 | However Github incorrectly detects this license, so it has been moved into REAL-LICENSE.txt file. -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /src/com/badlogic/gdx/controllers/desktop/DesktopControllerManager.java: -------------------------------------------------------------------------------- 1 | package com.badlogic.gdx.controllers.desktop; 2 | 3 | import uk.co.electronstudio.sdl2gdx.SDL2ControllerManager; 4 | 5 | public class DesktopControllerManager extends SDL2ControllerManager { 6 | } 7 | -------------------------------------------------------------------------------- /src/com/badlogic/gdx/controllers/lwjgl3/Lwjgl3ControllerManager.java: -------------------------------------------------------------------------------- 1 | package com.badlogic.gdx.controllers.lwjgl3; 2 | 3 | import uk.co.electronstudio.sdl2gdx.SDL2ControllerManager; 4 | 5 | public class Lwjgl3ControllerManager extends SDL2ControllerManager { 6 | } 7 | 8 | -------------------------------------------------------------------------------- /src/uk/co/electronstudio/sdl2gdx/RumbleController.java: -------------------------------------------------------------------------------- 1 | package uk.co.electronstudio.sdl2gdx; 2 | 3 | import com.badlogic.gdx.controllers.Controller; 4 | 5 | public interface RumbleController extends Controller { 6 | boolean rumble(float leftMagnitude, float rightMagnitude, int duration_ms); 7 | } 8 | -------------------------------------------------------------------------------- /src/org/libsdl/SDL_GameControllerID.java: -------------------------------------------------------------------------------- 1 | package org.libsdl; 2 | 3 | import java.util.Objects; 4 | 5 | public class SDL_GameControllerID { 6 | final int id; 7 | SDL_GameControllerID(int id) { this.id = id;} 8 | 9 | @Override 10 | public boolean equals(Object o) { 11 | if (this == o) return true; 12 | if (o == null || getClass() != o.getClass()) return false; 13 | SDL_GameControllerID that = (SDL_GameControllerID) o; 14 | return id == that.id; 15 | } 16 | 17 | @Override 18 | public int hashCode() { 19 | return Objects.hash(id); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/org/libsdl/SDL_JoystickID.java: -------------------------------------------------------------------------------- 1 | package org.libsdl; 2 | 3 | import java.util.Objects; 4 | 5 | public final class SDL_JoystickID { 6 | public final int id; 7 | SDL_JoystickID(int id) { this.id = id;} 8 | 9 | @Override 10 | public boolean equals(Object o) { 11 | if (this == o) return true; 12 | if (o == null || getClass() != o.getClass()) return false; 13 | SDL_JoystickID that = (SDL_JoystickID) o; 14 | return id == that.id; 15 | } 16 | 17 | @Override 18 | public int hashCode() { 19 | return Objects.hash(id); 20 | } 21 | 22 | @Override 23 | public String toString(){ 24 | return ""+id; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /overview.html: -------------------------------------------------------------------------------- 1 |
2 |This library provides APIs at three layers:
4 |Thanks to Jamepad by William Harman for providing the build system and inspiring this project.
11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/script.js: -------------------------------------------------------------------------------- 1 | function show(type) 2 | { 3 | count = 0; 4 | for (var key in methods) { 5 | var row = document.getElementById(key); 6 | if ((methods[key] & type) != 0) { 7 | row.style.display = ''; 8 | row.className = (count++ % 2) ? rowColor : altColor; 9 | } 10 | else 11 | row.style.display = 'none'; 12 | } 13 | updateTabs(type); 14 | } 15 | 16 | function updateTabs(type) 17 | { 18 | for (var value in tabs) { 19 | var sNode = document.getElementById(tabs[value][0]); 20 | var spanNode = sNode.firstChild; 21 | if (value == type) { 22 | sNode.className = activeTableTab; 23 | spanNode.innerHTML = tabs[value][1]; 24 | } 25 | else { 26 | sNode.className = tableTab; 27 | spanNode.innerHTML = "" + tabs[value][1] + ""; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Java 2 | 3 | jni/ 4 | *.class 5 | *.war 6 | *.ear 7 | hs_err_pid* 8 | 9 | ## GWT 10 | war/ 11 | html/war/gwt_bree/ 12 | html/gwt-unitCache/ 13 | .apt_generated/ 14 | html/war/WEB-INF/deploy/ 15 | html/war/WEB-INF/classes/ 16 | .gwt/ 17 | gwt-unitCache/ 18 | www-test/ 19 | .gwt-tmp/ 20 | 21 | ## Android Studio and Intellij and Android in general 22 | android/libs/armeabi/ 23 | android/libs/armeabi-v7a/ 24 | android/libs/x86/ 25 | android/gen/ 26 | .idea/ 27 | *.ipr 28 | *.iws 29 | *.iml 30 | out/ 31 | com_crashlytics_export_strings.xml 32 | 33 | ## Eclipse 34 | .classpath 35 | .project 36 | .metadata 37 | **/bin/ 38 | tmp/ 39 | *.tmp 40 | *.bak 41 | *.swp 42 | *~.nib 43 | local.properties 44 | .settings/ 45 | .loadpath 46 | .externalToolBuilders/ 47 | *.launch 48 | 49 | ## NetBeans 50 | **/nbproject/private/ 51 | build/ 52 | nbbuild/ 53 | dist/ 54 | nbdist/ 55 | nbactions.xml 56 | nb-configuration.xml 57 | 58 | ## Gradle 59 | 60 | .gradle 61 | gradle-app.setting 62 | build/ 63 | 64 | ## OS Specific 65 | .DS_Store 66 | -------------------------------------------------------------------------------- /docs/overview-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |22 | 23 | 24 | -------------------------------------------------------------------------------- /docs/uk/co/electronstudio/sdl2gdx/tests/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
See: Description
79 || Package | 85 |Description | 86 |
|---|---|
| org.libsdl | 90 |91 | |
| uk.co.electronstudio.sdl2gdx | 94 |95 | |
| uk.co.electronstudio.sdl2gdx.tests | 98 |99 | |
This library provides APIs at three layers:
108 |Thanks to Jamepad by William Harman for providing the build system and inspiring this project.
| Class | 81 |Description | 82 |
|---|---|
| SDLHotplugTest | 86 |87 | |
| SDLTest | 90 |
91 | A quick and dirty interface to check if a controller is working.
92 | |
93 |
| SDLTest.OptionPanel | 96 |97 | |
| SDLTest.SDLInfoPanel | 100 |
101 | A JPanel that displays information about a given ControllerIndex.
102 | |
103 |
javax.swing.JPanel title100 |
javax.swing.JButton restartButton104 |
javax.swing.JLabel titleLabel108 |
javax.swing.JPanel title124 |
javax.swing.JPanel axes128 |
javax.swing.JPanel buttons132 |
javax.swing.JPanel pov136 |
javax.swing.JSlider leftRumble140 |
javax.swing.JSlider rightRumble144 |
javax.swing.JButton vibrateButton148 |
javax.swing.JLabel titleLabel152 |
| Class | 81 |Description | 82 |
|---|---|
| GameController | 86 |87 | |
| SDL | 90 |91 | |
| SDL_GameController | 94 |95 | |
| SDL_GameControllerID | 98 |99 | |
| SDL_Joystick | 102 |
103 | \file SDL_joystick.h
104 |
109 | 105 | Include file for SDL joystick event handling 106 | 107 | The term "device_index" identifies currently plugged in joystick devices between 0 and SDL_NumJoysticks(), with the exact joystick 108 | behind a device_index changing as joysticks are plugged and unplugged. |
110 |
| SDL_JoystickID | 113 |114 | |
| SDL.Event | 117 |118 | |
| Exception | 127 |Description | 128 |
|---|---|
| SDL_Error | 132 |133 | |
| Interface | 81 |Description | 82 |
|---|---|
| RumbleController | 86 |87 | |
| Class | 96 |Description | 97 |
|---|---|
| SDL2Controller | 101 |102 | |
| SDL2ControllerManager | 105 |106 | |
| SDL2Controllers | 109 |110 | |
| Enum | 119 |Description | 120 |
|---|---|
| SDL2Controller.ControllerType | 124 |125 | |
| SDL2Controller.PowerLevel | 128 |129 | |
| SDL2ControllerManager.InputPreference | 132 |133 | |
public class GameController
106 | extends java.lang.Object
107 | | Constructor and Description | 123 |
|---|
GameController() |
126 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic GameController()164 |
public class SDL2Controllers
106 | extends java.lang.Object
107 | | Constructor and Description | 123 |
|---|
SDL2Controllers() |
126 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic SDL2Controllers()164 |
public class SDL_Error
120 | extends java.lang.Exception
121 | | Constructor and Description | 141 |
|---|
SDL_Error() |
144 |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic SDL_Error()189 |
public interface RumbleController
112 | extends com.badlogic.gdx.controllers.Controller
113 | | Modifier and Type | 129 |Method and Description | 130 |
|---|---|
boolean |
133 | rumble(float leftMagnitude,
134 | float rightMagnitude,
135 | int duration_ms) |
136 |
addListener, getAccelerometer, getAxis, getButton, getName, getPov, getSliderX, getSliderY, removeListener, setAccelerometerSensitivityboolean rumble(float leftMagnitude, 166 | float rightMagnitude, 167 | int duration_ms)168 |
The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.
80 |Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:
84 |Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:
96 |Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
116 |Each annotation type has its own separate page with the following sections:
120 |Each enum has its own separate page with the following sections:
131 |There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object.
The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.
149 |The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.
153 |These links take you to the next or previous class, interface, package, or related page.
157 |These links show and hide the HTML frames. All pages are available with or without frames.
161 |The All Classes link shows all classes and interfaces except non-static nested types.
165 |Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.
169 |The Constant Field Values page lists the static final fields and their values.
173 |public class SDL_GameControllerID
112 | extends java.lang.Object
113 | | Modifier and Type | 129 |Method and Description | 130 |
|---|---|
boolean |
133 | equals(java.lang.Object o) |
134 |
int |
137 | hashCode() |
138 |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitpublic boolean equals(java.lang.Object o)168 |
equals in class java.lang.Objectpublic int hashCode()181 |
hashCode in class java.lang.Objectpublic class SDLHotplugTest
112 | extends java.lang.Object
113 | | Constructor and Description | 129 |
|---|
SDLHotplugTest() |
132 |
| Modifier and Type | 146 |Method and Description | 147 |
|---|---|
static void |
150 | main(java.lang.String[] args) |
151 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic SDLHotplugTest()181 |
public static void main(java.lang.String[] args)198 |
public static class SDL.Event
110 | extends java.lang.Object
111 | | Modifier and Type | 127 |Field and Description | 128 |
|---|---|
static int |
131 | SDL_JOYDEVICEADDED |
132 |
static int |
135 | SDL_JOYDEVICEREMOVED |
136 |
int |
139 | timestamp |
140 |
int |
143 | type |
144 |
| Constructor and Description | 158 |
|---|
Event() |
161 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic static int SDL_JOYDEVICEADDED199 |
public static int SDL_JOYDEVICEREMOVED208 |
public int type217 |
public int timestamp226 |
public Event()243 |