## Modules

Modules — Support for loadable modules

## Synopsis

    struct      PangoIncludedModule;
    struct      PangoMap;
    struct      PangoMapEntry;
    PangoMap*   pango_find_map                  (PangoLanguage *language,
                                                 guint engine_type_id,
                                                 guint render_type_id);
    PangoMapEntry* pango_map_get_entry          (PangoMap *map,
                                                 guint32 wc);
    PangoEngine* pango_map_get_engine           (PangoMap *map,
                                                 guint32 wc);
    void        pango_module_register           (PangoIncludedModule *module);

## Description

## Details

### struct PangoIncludedModule

    struct PangoIncludedModule {

      void (*list) (PangoEngineInfo **engines, int *n_engines);
      PangoEngine *(*load) (const char *id);
      void (*unload) (PangoEngine *engine);
    };

The PangoIncludedModule structure for a statically linked module contains the functions that would otherwise be loaded from a dynamically loaded module.

### struct PangoMap

    struct PangoMap;

A PangoMap structure can be used to determine the engine to use for each character.

### struct PangoMapEntry

    struct PangoMapEntry {

      PangoEngineInfo *info;
      gboolean is_exact;
    };

A PangoMapEntry contains information about the engine that should be used for the codepoint to which this entry belongs and also whether the engine matches the language tag for this entry's map exactly or just approximately.

### pango_find_map ()

    PangoMap*   pango_find_map                  (PangoLanguage *language,
                                                 guint engine_type_id,
                                                 guint render_type_id);

Locate a PangoMap for a particular engine type and render type. The resulting map can be used to determine the engine for each character.

`language` : | the language tag for which to find the map
`engine_type_id` : | the engine type for the map to find
`render_type_id` : | the render type for the map to find
Returns : |

### pango_map_get_entry ()

    PangoMapEntry* pango_map_get_entry          (PangoMap *map,
                                                 guint32 wc);

Returns the entry in the map for a given codepoint. The entry contains information about the engine that should be used for the codepoint and also whether the engine matches the language tag for which the map was created exactly or just approximately.

`map` : | a PangoMap
`wc` : | an ISO-10646 codepoint
Returns : | the PangoMapEntry for the codepoint. This value is owned by the PangoMap and should not be freed.

### pango_map_get_engine ()

    PangoEngine* pango_map_get_engine           (PangoMap *map,
                                                 guint32 wc);

Returns the engine listed in the map for a given codepoint.

`map` : | a PangoMap
`wc` : | an ISO-10646 codepoint
Returns : | the engine, if one is listed for the codepoint, or `NULL`. The lookup may cause the engine to be loaded; once an engine is loaded

### pango_module_register ()

    void        pango_module_register           (PangoIncludedModule *module);

Registers a statically linked module with Pango. The PangoIncludedModule structure that is passed in contains the functions that would otherwise be loaded from a dynamically loaded module.

`module` : | a PangoIncludedModule