GUI: Move .ui files from goffice resources to glib resources
[gnumeric.git] / src / gutils.h
blob904911f13b59371353ae51de7032935349c9eb31
1 /* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 #ifndef _GNM_GUTILS_H_
3 # define _GNM_GUTILS_H_
5 #include "gnumeric.h"
6 #include <goffice/goffice.h>
7 #include <numbers.h>
9 G_BEGIN_DECLS
11 void gutils_init (void);
12 void gutils_shutdown (void);
14 /* System and user paths */
15 char const *gnm_sys_lib_dir (void);
16 char const *gnm_sys_data_dir (void);
17 char const *gnm_sys_extern_plugin_dir (void);
18 char const *gnm_locale_dir (void);
19 char const *gnm_usr_dir (gboolean versioned);
21 gnm_float gnm_utf8_strto (const char *s, char **end);
22 long gnm_utf8_strtol (const char *s, char **end);
24 #define PLUGIN_SUBDIR "plugins"
26 int gnm_regcomp_XL (GORegexp *preg, char const *pattern, int cflags,
27 gboolean anchor_start, gboolean anchor_end);
28 int gnm_excel_search_impl (const char *needle, const char *haystack,
29 size_t skip);
31 gboolean gnm_pango_attr_list_equal (PangoAttrList const *l1, PangoAttrList const *l2);
33 /* Locale utilities */
34 typedef struct _GnmLocale GnmLocale;
35 GnmLocale *gnm_push_C_locale (void);
36 void gnm_pop_C_locale (GnmLocale *locale);
38 gboolean gnm_debug_flag (const char *flag);
40 void gnm_string_add_number (GString *buf, gnm_float d);
42 /* Some Meta handling functions */
44 void gnm_insert_meta_date (GODoc *doc, char const *name);
46 gboolean gnm_object_get_bool (gpointer o, const char *name);
47 gboolean gnm_object_has_readable_prop (gconstpointer obj,
48 const char *property,
49 GType typ, gpointer pres);
51 gint gnm_float_equal (gnm_float const *a, const gnm_float *b);
52 guint gnm_float_hash (gnm_float const *d);
54 typedef int (*GnmHashTableOrder) (gpointer key_a, gpointer val_a,
55 gpointer key_b, gpointer val_b,
56 gpointer user);
58 void gnm_hash_table_foreach_ordered (GHashTable *h,
59 GHFunc callback,
60 GnmHashTableOrder order,
61 gpointer user);
63 void gnm_xml_in_doc_dispose_on_exit (GsfXMLInDoc **pdoc);
65 Sheet *gnm_file_saver_get_sheet (GOFileSaver const *fs,
66 WorkbookView const *wbv);
67 GPtrArray *gnm_file_saver_get_sheets (GOFileSaver const *fs,
68 WorkbookView const *wbv,
69 gboolean default_all);
71 gboolean gnm_file_saver_common_export_option (GOFileSaver const *fs,
72 Workbook const *wb,
73 const char *key,
74 const char *value,
75 GError **err);
77 G_END_DECLS
79 #endif /* _GNM_GUTILS_H_ */