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

Go to the source code of this file.

Macros

#define ALLEGRO_UNSTABLE   1

Functions

static void expect_true (const char *label, int cond)
 Assert a condition, logging which check failed.
int main (void)
static void mouse (N_GUI_CTX *gui, int type, int x, int y)
 Send one mouse event.

Variables

static int failures = 0
 Count of failed assertions.

Macro Definition Documentation

◆ ALLEGRO_UNSTABLE

#define ALLEGRO_UNSTABLE   1

Definition at line 38 of file ex_gui_cursor.c.

Function Documentation

◆ expect_true()

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

Assert a condition, logging which check failed.

Parameters
labelWhat is being checked.
condNon-zero to pass.

Definition at line 56 of file ex_gui_cursor.c.

References failures, LOG_ERR, LOG_INFO, and n_log.

◆ main()

◆ mouse()

void mouse ( N_GUI_CTX * gui,
int type,
int x,
int y )
static

Send one mouse event.

Parameters
guiGUI context.
typeThe ALLEGRO_EVENT_MOUSE_* type.
xCursor x.
yCursor y.
Examples
ex_gui_cursor.c.

Definition at line 72 of file ex_gui_cursor.c.

References gui, n_gui_process_event(), and type().

Referenced by _scrollbar_calc_scroll(), _scrollbar_calc_scroll_int(), and main().

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

Variable Documentation

◆ failures

int failures = 0
static

Count of failed assertions.

Definition at line 49 of file ex_gui_cursor.c.