pango-attributes.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540
  1. /* Pango
  2. * pango-attributes.h: Attributed text
  3. *
  4. * Copyright (C) 2000 Red Hat Software
  5. *
  6. * This library is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Library General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 2 of the License, or (at your option) any later version.
  10. *
  11. * This library is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Library General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Library General Public
  17. * License along with this library; if not, write to the
  18. * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  19. * Boston, MA 02111-1307, USA.
  20. */
  21. #ifndef __PANGO_ATTRIBUTES_H__
  22. #define __PANGO_ATTRIBUTES_H__
  23. #include <pango/pango-font.h>
  24. #include <glib-object.h>
  25. G_BEGIN_DECLS
  26. /* PangoColor */
  27. typedef struct _PangoColor PangoColor;
  28. /**
  29. * PangoColor:
  30. * @red: value of red component
  31. * @green: value of green component
  32. * @blue: value of blue component
  33. *
  34. * The #PangoColor structure is used to
  35. * represent a color in an uncalibrated RGB color-space.
  36. */
  37. struct _PangoColor
  38. {
  39. guint16 red;
  40. guint16 green;
  41. guint16 blue;
  42. };
  43. /**
  44. * PANGO_TYPE_COLOR:
  45. *
  46. * The #GObject type for #PangoColor.
  47. */
  48. #define PANGO_TYPE_COLOR pango_color_get_type ()
  49. GType pango_color_get_type (void) G_GNUC_CONST;
  50. PangoColor *pango_color_copy (const PangoColor *src);
  51. void pango_color_free (PangoColor *color);
  52. gboolean pango_color_parse (PangoColor *color,
  53. const char *spec);
  54. gchar *pango_color_to_string(const PangoColor *color);
  55. /* Attributes */
  56. typedef struct _PangoAttribute PangoAttribute;
  57. typedef struct _PangoAttrClass PangoAttrClass;
  58. typedef struct _PangoAttrString PangoAttrString;
  59. typedef struct _PangoAttrLanguage PangoAttrLanguage;
  60. typedef struct _PangoAttrInt PangoAttrInt;
  61. typedef struct _PangoAttrSize PangoAttrSize;
  62. typedef struct _PangoAttrFloat PangoAttrFloat;
  63. typedef struct _PangoAttrColor PangoAttrColor;
  64. typedef struct _PangoAttrFontDesc PangoAttrFontDesc;
  65. typedef struct _PangoAttrShape PangoAttrShape;
  66. typedef struct _PangoAttrFontFeatures PangoAttrFontFeatures;
  67. /**
  68. * PANGO_TYPE_ATTR_LIST:
  69. *
  70. * The #GObject type for #PangoAttrList.
  71. */
  72. #define PANGO_TYPE_ATTR_LIST pango_attr_list_get_type ()
  73. /**
  74. * PangoAttrIterator:
  75. *
  76. * The #PangoAttrIterator structure is used to represent an
  77. * iterator through a #PangoAttrList. A new iterator is created
  78. * with pango_attr_list_get_iterator(). Once the iterator
  79. * is created, it can be advanced through the style changes
  80. * in the text using pango_attr_iterator_next(). At each
  81. * style change, the range of the current style segment and the
  82. * attributes currently in effect can be queried.
  83. */
  84. /**
  85. * PangoAttrList:
  86. *
  87. * The #PangoAttrList structure represents a list of attributes
  88. * that apply to a section of text. The attributes are, in general,
  89. * allowed to overlap in an arbitrary fashion, however, if the
  90. * attributes are manipulated only through pango_attr_list_change(),
  91. * the overlap between properties will meet stricter criteria.
  92. *
  93. * Since the #PangoAttrList structure is stored as a linear list,
  94. * it is not suitable for storing attributes for large amounts
  95. * of text. In general, you should not use a single #PangoAttrList
  96. * for more than one paragraph of text.
  97. */
  98. typedef struct _PangoAttrList PangoAttrList;
  99. typedef struct _PangoAttrIterator PangoAttrIterator;
  100. /**
  101. * PangoAttrType:
  102. * @PANGO_ATTR_INVALID: does not happen
  103. * @PANGO_ATTR_LANGUAGE: language (#PangoAttrLanguage)
  104. * @PANGO_ATTR_FAMILY: font family name list (#PangoAttrString)
  105. * @PANGO_ATTR_STYLE: font slant style (#PangoAttrInt)
  106. * @PANGO_ATTR_WEIGHT: font weight (#PangoAttrInt)
  107. * @PANGO_ATTR_VARIANT: font variant (normal or small caps) (#PangoAttrInt)
  108. * @PANGO_ATTR_STRETCH: font stretch (#PangoAttrInt)
  109. * @PANGO_ATTR_SIZE: font size in points scaled by %PANGO_SCALE (#PangoAttrInt)
  110. * @PANGO_ATTR_FONT_DESC: font description (#PangoAttrFontDesc)
  111. * @PANGO_ATTR_FOREGROUND: foreground color (#PangoAttrColor)
  112. * @PANGO_ATTR_BACKGROUND: background color (#PangoAttrColor)
  113. * @PANGO_ATTR_UNDERLINE: whether the text has an underline (#PangoAttrInt)
  114. * @PANGO_ATTR_STRIKETHROUGH: whether the text is struck-through (#PangoAttrInt)
  115. * @PANGO_ATTR_RISE: baseline displacement (#PangoAttrInt)
  116. * @PANGO_ATTR_SHAPE: shape (#PangoAttrShape)
  117. * @PANGO_ATTR_SCALE: font size scale factor (#PangoAttrFloat)
  118. * @PANGO_ATTR_FALLBACK: whether fallback is enabled (#PangoAttrInt)
  119. * @PANGO_ATTR_LETTER_SPACING: letter spacing (#PangoAttrInt)
  120. * @PANGO_ATTR_UNDERLINE_COLOR: underline color (#PangoAttrColor)
  121. * @PANGO_ATTR_STRIKETHROUGH_COLOR: strikethrough color (#PangoAttrColor)
  122. * @PANGO_ATTR_ABSOLUTE_SIZE: font size in pixels scaled by %PANGO_SCALE (#PangoAttrInt)
  123. * @PANGO_ATTR_GRAVITY: base text gravity (#PangoAttrInt)
  124. * @PANGO_ATTR_GRAVITY_HINT: gravity hint (#PangoAttrInt)
  125. * @PANGO_ATTR_FONT_FEATURES: OpenType font features (#PangoAttrString). Since 1.38
  126. * @PANGO_ATTR_FOREGROUND_ALPHA: foreground alpha (#PangoAttrInt). Since 1.38
  127. * @PANGO_ATTR_BACKGROUND_ALPHA: background alpha (#PangoAttrInt). Since 1.38
  128. *
  129. * The #PangoAttrType
  130. * distinguishes between different types of attributes. Along with the
  131. * predefined values, it is possible to allocate additional values
  132. * for custom attributes using pango_attr_type_register(). The predefined
  133. * values are given below. The type of structure used to store the
  134. * attribute is listed in parentheses after the description.
  135. */
  136. typedef enum
  137. {
  138. PANGO_ATTR_INVALID, /* 0 is an invalid attribute type */
  139. PANGO_ATTR_LANGUAGE, /* PangoAttrLanguage */
  140. PANGO_ATTR_FAMILY, /* PangoAttrString */
  141. PANGO_ATTR_STYLE, /* PangoAttrInt */
  142. PANGO_ATTR_WEIGHT, /* PangoAttrInt */
  143. PANGO_ATTR_VARIANT, /* PangoAttrInt */
  144. PANGO_ATTR_STRETCH, /* PangoAttrInt */
  145. PANGO_ATTR_SIZE, /* PangoAttrSize */
  146. PANGO_ATTR_FONT_DESC, /* PangoAttrFontDesc */
  147. PANGO_ATTR_FOREGROUND, /* PangoAttrColor */
  148. PANGO_ATTR_BACKGROUND, /* PangoAttrColor */
  149. PANGO_ATTR_UNDERLINE, /* PangoAttrInt */
  150. PANGO_ATTR_STRIKETHROUGH, /* PangoAttrInt */
  151. PANGO_ATTR_RISE, /* PangoAttrInt */
  152. PANGO_ATTR_SHAPE, /* PangoAttrShape */
  153. PANGO_ATTR_SCALE, /* PangoAttrFloat */
  154. PANGO_ATTR_FALLBACK, /* PangoAttrInt */
  155. PANGO_ATTR_LETTER_SPACING, /* PangoAttrInt */
  156. PANGO_ATTR_UNDERLINE_COLOR, /* PangoAttrColor */
  157. PANGO_ATTR_STRIKETHROUGH_COLOR,/* PangoAttrColor */
  158. PANGO_ATTR_ABSOLUTE_SIZE, /* PangoAttrSize */
  159. PANGO_ATTR_GRAVITY, /* PangoAttrInt */
  160. PANGO_ATTR_GRAVITY_HINT, /* PangoAttrInt */
  161. PANGO_ATTR_FONT_FEATURES, /* PangoAttrString */
  162. PANGO_ATTR_FOREGROUND_ALPHA, /* PangoAttrInt */
  163. PANGO_ATTR_BACKGROUND_ALPHA /* PangoAttrInt */
  164. } PangoAttrType;
  165. /**
  166. * PangoUnderline:
  167. * @PANGO_UNDERLINE_NONE: no underline should be drawn
  168. * @PANGO_UNDERLINE_SINGLE: a single underline should be drawn
  169. * @PANGO_UNDERLINE_DOUBLE: a double underline should be drawn
  170. * @PANGO_UNDERLINE_LOW: a single underline should be drawn at a position
  171. * beneath the ink extents of the text being
  172. * underlined. This should be used only for underlining
  173. * single characters, such as for keyboard
  174. * accelerators. %PANGO_UNDERLINE_SINGLE should
  175. * be used for extended portions of text.
  176. * @PANGO_UNDERLINE_ERROR: a wavy underline should be drawn below.
  177. * This underline is typically used to indicate
  178. * an error such as a possilble mispelling; in some
  179. * cases a contrasting color may automatically
  180. * be used. This type of underlining is available since Pango 1.4.
  181. *
  182. * The #PangoUnderline enumeration is used to specify
  183. * whether text should be underlined, and if so, the type
  184. * of underlining.
  185. */
  186. typedef enum {
  187. PANGO_UNDERLINE_NONE,
  188. PANGO_UNDERLINE_SINGLE,
  189. PANGO_UNDERLINE_DOUBLE,
  190. PANGO_UNDERLINE_LOW,
  191. PANGO_UNDERLINE_ERROR
  192. } PangoUnderline;
  193. /**
  194. * PANGO_ATTR_INDEX_FROM_TEXT_BEGINNING:
  195. *
  196. * This value can be used to set the start_index member of a #PangoAttribute
  197. * such that the attribute covers from the beginning of the text.
  198. *
  199. * Since: 1.24
  200. */
  201. /**
  202. * PANGO_ATTR_INDEX_TO_TEXT_END:
  203. *
  204. * This value can be used to set the end_index member of a #PangoAttribute
  205. * such that the attribute covers to the end of the text.
  206. *
  207. * Since: 1.24
  208. */
  209. #define PANGO_ATTR_INDEX_FROM_TEXT_BEGINNING 0
  210. #define PANGO_ATTR_INDEX_TO_TEXT_END G_MAXUINT
  211. /**
  212. * PangoAttribute:
  213. * @klass: the class structure holding information about the type of the attribute
  214. * @start_index: the start index of the range (in bytes).
  215. * @end_index: end index of the range (in bytes). The character at this index
  216. * is not included in the range.
  217. *
  218. * The #PangoAttribute structure represents the common portions of all
  219. * attributes. Particular types of attributes include this structure
  220. * as their initial portion. The common portion of the attribute holds
  221. * the range to which the value in the type-specific part of the attribute
  222. * applies and should be initialized using pango_attribute_init().
  223. * By default an attribute will have an all-inclusive range of [0,%G_MAXUINT].
  224. */
  225. struct _PangoAttribute
  226. {
  227. const PangoAttrClass *klass;
  228. guint start_index; /* in bytes */
  229. guint end_index; /* in bytes. The character at this index is not included */
  230. };
  231. /**
  232. * PangoAttrFilterFunc:
  233. * @attribute: a Pango attribute
  234. * @user_data: user data passed to the function
  235. *
  236. * Type of a function filtering a list of attributes.
  237. *
  238. * Return value: %TRUE if the attribute should be selected for
  239. * filtering, %FALSE otherwise.
  240. **/
  241. typedef gboolean (*PangoAttrFilterFunc) (PangoAttribute *attribute,
  242. gpointer user_data);
  243. /**
  244. * PangoAttrDataCopyFunc:
  245. * @user_data: user data to copy
  246. *
  247. * Type of a function that can duplicate user data for an attribute.
  248. *
  249. * Return value: new copy of @user_data.
  250. **/
  251. typedef gpointer (*PangoAttrDataCopyFunc) (gconstpointer user_data);
  252. /**
  253. * PangoAttrClass:
  254. * @type: the type ID for this attribute
  255. * @copy: function to duplicate an attribute of this type (see pango_attribute_copy())
  256. * @destroy: function to free an attribute of this type (see pango_attribute_destroy())
  257. * @equal: function to check two attributes of this type for equality (see pango_attribute_equal())
  258. *
  259. * The #PangoAttrClass structure stores the type and operations for
  260. * a particular type of attribute. The functions in this structure should
  261. * not be called directly. Instead, one should use the wrapper functions
  262. * provided for #PangoAttribute.
  263. */
  264. struct _PangoAttrClass
  265. {
  266. /*< public >*/
  267. PangoAttrType type;
  268. PangoAttribute * (*copy) (const PangoAttribute *attr);
  269. void (*destroy) (PangoAttribute *attr);
  270. gboolean (*equal) (const PangoAttribute *attr1, const PangoAttribute *attr2);
  271. };
  272. /**
  273. * PangoAttrString:
  274. * @attr: the common portion of the attribute
  275. * @value: the string which is the value of the attribute
  276. *
  277. * The #PangoAttrString structure is used to represent attributes with
  278. * a string value.
  279. */
  280. struct _PangoAttrString
  281. {
  282. PangoAttribute attr;
  283. char *value;
  284. };
  285. /**
  286. * PangoAttrLanguage:
  287. * @attr: the common portion of the attribute
  288. * @value: the #PangoLanguage which is the value of the attribute
  289. *
  290. * The #PangoAttrLanguage structure is used to represent attributes that
  291. * are languages.
  292. */
  293. struct _PangoAttrLanguage
  294. {
  295. PangoAttribute attr;
  296. PangoLanguage *value;
  297. };
  298. /**
  299. * PangoAttrInt:
  300. * @attr: the common portion of the attribute
  301. * @value: the value of the attribute
  302. *
  303. * The #PangoAttrInt structure is used to represent attributes with
  304. * an integer or enumeration value.
  305. */
  306. struct _PangoAttrInt
  307. {
  308. PangoAttribute attr;
  309. int value;
  310. };
  311. /**
  312. * PangoAttrFloat:
  313. * @attr: the common portion of the attribute
  314. * @value: the value of the attribute
  315. *
  316. * The #PangoAttrFloat structure is used to represent attributes with
  317. * a float or double value.
  318. */
  319. struct _PangoAttrFloat
  320. {
  321. PangoAttribute attr;
  322. double value;
  323. };
  324. /**
  325. * PangoAttrColor:
  326. * @attr: the common portion of the attribute
  327. * @color: the #PangoColor which is the value of the attribute
  328. *
  329. * The #PangoAttrColor structure is used to represent attributes that
  330. * are colors.
  331. */
  332. struct _PangoAttrColor
  333. {
  334. PangoAttribute attr;
  335. PangoColor color;
  336. };
  337. /**
  338. * PangoAttrSize:
  339. * @attr: the common portion of the attribute
  340. * @size: size of font, in units of 1/%PANGO_SCALE of a point (for
  341. * %PANGO_ATTR_SIZE) or of a device uni (for %PANGO_ATTR_ABSOLUTE_SIZE)
  342. * @absolute: whether the font size is in device units or points.
  343. * This field is only present for compatibility with Pango-1.8.0
  344. * (%PANGO_ATTR_ABSOLUTE_SIZE was added in 1.8.1); and always will
  345. * be %FALSE for %PANGO_ATTR_SIZE and %TRUE for %PANGO_ATTR_ABSOLUTE_SIZE.
  346. *
  347. * The #PangoAttrSize structure is used to represent attributes which
  348. * set font size.
  349. */
  350. struct _PangoAttrSize
  351. {
  352. PangoAttribute attr;
  353. int size;
  354. guint absolute : 1;
  355. };
  356. /**
  357. * PangoAttrShape:
  358. * @attr: the common portion of the attribute
  359. * @ink_rect: the ink rectangle to restrict to
  360. * @logical_rect: the logical rectangle to restrict to
  361. * @data: user data set (see pango_attr_shape_new_with_data())
  362. * @copy_func: copy function for the user data
  363. * @destroy_func: destroy function for the user data
  364. *
  365. * The #PangoAttrShape structure is used to represent attributes which
  366. * impose shape restrictions.
  367. */
  368. struct _PangoAttrShape
  369. {
  370. PangoAttribute attr;
  371. PangoRectangle ink_rect;
  372. PangoRectangle logical_rect;
  373. gpointer data;
  374. PangoAttrDataCopyFunc copy_func;
  375. GDestroyNotify destroy_func;
  376. };
  377. /**
  378. * PangoAttrFontDesc:
  379. * @attr: the common portion of the attribute
  380. * @desc: the font description which is the value of this attribute
  381. *
  382. * The #PangoAttrFontDesc structure is used to store an attribute that
  383. * sets all aspects of the font description at once.
  384. */
  385. struct _PangoAttrFontDesc
  386. {
  387. PangoAttribute attr;
  388. PangoFontDescription *desc;
  389. };
  390. /**
  391. * PangoAttrFontFeatures:
  392. * @attr: the common portion of the attribute
  393. * @features: the featues, as a string in CSS syntax
  394. *
  395. * The #PangoAttrFontFeatures structure is used to represent OpenType
  396. * font features as an attribute.
  397. *
  398. * Since: 1.38
  399. */
  400. struct _PangoAttrFontFeatures
  401. {
  402. PangoAttribute attr;
  403. gchar *features;
  404. };
  405. PangoAttrType pango_attr_type_register (const gchar *name);
  406. const char * pango_attr_type_get_name (PangoAttrType type) G_GNUC_CONST;
  407. void pango_attribute_init (PangoAttribute *attr,
  408. const PangoAttrClass *klass);
  409. PangoAttribute * pango_attribute_copy (const PangoAttribute *attr);
  410. void pango_attribute_destroy (PangoAttribute *attr);
  411. gboolean pango_attribute_equal (const PangoAttribute *attr1,
  412. const PangoAttribute *attr2) G_GNUC_PURE;
  413. PangoAttribute *pango_attr_language_new (PangoLanguage *language);
  414. PangoAttribute *pango_attr_family_new (const char *family);
  415. PangoAttribute *pango_attr_foreground_new (guint16 red,
  416. guint16 green,
  417. guint16 blue);
  418. PangoAttribute *pango_attr_background_new (guint16 red,
  419. guint16 green,
  420. guint16 blue);
  421. PangoAttribute *pango_attr_size_new (int size);
  422. PangoAttribute *pango_attr_size_new_absolute (int size);
  423. PangoAttribute *pango_attr_style_new (PangoStyle style);
  424. PangoAttribute *pango_attr_weight_new (PangoWeight weight);
  425. PangoAttribute *pango_attr_variant_new (PangoVariant variant);
  426. PangoAttribute *pango_attr_stretch_new (PangoStretch stretch);
  427. PangoAttribute *pango_attr_font_desc_new (const PangoFontDescription *desc);
  428. PangoAttribute *pango_attr_underline_new (PangoUnderline underline);
  429. PangoAttribute *pango_attr_underline_color_new (guint16 red,
  430. guint16 green,
  431. guint16 blue);
  432. PangoAttribute *pango_attr_strikethrough_new (gboolean strikethrough);
  433. PangoAttribute *pango_attr_strikethrough_color_new (guint16 red,
  434. guint16 green,
  435. guint16 blue);
  436. PangoAttribute *pango_attr_rise_new (int rise);
  437. PangoAttribute *pango_attr_scale_new (double scale_factor);
  438. PangoAttribute *pango_attr_fallback_new (gboolean enable_fallback);
  439. PangoAttribute *pango_attr_letter_spacing_new (int letter_spacing);
  440. PangoAttribute *pango_attr_shape_new (const PangoRectangle *ink_rect,
  441. const PangoRectangle *logical_rect);
  442. PangoAttribute *pango_attr_shape_new_with_data (const PangoRectangle *ink_rect,
  443. const PangoRectangle *logical_rect,
  444. gpointer data,
  445. PangoAttrDataCopyFunc copy_func,
  446. GDestroyNotify destroy_func);
  447. PangoAttribute *pango_attr_gravity_new (PangoGravity gravity);
  448. PangoAttribute *pango_attr_gravity_hint_new (PangoGravityHint hint);
  449. PangoAttribute *pango_attr_font_features_new (const gchar *features);
  450. PangoAttribute *pango_attr_foreground_alpha_new (guint16 alpha);
  451. PangoAttribute *pango_attr_background_alpha_new (guint16 alpha);
  452. GType pango_attr_list_get_type (void) G_GNUC_CONST;
  453. PangoAttrList * pango_attr_list_new (void);
  454. PangoAttrList * pango_attr_list_ref (PangoAttrList *list);
  455. void pango_attr_list_unref (PangoAttrList *list);
  456. PangoAttrList * pango_attr_list_copy (PangoAttrList *list);
  457. void pango_attr_list_insert (PangoAttrList *list,
  458. PangoAttribute *attr);
  459. void pango_attr_list_insert_before (PangoAttrList *list,
  460. PangoAttribute *attr);
  461. void pango_attr_list_change (PangoAttrList *list,
  462. PangoAttribute *attr);
  463. void pango_attr_list_splice (PangoAttrList *list,
  464. PangoAttrList *other,
  465. gint pos,
  466. gint len);
  467. PangoAttrList *pango_attr_list_filter (PangoAttrList *list,
  468. PangoAttrFilterFunc func,
  469. gpointer data);
  470. PangoAttrIterator *pango_attr_list_get_iterator (PangoAttrList *list);
  471. void pango_attr_iterator_range (PangoAttrIterator *iterator,
  472. gint *start,
  473. gint *end);
  474. gboolean pango_attr_iterator_next (PangoAttrIterator *iterator);
  475. PangoAttrIterator *pango_attr_iterator_copy (PangoAttrIterator *iterator);
  476. void pango_attr_iterator_destroy (PangoAttrIterator *iterator);
  477. PangoAttribute * pango_attr_iterator_get (PangoAttrIterator *iterator,
  478. PangoAttrType type);
  479. void pango_attr_iterator_get_font (PangoAttrIterator *iterator,
  480. PangoFontDescription *desc,
  481. PangoLanguage **language,
  482. GSList **extra_attrs);
  483. GSList * pango_attr_iterator_get_attrs (PangoAttrIterator *iterator);
  484. gboolean pango_parse_markup (const char *markup_text,
  485. int length,
  486. gunichar accel_marker,
  487. PangoAttrList **attr_list,
  488. char **text,
  489. gunichar *accel_char,
  490. GError **error);
  491. GMarkupParseContext * pango_markup_parser_new (gunichar accel_marker);
  492. gboolean pango_markup_parser_finish (GMarkupParseContext *context,
  493. PangoAttrList **attr_list,
  494. char **text,
  495. gunichar *accel_char,
  496. GError **error);
  497. G_END_DECLS
  498. #endif /* __PANGO_ATTRIBUTES_H__ */