## CongDispspec

CongDispspec —

## Synopsis

    GdkGC*      generate_gc_for_col             (const GdkColor *col);
    CongDispspec* cong_dispspec_new             (void);
    CongDispspec* cong_dispspec_new_from_ds_file
                                                (const char *name);
    GnomeVFSResult cong_dispspec_new_from_xds_file
                                                (GnomeVFSURI *uri,
                                                 CongDispspec **ds);
    CongDispspec* cong_dispspec_new_from_xds_buffer
                                                (const char *buffer,
                                                 size_t size);
    CongDispspec* cong_dispspec_new_generate_from_xml_file
                                                (xmlDocPtr doc,
                                                 const gchar *extension);
    CongDispspec* cong_dispspec_new_generate_from_dtd
                                                (xmlDtdPtr dtd,
                                                 const gchar *name,
                                                 const gchar *description);
    void        cong_dispspec_delete            (CongDispspec *dispspec);
    xmlDocPtr   cong_dispspec_make_xml          (CongDispspec *dispspec);
    const gchar* cong_dispspec_get_name         (const CongDispspec *ds);
    const gchar* cong_dispspec_get_description  (const CongDispspec *ds);
    guint       cong_dispspec_get_num_serialisation_formats
                                                (const CongDispspec *ds);
    const CongSerialisationFormat* cong_dispspec_get_serialisation_format
                                                (const CongDispspec *ds,
                                                 guint index);
    const CongSerialisationFormat* cong_dispspec_lookup_filename_extension
                                                (const CongDispspec *ds,
                                                 const gchar *extension);
    gboolean    cong_dispspec_matches_filename_extension
                                                (const CongDispspec *ds,
                                                 const gchar *extension);
    const CongExternalDocumentModel* cong_dispspec_get_external_document_model
                                                (const CongDispspec *ds,
                                                 CongDocumentModelType model_type);
    GdkPixbuf*  cong_dispspec_get_icon          (const CongDispspec *ds);
    CongDispspecElement* cong_dispspec_lookup_element
                                                (const CongDispspec *ds,
                                                 const gchar *ns_uri,
                                                 const gchar *local_name);
    CongDispspecElement* cong_dispspec_lookup_node
                                                (const CongDispspec *ds,
                                                 CongNodePtr node);
    CongDispspecElement* cong_dispspec_get_first_element
                                                (CongDispspec *ds);
    void        cong_dispspec_for_each_element  (CongDispspec *ds,
                                                 void (*callback) (CongDispspec *ds,CongDispspecElement *ds_element,gpointer user_data),
                                                 gpointer user_data);
    void        cong_dispspec_add_element       (CongDispspec *ds,
                                                 CongDispspecElement *element);
    guint       cong_dispspec_get_num_elements  (CongDispspec *ds);
    CongDispspecElement* cong_dispspec_get_element
                                                (CongDispspec *ds,
                                                 guint index);
    GdkGC*      cong_dispspec_gc_get            (CongDispspec *ds,
                                                 CongNodePtr x,
                                                 CongDispspecGCUsage usage);
    const char* cong_dispspec_name_get          (CongDispspec *ds,
                                                 CongNodePtr node);
    gboolean    cong_dispspec_element_structural
                                                (CongDispspec *ds,
                                                 const gchar *ns_uri,
                                                 const gchar *local_name);
    gboolean    cong_dispspec_element_collapse  (CongDispspec *ds,
                                                 const gchar *ns_uri,
                                                 const gchar *local_name);
    gboolean    cong_dispspec_element_span      (CongDispspec *ds,
                                                 const gchar *ns_uri,
                                                 const gchar *local_name);
    gboolean    cong_dispspec_element_insert    (CongDispspec *ds,
                                                 const gchar *ns_uri,
                                                 const gchar *local_name);
    const gchar* cong_serialisation_format_get_extension
                                                (const CongSerialisationFormat *format);
    const gchar* cong_external_document_model_get_public_id
                                                (const CongExternalDocumentModel *model);
    const gchar* cong_external_document_model_get_system_id
                                                (const CongExternalDocumentModel *model);
    xmlNodePtr  cong_dispspec_get_template      (const CongDispspec *ds);
    gdouble     cong_dispspec_calculate_coverage
                                                (const CongDispspec *ds,
                                                 xmlDocPtr xml_doc);

