Gooey GUI Library
Loading...
Searching...
No Matches
gooey.h File Reference
#include "core/gooey_common.h"

Go to the source code of this file.

Functions

int Gooey_Init (GooeyBackends backend)
 Initializes the Gooey system with the specified backend.
 
void GooeyWindow_SetTheme (const char *fontPath)
 Sets the theme for the Gooey window.
 
GooeyWindow GooeyWindow_Create (const char *title, int width, int height, bool visibility)
 Creates a new Gooey window.
 
GooeyWindow GooeyWindow_CreateChild (const char *title, int width, int height, bool visibility)
 
void GooeyWindow_MakeVisible (GooeyWindow *win, bool visibility)
 
void GooeyWindow_Run (int num_windows, GooeyWindow *first_win,...)
 Runs the Gooey window.
 
void GooeyWindow_Cleanup (int num_windows, GooeyWindow *first_win,...)
 Cleans up the resources associated with the Gooey windows.
 
void GooeyWindow_RegisterWidget (GooeyWindow *win, GooeyWidget *widget)
 
void GooeyWindow_MakeResizable (GooeyWindow *msgBoxWindow, bool is_resizable)
 Sets the resizable property of a window.
 
void GooeyWindow_Redraw (GooeyWindow *win)
 

Function Documentation

◆ Gooey_Init()

int Gooey_Init ( GooeyBackends  backend)

Initializes the Gooey system with the specified backend.

Parameters
backendThe backend to use (e.g., X11, Wayland, GLFW).
Returns
0 on success, non-zero on failure.

◆ GooeyWindow_Cleanup()

void GooeyWindow_Cleanup ( int  num_windows,
GooeyWindow *  first_win,
  ... 
)

Cleans up the resources associated with the Gooey windows.

Parameters
num_windowsThe number of windows to clean up.
first_windowThe first window to clean up.

◆ GooeyWindow_Create()

GooeyWindow GooeyWindow_Create ( const char *  title,
int  width,
int  height,
bool  visibility 
)

Creates a new Gooey window.

This function initializes a new window with the given title, width, and height.

Parameters
titleThe title of the window.
widthThe width of the window.
heightThe height of the window.
Returns
A new GooeyWindow object.

◆ GooeyWindow_CreateChild()

GooeyWindow GooeyWindow_CreateChild ( const char *  title,
int  width,
int  height,
bool  visibility 
)

◆ GooeyWindow_MakeResizable()

void GooeyWindow_MakeResizable ( GooeyWindow *  msgBoxWindow,
bool  is_resizable 
)

Sets the resizable property of a window.

Allows the user to resize a window dynamically, depending on the value of is_resizable.

Parameters
msgBoxWindowA pointer to the window whose resizable property is to be set.
is_resizabletrue to make the window resizable; false to make it fixed-size.

◆ GooeyWindow_MakeVisible()

void GooeyWindow_MakeVisible ( GooeyWindow *  win,
bool  visibility 
)

◆ GooeyWindow_Redraw()

void GooeyWindow_Redraw ( GooeyWindow *  win)

◆ GooeyWindow_RegisterWidget()

void GooeyWindow_RegisterWidget ( GooeyWindow *  win,
GooeyWidget *  widget 
)

◆ GooeyWindow_Run()

void GooeyWindow_Run ( int  num_windows,
GooeyWindow *  first_win,
  ... 
)

Runs the Gooey window.

This function enters the main event loop and begins processing user input and window events for the provided Gooey window.

Parameters
winThe window to run.

◆ GooeyWindow_SetTheme()

void GooeyWindow_SetTheme ( const char *  fontPath)

Sets the theme for the Gooey window.

Parameters
fontPathThe path to the font file to use for the window's theme.