• Stars
    star
    92
  • Rank 350,913 (Top 8 %)
  • Language
    Crystal
  • License
    MIT License
  • Created over 2 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

GTK4 bindings for Crystal

Build Status

GTK4 Crystal Bindings

See examples folder and have fun.

If you feel this repository too silent is because most of the development happens in the binding generator repository, not here.

API docs

Current documentation is far from being good, but is better (not much) than nothing.

API docs can be found at https://hugopl.github.io/gtk4.cr/

To generate the documentation clone this repository then do:

$ make doc

The documentation will be found at docs/index.html.

Compile time dependencies

You need the GTK libraries and their GObjectIntrospection files.

  • Archlinux: pacman -S gtk4 gobject-introspection
  • Ubuntu: apt-get install libgtk-4-1 libgtk-4-dev libgirepository1.0-dev gobject-introspection gir1.2-gtk-4.0
  • macOS: brew install gobject-introspection gtk4

Be welcome to create a PR updating this readme once you know what packages are needed by your distro to run the examples.

Runtime dependencies

Just the GTK libraries are needed at runtime, i.e. not the gobject-introspection library and files.

Installation

  1. Add the dependency to your shard.yml:

    dependencies:
      gtk4:
        github: hugopl/gtk4.cr
  2. Run shards install

Usage

See the hello world tutorial.

For more info on how to use signals, properties, etc see the GI-Crystal project page, it's the binding generator used to create this binding.

Projects using these bindings

  • Collision - A GUI tool to generate, compare and verify MD5, SHA-1, SHA-256 & SHA-512 hashes.
  • RTFM - Gnome dash docset documentation reader.
  • Tijolo - Simple and fast keyboard focused IDE (version using these bindings not yet released).

Contributing

  1. Fork it (https://github.com/hugopl/gtk4.cr/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

More Repositories

1

sidekiq.cr

Simple, efficient job processing for Crystal
Crystal
763
star
2

tijolo

Simple and fast keyboard focused IDE written in Crystal and GTK.
Crystal
132
star
3

RubyCreator

Plugins to add Ruby language support to QtCreator IDE.
C++
44
star
4

fzy

A Crystal port of awesome Fzy project, a fuzzy finder algorithm.
Crystal
42
star
5

gi-crystal

Tool to generate Crystal bindings for gobject-based libraries (i.e. GTK)
Crystal
41
star
6

queryit

A very basic setupless terminal based SQL query runner meant to be used as a developer tool to test queries against a project database.
Crystal
22
star
7

rtfm

Gnome dash docset documentation reader written in Crystal
Crystal
21
star
8

reviewit

A git oriented review board for small/medium teams.
Ruby
19
star
9

textui

A simple Crystal UI framework for terminal interfaces.
Crystal
12
star
10

Meique

Meique is a simple build system for C and C++ which uses Lua as scripting language.
C++
10
star
11

Iceberg

Fork of Icemon, an Icecc monitor.
C++
8
star
12

version_from_shard

A macro to declare the VERSION constant from the value found in shard.yml, so you don't need to write the same version number in multiple places.
Crystal
8
star
13

crystal-tree-sitter

Crystal bindings for tree-sitter library
Crystal
8
star
14

invoicegenerator

Stupid script to create pdf invoices.
Ruby
6
star
15

http-status-code-manpages

Manpages for HTTP status codes.
Ruby
6
star
16

MeiqueQtCreatorPlugin

Build system plugin for QtCreator
C++
3
star
17

pg_query.cr

Crystal bindings for libpg_query.
Crystal
2
star
18

harfbuzz.cr

Crystal "bindings" for HarfBuzz library
Crystal
2
star
19

vte.cr

Crystal bindings for VTE library
Crystal
1
star
20

pango.cr

Crystal bindings for Pango library
Crystal
1
star