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