#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <allegro5/allegro_primitives.h>
#include "nilorea/n_common.h"
#include "nilorea/n_log.h"
#include "nilorea/n_gui.h"
#include "nilorea/n_gui_popup.h"
Go to the source code of this file.
|
| static void | draw (N_GUI_CTX *gui) |
| | draw the whole context into a memory bitmap
|
| static void | expect_true (const char *what, int ok) |
| | record one check
|
| static void | feed (N_GUI_CTX *gui, int type, float x, float y, int button) |
| | feed one mouse event
|
| static const N_GUI_WINDOW * | level_window (N_GUI_CTX *gui, const N_GUI_POPUP *popup, int level) |
| | a level's window, or NULL when it is not open
|
| int | main (int argc, char **argv) |
| static void | on_pick (N_GUI_POPUP *popup, int tag, void *user_data) |
| | the pick callback
|
| static int | process_args (int argc, char **argv) |
| | read -V LOGLEVEL
|
◆ ALLEGRO_UNSTABLE
| #define ALLEGRO_UNSTABLE 1 |
◆ draw()
◆ expect_true()
| void expect_true |
( |
const char * | what, |
|
|
int | ok ) |
|
static |
◆ feed()
| void feed |
( |
N_GUI_CTX * | gui, |
|
|
int | type, |
|
|
float | x, |
|
|
float | y, |
|
|
int | button ) |
|
static |
◆ level_window()
◆ main()
| int main |
( |
int | argc, |
|
|
char ** | argv ) |
Definition at line 106 of file ex_gui_popup.c.
References draw(), expect_true(), failures, feed(), font, gui, N_GUI_WINDOW::h, level_window(), LOG_ERR, log_level, n_gui_destroy_ctx(), n_gui_new_ctx(), n_gui_popup_add_item(), n_gui_popup_add_separator(), n_gui_popup_add_submenu(), n_gui_popup_close(), n_gui_popup_free(), n_gui_popup_hit(), n_gui_popup_is_open(), n_gui_popup_new(), n_gui_popup_open(), n_gui_popup_press(), N_GUI_POPUP_ROOT, n_gui_popup_set_enabled(), n_gui_popup_set_shown(), n_gui_popup_set_title(), n_gui_popup_window(), n_gui_set_display_size(), n_log, on_pick(), picked_tag, picks, process_args(), set_log_level(), N_GUI_WINDOW::w, N_GUI_WINDOW::x, and N_GUI_WINDOW::y.
◆ on_pick()
| void on_pick |
( |
N_GUI_POPUP * | popup, |
|
|
int | tag, |
|
|
void * | user_data ) |
|
static |
◆ process_args()
| int process_args |
( |
int | argc, |
|
|
char ** | argv ) |
|
static |
◆ failures
◆ log_level
◆ picked_tag
◆ picks