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

Go to the source code of this file.

Data Structures

struct  DRAW_STATE
 

Macros

#define ALLEGRO_UNSTABLE   1
 

Functions

static void custom_draw (N_GUI_WIDGET *widget, float x, float y, ALLEGRO_FONT *font, void *user_data)
 
static void expect_true (const char *label, int cond)
 
int main (int argc, char **argv)
 
static int process_args (int argc, char **argv)
 

Variables

static int failures = 0
 
static int log_level = 3
 

Data Structure Documentation

◆ DRAW_STATE

struct DRAW_STATE
Examples
ex_gui_custom.c.

Definition at line 76 of file ex_gui_custom.c.

+ Collaboration diagram for DRAW_STATE:
Data Fields
int calls
int had_font
float last_x
float last_y
float seen_w

Macro Definition Documentation

◆ ALLEGRO_UNSTABLE

#define ALLEGRO_UNSTABLE   1

Definition at line 28 of file ex_gui_custom.c.

Function Documentation

◆ custom_draw()

static void custom_draw ( N_GUI_WIDGET widget,
float  x,
float  y,
ALLEGRO_FONT *  font,
void *  user_data 
)
static
Examples
ex_gui_custom.c.

Definition at line 84 of file ex_gui_custom.c.

References DRAW_STATE::calls, N_GUI_WIDGET::h, DRAW_STATE::had_font, DRAW_STATE::last_x, DRAW_STATE::last_y, DRAW_STATE::seen_w, and N_GUI_WIDGET::w.

Referenced by main().

+ Here is the caller graph for this function:

◆ expect_true()

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

◆ main()

◆ process_args()

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

Definition at line 42 of file ex_gui_custom.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 40 of file ex_gui_custom.c.

◆ log_level

int log_level = 3
static

Definition at line 39 of file ex_gui_custom.c.