Nilorea Library
C utilities for networking, threading, graphics
Loading...
Searching...
No Matches
ex_gui_datagrid_sort.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_datagrid_sort.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.
static void fill_rows (N_GUI_CTX *gui, int grid)
 Fill the grid with three rows in a deliberately unsorted order.
int main (void)

Variables

static int failures = 0
 Count of failed assertions.

Macro Definition Documentation

◆ ALLEGRO_UNSTABLE

#define ALLEGRO_UNSTABLE   1

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

References failures, LOG_ERR, LOG_INFO, and n_log.

◆ fill_rows()

void fill_rows ( N_GUI_CTX * gui,
int grid )
static

Fill the grid with three rows in a deliberately unsorted order.

Parameters
guiThe context.
gridThe datagrid.
Examples
ex_gui_datagrid_sort.c.

Definition at line 72 of file ex_gui_datagrid_sort.c.

References gui, and n_gui_datagrid_add_row().

Referenced by main().

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

◆ main()

Variable Documentation

◆ failures

int failures = 0
static

Count of failed assertions.

Definition at line 51 of file ex_gui_datagrid_sort.c.