5 Struct N_GUI_CUSTOM_DATA
gullradriel edited this page 2026-10-09 00:55:18 +02:00

N_GUI_CUSTOM_DATA

Module: GUI: allegro5 widget system with pseudo-windows

Owner-draw custom widget data: a paint callback, an optional mouse callback, and their user pointers.

#include "n_gui.h"

Public Attributes

Name
void * user_data
opaque user pointer handed back to the callback (not owned by n_gui)
N_GUI_CUSTOM_MOUSE on_mouse
mouse callback (NULL = the widget takes no mouse input)
void * mouse_user_data
opaque user pointer handed back to on_mouse (not owned by n_gui)
N_GUI_CUSTOM_DRAW draw
paint callback invoked during n_gui_draw (NULL = draw nothing)
void(*)(void *user_data) destroy
called with user_data when the widget is destroyed, for a caller that hands its state to the widget (NULL = user_data is not owned)

Public Attributes Documentation

variable user_data

void * user_data;

opaque user pointer handed back to the callback (not owned by n_gui)

variable on_mouse

N_GUI_CUSTOM_MOUSE on_mouse;

mouse callback (NULL = the widget takes no mouse input)

variable mouse_user_data

void * mouse_user_data;

opaque user pointer handed back to on_mouse (not owned by n_gui)

variable draw

N_GUI_CUSTOM_DRAW draw;

paint callback invoked during n_gui_draw (NULL = draw nothing)

variable destroy

void(*)(void *user_data) destroy;

called with user_data when the widget is destroyed, for a caller that hands its state to the widget (NULL = user_data is not owned)