Giter VIP home page Giter VIP logo

libui-rs's Introduction

Improved User Interface

A cross-platform UI toolkit for Rust based on libui

travis-ci build status libui-rs appveyor build status badge actively developed badge

iui: iui crates.io version badge docs.rs for iui rustc 1.40 ui-sys: ui-sys crates.io version badge docs.rs for ui-sys rustc 1.40

iui is a simple (about 4 kLOC of Rust), small (about 800kb, including libui), easy to distribute (one shared library) GUI library, providing a Rusty user interface library that binds to native APIs via the libui and the ui-sys bindings crate.

iui wraps native retained mode GUI libraries, like Win32API on Windows, Cocoa on Mac OS X, and GTK+ on Linux and elsewhere. Thus all iui apps have a native look and feel and start from a highly performant base which is well integrated with the native ecosystem on each platform. Because it implements only the least common subset of these platform APIs, your apps will work on all platforms and won't have significant behavioral inconsistencies, with no additional effort on your part.

Using

Add iui to your project with:

iui = "0.3"

Then, in your code, all you have to do is:

  1. create a UI handle, initializing the UI library and guarding against memory unsafety
  2. make a window, or a few, with title and platform-native decorations, into which your app will be drawn
  3. add all your controls, like buttons and text inputs, laid out with both axial and grid layout options
  4. implement some callbacks for user input, taking full advantage of Rust's concurrency protections
  5. call UI::main, or take control over the event processing with an EventLoop, and voíla! A GUI!

Or, you can track the trunk branch, which may be broken and whose API often changes, with:

iui = { git = "https://github.com/rust-native-ui/libui-rs.git" branch="trunk" }

We have documentation on docs.rs for released versions and on github for trunk.

Examples

Three example GUI applications running on Linux Three example GUI applications running on Ubuntu

Check out the examples/ directory from the latest release for these examples and more.

Organization

This repository contains multiple Rust crates:

  • iui is the safe Rust wrapper, to be used by most users.
  • ui-sys is the raw unsafe bindings to the libui C code. libui is included as a submodule.

Also be sure to look at our changelog and learn how to contribute.

Building ui-sys

ui-sys includes libui as a sub-module and allows it to be built on-the-fly with the default features fetch and build. With fetch disabled, it will simply build the existing sources without updating them, and with build disabled it will build nothing, assuming either a system or local (in ./lib/) version of libui is available.

Note that most of the time, building libui on the fly is what you want.

Acknowledgments

Based on work by @pcwalton.

libui-rs's People

Contributors

barzamin avatar coolreader18 avatar dependabot-support avatar huangjj27 avatar ivanceras avatar jamesmunns avatar killercup avatar lord avatar masche842 avatar mglolenstine avatar mitchhentges avatar mjhanninen avatar noracodes avatar nptr avatar nyanpasu64 avatar pcwalton avatar xobs avatar zakcodes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

libui-rs's Issues

Why do all examples clone() and move all values into callbacks?

I noticed that all examples clone() and move all values into the callbacks, including the ui context and all controls. In the case of inptus.rs, the mutable application state is wrapped in a Rc (over the RefCell) to be able to clone() and move several references into the callbacks.

I tried removing all of this overhead, just passing around simple read-only references, and everything seems to work the same (on Linux.)

What is the reason for adding those operations to the examples? Could you add a paragraph of documentation to the README explaining this choice?

In case it is needed to avoid problems and/or cross-platform compatibility, could you make it so that forgetting to do it would cause a compilation error? It seems an easy thing to forget, especially since everything seems to be working the same.

`uiTable`s/listboxes

should probably implement this in iui; they're very important/basic UI controls

Switch to meson build

libui switched from cmake to meson, so this project should keep up.

I decided to create this - a tracking issue on thoughs and desired features for that change.

While switching to meson build system, it would be great to have support for the following things, or at least keep them in mind:

  1. The ability to control whether to build a static or dynamic lib. Apparently, the recommended way of doing that is via build-time env vars, and not via cargo features.
  2. The ability to embed custom manifests on windows.

Thoughts?

All the events are unsound

They form no lifetime relationship and thus very short living callbacks are allowed, causing use after frees among other undefined behavior.

Here's an example of this:

let mut button = Button::new(&ui, "Button");
{
    let x = String::new();
    button.on_clicked(&ui, {
        |btn| {
            println!("{}", x);
        }
    });
    drop(x);
}

The button's click event references the String x, but it gets dropped before the event ever happens. Once it does happen, the dropped String is still used.

Build failed on Windows with VS2015: unresolved external symbol

If I config libui using cmake, then use VS2015 to compile the generated solution file. I can compile it successfully. But cargo build doesn't.
I have manually switch off BUILD_SHARED_LIBS in CMakeLists.txt
I have found something about it:
andlabs/libui#412

my os: windows7 64 bit
active toolchain:
nightly-i686-pc-windows-msvc (default)
rustc 1.31.0-nightly (78ff609d7 2018-10-19)

