lc-soft / LCUI

C library for building user interfaces
https://lcui-dev.github.io
MIT License
4.12k stars 356 forks source link
c cross-platform-gui gui-framework gui-toolkit windows

LCUI

The C library for build user interfaces

GitHub Actions Repo size Code size

Table of contents

Introduction

中文版说明文档

LCUI is a library written in C for building graphical user interfaces. Its goal is to explore and practice new ways of developing user interfaces, characterized by its small size, ease of use, and provision of convenient development tools to help developers quickly create desktop applications with graphical user interfaces.

LC originates from the initials of the author's name. The library was initially designed to help the author develop small projects and gain development experience. However, the author did not gain a competitive advantage in the job market, which is crowded with C/C++ experts, and thus had to work in web front-end development. As a result, LCUI now leans towards integrating technologies from the web front-end domain.

Main Features

Overview of Features

You can learn about the development experience of LCUI applications from the following screenshot:

preview

Architecture

Over time LCUI has been built up to be based on various libraries:

Quick Start

Before you begin, you need to install the following software on your computer:

Then, run the following commands in a command-line window:

# Install the LCUI command-line development tool
npm install -g @lcui/cli

# Create an LCUI application project
lcui create my-lcui-app

Follow the prompts provided by the commands afterward.

Documentation

Tutorials

References

Some features of LCUI and related projects are inspired by other open-source projects. You can refer to their documentation to understand the basic concepts and usage.

Roadmap

Here are the upcoming items:

Contribution

Think LCUI is slow to update? there are many ways to contribute to LCUI.

LCUI has adopted the code of conduct defined by the Contributor Covenant. This document is used across many open source communities, and we think it articulates our values well. For more, see the Code of Conduct.

FAQ

Is this a browser kernel? Or a development library like Electron that integrates the browser environment?

No, you can think of it as a traditional GUI development library that applied some Web technologies.

Since it supports the use of TypeScript language, why don't I use Electron?

Yes, if you have web development experience and are willing to learn Electron, then Electron is obviously the best choice.

Given LCUI's current capabilities, it is primarily suitable for meeting the author's personal needs and developing simple tools.

Why should I choose LCUI over other GUI libraries/frameworks?

We suggest that you prioritize other GUI libraries/frameworks.

How about CSS support?

The following is a list of supported CSS features. Checked is supported (But does not mean full support). Unlisted properties are not supported by default.

CSS feature coverage - at rules - [x] `@font-face` - [ ] `@keyframes` - [ ] `@media` - keywords - [ ] `!important` - selectors - [x] `*` - [x] `type` - [x] `#id` - [x] `.class` - [x] `:hover` - [x] `:focus` - [x] `:active` - [x] `:first-child` - [x] `:last-child` - [ ] `[attr="value"]` - [ ] `:not()` - [ ] `:nth-child()` - [ ] `parent > child` - [ ] `a ~ b` - [ ] `::after` - [ ] `::before` - [ ] ... - units - [x] px - [x] dp - [x] sp - [x] pt - [x] % - [ ] rem - [ ] vh - [ ] vw - properties - [x] top, right, bottom, left - [x] width, height - [x] visibility - [x] display - [x] none - [x] inline-block - [x] block - [x] flex - [ ] inline-flex - [ ] inline - [ ] grid - [ ] table - [ ] table-cell - [ ] table-row - [ ] table-column - [ ] ... - [x] position - [x] static - [x] relative - [x] absolute - [ ] fixed - [x] box-sizing - [x] border-box - [x] content-box - [x] border - [x] border-radius - [x] background-color - [x] background-image - [x] background-position - [x] background-cover - [ ] background - [x] pointer-events - [x] font-face - [x] font-family - [x] font-size - [x] font-style - [x] flex - [x] flex-shrink - [x] flex-grow - [x] flex-basis - [x] flex-wrap - [x] flex-direction - [x] justify-content - [x] flex-start - [x] center - [x] flex-end - [x] align-items - [x] flex-start - [x] center - [x] flex-end - [x] stretch - [ ] float - [ ] transition - [ ] transform - [ ] ...

License

The LCUI Project is released under the MIT License.