-improved WASM compilation scripts
-added external bindbc.sdl import for WASM -working on demos (WIP, working simple demo with ECS and SDL2) -small change in ecs.std
This commit is contained in:
parent
a8c74d5045
commit
73f2aa6861
60 changed files with 9015 additions and 67 deletions
75
demos/external/imports/bindbc/sdl/bind/sdlmessagebox.d
vendored
Normal file
75
demos/external/imports/bindbc/sdl/bind/sdlmessagebox.d
vendored
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
|
||||
// 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.sdlmessagebox;
|
||||
|
||||
import bindbc.sdl.config;
|
||||
import bindbc.sdl.bind.sdlvideo : SDL_Window;
|
||||
|
||||
enum SDL_MessageBoxFlags {
|
||||
SDL_MESSAGEBOX_ERROR = 0x00000010,
|
||||
SDL_MESSAGEBOX_WARNING = 0x00000020,
|
||||
SDL_MESSAGEBOX_INFORMATION = 0x00000040,
|
||||
}
|
||||
mixin(expandEnum!SDL_MessageBoxFlags);
|
||||
|
||||
enum SDL_MessageBoxButtonFlags {
|
||||
SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT = 0x00000001,
|
||||
SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT = 0x00000002,
|
||||
}
|
||||
mixin(expandEnum!SDL_MessageBoxButtonFlags);
|
||||
|
||||
struct SDL_MessageBoxButtonData {
|
||||
uint flags;
|
||||
int buttonid;
|
||||
const(char)* text;
|
||||
}
|
||||
|
||||
struct SDL_MessageBoxColor {
|
||||
ubyte r, g, b;
|
||||
}
|
||||
|
||||
enum SDL_MessageBoxColorType {
|
||||
SDL_MESSAGEBOX_COLOR_BACKGROUND,
|
||||
SDL_MESSAGEBOX_COLOR_TEXT,
|
||||
SDL_MESSAGEBOX_COLOR_BUTTON_BORDER,
|
||||
SDL_MESSAGEBOX_COLOR_BUTTON_BACKGROUND,
|
||||
SDL_MESSAGEBOX_COLOR_BUTTON_SELECTED,
|
||||
SDL_MESSAGEBOX_COLOR_MAX,
|
||||
}
|
||||
mixin(expandEnum!SDL_MessageBoxColorType);
|
||||
|
||||
struct SDL_MessageBoxColorScheme {
|
||||
SDL_MessageBoxColor[SDL_MESSAGEBOX_COLOR_MAX] colors;
|
||||
}
|
||||
|
||||
struct SDL_MessageBoxData {
|
||||
uint flags;
|
||||
SDL_Window* window;
|
||||
const(char)* title;
|
||||
const(char)* message;
|
||||
int numbuttons;
|
||||
const(SDL_MessageBoxButtonData)* buttons;
|
||||
const(SDL_MessageBoxColorScheme)* colorScheme;
|
||||
}
|
||||
|
||||
version(BindSDL_Static) {
|
||||
extern(C) @nogc nothrow {
|
||||
int SDL_ShowMessageBox(const(SDL_MessageBoxData)*,int*);
|
||||
int SDL_ShowSimpleMessageBox(uint,const(char)*,const(char)*,SDL_Window*);
|
||||
}
|
||||
}
|
||||
else {
|
||||
extern(C) @nogc nothrow {
|
||||
alias pSDL_ShowMessageBox = int function(const(SDL_MessageBoxData)*,int*);
|
||||
alias pSDL_ShowSimpleMessageBox = int function(uint,const(char)*,const(char)*,SDL_Window*);
|
||||
}
|
||||
|
||||
__gshared {
|
||||
pSDL_ShowMessageBox SDL_ShowMessageBox;
|
||||
pSDL_ShowSimpleMessageBox SDL_ShowSimpleMessageBox;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue