Nilorea Library
C utilities for networking, threading, graphics
Loading...
Searching...
No Matches
ex_gui_global_scroll.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_global_scroll.c:

Go to the source code of this file.

Macros

#define ALLEGRO_UNSTABLE   1

Functions

static void draw_once (N_GUI_CTX *gui)
 draw one frame into a memory bitmap of the display's size
static void expect_true (const char *what, int ok)
 count a failed check
int main (int argc, char **argv)
 run the checks
static int process_args (int argc, char **argv)
 read -V
static void wheel (N_GUI_CTX *gui, int dz)
 turn the mouse wheel over the display

Variables

static int failures = 0
 failed checks
static int log_level = 3
 log level from -V

Macro Definition Documentation

◆ ALLEGRO_UNSTABLE

#define ALLEGRO_UNSTABLE   1

Definition at line 29 of file ex_gui_global_scroll.c.

Function Documentation

◆ draw_once()

void draw_once ( N_GUI_CTX * gui)
static

draw one frame into a memory bitmap of the display's size

Parameters
guithe GUI
Examples
ex_gui_global_scroll.c.

Definition at line 76 of file ex_gui_global_scroll.c.

References gui, and n_gui_draw().

Referenced by main().

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

◆ expect_true()

void expect_true ( const char * what,
int ok )
static

count a failed check

Parameters
whatthe check
okits result

Definition at line 48 of file ex_gui_global_scroll.c.

References failures, LOG_ERR, LOG_INFO, and n_log.

◆ main()

int main ( int argc,
char ** argv )

run the checks

Parameters
argcargument count
argvarguments
Returns
0 on success

Definition at line 109 of file ex_gui_global_scroll.c.

References draw_once(), expect_true(), failures, font, gui, LOG_ERR, log_level, n_gui_add_window(), n_gui_destroy_ctx(), n_gui_new_ctx(), n_gui_open_window(), n_gui_set_display_size(), N_GUI_WIN_FRAMELESS, n_gui_window_set_flags(), n_gui_window_set_rect(), n_log, process_args(), set_log_level(), and wheel().

Here is the call graph for this function:

◆ process_args()

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

read -V

Parameters
argcargument count
argvarguments
Returns
0, or -1 on a bad argument

Definition at line 61 of file ex_gui_global_scroll.c.

References log_level.

◆ wheel()

void wheel ( N_GUI_CTX * gui,
int dz )
static

turn the mouse wheel over the display

Parameters
guithe GUI
dznotches
Examples
ex_gui_colorwheel.c, ex_gui_global_scroll.c, and ex_gui_grid.c.

Definition at line 94 of file ex_gui_global_scroll.c.

References gui, and n_gui_process_event().

Referenced by main().

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

Variable Documentation

◆ failures

int failures = 0
static

failed checks

Definition at line 43 of file ex_gui_global_scroll.c.

◆ log_level

int log_level = 3
static

log level from -V

Definition at line 41 of file ex_gui_global_scroll.c.