Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/yassine-aa/gooeygui

A simple cross-platform GUI Library built in C. (Still under construction)
https://github.com/yassine-aa/gooeygui

api c cross-platform desktop-app gui lib library linux opengl toolkit vulkan windows

Last synced: 10 days ago
JSON representation

A simple cross-platform GUI Library built in C. (Still under construction)

Awesome Lists containing this project

README

        



# Gooey GUI Library

Gooey is a lightweight and feature-rich GUI (Graphical User Interface) library originally designed for X11 environments but now cross-platform. It provides a range of customizable widgets and layouts for creating responsive and modern desktop applications. The library is optimized for simplicity and offers a flexible API for developers.



## Features

- **Wide Range of Widgets**:
- Labels
- Buttons
- Checkboxes
- Radio Buttons (and Groups)
- Sliders
- Dropdown Menus
- Textboxes
- Canvas

- **Layouts**:
- Horizontal
- Vertical
- Grid-based layouts

- **Customization Options**:
- Support for widget-specific callbacks
- Styling with predefined color schemes
- Interactive hover and click states

- **Event Handling**:
- Mouse clicks, motion, and keypress events
- Dynamic updates through an efficient redraw system
- Simple signaling system

## Getting Started
1. Clone repo
```bash
git clone https://github.com/YASSINE-AA/GooeyGUI.git
```
2. Update submodules:
```bash
git submodule update --init --force --remote
```
3. Apply patches:
```bash
./scripts/apply-cjson-submodule-patch.sh
```
4. Init Cmake
```bash
cmake -S . -B build
cd build
make all
```
5. Run example
```bash
cp examples/roboto.ttf build/
./example_basic
```
### Prerequisites

Ensure your development environment includes:
- **X11 Development Libraries**: Gooey relies on X11 (``, ``, ``).
- **GLFW Development Library**: Gooey relies on GLFW (``).
- **OpenGL Development Library**: Gooey relies on GLAD (``).
- **cJSON Development Library**: Gooey relies on cJSON (``).

### Installation

To integrate Gooey into your project:
1. Include `gooey.h` in your project directory.
2. Add `#include "gooey.h"` to your source files.
3. Link libraries.

### Example Usage

```c

#include "gooey.h"
#include

bool state = 0;
GooeyWindow msgBox;

void messageBoxCallback(int option)
{
LOG_INFO("MessageBox option: %d", option);
}

void onButtonClick()
{
state = !state;
GooeyWindow_MakeVisible(&msgBox, state);
}

int main()
{
set_logging_enabled(true);
set_minimum_log_level(DEBUG_LEVEL_INFO);

Gooey_Init(GLFW);

GooeyWindow win = GooeyWindow_Create("Hello World", 400, 300, 1);

msgBox = GooeyMessageBox_Create("Hello", "Welcome to Gooey!", MSGBOX_INFO, messageBoxCallback);

GooeyMessageBox_Show(&msgBox);

GooeyButton_Add(&win, "Click Me", 150, 100, 100, 40, onButtonClick);

GooeyWindow_Run(2, &win, &msgBox);

GooeyWindow_Cleanup(&win);

return 0;
}

```

## Documentation

- You can find the full API documentation here.

## Contributing

Contributions are welcome! If you have suggestions or encounter issues, feel free to open an issue or submit a pull request.

## License

Gooey is released under the GPL3 License.

---

Start building interactive and modern desktop applications with Gooey today!