$ cargo build
   Compiling test_iui v0.1.0 (file:///H:/work/rust_projects/test_iui)
error: linking with `C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\link.exe` failed: exit code: 1120
  |
  = note: "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\link.exe" "/NOLOGO" "/NXCOMPAT" "/LARGEADDRESSAWARE" "/SAFESEH" "/LIBPATH:C:\\Users\\zoumi\\.rustup\\toolchains\\nightly-2018-06-01-i686-pc-windows-msvc\\lib\\rustlib\\i686-pc-windows-msvc\\lib" "E:\\rustdir\\target\\debug\\deps\\test_iui-4ad7fb88b0403855.10ygozpgsu0ud2lu.rcgu.o" "E:\\rustdir\\target\\debug\\deps\\test_iui-4ad7fb88b0403855.16u6js6g0l3k1ic6.rcgu.o" "E:\\rustdir\\target\\debug\\deps\\test_iui-4ad7fb88b0403855.181cuta0v63atwcm.rcgu.o" "E:\\rustdir\\target\\debug\\deps\\test_iui-4ad7fb88b0403855.1im38lueib99jsk0.rcgu.o" "E:\\rustdir\\target\\debug\\deps\\test_iui-4ad7fb88b0403855.1y16o1qfye96o7m0.rcgu.o" "E:\\rustdir\\target\\debug\\deps\\test_iui-4ad7fb88b0403855.22hgtdbdcu0u8p27.rcgu.o" "E:\\rustdir\\target\\debug\\deps\\test_iui-4ad7fb88b0403855.25eyya0j1gdwlbxr.rcgu.o" "E:\\rustdir\\target\\debug\\deps\\test_iui-4ad7fb88b0403855.287fjwldxriihryb.rcgu.o" "E:\\rustdir\\target\\debug\\deps\\test_iui-4ad7fb88b0403855.2yyg5bd89e3irycb.rcgu.o" "E:\\rustdir\\target\\debug\\deps\\test_iui-4ad7fb88b0403855.3ayaeypdcro9d6yk.rcgu.o" "E:\\rustdir\\target\\debug\\deps\\test_iui-4ad7fb88b0403855.3p4871ksc97vnnrn.rcgu.o" "E:\\rustdir\\target\\debug\\deps\\test_iui-4ad7fb88b0403855.3rngp6bm2u2q5z0y.rcgu.o" "E:\\rustdir\\target\\debug\\deps\\test_iui-4ad7fb88b0403855.3vv0q9obd6w3595h.rcgu.o" "E:\\rustdir\\target\\debug\\deps\\test_iui-4ad7fb88b0403855.3wta9ctgdrpkmlpr.rcgu.o" "E:\\rustdir\\target\\debug\\deps\\test_iui-4ad7fb88b0403855.4e37gusgw81ck2ot.rcgu.o" "E:\\rustdir\\target\\debug\\deps\\test_iui-4ad7fb88b0403855.4oc10dk278mpk1vy.rcgu.o" "E:\\rustdir\\target\\debug\\deps\\test_iui-4ad7fb88b0403855.4xq48u46a1pwiqn7.rcgu.o" "E:\\rustdir\\target\\debug\\deps\\test_iui-4ad7fb88b0403855.4yekh4a49ri9ikb0.rcgu.o" "E:\\rustdir\\target\\debug\\deps\\test_iui-4ad7fb88b0403855.4yh8x2b62dcih00t.rcgu.o" "E:\\rustdir\\target\\debug\\deps\\test_iui-4ad7fb88b0403855.4ypvbwho0bu5tnww.rcgu.o" "E:\\rustdir\\target\\debug\\deps\\test_iui-4ad7fb88b0403855.8xzrsc1ux72v29j.rcgu.o" "E:\\rustdir\\target\\debug\\deps\\test_iui-4ad7fb88b0403855.98g0d9x8aw3akpe.rcgu.o" "E:\\rustdir\\target\\debug\\deps\\test_iui-4ad7fb88b0403855.9elsx31vb4it187.rcgu.o" "E:\\rustdir\\target\\debug\\deps\\test_iui-4ad7fb88b0403855.c6lbtaiefvx3wya.rcgu.o" "E:\\rustdir\\target\\debug\\deps\\test_iui-4ad7fb88b0403855.uj1kr5j3wr6o9sy.rcgu.o" "E:\\rustdir\\target\\debug\\deps\\test_iui-4ad7fb88b0403855.y08g5q2x813c4wx.rcgu.o" "/OUT:E:\\rustdir\\target\\debug\\deps\\test_iui-4ad7fb88b0403855.exe" "E:\\rustdir\\target\\debug\\deps\\test_iui-4ad7fb88b0403855.crate.allocator.rcgu.o" "/OPT:REF,NOICF" "/DEBUG" "/NATVIS:C:\\Users\\zoumi\\.rustup\\toolchains\\nightly-2018-06-01-i686-pc-windows-msvc\\lib\\rustlib\\etc\\intrinsic.natvis" "/NATVIS:C:\\Users\\zoumi\\.rustup\\toolchains\\nightly-2018-06-01-i686-pc-windows-msvc\\lib\\rustlib\\etc\\liballoc.natvis" "/NATVIS:C:\\Users\\zoumi\\.rustup\\toolchains\\nightly-2018-06-01-i686-pc-windows-msvc\\lib\\rustlib\\etc\\libcore.natvis" "/LIBPATH:E:\\rustdir\\target\\debug\\deps" "/LIBPATH:lib" "/LIBPATH:E:\\rustdir\\target\\debug\\build\\ui-sys-77c30c6ccbc7e5dd\\out\\build\\out\\Release" "/LIBPATH:C:\\Users\\zoumi\\.rustup\\toolchains\\nightly-2018-06-01-i686-pc-windows-msvc\\lib\\rustlib\\i686-pc-windows-msvc\\lib" "E:\\rustdir\\target\\debug\\deps\\libiui-83525d7d0cd950b9.rlib" "E:\\rustdir\\target\\debug\\deps\\libui_sys-23875eb73248004c.rlib" "E:\\rustdir\\target\\debug\\deps\\liblibc-57058dc78ce2c577.rlib" "E:\\rustdir\\target\\debug\\deps\\libfailure-3f5eb8c0ee68db22.rlib" "E:\\rustdir\\target\\debug\\deps\\libbacktrace-684c75ce68dd1ff0.rlib" "E:\\rustdir\\target\\debug\\deps\\librustc_demangle-ac4f8829c8cfdcfe.rlib" "E:\\rustdir\\target\\debug\\deps\\libcfg_if-4116deac892d1f09.rlib" "E:\\rustdir\\target\\debug\\deps\\libwinapi-ecc4ed9dab5add64.rlib" "C:\\Users\\zoumi\\.rustup\\toolchains\\nightly-2018-06-01-i686-pc-windows-msvc\\lib\\rustlib\\i686-pc-windows-msvc\\lib\\libstd-4f6c832f116b0abe.rlib" "C:\\Users\\zoumi\\.rustup\\toolchains\\nightly-2018-06-01-i686-pc-windows-msvc\\lib\\rustlib\\i686-pc-windows-msvc\\lib\\libpanic_unwind-b911946e8a3c0663.rlib" "C:\\Users\\zoumi\\.rustup\\toolchains\\nightly-2018-06-01-i686-pc-windows-msvc\\lib\\rustlib\\i686-pc-windows-msvc\\lib\\libunwind-55102718cc9aa5fb.rlib" "C:\\Users\\zoumi\\.rustup\\toolchains\\nightly-2018-06-01-i686-pc-windows-msvc\\lib\\rustlib\\i686-pc-windows-msvc\\lib\\liblibc-5bb804a2c7e07586.rlib" "C:\\Users\\zoumi\\.rustup\\toolchains\\nightly-2018-06-01-i686-pc-windows-msvc\\lib\\rustlib\\i686-pc-windows-msvc\\lib\\liballoc_system-047fc96b04eda8b5.rlib" "C:\\Users\\zoumi\\.rustup\\toolchains\\nightly-2018-06-01-i686-pc-windows-msvc\\lib\\rustlib\\i686-pc-windows-msvc\\lib\\liballoc-b35a2fad658422a1.rlib" "C:\\Users\\zoumi\\.rustup\\toolchains\\nightly-2018-06-01-i686-pc-windows-msvc\\lib\\rustlib\\i686-pc-windows-msvc\\lib\\libcore-cc1407f912443135.rlib" "C:\\Users\\zoumi\\.rustup\\toolchains\\nightly-2018-06-01-i686-pc-windows-msvc\\lib\\rustlib\\i686-pc-windows-msvc\\lib\\libcompiler_builtins-2ad27d32139e019d.rlib" "libui.lib" "advapi32.lib" "dbghelp.lib" "kernel32.lib" "advapi32.lib" "ws2_32.lib" "userenv.lib" "shell32.lib" "msvcrt.lib"
  = note:    Creating library E:\rustdir\target\debug\deps\test_iui-4ad7fb88b0403855.lib and object E:\rustdir\target\debug\deps\test_iui-4ad7fb88b0403855.exp
          LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library
          libui.lib(grid.obj) : error LNK2001: unresolved external symbol __imp___invalid_parameter
          libui.lib(alloc.obj) : error LNK2001: unresolved external symbol __imp___invalid_parameter
          libui.lib(utf16.obj) : error LNK2001: unresolved external symbol __imp___invalid_parameter
          libui.lib(events.obj) : error LNK2001: unresolved external symbol __imp___invalid_parameter
          libui.lib(window.obj) : error LNK2001: unresolved external symbol __imp___invalid_parameter
          libui.lib(box.obj) : error LNK2001: unresolved external symbol __imp___invalid_parameter
          libui.lib(draw.obj) : error LNK2001: unresolved external symbol __imp___invalid_parameter
          libui.lib(tab.obj) : error LNK2001: unresolved external symbol __imp___invalid_parameter
          libui.lib(area.obj) : error LNK2001: unresolved external symbol __imp__SendMessageW@16
          libui.lib(areaevents.cpp.obj) : error LNK2001: unresolved external symbol __imp__SendMessageW@16
          libui.lib(parent.obj) : error LNK2001: unresolved external symbol __imp__SendMessageW@16
          libui.lib(events.obj) : error LNK2001: unresolved external symbol __imp__SendMessageW@16
          libui.lib(tabpage.obj) : error LNK2001: unresolved external symbol __imp__SendMessageW@16
          libui.lib(d2dscratch.obj) : error LNK2001: unresolved external symbol __imp__SendMessageW@16
          libui.lib(checkbox.obj) : error LNK2001: unresolved external symbol __imp__SendMessageW@16
          libui.lib(control.cpp.obj) : error LNK2001: unresolved external symbol __imp__SendMessageW@16
          libui.lib(text.obj) : error LNK2001: unresolved external symbol __imp__SendMessageW@16
          libui.lib(winutil.obj) : error LNK2001: unresolved external symbol __imp__SendMessageW@16
          libui.lib(slider.obj) : error LNK2001: unresolved external symbol __imp__SendMessageW@16
          libui.lib(entry.obj) : error LNK2001: unresolved external symbol __imp__SendMessageW@16
          libui.lib(multilineentry.obj) : error LNK2001: unresolved external symbol __imp__SendMessageW@16
          libui.lib(combobox.obj) : error LNK2001: unresolved external symbol __imp__SendMessageW@16
          libui.lib(window.obj) : error LNK2001: unresolved external symbol __imp__SendMessageW@16
          libui.lib(button.obj) : error LNK2001: unresolved external symbol __imp__SendMessageW@16
          libui.lib(tab.obj) : error LNK2001: unresolved external symbol __imp__SendMessageW@16
          libui.lib(spinbox.obj) : error LNK2001: unresolved external symbol __imp__SendMessageW@16
          libui.lib(d2dscratch.obj) : error LNK2001: unresolved external symbol __imp__DefWindowProcW@16
          libui.lib(area.obj) : error LNK2001: unresolved external symbol __imp__DefWindowProcW@16
          libui.lib(window.obj) : error LNK2001: unresolved external symbol __imp__DefWindowProcW@16
          libui.lib(group.obj) : error LNK2001: unresolved external symbol __imp__DefWindowProcW@16
          libui.lib(container.obj) : error LNK2001: unresolved external symbol __imp__DefWindowProcW@16
          libui.lib(utilwin.obj) : error LNK2001: unresolved external symbol __imp__DefWindowProcW@16
          libui.lib(area.obj) : error LNK2001: unresolved external symbol __imp__RegisterClassW@4
          libui.lib(window.obj) : error LNK2001: unresolved external symbol __imp__RegisterClassW@4
          libui.lib(container.obj) : error LNK2001: unresolved external symbol __imp__RegisterClassW@4
          libui.lib(utilwin.obj) : error LNK2001: unresolved external symbol __imp__RegisterClassW@4
          libui.lib(d2dscratch.obj) : error LNK2001: unresolved external symbol __imp__RegisterClassW@4
          libui.lib(area.obj) : error LNK2001: unresolved external symbol __imp__UnregisterClassW@8
          libui.lib(window.obj) : error LNK2001: unresolved external symbol __imp__UnregisterClassW@8
          libui.lib(container.obj) : error LNK2001: unresolved external symbol __imp__UnregisterClassW@8
          libui.lib(utilwin.obj) : error LNK2001: unresolved external symbol __imp__UnregisterClassW@8
          libui.lib(d2dscratch.obj) : error LNK2001: unresolved external symbol __imp__UnregisterClassW@8
          libui.lib(d2dscratch.obj) : error LNK2001: unresolved external symbol __imp__CreateWindowExW@48
          libui.lib(window.obj) : error LNK2001: unresolved external symbol __imp__CreateWindowExW@48
          libui.lib(spinbox.obj) : error LNK2001: unresolved external symbol __imp__CreateWindowExW@48
          libui.lib(control.cpp.obj) : error LNK2001: unresolved external symbol __imp__CreateWindowExW@48
          libui.lib(utilwin.obj) : error LNK2001: unresolved external symbol __imp__CreateWindowExW@48
          libui.lib(combobox.obj) : error LNK2001: unresolved external symbol __imp__ShowWindow@8
          libui.lib(checkbox.obj) : error LNK2001: unresolved external symbol __imp__ShowWindow@8
          libui.lib(tabpage.obj) : error LNK2001: unresolved external symbol __imp__ShowWindow@8
          libui.lib(area.obj) : error LNK2001: unresolved external symbol __imp__ShowWindow@8
          libui.lib(spinbox.obj) : error LNK2001: unresolved external symbol __imp__ShowWindow@8
          libui.lib(slider.obj) : error LNK2001: unresolved external symbol __imp__ShowWindow@8
          libui.lib(entry.obj) : error LNK2001: unresolved external symbol __imp__ShowWindow@8
          libui.lib(multilineentry.obj) : error LNK2001: unresolved external symbol __imp__ShowWindow@8
          libui.lib(tab.obj) : error LNK2001: unresolved external symbol __imp__ShowWindow@8
          libui.lib(separator.obj) : error LNK2001: unresolved external symbol __imp__ShowWindow@8
          libui.lib(grid.obj) : error LNK2001: unresolved external symbol __imp__ShowWindow@8
          libui.lib(label.obj) : error LNK2001: unresolved external symbol __imp__ShowWindow@8
          libui.lib(window.obj) : error LNK2001: unresolved external symbol __imp__ShowWindow@8
          libui.lib(group.obj) : error LNK2001: unresolved external symbol __imp__ShowWindow@8
          libui.lib(box.obj) : error LNK2001: unresolved external symbol __imp__ShowWindow@8
          libui.lib(button.obj) : error LNK2001: unresolved external symbol __imp__ShowWindow@8
          libui.lib(window.obj) : error LNK2019: unresolved external symbol __imp__SetWindowPos@28 referenced in function _uiWindowSetContentSize
          libui.lib(winpublic.obj) : error LNK2001: unresolved external symbol __imp__SetWindowPos@28
          libui.lib(winutil.obj) : error LNK2001: unresolved external symbol __imp__SetWindowPos@28
          libui.lib(window.obj) : error LNK2019: unresolved external symbol __imp__GetWindowPlacement@8 referenced in function _uiWindowSetFullscreen
          libui.lib(window.obj) : error LNK2019: unresolved external symbol __imp__SetWindowPlacement@8 referenced in function _uiWindowSetFullscreen
          libui.lib(utilwin.obj) : error LNK2001: unresolved external symbol __imp__EnableWindow@8
          libui.lib(area.obj) : error LNK2001: unresolved external symbol __imp__EnableWindow@8
          libui.lib(entry.obj) : error LNK2001: unresolved external symbol __imp__EnableWindow@8
          libui.lib(multilineentry.obj) : error LNK2001: unresolved external symbol __imp__EnableWindow@8
          libui.lib(combobox.obj) : error LNK2001: unresolved external symbol __imp__EnableWindow@8
          libui.lib(checkbox.obj) : error LNK2001: unresolved external symbol __imp__EnableWindow@8
          libui.lib(separator.obj) : error LNK2001: unresolved external symbol __imp__EnableWindow@8
          libui.lib(label.obj) : error LNK2001: unresolved external symbol __imp__EnableWindow@8
          libui.lib(spinbox.obj) : error LNK2001: unresolved external symbol __imp__EnableWindow@8
          libui.lib(slider.obj) : error LNK2001: unresolved external symbol __imp__EnableWindow@8
          libui.lib(window.obj) : error LNK2001: unresolved external symbol __imp__EnableWindow@8
          libui.lib(group.obj) : error LNK2001: unresolved external symbol __imp__EnableWindow@8
          libui.lib(button.obj) : error LNK2001: unresolved external symbol __imp__EnableWindow@8
          libui.lib(tab.obj) : error LNK2001: unresolved external symbol __imp__EnableWindow@8
          libui.lib(window.obj) : error LNK2019: unresolved external symbol __imp__GetSystemMetrics@4 referenced in function "void __cdecl windowMonitorRect(struct HWND__ *,struct tagRECT *)" (?windowMonitorRect@@YAXPAUHWND__@@PAUtagRECT@@@Z)
          libui.lib(button.obj) : error LNK2001: unresolved external symbol __imp__GetSystemMetrics@4
          libui.lib(areaevents.cpp.obj) : error LNK2001: unresolved external symbol __imp__GetSystemMetrics@4
          libui.lib(window.obj) : error LNK2019: unresolved external symbol __imp__SetMenu@8 referenced in function _uiNewWindow
          libui.lib(window.obj) : error LNK2019: unresolved external symbol __imp__UpdateWindow@4 referenced in function "void __cdecl uiWindowShow(struct uiControl *)" (?uiWindowShow@@YAXPAUuiControl@@@Z)
          libui.lib(window.obj) : error LNK2019: unresolved external symbol __imp__AdjustWindowRectEx@16 referenced in function "void __cdecl setClientSize(struct uiWindow *,int,int,int,unsigned long,unsigned long)" (?setClientSize@@YAXPAUuiWindow@@HHHKK@Z)
          libui.lib(winutil.obj) : error LNK2001: unresolved external symbol __imp__AdjustWindowRectEx@16
          libui.lib(d2dscratch.obj) : error LNK2001: unresolved external symbol __imp__GetWindowLongW@8
          libui.lib(area.obj) : error LNK2001: unresolved external symbol __imp__GetWindowLongW@8
          libui.lib(window.obj) : error LNK2001: unresolved external symbol __imp__GetWindowLongW@8
          libui.lib(winutil.obj) : error LNK2001: unresolved external symbol __imp__GetWindowLongW@8
          libui.lib(container.obj) : error LNK2001: unresolved external symbol __imp__GetWindowLongW@8
          libui.lib(tabpage.obj) : error LNK2001: unresolved external symbol __imp__GetWindowLongW@8
          libui.lib(tabpage.obj) : error LNK2001: unresolved external symbol __imp__SetWindowLongW@12
          libui.lib(d2dscratch.obj) : error LNK2001: unresolved external symbol __imp__SetWindowLongW@12
          libui.lib(area.obj) : error LNK2001: unresolved external symbol __imp__SetWindowLongW@12
          libui.lib(window.obj) : error LNK2001: unresolved external symbol __imp__SetWindowLongW@12
          libui.lib(winpublic.obj) : error LNK2001: unresolved external symbol __imp__SetWindowLongW@12
          libui.lib(winutil.obj) : error LNK2001: unresolved external symbol __imp__SetWindowLongW@12
          libui.lib(container.obj) : error LNK2001: unresolved external symbol __imp__SetWindowLongW@12
          libui.lib(window.obj) : error LNK2019: unresolved external symbol __imp__MonitorFromWindow@8 referenced in function "void __cdecl windowMonitorRect(struct HWND__ *,struct tagRECT *)" (?windowMonitorRect@@YAXPAUHWND__@@PAUtagRECT@@@Z)
          libui.lib(window.obj) : error LNK2019: unresolved external symbol __imp__GetMonitorInfoW@8 referenced in function "void __cdecl windowMonitorRect(struct HWND__ *,struct tagRECT *)" (?windowMonitorRect@@YAXPAUHWND__@@PAUtagRECT@@@Z)
          libui.lib(grid.obj) : error LNK2001: unresolved external symbol __imp___CrtDbgReportW
          libui.lib(alloc.obj) : error LNK2001: unresolved external symbol __imp___CrtDbgReportW
          libui.lib(utf16.obj) : error LNK2001: unresolved external symbol __imp___CrtDbgReportW
          libui.lib(events.obj) : error LNK2001: unresolved external symbol __imp___CrtDbgReportW
          libui.lib(window.obj) : error LNK2001: unresolved external symbol __imp___CrtDbgReportW
          libui.lib(box.obj) : error LNK2001: unresolved external symbol __imp___CrtDbgReportW
          libui.lib(draw.obj) : error LNK2001: unresolved external symbol __imp___CrtDbgReportW
          libui.lib(tab.obj) : error LNK2001: unresolved external symbol __imp___CrtDbgReportW
          libui.lib(group.obj) : error LNK2019: unresolved external symbol _SetWindowSubclass@16 referenced in function _uiNewGroup
          libui.lib(d2dscratch.obj) : error LNK2001: unresolved external symbol _SetWindowSubclass@16
          libui.lib(group.obj) : error LNK2019: unresolved external symbol _RemoveWindowSubclass@12 referenced in function "long __stdcall groupSubProc(struct HWND__ *,unsigned int,unsigned int,long,unsigned int,unsigned long)" (?groupSubProc@@YGJPAUHWND__@@IIJIK@Z)
          libui.lib(group.obj) : error LNK2019: unresolved external symbol _DefSubclassProc@16 referenced in function "long __stdcall groupSubProc(struct HWND__ *,unsigned int,unsigned int,long,unsigned int,unsigned long)" (?groupSubProc@@YGJPAUHWND__@@IIJIK@Z)
          libui.lib(draw.obj) : error LNK2019: unresolved external symbol __imp__GetDeviceCaps@8 referenced in function "struct ID2D1HwndRenderTarget * __cdecl makeHWNDRenderTarget(struct HWND__ *)" (?makeHWNDRenderTarget@@YAPAUID2D1HwndRenderTarget@@PAUHWND__@@@Z)
          libui.lib(draw.obj) : error LNK2019: unresolved external symbol __imp__GetDC@4 referenced in function "struct ID2D1HwndRenderTarget * __cdecl makeHWNDRenderTarget(struct HWND__ *)" (?makeHWNDRenderTarget@@YAPAUID2D1HwndRenderTarget@@PAUHWND__@@@Z)
          libui.lib(text.obj) : error LNK2001: unresolved external symbol __imp__GetDC@4
          libui.lib(sizing.obj) : error LNK2001: unresolved external symbol __imp__GetDC@4
          libui.lib(draw.obj) : error LNK2019: unresolved external symbol __imp__ReleaseDC@8 referenced in function "struct ID2D1HwndRenderTarget * __cdecl makeHWNDRenderTarget(struct HWND__ *)" (?makeHWNDRenderTarget@@YAPAUID2D1HwndRenderTarget@@PAUHWND__@@@Z)
          libui.lib(text.obj) : error LNK2001: unresolved external symbol __imp__ReleaseDC@8
          libui.lib(sizing.obj) : error LNK2001: unresolved external symbol __imp__ReleaseDC@8
          libui.lib(draw.obj) : error LNK2019: unresolved external symbol _D2D1CreateFactory@16 referenced in function "long __cdecl initDraw(void)" (?initDraw@@YAJXZ)
          libui.lib(menu.obj) : error LNK2019: unresolved external symbol __imp__CreateMenu@0 referenced in function "struct HMENU__ * __cdecl makeMenubar(void)" (?makeMenubar@@YAPAUHMENU__@@XZ)
          libui.lib(menu.obj) : error LNK2019: unresolved external symbol __imp__CreatePopupMenu@0 referenced in function "struct HMENU__ * __cdecl makeMenu(struct uiMenu *)" (?makeMenu@@YAPAUHMENU__@@PAUuiMenu@@@Z)
          libui.lib(menu.obj) : error LNK2019: unresolved external symbol __imp__AppendMenuW@16 referenced in function "struct HMENU__ * __cdecl makeMenubar(void)" (?makeMenubar@@YAPAUHMENU__@@XZ)
          libui.lib(menu.obj) : error LNK2019: unresolved external symbol __imp__GetMenuItemInfoW@16 referenced in function "void __cdecl freeMenubar(struct HMENU__ *)" (?freeMenubar@@YAXPAUHMENU__@@@Z)
          libui.lib(menu.obj) : error LNK2019: unresolved external symbol __imp__SetMenuItemInfoW@16 referenced in function "void __cdecl sync(struct uiMenuItem *)" (?sync@@YAXPAUuiMenuItem@@@Z)
          libui.lib(stddialogs.obj) : error LNK2019: unresolved external symbol __imp__CoCreateInstance@20 referenced in function "char * __cdecl commonItemDialog(struct HWND__ *,struct _GUID const &,struct _GUID const &,unsigned long)" (?commonItemDialog@@YAPADPAUHWND__@@ABU_GUID@@1K@Z)
          libui.lib(stddialogs.obj) : error LNK2019: unresolved external symbol __imp__CoTaskMemFree@4 referenced in function "char * __cdecl commonItemDialog(struct HWND__ *,struct _GUID const &,struct _GUID const &,unsigned long)" (?commonItemDialog@@YAPADPAUHWND__@@ABU_GUID@@1K@Z)
          libui.lib(stddialogs.obj) : error LNK2019: unresolved external symbol __imp__TaskDialog@32 referenced in function "void __cdecl msgbox(struct HWND__ *,char const *,char const *,int,wchar_t const *)" (?msgbox@@YAXPAUHWND__@@PBD1HPB_W@Z)
          libui.lib(drawmatrix.obj) : error LNK2019: unresolved external symbol _D2D1MakeRotateMatrix@16 referenced in function "public: static class D2D1::Matrix3x2F __cdecl D2D1::Matrix3x2F::Rotation(float,struct D2D_POINT_2F)" (?Rotation@Matrix3x2F@D2D1@@SA?AV12@MUD2D_POINT_2F@@@Z)
          libui.lib(drawmatrix.obj) : error LNK2019: unresolved external symbol _D2D1MakeSkewMatrix@20 referenced in function "public: static class D2D1::Matrix3x2F __cdecl D2D1::Matrix3x2F::Skew(float,float,struct D2D_POINT_2F)" (?Skew@Matrix3x2F@D2D1@@SA?AV12@MMUD2D_POINT_2F@@@Z)
          libui.lib(drawmatrix.obj) : error LNK2019: unresolved external symbol _D2D1IsMatrixInvertible@4 referenced in function _uiDrawMatrixInvertible
          libui.lib(drawmatrix.obj) : error LNK2019: unresolved external symbol _D2D1InvertMatrix@4 referenced in function _uiDrawMatrixInvert
          libui.lib(init.obj) : error LNK2019: unresolved external symbol __imp__CreateFontIndirectW@4 referenced in function _uiInit
          libui.lib(init.obj) : error LNK2019: unresolved external symbol __imp__DeleteObject@4 referenced in function _uiUninit
          libui.lib(parent.obj) : error LNK2001: unresolved external symbol __imp__DeleteObject@4
          libui.lib(init.obj) : error LNK2019: unresolved external symbol __imp__GetStockObject@4 referenced in function _uiInit
          libui.lib(init.obj) : error LNK2019: unresolved external symbol __imp__LoadCursorW@8 referenced in function _uiInit
          libui.lib(init.obj) : error LNK2019: unresolved external symbol __imp__LoadIconW@8 referenced in function _uiInit
          libui.lib(init.obj) : error LNK2019: unresolved external symbol __imp__SystemParametersInfoW@16 referenced in function _uiInit
          libui.lib(areascroll.obj) : error LNK2001: unresolved external symbol __imp__SystemParametersInfoW@16
          libui.lib(init.obj) : error LNK2019: unresolved external symbol __imp__CoUninitialize@0 referenced in function _uiUninit
          libui.lib(init.obj) : error LNK2019: unresolved external symbol __imp__CoInitialize@4 referenced in function _uiInit
          libui.lib(init.obj) : error LNK2019: unresolved external symbol __imp__InitCommonControlsEx@4 referenced in function _uiInit
          libui.lib(main.obj) : error LNK2019: unresolved external symbol __imp__GetMessageW@16 referenced in function "int __cdecl waitMessage(struct tagMSG *)" (?waitMessage@@YAHPAUtagMSG@@@Z)
          libui.lib(main.obj) : error LNK2019: unresolved external symbol __imp__TranslateMessage@4 referenced in function "void __cdecl processMessage(struct tagMSG *)" (?processMessage@@YAXPAUtagMSG@@@Z)
          libui.lib(main.obj) : error LNK2019: unresolved external symbol __imp__DispatchMessageW@4 referenced in function "void __cdecl processMessage(struct tagMSG *)" (?processMessage@@YAXPAUtagMSG@@@Z)
          libui.lib(main.obj) : error LNK2019: unresolved external symbol __imp__PeekMessageW@20 referenced in function "int __cdecl peekMessage(struct tagMSG *)" (?peekMessage@@YAHPAUtagMSG@@@Z)
          libui.lib(main.obj) : error LNK2019: unresolved external symbol __imp__PostMessageW@16 referenced in function _uiQueueMain
          libui.lib(main.obj) : error LNK2019: unresolved external symbol __imp__PostQuitMessage@4 referenced in function _uiQuit
          libui.lib(main.obj) : error LNK2019: unresolved external symbol __imp__GetActiveWindow@0 referenced in function "void __cdecl processMessage(struct tagMSG *)" (?processMessage@@YAXPAUtagMSG@@@Z)
          libui.lib(main.obj) : error LNK2019: unresolved external symbol __imp__SetTimer@16 referenced in function _uiTimer
          libui.lib(main.obj) : error LNK2019: unresolved external symbol __imp__SetWindowsHookExW@16 referenced in function "int __cdecl registerMessageFilter(void)" (?registerMessageFilter@@YAHXZ)
          libui.lib(main.obj) : error LNK2019: unresolved external symbol __imp__UnhookWindowsHookEx@4 referenced in function "void __cdecl unregisterMessageFilter(void)" (?unregisterMessageFilter@@YAXXZ)
          libui.lib(main.obj) : error LNK2019: unresolved external symbol __imp__CallNextHookEx@16 referenced in function "long __stdcall filterProc(int,unsigned int,long)" (?filterProc@@YGJHIJ@Z)
          libui.lib(main.obj) : error LNK2019: unresolved external symbol __imp__IsDialogMessageW@8 referenced in function "void __cdecl processMessage(struct tagMSG *)" (?processMessage@@YAXPAUtagMSG@@@Z)
          libui.lib(entry.obj) : error LNK2019: unresolved external symbol __imp__SetWindowTheme@12 referenced in function _uiNewSearchEntry
          libui.lib(winpublic.obj) : error LNK2019: unresolved external symbol __imp__DestroyWindow@4 referenced in function _uiWindowsEnsureDestroyWindow
          libui.lib(utilwin.obj) : error LNK2001: unresolved external symbol __imp__DestroyWindow@4
          libui.lib(winpublic.obj) : error LNK2019: unresolved external symbol __imp__GetClientRect@8 referenced in function _uiWindowsEnsureGetClientRect
          libui.lib(winpublic.obj) : error LNK2019: unresolved external symbol __imp__GetWindowRect@8 referenced in function _uiWindowsEnsureGetWindowRect
          libui.lib(winpublic.obj) : error LNK2019: unresolved external symbol __imp__SetParent@8 referenced in function _uiWindowsEnsureSetParentHWND
          libui.lib(text.obj) : error LNK2019: unresolved external symbol __imp__GetTextExtentPoint32W@16 referenced in function _uiWindowsWindowTextWidth
          libui.lib(sizing.obj) : error LNK2001: unresolved external symbol __imp__GetTextExtentPoint32W@16
          libui.lib(text.obj) : error LNK2019: unresolved external symbol __imp__SelectObject@8 referenced in function _uiWindowsWindowTextWidth
          libui.lib(sizing.obj) : error LNK2001: unresolved external symbol __imp__SelectObject@8
          libui.lib(parent.obj) : error LNK2001: unresolved external symbol __imp__SelectObject@8
          libui.lib(text.obj) : error LNK2019: unresolved external symbol __imp__SetWindowTextW@8 referenced in function "void __cdecl setWindowText(struct HWND__ *,wchar_t *)" (?setWindowText@@YAXPAUHWND__@@PA_W@Z)
          libui.lib(text.obj) : error LNK2019: unresolved external symbol __imp__GetWindowTextW@12 referenced in function "wchar_t * __cdecl windowTextAndLen(struct HWND__ *,long *)" (?windowTextAndLen@@YAPA_WPAUHWND__@@PAJ@Z)
          libui.lib(sizing.obj) : error LNK2019: unresolved external symbol __imp__GetTextMetricsW@8 referenced in function "void __cdecl getSizing(struct HWND__ *,struct uiWindowsSizing *,struct HFONT__ *)" (?getSizing@@YAXPAUHWND__@@PAUuiWindowsSizing@@PAUHFONT__@@@Z)
          libui.lib(winutil.obj) : error LNK2019: unresolved external symbol __imp__GetDlgItem@8 referenced in function "struct HWND__ * __cdecl getDlgItem(struct HWND__ *,int)" (?getDlgItem@@YAPAUHWND__@@PAU1@H@Z)
          libui.lib(winutil.obj) : error LNK2019: unresolved external symbol __imp__InvalidateRect@12 referenced in function "void __cdecl invalidateRect(struct HWND__ *,struct tagRECT *,int)" (?invalidateRect@@YAXPAUHWND__@@PAUtagRECT@@H@Z)
          libui.lib(winutil.obj) : error LNK2019: unresolved external symbol __imp__MapWindowPoints@16 referenced in function "void __cdecl mapWindowRect(struct HWND__ *,struct HWND__ *,struct tagRECT *)" (?mapWindowRect@@YAXPAUHWND__@@0PAUtagRECT@@@Z)
          libui.lib(winutil.obj) : error LNK2019: unresolved external symbol __imp__GetClassNameW@12 referenced in function "int __cdecl windowClassOf(struct HWND__ *,...)" (?windowClassOf@@YAHPAUHWND__@@ZZ)
          libui.lib(winutil.obj) : error LNK2019: unresolved external symbol __imp__GetAncestor@8 referenced in function "struct HWND__ * __cdecl parentOf(struct HWND__ *)" (?parentOf@@YAPAUHWND__@@PAU1@@Z)
          libui.lib(parent.obj) : error LNK2019: unresolved external symbol __imp__BitBlt@36 referenced in function "void __cdecl paintContainerBackground(struct HWND__ *,struct HDC__ *,struct tagRECT *)" (?paintContainerBackground@@YAXPAUHWND__@@PAUHDC__@@PAUtagRECT@@@Z)
          libui.lib(parent.obj) : error LNK2019: unresolved external symbol __imp__CreateCompatibleBitmap@12 referenced in function "long __cdecl parentDraw(struct HDC__ *,struct HWND__ *,struct parentDraw *)" (?parentDraw@@YAJPAUHDC__@@PAUHWND__@@PAU0@@Z)
          libui.lib(parent.obj) : error LNK2019: unresolved external symbol __imp__CreateCompatibleDC@4 referenced in function "long __cdecl parentDraw(struct HDC__ *,struct HWND__ *,struct parentDraw *)" (?parentDraw@@YAJPAUHDC__@@PAUHWND__@@PAU0@@Z)
          libui.lib(parent.obj) : error LNK2019: unresolved external symbol __imp__CreatePatternBrush@4 referenced in function "struct HBRUSH__ * __cdecl getControlBackgroundBrush(struct HWND__ *,struct HDC__ *)" (?getControlBackgroundBrush@@YAPAUHBRUSH__@@PAUHWND__@@PAUHDC__@@@Z)
          libui.lib(parent.obj) : error LNK2019: unresolved external symbol __imp__DeleteDC@4 referenced in function "void __cdecl endParentDraw(struct parentDraw *)" (?endParentDraw@@YAXPAUparentDraw@@@Z)
          libui.lib(parent.obj) : error LNK2019: unresolved external symbol __imp__SetBkMode@8 referenced in function "int __cdecl handleParentMessages(struct HWND__ *,unsigned int,unsigned int,long,long *)" (?handleParentMessages@@YAHPAUHWND__@@IIJPAJ@Z)
          libui.lib(parent.obj) : error LNK2019: unresolved external symbol __imp__SetBrushOrgEx@16 referenced in function "struct HBRUSH__ * __cdecl getControlBackgroundBrush(struct HWND__ *,struct HDC__ *)" (?getControlBackgroundBrush@@YAPAUHBRUSH__@@PAUHWND__@@PAUHDC__@@@Z)
          libui.lib(container.obj) : error LNK2019: unresolved external symbol __imp__BeginPaint@8 referenced in function "long __stdcall containerWndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?containerWndProc@@YGJPAUHWND__@@IIJ@Z)
          libui.lib(container.obj) : error LNK2019: unresolved external symbol __imp__EndPaint@8 referenced in function "long __stdcall containerWndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?containerWndProc@@YGJPAUHWND__@@IIJ@Z)
          libui.lib(events.obj) : error LNK2019: unresolved external symbol __imp__IsChild@8 referenced in function "int __cdecl shouldRun<int (__cdecl*)(struct uiControl *,struct HWND__ *,unsigned short,long *)>(struct HWND__ *,int (__cdecl*)(struct uiControl *,struct HWND__ *,unsigned short,long *))" (??$shouldRun@P6AHPAUuiControl@@PAUHWND__@@GPAJ@Z@@YAHPAUHWND__@@P6AHPAUuiControl@@0GPAJ@Z@Z)
          libui.lib(tabpage.obj) : error LNK2019: unresolved external symbol __imp__CreateDialogIndirectParamW@20 referenced in function "struct tabPage * __cdecl newTabPage(struct uiControl *)" (?newTabPage@@YAPAUtabPage@@PAUuiControl@@@Z)
          libui.lib(tabpage.obj) : error LNK2019: unresolved external symbol __imp__EnableThemeDialogTexture@8 referenced in function "struct tabPage * __cdecl newTabPage(struct uiControl *)" (?newTabPage@@YAPAUtabPage@@PAUuiControl@@@Z)
          libui.lib(utilwin.obj) : error LNK2019: unresolved external symbol __imp__KillTimer@8 referenced in function "long __stdcall utilWindowWndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?utilWindowWndProc@@YGJPAUHWND__@@IIJ@Z)
          libui.lib(d2dscratch.obj) : error LNK2019: unresolved external symbol __imp__ValidateRect@8 referenced in function "long __stdcall d2dScratchWndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?d2dScratchWndProc@@YGJPAUHWND__@@IIJ@Z)
          libui.lib(areadraw.obj) : error LNK2001: unresolved external symbol __imp__ValidateRect@8
          libui.lib(d2dscratch.obj) : error LNK2019: unresolved external symbol __imp__GetSysColor@4 referenced in function "long __cdecl d2dScratchDoPaint(struct HWND__ *,struct ID2D1RenderTarget *)" (?d2dScratchDoPaint@@YAJPAUHWND__@@PAUID2D1RenderTarget@@@Z)
          libui.lib(areadraw.obj) : error LNK2001: unresolved external symbol __imp__GetSysColor@4
          libui.lib(area.obj) : error LNK2019: unresolved external symbol __imp__ReleaseCapture@0 referenced in function _uiAreaBeginUserWindowMove
          libui.lib(areaevents.cpp.obj) : error LNK2001: unresolved external symbol __imp__ReleaseCapture@0
          libui.lib(dwrite.obj) : error LNK2019: unresolved external symbol __imp__DWriteCreateFactory@12 referenced in function "long __cdecl uiprivInitDrawText(void)" (?uiprivInitDrawText@@YAJXZ)
          libui.lib(areaevents.cpp.obj) : error LNK2019: unresolved external symbol __imp__GetMessageTime@0 referenced in function "void __cdecl areaMouseEvent(struct uiArea *,int,int,unsigned int,long)" (?areaMouseEvent@@YAXPAUuiArea@@HHIJ@Z)
          libui.lib(areaevents.cpp.obj) : error LNK2019: unresolved external symbol __imp__GetDoubleClickTime@0 referenced in function "void __cdecl areaMouseEvent(struct uiArea *,int,int,unsigned int,long)" (?areaMouseEvent@@YAXPAUuiArea@@HHIJ@Z)
          libui.lib(areaevents.cpp.obj) : error LNK2019: unresolved external symbol __imp__SetFocus@4 referenced in function "int __cdecl areaDoEvents(struct uiArea *,unsigned int,unsigned int,long,long *)" (?areaDoEvents@@YAHPAUuiArea@@IIJPAJ@Z)
          libui.lib(areaevents.cpp.obj) : error LNK2019: unresolved external symbol __imp__GetKeyState@4 referenced in function "unsigned int __cdecl getModifiers(void)" (?getModifiers@@YAIXZ)
          libui.lib(areaevents.cpp.obj) : error LNK2019: unresolved external symbol __imp__SetCapture@4 referenced in function "void __cdecl capture(struct uiArea *,int)" (?capture@@YAXPAUuiArea@@H@Z)
          libui.lib(areaevents.cpp.obj) : error LNK2019: unresolved external symbol __imp__PtInRect@12 referenced in function "void __cdecl areaMouseEvent(struct uiArea *,int,int,unsigned int,long)" (?areaMouseEvent@@YAXPAUuiArea@@HHIJ@Z)
          libui.lib(areaevents.cpp.obj) : error LNK2019: unresolved external symbol __imp___TrackMouseEvent@4 referenced in function "void __cdecl track(struct uiArea *,int)" (?track@@YAXPAUuiArea@@H@Z)
          libui.lib(areadraw.obj) : error LNK2019: unresolved external symbol __imp__GetUpdateRect@12 referenced in function "void __cdecl onWM_PAINT(struct uiArea *)" (?onWM_PAINT@@YAXPAUuiArea@@@Z)
          libui.lib(areascroll.obj) : error LNK2019: unresolved external symbol __imp__SetScrollInfo@16 referenced in function "void __cdecl scrollto(struct uiArea *,int,struct scrollParams *,int)" (?scrollto@@YAXPAUuiArea@@HPAUscrollParams@@H@Z)
          libui.lib(areascroll.obj) : error LNK2019: unresolved external symbol __imp__GetScrollInfo@12 referenced in function "void __cdecl scroll(struct uiArea *,int,struct scrollParams *,unsigned int,long)" (?scroll@@YAXPAUuiArea@@HPAUscrollParams@@IJ@Z)
          E:\rustdir\target\debug\deps\test_iui-4ad7fb88b0403855.exe : fatal error LNK1120: 102 unresolved externals

Convenience methods to add multiple children to layouts, etc

Several controls, especially Group and {Vertical, Horizontal}Box, could be much more ergonomic to use if they provided an interface looking something like the following:

fn add_all(&mut self, ctx: &UI, children: Vec<Control>)

These are of course not precisely the correct types, but the general shape of the interface is correct. Adding many children is a pain, and this would make it easier.

Bonus points if it takes impl Iterator<Item=Control> or similar.

Data Model

As mentioned in #47 there is not a unified model for mutable/immutable access. This needs to be fixed.

But how, exactly? For instance, when doing an operation requiring &mut access to a Control, should we require &mut access to the UI in use?

error: failed to run custom build command for `ui-sys v0.1.3`

I'm trying to execute the example in the crate.io but got this error, I read #14, #249 and #282 but did not get what shall I do exactly.

I'm at Mac.

The full error is:

Hasans-Air:hello-iui hasan$ cargo build
Compiling proc-macro2 v0.4.19
Compiling unicode-xid v0.1.0
Compiling cc v1.0.25
Compiling failure_derive v0.1.2
Compiling libc v0.2.43
Compiling cfg-if v0.1.5
Compiling rustc-demangle v0.1.9
Compiling bitflags v1.0.4
Compiling backtrace v0.3.9
Compiling cmake v0.1.34
Compiling ui-sys v0.1.3
Compiling quote v0.6.8
Compiling syn v0.14.9
error: failed to run custom build command for ui-sys v0.1.3
process didn't exit successfully: /Users/hasan/hello-iui/target/debug/build/ui-sys-0fdbd7b46e2e8b27/build-script-build (exit code: 101)
--- stdout
git version 2.17.1
running: "cmake" "/Users/hasan/.cargo/registry/src/github.com-1ecc6299db9ec823/ui-sys-0.1.3/libui" "-DCMAKE_INSTALL_PREFIX=/Users/hasan/hello-iui/target/debug/build/ui-sys-95463f95efa66ad5/out" "-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_C_COMPILER=/usr/bin/cc" "-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_CXX_COMPILER=/usr/bin/c++" "-DCMAKE_BUILD_TYPE=release"
-- The C compiler identification is AppleClang 10.0.0.10001044
-- The CXX compiler identification is AppleClang 10.0.0.10001044
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- broken
-- Configuring incomplete, errors occurred!
See also "/Users/hasan/hello-iui/target/debug/build/ui-sys-95463f95efa66ad5/out/build/CMakeFiles/CMakeOutput.log".
See also "/Users/hasan/hello-iui/target/debug/build/ui-sys-95463f95efa66ad5/out/build/CMakeFiles/CMakeError.log".

--- stderr
fatal: not a git repository (or any of the parent directories): .git
CMake Error at /usr/local/Cellar/cmake/3.11.4/share/cmake/Modules/CMakeTestCXXCompiler.cmake:45 (message):
The C++ compiler

"/usr/bin/c++"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: /Users/hasan/hello-iui/target/debug/build/ui-sys-95463f95efa66ad5/out/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_31f52/fast"
/Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_31f52.dir/build.make CMakeFiles/cmTC_31f52.dir/build
Building CXX object CMakeFiles/cmTC_31f52.dir/testCXXCompiler.cxx.o
/usr/bin/c++    -ffunction-sections -fdata-sections -fPIC -m64  -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -mmacosx-version-min=10.8   -o CMakeFiles/cmTC_31f52.dir/testCXXCompiler.cxx.o -c /Users/hasan/hello-iui/target/debug/build/ui-sys-95463f95efa66ad5/out/build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
warning: include path for stdlibc++ headers not found; pass '-std=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
1 warning generated.
Linking CXX executable cmTC_31f52
/usr/local/Cellar/cmake/3.11.4/bin/cmake -E cmake_link_script CMakeFiles/cmTC_31f52.dir/link.txt --verbose=1
/usr/bin/c++   -ffunction-sections -fdata-sections -fPIC -m64  -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -mmacosx-version-min=10.8 -Wl,-search_paths_first -Wl,-headerpad_max_install_names   CMakeFiles/cmTC_31f52.dir/testCXXCompiler.cxx.o  -o cmTC_31f52 
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated]
ld: library not found for -lstdc++
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [cmTC_31f52] Error 1
make: *** [cmTC_31f52/fast] Error 2

CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:35 (project)

thread 'main' panicked at '
command did not execute successfully, got: exit code: 1

build script failed, must exit now', /Users/hasan/.cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.34/src/lib.rs:776:5
note: Run with RUST_BACKTRACE=1 for a backtrace.

warning: build failed, waiting for other jobs to finish...
error: build failed

unsure how to use UI::queue_main with multiple threads

Hey there,

I'm experimenting with iui as a new Rust programmer and I'm unsure whether I've hit upon a design issue with UI::queue_main, or if there's a solution I've just missed, as this method isn't used in any of the examples.

According to the iui documentation, UI::queue_main will queue a function to execute on the GUI thread - I assume this is the thread that called UI::init().

libui explicitly states you can call uiQueueMain from any thread, but I can't figure out how to do this with iui; it requires a UI instance which I cannot obtain in non-GUI threads as UI is neither Send nor Sync.

Is there a way to do this, or is this a bug/design flaw? Any advice would be appreciated!


For reference - I'm trying to offload ongoing USB device I/O using hidapi-rs onto a background thread and have it notify the GUI thread when data comes in or when the device is connected/disconnected.

The only method I can figure out for doing this is to have the GUI create a channel where the Sender is moved into the background thread and Reciever::try_recv is called regularly on a timer, but this feels inelegant to me and I'd much rather be able to have the background thread notify the GUI through libui's queuing mechanism so that it can update immediately.

