Merge branch 'master' into table
This commit is contained in:
commit
cb5b6bf924
|
@ -0,0 +1,79 @@
|
|||
version: 'build #{build}'
|
||||
|
||||
environment:
|
||||
matrix:
|
||||
- linking: shared
|
||||
compiler: msvc2013
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
|
||||
- linking: static
|
||||
compiler: msvc2013
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
|
||||
- linking: shared
|
||||
compiler: msvc2015
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||
- linking: static
|
||||
compiler: msvc2015
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||
- linking: shared
|
||||
compiler: msvc2017
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||
- linking: static
|
||||
compiler: msvc2017
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||
- linking: static
|
||||
compiler: mingw
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||
|
||||
platform:
|
||||
- Win32
|
||||
- x64
|
||||
|
||||
before_build:
|
||||
- if %compiler%==msvc2013 ( set "CMAKE_GENERATOR=Visual Studio 12 2013" )
|
||||
else if %compiler%==msvc2015 ( set "CMAKE_GENERATOR=Visual Studio 14 2015" )
|
||||
else if %compiler%==msvc2017 ( set "CMAKE_GENERATOR=Visual Studio 15 2017" )
|
||||
else if %compiler%==mingw ( set "CMAKE_GENERATOR=MinGW Makefiles" )
|
||||
- if %compiler%-%platform%==mingw-Win32 ( set "PATH=C:\msys64\mingw32\bin;%PATH%" )
|
||||
else if %compiler%-%platform%==mingw-x64 ( set "PATH=C:\msys64\mingw64\bin;%PATH%" )
|
||||
else if %platform%==x64 ( set "CMAKE_GENERATOR=%CMAKE_GENERATOR% Win64" )
|
||||
- if %linking%==static ( set CMAKE_FLAGS=-DBUILD_SHARED_LIBS=OFF )
|
||||
- if %compiler%==mingw ( set "outdir=build\out" ) else ( set "outdir=build\out\Release" )
|
||||
- ren "C:\Program Files\Git\usr\bin\sh.exe" _sh.exe
|
||||
- set "simultaneous=3"
|
||||
|
||||
build_script:
|
||||
- md build && cd build
|
||||
- if not %compiler%==mingw ( set "CFLAGS=/MP%simultaneous% %CFLAGS%" )
|
||||
- if not %compiler%==mingw ( set "CPPFLAGS=/MP%simultaneous% %CPPFLAGS%" )
|
||||
- if not %compiler%==mingw ( set "CXXFLAGS=/MP%simultaneous% %CXXFLAGS%" )
|
||||
- cmake -G "%CMAKE_GENERATOR%" %CMAKE_FLAGS% ..
|
||||
- if %compiler%==mingw ( mingw32-make -j%simultaneous% tester examples )
|
||||
else ( msbuild libui.sln /t:Build /p:Configuration=Release /p:Platform=%platform% )
|
||||
- cd %APPVEYOR_BUILD_FOLDER%
|
||||
|
||||
after_build:
|
||||
- if %platform%==x64 ( set "arch=amd64" ) else ( set "arch=386" )
|
||||
- if %APPVEYOR_REPO_TAG%==true ( set "version=%APPVEYOR_REPO_TAG_NAME%" )
|
||||
else ( set "version=%APPVEYOR_REPO_BRANCH%" )
|
||||
- if %linking%==shared ( set "artifact=shared" ) else ( set "artifact=%compiler%-static" )
|
||||
- set "artifact=%version%-windows-%arch%-%artifact%"
|
||||
- del .\%outdir%\libui.exp # remove unnecessary files
|
||||
- 7z a libui-%artifact%.zip .\%outdir%\libui.* ui.h ui_windows.h
|
||||
- 7z l libui-%artifact%.zip
|
||||
- 7z a examples-%artifact%.zip .\%outdir%\*.exe
|
||||
- 7z l examples-%artifact%.zip
|
||||
|
||||
artifacts:
|
||||
- path: libui-*.zip
|
||||
name: libui
|
||||
- path: examples-*.zip
|
||||
name: examples
|
||||
|
||||
deploy:
|
||||
provider: GitHub
|
||||
artifact: libui, examples
|
||||
# TODO https://www.appveyor.com/docs/deployment/github/
|
||||
#auth_token:
|
||||
#secure: "2l/602m6FkqAB9TTIAkPX3Erfwg9jVTlf/Inmf2dWcbOrJJzK/WrCUIgY3B4ngly"
|
||||
on:
|
||||
appveyor_repo_tag: true # deploy on tag push only
|
112
.travis.yml
112
.travis.yml
|
@ -1,23 +1,97 @@
|
|||
os:
|
||||
- linux
|
||||
- osx
|
||||
|
||||
# This makes us use Ubuntu 14 instead of 12
|
||||
dist: trusty
|
||||
|
||||
# Notes:
|
||||
# - Travis uses cmake 3.0.2 on OS X; we need 3.1 or newer (thanks tbodt)
|
||||
|
||||
language: c
|
||||
|
||||
include: &toolchain_linux_amd64
|
||||
os: linux
|
||||
dist: trusty
|
||||
addons:
|
||||
apt:
|
||||
update: true
|
||||
packages:
|
||||
- libgtk-3-dev
|
||||
|
||||
include: &toolchain_linux_386
|
||||
os: linux
|
||||
dist: trusty
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- gcc-multilib
|
||||
- g++-multilib
|
||||
- libgtk-3-dev:i386
|
||||
# the rest fixes broken dependencies of libgtk:i386
|
||||
- libgirepository-1.0-1:i386
|
||||
- libglib2.0-dev:i386
|
||||
- gir1.2-glib-2.0:i386
|
||||
- gir1.2-atk-1.0:i386
|
||||
- libatk1.0-dev:i386
|
||||
- libfreetype6-dev:i386
|
||||
- libfontconfig1-dev:i386
|
||||
- libcairo2-dev:i386
|
||||
- libgdk-pixbuf2.0-dev:i386
|
||||
- libpango1.0-dev:i386
|
||||
- libxft-dev:i386
|
||||
- libpng12-dev:i386
|
||||
|
||||
include: &toolchain_osx_amd64
|
||||
os: osx
|
||||
osx_image: xcode8
|
||||
|
||||
# Travis CI build matrix.
|
||||
# Each entry below will trigger an extra, parallel build on Travis.
|
||||
matrix:
|
||||
include:
|
||||
- env: linking=shared arch=amd64
|
||||
<<: *toolchain_linux_amd64
|
||||
- env: linking=static arch=amd64
|
||||
<<: *toolchain_linux_amd64
|
||||
- env: linking=shared arch=386
|
||||
<<: *toolchain_linux_386
|
||||
- env: linking=static arch=386
|
||||
<<: *toolchain_linux_386
|
||||
- env: linking=shared arch=amd64
|
||||
<<: *toolchain_osx_amd64
|
||||
- env: linking=static arch=amd64
|
||||
<<: *toolchain_osx_amd64
|
||||
|
||||
install:
|
||||
- if [[ "${arch}" == "386" ]]; then
|
||||
export CFLAGS=-m32;
|
||||
export CXXFLAGS=-m32;
|
||||
export PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig;
|
||||
fi
|
||||
- if [[ "${linking}" == "static" ]]; then
|
||||
export CMAKE_FLAGS=-DBUILD_SHARED_LIBS=OFF;
|
||||
fi
|
||||
|
||||
script:
|
||||
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get update; fi
|
||||
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install libgtk-3-dev -y || sudo apt-cache search libgtk3; fi
|
||||
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update; fi
|
||||
- mkdir build
|
||||
- cd build
|
||||
- cmake --version
|
||||
- cmake .. -G "Unix Makefiles"
|
||||
- make tester examples
|
||||
- rm -rf *
|
||||
- cmake .. -G "Unix Makefiles" -DBUILD_SHARED_LIBS=OFF
|
||||
- mkdir build
|
||||
- pushd build
|
||||
- cmake -G "Unix Makefiles" ${CMAKE_FLAGS} ..
|
||||
- make tester examples
|
||||
- popd
|
||||
|
||||
after_success:
|
||||
- ls -lR build/out
|
||||
- file build/out/test
|
||||
- export platform="$TRAVIS_OS_NAME"
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then cp ui.h ui_darwin.h build/out/; export platform=darwin; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cp ui.h ui_unix.h build/out/; fi
|
||||
- if [[ "x${TRAVIS_TAG}" != "x" ]]; then export version=${TRAVIS_TAG}; else export version=${TRAVIS_BRANCH}; fi
|
||||
- export artifact=${version}-${platform}-${arch}-${linking}
|
||||
- echo ${artifact}
|
||||
- pushd build/out
|
||||
- # TODO do not include symlinks in the archive
|
||||
- tar -czvf libui-${artifact}.tgz libui.* *.h
|
||||
- tar -czvf examples-${artifact}.tgz `find . -type f ! -name "*.*"`
|
||||
- popd
|
||||
|
||||
deploy:
|
||||
provider: releases
|
||||
#api_key:
|
||||
#secure: TODO
|
||||
file: build/out/*.tgz
|
||||
file_glob: true
|
||||
skip_cleanup: true
|
||||
on:
|
||||
tags: true
|
||||
|
|
32
README.md
32
README.md
|
@ -1,10 +1,36 @@
|
|||
# libui: a portable GUI library for C
|
||||
|
||||
This README is being written.<br>
|
||||
[![Build Status](https://travis-ci.org/andlabs/libui.svg?branch=master)](https://travis-ci.org/andlabs/libui)
|
||||
[![Build Status, Linux and macOS](https://travis-ci.org/andlabs/libui.svg?branch=master)](https://travis-ci.org/andlabs/libui)<br>
|
||||
[![Build Status, Windows](https://ci.appveyor.com/api/projects/status/ouyk78c52mmisa31?svg=true)](https://ci.appveyor.com/project/andlabs/libui)
|
||||
|
||||
## Status
|
||||
|
||||
It has come to my attention that I have not been particularly clear about how usable or feature-complete libui is, and that this has fooled many people into expecting more from libui right this moment than I have explicitly promised to make available. I apologize for not doing this sooner.
|
||||
|
||||
libui is currently **mid-alpha** software. Much of what is currently present runs stabily enough for the examples and perhaps some small programs to work, but the stability is still a work-in-progress, much of what is already there is not feature-complete, some of it will be buggy on certain platforms, and there's a lot of stuff missing. In short, here's a list of features that I would like to add to libui, but that aren't in yet:
|
||||
|
||||
- tables and trees (the former is currently WIP and may land in preliminary form soon)
|
||||
- clipboard support, including drag and drop
|
||||
- more and better dialogs
|
||||
- printing
|
||||
- accessibility for uiArea and custom controls
|
||||
- document-based programs
|
||||
- tighter OS integration (especially for document-based programs), to allow programs to fully feel native, rather than merely look and act native
|
||||
- better support for standard dialogs and features (search bars, etc.)
|
||||
- OpenGL support (this was already being worked on by someone else, but I don't know what happened to them...)
|
||||
|
||||
In addition, [here](https://github.com/andlabs/libui/issues?utf8=%E2%9C%93&q=master+in%3Atitle+is%3Aissue+is%3Aopen) is a list of issues generalizing existing problems.
|
||||
|
||||
Furthermore, libui is not properly fully documented yet. This is mainly due to the fact that the API was initially unstable enough so as to result in rewriting documentation multiple times, in addition to me not being happy with really any existing C code documentation tool. That being said, I have started to pin down my ideal code documentation style in parts of `ui.h`, most notably in the uiAttributedString APIs. Over time, I plan on extending this to the rest of the headers. You can also use [the documentation for libui's Go bindings](https://godoc.org/github.com/andlabs/ui) as a reference, though it is somewhat stale and not optimally written.
|
||||
|
||||
But libui is not dead; I am working on it whenever I can, and I hope to get it to a point of real quality soon!
|
||||
|
||||
## Announcements
|
||||
|
||||
* **16 May 2018**
|
||||
* Thanks to @parro-it and @msink, libui now has better CI, including AppVeyor for Windows CI, and automated creation of binary releases when I make a tagged release.
|
||||
|
||||
* **13 May 2018**
|
||||
* Added new functions to work with uiDateTimePickers: `uiDateTimePickerTime()`, `uiDateTimePickerSetTime()`, and `uiDateTimePickerOnChanged()`. These operate on standard `<time.h>` `struct tm`s. Thanks @cody271!
|
||||
|
||||
|
@ -176,6 +202,7 @@ C++ | [libui-cpp](https://github.com/billyquith/libui-cpp), [cpp-libui-qtlike](h
|
|||
C# / .NET Framework | [LibUI.Binding](https://github.com/NattyNarwhal/LibUI.Binding)
|
||||
C# / .NET Core | [DevZH.UI](https://github.com/noliar/DevZH.UI), [SharpUI](https://github.com/benpye/sharpui/), [LibUISharp](https://github.com/tom-corwin/LibUISharp)
|
||||
CHICKEN Scheme | [wasamasa/libui](https://github.com/wasamasa/libui)
|
||||
Common Lisp | [jinwoo/cl-ui](https://github.com/jinwoo/cl-ui)
|
||||
Crystal | [libui.cr](https://github.com/Fusion/libui.cr), [hedron](https://github.com/Qwerp-Derp/hedron)
|
||||
D | [DerelictLibui (flat API)](https://github.com/Extrawurst/DerelictLibui), [libuid (object-oriented)](https://github.com/mogud/libuid)
|
||||
Euphoria | [libui-euphoria](https://github.com/ghaberek/libui-euphoria)
|
||||
|
@ -183,13 +210,14 @@ Harbour | [HBUI](https://github.com/RJopek/HBUI)
|
|||
Haskell | [haskell-libui](https://github.com/beijaflor-io/haskell-libui)
|
||||
JavaScript | [libui.js (merged into libui-node?)](https://github.com/mavenave/libui.js), [proton-native](https://github.com/kusti8/proton-native)
|
||||
Julia | [Libui.jl](https://github.com/joa-quim/Libui.jl)
|
||||
Kotlin | [kotlin-libui](https://github.com/msink/kotlin-libui)
|
||||
Lua | [libuilua](https://github.com/zevv/libuilua), [libui-lua](https://github.com/mdombroski/libui-lua), [lui](http://tset.de/lui/index.html)
|
||||
Nim | [ui](https://github.com/nim-lang/ui)
|
||||
Node.js | [libui-node](https://github.com/parro-it/libui-node)
|
||||
PHP | [ui](https://github.com/krakjoe/ui)
|
||||
Python | [pylibui](https://github.com/joaoventura/pylibui), [pylibui-cffi](https://github.com/Yardanico/pylibui-cffi)
|
||||
Ruby | [libui-ruby](https://github.com/jamescook/libui-ruby)
|
||||
Rust | [libui-rs](https://github.com/pcwalton/libui-rs)
|
||||
Rust | [libui-rs](https://github.com/pcwalton/libui-rs), [arcturu/libui-rs](https://github.com/arcturu/libui-rs), [LeoTindall/libui-rs](https://github.com/LeoTindall/libui-rs)
|
||||
Scala | [scalaui](https://github.com/lolgab/scalaui)
|
||||
Swift | [libui-swift](https://github.com/sclukey/libui-swift)
|
||||
|
||||
|
|
|
@ -202,3 +202,5 @@ http://www.edm2.com/index.php/IBM_OS/2_Developer%27s_Packages
|
|||
old stuff
|
||||
font1.gif (GIF Image, 424 × 475 pixels) http://www.functionx.com/win32/controls/dlgboxes/font1.gif
|
||||
Inskcape’s Hidden Little Feature: Mesh Gradients | OCS-Mag http://www.ocsmag.com/2016/02/27/inskcapes-hidden-little-feature-mesh-gradients/ (near "When you’re done colouring in all the nodes, you may want to drag")
|
||||
|
||||
https://msdn.microsoft.com/en-us/library/windows/desktop/ms632615(v=vs.85).aspx we need to handle this alongisde WM_CAPTURECHANGED
|
||||
|
|
|
@ -75,7 +75,7 @@ void uiMultilineEntrySetText(uiMultilineEntry *e, const char *text)
|
|||
// doing this raises an EN_CHANGED
|
||||
e->inhibitChanged = TRUE;
|
||||
crlf = LFtoCRLF(text);
|
||||
uiWindowsSetWindowText(e->hwnd, text);
|
||||
uiWindowsSetWindowText(e->hwnd, crlf);
|
||||
uiprivFree(crlf);
|
||||
e->inhibitChanged = FALSE;
|
||||
// don't queue the control for resize; entry sizes are independent of their contents
|
||||
|
|
Loading…
Reference in New Issue