-Demos:
*added ImGUI styles *added new assets (fonts, shaders) *added cimgui.dll *added imports for bindbc-sdl (for WASM) *added simple demo *added demo launcher *added snake demo *impoved demo utils *added cimgui.bc library for WASM -improved wasm build script -small change in vector
This commit is contained in:
parent
73f2aa6861
commit
cb7609dcaa
82 changed files with 11188 additions and 413 deletions
67
demos/external/wasm_imports/bindbc/sdl/bind/sdltouch.d
vendored
Normal file
67
demos/external/wasm_imports/bindbc/sdl/bind/sdltouch.d
vendored
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
|
||||
// Copyright Michael D. Parker 2018.
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
module bindbc.sdl.bind.sdltouch;
|
||||
|
||||
import bindbc.sdl.config;
|
||||
|
||||
alias SDL_TouchID = long;
|
||||
alias SDL_FingerID = long;
|
||||
|
||||
struct SDL_Finger {
|
||||
SDL_FingerID id;
|
||||
float x;
|
||||
float y;
|
||||
float pressure;
|
||||
}
|
||||
|
||||
enum DL_TOUCH_MOUSEID = cast(uint)-1;
|
||||
|
||||
static if(sdlSupport >= SDLSupport.sdl2010) {
|
||||
enum SDL_TouchDeviceType {
|
||||
SDL_TOUCH_DEVICE_INVALID = -1,
|
||||
SDL_TOUCH_DEVICE_DIRECT,
|
||||
SDL_TOUCH_DEVICE_INDIRECT_ABSOLUTE,
|
||||
SDL_TOUCH_DEVICE_INDIRECT_RELATIVE,
|
||||
}
|
||||
mixin(expandEnum!SDL_TouchDeviceType);
|
||||
|
||||
enum SDL_MOUSE_TOUCHID = -1L;
|
||||
}
|
||||
|
||||
version(BindSDL_Static) {
|
||||
extern(C) @nogc nothrow {
|
||||
int SDL_GetNumTouchDevices();
|
||||
SDL_TouchID SDL_GetTouchDevice(int);
|
||||
int SDL_GetNumTouchFingers(SDL_TouchID);
|
||||
SDL_Finger* SDL_GetTouchFinger(SDL_TouchID,int);
|
||||
}
|
||||
static if(sdlSupport >= SDLSupport.sdl2010) {
|
||||
SDL_TouchDeviceType SDL_GetTouchDeviceType(SDL_TouchID);
|
||||
}
|
||||
}
|
||||
else {
|
||||
extern(C) @nogc nothrow {
|
||||
alias pSDL_GetNumTouchDevices = int function();
|
||||
alias pSDL_GetTouchDevice = SDL_TouchID function(int);
|
||||
alias pSDL_GetNumTouchFingers = int function(SDL_TouchID);
|
||||
alias pSDL_GetTouchFinger = SDL_Finger* function(SDL_TouchID,int);
|
||||
}
|
||||
__gshared {
|
||||
pSDL_GetNumTouchDevices SDL_GetNumTouchDevices;
|
||||
pSDL_GetTouchDevice SDL_GetTouchDevice;
|
||||
pSDL_GetNumTouchFingers SDL_GetNumTouchFingers;
|
||||
pSDL_GetTouchFinger SDL_GetTouchFinger;
|
||||
}
|
||||
static if(sdlSupport >= SDLSupport.sdl2010) {
|
||||
extern(C) @nogc nothrow {
|
||||
alias pSDL_GetTouchDeviceType = SDL_TouchDeviceType function(SDL_TouchID);
|
||||
}
|
||||
__gshared {
|
||||
pSDL_GetTouchDeviceType SDL_GetTouchDeviceType;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue