libui | GUI library in C that uses the native GUI technologies

 by   andlabs C Version: alpha4.1 License: Non-SPDX

kandi X-RAY | libui Summary

kandi X-RAY | libui Summary

libui is a C library. libui has no bugs, it has no vulnerabilities and it has medium support. However libui has a Non-SPDX License. You can download it from GitHub.

This README is being written.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              libui has a medium active ecosystem.
              It has 10463 star(s) with 622 fork(s). There are 332 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 173 open issues and 193 have been closed. On average issues are closed in 257 days. There are 80 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of libui is alpha4.1

            kandi-Quality Quality

              libui has 0 bugs and 0 code smells.

            kandi-Security Security

              libui has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              libui code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              libui has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              libui releases are available to install and integrate.
              Installation instructions, examples and code snippets are available.
              It has 133 lines of code, 6 functions and 2 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of libui
            Get all kandi verified functions for this library.

            libui Key Features

            No Key Features are available at this moment for libui.

            libui Examples and Code Snippets

            No Code Snippets are available at this moment for libui.

            Community Discussions

            QUESTION

            pkg-config cannot find gtk+-3.0
            Asked 2020-Feb-11 at 10:17

            I am trying to use libui-node to build a Node.js project.

            ...

            ANSWER

            Answered 2018-May-03 at 10:31

            EDIT:

            Showing the default locations where pkg-config looks for .pc files is more easily done with pkg-config --variable pc_path pkg-config as stated by @BrettHale in this SO answer. This uses a special virtual pkg-config package to expose pkg-config configuration. This is easier than parsing the debug logs or using strace (which saved my day more than once), but the point was more on teaching how to get information when we don't know where to look.

            Original answer:

            You shouldn't have to set PKG_CONFIG_PATH. Usually the paths your distro uses match the ones pkg-config will look into by default.

            pkg-config looks for the .pc associated with GTK+ 3. As you have installed the libgtk-3-dev development package, you find in it the .pc files it provides using:

            Source https://stackoverflow.com/questions/50031080

            QUESTION

            Where to put a .dylib file that my crystal executable uses?
            Asked 2019-Apr-12 at 17:59

            I am trying to create a macOS application using Crystal and libui. I am able to compile a crystal executable with all of the required libraries statically, so it can run on any mac (partially static). For some reason, the shard I am using which is called "hedron" (the crystal bindings for libui), I am unable to compile the program using libui.a, like I am compiling my program with libevent.a and libgc.a. I am only able to build successfully with libui.A.dylib.

            I have changed the top of bindings file of the shard to @[Link(ldflags: "#{__DIR__}/../../../../vendor/libui.A.dylib")], and I am compiling my program using shards build --release --link-flags="-Lpwd/vendor". In the vendor folder of my project, I have libevent.a, libssl.a, libgc.a, libcrypto.a, and libui.A.dylib. The project compiles ok. Then I run otool -L ./bin/CrystalDistroTest and I get the following output:

            ...

            ANSWER

            Answered 2019-Apr-12 at 17:59

            Figured it out by compiling with shards build --release --link-flags="-rpath @executable_path/../Frameworks -Lpwd/vendor". I just needed to add the -rpath @executable_path/../Frameworks to the linker.

            Source https://stackoverflow.com/questions/55641718

            QUESTION

            How do I balance script-oriented OpenType features with other OpenType features using DirectWrite?
            Asked 2018-Oct-23 at 11:51

            Full disclosure: I'm working on my libui GUI framework's text API. This wraps DirectWrite on Windows, Core Text on OS X, and Pango (which uses HarfBuzz for OpenType shaping) on other Unixes. One of the text formatting attributes I want to specify is a collection of OpenType features to use, which all three provide; DirectWrite's is IDWriteTypography.

            Now, when you draw some text with these libraries, by default you'll get a few useful OpenType features enabled, such as the standard ligatures (liga) like the f+i ligature. I thought this was font-specific, but it turns out this is specific to the script of the text being shaped. Microsoft provides guidelines for all the scripts supported by OpenType (under "Script-specific Development"), and I can see rather complex logic for doing it all in HarfBuzz itself to confirm it.

            On Core Text and Pango, if I enable other attributes, they'll be added on top of these defaults. But with DirectWrite, in particular IDWriteTextLayout::SetTypography(), doing so removes the defaults:

            The program that produces this output is can be found here.

            Obviously my first option would be to ask how to get the default features on DirectWrite. Someone did so already on this site, though, and the answer seems to be "no".

            I am guessing that DirectWrite is allowing me to be in complete control of the list of features to apply to some text. This is nice, except that I can't do this with the other APIs unless I explicitly disable the default features somehow! Of course, I don't know if this list will ever change, so hardcoding it might not be the best idea.

            Even if hardcoding is an option, I could just grab HarfBuzz's list for each script, but a) it's rather complicated b) there are multiple possible shapers for a script, depending on (I think) version compatibility (for instance, Myanmar).

            So why not use HarfBuzz's lists to recreate the default list of features for DirectWrite anyway? It seems to want to be accurate to other shapers anyway, so this should work, right? Well I would need to do two things: figure out what script to use, and figure out which attributes to use on which characters for script where the position of a character in the word matters.

            DirectWrite provides an interface IDWriteTextAnalyzer that provides facilities to perform shaping. I could use this, but it seems the script data is returned in a DWRITE_SCRIPT_ANALYSIS structure, and the description for the script ID says "The zero-based index representation of writing system script.".

            This doesn't help, so I wrote a program to just dump the script numbers for text I type in. Running it on the input string

            ...

            ANSWER

            Answered 2017-Jul-23 at 16:53

            After some discussions with Peter Sikking and Ebrahim Byagowi, I went and debugged a more general-purpose program I built quickly to test things, and I figured out what's going on internally.

            First, however, I will say this applies to Uniscribe and DirectWrite equally.

            As it turns out, DirectWrite is always providing a set of default OpenType features, regardless of what feature set I use! The situation is that the list of default features provided differs depending on whether I load my own features or not, and depending on the shaping engine. For the latn script in horizontal writing mode and for English, this is done with the "generic engine".

            If I don't provide any features, the generic engine will load script-specific features. For horizontal latn, this list is

            Source https://stackoverflow.com/questions/44611592

            QUESTION

            Compiling and linking multiple C libraries (stuck at symbol(s) not found for architecture x86_64)
            Asked 2018-May-05 at 19:03

            I am basically trying to compile the following repo. https://github.com/zhaozg/lui

            The following is where I have reached: (I am sorry if the steps I am following may be completely wrong as I am new to C and GCC in general, I am just trying my best to bring this puzzle together)

            It has two dependencies:

            1. https://github.com/andlabs/libui
            2. Lua from https://www.lua.org/download.html

            I was able to generate two files from the above 2 projects:

            1. liblua.a
            2. libui.a

            I was happy so far, but I am not able to figure out how to use the above .a files and compile the zhaozg/lui project.

            The instructions on compiling in github are as follows:

            ...

            ANSWER

            Answered 2018-May-05 at 19:03

            for those facing this problem in Mac OS,

            gcc -shared -v -framework Foundation -framework AppKit -Isrc src/lui.c ...etc

            When using the static library, you have to explicitly link against the system libraries as well,

            A static library is just a bunch of .o files; they do not contain any information about external dependencies.

            Source https://stackoverflow.com/questions/50190861

            QUESTION

            Tango API linking against private native libraries API24+
            Asked 2017-Sep-13 at 12:00

            Are there any solutions for this problem?

            Running the Tango API displays a warning dialog on the library

            Our team has the same problem. The guide mentioned doesn't really help. Not "libtango_client_api.so" is private, as far as i did understand:

            ...

            ANSWER

            Answered 2017-Sep-13 at 12:00

            I assume you duplicated the question because you are unable to comment yet. I have the same issue so I cannot respond on that thread either but I can give you a workaround which seems very poor but I don't have any other solution.

            For each missing file you can include the prebuilt library as the Developer Site suggests:

            ...you should update your app to either include its own copy of those libraries or only use the public NDK APIs.

            I added the following to the make file and put a copy of the files in the relevant folder:

            Source https://stackoverflow.com/questions/46112418

            QUESTION

            Why are MAC_OS_X_VERSION_MIN_REQUIRED and MAC_OS_X_VERSION_MAX_ALLOWED no longer being honored after upgrading to macOS Sierra/Xcode 8?
            Asked 2017-Jun-03 at 04:26

            My libui project must both compile on and target OS X 10.8 and newer, so I have

            ...

            ANSWER

            Answered 2017-Jun-02 at 06:31

            I've always set those with compiler flags: -mmacosx-version-min=10.8. CMake also has a CMAKE_OSX_DEPLOYMENT_TARGET variable which I think sets that.

            I don't think it will get rid of those deprecation warnings though. For those deprecated AppKit constants, both the deprecated and new constants have the same value. You can use the new constants, the value is the same and it should be binary-compatible back to older OSes.

            Using the new constants will prevent the code from compiling on systems older than 10.12 though. emacs fixed this by using the new constants in the code, but #defining the old ones to the new ones when compiling with a pre-10.12 SDK. I implemented the same thing for qemu.

            Source https://stackoverflow.com/questions/44318151

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install libui

            you can only build a static library.
            All platforms: Meson 0.48.0 or newer Any of Meson's backends; this section assumes you are using Ninja, but there is no reason the other backends shouldn't work.
            Windows: either Microsoft Visual Studio 2013 or newer (2013 is needed for va_copy()) — you can build either a static or a shared library MinGW-w64 (other flavors of MinGW may not work) — you can only build a static library; shared library support will be re-added once the following features come in: Isolation awareness, which is how you get themed controls from a DLL without needing a manifest
            Unix: nothing else specific
            Mac OS X: nothing else specific, so long as you can build Cocoa programs
            Meson also supports installing from source; if you use Ninja, just do. When running meson, the --prefix option will set the installation prefix. The Meson documentation has more information, and even lists more fine-grained options that you can use to control the installation. Can be built from AUR: https://aur.archlinux.org/packages/libui-git/.

            Support

            Needs to be written. Consult ui.h and the examples for details for now.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/andlabs/libui.git

          • CLI

            gh repo clone andlabs/libui

          • sshUrl

            git@github.com:andlabs/libui.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link