Broken link to trait BoxExt

On both docs.rs and github, the documentation for VerticalBox says "Lays out its children vertically; see BoxExt for functionality", where BoxExt is a link. The link is broken however, and I don't think BoxExt exists anymore

Get selected item from Combobox?

I'm looking at the documentation for Combobox control. I see a method to add items to combobox, I see a method to select an item and I see a method to create a callback that gets called on selected. But how do I actually GET selected item from combobox? Entry controls have value() method. What's the method for combobox? If I wanted to get the values from several comboboxes on the press of the button, would I really have to set on_selected() for each one and pass the data somewhere outside, to be collected in on_clicked() of the button?

enable/disable controls

Right now show/hide exists, but not enable/disable. You probably want to wait until bindgen works though

fatal: Not a git repository (or any of the parent directories): .git

reduced log as follow:

$ RUST_BACKTRACE=1 cargo check
   Compiling ui-sys v0.1.1
error: failed to run custom build command for `ui-sys v0.1.1`
process didn't exit successfully: `C:\Users\34937\Desktop\learning-rust\iui-example\target\debug\build\ui-sys-b9529245fd369183\build-script-build` (exit code: 101)
--- stderr
fatal: Not a git repository (or any of the parent directories): .git
thread 'main' panicked at '
command did not execute successfully, got: exit code: 1

