pango-context.h 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  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-types.h>
  24. #include <pango/pango-font.h>
  25. #include <pango/pango-fontmap.h>
  26. #include <pango/pango-attributes.h>
  27. #include <pango/pango-direction.h>
  28. G_BEGIN_DECLS
  29. typedef struct _PangoContextClass PangoContextClass;
  30. #define PANGO_TYPE_CONTEXT (pango_context_get_type ())
  31. #define PANGO_CONTEXT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_CONTEXT, PangoContext))
  32. #define PANGO_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PANGO_TYPE_CONTEXT, PangoContextClass))
  33. #define PANGO_IS_CONTEXT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_CONTEXT))
  34. #define PANGO_IS_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PANGO_TYPE_CONTEXT))
  35. #define PANGO_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_TYPE_CONTEXT, PangoContextClass))
  36. PANGO_AVAILABLE_IN_ALL
  37. GType pango_context_get_type (void) G_GNUC_CONST;
  38. PANGO_AVAILABLE_IN_ALL
  39. PangoContext * pango_context_new (void);
  40. PANGO_AVAILABLE_IN_1_32
  41. void pango_context_changed (PangoContext *context);
  42. PANGO_AVAILABLE_IN_ALL
  43. void pango_context_set_font_map (PangoContext *context,
  44. PangoFontMap *font_map);
  45. PANGO_AVAILABLE_IN_1_6
  46. PangoFontMap * pango_context_get_font_map (PangoContext *context);
  47. PANGO_AVAILABLE_IN_1_32
  48. guint pango_context_get_serial (PangoContext *context);
  49. PANGO_AVAILABLE_IN_ALL
  50. void pango_context_list_families (PangoContext *context,
  51. PangoFontFamily ***families,
  52. int *n_families);
  53. PANGO_AVAILABLE_IN_ALL
  54. PangoFont * pango_context_load_font (PangoContext *context,
  55. const PangoFontDescription *desc);
  56. PANGO_AVAILABLE_IN_ALL
  57. PangoFontset * pango_context_load_fontset (PangoContext *context,
  58. const PangoFontDescription *desc,
  59. PangoLanguage *language);
  60. PANGO_AVAILABLE_IN_ALL
  61. PangoFontMetrics * pango_context_get_metrics (PangoContext *context,
  62. const PangoFontDescription *desc,
  63. PangoLanguage *language);
  64. PANGO_AVAILABLE_IN_ALL
  65. void pango_context_set_font_description (PangoContext *context,
  66. const PangoFontDescription *desc);
  67. PANGO_AVAILABLE_IN_ALL
  68. PangoFontDescription * pango_context_get_font_description (PangoContext *context);
  69. PANGO_AVAILABLE_IN_ALL
  70. PangoLanguage * pango_context_get_language (PangoContext *context);
  71. PANGO_AVAILABLE_IN_ALL
  72. void pango_context_set_language (PangoContext *context,
  73. PangoLanguage *language);
  74. PANGO_AVAILABLE_IN_ALL
  75. void pango_context_set_base_dir (PangoContext *context,
  76. PangoDirection direction);
  77. PANGO_AVAILABLE_IN_ALL
  78. PangoDirection pango_context_get_base_dir (PangoContext *context);
  79. PANGO_AVAILABLE_IN_1_16
  80. void pango_context_set_base_gravity (PangoContext *context,
  81. PangoGravity gravity);
  82. PANGO_AVAILABLE_IN_1_16
  83. PangoGravity pango_context_get_base_gravity (PangoContext *context);
  84. PANGO_AVAILABLE_IN_1_16
  85. PangoGravity pango_context_get_gravity (PangoContext *context);
  86. PANGO_AVAILABLE_IN_1_16
  87. void pango_context_set_gravity_hint (PangoContext *context,
  88. PangoGravityHint hint);
  89. PANGO_AVAILABLE_IN_1_16
  90. PangoGravityHint pango_context_get_gravity_hint (PangoContext *context);
  91. PANGO_AVAILABLE_IN_1_6
  92. void pango_context_set_matrix (PangoContext *context,
  93. const PangoMatrix *matrix);
  94. PANGO_AVAILABLE_IN_1_6
  95. const PangoMatrix * pango_context_get_matrix (PangoContext *context);
  96. PANGO_AVAILABLE_IN_1_44
  97. void pango_context_set_round_glyph_positions (PangoContext *context,
  98. gboolean round_positions);
  99. PANGO_AVAILABLE_IN_1_44
  100. gboolean pango_context_get_round_glyph_positions (PangoContext *context);
  101. G_END_DECLS
  102. #endif /* __PANGO_CONTEXT_H__ */