## Description

## Details

### generate_gc_for_col ()

    GdkGC*      generate_gc_for_col             (const GdkColor *col);

TODO: Write me

`col` : |
Returns : |

### cong_dispspec_new ()

    CongDispspec* cong_dispspec_new             (void);

TODO: Write me

Returns : |

### cong_dispspec_new_from_ds_file ()

    CongDispspec* cong_dispspec_new_from_ds_file
                                                (const char *name);

`name` : |
Returns : |

### cong_dispspec_new_from_xds_file ()

    GnomeVFSResult cong_dispspec_new_from_xds_file
                                                (GnomeVFSURI *uri,
                                                 CongDispspec **ds);

TODO: Write me

`uri` : |
`ds` : |
Returns : |

### cong_dispspec_new_from_xds_buffer ()

    CongDispspec* cong_dispspec_new_from_xds_buffer
                                                (const char *buffer,
                                                 size_t size);

TODO: Write me

`buffer` : |
`size` : |
Returns : |

### cong_dispspec_new_generate_from_xml_file ()

    CongDispspec* cong_dispspec_new_generate_from_xml_file
                                                (xmlDocPtr doc,
                                                 const gchar *extension);

TODO: Write me

`doc` : |
`extension` : |
Returns : |

### cong_dispspec_new_generate_from_dtd ()

    CongDispspec* cong_dispspec_new_generate_from_dtd
                                                (xmlDtdPtr dtd,
                                                 const gchar *name,
                                                 const gchar *description);

TODO: Write me

`dtd` : |
`name` : |
`description` : |
Returns : |

### cong_dispspec_delete ()

    void        cong_dispspec_delete            (CongDispspec *dispspec);

TODO: Write me

`dispspec` : |

### cong_dispspec_make_xml ()

    xmlDocPtr   cong_dispspec_make_xml          (CongDispspec *dispspec);

TODO: Write me

`dispspec` : |
Returns : |

### cong_dispspec_get_name ()

    const gchar* cong_dispspec_get_name         (const CongDispspec *ds);

Get a human-readable, translated name of the dispspec, in the most appropriate language

`ds` : |
Returns : | the name

### cong_dispspec_get_description ()

    const gchar* cong_dispspec_get_description  (const CongDispspec *ds);

Get a human-readable, translated description of the dispspec, in the most appropriate language

`ds` : |
Returns : | a string description (we may update this to give HTML or similar at some point)

### cong_dispspec_get_num_serialisation_formats ()

    guint       cong_dispspec_get_num_serialisation_formats
                                                (const CongDispspec *ds);

TODO: Write me

`ds` : |
Returns : |

### cong_dispspec_get_serialisation_format ()

    const CongSerialisationFormat* cong_dispspec_get_serialisation_format
                                                (const CongDispspec *ds,
                                                 guint index);

TODO: Write me

`ds` : |
`index` : |
Returns : |

### cong_dispspec_lookup_filename_extension ()

    const CongSerialisationFormat* cong_dispspec_lookup_filename_extension
                                                (const CongDispspec *ds,
                                                 const gchar *extension);

TODO: Write me

`ds` : |
`extension` : |
Returns : |

### cong_dispspec_matches_filename_extension ()

    gboolean    cong_dispspec_matches_filename_extension
                                                (const CongDispspec *ds,
                                                 const gchar *extension);

TODO: Write me

`ds` : |
`extension` : |
Returns : |

### cong_dispspec_get_external_document_model ()

    const CongExternalDocumentModel* cong_dispspec_get_external_document_model
                                                (const CongDispspec *ds,
                                                 CongDocumentModelType model_type);

TODO: Write me

`ds` : |
`model_type` : |
Returns : |

### cong_dispspec_get_icon ()

    GdkPixbuf*  cong_dispspec_get_icon          (const CongDispspec *ds);

TODO: Write me

`ds` : |
Returns : |

### cong_dispspec_lookup_element ()

    CongDispspecElement* cong_dispspec_lookup_element
                                                (const CongDispspec *ds,
                                                 const gchar *ns_uri,
                                                 const gchar *local_name);

TODO: Write me

`ds` : |
`ns_uri` : |
`local_name` : |
Returns : |

