latexila-utils.h 2.68 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
/*
 * This file is part of LaTeXila.
 *
 * Copyright (C) 2014 - Sébastien Wilmet <swilmet@gnome.org>
 *
 * LaTeXila is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * LaTeXila is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with LaTeXila.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef __LATEXILA_UTILS_H__
#define __LATEXILA_UTILS_H__

Sébastien Wilmet's avatar
Sébastien Wilmet committed
23
#include <gtk/gtk.h>
24 25 26

G_BEGIN_DECLS

27 28
gchar *         latexila_utils_get_shortname                    (const gchar *filename);

Sébastien Wilmet's avatar
Sébastien Wilmet committed
29 30
gchar *         latexila_utils_get_extension                    (const gchar *filename);

31 32
gchar *         latexila_utils_replace_home_dir_with_tilde      (const gchar *filename);

33 34
void            latexila_utils_register_icons                   (void);

35 36 37
GdkPixbuf *     latexila_utils_get_pixbuf_from_icon_name        (const gchar *icon_name,
                                                                 GtkIconSize  icon_size);

38 39 40 41
gchar *         latexila_utils_str_replace                      (const gchar *string,
                                                                 const gchar *search,
                                                                 const gchar *replacement);

Sébastien Wilmet's avatar
Sébastien Wilmet committed
42 43 44 45 46 47 48 49
void            latexila_utils_file_query_exists_async          (GFile               *file,
                                                                 GCancellable        *cancellable,
                                                                 GAsyncReadyCallback  callback,
                                                                 gpointer             user_data);

gboolean        latexila_utils_file_query_exists_finish         (GFile        *file,
                                                                 GAsyncResult *result);

Sébastien Wilmet's avatar
Sébastien Wilmet committed
50 51
void            latexila_utils_show_uri                         (GdkScreen    *screen,
                                                                 const gchar  *uri,
52
                                                                 guint32       timestamp,
Sébastien Wilmet's avatar
Sébastien Wilmet committed
53 54
                                                                 GError      **error);

55 56 57
gboolean        latexila_utils_create_parent_directories        (GFile   *file,
                                                                 GError **error);

58 59 60
G_END_DECLS

#endif /* __LATEXILA_UTILS_H__ */