andlabs/libui
This README is being written.
Bulletins
-
sixteen Might possibly per chance well also just 2018
- Resulting from @parro-it and @msink, libui now has higher CI, including AppVeyor for Windows CI, and automatic introduction of binary releases when I safe a tagged liberate.
-
13 Might possibly per chance well also just 2018
- Added new capabilities to work with uiDateTimePickers:
uiDateTimePickerTime()
,uiDateTimePickerSetTime()
, anduiDateTimePickerOnChanged()
. These operate on commonstruct tm
s. Thanks @cody271!
- Added new capabilities to work with uiDateTimePickers:
-
2 Might possibly per chance well also just 2018
- On Windows, you now no longer prefer to preserve around a
libui.res
file with static builds. You ruin prefer to hyperlink within the suitable manifest file, such because the one within thewindows/
folder (I composed prefer to resolve out precisely what is major other than the Common Controls v6 dependency, or as a minimum to safe a whole-ish template), or as a minimum consist of it alongside your executables. This additionally plan it’s good to possibly composed now no longer stare random cmake errors when constructing the static libraries.
- On Windows, you now no longer prefer to preserve around a
-
18 April 2018
- Launched a brand new
uiTimer()
characteristic for working code on a timer on the major thread. (Resulting from @cody271.)
- Launched a brand new
-
18 March 2018
- Launched an all-new formatted text API that enables you to job formatted text in ways in which the dilapidated API wouldn’t allow. It’s doubtless you’ll be taught to your whole API here. There could be additionally a brand new examples for it:
drawtext
, which reveals your whole API at a overview. It would no longer but assist measuring or manipulating text, nor does it currently assist capabilities that will nicely be major for things admire text editors; all of this could occasionally per chance be added assist later. - libui additionally now uses my utf library for UTF-eight and UTF-sixteen processing, to allow consistent habits all the perfect map thru platforms. This utilization is rarely any longer entirely propagated all over libui, nonetheless the Windows port uses it in most places now, and indirectly this could occasionally change into what libui will teach all over.
- Also launched a proper station of contribution guidelines, stare
CONTRIBUTING.md
for facts. They’re composed WIP.
- Launched an all-new formatted text API that enables you to job formatted text in ways in which the dilapidated API wouldn’t allow. It’s doubtless you’ll be taught to your whole API here. There could be additionally a brand new examples for it:
-
17 February 2018
- The longstanding Enter+Speed crashes on Windows catch at last been mounted (attributable to @lxn).
- Alpha three.5 is now here. Right here’s a quickie liberate primiarly supposed to deploy the above fix to equipment ui itself. It’s a partial binary liberate; sorry! Extra new things will are accessible within the next liberate, which could additionally introduce semver (so it could well be called v0.4.Zero as an alternative).
- Alpha three.5 additionally entails a brand new assist watch over gallery instance. The screenshots below catch no longer been up so a long way but.
-
27 November 2016
- Determined to interrupt up the table stuff into its maintain branch. It’s going to be developed independently of every thing else, alongside with about a assorted facets.
-
2 November 2016
- Added two new capabilities to change the deleted
uiWindowPosition()
and mates:uiAreaBeginUserWindowMove()
anduiAreaBeginUserWindowResize()
. When frail in auiAreaHandler.Mouse()
occasion handler, these can let you provoke a user-driven mouse switch or mouse resize of the window at any point in a uiArea.
- Added two new capabilities to change the deleted
-
31 October 2016
- @krakjoe seen that I by chance frail thread-unsafe code in uiQueueMain() on Unix. Mounted.
-
24 October 2016
-
uiWindowSetContentSize()
on Unix now no longer desires to call up the GTK+ major loop. This capability that, bugs linked to uncommon habits the teach of that characteristic (and the now-deleteduiWindowSetPosition()
anduiWindowCenter()
) could composed run away. I will prefer to warfare thru the bugs to envision as worthy, though.
-
-
22 October 2016
- Resulting from being unable to guarantee they would per chance work (in particular as we switch toward functionality-driven window programs admire Wayland), or being unable to work with out hacking that breaks assorted things, the following capabilities had been removed:
uiWindowPosition()
,uiWindowSetPosition()
,uiWindowCenter()
, anduiWindowOnPositionChanged()
. Centering could come assist one day in due route, albeit in a possibly restricted ruin. A characteristic to provoke a user switch when a part of a uiArea is clicked shall be offered rapidly.
- Resulting from being unable to guarantee they would per chance work (in particular as we switch toward functionality-driven window programs admire Wayland), or being unable to work with out hacking that breaks assorted things, the following capabilities had been removed:
-
21 October 2016
-
uiDrawTextWeightUltraBold
is now spelled wisely. Resulting from @krakjoe.
-
-
18 June 2016
-
17 June 2016
- CMake three.1.Zero is now required. Right here is attributable to CMake’s hasty style tempo within the previous few years including things libui desires to produce on as many programs as that it’s good to possibly imagine. If your OS is supported by libui nonetheless its repositories ship with an older version of CMake, you are going to prefer to fetch an up so a long way one somewhere.
- Please assist opinion out a more in-depth menu API.
-
5 June 2016
-
Alpha three.1 is here. This was as soon as a worthy-wanted update to Alpha three that adjustments about a things:
- The produce map is now cmake. cmake 2.eight.eleven or elevated is major.
- Static linking is now fully that it’s good to possibly imagine.
- MinGW linking is assist, nonetheless static only.
-
Alpha three.1 is here. This was as soon as a worthy-wanted update to Alpha three that adjustments about a things:
Frail announcements could additionally be point to within the ANNOUNCE.md file.
Updates
Describe that this day’s entry (Eastern Time) will doubtless be up so a long way later this day.
-
13 Might possibly per chance well also just 2018
- Release builds on Windows with MSVC could composed be mounted now; thanks @l0calh05t, @slahn, @mischnic, and @zentner-kyle.
-
12 Might possibly per chance well also just 2018
- GTK+ and OS X now catch a cleaner produce job for static libraries which now no longer has intermediate recordsdata and differing configurations. This capability that, definite points could composed now no longer be new. New naming rules for inside of symbols of libui catch additionally began being drafted; runtime symbols and edge cases composed prefer to be handled (and the foundations utilized to Windows) earlier than it could well change into a usual component.
-
18 April 2018
- Migrated all code within the
traditional/
itemizing to teachuipriv
prefixes for every thing that is rarely any longerstatic
. Right here is step one toward fixing static library oddities within libui, allowing libui to if truth be told be safely frail as both a static library or a shared library.
- Migrated all code within the
-
17 June 2016
-
uiMainSteps()
now no longer takes any arguments and now no longer desires to invoke a characteristic to ruin the work. You continue to prefer to call it, nonetheless as soon as you ruin, it could well return immediately and also it’s good to possibly then rating right to your major loop. - CMake three.1.Zero is now required. Right here is attributable to CMake’s hasty style tempo within the previous few years including things libui desires to produce on as many programs as that it’s good to possibly imagine. If your OS is supported by libui nonetheless its repositories ship with an older version of CMake, you are going to prefer to fetch an up so a long way one somewhere.
- Added
uiNewVerticalSeparator()
to increaseuiNewHorizontalSeparator()
.
-
-
sixteen June 2016
- Added
uiWindowContentSize()
,uiWindowSetContentSize()
, anduiWindowOnContentSizeChanged()
methods for manipulating uiWindow deliver sizes. Describe the teach of « deliver dimension »; the scale you’re employed with does NOT consist of window decorations (titlebars, menus, and heaps others.). - Added
uiWindowFullscreen()
anduiWindowSetFullscreen()
to allow making fullscreen uiWindows, taking profit of OS facilities for fullscreen and with out altering the cloak decision (!). - Added
uiWindowBorderless()
anduiWindowSetBorderless()
for allowing with out boundary traces uiWindows. - Added
uiMainSteps()
. You call this rather thanuiMain()
whereas you might want to catch to bustle the major loop yourself. You cross in a characteristic that shall be called; within that characteristic, you calluiMainStep()
over and over till it returns Zero, doing no topic it be major to ruin within the meantime. (This was as soon as wanted because appropriate havinguiMainStep()
by itself only labored on some programs.) - Added
uiProgressBarValue()
and allowed passing -1 touiProgressBarSetValue()
to safe an indeterminate progress bar. Resulting from @emersion.
- Added
-
15 June 2016
- Added
uiFormDelete()
; attributable to @emersion. - Added
uiWindowPosition()
,uiWindowSetPosition()
,uiWindowCenter()
, anduiWindowOnPositionChanged()
, methods for manipulating uiWindow save.
- Added
-
14 June 2016
- uiDarwinControl now has a
ChildVisibilityChanged()
plan and a correspondingNotifyVisibilityChanged()
characteristic that is is named by the default expose/cowl handlers. Right here is frail to safe visibility adjustments work on OS X; uiBox, uiForm, and uiGrid all respect these now. - The identical has been performed on the Windows aspect as nicely.
- Hiding and showing controls and padding calculations are actually appropriate on Windows within the end.
- Hiding a assist watch over in a uiForm now hides its price on all platforms.
- uiDarwinControl now has a
-
13 June 2016
-
intmax_t
anduintmax_t
are now no longer frail for libui API capabilities; now we teachint
. This could occasionally composed safe things worthy more straightforward for bindings.int
could composed be as a minimum 32 bits wide; this could occasionally composed be sufficient for all nonetheless primarily the most extreme cases.
-
-
12 June 2016
- Added
uiGrid
, a brand new container assist watch over that arranges controls in rows and columns, with stretchy (« expanding ») rows, stretchy (« expanding ») columns, cells that span rows and columns, and cells whose deliver is aligned in both direction in desire to appropriate filling. It’s pretty extremely tremendous, is it? =P
- Added
-
eight June 2016
- Added
uiForm
, a brand new container assist watch over that arranges controls vertically, with effectively aligned labels on every. Believe relaxing!
- Added
-
6 June 2016
- Added
uiRadioButtonsSelected()
,uiRadioButtonsSetSelected()
, anduiRadioButtonsOnSelected()
to manipulate assortment of a radio button and catch an occasion when the kind of component happens.
- Added
-
5 June 2016
- Added
uiNewPasswordEntry()
, which creates a brand newuiEntry
appropriate for entering passwords. - Added
uiNewSearchEntry()
, which creates a brand newuiEntry
appropriate for procuring. On some programs, theOnChanged()
occasion shall be pretty delayed and/or mixed, to rating a extra pure if truth be told feel when procuring.
- Added
Frail updates could additionally be point to within the Changelog.md file.
Runtime Requirements
- Windows: Windows Vista SP2 with Platform Update or newer
- Unix: GTK+ three.10 or newer
- Mac OS X: OS X 10.eight or newer
Fabricate Requirements
- All platforms:
- Windows: both
- Microsoft Visual Studio 2013 or newer (2013 is major for
va_copy()
) — it’s good to possibly produce both a static or a shared library - MinGW-w64 (assorted flavors of MinGW could no longer work) — it’s good to possibly only produce a static library; shared library assist shall be re-added as soon as the following facets are accessible in:
- Isolation awareness, which is the plan you rating themed controls from a DLL with out needing a manifest
- Microsoft Visual Studio 2013 or newer (2013 is major for
- Unix: nothing else particular
- Mac OS X: nothing else particular, so long as it’s good to possibly produce Cocoa applications
Constructing
Out-of-tree builds conventional of cmake are most smartly-preferred:
$ # it's good to possibly composed be within the head-level libui itemizing, otherwise this obtained't work
$ mkdir produce
$ cd produce
$ cmake ..
Inch -DBUILD_SHARED_LIBS=OFF
to cmake
to produce a static library. The common cmake produce configurations are offered; if none is specified, Debug
is frail.
In case you teach a makefile generator with cmake, then
$ safe
$ safe tester # for the check program
$ safe examples # for examples
and cross VERBOSE=1
to hunt produce instructions. Fabricate targets shall be within the produce/out
folder.
Project file generators could composed work, nonetheless are untested by me.
On Windows, I teach the Unix Makefiles
generator and GNU safe (constructed the teach of the build_w32.bat
script included within the source and bustle within the Visual Studio narrate line). In this teach, if MinGW-w64 (both 32-bit or sixty 4-bit) is rarely any longer to your %PATH%
, cmake will teach MSVC by default; otherwise, cmake will teach and not utilizing a topic MinGW-w64 is to your path. station PATH=%PATH%;c:msys2mingw(32/sixty 4)bin
could composed be sufficient to fleet commerce to a MinGW-w64 produce for the brand new narrate line session offered that you installed MinGW-w64 thru MSYS2; no prefer to commerce global environment variables repeatedly.
Installation
Arch Linux
Might possibly per chance well also just additionally be constructed from AUR: https://aur.archlinux.org/applications/libui-git/
Documentation
Wants to be written. Search the advice of ui.h
and the examples for facts for now.
Language Bindings
libui was as soon as on the initiating written as a part of my equipment ui for Inch. Now that libui is separate, equipment ui has change into a binding to libui. As such, equipment ui is the one righteous binding.
Folks catch made bindings to assorted languages:
Usually Asked Questions
Why does my program start within the background on OS X if I bustle from the narrate line?
OS X customarily does no longer start program executables at as soon as; as an alternative, it uses Launch Products and services to coordinate the launching of the program between different facets of the map and the loading of information from an .app bundle. One among these coordination duties is to blame for bringing a newly launched app into the foreground. Right here is is named « activation ».
Whereas you bustle a binary at as soon as from the Terminal, nonetheless, you are working it at as soon as, no longer thru Launch Products and services. Resulting from this truth, the program starts within the background, because nobody informed it to activate! Now, it turns out there is an API that we are succesful of teach to force our app to be activated. Nonetheless if we teach it, then we’d be trampling over Launch Products and services, which already is conscious of whether or no longer it could well composed activate or no longer. Resulting from this truth, libui does no longer step over Launch Products and services, on the price of requiring an additional user step if working at as soon as from the narrate line.
Peek additionally this and this.
Contributing
Peek CONTRIBUTING.md
.
Screenshots
From examples/controlgallery:
Read More
Commentaires récents