00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef UTILITIES_H
00023 #define UTILITIES_H
00024
00025 #include <glibmm/ustring.h>
00026
00027 #include "iohandler.h"
00028
00030 namespace Utils {
00031
00033 namespace FS {
00034
00038 Glib::ustring cwd();
00039
00044 void move(const Glib::ustring &from, Glib::ustring &to);
00045
00050 bool dir_exists(const Glib::ustring &path);
00051
00055 void make_dir(const Glib::ustring &path);
00056
00060 void remove_dir(const Glib::ustring &path);
00061
00062 }
00063
00065 void flush_events();
00066
00073 void calculate_center(int width, int height, int &x, int &y);
00074
00079 Glib::ustring io_error_to_str(const IO::Code &code);
00080
00087 Glib::ustring exception_string(const Glib::ustring &reason, const Glib::ustring &file, int line);
00088
00093 Glib::ustring to_string(int val);
00094
00099 Glib::ustring extract_block_id(const Glib::ustring str);
00100
00105 Glib::ustring extract_block_description(const Glib::ustring &str);
00106
00107 };
00108
00109 #endif