Gooey GUI Library
Loading...
Searching...
No Matches
gooey_button.h
Go to the documentation of this file.
1#ifndef GOOEY_BUTTON_H
2#define GOOEY_BUTTON_H
3
4#include "core/gooey_backend_internal.h"
5#include "gooey_widgets_internal.h"
6
7#include <stdbool.h>
8
21GooeyButton *GooeyButton_Add(GooeyWindow *win, const char *label, int x, int y,
22 int width, int height, void (*callback)());
23
32bool GooeyButton_HandleClick(GooeyWindow *win, int x, int y);
33
40void GooeyButton_SetText(GooeyButton *button, const char *text);
41
47void GooeyButton_Draw(GooeyWindow *win);
48
57void GooeyButton_SetHighlight(GooeyButton *button, bool is_highlighted);
58
59
60#endif
void GooeyButton_SetText(GooeyButton *button, const char *text)
Sets the text of the button.
GooeyButton * GooeyButton_Add(GooeyWindow *win, const char *label, int x, int y, int width, int height, void(*callback)())
Adds a button to the window.
void GooeyButton_Draw(GooeyWindow *win)
Draws the button on the window.
bool GooeyButton_HandleClick(GooeyWindow *win, int x, int y)
Handles button click events.
void GooeyButton_SetHighlight(GooeyButton *button, bool is_highlighted)
Highlights or unhighlights a button.