Gooey GUI Library
Loading...
Searching...
No Matches
gooey_messagebox.h File Reference
#include "core/gooey_backend_internal.h"
#include "gooey_widgets_internal.h"

Go to the source code of this file.

Functions

GooeyWindow GooeyMessageBox_Create (const char *title, const char *message, MSGBOX_TYPE type, void(*callback)(int option))
 Creates a message box window.
 
void GooeyMessageBox_Show (GooeyWindow *msgBoxWindow)
 Displays the specified message box window.
 

Function Documentation

◆ GooeyMessageBox_Create()

GooeyWindow GooeyMessageBox_Create ( const char *  title,
const char *  message,
MSGBOX_TYPE  type,
void(*)(int option)  callback 
)

Creates a message box window.

This function creates a modal message box with a specified title, message, type, and a callback function to handle user interaction.

Parameters
titleThe title of the message box.
messageThe message to display in the message box.
typeThe type of the message box (e.g., INFO, WARNING, ERROR, QUESTION).
callbackA function pointer to handle user input (e.g., button click). The callback receives an integer representing the selected option.
Returns
GooeyWindow The created message box window.

◆ GooeyMessageBox_Show()

void GooeyMessageBox_Show ( GooeyWindow *  msgBoxWindow)

Displays the specified message box window.

This function makes the message box visible on the screen. The message box must have been created using GooeyMessageBox_Create.

Parameters
msgBoxWindowA pointer to the message box window to display.