No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 
 
 
 

112 líneas
5.1 KiB

  1. /* Pango
  2. * pango-context.h: Rendering contexts
  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_CONTEXT_H__
  22. #define __PANGO_CONTEXT_H__
  23. #include <pango/pango-font.h>
  24. #include <pango/pango-fontmap.h>
  25. #include <pango/pango-attributes.h>
  26. G_BEGIN_DECLS
  27. /* Sort of like a GC - application set information about how
  28. * to handle scripts
  29. */
  30. /* PangoContext typedefed in pango-fontmap.h */
  31. typedef struct _PangoContextClass PangoContextClass;
  32. #define PANGO_TYPE_CONTEXT (pango_context_get_type ())
  33. #define PANGO_CONTEXT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_CONTEXT, PangoContext))
  34. #define PANGO_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PANGO_TYPE_CONTEXT, PangoContextClass))
  35. #define PANGO_IS_CONTEXT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_CONTEXT))
  36. #define PANGO_IS_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PANGO_TYPE_CONTEXT))
  37. #define PANGO_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_TYPE_CONTEXT, PangoContextClass))
  38. /* The PangoContext and PangoContextClass structs are private; if you
  39. * need to create a subclass of these, file a bug.
  40. */
  41. GType pango_context_get_type (void) G_GNUC_CONST;
  42. PangoContext *pango_context_new (void);
  43. void pango_context_set_font_map (PangoContext *context,
  44. PangoFontMap *font_map);
  45. PangoFontMap *pango_context_get_font_map (PangoContext *context);
  46. void pango_context_list_families (PangoContext *context,
  47. PangoFontFamily ***families,
  48. int *n_families);
  49. PangoFont * pango_context_load_font (PangoContext *context,
  50. const PangoFontDescription *desc);
  51. PangoFontset *pango_context_load_fontset (PangoContext *context,
  52. const PangoFontDescription *desc,
  53. PangoLanguage *language);
  54. PangoFontMetrics *pango_context_get_metrics (PangoContext *context,
  55. const PangoFontDescription *desc,
  56. PangoLanguage *language);
  57. void pango_context_set_font_description (PangoContext *context,
  58. const PangoFontDescription *desc);
  59. PangoFontDescription * pango_context_get_font_description (PangoContext *context);
  60. PangoLanguage *pango_context_get_language (PangoContext *context);
  61. void pango_context_set_language (PangoContext *context,
  62. PangoLanguage *language);
  63. void pango_context_set_base_dir (PangoContext *context,
  64. PangoDirection direction);
  65. PangoDirection pango_context_get_base_dir (PangoContext *context);
  66. void pango_context_set_base_gravity (PangoContext *context,
  67. PangoGravity gravity);
  68. PangoGravity pango_context_get_base_gravity (PangoContext *context);
  69. PangoGravity pango_context_get_gravity (PangoContext *context);
  70. void pango_context_set_gravity_hint (PangoContext *context,
  71. PangoGravityHint hint);
  72. PangoGravityHint pango_context_get_gravity_hint (PangoContext *context);
  73. void pango_context_set_matrix (PangoContext *context,
  74. const PangoMatrix *matrix);
  75. G_CONST_RETURN PangoMatrix *pango_context_get_matrix (PangoContext *context);
  76. /* Break a string of Unicode characters into segments with
  77. * consistent shaping/language engine and bidrectional level.
  78. * Returns a #GList of #PangoItem's
  79. */
  80. GList *pango_itemize (PangoContext *context,
  81. const char *text,
  82. int start_index,
  83. int length,
  84. PangoAttrList *attrs,
  85. PangoAttrIterator *cached_iter);
  86. GList *pango_itemize_with_base_dir (PangoContext *context,
  87. PangoDirection base_dir,
  88. const char *text,
  89. int start_index,
  90. int length,
  91. PangoAttrList *attrs,
  92. PangoAttrIterator *cached_iter);
  93. G_END_DECLS
  94. #endif /* __PANGO_CONTEXT_H__ */