libmypaint  1.6.0
mypaint-brush-settings.h
Go to the documentation of this file.
1 #ifndef MYPAINTBRUSHSETTINGS_H
2 #define MYPAINTBRUSHSETTINGS_H
3 
4 /* libmypaint - The MyPaint Brush Library
5  * Copyright (C) 2012 Jon Nordby <jononor@gmail.com>
6  *
7  * Permission to use, copy, modify, and/or distribute this software for any
8  * purpose with or without fee is hereby granted, provided that the above
9  * copyright notice and this permission notice appear in all copies.
10  *
11  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 #include "mypaint-config.h"
21 #include "mypaint-glib-compat.h"
23 
25 
29 typedef struct {
31  const gchar *cname;
36  const gchar *name;
40  float min;
42  float def; // default
44  float max;
49  const gchar *tooltip;
51 
61 
70 const gchar *
72 
81 const gchar *
83 
97 
110 typedef struct {
112  const gchar *cname;
119  float hard_min;
121  float soft_min;
126  float normal;
128  float soft_max;
135  float hard_max;
140  const gchar *name;
145  const gchar *tooltip;
147 
155 const MyPaintBrushInputInfo *
157 
166 const gchar *
176 const gchar *
178 
192 
194 
195 #endif // MYPAINTBRUSHSETTINGS_H
MyPaintBrushInput
Definition: mypaint-brush-settings-gen.h:5
MyPaintBrushSetting
Definition: mypaint-brush-settings-gen.h:27
gint gboolean
Definition: mypaint-glib-compat.h:25
char gchar
Definition: mypaint-glib-compat.h:23
#define G_END_DECLS
Definition: mypaint-glib-compat.h:14
#define G_BEGIN_DECLS
Definition: mypaint-glib-compat.h:13
Holds information about a single MyPaintBrushInput.
Definition: mypaint-brush-settings.h:110
const gchar * name
Display name - descriptive name of the input.
Definition: mypaint-brush-settings.h:140
float hard_max
Hard upper limit of the input's range.
Definition: mypaint-brush-settings.h:135
const gchar * cname
Canonical name - uniquely identifies the input.
Definition: mypaint-brush-settings.h:112
MyPaintBrushInput mypaint_brush_input_from_cname(const char *cname)
Get the MyPaintBrushInput id matching the given canonical name.
float normal
Expected normal value for the input - only used as a reference when creating mappings.
Definition: mypaint-brush-settings.h:126
const gchar * mypaint_brush_input_info_get_name(const MyPaintBrushInputInfo *self)
Get the translated display name for the given input.
float soft_min
Default lower limit of the input's range.
Definition: mypaint-brush-settings.h:121
const MyPaintBrushInputInfo * mypaint_brush_input_info(MyPaintBrushInput id)
Get a pointer to the constant info struct for the given input id.
const gchar * tooltip
Tooltip - brief description of the input.
Definition: mypaint-brush-settings.h:145
float hard_min
Hard lower limit of the input's range.
Definition: mypaint-brush-settings.h:119
const gchar * mypaint_brush_input_info_get_tooltip(const MyPaintBrushInputInfo *self)
Get the translated display name for the given input.
float soft_max
Default upper limit of the input's range.
Definition: mypaint-brush-settings.h:128
Holds information about a single MyPaintBrushSetting.
Definition: mypaint-brush-settings.h:29
float min
Mininmum base value.
Definition: mypaint-brush-settings.h:40
const gchar * mypaint_brush_setting_info_get_tooltip(const MyPaintBrushSettingInfo *self)
Get the translated tooltip for the given setting.
gboolean constant
Indicates whether the setting supports dynamics or not.
Definition: mypaint-brush-settings.h:38
const gchar * mypaint_brush_setting_info_get_name(const MyPaintBrushSettingInfo *self)
Get the translated display name for the given setting.
const gchar * cname
Canonical name - uniquely identifies the setting.
Definition: mypaint-brush-settings.h:31
float def
Default base value.
Definition: mypaint-brush-settings.h:42
const gchar * tooltip
Tooltip - description of the setting.
Definition: mypaint-brush-settings.h:49
MyPaintBrushSetting mypaint_brush_setting_from_cname(const char *cname)
Get the MyPaintBrushSetting id matching the given canonical name.
float max
Maximum base value.
Definition: mypaint-brush-settings.h:44
const gchar * name
Display name - descriptive name of the setting.
Definition: mypaint-brush-settings.h:36
const MyPaintBrushSettingInfo * mypaint_brush_setting_info(MyPaintBrushSetting id)
Get a pointer to the constant info struct for the given setting id.