Commit 033fcf16 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

added new enum GimpTextHintStyle.

2008-10-27  Sven Neumann  <sven@gimp.org>

	* libgimpbase/gimpbaseenums.[ch]: added new enum 
GimpTextHintStyle.

	* libgimp/gimpenums.c.tail
	* tools/pdbgen/enums.pl: regenerated.

	* app/text/gimptext.[ch]: added new property "hint-style". 
Removed
	"autohint" property and mapped the boolean property "hinting" to
	the new enum property "hint-style".

	* app/text/gimptextlayout-render.c 
(gimp_text_layout_render_flags):
	use "hint-style".

	* app/tools/gimptextoptions.[ch]: changed tool options 
accordingly.

	* tools/pdbgen/pdb/text_layer.pdb: deprecated the "hinting" API
	and introduced getters and setters for "hint-style".

	* app/pdb/text-layer-cmds.c
	* app/pdb/internal-procs.c
	* libgimp/gimptextlayer_pdb.[ch]: regenerated.


svn path=/trunk/; revision=27432
parent cd088551
2008-10-27 Sven Neumann <sven@gimp.org>
* libgimpbase/gimpbaseenums.[ch]: added new enum GimpTextHintStyle.
* libgimp/gimpenums.c.tail
* tools/pdbgen/enums.pl: regenerated.
* app/text/gimptext.[ch]: added new property "hint-style". Removed
"autohint" property and mapped the boolean property "hinting" to
the new enum property "hint-style".
* app/text/gimptextlayout-render.c (gimp_text_layout_render_flags):
use "hint-style".
* app/tools/gimptextoptions.[ch]: changed tool options accordingly.
* tools/pdbgen/pdb/text_layer.pdb: deprecated the "hinting" API
and introduced getters and setters for "hint-style".
* app/pdb/text-layer-cmds.c
* app/pdb/internal-procs.c
* libgimp/gimptextlayer_pdb.[ch]: regenerated.
2008-10-27 Michael Natterer <mitch@gimp.org>
* app/tools/gimpdrawtool.[ch]: add gimp_draw_tool_set_clip_rect()
......
......@@ -29,7 +29,7 @@
#include "internal-procs.h"
/* 593 procedures registered total */
/* 595 procedures registered total */
void
internal_procs_init (GimpPDB *pdb)
......
This diff is collapsed.
......@@ -46,9 +46,8 @@ enum
PROP_FONT,
PROP_FONT_SIZE,
PROP_UNIT,
PROP_HINTING,
PROP_AUTOHINT,
PROP_ANTIALIAS,
PROP_HINT_STYLE,
PROP_KERNING,
PROP_LANGUAGE,
PROP_BASE_DIR,
......@@ -65,7 +64,9 @@ enum
PROP_TRANSFORMATION,
PROP_OFFSET_X,
PROP_OFFSET_Y,
PROP_BORDER
PROP_BORDER,
/* for backward compatibility */
PROP_HINTING
};
......@@ -128,19 +129,16 @@ gimp_text_class_init (GimpTextClass *klass)
"font-size-unit", NULL,
TRUE, FALSE, GIMP_UNIT_PIXEL,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_HINTING,
"hinting", NULL,
TRUE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_AUTOHINT,
"autohint", NULL,
FALSE,
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_DEFAULTS);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_ANTIALIAS,
"antialias", NULL,
TRUE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_HINT_STYLE,
"hint-style", NULL,
GIMP_TYPE_TEXT_HINT_STYLE,
GIMP_TEXT_HINT_STYLE_MEDIUM,
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_DEFAULTS);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_KERNING,
"kerning", NULL,
FALSE,
......@@ -228,6 +226,12 @@ gimp_text_class_init (GimpTextClass *klass)
G_PARAM_CONSTRUCT |
GIMP_PARAM_WRITABLE));
/* the old hinting options have been replaced by 'hint-style' */
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_HINTING,
"hinting", NULL,
TRUE,
GIMP_PARAM_STATIC_STRINGS);
g_free (language);
}
......@@ -282,15 +286,12 @@ gimp_text_get_property (GObject *object,
case PROP_UNIT:
g_value_set_int (value, text->unit);
break;
case PROP_HINTING:
g_value_set_boolean (value, text->hinting);
break;
case PROP_AUTOHINT:
g_value_set_boolean (value, text->autohint);
break;
case PROP_ANTIALIAS:
g_value_set_boolean (value, text->antialias);
break;
case PROP_HINT_STYLE:
g_value_set_enum (value, text->hint_style);
break;
case PROP_KERNING:
g_value_set_boolean (value, text->kerning);
break;
......@@ -339,6 +340,10 @@ gimp_text_get_property (GObject *object,
case PROP_OFFSET_Y:
g_value_set_double (value, text->offset_y);
break;
case PROP_HINTING:
g_value_set_boolean (value,
text->hint_style != GIMP_TEXT_HINT_STYLE_NONE);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
......@@ -388,15 +393,12 @@ gimp_text_set_property (GObject *object,
case PROP_UNIT:
text->unit = g_value_get_int (value);
break;
case PROP_HINTING:
text->hinting = g_value_get_boolean (value);
break;
case PROP_AUTOHINT:
text->autohint = g_value_get_boolean (value);
break;
case PROP_ANTIALIAS:
text->antialias = g_value_get_boolean (value);
break;
case PROP_HINT_STYLE:
text->hint_style = g_value_get_enum (value);
break;
case PROP_KERNING:
text->kerning = g_value_get_boolean (value);
break;
......@@ -451,6 +453,11 @@ gimp_text_set_property (GObject *object,
case PROP_BORDER:
text->border = g_value_get_int (value);
break;
case PROP_HINTING:
text->hint_style = (g_value_get_boolean (value) ?
GIMP_TEXT_HINT_STYLE_MEDIUM :
GIMP_TEXT_HINT_STYLE_NONE);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
......
......@@ -45,9 +45,8 @@ struct _GimpText
gchar *font;
GimpUnit unit;
gdouble font_size;
gboolean hinting;
gboolean autohint;
gboolean antialias;
GimpTextHintStyle hint_style;
gboolean kerning;
gchar *language;
GimpTextDirection base_dir;
......
......@@ -208,16 +208,24 @@ gimp_text_layout_render_flags (GimpTextLayout *layout)
CAIRO_ANTIALIAS_DEFAULT :
CAIRO_ANTIALIAS_NONE));
/*
* FIXME:
*
* The autohint property can't be supported any longer, but we
* should expose the cairo_hint_style_t enum.
*/
cairo_font_options_set_hint_style (flags, (text->hinting ?
CAIRO_HINT_STYLE_DEFAULT :
CAIRO_HINT_STYLE_NONE));
switch (text->hint_style)
{
case GIMP_TEXT_HINT_STYLE_NONE:
cairo_font_options_set_hint_style (flags, CAIRO_HINT_STYLE_NONE);
break;
case GIMP_TEXT_HINT_STYLE_SLIGHT:
cairo_font_options_set_hint_style (flags, CAIRO_HINT_STYLE_SLIGHT);
break;
case GIMP_TEXT_HINT_STYLE_MEDIUM:
cairo_font_options_set_hint_style (flags, CAIRO_HINT_STYLE_MEDIUM);
break;
case GIMP_TEXT_HINT_STYLE_FULL:
cairo_font_options_set_hint_style (flags, CAIRO_HINT_STYLE_FULL);
break;
}
return flags;
}
......
......@@ -53,9 +53,8 @@ enum
PROP_0 = GIMP_RECTANGLE_OPTIONS_PROP_LAST + 1,
PROP_FONT_SIZE,
PROP_UNIT,
PROP_HINTING,
PROP_AUTOHINT,
PROP_ANTIALIAS,
PROP_HINT_STYLE,
PROP_LANGUAGE,
PROP_BASE_DIR,
PROP_JUSTIFICATION,
......@@ -123,24 +122,18 @@ gimp_text_options_class_init (GimpTextOptionsClass *klass)
"font-size", NULL,
0.0, 8192.0, 18.0,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_HINTING,
"hinting",
N_("Hinting alters the font outline to "
"produce a crisp bitmap at small "
"sizes"),
TRUE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_AUTOHINT,
"autohint",
N_("If available, hints from the font are "
"used but you may prefer to always use "
"the automatic hinter"),
FALSE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_ANTIALIAS,
"antialias", NULL,
TRUE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_HINT_STYLE,
"hint-style",
N_("Hinting alters the font outline to "
"produce a crisp bitmap at small "
"sizes"),
GIMP_TYPE_TEXT_HINT_STYLE,
GIMP_TEXT_HINT_STYLE_MEDIUM,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_STRING (object_class, PROP_LANGUAGE,
"language", NULL,
(const gchar *) gtk_get_default_language (),
......@@ -220,15 +213,12 @@ gimp_text_options_get_property (GObject *object,
case PROP_UNIT:
g_value_set_int (value, options->unit);
break;
case PROP_HINTING:
g_value_set_boolean (value, options->hinting);
break;
case PROP_AUTOHINT:
g_value_set_boolean (value, options->autohint);
break;
case PROP_ANTIALIAS:
g_value_set_boolean (value, options->antialias);
break;
case PROP_HINT_STYLE:
g_value_set_enum (value, options->hint_style);
break;
case PROP_LANGUAGE:
g_value_set_string (value, options->language);
break;
......@@ -281,15 +271,12 @@ gimp_text_options_set_property (GObject *object,
case PROP_UNIT:
options->unit = g_value_get_int (value);
break;
case PROP_HINTING:
options->hinting = g_value_get_boolean (value);
break;
case PROP_AUTOHINT:
options->autohint = g_value_get_boolean (value);
break;
case PROP_ANTIALIAS:
options->antialias = g_value_get_boolean (value);
break;
case PROP_HINT_STYLE:
options->hint_style = g_value_get_enum (value);
break;
case PROP_BASE_DIR:
options->base_dir = g_value_get_enum (value);
break;
......@@ -442,7 +429,6 @@ gimp_text_options_gui (GimpToolOptions *tool_options)
GtkWidget *vbox;
GtkWidget *hbox;
GtkWidget *button;
GtkWidget *auto_button;
GtkWidget *entry;
GtkWidget *box;
GtkWidget *spinbutton;
......@@ -478,23 +464,11 @@ gimp_text_options_gui (GimpToolOptions *tool_options)
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
gtk_widget_show (button);
button = gimp_prop_check_button_new (config, "hinting", _("Hinting"));
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
gtk_widget_show (button);
auto_button = gimp_prop_check_button_new (config, "autohint",
_("Force auto-hinter"));
gtk_box_pack_start (GTK_BOX (vbox), auto_button, FALSE, FALSE, 0);
gtk_widget_show (auto_button);
gtk_widget_set_sensitive (auto_button, options->hinting);
g_object_set_data (G_OBJECT (button), "set_sensitive", auto_button);
button = gimp_prop_check_button_new (config, "antialias", _("Antialiasing"));
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
gtk_widget_show (button);
table = gtk_table_new (5, 3, FALSE);
table = gtk_table_new (6, 3, FALSE);
gtk_table_set_col_spacings (GTK_TABLE (table), 2);
gtk_table_set_row_spacings (GTK_TABLE (table), 2);
gtk_box_pack_start (GTK_BOX (main_vbox), table, FALSE, FALSE, 0);
......@@ -504,6 +478,12 @@ gimp_text_options_gui (GimpToolOptions *tool_options)
size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
button = gimp_prop_enum_combo_box_new (config, "hint-style", -1, -1);
gimp_table_attach_aligned (GTK_TABLE (table), 0, row++,
_("Hinting:"), 0.0, 0.5,
button, 1, TRUE);
gtk_size_group_add_widget (size_group, button);
button = gimp_prop_color_button_new (config, "foreground", _("Text Color"),
40, 24, GIMP_COLOR_AREA_FLAT);
gimp_color_panel_set_context (GIMP_COLOR_PANEL (button),
......
......@@ -40,9 +40,8 @@ struct _GimpTextOptions
GimpUnit unit;
gdouble font_size;
gboolean hinting;
gboolean autohint;
gboolean antialias;
GimpTextHintStyle hint_style;
gchar *language;
GimpTextDirection base_dir;
GimpTextJustification justify;
......
......@@ -48,6 +48,7 @@ static const GimpGetTypeFunc get_type_funcs[] =
gimp_size_type_get_type,
gimp_stack_trace_mode_get_type,
gimp_text_direction_get_type,
gimp_text_hint_style_get_type,
gimp_text_justification_get_type,
gimp_transfer_mode_get_type,
gimp_transform_direction_get_type,
......@@ -103,6 +104,7 @@ static const gchar * const type_names[] =
"GimpSizeType",
"GimpStackTraceMode",
"GimpTextDirection",
"GimpTextHintStyle",
"GimpTextJustification",
"GimpTransferMode",
"GimpTransformDirection",
......
......@@ -24,6 +24,9 @@
#include "config.h"
#include "gimp.h"
#undef GIMP_DISABLE_DEPRECATED
#undef __GIMP_TEXT_LAYER_PDB_H__
#include "gimptextlayer_pdb.h"
/**
* gimp_text_layer_new:
......@@ -284,73 +287,64 @@ gimp_text_layer_set_font_size (gint32 layer_ID,
}
/**
* gimp_text_layer_get_hinting:
* gimp_text_layer_get_antialias:
* @layer_ID: The text layer.
* @autohint: A flag which is true if the text layer is forced to use the autohinter from FreeType.
*
* Get information about hinting in the specified text layer.
* Check if antialiasing is used in the text layer.
*
* This procedure provides information about the hinting that is being
* used in a text layer.
* This procedure checks if antialiasing is enabled in the specified
* text layer.
*
* Returns: A flag which is true if hinting is used on the font.
* Returns: A flag which is true if antialiasing is used for rendering the font in the text layer.
*
* Since: GIMP 2.6
*/
gboolean
gimp_text_layer_get_hinting (gint32 layer_ID,
gboolean *autohint)
gimp_text_layer_get_antialias (gint32 layer_ID)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean hinting = FALSE;
gboolean antialias = FALSE;
return_vals = gimp_run_procedure ("gimp-text-layer-get-hinting",
return_vals = gimp_run_procedure ("gimp-text-layer-get-antialias",
&nreturn_vals,
GIMP_PDB_LAYER, layer_ID,
GIMP_PDB_END);
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
{
hinting = return_vals[1].data.d_int32;
*autohint = return_vals[2].data.d_int32;
}
antialias = return_vals[1].data.d_int32;
gimp_destroy_params (return_vals, nreturn_vals);
return hinting;
return antialias;
}
/**
* gimp_text_layer_set_hinting:
* gimp_text_layer_set_antialias:
* @layer_ID: The text layer.
* @hinting: Enable/disable the use of hinting on the text.
* @autohint: Force the use of the autohinter provided through FreeType.
* @antialias: Enable/disable antialiasing of the text.
*
* Enable/disable the use of hinting in a text layer.
* Enable/disable anti-aliasing in a text layer.
*
* This procedure enables or disables hinting on the text of a text
* layer. If you enable 'auto-hint', FreeType\'s automatic hinter will
* be used and hinting information from the font will be ignored.
* This procedure enables or disables anti-aliasing of the text in a
* text layer.
*
* Returns: TRUE on success.
*
* Since: GIMP 2.6
*/
gboolean
gimp_text_layer_set_hinting (gint32 layer_ID,
gboolean hinting,
gboolean autohint)
gimp_text_layer_set_antialias (gint32 layer_ID,
gboolean antialias)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp-text-layer-set-hinting",
return_vals = gimp_run_procedure ("gimp-text-layer-set-antialias",
&nreturn_vals,
GIMP_PDB_LAYER, layer_ID,
GIMP_PDB_INT32, hinting,
GIMP_PDB_INT32, autohint,
GIMP_PDB_INT32, antialias,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
......@@ -361,64 +355,66 @@ gimp_text_layer_set_hinting (gint32 layer_ID,
}
/**
* gimp_text_layer_get_antialias:
* gimp_text_layer_get_hint_style:
* @layer_ID: The text layer.
*
* Check if antialiasing is used in the text layer.
* Get information about hinting in the specified text layer.
*
* This procedure checks if antialiasing is enabled in the specified
* text layer.
* This procedure provides information about the hinting that is being
* used in a text layer. Hinting can be optimized for fidelity or
* contrast or it can be turned entirely off.
*
* Returns: A flag which is true if antialiasing is used for rendering the font in the text layer.
* Returns: The hint style used for font outlines.
*
* Since: GIMP 2.6
* Since: GIMP 2.8
*/
gboolean
gimp_text_layer_get_antialias (gint32 layer_ID)
GimpTextHintStyle
gimp_text_layer_get_hint_style (gint32 layer_ID)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean antialias = FALSE;
GimpTextHintStyle style = 0;
return_vals = gimp_run_procedure ("gimp-text-layer-get-antialias",
return_vals = gimp_run_procedure ("gimp-text-layer-get-hint-style",
&nreturn_vals,
GIMP_PDB_LAYER, layer_ID,
GIMP_PDB_END);
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
antialias = return_vals[1].data.d_int32;
style = return_vals[1].data.d_int32;
gimp_destroy_params (return_vals, nreturn_vals);
return antialias;
return style;
}
/**
* gimp_text_layer_set_antialias:
* gimp_text_layer_set_hint_style:
* @layer_ID: The text layer.
* @antialias: Enable/disable antialiasing of the text.
* @style: The new hint style.
*
* Enable/disable anti-aliasing in a text layer.
* Control how font outlines are hinted in a text layer.
*
* This procedure enables or disables anti-aliasing of the text in a
* text layer.
* This procedure sets the hint style for font outlines in a text
* layer. This controls whether to fit font outlines to the pixel grid,
* and if so, whether to optimize for fidelity or contrast.
*
* Returns: TRUE on success.
*
* Since: GIMP 2.6
* Since: GIMP 2.8
*/
gboolean
gimp_text_layer_set_antialias (gint32 layer_ID,
gboolean antialias)
gimp_text_layer_set_hint_style (gint32 layer_ID,
GimpTextHintStyle style)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp-text-layer-set-antialias",
return_vals = gimp_run_procedure ("gimp-text-layer-set-hint-style",
&nreturn_vals,
GIMP_PDB_LAYER, layer_ID,
GIMP_PDB_INT32, antialias,
GIMP_PDB_INT32, style,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
......@@ -972,3 +968,73 @@ gimp_text_layer_set_letter_spacing (gint32 layer_ID,
return success;
}
/**
* gimp_text_layer_get_hinting:
* @layer_ID: The text layer.
* @autohint: A flag which is true if the text layer is forced to use the autohinter from FreeType.
*
* This procedure is deprecated! Use gimp_text_layer_get_hint_style()
* instead.
*
* Returns: A flag which is true if hinting is used on the font.
*/
gboolean
gimp_text_layer_get_hinting (gint32 layer_ID,
gboolean *autohint)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean hinting = FALSE;
return_vals = gimp_run_procedure ("gimp-text-layer-get-hinting",
&nreturn_vals,
GIMP_PDB_LAYER, layer_ID,
GIMP_PDB_END);
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
{
hinting = return_vals[1].data.d_int32;
*autohint = return_vals[2].data.d_int32;
}
gimp_destroy_params (return_vals, nreturn_vals);
return hinting;
}
/**
* gimp_text_layer_set_hinting:
* @layer_ID: The text layer.
* @hinting: Enable/disable the use of hinting on the text.
* @autohint: Force the use of the autohinter provided through FreeType.
*
* This procedure is deprecated! Use gimp_text_layer_set_hint_style()
* instead.
*
* Returns: TRUE on success.
*
* Since: GIMP 2.6
*/
gboolean
gimp_text_layer_set_hinting (gint32 layer_ID,
gboolean hinting,
gboolean autohint)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp-text-layer-set-hinting",
&nreturn_vals,
GIMP_PDB_LAYER, layer_ID,
GIMP_PDB_INT32, hinting,
GIMP_PDB_INT32, autohint,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
......@@ -45,14 +45,12 @@ gdouble gimp_text_layer_get_font_size (gint32
gboolean gimp_text_layer_set_font_size (gint32 layer_ID,
gdouble font_size,
GimpUnit unit);
gboolean gimp_text_layer_get_hinting (gint32 layer_ID,
gboolean *autohint);
gboolean gimp_text_layer_set_hinting (gint32 layer_ID,
gboolean hinting,
gboolean autohint);
gboolean gimp_text_layer_get_antialias (gint32 layer_ID);
gboolean gimp_text_layer_set_antialias (gint32 layer_ID,
gboolean antialias);
GimpTextHintStyle gimp_text_layer_get_hint_style (gint32 layer_ID);
gboolean gimp_text_layer_set_hint_style (gint32 layer_ID,
GimpTextHintStyle style);
gboolean gimp_text_layer_get_kerning (gint32 layer_ID);
gboolean gimp_text_layer_set_kerning (gint32 layer_ID,
gboolean kerning);
......@@ -78,6 +76,13 @@ gboolean gimp_text_layer_set_line_spacing (gint32
gdouble gimp_text_layer_get_letter_spacing (gint32 layer_ID);
gboolean gimp_text_layer_set_letter_spacing (gint32 layer_ID,
gdouble letter_spacing);
#ifndef GIMP_DISABLE_DEPRECATED
gboolean gimp_text_layer_get_hinting (gint32 layer_ID,
gboolean *autohint);
gboolean gimp_text_layer_set_hinting (gint32 layer_ID,
gboolean hinting,
gboolean autohint);
#endif /* GIMP_DISABLE_DEPRECATED */
G_END_DECLS
......
......@@ -621,7 +621,7 @@ gimp_repeat_mode_get_type (void)
static const GimpEnumDesc descs[] =
{
{ GIMP_REPEAT_NONE, N_("None"), NULL },
{ GIMP_REPEAT_NONE, N_("repeat|None"), NULL },
{ GIMP_REPEAT_SAWTOOTH, N_("Sawtooth wave"), NULL },
{ GIMP_REPEAT_TRIANGULAR, N_("Triangular wave"), NULL },
{ 0, NULL, NULL }
......@@ -1088,6 +1088,39 @@ gimp_text_direction_get_type (void)
return type;
}
GType
gimp_text_hint_style_get_type (void)
{
static const GEnumValue values[] =
{
{ GIMP_TEXT_HINT_STYLE_NONE, "GIMP_TEXT_HINT_STYLE_NONE", "none" },
{ GIMP_TEXT_HINT_STYLE_SLIGHT, "GIMP_TEXT_HINT_STYLE_SLIGHT", "slight" },
{ GIMP_TEXT_HINT_STYLE_MEDIUM, "GIMP_TEXT_HINT_STYLE_MEDIUM", "medium" },
{ GIMP_TEXT_HINT_STYLE_FULL, "GIMP_TEXT_HINT_STYLE_FULL", "full" },
{ 0, NULL, NULL }
};
static const GimpEnumDesc descs[] =
{
{ GIMP_TEXT_HINT_STYLE_NONE, N_("hinting|None"), NULL },
{ GIMP_TEXT_HINT_STYLE_SLIGHT, N_("hinting|Slight"), NULL },
{ GIMP_TEXT_HINT_STYLE_MEDIUM, N_("hinting|Medium"), NULL },
{ GIMP_TEXT_HINT_STYLE_FULL, N_("hinting|Full"), NULL },
{ 0, NULL, NULL }
};
static GType type = 0;
if (! type)
{
type = g_enum_register_static ("GimpTextHintStyle", values);
gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
gimp_enum_set_value_descriptions (type, descs);
}
return type;
}
GType
gimp_text_justification_get_type (void)
{
......
</
......@@ -269,7 +269,7 @@ GType gimp_repeat_mode_get_type (void) G_GNUC_CONST;
typedef enum
{
GIMP_REPEAT_NONE, /*< desc="None" >*/
GIMP_REPEAT_NONE, /*< desc="repeat|None" >*/
GIMP_REPEAT_SAWTOOTH, /*< desc="Sawtooth wave" >*/
GIMP_REPEAT_TRIANGULAR /*< desc="Triangular wave" >*/
} GimpRepeatMode;
......@@ -473,6 +473,19 @@ typedef enum
} GimpTextDirection;
#define GIMP_TYPE_TEXT_HINT_STYLE (gimp_text_hint_style_get_type ())
GType gimp_text_hint_style_get_type (void) G_GNUC_CONST;
typedef enum
{
GIMP_TEXT_HINT_STYLE_NONE, /*< desc="hinting|None" >*/
GIMP_TEXT_HINT_STYLE_SLIGHT, /*< desc="hinting|Slight" >*/
GIMP_TEXT_HINT_STYLE_MEDIUM, /*< desc="hinting|Medium" >*/
GIMP_TEXT_HINT_STYLE_FULL, /*< desc="hinting|Full" >*/
} GimpTextHintStyle;
#define GIMP_TYPE_TEXT_JUSTIFICATION (gimp_text_justification_get_type ())