build script failed, must exit now', C:\Users\34937\.cargo\registry\src\mirrors.ustc.edu.cn-61ef6e0cd06fb9b8\cmake-0.1.31\src\lib.rs:643:5

then, I search for the build.rs:L10-L12:

// Update the submodule with libui if needed
    if !Path::new("libui/.git").exists() {
        Command::new("git").args(&["submodule", "update", "--init"]).status().unwrap();
}

I'm wondering why it gave hints of "Not a git repository"? What happenned when I ran cargo?

Using CLion+Rust debugger cannot find "libui.so.0"

I've set up CLion with the 🎉 IntelliJ rust plugin 🎉, but I'm having issues running the debugger:

error while loading shared libraries: libui.so.0: cannot open shared object file: No such file or directory

I located libui.so.0:

$ find . -name 'libui.so.0'          
./target/debug/build/ui-sys-f439c2f1b0cb0138/out/build/out/libui.so.0

So, I tried setting LD_LIBRARY_PATH before running CLion:

$ LD_LIBRARY_PATH=/home/mitch/dev/pult/target/debug/build/ui-sys-f439c2f1b0cb0138/out/build/out snap run clion

However, I'm still getting "error while loading shared libraries" 🤔

I'm not super familiar with how shared libraries work, so I highly doubt that this issue is specific to libui-rs - there's just a chance that a libui-rs-er has run into this issue, too 😄 🤷‍♂️

