summaryrefslogtreecommitdiff
path: root/pango/pango-attributes.h
diff options
context:
space:
mode:
Diffstat (limited to 'pango/pango-attributes.h')
-rw-r--r--pango/pango-attributes.h538
1 files changed, 138 insertions, 400 deletions
diff --git a/pango/pango-attributes.h b/pango/pango-attributes.h
index 9b679e95..0dc9146d 100644
--- a/pango/pango-attributes.h
+++ b/pango/pango-attributes.h
@@ -19,80 +19,60 @@
* Boston, MA 02111-1307, USA.
*/
-#ifndef __PANGO_ATTRIBUTES_H__
-#define __PANGO_ATTRIBUTES_H__
+#pragma once
#include <pango/pango-font.h>
#include <pango/pango-color.h>
-#include <glib-object.h>
+#include <pango/pango-attr.h>
G_BEGIN_DECLS
-typedef struct _PangoAttribute PangoAttribute;
-typedef struct _PangoAttrClass PangoAttrClass;
-
-typedef enum
-{
- PANGO_ATTR_VALUE_STRING,
- PANGO_ATTR_VALUE_INT,
- PANGO_ATTR_VALUE_BOOLEAN,
- PANGO_ATTR_VALUE_FLOAT,
- PANGO_ATTR_VALUE_COLOR,
- PANGO_ATTR_VALUE_LANGUAGE,
- PANGO_ATTR_VALUE_FONT_DESC,
- PANGO_ATTR_VALUE_POINTER
-} PangoAttrValueType;
-
#define PANGO_ATTR_TYPE(value) (PANGO_ATTR_VALUE_##value | (__COUNTER__ << 8))
-#define PANGO_ATTR_TYPE_VALUE_TYPE(type) ((PangoAttrValueType)((type) & 0xff))
-#define PANGO_ATTR_VALUE_TYPE(attr) PANGO_ATTR_TYPE_VALUE_TYPE ((attr)->type)
-
/**
* PangoAttrType:
* @PANGO_ATTR_INVALID: does not happen
- * @PANGO_ATTR_LANGUAGE: language ([struct@Pango.AttrLanguage])
- * @PANGO_ATTR_FAMILY: font family name list ([struct@Pango.AttrString])
- * @PANGO_ATTR_STYLE: font slant style ([struct@Pango.AttrInt])
- * @PANGO_ATTR_WEIGHT: font weight ([struct@Pango.AttrInt])
- * @PANGO_ATTR_VARIANT: font variant (normal or small caps) ([struct@Pango.AttrInt])
- * @PANGO_ATTR_STRETCH: font stretch ([struct@Pango.AttrInt])
- * @PANGO_ATTR_SIZE: font size in points scaled by %PANGO_SCALE ([struct@Pango.AttrInt])
- * @PANGO_ATTR_FONT_DESC: font description ([struct@Pango.AttrFontDesc])
- * @PANGO_ATTR_FOREGROUND: foreground color ([struct@Pango.AttrColor])
- * @PANGO_ATTR_BACKGROUND: background color ([struct@Pango.AttrColor])
- * @PANGO_ATTR_UNDERLINE: whether the text has an underline ([struct@Pango.AttrInt])
- * @PANGO_ATTR_STRIKETHROUGH: whether the text is struck-through ([struct@Pango.AttrInt])
- * @PANGO_ATTR_RISE: baseline displacement ([struct@Pango.AttrInt])
- * @PANGO_ATTR_SCALE: font size scale factor ([struct@Pango.AttrFloat])
- * @PANGO_ATTR_FALLBACK: whether fallback is enabled ([struct@Pango.AttrInt])
- * @PANGO_ATTR_LETTER_SPACING: letter spacing ([struct@PangoAttrInt])
- * @PANGO_ATTR_UNDERLINE_COLOR: underline color ([struct@Pango.AttrColor])
- * @PANGO_ATTR_STRIKETHROUGH_COLOR: strikethrough color ([struct@Pango.AttrColor])
- * @PANGO_ATTR_ABSOLUTE_SIZE: font size in pixels scaled by %PANGO_SCALE ([struct@Pango.AttrInt])
- * @PANGO_ATTR_GRAVITY: base text gravity ([struct@Pango.AttrInt])
- * @PANGO_ATTR_GRAVITY_HINT: gravity hint ([struct@Pango.AttrInt])
- * @PANGO_ATTR_FONT_FEATURES: OpenType font features ([struct@Pango.AttrFontFeatures]). Since 1.38
- * @PANGO_ATTR_FOREGROUND_ALPHA: foreground alpha ([struct@Pango.AttrInt]). Since 1.38
- * @PANGO_ATTR_BACKGROUND_ALPHA: background alpha ([struct@Pango.AttrInt]). Since 1.38
- * @PANGO_ATTR_ALLOW_BREAKS: whether breaks are allowed ([struct@Pango.AttrInt]). Since 1.44
- * @PANGO_ATTR_SHOW: how to render invisible characters ([struct@Pango.AttrInt]). Since 1.44
- * @PANGO_ATTR_INSERT_HYPHENS: whether to insert hyphens at intra-word line breaks ([struct@Pango.AttrInt]). Since 1.44
- * @PANGO_ATTR_OVERLINE: whether the text has an overline ([struct@Pango.AttrInt]). Since 1.46
- * @PANGO_ATTR_OVERLINE_COLOR: overline color ([struct@Pango.AttrColor]). Since 1.46
- * @PANGO_ATTR_LINE_HEIGHT: line height factor ([struct@Pango.AttrFloat]). Since: 1.50
- * @PANGO_ATTR_ABSOLUTE_LINE_HEIGHT: line height ([struct@Pango.AttrInt]). Since: 1.50
- * @PANGO_ATTR_WORD: override segmentation to classify the range of the attribute as a single word ([struct@Pango.AttrInt]). Since 1.50
- * @PANGO_ATTR_SENTENCE: override segmentation to classify the range of the attribute as a single sentence ([struct@Pango.AttrInt]). Since 1.50
- * @PANGO_ATTR_BASELINE_SHIFT: baseline displacement ([struct@Pango.AttrInt]). Since 1.50
- * @PANGO_ATTR_FONT_SCALE: font-relative size change ([struct@Pango.AttrInt]). Since 1.50
- *
- * The `PangoAttrType` distinguishes between different types of attributes.
+ * @PANGO_ATTR_LANGUAGE: language
+ * @PANGO_ATTR_FAMILY: font family name
+ * @PANGO_ATTR_STYLE: font style
+ * @PANGO_ATTR_WEIGHT: font weight
+ * @PANGO_ATTR_VARIANT: font variant
+ * @PANGO_ATTR_STRETCH: font stretch
+ * @PANGO_ATTR_SIZE: font size in points scaled by `PANGO_SCALE`
+ * @PANGO_ATTR_FONT_DESC: font description
+ * @PANGO_ATTR_FOREGROUND: foreground color
+ * @PANGO_ATTR_BACKGROUND: background color
+ * @PANGO_ATTR_UNDERLINE: whether the text has an underline
+ * @PANGO_ATTR_STRIKETHROUGH: whether the text is struck-through
+ * @PANGO_ATTR_RISE: baseline displacement
+ * @PANGO_ATTR_SCALE: font size scale factor
+ * @PANGO_ATTR_FALLBACK: whether font fallback is enabled
+ * @PANGO_ATTR_LETTER_SPACING: letter spacing in Pango units
+ * @PANGO_ATTR_UNDERLINE_COLOR: underline color
+ * @PANGO_ATTR_STRIKETHROUGH_COLOR: strikethrough color
+ * @PANGO_ATTR_ABSOLUTE_SIZE: font size in pixels scaled by `PANGO_SCALE`
+ * @PANGO_ATTR_GRAVITY: base text gravity
+ * @PANGO_ATTR_GRAVITY_HINT: gravity hint
+ * @PANGO_ATTR_FONT_FEATURES: OpenType font features
+ * @PANGO_ATTR_FOREGROUND_ALPHA: foreground alpha
+ * @PANGO_ATTR_BACKGROUND_ALPHA: background alpha
+ * @PANGO_ATTR_ALLOW_BREAKS: whether line breaks are allowed
+ * @PANGO_ATTR_SHOW: how to render invisible characters
+ * @PANGO_ATTR_INSERT_HYPHENS: whether to insert hyphens at intra-word line breaks
+ * @PANGO_ATTR_OVERLINE: whether the text has an overline
+ * @PANGO_ATTR_OVERLINE_COLOR: overline color
+ * @PANGO_ATTR_LINE_HEIGHT: line height factor
+ * @PANGO_ATTR_ABSOLUTE_LINE_HEIGHT: line height in Pango units
+ * @PANGO_ATTR_WORD: mark the range of the attribute as a single word
+ * @PANGO_ATTR_SENTENCE: mark the range of the attribute as a single sentence
+ * @PANGO_ATTR_BASELINE_SHIFT: baseline displacement
+ * @PANGO_ATTR_FONT_SCALE: font-relative size change
+ *
+ * The `PangoAttrType` enumeration contains predefined types for attributes.
*
* Along with the predefined values, it is possible to allocate additional
* values for custom attributes using [func@AttrType.register]. The predefined
- * values are given below. The type of structure used to store the attribute is
- * listed in parentheses after the description.
+ * values are given below.
*/
typedef enum
{
@@ -137,6 +117,34 @@ typedef enum
#undef PANGO_ATTR_TYPE
+
+PANGO_AVAILABLE_IN_ALL
+PangoAttribute * pango_attr_language_new (PangoLanguage *language);
+PANGO_AVAILABLE_IN_ALL
+PangoAttribute * pango_attr_family_new (const char *family);
+PANGO_AVAILABLE_IN_ALL
+PangoAttribute * pango_attr_foreground_new (guint16 red,
+ guint16 green,
+ guint16 blue);
+PANGO_AVAILABLE_IN_ALL
+PangoAttribute * pango_attr_background_new (guint16 red,
+ guint16 green,
+ guint16 blue);
+PANGO_AVAILABLE_IN_ALL
+PangoAttribute * pango_attr_size_new (int size);
+PANGO_AVAILABLE_IN_1_8
+PangoAttribute * pango_attr_size_new_absolute (int size);
+PANGO_AVAILABLE_IN_ALL
+PangoAttribute * pango_attr_style_new (PangoStyle style);
+PANGO_AVAILABLE_IN_ALL
+PangoAttribute * pango_attr_weight_new (PangoWeight weight);
+PANGO_AVAILABLE_IN_ALL
+PangoAttribute * pango_attr_variant_new (PangoVariant variant);
+PANGO_AVAILABLE_IN_ALL
+PangoAttribute * pango_attr_stretch_new (PangoStretch stretch);
+PANGO_AVAILABLE_IN_ALL
+PangoAttribute * pango_attr_font_desc_new (const PangoFontDescription *desc);
+
/**
* PangoUnderline:
* @PANGO_UNDERLINE_NONE: no underline should be drawn
@@ -180,61 +188,20 @@ typedef enum {
PANGO_UNDERLINE_ERROR_LINE
} PangoUnderline;
-
-/**
- * PangoOverline:
- * @PANGO_OVERLINE_NONE: no overline should be drawn
- * @PANGO_OVERLINE_SINGLE: Draw a single line above the ink
- * extents of the text being underlined.
- *
- * The `PangoOverline` enumeration is used to specify whether text
- * should be overlined, and if so, the type of line.
- *
- * Since: 1.46
- */
-typedef enum {
- PANGO_OVERLINE_NONE,
- PANGO_OVERLINE_SINGLE
-} PangoOverline;
-
-/**
- * PangoShowFlags:
- * @PANGO_SHOW_NONE: No special treatment for invisible characters
- * @PANGO_SHOW_SPACES: Render spaces, tabs and newlines visibly
- * @PANGO_SHOW_LINE_BREAKS: Render line breaks visibly
- * @PANGO_SHOW_IGNORABLES: Render default-ignorable Unicode
- * characters visibly
- *
- * These flags affect how Pango treats characters that are normally
- * not visible in the output.
- *
- * Since: 1.44
- */
-typedef enum {
- PANGO_SHOW_NONE = 0,
- PANGO_SHOW_SPACES = 1 << 0,
- PANGO_SHOW_LINE_BREAKS = 1 << 1,
- PANGO_SHOW_IGNORABLES = 1 << 2
-} PangoShowFlags;
-
-/**
- * PangoTextTransform:
- * @PANGO_TEXT_TRANSFORM_NONE: Leave text unchanged
- * @PANGO_TEXT_TRANSFORM_LOWERCASE: Display letters and numbers as lowercase
- * @PANGO_TEXT_TRANSFORM_UPPERCASE: Display letters and numbers as uppercase
- * @PANGO_TEXT_TRANSFORM_CAPITALIZE: Display the first character of a word
- * in titlecase
- *
- * An enumeration that affects how Pango treats characters during shaping.
- *
- * Since: 1.50
- */
-typedef enum {
- PANGO_TEXT_TRANSFORM_NONE,
- PANGO_TEXT_TRANSFORM_LOWERCASE,
- PANGO_TEXT_TRANSFORM_UPPERCASE,
- PANGO_TEXT_TRANSFORM_CAPITALIZE,
-} PangoTextTransform;
+PANGO_AVAILABLE_IN_ALL
+PangoAttribute * pango_attr_underline_new (PangoUnderline underline);
+PANGO_AVAILABLE_IN_1_8
+PangoAttribute * pango_attr_underline_color_new (guint16 red,
+ guint16 green,
+ guint16 blue);
+PANGO_AVAILABLE_IN_ALL
+PangoAttribute * pango_attr_strikethrough_new (gboolean strikethrough);
+PANGO_AVAILABLE_IN_1_8
+PangoAttribute * pango_attr_strikethrough_color_new (guint16 red,
+ guint16 green,
+ guint16 blue);
+PANGO_AVAILABLE_IN_ALL
+PangoAttribute * pango_attr_rise_new (int rise);
/**
* PangoBaselineShift:
@@ -254,6 +221,9 @@ typedef enum {
PANGO_BASELINE_SHIFT_SUBSCRIPT,
} PangoBaselineShift;
+PANGO_AVAILABLE_IN_1_50
+PangoAttribute * pango_attr_baseline_shift_new (int shift);
+
/**
* PangoFontScale:
* @PANGO_FONT_SCALE_NONE: Leave the font size unchanged
@@ -273,147 +243,6 @@ typedef enum {
PANGO_FONT_SCALE_SMALL_CAPS,
} PangoFontScale;
-/**
- * PANGO_ATTR_INDEX_FROM_TEXT_BEGINNING:
- *
- * Value for @start_index in `PangoAttribute` that indicates
- * the beginning of the text.
- *
- * Since: 1.24
- */
-#define PANGO_ATTR_INDEX_FROM_TEXT_BEGINNING ((guint)0)
-
-/**
- * PANGO_ATTR_INDEX_TO_TEXT_END: (value 4294967295)
- *
- * Value for @end_index in `PangoAttribute` that indicates
- * the end of the text.
- *
- * Since: 1.24
- */
-#define PANGO_ATTR_INDEX_TO_TEXT_END ((guint)(G_MAXUINT + 0))
-
-/**
- * PangoAttribute:
- * @klass: the class structure holding information about the type of the attribute
- * @start_index: the start index of the range (in bytes).
- * @end_index: end index of the range (in bytes). The character at this index
- * is not included in the range.
- *
- * The `PangoAttribute` structure represents the common portions of all
- * attributes.
- *
- * Particular types of attributes include this structure as their initial
- * portion. The common portion of the attribute holds the range to which
- * the value in the type-specific part of the attribute applies and should
- * be initialized using [method@Pango.Attribute.init]. By default, an attribute
- * will have an all-inclusive range of [0,%G_MAXUINT].
- */
-struct _PangoAttribute
-{
- PangoAttrType type;
- guint start_index;
- guint end_index;
- union {
- char *str_value;
- int int_value;
- gboolean boolean_value;
- double double_value;
- PangoColor color_value;
- PangoLanguage *lang_value;
- PangoFontDescription *font_value;
- gpointer pointer_value;
- };
-};
-
-
-/**
- * PangoAttrFilterFunc:
- * @attribute: a Pango attribute
- * @user_data: user data passed to the function
- *
- * Type of a function filtering a list of attributes.
- *
- * Return value: %TRUE if the attribute should be selected for
- * filtering, %FALSE otherwise.
- */
-typedef gboolean (*PangoAttrFilterFunc) (PangoAttribute *attribute,
- gpointer user_data);
-
-/**
- * PangoAttrDataCopyFunc:
- * @user_data: user data to copy
- *
- * Type of a function that can duplicate user data for an attribute.
- *
- * Return value: new copy of @user_data.
- **/
-typedef gpointer (*PangoAttrDataCopyFunc) (gconstpointer user_data);
-
-typedef char * (*PangoAttrDataSerializeFunc) (gconstpointer user_data);
-
-PANGO_AVAILABLE_IN_ALL
-GType pango_attribute_get_type (void) G_GNUC_CONST;
-
-PANGO_AVAILABLE_IN_ALL
-PangoAttrType pango_attr_type_register (PangoAttrDataCopyFunc copy,
- GDestroyNotify destroy,
- GEqualFunc equal,
- const char *name,
- PangoAttrDataSerializeFunc serialize);
-PANGO_AVAILABLE_IN_1_22
-const char * pango_attr_type_get_name (PangoAttrType type) G_GNUC_CONST;
-PANGO_AVAILABLE_IN_ALL
-PangoAttribute * pango_attribute_copy (const PangoAttribute *attr);
-PANGO_AVAILABLE_IN_ALL
-void pango_attribute_destroy (PangoAttribute *attr);
-PANGO_AVAILABLE_IN_ALL
-gboolean pango_attribute_equal (const PangoAttribute *attr1,
- const PangoAttribute *attr2) G_GNUC_PURE;
-
-PANGO_AVAILABLE_IN_ALL
-PangoAttribute * pango_attr_language_new (PangoLanguage *language);
-PANGO_AVAILABLE_IN_ALL
-PangoAttribute * pango_attr_family_new (const char *family);
-PANGO_AVAILABLE_IN_ALL
-PangoAttribute * pango_attr_foreground_new (guint16 red,
- guint16 green,
- guint16 blue);
-PANGO_AVAILABLE_IN_ALL
-PangoAttribute * pango_attr_background_new (guint16 red,
- guint16 green,
- guint16 blue);
-PANGO_AVAILABLE_IN_ALL
-PangoAttribute * pango_attr_size_new (int size);
-PANGO_AVAILABLE_IN_1_8
-PangoAttribute * pango_attr_size_new_absolute (int size);
-PANGO_AVAILABLE_IN_ALL
-PangoAttribute * pango_attr_style_new (PangoStyle style);
-PANGO_AVAILABLE_IN_ALL
-PangoAttribute * pango_attr_weight_new (PangoWeight weight);
-PANGO_AVAILABLE_IN_ALL
-PangoAttribute * pango_attr_variant_new (PangoVariant variant);
-PANGO_AVAILABLE_IN_ALL
-PangoAttribute * pango_attr_stretch_new (PangoStretch stretch);
-PANGO_AVAILABLE_IN_ALL
-PangoAttribute * pango_attr_font_desc_new (const PangoFontDescription *desc);
-
-PANGO_AVAILABLE_IN_ALL
-PangoAttribute * pango_attr_underline_new (PangoUnderline underline);
-PANGO_AVAILABLE_IN_1_8
-PangoAttribute * pango_attr_underline_color_new (guint16 red,
- guint16 green,
- guint16 blue);
-PANGO_AVAILABLE_IN_ALL
-PangoAttribute * pango_attr_strikethrough_new (gboolean strikethrough);
-PANGO_AVAILABLE_IN_1_8
-PangoAttribute * pango_attr_strikethrough_color_new (guint16 red,
- guint16 green,
- guint16 blue);
-PANGO_AVAILABLE_IN_ALL
-PangoAttribute * pango_attr_rise_new (int rise);
-PANGO_AVAILABLE_IN_1_50
-PangoAttribute * pango_attr_baseline_shift_new (int shift);
PANGO_AVAILABLE_IN_1_50
PangoAttribute * pango_attr_font_scale_new (PangoFontScale scale);
PANGO_AVAILABLE_IN_ALL
@@ -434,174 +263,83 @@ PANGO_AVAILABLE_IN_1_38
PangoAttribute * pango_attr_background_alpha_new (guint16 alpha);
PANGO_AVAILABLE_IN_1_44
PangoAttribute * pango_attr_allow_breaks_new (gboolean allow_breaks);
-
PANGO_AVAILABLE_IN_1_50
PangoAttribute * pango_attr_word_new (void);
PANGO_AVAILABLE_IN_1_50
PangoAttribute * pango_attr_sentence_new (void);
-
PANGO_AVAILABLE_IN_1_44
PangoAttribute * pango_attr_insert_hyphens_new (gboolean insert_hyphens);
+
+/**
+ * PangoOverline:
+ * @PANGO_OVERLINE_NONE: no overline should be drawn
+ * @PANGO_OVERLINE_SINGLE: Draw a single line above the ink
+ * extents of the text being underlined.
+ *
+ * The `PangoOverline` enumeration is used to specify whether text
+ * should be overlined, and if so, the type of line.
+ *
+ * Since: 1.46
+ */
+typedef enum {
+ PANGO_OVERLINE_NONE,
+ PANGO_OVERLINE_SINGLE
+} PangoOverline;
+
PANGO_AVAILABLE_IN_1_46
PangoAttribute * pango_attr_overline_new (PangoOverline overline);
PANGO_AVAILABLE_IN_1_46
PangoAttribute * pango_attr_overline_color_new (guint16 red,
guint16 green,
guint16 blue);
+
+/**
+ * PangoShowFlags:
+ * @PANGO_SHOW_NONE: No special treatment for invisible characters
+ * @PANGO_SHOW_SPACES: Render spaces, tabs and newlines visibly
+ * @PANGO_SHOW_LINE_BREAKS: Render line breaks visibly
+ * @PANGO_SHOW_IGNORABLES: Render default-ignorable Unicode
+ * characters visibly
+ *
+ * These flags affect how Pango treats characters that are normally
+ * not visible in the output.
+ *
+ * Since: 1.44
+ */
+typedef enum {
+ PANGO_SHOW_NONE = 0,
+ PANGO_SHOW_SPACES = 1 << 0,
+ PANGO_SHOW_LINE_BREAKS = 1 << 1,
+ PANGO_SHOW_IGNORABLES = 1 << 2
+} PangoShowFlags;
+
PANGO_AVAILABLE_IN_1_44
PangoAttribute * pango_attr_show_new (PangoShowFlags flags);
PANGO_AVAILABLE_IN_1_50
PangoAttribute * pango_attr_line_height_new (double factor);
PANGO_AVAILABLE_IN_1_50
PangoAttribute * pango_attr_line_height_new_absolute (int height);
-PANGO_AVAILABLE_IN_1_50
-PangoAttribute * pango_attr_text_transform_new (PangoTextTransform transform);
-PANGO_AVAILABLE_IN_1_52
-PangoAttribute * pango_attr_custom_new (PangoAttrType type,
- gpointer user_data);
-
-PANGO_AVAILABLE_IN_1_52
-gboolean pango_attribute_get_string (PangoAttribute *attribute,
- const char **value);
-PANGO_AVAILABLE_IN_1_52
-gboolean pango_attribute_get_language (PangoAttribute *attribute,
- PangoLanguage **value);
-PANGO_AVAILABLE_IN_1_52
-gboolean pango_attribute_get_int (PangoAttribute *attribute,
- int *value);
-PANGO_AVAILABLE_IN_1_52
-gboolean pango_attribute_get_boolean (PangoAttribute *attribute,
- gboolean *value);
-PANGO_AVAILABLE_IN_1_52
-gboolean pango_attribute_get_float (PangoAttribute *attribute,
- double *value);
-PANGO_AVAILABLE_IN_1_52
-gboolean pango_attribute_get_color (PangoAttribute *attribute,
- PangoColor *value);
-PANGO_AVAILABLE_IN_1_52
-gboolean pango_attribute_get_font_desc (PangoAttribute *attribute,
- PangoFontDescription **value);
-
-PANGO_AVAILABLE_IN_1_52
-gboolean pango_attribute_get_custom (PangoAttribute *attribute,
- gpointer *value);
-
-
-
-/* Attribute lists */
-
-typedef struct _PangoAttrList PangoAttrList;
-typedef struct _PangoAttrIterator PangoAttrIterator;
-
-#define PANGO_TYPE_ATTR_LIST pango_attr_list_get_type ()
/**
- * PangoAttrIterator:
- *
- * A `PangoAttrIterator` is used to iterate through a `PangoAttrList`.
- *
- * A new iterator is created with [method@Pango.AttrList.get_iterator].
- * Once the iterator is created, it can be advanced through the style
- * changes in the text using [method@Pango.AttrIterator.next]. At each
- * style change, the range of the current style segment and the attributes
- * currently in effect can be queried.
- */
-
-/**
- * PangoAttrList:
- *
- * A `PangoAttrList` represents a list of attributes that apply to a section
- * of text.
+ * PangoTextTransform:
+ * @PANGO_TEXT_TRANSFORM_NONE: Leave text unchanged
+ * @PANGO_TEXT_TRANSFORM_LOWERCASE: Display letters and numbers as lowercase
+ * @PANGO_TEXT_TRANSFORM_UPPERCASE: Display letters and numbers as uppercase
+ * @PANGO_TEXT_TRANSFORM_CAPITALIZE: Display the first character of a word
+ * in titlecase
*
- * The attributes in a `PangoAttrList` are, in general, allowed to overlap in
- * an arbitrary fashion. However, if the attributes are manipulated only through
- * [method@Pango.AttrList.change], the overlap between properties will meet
- * stricter criteria.
+ * An enumeration that affects how Pango treats characters during shaping.
*
- * Since the `PangoAttrList` structure is stored as a linear list, it is not
- * suitable for storing attributes for large amounts of text. In general, you
- * should not use a single `PangoAttrList` for more than one paragraph of text.
+ * Since: 1.50
*/
+typedef enum {
+ PANGO_TEXT_TRANSFORM_NONE,
+ PANGO_TEXT_TRANSFORM_LOWERCASE,
+ PANGO_TEXT_TRANSFORM_UPPERCASE,
+ PANGO_TEXT_TRANSFORM_CAPITALIZE,
+} PangoTextTransform;
-PANGO_AVAILABLE_IN_ALL
-GType pango_attr_list_get_type (void) G_GNUC_CONST;
-
-PANGO_AVAILABLE_IN_ALL
-PangoAttrList * pango_attr_list_new (void);
-PANGO_AVAILABLE_IN_1_10
-PangoAttrList * pango_attr_list_ref (PangoAttrList *list);
-PANGO_AVAILABLE_IN_ALL
-void pango_attr_list_unref (PangoAttrList *list);
-PANGO_AVAILABLE_IN_ALL
-PangoAttrList * pango_attr_list_copy (PangoAttrList *list);
-PANGO_AVAILABLE_IN_ALL
-void pango_attr_list_insert (PangoAttrList *list,
- PangoAttribute *attr);
-PANGO_AVAILABLE_IN_ALL
-void pango_attr_list_insert_before (PangoAttrList *list,
- PangoAttribute *attr);
-PANGO_AVAILABLE_IN_ALL
-void pango_attr_list_change (PangoAttrList *list,
- PangoAttribute *attr);
-PANGO_AVAILABLE_IN_ALL
-void pango_attr_list_splice (PangoAttrList *list,
- PangoAttrList *other,
- int pos,
- int len);
-PANGO_AVAILABLE_IN_1_44
-void pango_attr_list_update (PangoAttrList *list,
- int pos,
- int remove,
- int add);
-
-PANGO_AVAILABLE_IN_1_2
-PangoAttrList * pango_attr_list_filter (PangoAttrList *list,
- PangoAttrFilterFunc func,
- gpointer data);
-
-PANGO_AVAILABLE_IN_1_44
-GSList * pango_attr_list_get_attributes (PangoAttrList *list);
-
-PANGO_AVAILABLE_IN_1_46
-gboolean pango_attr_list_equal (PangoAttrList *list,
- PangoAttrList *other_list);
-
-PANGO_AVAILABLE_IN_1_50
-char * pango_attr_list_to_string (PangoAttrList *list);
PANGO_AVAILABLE_IN_1_50
-PangoAttrList * pango_attr_list_from_string (const char *text);
-
-PANGO_AVAILABLE_IN_1_44
-GType pango_attr_iterator_get_type (void) G_GNUC_CONST;
-
-PANGO_AVAILABLE_IN_ALL
-PangoAttrIterator * pango_attr_list_get_iterator (PangoAttrList *list);
-
-PANGO_AVAILABLE_IN_ALL
-void pango_attr_iterator_range (PangoAttrIterator *iterator,
- int *start,
- int *end);
-PANGO_AVAILABLE_IN_ALL
-gboolean pango_attr_iterator_next (PangoAttrIterator *iterator);
-PANGO_AVAILABLE_IN_ALL
-PangoAttrIterator * pango_attr_iterator_copy (PangoAttrIterator *iterator);
-PANGO_AVAILABLE_IN_ALL
-void pango_attr_iterator_destroy (PangoAttrIterator *iterator);
-PANGO_AVAILABLE_IN_ALL
-PangoAttribute * pango_attr_iterator_get (PangoAttrIterator *iterator,
- PangoAttrType type);
-PANGO_AVAILABLE_IN_ALL
-void pango_attr_iterator_get_font (PangoAttrIterator *iterator,
- PangoFontDescription *desc,
- PangoLanguage **language,
- GSList **extra_attrs);
-PANGO_AVAILABLE_IN_1_2
-GSList * pango_attr_iterator_get_attrs (PangoAttrIterator *iterator);
-
-G_DEFINE_AUTOPTR_CLEANUP_FUNC(PangoAttribute, pango_attribute_destroy)
-G_DEFINE_AUTOPTR_CLEANUP_FUNC(PangoAttrList, pango_attr_list_unref)
-G_DEFINE_AUTOPTR_CLEANUP_FUNC(PangoAttrIterator, pango_attr_iterator_destroy)
+PangoAttribute * pango_attr_text_transform_new (PangoTextTransform transform);
G_END_DECLS
-
-#endif /* __PANGO_ATTRIBUTES_H__ */