Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-11-15 09:49:56

0001 /* Pango
0002  * pangofc-decoder.h: Custom encoders/decoders on a per-font basis.
0003  *
0004  * Copyright (C) 2004 Red Hat Software
0005  *
0006  * This library is free software; you can redistribute it and/or
0007  * modify it under the terms of the GNU Library General Public
0008  * License as published by the Free Software Foundation; either
0009  * version 2 of the License, or (at your option) any later version.
0010  *
0011  * This library is distributed in the hope that it will be useful,
0012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0014  * Library General Public License for more details.
0015  *
0016  * You should have received a copy of the GNU Library General Public
0017  * License along with this library; if not, write to the
0018  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
0019  * Boston, MA 02111-1307, USA.
0020  */
0021 
0022 #ifndef __PANGO_DECODER_H_
0023 #define __PANGO_DECODER_H_
0024 
0025 #include <pango/pangofc-font.h>
0026 
0027 G_BEGIN_DECLS
0028 
0029 #ifdef __GI_SCANNER__
0030 #define PANGO_FC_TYPE_DECODER                   (pango_fc_decoder_get_type())
0031 #define PANGO_FC_DECODER(object)                (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_FC_TYPE_DECODER, PangoFcDecoder))
0032 #define PANGO_FC_IS_DECODER(object)             (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_FC_TYPE_DECODER))
0033 #define PANGO_FC_DECODER_CLASS(klass)           (G_TYPE_CHECK_CLASS_CAST ((klass), PANGO_FC_TYPE_DECODER, PangoFcDecoderClass))
0034 #define PANGO_FC_IS_DECODER_CLASS(klass)        (G_TYPE_CHECK_CLASS_TYPE ((klass), PANGO_FC_TYPE_DECODER))
0035 #define PANGO_FC_DECODER_GET_CLASS(obj)         (G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_FC_TYPE_DECODER, PangoFcDecoderClass))
0036 #else
0037 #define PANGO_TYPE_FC_DECODER                   (pango_fc_decoder_get_type())
0038 #define PANGO_FC_DECODER(object)                (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FC_DECODER, PangoFcDecoder))
0039 #define PANGO_IS_FC_DECODER(object)             (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FC_DECODER))
0040 #define PANGO_FC_DECODER_CLASS(klass)           (G_TYPE_CHECK_CLASS_CAST ((klass), PANGO_TYPE_FC_DECODER, PangoFcDecoderClass))
0041 #define PANGO_IS_FC_DECODER_CLASS(klass)        (G_TYPE_CHECK_CLASS_TYPE ((klass), PANGO_TYPE_FC_DECODER))
0042 #define PANGO_FC_DECODER_GET_CLASS(obj)         (G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_TYPE_FC_DECODER, PangoFcDecoderClass))
0043 #endif
0044 
0045 typedef struct _PangoFcDecoder      PangoFcDecoder;
0046 typedef struct _PangoFcDecoderClass PangoFcDecoderClass;
0047 
0048 /**
0049  * PangoFcDecoder:
0050  *
0051  * `PangoFcDecoder` is a virtual base class that implementations will
0052  * inherit from.
0053  *
0054  * It's the interface that is used to define a custom encoding for a font.
0055  * These objects are created in your code from a function callback that was
0056  * originally registered with [method@PangoFc.FontMap.add_decoder_find_func].
0057  * Pango requires information about the supported charset for a font as well
0058  * as the individual character to glyph conversions. Pango gets that
0059  * information via the #get_charset and #get_glyph callbacks into your
0060  * object implementation.
0061  *
0062  * Since: 1.6
0063  **/
0064 struct _PangoFcDecoder
0065 {
0066   /*< private >*/
0067   GObject parent_instance;
0068 };
0069 
0070 /**
0071  * PangoFcDecoderClass:
0072  * @get_charset: This returns an `FcCharset` given a `PangoFcFont` that
0073  *  includes a list of supported characters in the font.  The
0074  *  #FcCharSet that is returned should be an internal reference to your
0075  *  code.  Pango will not free this structure.  It is important that
0076  *  you make this callback fast because this callback is called
0077  *  separately for each character to determine Unicode coverage.
0078  * @get_glyph: This returns a single `PangoGlyph` for a given Unicode
0079  *  code point.
0080  *
0081  * Class structure for `PangoFcDecoder`.
0082  *
0083  * Since: 1.6
0084  **/
0085 struct _PangoFcDecoderClass
0086 {
0087   /*< private >*/
0088   GObjectClass parent_class;
0089 
0090   /* vtable - not signals */
0091   /*< public >*/
0092   FcCharSet  *(*get_charset) (PangoFcDecoder *decoder,
0093                   PangoFcFont    *fcfont);
0094   PangoGlyph  (*get_glyph)   (PangoFcDecoder *decoder,
0095                   PangoFcFont    *fcfont,
0096                   guint32         wc);
0097 
0098   /*< private >*/
0099 
0100   /* Padding for future expansion */
0101   void (*_pango_reserved1) (void);
0102   void (*_pango_reserved2) (void);
0103   void (*_pango_reserved3) (void);
0104   void (*_pango_reserved4) (void);
0105 };
0106 
0107 PANGO_AVAILABLE_IN_1_6
0108 GType      pango_fc_decoder_get_type    (void) G_GNUC_CONST;
0109 
0110 PANGO_AVAILABLE_IN_1_6
0111 FcCharSet *pango_fc_decoder_get_charset (PangoFcDecoder *decoder,
0112                      PangoFcFont    *fcfont);
0113 
0114 PANGO_AVAILABLE_IN_1_6
0115 PangoGlyph pango_fc_decoder_get_glyph   (PangoFcDecoder *decoder,
0116                      PangoFcFont    *fcfont,
0117                      guint32         wc);
0118 
0119 G_END_DECLS
0120 
0121 #endif /* __PANGO_DECODER_H_ */
0122