Trigger associated submit button when "enter" pressed

When configuring inputs on a webpage, I can associate them with a form (which has a primary submit button). Then, when I click "enter" while any of those inputs are focused, then the submit button will automatically be triggered.

In my case, I've a couple inputs and a submit button:
Screenshot from 2019-05-25 18-36-38

I'd love to make it so hitting "enter" while the Entry is focused will cause the submit action 😄

Please link to libui in README

Currently, the README just says libui is cross-platform without elaborating, so my next step in determining whether this is relevant would be to visit libui for clarification and seeing no easy way to do that worsens the impression this project leaves on me.

Please provide a link to libui.

Broken docs link: BoxExt doesn't exist

The docs for HorizontalBox mention BoxExt:

Lays out its children horizontally; see BoxExt for functionality.

Unfortunately, the trait BoxExt no longer exists, so clicking the BoxExt link doesn't work.
I would supply a PR to resolve this, but I'm still learning iui, so I'm not sure the correct solution (yet?)

Examples for using DrawContext

I can't seem to comprehend how I'm supposed to use the DrawContext (or where do I get uiDrawContext ptr for instancing new DrawContext). Quick example could help

Spinbox value setting similar to checkbox

Currently, it appears that a Spinbox entry does not allow for an initial value to be set --only a min and max value. There is also no method similar to Checkbox's set_checked to set the current value either. I suspect the latter would be the best approach to mirror the Checkbox code.

I was looking to reduce space on screen through eliminating the need for a separate label to carry the value held in the Spinbox.

Trying to `cargo build` fails on `ui-sys`

Doing: cargo build causes following error on Windows 7 (64bit) and Rust 1.24.

_Compiling ui-sys v0.1.1
error: failed to run custom build command for ui-sys v0.1.1

--- stderr
fatal: Not a git repository (or any of the parent directories): .git
thread 'main' panicked at '_

The trace leads to: 10: build_script_build::main at .\build.rs:15

If I initialise a git-repo inside the folder, it just keeps the same error-trace but no actual mentioning of a fatal error.

Tip: Compile Dynamically with Mingw64/MSYS2 on Windows and a Question

Hello,

i have a simple fix for my problem. Compile onces with a failure and then go your cargo-folder .\cargo and search for the ui-sys-0.1.3 got libui and there to windows and edit the CMakeLists.txt at the end is an:


if(NOT MSVC)
	if(BUILD_SHARED_LIBS)
		message(FATAL_ERROR
			"Sorry, but libui for Windows can currently only be built as a static library with MinGW. You will need to either build as a static library or switch to MSVC."
		)
	endif()
endif()

Delete this lines completly and make an cargo clean and try to rebuild and magic its rebuild and you can find your libui.dll in your target directory (search for libui.dll).

Now after this i have a 2 short questions. What happends when i change my rust-toolchain to an win33 (i686) build, regonize this the cmakefiles in the libui-distrubution and build automaticly an 32bit libui.dll?

And what must i do to rename and copy automaticlly the libui.dll to libui_64.dll and copy it to the target-root?

thx

Fails during run when trying to add a Menu

