PangoEngineLang

PangoEngineLang — Rendering-system independent script engines

Synopsis




            PangoEngineLang;
            PangoEngineLangClass;
#define     PANGO_ENGINE_TYPE_LANG
#define     PANGO_ENGINE_LANG_DEFINE_TYPE   (name, prefix, class_init, instance_init)


Object Hierarchy


  GObject
   +----PangoEngine
         +----PangoEngineLang

Description

Details

PangoEngineLang

typedef struct _PangoEngineLang PangoEngineLang;

The PangoEngineLang class is implemented by engines that customize the rendering-system independent part of the Pango pipeline for a particular script or language. For instance, a custom PangoEngineLang could be provided for Thai to implement the dictionary-based word boundary lookups needed for that language.


PangoEngineLangClass

typedef struct {
  void (*script_break) (PangoEngineLang *engine,
			const char    *text,
			int            len,
			PangoAnalysis *analysis,
			PangoLogAttr  *attrs,
                        int            attrs_len);
} PangoEngineLangClass;

Class structure for PangoEngineLang

script_break () Provides a custom implementation of pango_break(). if this is NULL, pango_default_break() will be used.

PANGO_ENGINE_TYPE_LANG

#define PANGO_ENGINE_TYPE_LANG "PangoEngineLang"

A string constant defining the engine type for language engines. These engines derive from PangoEngineLang.


PANGO_ENGINE_LANG_DEFINE_TYPE()

#define     PANGO_ENGINE_LANG_DEFINE_TYPE(name, prefix, class_init, instance_init)

Outputs the necessary code for GObject type registration for a PangoEngineLang class defined in a module. Two static symbols are defined.

 static GType prefix_type;
 static void prefix_register_type (GTypeModule module);

The prefix, _register_type() function should be called in your script_engine_init() function for each type that your module implements, and then your script_engine_create() function can create instances of the object as follows:

 PangoEngine *engine = g_object_new (prefix_type, NULL);

name : Name of the the type to register (for example:, ArabicEngineFc
prefix : Prefix for symbols that will be defined (for example:, arabic_engine_fc
class_init : Class initialization function for the new type, or NULL
instance_init : Instance initialization function for the new type, or NULL