### cong_dispspec_lookup_node ()

    CongDispspecElement* cong_dispspec_lookup_node
                                                (const CongDispspec *ds,
                                                 CongNodePtr node);

TODO: Write me

`ds` : |
`node` : |
Returns : |

### cong_dispspec_get_first_element ()

    CongDispspecElement* cong_dispspec_get_first_element
                                                (CongDispspec *ds);

TODO: Write me

`ds` : |
Returns : |

### cong_dispspec_for_each_element ()

    void        cong_dispspec_for_each_element  (CongDispspec *ds,
                                                 void (*callback) (CongDispspec *ds,CongDispspecElement *ds_element,gpointer user_data),
                                                 gpointer user_data);

TODO: Write me

`ds` : |
`callback` : |
`user_data` : |

### cong_dispspec_add_element ()

    void        cong_dispspec_add_element       (CongDispspec *ds,
                                                 CongDispspecElement *element);

TODO: Write me

`ds` : |
`element` : |

### cong_dispspec_get_num_elements ()

    guint       cong_dispspec_get_num_elements  (CongDispspec *ds);

TODO: Write me

`ds` : |
Returns : |

### cong_dispspec_get_element ()

    CongDispspecElement* cong_dispspec_get_element
                                                (CongDispspec *ds,
                                                 guint index);

TODO: Write me

`ds` : |
`index` : |
Returns : |

### cong_dispspec_gc_get ()

    GdkGC*      cong_dispspec_gc_get            (CongDispspec *ds,
                                                 CongNodePtr x,
                                                 CongDispspecGCUsage usage);

`ds` : |
`x` : |
`usage` : |
Returns : |

### cong_dispspec_name_get ()

    const char* cong_dispspec_name_get          (CongDispspec *ds,
                                                 CongNodePtr node);

TODO: Write me

`ds` : |
`node` : |
Returns : |

### cong_dispspec_element_structural ()

    gboolean    cong_dispspec_element_structural
                                                (CongDispspec *ds,
                                                 const gchar *ns_uri,
                                                 const gchar *local_name);

TODO: Write me

`ds` : |
`ns_uri` : |
`local_name` : |
Returns : |

### cong_dispspec_element_collapse ()

    gboolean    cong_dispspec_element_collapse  (CongDispspec *ds,
                                                 const gchar *ns_uri,
                                                 const gchar *local_name);

TODO: Write me

`ds` : |
`ns_uri` : |
`local_name` : |
Returns : |

### cong_dispspec_element_span ()

    gboolean    cong_dispspec_element_span      (CongDispspec *ds,
                                                 const gchar *ns_uri,
                                                 const gchar *local_name);

TODO: Write me

`ds` : |
`ns_uri` : |
`local_name` : |
Returns : |

### cong_dispspec_element_insert ()

    gboolean    cong_dispspec_element_insert    (CongDispspec *ds,
                                                 const gchar *ns_uri,
                                                 const gchar *local_name);

TODO: Write me

`ds` : |
`ns_uri` : |
`local_name` : |
Returns : |

### cong_serialisation_format_get_extension ()

    const gchar* cong_serialisation_format_get_extension
                                                (const CongSerialisationFormat *format);

`format` : |
Returns : |

### cong_external_document_model_get_public_id ()

    const gchar* cong_external_document_model_get_public_id
                                                (const CongExternalDocumentModel *model);

TODO: Write me

`model` : |
Returns : |

### cong_external_document_model_get_system_id ()

    const gchar* cong_external_document_model_get_system_id
                                                (const CongExternalDocumentModel *model);

TODO: Write me

`model` : |
Returns : |

### cong_dispspec_get_template ()

    xmlNodePtr  cong_dispspec_get_template      (const CongDispspec *ds);

TODO: Write me

`ds` : |
Returns : |

### cong_dispspec_calculate_coverage ()

    gdouble     cong_dispspec_calculate_coverage
                                                (const CongDispspec *ds,
                                                 xmlDocPtr xml_doc);

Calculate the proportion of elements without namespaces in the document that are covered by this dispspec.

`ds` : | a dispspec
`xml_doc` : | a document
Returns : | a fraction between 0.0 and 1.0. If all elements have namespaces, 0.0 is returned