Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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)
- Host: GitHub
- URL: https://github.com/yassine-aa/gooeygui
- Owner: YASSINE-AA
- Created: 2024-12-01T19:42:21.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2024-12-28T21:18:07.000Z (18 days ago)
- Last Synced: 2024-12-28T22:17:52.215Z (18 days ago)
- Topics: api, c, cross-platform, desktop-app, gui, lib, library, linux, opengl, toolkit, vulkan, windows
- Language: C
- Homepage: https://yassine-aa.github.io/GooeyWebsite/
- Size: 48.4 MB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
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
```
### PrerequisitesEnsure 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!