You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

95 lines
3.1 KiB

  1. /* Pango
  2. * pango-glyph-item.h: Pair of PangoItem and a glyph string
  3. *
  4. * Copyright (C) 2002 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_GLYPH_ITEM_H__
  22. #define __PANGO_GLYPH_ITEM_H__
  23. #include <pango/pango-attributes.h>
  24. #include <pango/pango-break.h>
  25. #include <pango/pango-item.h>
  26. #include <pango/pango-glyph.h>
  27. G_BEGIN_DECLS
  28. typedef struct _PangoGlyphItem PangoGlyphItem;
  29. struct _PangoGlyphItem
  30. {
  31. PangoItem *item;
  32. PangoGlyphString *glyphs;
  33. };
  34. #define PANGO_TYPE_GLYPH_ITEM (pango_glyph_item_get_type ())
  35. GType pango_glyph_item_get_type (void) G_GNUC_CONST;
  36. PangoGlyphItem *pango_glyph_item_split (PangoGlyphItem *orig,
  37. const char *text,
  38. int split_index);
  39. PangoGlyphItem *pango_glyph_item_copy (PangoGlyphItem *orig);
  40. void pango_glyph_item_free (PangoGlyphItem *glyph_item);
  41. GSList * pango_glyph_item_apply_attrs (PangoGlyphItem *glyph_item,
  42. const char *text,
  43. PangoAttrList *list);
  44. void pango_glyph_item_letter_space (PangoGlyphItem *glyph_item,
  45. const char *text,
  46. PangoLogAttr *log_attrs,
  47. int letter_spacing);
  48. void pango_glyph_item_get_logical_widths (PangoGlyphItem *glyph_item,
  49. const char *text,
  50. int *logical_widths);
  51. typedef struct _PangoGlyphItemIter PangoGlyphItemIter;
  52. struct _PangoGlyphItemIter
  53. {
  54. PangoGlyphItem *glyph_item;
  55. const gchar *text;
  56. int start_glyph;
  57. int start_index;
  58. int start_char;
  59. int end_glyph;
  60. int end_index;
  61. int end_char;
  62. };
  63. #define PANGO_TYPE_GLYPH_ITEM_ITER (pango_glyph_item_iter_get_type ())
  64. GType pango_glyph_item_iter_get_type (void) G_GNUC_CONST;
  65. PangoGlyphItemIter *pango_glyph_item_iter_copy (PangoGlyphItemIter *orig);
  66. void pango_glyph_item_iter_free (PangoGlyphItemIter *iter);
  67. gboolean pango_glyph_item_iter_init_start (PangoGlyphItemIter *iter,
  68. PangoGlyphItem *glyph_item,
  69. const char *text);
  70. gboolean pango_glyph_item_iter_init_end (PangoGlyphItemIter *iter,
  71. PangoGlyphItem *glyph_item,
  72. const char *text);
  73. gboolean pango_glyph_item_iter_next_cluster (PangoGlyphItemIter *iter);
  74. gboolean pango_glyph_item_iter_prev_cluster (PangoGlyphItemIter *iter);
  75. G_END_DECLS
  76. #endif /* __PANGO_GLYPH_ITEM_H__ */