libui | GUI library in C that uses the native GUI technologies
kandi X-RAY | libui Summary
kandi X-RAY | libui Summary
This README is being written.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of libui
libui Key Features
libui Examples and Code Snippets
Community Discussions
Trending Discussions on libui
QUESTION
I am trying to use libui-node
to build a Node.js project.
ANSWER
Answered 2018-May-03 at 10:31EDIT:
Showing the default locations where
pkg-config
looks for .pc files is more easily done withpkg-config --variable pc_path pkg-config
as stated by @BrettHale in this SO answer. This uses a special virtualpkg-config
package to exposepkg-config
configuration. This is easier than parsing the debug logs or usingstrace
(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:
QUESTION
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="-L
pwd/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:59Figured it out by compiling with shards build --release --link-flags="-rpath @executable_path/../Frameworks -L
pwd/vendor"
. I just needed to add the -rpath @executable_path/../Frameworks
to the linker.
QUESTION
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:53After 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
QUESTION
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:
I was able to generate two files from the above 2 projects:
- liblua.a
- 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:03for 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.
QUESTION
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:00I 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:
QUESTION
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:31I'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
.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install libui
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
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page