<FILE>db</FILE>
<INCLUDE>libglabels/db.h</INCLUDE>
lglDbRegStatus
+lglDbDeleteStatus
<SUBSECTION Init Functions>
lgl_db_init
+<SUBSECTION Notification>
+lglDbNotifyFunc
+lgl_db_notify_add
+lgl_db_notify_remove
<SUBSECTION Paper Functions>
lgl_db_get_paper_id_list
lgl_db_free_paper_id_list
lgl_db_free_brand_list
<SUBSECTION Template Functions>
lgl_db_register_template
+lgl_db_delete_template_by_brand_part
+lgl_db_delete_template_by_name
lgl_db_does_template_exist
lgl_db_does_template_name_exist
lgl_db_get_template_name_list_unique
lgl_db_get_template_name_list_all
+lgl_db_get_similar_template_name_list
lgl_db_free_template_name_list
lgl_db_lookup_template_from_name
lgl_db_lookup_template_from_brand_part
lgl_db_print_known_papers
lgl_db_print_known_categories
lgl_db_print_known_templates
+lgl_db_print_known_vendors
lgl_db_print_aliases
</SECTION>
lgl_template_does_brand_match
lgl_template_does_page_size_match
lgl_template_does_category_match
+lgl_template_are_templates_identical
<SUBSECTION Alias Functions>
lgl_template_alias_new
lgl_template_alias_dup
lgl_template_frame_get_size
lgl_template_frame_get_n_labels
lgl_template_frame_get_origins
+lgl_template_frame_get_layout_description
+lgl_template_frame_get_size_description
<SUBSECTION Layout Functions>
lgl_template_layout_new
lgl_template_layout_dup
lgl_template_markup_ellipse_new
lgl_template_markup_dup
lgl_template_markup_free
+<SUBSECTION Debugging Functions>
+lgl_template_print
</SECTION>
<SECTION>
<INCLUDE>libglabels/str.h</INCLUDE>
lgl_str_utf8_casecmp
lgl_str_part_name_cmp
+lgl_str_format_fraction
</SECTION>
<!-- ##### SECTION Stability_Level ##### -->
+<!-- ##### SECTION Image ##### -->
+
+
<!-- ##### STRUCT lglCategory ##### -->
<para>
This structure defines a category.
<!-- ##### SECTION Stability_Level ##### -->
+<!-- ##### SECTION Image ##### -->
+
+
<!-- ##### ENUM lglDbRegStatus ##### -->
<para>
This enumeration defines a set of possible return values for lgl_db_register_template().
@LGL_DB_REG_BRAND_PART_EXISTS: Registration failed because template with same brand and part name/number already exists.
@LGL_DB_REG_FILE_WRITE_ERROR: Registration failed because an error while writing to disk.
+<!-- ##### ENUM lglDbDeleteStatus ##### -->
+<para>
+This enumeration defines a set of possible return values for lgl_db_delete_template_by_name() or lgl_db_delete_template_by_brand_part().
+</para>
+
+@LGL_DB_DELETE_OK: Deletion successful.
+@LGL_DB_DELETE_DOES_NOT_EXIST: Deletion failed because template with given brand and part name/number does not exist.
+@LGL_DB_DELETE_NOT_USER_DEFINED: Deletion failed because given template is not a user defined template.
+@LGL_DB_DELETE_FILE_ERROR: Deletion failed because of an error while attempting to remove template from disk.
+
<!-- ##### FUNCTION lgl_db_init ##### -->
<para>
</para>
+@void:
+
+
+<!-- ##### USER_FUNCTION lglDbNotifyFunc ##### -->
+<para>
+Defines the type of notify callback function to be called when database changes.
+</para>
+
+@user_data: Pointer to user data that is passed to the notify function.
+
+
+<!-- ##### FUNCTION lgl_db_notify_add ##### -->
+<para>
+
+</para>
+
+@func:
+@user_data:
+@Returns:
+
+
+<!-- ##### FUNCTION lgl_db_notify_remove ##### -->
+<para>
+
+</para>
+
+@id:
<!-- ##### FUNCTION lgl_db_get_paper_id_list ##### -->
</para>
+@void:
@Returns:
</para>
+@void:
@Returns:
</para>
+@void:
@Returns:
</para>
+@void:
@Returns:
@Returns:
+<!-- ##### FUNCTION lgl_db_delete_template_by_brand_part ##### -->
+<para>
+
+</para>
+
+@brand:
+@part:
+@Returns:
+
+
+<!-- ##### FUNCTION lgl_db_delete_template_by_name ##### -->
+<para>
+
+</para>
+
+@name:
+@Returns:
+
+
<!-- ##### FUNCTION lgl_db_does_template_exist ##### -->
<para>
@Returns:
+<!-- ##### FUNCTION lgl_db_get_similar_template_name_list ##### -->
+<para>
+
+</para>
+
+@name:
+@Returns:
+
+
<!-- ##### FUNCTION lgl_db_free_template_name_list ##### -->
<para>
</para>
+@void:
@Returns:
</para>
+@void:
<!-- ##### FUNCTION lgl_db_print_known_categories ##### -->
</para>
+@void:
<!-- ##### FUNCTION lgl_db_print_known_templates ##### -->
</para>
+@void:
+
+
+<!-- ##### FUNCTION lgl_db_print_known_vendors ##### -->
+<para>
+
+</para>
+
+@void:
<!-- ##### FUNCTION lgl_db_print_aliases ##### -->
<!-- ##### SECTION Stability_Level ##### -->
+<!-- ##### SECTION Image ##### -->
+
+
<!-- ##### STRUCT lglPaper ##### -->
<para>
This structure defines a paper (page) size.
<!-- ##### SECTION Stability_Level ##### -->
+<!-- ##### SECTION Image ##### -->
+
+
<!-- ##### FUNCTION lgl_str_utf8_casecmp ##### -->
<para>
@Returns:
+<!-- ##### FUNCTION lgl_str_format_fraction ##### -->
+<para>
+
+</para>
+
+@x:
+@Returns:
+
+
<!-- ##### SECTION Stability_Level ##### -->
+<!-- ##### SECTION Image ##### -->
+
+
<!-- ##### STRUCT lglTemplate ##### -->
<para>
This is the main structure of a libglabels template. A template represents a single sheet
@Returns:
+<!-- ##### FUNCTION lgl_template_are_templates_identical ##### -->
+<para>
+
+</para>
+
+@template1:
+@template2:
+@Returns:
+
+
<!-- ##### FUNCTION lgl_template_alias_new ##### -->
<para>
@Returns:
+<!-- ##### FUNCTION lgl_template_frame_get_layout_description ##### -->
+<para>
+
+</para>
+
+@frame:
+@Returns:
+
+
+<!-- ##### FUNCTION lgl_template_frame_get_size_description ##### -->
+<para>
+
+</para>
+
+@frame:
+@units:
+@Returns:
+
+
<!-- ##### FUNCTION lgl_template_layout_new ##### -->
<para>
@markup:
+<!-- ##### FUNCTION lgl_template_print ##### -->
+<para>
+
+</para>
+
+@template:
+
+
<!-- ##### SECTION Stability_Level ##### -->
+<!-- ##### SECTION Image ##### -->
+
+
<!-- ##### ENUM lglUnits ##### -->
<para>
This enumeration defines supported units of distance.
<!-- ##### SECTION Stability_Level ##### -->
+<!-- ##### SECTION Image ##### -->
+
+
<!-- ##### STRUCT lglVendor ##### -->
<para>
This structure defines a vendor.
<!-- ##### SECTION Stability_Level ##### -->
+<!-- ##### SECTION Image ##### -->
+
+
<!-- ##### FUNCTION lgl_xml_category_read_categories_from_file ##### -->
<para>
<!-- ##### SECTION Stability_Level ##### -->
+<!-- ##### SECTION Image ##### -->
+
+
<!-- ##### FUNCTION lgl_xml_paper_read_papers_from_file ##### -->
<para>
<!-- ##### SECTION Stability_Level ##### -->
+<!-- ##### SECTION Image ##### -->
+
+
<!-- ##### FUNCTION lgl_xml_template_read_templates_from_file ##### -->
<para>
<!-- ##### SECTION Stability_Level ##### -->
+<!-- ##### SECTION Image ##### -->
+
+
<!-- ##### FUNCTION lgl_xml_vendor_read_vendors_from_file ##### -->
<para>
<!-- ##### SECTION Stability_Level ##### -->
+<!-- ##### SECTION Image ##### -->
+
+
<!-- ##### MACRO LGL_XML_NAME_SPACE ##### -->
<para>
}
+/**
+ * lgl_db_notify_add:
+ * @func: Callback function to be called when database changes.
+ * @user_data: Passback user data to supply to callback function.
+ *
+ * Register a notification callback function to be called when the database changes.
+ *
+ * Returns: an ID for this notification registration.
+ */
gulong
lgl_db_notify_add (lglDbNotifyFunc func,
gpointer user_data)
}
+/**
+ * lgl_db_notify_remove:
+ * @id: ID of notification registration to cancel (see lgl_db_notify_add()).
+ *
+ * Cancel a previous registration a notification callback function.
+ */
void
lgl_db_notify_remove (gulong id)
{
}
+/**
+ * lgl_db_delete_template_by_name:
+ * @name: Name of template to be deleted.
+ *
+ * Delete a user defined template. This function deletes a template from
+ * the template database. The individual XML file in the user template
+ * directory will also be removed.
+ *
+ * Returns: Status of registration attempt (#lglDbDeleteStatus)
+ */
lglDbDeleteStatus
lgl_db_delete_template_by_name (const gchar *name)
{
}
+/**
+ * lgl_db_delete_template_by_brand_part:
+ * @brand: Brand name or vendor of template to be deleted.
+ * @part: Part name or number of template to be deleted.
+ *
+ * Delete a user defined template. This function deletes a template from
+ * the template database. The individual XML file in the user template
+ * directory will also be removed.
+ *
+ * Returns: Status of registration attempt (#lglDbDeleteStatus)
+ */
lglDbDeleteStatus
lgl_db_delete_template_by_brand_part (const gchar *brand,
const gchar *part)
}
-/****************************************************************************/
-/* Create fractional representation of number, if possible. */
-/****************************************************************************/
+/**
+ * lgl_str_format_fraction:
+ * @x: Floating point number to convert to fractional notation
+ *
+ * Create fractional representation of number, if possible. Uses UTF-8 superscripts and
+ * subscripts for numerator and denominator values respecively.
+ *
+ * Returns: UTF-8 string containing fractional representation of x.
+ */
gchar *
lgl_str_format_fraction (gdouble x)
{