Gooey GUI Library
Loading...
Searching...
No Matches
gooey_textbox.h
Go to the documentation of this file.
1#ifndef GOOEY_TEXTBOX_H
2#define GOOEY_TEXTBOX_H
3
4#include "common/gooey_common.h"
5#include <stdbool.h>
6
23GooeyTextbox *GooeyTextBox_Create( int x, int y, int width,
24 int height, char *placeholder, void (*onTextChanged)(char *text));
25
34void GooeyTextbox_Draw(GooeyWindow *win);
35
48bool GooeyTextbox_HandleClick(GooeyWindow *win, int x, int y);
49
59void GooeyTextbox_HandleKeyPress(GooeyWindow *win, void *event);
60
70const char *GooeyTextbox_GetText(GooeyTextbox *textbox);
71
80void GooeyTextbox_SetText(GooeyTextbox *textbox, const char *text);
81
82#endif /* GOOEY_TEXTBOX_H */
bool GooeyTextbox_HandleClick(GooeyWindow *win, int x, int y)
Handles textbox click events.
void GooeyTextbox_Draw(GooeyWindow *win)
Draws the textbox on the window.
const char * GooeyTextbox_GetText(GooeyTextbox *textbox)
Gets the text of the textbox.
GooeyTextbox * GooeyTextBox_Create(int x, int y, int width, int height, char *placeholder, void(*onTextChanged)(char *text))
Adds a textbox to the window.
void GooeyTextbox_SetText(GooeyTextbox *textbox, const char *text)
Sets the text of the textbox.
void GooeyTextbox_HandleKeyPress(GooeyWindow *win, void *event)
Handles key press events for the textbox.