Nilorea Library
C utilities for networking, threading, graphics
Loading...
Searching...
No Matches
ex_gui_bench.c File Reference
#include "nilorea/n_gui.h"
+ Include dependency graph for ex_gui_bench.c:

Go to the source code of this file.

Macros

#define ALLEGRO_UNSTABLE   1
 
#define BENCH_DEFAULT_DRAW_ITERS   1000
 
#define BENCH_DEFAULT_EVENT_ITERS   20000
 
#define BENCH_DISPLAY_H   1000
 
#define BENCH_DISPLAY_W   1600
 
#define BENCH_GRID_COLS   8
 
#define BENCH_GRID_ROWS   500
 
#define BENCH_LIST_ITEMS   200
 
#define BENCH_SYNTAX_LINES   200
 

Functions

static void build_datagrid_window (N_GUI_CTX *gui)
 
static void build_syntaxview_window (N_GUI_CTX *gui)
 
static void build_textarea_window (N_GUI_CTX *gui)
 
static void build_widgets_window (N_GUI_CTX *gui)
 
int main (int argc, char **argv)
 
static void on_noop_grid_select (int a, int b, void *u)
 
static void on_noop_select (int a, int b, int c, void *u)
 
static void process_args (int argc, char **argv)
 

Variables

static int draw_iters = 1000
 
static int event_iters = 20000
 
static int log_level = 5
 

Macro Definition Documentation

◆ ALLEGRO_UNSTABLE

#define ALLEGRO_UNSTABLE   1

Definition at line 45 of file ex_gui_bench.c.

◆ BENCH_DEFAULT_DRAW_ITERS

#define BENCH_DEFAULT_DRAW_ITERS   1000
Examples
ex_gui_bench.c.

Definition at line 53 of file ex_gui_bench.c.

◆ BENCH_DEFAULT_EVENT_ITERS

#define BENCH_DEFAULT_EVENT_ITERS   20000
Examples
ex_gui_bench.c.

Definition at line 54 of file ex_gui_bench.c.

◆ BENCH_DISPLAY_H

#define BENCH_DISPLAY_H   1000
Examples
ex_gui_bench.c.

Definition at line 50 of file ex_gui_bench.c.

◆ BENCH_DISPLAY_W

#define BENCH_DISPLAY_W   1600
Examples
ex_gui_bench.c.

Definition at line 49 of file ex_gui_bench.c.

◆ BENCH_GRID_COLS

#define BENCH_GRID_COLS   8
Examples
ex_gui_bench.c.

Definition at line 57 of file ex_gui_bench.c.

◆ BENCH_GRID_ROWS

#define BENCH_GRID_ROWS   500
Examples
ex_gui_bench.c.

Definition at line 56 of file ex_gui_bench.c.

◆ BENCH_LIST_ITEMS

#define BENCH_LIST_ITEMS   200
Examples
ex_gui_bench.c.

Definition at line 58 of file ex_gui_bench.c.

◆ BENCH_SYNTAX_LINES

#define BENCH_SYNTAX_LINES   200
Examples
ex_gui_bench.c.

Definition at line 59 of file ex_gui_bench.c.

Function Documentation

◆ build_datagrid_window()

static void build_datagrid_window ( N_GUI_CTX gui)
static
Examples
ex_gui_bench.c.

Definition at line 118 of file ex_gui_bench.c.

References BENCH_GRID_COLS, BENCH_GRID_ROWS, gui, n_gui_add_datagrid(), n_gui_add_window(), n_gui_datagrid_add_column(), n_gui_datagrid_add_row(), and on_noop_grid_select().

Referenced by main().

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

◆ build_syntaxview_window()

static void build_syntaxview_window ( N_GUI_CTX gui)
static
Examples
ex_gui_bench.c.

Definition at line 160 of file ex_gui_bench.c.

References BENCH_SYNTAX_LINES, FreeNoLog, gui, Malloc, n_gui_add_syntaxview(), n_gui_add_window(), N_GUI_SYNTAX_JSON, and n_gui_syntaxview_set_text().

Referenced by main().

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

◆ build_textarea_window()

static void build_textarea_window ( N_GUI_CTX gui)
static
Examples
ex_gui_bench.c.

Definition at line 141 of file ex_gui_bench.c.

References gui, n_gui_add_textarea(), n_gui_add_window(), and n_gui_textarea_set_text().

Referenced by main().

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

◆ build_widgets_window()

static void build_widgets_window ( N_GUI_CTX gui)
static

◆ main()

◆ on_noop_grid_select()

static void on_noop_grid_select ( int  a,
int  b,
void *  u 
)
static
Examples
ex_gui_bench.c.

Definition at line 73 of file ex_gui_bench.c.

Referenced by build_datagrid_window().

+ Here is the caller graph for this function:

◆ on_noop_select()

static void on_noop_select ( int  a,
int  b,
int  c,
void *  u 
)
static
Examples
ex_gui_bench.c.

Definition at line 67 of file ex_gui_bench.c.

Referenced by build_widgets_window().

+ Here is the caller graph for this function:

◆ process_args()

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

Definition at line 79 of file ex_gui_bench.c.

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

Variable Documentation

◆ draw_iters

int draw_iters = 1000
static
Examples
ex_gui_bench.c.

Definition at line 62 of file ex_gui_bench.c.

Referenced by main(), and process_args().

◆ event_iters

int event_iters = 20000
static
Examples
ex_gui_bench.c.

Definition at line 63 of file ex_gui_bench.c.

Referenced by main(), and process_args().

◆ log_level

int log_level = 5
static

Definition at line 61 of file ex_gui_bench.c.