nesemu/debugger/dialog.h

35 lines
779 B
C
Raw Permalink Normal View History

2024-01-07 16:20:37 -05:00
//
// Created by william on 1/7/24.
//
#ifndef NESEMULATOR_DIALOG_H
#define NESEMULATOR_DIALOG_H
#include <panel.h>
2024-01-09 14:46:20 -05:00
#include "../include/types.h"
2024-01-07 16:20:37 -05:00
typedef struct dialog {
PANEL *panel;
} Dialog;
2024-04-03 23:03:35 -04:00
/**
* Creates a dialog box and present it to the user.
*
* @param message The message to show in the dialog
* @return The dialog instance
*/
2024-01-09 14:46:20 -05:00
Dialog dialog_create(char *message);
2024-04-03 23:03:35 -04:00
/**
* Gets the address typed by the user. Will block until the input has been confirmed by them.
*
* @param dialog A pointer to the dialog
* @param cancelled A boolean indicating if the user has cancelled its input
* @return The address typed by the user
*/
2024-01-09 14:46:20 -05:00
address dialog_get_address(Dialog *dialog, bool *cancelled);
void dialog_remove(Dialog *dialog);
2024-01-07 16:20:37 -05:00
#endif //NESEMULATOR_DIALOG_H