Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 
 
 

73 rader
1.9 KiB

  1. /* Pango
  2. * pango-item.h: Structure for storing run information
  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_ITEM_H__
  22. #define __PANGO_ITEM_H__
  23. #include <pango/pango-types.h>
  24. G_BEGIN_DECLS
  25. typedef struct _PangoAnalysis PangoAnalysis;
  26. typedef struct _PangoItem PangoItem;
  27. /* TODO: if more flags are needed, turn this into a real PangoAnalysisFlags enum */
  28. #define PANGO_ANALYSIS_FLAG_CENTERED_BASELINE (1 << 0)
  29. struct _PangoAnalysis
  30. {
  31. PangoEngineShape *shape_engine;
  32. PangoEngineLang *lang_engine;
  33. PangoFont *font;
  34. guint8 level;
  35. guint8 gravity; /* PangoGravity */
  36. guint8 flags;
  37. guint8 script; /* PangoScript */
  38. PangoLanguage *language;
  39. GSList *extra_attrs;
  40. };
  41. struct _PangoItem
  42. {
  43. gint offset;
  44. gint length;
  45. gint num_chars;
  46. PangoAnalysis analysis;
  47. };
  48. #define PANGO_TYPE_ITEM (pango_item_get_type ())
  49. GType pango_item_get_type (void) G_GNUC_CONST;
  50. PangoItem *pango_item_new (void);
  51. PangoItem *pango_item_copy (PangoItem *item);
  52. void pango_item_free (PangoItem *item);
  53. PangoItem *pango_item_split (PangoItem *orig,
  54. int split_index,
  55. int split_offset);
  56. G_END_DECLS
  57. #endif /* __PANGO_ITEM_H__ */