Using the basic example as a baseline to make sure the error wasn't on my end, I tried to add a menu, changing the window type to HasMenubar and adding let menu = Menu::new(&ui, "Test Menu"); This complies without issues, but fails instantly at runtime. This happens whenever a new menu is defined.

   Compiling iui v0.3.0 (file:///X:/Documents/code_projects/libui-rs/iui)
warning: unused variable: `menu`
  --> examples\basic.rs:19:13
   |
19 |     let mut menu = Menu::new(&ui, "Test Menu");
   |             ^^^^ help: consider using `_menu` instead
   |
   = note: #[warn(unused_variables)] on by default

warning: variable does not need to be mutable
  --> examples\basic.rs:19:9
   |
19 |     let mut menu = Menu::new(&ui, "Test Menu");
   |         ----^^^^
   |         |
   |         help: remove this `mut`
   |
   = note: #[warn(unused_mut)] on by default

    Finished dev [unoptimized + debuginfo] target(s) in 0.59s
     Running `target\debug\examples\basic.exe`
error: process didn't exit successfully: `target\debug\examples\basic.exe` (exit code: 2147483651)
PS X:\Documents\code_projects\libui-rs\iui> cargo run --example basic
   Compiling iui v0.3.0 (file:///X:/Documents/code_projects/libui-rs/iui)
warning: unused variable: `menu`
  --> examples\basic.rs:19:9
   |
19 |     let menu = Menu::new(&ui, "Test Menu");
   |         ^^^^ help: consider using `_menu` instead
   |
   = note: #[warn(unused_variables)] on by default

    Finished dev [unoptimized + debuginfo] target(s) in 0.56s
     Running `target\debug\examples\basic.exe`
error: process didn't exit successfully: `target\debug\examples\basic.exe` (exit code: 2147483651)
PS X:\Documents\code_projects\libui-rs\iui> 

Consider linking to or including my crate `iui-builder`

Hello

I have published a simple macro that allows the definition of IUI user interfaces through a hierarchical, declarative DSL.

Here is the central part of the inputs.rs example defined using my macro:

// Create the layout and add the controls
iui! { &ui,
    let contents = HorizontalBox() {
        Stretchy: let input_group = Group("Inputs") {
            let input_vbox = VerticalBox(padded: true) {
                Compact: let slider = Slider(1, 100)
                Compact: let spinner = Spinbox(1, 100)
                Compact: let _sp = Spacer()
                Compact: let _sp = HorizontalSeparator()
                Compact: let _sp = Spacer()
                Compact: let entry = Entry()
                Stretchy: let multi = MultilineEntry()
            }
        }
        Stretchy: let output_group = Group("Outputs") {
            let output_vbox = VerticalBox() {
                Compact: let add_label = Label("")
                Compact: let sub_label = Label("")
                Compact: let text_label = Label("")
                Stretchy: let bigtext_label = Label("")
            }
        }
    }
}

// Add the layout to the window
window.set_child(&ui, contents);

// Update the application state when a control changes its value.
slider.on_changed(&ui, |val| {
    state.borrow_mut().slider_val = val;
});

I tried several variations of the syntax, before settling on this one. Some of my objectives were:

  • Reduce boilerplate for the final user as much as possible, but keeping the code easy to read (for example, I could have abbreviated Compact to "C" and Stretchy to "S", but it would only save a few bytes and decrease the readability.)
  • Keep the implementation as simple as possible (I managed to do it all with a single macro that is less than 200 lines long and as simple as I could make it.)
  • Let the programmer omit any part of their UI from the macro if they need to define it dynamically (for example, you can omit a container's children and add them later through code, using the proper .append() methods.) This is also why all controls are defined with variable names that are available to use right after the iui! macro.

More information and an explanation of the macro syntax is available in the project's README.

I'm still learning Rust and experimenting with the available libraries and I don't yet know whether I will work with Rust or IUI much in the future. Therefore if you like the idea and wish to incorporate it into your project, feel free to do so.

In the meantime, users of the stable 0.3.0 version can include my crate from GitHub and use this version of the macro to define their interfaces. (A link from your README would be appreciated!)

Control Gallery

we should probably replicate the control gallery example from upstream libui.

cannot get it working

it shows me this error how would i fix it

➜  libuitest git:(master) ✗ cargo check
   Compiling ui-sys v0.1.3
   Compiling failure_derive v0.1.5
error: failed to run custom build command for `ui-sys v0.1.3`
process didn't exit successfully: `/Users/shirshak/Desktop/code/libuitest/target/debug/build/ui-sys-686f8fe1ac533507/build-script-build` (exit code: 101)
--- stdout
git version 2.17.2 (Apple Git-113)
running: "cmake" "/Users/shirshak/.cargo/registry/src/github.com-1ecc6299db9ec823/ui-sys-0.1.3/libui" "-DCMAKE_INSTALL_PREFIX=/Users/shirshak/Desktop/code/libuitest/target/debug/build/ui-sys-48ea26c692c0ef0a/out" "-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_C_COMPILER=/usr/bin/cc" "-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_CXX_COMPILER=/usr/bin/c++" "-DCMAKE_BUILD_TYPE=release"
-- The CXX compiler identification is AppleClang 10.0.0.10001145
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- broken
-- Configuring incomplete, errors occurred!
See also "/Users/shirshak/Desktop/code/libuitest/target/debug/build/ui-sys-48ea26c692c0ef0a/out/build/CMakeFiles/CMakeOutput.log".
See also "/Users/shirshak/Desktop/code/libuitest/target/debug/build/ui-sys-48ea26c692c0ef0a/out/build/CMakeFiles/CMakeError.log".

--- stderr
fatal: not a git repository (or any of the parent directories): .git
CMake Error at /usr/local/Cellar/cmake/3.13.2/share/cmake/Modules/CMakeTestCXXCompiler.cmake:45 (message):
  The C++ compiler

    "/usr/bin/c++"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /Users/shirshak/Desktop/code/libuitest/target/debug/build/ui-sys-48ea26c692c0ef0a/out/build/CMakeFiles/CMakeTmp

    Run Build Command:"/usr/bin/make" "cmTC_d0404/fast"
    /Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/cmTC_d0404.dir/build.make CMakeFiles/cmTC_d0404.dir/build
    Building CXX object CMakeFiles/cmTC_d0404.dir/testCXXCompiler.cxx.o
    /usr/bin/c++    -ffunction-sections -fdata-sections -fPIC -m64  -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -mmacosx-version-min=10.8   -o CMakeFiles/cmTC_d0404.dir/testCXXCompiler.cxx.o -c /Users/shirshak/Desktop/code/libuitest/target/debug/build/ui-sys-48ea26c692c0ef0a/out/build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
    warning: include path for stdlibc++ headers not found; pass '-std=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
    1 warning generated.
    Linking CXX executable cmTC_d0404
    /usr/local/Cellar/cmake/3.13.2/bin/cmake -E cmake_link_script CMakeFiles/cmTC_d0404.dir/link.txt --verbose=1
    /usr/bin/c++   -ffunction-sections -fdata-sections -fPIC -m64  -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -mmacosx-version-min=10.8 -Wl,-search_paths_first -Wl,-headerpad_max_install_names   CMakeFiles/cmTC_d0404.dir/testCXXCompiler.cxx.o  -o cmTC_d0404
    clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated]
    ld: library not found for -lstdc++
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make[1]: *** [cmTC_d0404] Error 1
    make: *** [cmTC_d0404/fast] Error 2




  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:35 (project)


thread 'main' panicked at '
command did not execute successfully, got: exit code: 1

build script failed, must exit now', /Users/shirshak/.cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.35/src/lib.rs:778:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

warning: build failed, waiting for other jobs to finish...
error: build failed

OS mac osx mojave .

i added cmake using brew before running this command.

Add or link to documentation on building on Windows

Hello,

this is the gui-lib that i have searched but i have problems to compile ui-sys with a rust msys2-toolchain.

I have both first a new project with cargo-deps and a git clone. Can anybody shortly explain how i can correct setup cmake enviromnt that i can compile ui-sys.

thx

Creating controls is unsound

Creating controls is unsound at the moment. libui enforces a tree structure. We should enforce it in the API.

I would like to do this by creating a trait which permits adding a control, and implementing it on all containers (like windows and grids and boxes).

The question is, should we have individual methods for each control:

let btn: &mut Button = window.add_button("Button text!");

or should we have an enum with all the controls?

let btn: &mut Button = window.add(Controls::Button("Button text!"));

UIGrid Support

hello
i have seen there is uigrid in the original libui so how to implement it in your libui-rs?

thanks

UIGrid Completeness

LayoutGrid (based on UIGrid) only implements .append() in IUI. It should also implement .insert_at() based on uiGridInsertAt.

Static linking of libui

I looked around but I did not see any option to build a static version of libui and link it directly in our binary. I would prefer this to shipping libui.dll with my exectuable.

Have you looked into this before?

Unable to update submodule

I still get the problem even with the new patch. I've installed git but I have no idea how to use it to get rid of the error.

error: failed to run custom build command for ui-sys v0.1.2 (https://github.com/LeoTindall/libui-rs#1381342f)
process didn't exit successfully: C:\Users\Chi\projects\playground\target\debug\build\ui-sys-0a480d19bdfedf86\build-script-build (exit code: 101)
--- stderr
thread 'main' panicked at 'Unable to update libui submodule. Error: Os { code: 2, kind: NotFound, message: "Das System kann die angegebene Datei nicht finden." }', libcore\result.rs:945:5
note: Run with RUST_BACKTRACE=1 for a backtrace.

warning: build failed, waiting for other jobs to finish...
error: build failed

`UI::queue_main` and `UI::on_should_quit` are unsound

This program prints garbage to the console on my system:

    let ev = iui::UI::init().unwrap();

    {
        let v = vec![1, 2, 3, 4];
        ev.queue_main(|| {
            for i in &v {
                println!("{}", i);
            }
        });
    }

    ev.main();

This is a use-after-free on the vector v and should not compile. Both UI::queue_main and UI::on_should_quit must require the callback to be 'static.

This is probably the case for all functions that take a callback, not just those 2, but I just started using iui, so I don't which (if any) other functions are affected.

You can test that this code example doesn't compile using compiletest-rs.

libui system build feature flag

ui-sys building should be behind a feature flag. Not all users have CMake and Git, and not all users need to have them. We should allow users to use a binary distribution of libui and still build iui packages.

compiling example failed with error not LNK1181: ui.lib not found on Windows 10

After updating to the master branch, I came across an error of LNK1181:

$ cargo run
   Compiling unicode-xid v0.0.4
   Compiling winapi v0.3.4
   Compiling quote v0.3.15
   Compiling cc v1.0.15
   Compiling rustc-demangle v0.1.8
   Compiling cfg-if v0.1.3
   Compiling libc v0.2.41
   Compiling bitflags v1.0.3
   Compiling synom v0.11.3
   Compiling syn v0.11.11
   Compiling cmake v0.1.31
   Compiling ui-sys v0.1.2 (https://github.com/LeoTindall/libui-rs#5a68a471)
   Compiling backtrace v0.3.8
   Compiling synstructure v0.6.1
   Compiling failure_derive v0.1.1
   Compiling failure v0.1.1
   Compiling iui v0.2.0 (https://github.com/LeoTindall/libui-rs#5a68a471)
   Compiling iui-example v0.1.0 (file:///C:/Users/34937/Desktop/learning-rust/iui-example)
error: linking with `C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\HostX64\x64\link.exe` failed: exit code: 1181
  |
  = note: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.12.25827\\bin\\HostX64\\x64\\link.exe" "/NOLOGO" "/NXCOMPAT" "/LIBPATH:C:\\Users\\34937\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "C:\\Users\\34937\\Desktop\\learning-rust\\iui-example\\target\\debug\\deps\\iui_example-7e5f53b6c9b28dbe.138pesuvab4dy035.rcgu.o" "C:\\Users\\34937\\Desktop\\learning-rust\\iui-example\\target\\debug\\deps\\iui_example-7e5f53b6c9b28dbe.16u6js6g0l3k1ic6.rcgu.o" "C:\\Users\\34937\\Desktop\\learning-rust\\iui-example\\target\\debug\\deps\\iui_example-7e5f53b6c9b28dbe.1ckp3bwk0jmrbky4.rcgu.o" "C:\\Users\\34937\\Desktop\\learning-rust\\iui-example\\target\\debug\\deps\\iui_example-7e5f53b6c9b28dbe.1im38lueib99jsk0.rcgu.o" "C:\\Users\\34937\\Desktop\\learning-rust\\iui-example\\target\\debug\\deps\\iui_example-7e5f53b6c9b28dbe.1mvmz58owquyropc.rcgu.o" "C:\\Users\\34937\\Desktop\\learning-rust\\iui-example\\target\\debug\\deps\\iui_example-7e5f53b6c9b28dbe.1y16o1qfye96o7m0.rcgu.o" "C:\\Users\\34937\\Desktop\\learning-rust\\iui-example\\target\\debug\\deps\\iui_example-7e5f53b6c9b28dbe.1zeawhkbeobww1zn.rcgu.o" "C:\\Users\\34937\\Desktop\\learning-rust\\iui-example\\target\\debug\\deps\\iui_example-7e5f53b6c9b28dbe.23tqyymcb18u96mb.rcgu.o" "C:\\Users\\34937\\Desktop\\learning-rust\\iui-example\\target\\debug\\deps\\iui_example-7e5f53b6c9b28dbe.287fjwldxriihryb.rcgu.o" "C:\\Users\\34937\\Desktop\\learning-rust\\iui-example\\target\\debug\\deps\\iui_example-7e5f53b6c9b28dbe.2jqywn86b2gsqohu.rcgu.o" "C:\\Users\\34937\\Desktop\\learning-rust\\iui-example\\target\\debug\\deps\\iui_example-7e5f53b6c9b28dbe.2lyh15q6cjwzy18c.rcgu.o" "C:\\Users\\34937\\Desktop\\learning-rust\\iui-example\\target\\debug\\deps\\iui_example-7e5f53b6c9b28dbe.2yyg5bd89e3irycb.rcgu.o" "C:\\Users\\34937\\Desktop\\learning-rust\\iui-example\\target\\debug\\deps\\iui_example-7e5f53b6c9b28dbe.3171x0bwu82dptu7.rcgu.o" "C:\\Users\\34937\\Desktop\\learning-rust\\iui-example\\target\\debug\\deps\\iui_example-7e5f53b6c9b28dbe.3ayaeypdcro9d6yk.rcgu.o" "C:\\Users\\34937\\Desktop\\learning-rust\\iui-example\\target\\debug\\deps\\iui_example-7e5f53b6c9b28dbe.3cx7oljifvb206q7.rcgu.o" "C:\\Users\\34937\\Desktop\\learning-rust\\iui-example\\target\\debug\\deps\\iui_example-7e5f53b6c9b28dbe.3p4871ksc97vnnrn.rcgu.o" "C:\\Users\\34937\\Desktop\\learning-rust\\iui-example\\target\\debug\\deps\\iui_example-7e5f53b6c9b28dbe.3rngp6bm2u2q5z0y.rcgu.o" "C:\\Users\\34937\\Desktop\\learning-rust\\iui-example\\target\\debug\\deps\\iui_example-7e5f53b6c9b28dbe.3vv0q9obd6w3595h.rcgu.o" "C:\\Users\\34937\\Desktop\\learning-rust\\iui-example\\target\\debug\\deps\\iui_example-7e5f53b6c9b28dbe.3woqeoqf0goarhik.rcgu.o" "C:\\Users\\34937\\Desktop\\learning-rust\\iui-example\\target\\debug\\deps\\iui_example-7e5f53b6c9b28dbe.436dotimmrgzkwfa.rcgu.o" "C:\\Users\\34937\\Desktop\\learning-rust\\iui-example\\target\\debug\\deps\\iui_example-7e5f53b6c9b28dbe.45nf4z58qqykpcpi.rcgu.o" "C:\\Users\\34937\\Desktop\\learning-rust\\iui-example\\target\\debug\\deps\\iui_example-7e5f53b6c9b28dbe.45pc7c65foh9i35f.rcgu.o" "C:\\Users\\34937\\Desktop\\learning-rust\\iui-example\\target\\debug\\deps\\iui_example-7e5f53b6c9b28dbe.48721dc4k5qxei0u.rcgu.o" "C:\\Users\\34937\\Desktop\\learning-rust\\iui-example\\target\\debug\\deps\\iui_example-7e5f53b6c9b28dbe.4954tfkopzmp0j3d.rcgu.o" "C:\\Users\\34937\\Desktop\\learning-rust\\iui-example\\target\\debug\\deps\\iui_example-7e5f53b6c9b28dbe.49a7n47po4ttqjl7.rcgu.o" "C:\\Users\\34937\\Desktop\\learning-rust\\iui-example\\target\\debug\\deps\\iui_example-7e5f53b6c9b28dbe.4e37gusgw81ck2ot.rcgu.o" "C:\\Users\\34937\\Desktop\\learning-rust\\iui-example\\target\\debug\\deps\\iui_example-7e5f53b6c9b28dbe.4ezmh1vbs95c5ack.rcgu.o" "C:\\Users\\34937\\Desktop\\learning-rust\\iui-example\\target\\debug\\deps\\iui_example-7e5f53b6c9b28dbe.4xq48u46a1pwiqn7.rcgu.o" "C:\\Users\\34937\\Desktop\\learning-rust\\iui-example\\target\\debug\\deps\\iui_example-7e5f53b6c9b28dbe.4yekh4a49ri9ikb0.rcgu.o" "C:\\Users\\34937\\Desktop\\learning-rust\\iui-example\\target\\debug\\deps\\iui_example-7e5f53b6c9b28dbe.4yh8x2b62dcih00t.rcgu.o" "C:\\Users\\34937\\Desktop\\learning-rust\\iui-example\\target\\debug\\deps\\iui_example-7e5f53b6c9b28dbe.4ypvbwho0bu5tnww.rcgu.o" "C:\\Users\\34937\\Desktop\\learning-rust\\iui-example\\target\\debug\\deps\\iui_example-7e5f53b6c9b28dbe.63mmpc50mjcb0lb.rcgu.o" "C:\\Users\\34937\\Desktop\\learning-rust\\iui-example\\target\\debug\\deps\\iui_example-7e5f53b6c9b28dbe.8xzrsc1ux72v29j.rcgu.o" "C:\\Users\\34937\\Desktop\\learning-rust\\iui-example\\target\\debug\\deps\\iui_example-7e5f53b6c9b28dbe.98g0d9x8aw3akpe.rcgu.o" "C:\\Users\\34937\\Desktop\\learning-rust\\iui-example\\target\\debug\\deps\\iui_example-7e5f53b6c9b28dbe.9elsx31vb4it187.rcgu.o" "C:\\Users\\34937\\Desktop\\learning-rust\\iui-example\\target\\debug\\deps\\iui_example-7e5f53b6c9b28dbe.c6lbtaiefvx3wya.rcgu.o" "C:\\Users\\34937\\Desktop\\learning-rust\\iui-example\\target\\debug\\deps\\iui_example-7e5f53b6c9b28dbe.uj1kr5j3wr6o9sy.rcgu.o" "/OUT:C:\\Users\\34937\\Desktop\\learning-rust\\iui-example\\target\\debug\\deps\\iui_example-7e5f53b6c9b28dbe.exe" "C:\\Users\\34937\\Desktop\\learning-rust\\iui-example\\target\\debug\\deps\\iui_example-7e5f53b6c9b28dbe.crate.allocator.rcgu.o" "/OPT:REF,NOICF" "/DEBUG" "/NATVIS:C:\\Users\\34937\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\intrinsic.natvis" "/NATVIS:C:\\Users\\34937\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\liballoc.natvis" "/NATVIS:C:\\Users\\34937\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\libcore.natvis" "/LIBPATH:C:\\Users\\34937\\Desktop\\learning-rust\\iui-example\\target\\debug\\deps" "/LIBPATH:C:\\Users\\34937\\Desktop\\learning-rust\\iui-example\\target\\debug\\build\\ui-sys-0d6721beb6524842\\out\\build\\out" "/LIBPATH:C:\\Users\\34937\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "C:\\Users\\34937\\Desktop\\learning-rust\\iui-example\\target\\debug\\deps\\libiui-9d03c669f0fd7bc0.rlib" "C:\\Users\\34937\\Desktop\\learning-rust\\iui-example\\target\\debug\\deps\\libui_sys-d2250fba2a597401.rlib" "C:\\Users\\34937\\Desktop\\learning-rust\\iui-example\\target\\debug\\deps\\liblibc-29d80453b21edd84.rlib" "C:\\Users\\34937\\Desktop\\learning-rust\\iui-example\\target\\debug\\deps\\libfailure-c342c1ff1ee122ce.rlib" "C:\\Users\\34937\\Desktop\\learning-rust\\iui-example\\target\\debug\\deps\\libbacktrace-dc01882281fe6157.rlib" "C:\\Users\\34937\\Desktop\\learning-rust\\iui-example\\target\\debug\\deps\\librustc_demangle-89653463bfc73aaf.rlib" "C:\\Users\\34937\\Desktop\\learning-rust\\iui-example\\target\\debug\\deps\\libcfg_if-354d1195934b0143.rlib" "C:\\Users\\34937\\Desktop\\learning-rust\\iui-example\\target\\debug\\deps\\libwinapi-b854eb8bfb29492c.rlib" "C:\\Users\\34937\\Desktop\\learning-rust\\iui-example\\target\\debug\\deps\\libbitflags-d08788bbacc8698c.rlib" "C:\\Users\\34937\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libstd-81327c94ecbc69b1.rlib" "C:\\Users\\34937\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libpanic_unwind-904bdc107e3475d8.rlib" "C:\\Users\\34937\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libunwind-97dd6b71b2944814.rlib" "C:\\Users\\34937\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\liblibc-7810a3f9a7e6d71a.rlib" "C:\\Users\\34937\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\liballoc_system-a6c908865d944125.rlib" "C:\\Users\\34937\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\liballoc-1337600a3a219c73.rlib" "C:\\Users\\34937\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libstd_unicode-0e6be5c2cb6a5139.rlib" "C:\\Users\\34937\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcore-34c46a8013b46e75.rlib" "C:\\Users\\34937\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcompiler_builtins-e8d853735a158029.rlib" "ui.lib" "libui.lib" "dbghelp.lib" "kernel32.lib" "advapi32.lib" "advapi32.lib" "ws2_32.lib" "userenv.lib" "shell32.lib" "msvcrt.lib"
  
# the error indicate ui.lib not found
  = note: Non-UTF-8 output: LINK : fatal error LNK1181: \xce\xde\xb7\xa8\xb4\xf2\xbf\xaa\xca\xe4\xc8\xeb\xce\xc4\xbc\xfe\xa1\xb0ui.lib\xa1\xb1\r\n  

error: aborting due to previous error

error: Could not compile `iui-example`.

To learn more, run the command again with --verbose.

I have had cmake installed, and compiled it with rust 1.26 stable:

$ cmake --version
cmake version 3.11.2

CMake suite maintained and supported by Kitware (kitware.com/cmake).

$ rustc --version
rustc 1.26.0 (a77568041 2018-05-07)

Did I miss some steps to do?

API Conciseness

The current API is somewhat verbose. I am unsure whether this is a natural attribute of a retained-mode API or if it is an artifact of the design of iui. More consideration is required and suggestions are welcome.

No line breaks show in MultilineEntry

MultilineEntry does not display line breaks if those are supplied with set_value, such as

let mut mle = MultilineEntry::new(&ui);
mle.set_value(&ui, "hello\nworld");

The MultilineEntry will show "helloworld".
The text returned from that MultilineEntry will be shown correctly with a line break when displayed with println!("{}", mle.value(&ui));

better control over the window resizing

I was just wondering if there will be some sort of controlling the window size during the runtime not only when initializing the window, and maybe some events so like when the user resizes the window an event gets triggered with a x,y of the old window size and x,y of the new window size, well maybe
the events for resizing is kinda useless but it would be nice to have, and better window builder because currently we can only set the width, height, and if it has a menu bar or not, maybe add like if the window is resizable or not and if it can go full screen or not, and by the way the master docs is a little outdated all new features is not in the master docs, its just like the stable one, no total difference at all, i had to dig a little through the lib sources to figure out what new stuff has been added and how they work

Link to examples in README

The README shows three examples but only the code for one is provided. It'd be helpful for beginners to see the code for the other two examples.

Unresolved imports in `canvas` example

I'm trying to run /examples/canvas.rs, but the specified imports are not available.
I get the following error:

unresolved imports `iui::controls::Area`, `iui::controls::AreaDrawParams`, `iui::controls::AreaHandler`

My Cargo.toml has the next dependencies:

[dependencies]
iui = "0.3.0"
ui-sys = "0.1.3"

I looked a bit into the ui-sys crate, and there seems to be an Area, uiAreaDrawParams and uiAreaHandler, yet replacing the original imports with those doesn't work, since uiAreaHandler is a struct, not a trait.

-- Edit

It seems that the proper traits are in the source code in the repo but not in crates.io.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.