Gooey GUI Library
Loading...
Searching...
No Matches
gooey_messagebox.h File Reference

Header file for creating and managing message boxes in Gooey. More...

#include "common/gooey_common.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.
 

Detailed Description

Header file for creating and managing message boxes in Gooey.

Provides functions to create, configure, and display modal message boxes with various types of alerts and a callback to handle user input.

Author
Yassine Ahmed Ali @license GPL-3.0

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
A pointer to 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.