Skip to content

Commit

Permalink
Remove SDL/OpenGL
Browse files Browse the repository at this point in the history
  • Loading branch information
iffy committed Jul 10, 2023
1 parent 0ad9d2c commit 21722ea
Show file tree
Hide file tree
Showing 1,997 changed files with 7,120 additions and 822,604 deletions.
2 changes: 0 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ Wiish components are meant to be replaceable and expendable. For instance:

- You should be able to use the `wiish` command line tool without importing anything from `wiish` in your app.

- If you want to write low-level OpenGL, you should be able to do that. Or if you want to use a higher-level library, you should be able to do that, too.

- Auto-updating and logging should be usable no matter what GUI library you use.

In other words, components shouldn't be interwined so much that they're inseparable. Instead, they should be easily replaced. Also, you should always be able to drop down to a lower level if needed.
Expand Down
28 changes: 1 addition & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ See `wiish --help` for more, but here are other examples. Some only work within
wiish run --os ios-simulator
wiish run --os android
wiish build
wiish init --base-template opengl my_opengl_app
```

# Features
Expand All @@ -57,7 +56,6 @@ Wiish provides:
Wiish uses a plugin system to support various GUI frameworks:

- `wiish/plugins/webview` - For webview apps based on [oskca/webview](https://github.com/oskca/webview).
- `wiish/plugins/sdl2` - **TEMPORARILY UNMAINTAINED** For SDL and OpenGL apps based on [nim-lang/sdl2](https://github.com/nim-lang/sdl2).

The GUI component is designed to work separately from other features (e.g. auto-updating, packaging, etc...) so that different GUI libraries can be swapped in/out.

Expand All @@ -75,41 +73,19 @@ The following shows the support matrix of **automated** tests. Actual support m

| Host OS | `--os` | Example | `wiish run` | `wiish build` |
| ------- | ------------- | ------------ | :---------: | :-----------: |
| windows | android | opengl | Planned | Planned |
| windows | android | sdl2 | Planned | Planned |
| windows | android | webview | Planned | Planned |
| windows | mobiledev | opengl | Untested | - |
| windows | mobiledev | sdl2 | Untested | - |
| windows | mobiledev | webview | Untested | - |
| windows | windows | opengl | Untested | Planned |
| windows | windows | plainwebview | Untested | Planned |
| windows | windows | sdl2 | Untested | Planned |
| windows | windows | webview | Untested | Planned |
| linux | android | opengl | Planned | Yes |
| linux | android | sdl2 | Planned | Yes |
| linux | android | webview | Planned | Yes |
| linux | mobiledev | opengl | Yes | - |
| linux | mobiledev | sdl2 | Yes | - |
| linux | mobiledev | webview | Yes | - |
| linux | linux | opengl | Yes | Planned |
| linux | linux | plainwebview | Yes | Planned |
| linux | linux | sdl2 | Yes | Planned |
| linux | linux | webview | Yes | Planned |
| mac | android | opengl | Yes | Yes |
| mac | android | sdl2 | Yes | Yes |
| mac | android | webview | Yes | Yes |
| mac | ios | opengl | Planned | Planned |
| mac | ios | sdl2 | Planned | Planned |
| mac | ios | webview | Planned | Planned |
| mac | ios-simulator | opengl | Yes | Yes |
| mac | ios-simulator | sdl2 | Yes | Yes |
| mac | ios-simulator | webview | Yes | Yes |
| mac | mobiledev | opengl | Yes | - |
| mac | mobiledev | sdl2 | Yes | - |
| mac | mobiledev | webview | Yes | - |
| mac | mac | opengl | Yes | Yes |
| mac | mac | plainwebview | Yes | Yes |
| mac | mac | sdl2 | Yes | Yes |
| mac | mac | webview | Yes | Yes |

### GUI-independent features
Expand Down Expand Up @@ -143,9 +119,7 @@ See the [`examples`](./examples) directory for more examples of how to use this

# Plugins

## sdl2

## webview|
## webview

### Messaging

Expand Down
6 changes: 0 additions & 6 deletions TODO
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
[ ] SDL mobile lifecycle events
[ ] mobiledev SDL
[ ] mobiledev webview
[ ] OpenGL Android
[ ] SDL Android
[ ] Windows
[ ] Linux

Rename some thing:
[ ] WiishSDL2Plugin -> WiishSDLPlugin
[ ] WiishBuild -> WiishPlugin
[ ] sdl2.nim -> wiishsdl.nim

1 change: 1 addition & 0 deletions changes/break-Removed-support-for-20230710-090159.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Removed support for SDL/OpenGL. It's too much to maintain and I don't use it.
227 changes: 227 additions & 0 deletions docs/androidutil.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,227 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- This file is generated by Nim. -->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<!-- Favicon -->
<link rel="shortcut icon" href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAUAAAAF////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAIAAABbAAAAlQAAAKIAAACbAAAAmwAAAKIAAACVAAAAWwAAAAL///8A////AP///wD///8A////AAAAABQAAADAAAAAYwAAAA3///8A////AP///wD///8AAAAADQAAAGMAAADAAAAAFP///wD///8A////AP///wAAAACdAAAAOv///wD///8A////AP///wD///8A////AP///wD///8AAAAAOgAAAJ3///8A////AP///wAAAAAnAAAAcP///wAAAAAoAAAASv///wD///8A////AP///wAAAABKAAAAKP///wAAAABwAAAAJ////wD///8AAAAAgQAAABwAAACIAAAAkAAAAJMAAACtAAAAFQAAABUAAACtAAAAkwAAAJAAAACIAAAAHAAAAIH///8A////AAAAAKQAAACrAAAAaP///wD///8AAAAARQAAANIAAADSAAAARf///wD///8AAAAAaAAAAKsAAACk////AAAAADMAAACcAAAAnQAAABj///8A////AP///wAAAAAYAAAAGP///wD///8A////AAAAABgAAACdAAAAnAAAADMAAAB1AAAAwwAAAP8AAADpAAAAsQAAAE4AAAAb////AP///wAAAAAbAAAATgAAALEAAADpAAAA/wAAAMMAAAB1AAAAtwAAAOkAAAD/AAAA/wAAAP8AAADvAAAA3gAAAN4AAADeAAAA3gAAAO8AAAD/AAAA/wAAAP8AAADpAAAAtwAAAGUAAAA/AAAA3wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAADfAAAAPwAAAGX///8A////AAAAAEgAAADtAAAAvwAAAL0AAADGAAAA7wAAAO8AAADGAAAAvQAAAL8AAADtAAAASP///wD///8A////AP///wD///8AAAAAO////wD///8A////AAAAAIcAAACH////AP///wD///8AAAAAO////wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A//8AAP//AAD4HwAA7/cAAN/7AAD//wAAoYUAAJ55AACf+QAAh+EAAAAAAADAAwAA4AcAAP5/AAD//wAA//8AAA=="/>
<link rel="icon" type="image/png" sizes="32x32" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH4QQQEwksSS9ZWwAAAk1JREFUWMPtll2ITVEUx39nn/O7Y5qR8f05wtCUUr6ZIS++8pEnkZInPImneaCQ5METNdOkeFBKUhMPRIkHKfEuUZSUlGlKPN2TrgfncpvmnntnmlEyq1Z7t89/rf9a6+y99oZxGZf/XeIq61EdtgKXgdXA0xrYAvBjOIF1AI9zvjcC74BSpndrJPkBWDScTF8Aa4E3wDlgHbASaANmVqlcCnwHvgDvgVfAJ+AikAAvgfVZwLnSVZHZaOuKoQi3ZOMi4NkYkpe1p4J7A8BpYAD49hfIy/oqG0+hLomiKP2L5L+1ubn5115S+3OAn4EnwBlgMzCjyt6ZAnQCJ4A7wOs88iRJHvw50HoujuPBoCKwHWiosy8MdfZnAdcHk8dxXFJ3VQbQlCTJvRBCGdRbD4M6uc5glpY3eAihpN5S5w12diSEcCCEcKUO4ljdr15T76ur1FDDLIQQ3qv71EdDOe3Kxj3leRXyk+pxdWnFWod6Wt2bY3de3aSuUHcPBVimHs7mK9WrmeOF6lR1o9qnzskh2ar2qm1qizpfXaPeVGdlmGN5pb09qMxz1Xb1kLqgzn1RyH7JUXW52lr5e/Kqi9qpto7V1atuUzfnARrV7jEib1T76gG2qxdGmXyiekkt1GswPTtek0aBfJp6YySGBfWg2tPQ0FAYgf1stUfdmdcjarbYJEniKIq6gY/Aw+zWHAC+p2labGpqiorFYgGYCEzN7oQdQClN07O1/EfDyGgC0ALMBdYAi4FyK+4H3gLPsxfR1zRNi+NP7nH5J+QntnXe5B5mpfQAAAAASUVORK5CYII=">

<!-- Google fonts -->
<link href='https://fonts.googleapis.com/css?family=Lato:400,600,900' rel='stylesheet' type='text/css'/>
<link href='https://fonts.googleapis.com/css?family=Source+Code+Pro:400,500,600' rel='stylesheet' type='text/css'/>

<!-- CSS -->
<title>androidutil</title>
<link rel="stylesheet" type="text/css" href="nimdoc.out.css">

<script type="text/javascript" src="dochack.js"></script>

<script type="text/javascript">
function main() {
var pragmaDots = document.getElementsByClassName("pragmadots");
for (var i = 0; i < pragmaDots.length; i++) {
pragmaDots[i].onclick = function(event) {
// Hide tease
event.target.parentNode.style.display = "none";
// Show actual
event.target.parentNode.nextElementSibling.style.display = "inline";
}
}

function switchTheme(e) {
if (e.target.checked) {
document.documentElement.setAttribute('data-theme', 'dark');
localStorage.setItem('theme', 'dark');
} else {
document.documentElement.setAttribute('data-theme', 'light');
localStorage.setItem('theme', 'light');
}
}

const toggleSwitch = document.querySelector('.theme-switch input[type="checkbox"]');
if (toggleSwitch !== null) {
toggleSwitch.addEventListener('change', switchTheme, false);
}

var currentTheme = localStorage.getItem('theme');
if (!currentTheme && window.matchMedia('(prefers-color-scheme: dark)').matches) {
currentTheme = 'dark';
}
if (currentTheme) {
document.documentElement.setAttribute('data-theme', currentTheme);

if (currentTheme === 'dark' && toggleSwitch !== null) {
toggleSwitch.checked = true;
}
}
}

window.addEventListener('DOMContentLoaded', main);
</script>

</head>
<body>
<div class="document" id="documentId">
<div class="container">
<h1 class="title">androidutil</h1>
<div class="row">
<div class="three columns">
<div class="theme-switch-wrapper">
<label class="theme-switch" for="checkbox">
<input type="checkbox" id="checkbox" />
<div class="slider round"></div>
</label>
&nbsp;&nbsp;&nbsp; <em>Dark Mode</em>
</div>
<div id="global-links">
<ul class="simple">
<li>
<a href="theindex.html">Index</a>
</li>
</ul>
</div>
<div id="searchInputDiv">
Search: <input type="text" id="searchInput"
onkeyup="search()" />
</div>
<div>
Group by:
<select onchange="groupBy(this.value)">
<option value="section">Section</option>
<option value="type">Type</option>
</select>
</div>
<ul class="simple simple-toc" id="toc-list">
<li>
<a class="reference reference-toplevel" href="#7" id="57">Types</a>
<ul class="simple simple-toc-section">
<li><a class="reference" href="#JavaVMAttachArgs"
title="JavaVMAttachArgs = object
version: jint
name: cstring
group: jobject">JavaVMAttachArgs</a></li>

</ul>
</li>
<li>
<a class="reference reference-toplevel" href="#12" id="62">Procs</a>
<ul class="simple simple-toc-section">
<ul class="simple nested-toc-section">initializeJavaVM
<li><a class="reference" href="#initializeJavaVM%2CJNIEnvPtr"
title="initializeJavaVM(env: JNIEnvPtr)">initializeJavaVM(env: JNIEnvPtr)</a></li>

</ul>
<ul class="simple nested-toc-section">jniErrorMessage
<li><a class="reference" href="#jniErrorMessage%2Cjint"
title="jniErrorMessage(err: jint): string">jniErrorMessage(err: jint): string</a></li>

</ul>
<ul class="simple nested-toc-section">ok
<li><a class="reference" href="#ok%2Cjint"
title="ok(rc: jint)">ok(rc: jint)</a></li>

</ul>

</ul>
</li>
<li>
<a class="reference reference-toplevel" href="#18" id="68">Templates</a>
<ul class="simple simple-toc-section">
<ul class="simple nested-toc-section">withJEnv
<li><a class="reference" href="#withJEnv.t%2Cuntyped%2Cuntyped"
title="withJEnv(env: untyped; body: untyped): untyped">withJEnv(env: untyped; body: untyped): untyped</a></li>

</ul>

</ul>
</li>

</ul>

</div>

<div class="nine columns" id="content">
<div id="tocRoot"></div>

<p class="module-desc"></p>
<div class="section" id="7">
<h1><a class="toc-backref" href="#7">Types</a></h1>
<dl class="item">
<div id="JavaVMAttachArgs">
<dt><pre><a href="androidutil.html#JavaVMAttachArgs"><span class="Identifier">JavaVMAttachArgs</span></a> <span class="Other">=</span> <span class="Keyword">object</span>
<span class="Identifier">version</span><span class="Other">:</span> <span class="Identifier">jint</span>
<span class="Identifier">name</span><span class="Other">:</span> <span class="Identifier">cstring</span>
<span class="Identifier">group</span><span class="Other">:</span> <span class="Identifier">jobject</span>
</pre></dt>
<dd>



</dd>
</div>

</dl></div>
<div class="section" id="12">
<h1><a class="toc-backref" href="#12">Procs</a></h1>
<dl class="item">
<div id="initializeJavaVM,JNIEnvPtr">
<dt><pre><span class="Keyword">proc</span> <a href="#initializeJavaVM%2CJNIEnvPtr"><span class="Identifier">initializeJavaVM</span></a><span class="Other">(</span><span class="Identifier">env</span><span class="Other">:</span> <span class="Identifier">JNIEnvPtr</span><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">Exception</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">RootEffect</span><span class="Other">]</span></span>.}</pre></dt>
<dd>

Set up the global_JavaVM Call this before doing anything else in here.

</dd>
</div>
<div id="jniErrorMessage,jint">
<dt><pre><span class="Keyword">proc</span> <a href="#jniErrorMessage%2Cjint"><span class="Identifier">jniErrorMessage</span></a><span class="Other">(</span><span class="Identifier">err</span><span class="Other">:</span> <span class="Identifier">jint</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">string</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>

Convert an error return code into a string

</dd>
</div>
<div id="ok,jint">
<dt><pre><span class="Keyword">proc</span> <a href="#ok%2Cjint"><span class="Identifier">ok</span></a><span class="Other">(</span><span class="Identifier">rc</span><span class="Other">:</span> <span class="Identifier">jint</span><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ValueError</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>



</dd>
</div>

</dl></div>
<div class="section" id="18">
<h1><a class="toc-backref" href="#18">Templates</a></h1>
<dl class="item">
<div id="withJEnv.t,untyped,untyped">
<dt><pre><span class="Keyword">template</span> <a href="#withJEnv.t%2Cuntyped%2Cuntyped"><span class="Identifier">withJEnv</span></a><span class="Other">(</span><span class="Identifier">env</span><span class="Other">:</span> <span class="Identifier">untyped</span><span class="Other">;</span> <span class="Identifier">body</span><span class="Other">:</span> <span class="Identifier">untyped</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">untyped</span></pre></dt>
<dd>



</dd>
</div>

</dl></div>

</div>
</div>

<div class="row">
<div class="twelve-columns footer">
<span class="nim-sprite"></span>
<br/>
<small style="color: var(--hint);">Made with Nim. Generated: 2023-07-10 13:45:26 UTC</small>
</div>
</div>
</div>
</div>

</body>
</html>
5 changes: 5 additions & 0 deletions docs/androidutil.idx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
JavaVMAttachArgs androidutil.html#JavaVMAttachArgs androidutil: JavaVMAttachArgs
jniErrorMessage androidutil.html#jniErrorMessage,jint androidutil: jniErrorMessage(err: jint): string
ok androidutil.html#ok,jint androidutil: ok(rc: jint)
initializeJavaVM androidutil.html#initializeJavaVM,JNIEnvPtr androidutil: initializeJavaVM(env: JNIEnvPtr)
withJEnv androidutil.html#withJEnv.t,untyped,untyped androidutil: withJEnv(env: untyped; body: untyped): untyped

0 comments on commit 21722ea

Please sign in to comment.