25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 
 
 

128 satır
4.1 KiB

  1. /* Pango
  2. * pango-fontset.h: Font set handling
  3. *
  4. * Copyright (C) 2001 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_FONTSET_H__
  22. #define __PANGO_FONTSET_H__
  23. #include <pango/pango-coverage.h>
  24. #include <pango/pango-types.h>
  25. #include <glib-object.h>
  26. G_BEGIN_DECLS
  27. /*
  28. * PangoFontset
  29. */
  30. #define PANGO_TYPE_FONTSET (pango_fontset_get_type ())
  31. #define PANGO_FONTSET(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FONTSET, PangoFontset))
  32. #define PANGO_IS_FONTSET(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FONTSET))
  33. GType pango_fontset_get_type (void) G_GNUC_CONST;
  34. typedef struct _PangoFontset PangoFontset;
  35. /**
  36. * PangoFontsetForeachFunc
  37. * @fontset: a #PangoFontset
  38. * @font: a font from @fontset
  39. * @data: callback data
  40. *
  41. * A callback function used by pango_fontset_foreach() when enumerating
  42. * the fonts in a fontset.
  43. *
  44. * Returns: if %TRUE, stop iteration and return immediately.
  45. *
  46. * Since: 1.4
  47. **/
  48. typedef gboolean (*PangoFontsetForeachFunc) (PangoFontset *fontset,
  49. PangoFont *font,
  50. gpointer data);
  51. PangoFont * pango_fontset_get_font (PangoFontset *fontset,
  52. guint wc);
  53. PangoFontMetrics *pango_fontset_get_metrics (PangoFontset *fontset);
  54. void pango_fontset_foreach (PangoFontset *fontset,
  55. PangoFontsetForeachFunc func,
  56. gpointer data);
  57. #ifdef PANGO_ENABLE_BACKEND
  58. typedef struct _PangoFontsetClass PangoFontsetClass;
  59. #define PANGO_FONTSET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PANGO_TYPE_FONTSET, PangoFontsetClass))
  60. #define PANGO_IS_FONTSET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PANGO_TYPE_FONTSET))
  61. #define PANGO_FONTSET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_TYPE_FONTSET, PangoFontsetClass))
  62. struct _PangoFontset
  63. {
  64. GObject parent_instance;
  65. };
  66. struct _PangoFontsetClass
  67. {
  68. GObjectClass parent_class;
  69. /*< public >*/
  70. PangoFont * (*get_font) (PangoFontset *fontset,
  71. guint wc);
  72. PangoFontMetrics *(*get_metrics) (PangoFontset *fontset);
  73. PangoLanguage * (*get_language) (PangoFontset *fontset);
  74. void (*foreach) (PangoFontset *fontset,
  75. PangoFontsetForeachFunc func,
  76. gpointer data);
  77. /*< private >*/
  78. /* Padding for future expansion */
  79. void (*_pango_reserved1) (void);
  80. void (*_pango_reserved2) (void);
  81. void (*_pango_reserved3) (void);
  82. void (*_pango_reserved4) (void);
  83. };
  84. /*
  85. * PangoFontsetSimple
  86. */
  87. #define PANGO_TYPE_FONTSET_SIMPLE (pango_fontset_simple_get_type ())
  88. #define PANGO_FONTSET_SIMPLE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FONTSET_SIMPLE, PangoFontsetSimple))
  89. #define PANGO_IS_FONTSET_SIMPLE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FONTSET_SIMPLE))
  90. typedef struct _PangoFontsetSimple PangoFontsetSimple;
  91. typedef struct _PangoFontsetSimpleClass PangoFontsetSimpleClass;
  92. GType pango_fontset_simple_get_type (void) G_GNUC_CONST;
  93. PangoFontsetSimple * pango_fontset_simple_new (PangoLanguage *language);
  94. void pango_fontset_simple_append (PangoFontsetSimple *fontset,
  95. PangoFont *font);
  96. int pango_fontset_simple_size (PangoFontsetSimple *fontset);
  97. #endif /* PANGO_ENABLE_BACKEND */
  98. G_END_DECLS
  99. #endif /* __PANGO_FONTSET_H__ */