### ----------------------------------------------------
### -- Raygui::Bindings
### -- Licenses: Artistic-2.0
### -- Authors: Dan Vu (vushu)
### -- File: README.md
### ----------------------------------------------------
## raygui-raku (Raygui::Bindings)
[![SparrowCI](https://ci.sparrowhub.io/project/git-vushu-raygui-raku/badge?foo=bar)](https://ci.sparrowhub.io)

Autogenerated raygui-raku bindings, powered by raku grammar and
actions.
### Preface
To make Raku play together with Raygui, many of Raygui's functions has to be wrapped into a function,
to support pass as pointer meaning we are `"pointerizing"` the functions. This is done automatically when generating the bindings.
The bindings are also converted to `kebab-case` to fit Raku code style.

#### On installation: 
- `raygui.h` will be downloaded from https://github.com/raysan5/raygui/blob/master/src/raygui.h and build with  
    generated pointerization and allocation c code.
- `Bindings.rakumod` will be generated and placed into lib/Raygui 

### Dependencies
```
Raylib::Bindings;
```

### Install
```
zef install Raygui::Bindings
```
### Install from repository
```
git clone git@github.com:vushu/raygui-raku.git
cd raygui-raku 
zef install .
```
---
### Examples
```
raku examples/portable-window.raku
```

### Mutable strings
Some functions in raygui requires a mutable string so we can't parse a normal Raku `Str` since they are immutable.
Please parse a `CArray[uint8]` for these cases, it's important to encode it as `utf-8`.
Example:
```
# .encode takes care of UTF-8 encoding. If $array is used 
# as a string by the native function, don't forget to append the 
# NULL byte that terminates a C string: --------v 
my $text = CArray[uint8].new("Foo".encode.list, 0);
gui-text-box($message-box-rect, $text, 32, True)
```

#### More info  
https://github.com/raysan5/raygui

---

#### Missing:
- code comments needs to be included.
- support for windows.

***help is appreciated!***


