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

Application info, license, authors, etc. More...

#include <widgets/gp_widget.h>

Go to the source code of this file.

Data Structures

struct  gp_app_info_author
 Description of the app author. More...
struct  gp_app_info
 An application information. More...


typedef struct gp_app_info_author gp_app_info_author
 Description of the app author.
typedef struct gp_app_info gp_app_info
 An application information.


const char * gp_app_info_name (void)
 Returns application name.
void gp_app_info_dialog_run (void)
 Shows application info in an dialog.
void gp_app_info_print (void)
 Prints application info into stdout.

Detailed Description

Application info, license, authors, etc.

Application info is a structure, that if defined, stores an application information such as name, licence, description, version and a list of authors.

The application info is shown as an dialog when 'Ctrl+i' is pressed and printed into the stdout when application is passed '-i' on the command line.

The app info structure has to be populated in order to have the application name in the window tittle.

Definition in file gp_app_info.h.

Typedef Documentation

◆ gp_app_info

typedef struct gp_app_info gp_app_info

An application information.

Fill in this structure to get the about dialog in the application.

The structure has to be called app_info so that it's picked up by the linker automatically.
struct gp_app_info app_info = {
.name = "app_name",
.desc = "This is a short app description",
.version = "3.14",
.license = "GPL-2.0-or-later",
.url = "http://foo.url",
.authors = (gp_app_info_author []) {
{.name = "Jonh Hacker", .email = "jonh.hacker@foo.url", .years = "2023"},
Description of the app author.
Definition gp_app_info.h:31
An application information.
Definition gp_app_info.h:64
const char * name
Application name.
Definition gp_app_info.h:66

Function Documentation

◆ gp_app_info_dialog_run()

void gp_app_info_dialog_run ( void  )

Shows application info in an dialog.

This is called automatically by the widget library to show the application info dialog.

◆ gp_app_info_name()

const char * gp_app_info_name ( void  )

Returns application name.

Application name.

◆ gp_app_info_print()

void gp_app_info_print ( void  )

Prints application info into stdout.

This is called automatically by the widget library when -i is passed on the commandline.