mirror of https://github.com/adamdruppe/arsd.git
initial bsd support in arsd.core
This commit is contained in:
parent
e774f0beda
commit
cb4225dfce
|
@ -20,11 +20,11 @@ Please note that I DO consider changes to build process to be a breaking change,
|
|||
|
||||
Future release, 2024 or later.
|
||||
|
||||
I will probably drop the existing support for gdc 6.
|
||||
Nothing is planned for it at this time.
|
||||
|
||||
## 11.0
|
||||
|
||||
Released: Planned for 2023
|
||||
Released: Planned for May 2023
|
||||
|
||||
arsd.core was added, causing a general build system break for users who download individual files:
|
||||
|
||||
|
@ -43,6 +43,8 @@ Also:
|
|||
* dom.d's XmlDocument no longer treats `<script>` and `<style>` tags as CDATA; that was meant to be a html-specific behavior, not applicable to generic xml.
|
||||
* game.d had significant changes, making the Game object be a manager of GameScreen objects, which use delta time interpolated renders and fixed time updates (before it was vice versa).
|
||||
* database.d got its first overhaul in a decade.
|
||||
* Support for Windows XP has been dropped (though it may still work in certain places, there's no promises since arsd.core uses some Windows Vista features without fallback.)
|
||||
* Support for older compilers has been dropped (arsd.core uses some newer druntime features). The new minimum version is likely gdc 10, the tester now runs gdc version 12. gdc 9 might still sometimes work but I'm going to be removing some of those compatibility branches soon anyway.
|
||||
|
||||
## 10.0
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ module arsd.archive;
|
|||
|
||||
import arsd.core;
|
||||
|
||||
// FIXME: add a comparable decompressGzip function
|
||||
// FIXME: add a comparable decompressGzip function
|
||||
|
||||
version(WithoutLzmaDecoder) {} else
|
||||
version=WithLzmaDecoder;
|
||||
|
|
4
cgi.d
4
cgi.d
|
@ -578,9 +578,7 @@ version(Posix) {
|
|||
} else version(minimal) {
|
||||
|
||||
} else {
|
||||
version(GNU) {
|
||||
// GDC doesn't support static foreach so I had to cheat on it :(
|
||||
} else version(FreeBSD) {
|
||||
version(FreeBSD) {
|
||||
// I never implemented the fancy stuff there either
|
||||
} else {
|
||||
version=with_breaking_cgi_features;
|
||||
|
|
10
dub.json
10
dub.json
|
@ -26,10 +26,7 @@
|
|||
"dflags-ldc": ["--mv=arsd.simpledisplay=$PACKAGE_DIR/simpledisplay.d"],
|
||||
"dflags-gdc": ["-fmodule-file=arsd.simpledisplay=$PACKAGE_DIR/simpledisplay.d"],
|
||||
"lflags-osx": ["-L/usr/X11/lib"],
|
||||
"dependencies": {
|
||||
"arsd-official:core":"*",
|
||||
"arsd-official:color_base":"*"
|
||||
},
|
||||
"dependencies": { "arsd-official:color_base":"*" },
|
||||
"configurations": [
|
||||
{
|
||||
"name": "normal",
|
||||
|
@ -432,6 +429,7 @@
|
|||
"dflags-dmd": ["-mv=arsd.cgi=$PACKAGE_DIR/cgi.d"],
|
||||
"dflags-ldc": ["--mv=arsd.cgi=$PACKAGE_DIR/cgi.d"],
|
||||
"dflags-gdc": ["-fmodule-file=arsd.cgi=$PACKAGE_DIR/cgi.d"],
|
||||
"dependencies": { "arsd-official:core":"*" },
|
||||
"configurations": [
|
||||
{
|
||||
"name": "embedded_httpd",
|
||||
|
@ -591,6 +589,7 @@
|
|||
"dflags-dmd": ["-mv=arsd.terminal=$PACKAGE_DIR/terminal.d"],
|
||||
"dflags-ldc": ["--mv=arsd.terminal=$PACKAGE_DIR/terminal.d"],
|
||||
"dflags-gdc": ["-fmodule-file=arsd.terminal=$PACKAGE_DIR/terminal.d"],
|
||||
"dependencies": { "arsd-official:core":"*" },
|
||||
"configurations": [
|
||||
{
|
||||
"name": "normal"
|
||||
|
@ -642,6 +641,7 @@
|
|||
"dflags-dmd": ["-mv=arsd.color=$PACKAGE_DIR/color.d"],
|
||||
"dflags-ldc": ["--mv=arsd.color=$PACKAGE_DIR/color.d"],
|
||||
"dflags-gdc": ["-fmodule-file=arsd.color=$PACKAGE_DIR/color.d"],
|
||||
"dependencies": { "arsd-official:core":"*" },
|
||||
"sourceFiles": ["color.d"]
|
||||
},
|
||||
{
|
||||
|
@ -668,7 +668,7 @@
|
|||
},
|
||||
{
|
||||
"name": "eventloop",
|
||||
"description": "My DEPRECATED event loop. Do NOT use in new programs, only offered here because I use it in a lot of old programs.",
|
||||
"description": "My DEPRECATED event loop. Do NOT use in new programs, only offered here because I use it in a lot of old programs. The core package has a new unified event loop.",
|
||||
"targetType": "sourceLibrary",
|
||||
"versions": ["with_eventloop"],
|
||||
"sourceFiles": ["eventloop.d"],
|
||||
|
|
38
terminal.d
38
terminal.d
|
@ -14,9 +14,11 @@
|
|||
|
||||
Creating an instance of these structs will perform console initialization. When the struct
|
||||
goes out of scope, any changes in console settings will be automatically reverted and pending
|
||||
output is flushed. Do not create a global Terminal, as this will skip the destructor. You should
|
||||
create the object as a local, then pass borrowed pointers to it if needed somewhere else. This
|
||||
ensures the construction and destruction is run in a timely manner.
|
||||
output is flushed. Do not create a global Terminal, as this will skip the destructor. Also do
|
||||
not create an instance inside a class or array, as again the destructor will be nondeterministic.
|
||||
You should create the object as a local inside main (or wherever else will encapsulate its whole
|
||||
usage lifetime), then pass borrowed pointers to it if needed somewhere else. This ensures the
|
||||
construction and destruction is run in a timely manner.
|
||||
|
||||
$(PITFALL
|
||||
Output is NOT flushed on \n! Output is buffered until:
|
||||
|
@ -157,6 +159,36 @@ unittest {
|
|||
version(demos) main; // exclude from docs
|
||||
}
|
||||
|
||||
/++
|
||||
$(H3 Full screen)
|
||||
|
||||
This shows how to use the cellular (full screen) mode and pass terminal to functions.
|
||||
+/
|
||||
unittest {
|
||||
import arsd.terminal;
|
||||
|
||||
// passing terminals must be done by ref or by pointer
|
||||
void helper(Terminal* terminal) {
|
||||
terminal.moveTo(0, 1);
|
||||
terminal.getline("Press enter to exit...");
|
||||
}
|
||||
|
||||
void main() {
|
||||
// ask for cellular mode, it will go full screen
|
||||
auto terminal = Terminal(ConsoleOutputType.cellular);
|
||||
|
||||
// it is automatically cleared upon entry
|
||||
terminal.write("Hello upper left corner");
|
||||
|
||||
// pass it by pointer to other functions
|
||||
helper(&terminal);
|
||||
|
||||
// since at the end of main, Terminal's destructor
|
||||
// resets the terminal to how it was before for the
|
||||
// user
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Widgets:
|
||||
tab widget
|
||||
|
|
Loading…
Reference in New Issue