![]() |
![]() |
![]() |
Conglomerate Programmer's Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
gboolean cong_util_is_docbook (CongDocument *doc); gboolean cong_util_is_pure_whitespace (const gchar *utf8_text); gchar * cong_util_cleanup_text (const gchar *text); gchar * cong_util_text_header (const gchar *text, guint truncation_length); gchar * cong_utils_get_norman_walsh_stylesheet_path (void); gchar * cong_utils_get_norman_walsh_stylesheet (const gchar *stylesheet_relative_path); GdkPixbuf * cong_util_load_icon (const gchar *icon_basename); void cong_util_append (gchar **string, const gchar *to_add); void cong_util_prepend (gchar **string, const gchar *to_add); void cong_util_print_xslfo (GtkWindow *toplevel_window, GnomePrintContext *gpc, xmlDocPtr xml_doc); #define CONG_GET_VAR_STR (msg, str) xmlDtdPtr cong_util_make_dtd (xmlDocPtr xml_doc, const gchar *root_element, const gchar *ExternalID, const gchar *SystemID); xmlDtdPtr cong_util_add_external_dtd (xmlDocPtr xml_doc, const gchar *root_element, const gchar *ExternalID, const gchar *SystemID); void cong_util_run_add_dtd_dialog (CongDocument *doc, GtkWindow *parent_window); void cong_util_draw_blended_line (GtkWidget *w, const GdkColor *col, int x0, int y0, int x1); gboolean cong_util_ns_equality (const xmlNs *xml_ns1, const xmlNs *xml_ns2); gboolean cong_util_ns_uri_equality (const gchar *uri0, const gchar *uri1); gint cong_util_ns_uri_sort_order (const gchar *uri0, const gchar *uri1); GtkWidget * cong_util_make_source_view (const gchar *source_mime_type, GtkTextView **output_text_view); GtkWidget * cong_source_view_new_full (CongDocument *doc, const gchar *source_mime_type, void (regeneration_cbCongDocument *doc,GtkTextBuffer *text_buffer) ()); gboolean cong_util_attribute_value_equality (const gchar *value0, const gchar *value1); CongElementDescription * cong_element_description_new (const gchar *ns_uri, const gchar *local_name); CongElementDescription * cong_element_description_clone (const CongElementDescription *element_desc); void cong_element_description_free (CongElementDescription *element_desc); CongNodePtr cong_element_description_make_node (const CongElementDescription *element_desc, CongDocument *doc, CongNodePtr ns_search_node); CongDispspecElement * cong_element_description_get_dispspec_element_for_doc (const CongElementDescription *element_desc, CongDocument *doc); CongDispspecElement * cong_element_description_get_dispspec_element_for_dispspec (const CongElementDescription *element_desc, CongDispspec *ds); gchar * cong_element_description_get_qualified_name (const CongElementDescription *element_desc, CongDispspec *ds); void cong_element_description_list_free (GList *list_of_element_desc); CongElementDescription * cong_util_modal_element_selection_dialog (const gchar *title, const gchar *description, CongDocument *doc, GList *elements); GtkMenuItem * cong_util_make_menu_item (const gchar *label, const gchar *tip, GdkPixbuf *pixbuf); GtkMenuItem * cong_util_make_stock_menu_item (const gchar *stock_id); void cong_util_add_menu_separator (CongPrimaryWindow *primary_window, const gchar *parent_ui_path); char * cong_util_get_qualified_attribute_name (const xmlNs *namespace, const gchar *local_attribute_name); void cong_util_show_in_window (GtkWidget *content, const gchar *title); GtkFileFilter * cong_util_make_file_filter (const gchar *name, const gchar *mime_type);
gboolean cong_util_is_docbook (CongDocument *doc);
TODO: Write me
|
|
Returns : |
gboolean cong_util_is_pure_whitespace (const gchar *utf8_text);
TODO: Write me
|
|
Returns : |
gchar * cong_util_cleanup_text (const gchar *text);
Handy function for taking UTF8 text and turning it into something you can see in a log: tabs and carriage returns etc are turned into visible characters.
|
input UTF8 text |
Returns : |
a freshly-allocated string, with all tabs and carriage returns turned into their printf equivalents |
gchar * cong_util_text_header (const gchar *text, guint truncation_length);
Handy function for taking UTF8 text and turning it into something you can use in short user-visible message: tabs and carriage returns etc are turned into spaces, and it is truncated with an ellipsis if above a certain length.
|
input UTF8 text |
|
|
Returns : |
a freshly-allocated string, cleaned up as described above |
gchar * cong_utils_get_norman_walsh_stylesheet_path (void);
Try to locate Norman Walsh's stylesheets for DocBook using the local catalog to find them.
Returns : |
a string containing the path (which the caller must delete), or NULL |
gchar * cong_utils_get_norman_walsh_stylesheet (const gchar *stylesheet_relative_path);
TODO: Write me
|
|
Returns : |
GdkPixbuf * cong_util_load_icon (const gchar *icon_basename);
TODO: Write me
|
|
Returns : |
void cong_util_append (gchar **string, const gchar *to_add);
TODO: Write me
|
|
|
void cong_util_prepend (gchar **string, const gchar *to_add);
TODO: Write me
|
|
|
void cong_util_print_xslfo (GtkWindow *toplevel_window, GnomePrintContext *gpc, xmlDocPtr xml_doc);
TODO: Write me
|
|
|
|
|
xmlDtdPtr cong_util_make_dtd (xmlDocPtr xml_doc, const gchar *root_element, const gchar *ExternalID, const gchar *SystemID);
Make DTD declaration, and assigns it to the given document. Doesn't add it to doc tree
|
|
|
|
|
|
|
|
Returns : |
the xmlDtdPtr that was assigned |
xmlDtdPtr cong_util_add_external_dtd (xmlDocPtr xml_doc, const gchar *root_element, const gchar *ExternalID, const gchar *SystemID);
Make DTD declaration, assigns it to the given document, and add it to the tree.
Call cong_document_set_external_dtd()
instead if you want notifications to work.
|
|
|
|
|
|
|
|
Returns : |
the xmlDtdPtr that was assigned |
void cong_util_run_add_dtd_dialog (CongDocument *doc, GtkWindow *parent_window);
Open a dialog for choosing a DTD to associate with the document
|
|
|
void cong_util_draw_blended_line (GtkWidget *w, const GdkColor *col, int x0, int y0, int x1);
TODO: Write me
|
|
|
|
|
|
|
|
|
gboolean cong_util_ns_equality (const xmlNs *xml_ns1, const xmlNs *xml_ns2);
Compares the namespace URIs of both namespaces. The prefixes are not checked. If both are NULL they are also equal.
|
A namespace. Can be NULL. |
|
Another namespace. Can be NULL. |
Returns : |
gboolean cong_util_ns_uri_equality (const gchar *uri0, const gchar *uri1);
Compare two namespace URIs, either or both of which can be NULL.
Currently the comparison is an exact string comparison, which might be too strict, see p118 of "Effective XML" for a discussion of ambiguities in the spec.
|
|
|
|
Returns : |
TRUE if they are the same URI (or both NULL), FALSE otherwise |
gint cong_util_ns_uri_sort_order (const gchar *uri0, const gchar *uri1);
Compare two namespace URIs, either or both of which can be NULL.
Currently the comparison is an exact string comparison, which might be too strict, see p118 of "Effective XML" for a discussion of ambiguities in the spec.
|
|
|
|
Returns : |
0 if they are the same URI (or both NULL), otherwise positive or negative to give an ordering |
GtkWidget * cong_util_make_source_view (const gchar *source_mime_type, GtkTextView **output_text_view);
|
|
|
|
Returns : |
GtkWidget * cong_source_view_new_full (CongDocument *doc, const gchar *source_mime_type, void (regeneration_cbCongDocument *doc,GtkTextBuffer *text_buffer) ());
|
|
|
|
|
|
Returns : |
gboolean cong_util_attribute_value_equality (const gchar *value0, const gchar *value1);
Compare two attribute value strings for equality; either or both might be NULL
|
|
|
|
Returns : |
TRUE if they are equal (i.e. the same string, or both are NULL) |
CongElementDescription * cong_element_description_new (const gchar *ns_uri, const gchar *local_name);
TODO: Write me
|
|
|
|
Returns : |
CongElementDescription * cong_element_description_clone (const CongElementDescription *element_desc);
TODO: Write me
|
|
Returns : |
void cong_element_description_free (CongElementDescription *element_desc);
TODO: Write me
|
CongNodePtr cong_element_description_make_node (const CongElementDescription *element_desc, CongDocument *doc, CongNodePtr ns_search_node);
TODO: Write me
|
|
|
|
|
|
Returns : |
CongDispspecElement * cong_element_description_get_dispspec_element_for_doc (const CongElementDescription *element_desc, CongDocument *doc);
TODO: Write me
|
|
|
|
Returns : |
CongDispspecElement * cong_element_description_get_dispspec_element_for_dispspec (const CongElementDescription *element_desc, CongDispspec *ds);
TODO: Write me
|
|
|
|
Returns : |
gchar * cong_element_description_get_qualified_name (const CongElementDescription *element_desc, CongDispspec *ds);
|
|
|
|
Returns : |
void cong_element_description_list_free (GList *list_of_element_desc);
TODO: Write me
|
CongElementDescription * cong_util_modal_element_selection_dialog (const gchar *title, const gchar *description, CongDocument *doc, GList *elements);
Runs a modal element selection dialog.
|
Title for the dialog |
|
Descriptive text for the dialog |
|
The document, so that dispspecs can be searched for descriptions |
|
A GList of CongElementDescription |
Returns : |
the selected element (which the caller must free), or NULL if the dialog was cancelled |
GtkMenuItem * cong_util_make_menu_item (const gchar *label, const gchar *tip, GdkPixbuf *pixbuf);
TODO: Write me
|
|
|
|
|
|
Returns : |
GtkMenuItem * cong_util_make_stock_menu_item (const gchar *stock_id);
TODO: Write me
|
|
Returns : |
void cong_util_add_menu_separator (CongPrimaryWindow *primary_window, const gchar *parent_ui_path);
Adds a separator to a menu.
|
|
|
char * cong_util_get_qualified_attribute_name (const xmlNs *namespace, const gchar *local_attribute_name);
|
Namespace of attribute (can be NULL). |
|
Local name of attribute. |
Returns : |
void cong_util_show_in_window (GtkWidget *content, const gchar *title);
Embed the chosen GtkWidget in an appropriate frame, with the application icon etc. Anything using this probably needs some HIG love.
|
|
|