Nilorea Library
C utilities for networking, threading, graphics
Loading...
Searching...
No Matches
ex_gui_reentrant.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "nilorea/n_common.h"
#include "nilorea/n_log.h"
#include "nilorea/n_gui.h"
Include dependency graph for ex_gui_reentrant.c:

Go to the source code of this file.

Macros

#define ALLEGRO_UNSTABLE   1

Functions

static void expect_true (const char *label, int cond)
int main (int argc, char **argv)
static ALLEGRO_EVENT mouse_event (int type, int x, int y)
static void on_open_popup (int widget_id, void *user_data)
static int process_args (int argc, char **argv)

Variables

static int failures = 0
static int g_click_count = 0
static N_GUI_CTX * g_gui = NULL
static int g_popup_win = -1
static int log_level = 3

Macro Definition Documentation

◆ ALLEGRO_UNSTABLE

#define ALLEGRO_UNSTABLE   1

Definition at line 38 of file ex_gui_reentrant.c.

Function Documentation

◆ expect_true()

void expect_true ( const char * label,
int cond )
static

Definition at line 67 of file ex_gui_reentrant.c.

References failures, LOG_ERR, LOG_INFO, and n_log.

◆ main()

◆ mouse_event()

ALLEGRO_EVENT mouse_event ( int type,
int x,
int y )
static

Definition at line 102 of file ex_gui_reentrant.c.

References type().

Here is the call graph for this function:

◆ on_open_popup()

void on_open_popup ( int widget_id,
void * user_data )
static
Examples
ex_gui_reentrant.c.

Definition at line 57 of file ex_gui_reentrant.c.

References g_click_count, g_gui, g_popup_win, n_gui_open_window(), and n_gui_raise_window().

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ process_args()

int process_args ( int argc,
char ** argv )
static

Definition at line 76 of file ex_gui_reentrant.c.

References LOG_DEBUG, LOG_ERR, LOG_INFO, log_level, LOG_NOTICE, and LOG_NULL.

Variable Documentation

◆ failures

int failures = 0
static

Definition at line 50 of file ex_gui_reentrant.c.

◆ g_click_count

int g_click_count = 0
static
Examples
ex_gui_reentrant.c.

Definition at line 55 of file ex_gui_reentrant.c.

Referenced by main(), and on_open_popup().

◆ g_gui

N_GUI_CTX* g_gui = NULL
static
Examples
ex_gui_reentrant.c.

Definition at line 53 of file ex_gui_reentrant.c.

Referenced by main(), and on_open_popup().

◆ g_popup_win

int g_popup_win = -1
static
Examples
ex_gui_reentrant.c.

Definition at line 54 of file ex_gui_reentrant.c.

Referenced by main(), and on_open_popup().

◆ log_level

int log_level = 3
static

Definition at line 49 of file ex_gui_reentrant.c.