NvDialog 0.10.1
A cross-platform modal dialogs library for C/C++ that uses the native OS theme.
Loading...
Searching...
No Matches
nvdialog_about_dialog.h
Go to the documentation of this file.
1/*
2 * The MIT License (MIT)
3 *
4 * Copyright (c) 2022 Aggelos Tselios
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to
8 * deal in the Software without restriction, including without limitation the
9 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10 * sell copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
22 * IN THE SOFTWARE.
23 */
24
25#include "../nvdialog_image.h"
26#include "../nvdialog_platform.h"
27
28/**
29 * @brief An opaque handle to a dialog box created from
30 * @ref nvd_about_dialog_new.
31 */
32typedef struct _NvdAboutDialog NvdAboutDialog;
33
34/**
35 * @brief Shows an 'About application' dialog box.
36 * @details This function displays a dialog box similar to 'About' menus in
37 * other applications. It will display the application name, a brief description
38 * of the application, the logo (If specified)
39 * @param name Your application name.
40 * @param description A short description of the application, describing what it
41 * does.
42 * @param logo Nullable value that can specify a filename to load as the
43 * application logo.
44 * @note This function does not use GtkAboutDialog on Unix.
45 * @ingroup AboutDialog
46 * @return NULL on failure, otherwise a handle to a heap allocated object
47 * containing the actual dialog.
48 */
50 const char *description,
51 const char *logo);
52
53/**
54 * @brief Sets a hyperlink to the application's license (Preferably a link.)
55 * @param dialog The dialog to set the hyperlink to.
56 * @param license_link The link that points to your license.
57 * @param txt A text string to set as the link's text. Can be NULL if the link
58 * can be used as the text too.
59 * @warning This function has no effect on Windows.
60 * @ingroup AboutDialog
61 */
63 const char *license_link,
64 const char *txt);
65
66/**
67 * @brief Adds a version text to the dialog given.
68 * @param dialog The dialog to set the version to.
69 * @param version A string to represent the version of your application.
70 * @ingroup AboutDialog
71 */
73 const char *version);
74
75/**
76 * @brief Shows the About dialog given to the user.
77 * @param dialog The dialog to show.
78 * @ingroup AboutDialog
79 */
81
82/**
83 * @brief Returns the raw object behind the dialog.
84 * @param dialog The dialog to retrieve the object from.
85 * @return void* The raw toolkit-created object.
86 * @ingroup AboutDialog
87 */
89
90/**
91 * @brief Sets the dialog's icon to display.
92 * @param dialog The dialog to set the icon to.
93 * @param image The image to display as the dialog's icon, returned from @ref
94 * nvd_create_image
95 * @ingroup AboutDialog
96 * @since v0.9.0
97 */
NVD_API void * nvd_about_dialog_get_raw(NvdAboutDialog *dialog)
Returns the raw object behind the dialog.
NVD_API void nvd_about_dialog_set_license_link(NvdAboutDialog *dialog, const char *license_link, const char *txt)
Sets a hyperlink to the application's license (Preferably a link.)
NVD_API NvdAboutDialog * nvd_about_dialog_new(const char *name, const char *description, const char *logo)
Shows an 'About application' dialog box.
NVD_API void nvd_dialog_set_icon(NvdAboutDialog *dialog, NvdImage *image)
Sets the dialog's icon to display.
NVD_API void nvd_show_about_dialog(NvdAboutDialog *dialog)
Shows the About dialog given to the user.
NVD_API void nvd_about_dialog_set_version(NvdAboutDialog *dialog, const char *version)
Adds a version text to the dialog given.
struct _NvdAboutDialog NvdAboutDialog
An opaque handle to a dialog box created from nvd_about_dialog_new.
Definition: nvdialog_about_dialog.h:32
struct _NvdImage NvdImage
Data that can be interpeted as an image.
Definition: nvdialog_image.h:54
#define NVD_API
Definition: nvdialog_platform.h:57