24 |
# include <config.h> |
# include <config.h> |
25 |
#endif |
#endif |
26 |
|
|
27 |
|
#include <cstring> |
28 |
|
|
29 |
|
#include <glibmmconfig.h> |
30 |
|
// threads.h must be included first to be able to build with |
31 |
|
// G_DISABLE_DEPRECATED |
32 |
|
#if (GLIBMM_MAJOR_VERSION == 2 && GLIBMM_MINOR_VERSION == 31 && GLIBMM_MICRO_VERSION >= 2) || \ |
33 |
|
(GLIBMM_MAJOR_VERSION == 2 && GLIBMM_MINOR_VERSION > 31) || GLIBMM_MAJOR_VERSION > 2 |
34 |
|
#include <glibmm/threads.h> |
35 |
|
#endif |
36 |
|
|
37 |
#if !defined(WIN32) |
#if !defined(WIN32) |
38 |
# include <unistd.h> |
# include <unistd.h> |
39 |
# include <errno.h> |
# include <errno.h> |
86 |
# define GDK_KEY_Down 0xff54 |
# define GDK_KEY_Down 0xff54 |
87 |
#endif |
#endif |
88 |
|
|
89 |
|
#include <glibmm/convert.h> |
90 |
|
|
91 |
|
#define GIG_STR_ENCODING "CP1252" |
92 |
|
|
93 |
|
static inline |
94 |
|
Glib::ustring gig_to_utf8(const gig::String& gig_string) { |
95 |
|
return Glib::convert_with_fallback(gig_string, "UTF-8", GIG_STR_ENCODING, "?"); |
96 |
|
} |
97 |
|
|
98 |
|
static inline |
99 |
|
gig::String gig_from_utf8(const Glib::ustring& utf8_string) { |
100 |
|
return Glib::convert_with_fallback(utf8_string, GIG_STR_ENCODING, "UTF-8", "?"); |
101 |
|
} |
102 |
|
|
103 |
template<class T> inline std::string ToString(T o) { |
template<class T> inline std::string ToString(T o) { |
104 |
std::stringstream ss; |
std::stringstream ss; |
105 |
ss << o; |
ss << o; |