Giter Club home page Giter Club logo

crisp's Introduction

Crisp

A minimalist GTK Builder system written in Rust, with the goal of being simple and easy to understand.

How does it work?

It works by implementing the Rune scripting language and exporting a baggage of functions for it.

One example is for setting the title of your window: GTK::set_window_title(Some("My custom window!"));.

All functions are high-level abstractions of real GTK4 functions, which is intentional as Crisp was made mainly to ease the process of creating widgets.

Functions and Documentation

TBD

State

  • Supported widgets as of now are: Labels, Separators, Boxes and Buttons.
  • Swapping widget focus is working.
  • Detecting when the mouse enters/leave a widget is working.
  • Detecting button presses is working.
  • Registering for events in Rune is working.
  • Getting the output of a command as a string is working.
  • Modifying the window properties (like being resizable, default size, etc) is working.
  • Making your window a layer-shell is working.
  • Declaring multiple background loops that can access the UI, is working.
    • This uses unsafe code in certain places, so beware!
  • Setting up listening commands and reading their output, is working.
    • The command is read in a background thread, in order to ensure it doesn't
    • block the UI in any way.

Unsafe Code

Yes, Crisp uses unsafe code and it's not going to change.

Why? Because:

  1. In some cases, it's needed.
  2. Unsafe isn't bad by itself. It's bad if you don't know how to handle it.
  3. In some cases, it can remove the need for additional crates, or much more code.

If it's not crashing, causing memory issues, or anything alike; It's mostly accepted.

Planned Features

  • Adding support for a lot more widgets.
  • Adding support for executing a command without getting the output.
  • Listing the functions exposed via Rune, and document custom ones.
    • If a function is 99% just the standard GTK4 implementation, then no documentation will be provided,
    • as you can find it online.

Contribution

Pull Requests are more than welcome, as long as they follow the current code-quality and style.

Avoid comments inside of functions unless required, name your variables properly, and avoid making the code complex or hard to read.

crisp's People

Contributors

vars1ty avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.