2D bitmap graphics library with emphasis on speed and correctness
No Matches
Data Structures | Functions
gp_progress_callback.h File Reference

A progress callback. More...

#include <core/gp_types.h>

Go to the source code of this file.

Data Structures

struct  gp_progress_cb
 Progress callback. More...


static int gp_progress_cb_report (gp_progress_cb *callback, unsigned int val, unsigned int max, unsigned int mul __attribute__((unused)))
 Reports progress.

Detailed Description

A progress callback.

Progress callbacks serves following purposes:

Definition in file gp_progress_callback.h.

Function Documentation

◆ gp_progress_cb_report()

static int gp_progress_cb_report ( gp_progress_cb callback,
unsigned int  val,
unsigned int  max,
unsigned int mul   __attribute__(unused) 

Reports progress.

This function is called by image loaders and filters to report progress.

The progress is reported as percentage based on the val where max is 100%.

callbackA progress callback, passed from application.
valCurrent value.
maxA maximal value.

Definition at line 62 of file gp_progress_callback.h.

References gp_progress_cb::callback.