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.

pangofc-decoder.h 3.7 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. /* Pango
  2. * pangofc-decoder.h: Custom encoders/decoders on a per-font basis.
  3. *
  4. * Copyright (C) 2004 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_DECODER_H_
  22. #define __PANGO_DECODER_H_
  23. #include <pango/pangofc-font.h>
  24. G_BEGIN_DECLS
  25. #define PANGO_TYPE_FC_DECODER (pango_fc_decoder_get_type())
  26. #define PANGO_FC_DECODER(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FC_DECODER, PangoFcDecoder))
  27. #define PANGO_IS_FC_DECODER(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FC_DECODER))
  28. typedef struct _PangoFcDecoder PangoFcDecoder;
  29. typedef struct _PangoFcDecoderClass PangoFcDecoderClass;
  30. #define PANGO_FC_DECODER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PANGO_TYPE_FC_DECODER, PangoFcDecoderClass))
  31. #define PANGO_IS_FC_DECODER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PANGO_TYPE_FC_DECODER))
  32. #define PANGO_FC_DECODER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_TYPE_FC_DECODER, PangoFcDecoderClass))
  33. /**
  34. * PangoFcDecoder:
  35. *
  36. * #PangoFcDecoder is a virtual base class that implementations will
  37. * inherit from. It's the interface that is used to define a custom
  38. * encoding for a font. These objects are created in your code from a
  39. * function callback that was originally registered with
  40. * pango_fc_font_map_add_decoder_find_func(). Pango requires
  41. * information about the supported charset for a font as well as the
  42. * individual character to glyph conversions. Pango gets that
  43. * information via the #get_charset and #get_glyph callbacks into your
  44. * object implementation.
  45. *
  46. * Since: 1.6
  47. **/
  48. struct _PangoFcDecoder
  49. {
  50. /*< private >*/
  51. GObject parent_instance;
  52. };
  53. /**
  54. * PangoFcDecoderClass:
  55. * @get_charset: This returns an #FcCharset given a #PangoFcFont that
  56. * includes a list of supported characters in the font. The
  57. * #FcCharSet that is returned should be an internal reference to your
  58. * code. Pango will not free this structure. It is important that
  59. * you make this callback fast because this callback is called
  60. * separately for each character to determine Unicode coverage.
  61. * @get_glyph: This returns a single #PangoGlyph for a given Unicode
  62. * code point.
  63. *
  64. * Class structure for #PangoFcDecoder.
  65. *
  66. * Since: 1.6
  67. **/
  68. struct _PangoFcDecoderClass
  69. {
  70. /*< private >*/
  71. GObjectClass parent_class;
  72. /* vtable - not signals */
  73. /*< public >*/
  74. FcCharSet *(*get_charset) (PangoFcDecoder *decoder,
  75. PangoFcFont *fcfont);
  76. PangoGlyph (*get_glyph) (PangoFcDecoder *decoder,
  77. PangoFcFont *fcfont,
  78. guint32 wc);
  79. /*< private >*/
  80. /* Padding for future expansion */
  81. void (*_pango_reserved1) (void);
  82. void (*_pango_reserved2) (void);
  83. void (*_pango_reserved3) (void);
  84. void (*_pango_reserved4) (void);
  85. };
  86. GType pango_fc_decoder_get_type (void) G_GNUC_CONST;
  87. FcCharSet *pango_fc_decoder_get_charset (PangoFcDecoder *decoder,
  88. PangoFcFont *fcfont);
  89. PangoGlyph pango_fc_decoder_get_glyph (PangoFcDecoder *decoder,
  90. PangoFcFont *fcfont,
  91. guint32 wc);
  92. G_END_DECLS
  93. #endif /* __PANGO_DECODER_H_ */