]> git.sesse.net Git - ccbs/blobdiff - bigscreen/widestring.h
Shape text using Pango and HarfBuzz; gives us nice ligatures and exotic scripts.
[ccbs] / bigscreen / widestring.h
index ca899bd5a68a5359efd09a4eb975acbc0e4bec54..1e4f9a2640cd2cd09d35af5b84cbdc5fd96f2f6a 100644 (file)
@@ -2,12 +2,29 @@
 #define _WIDESTRING_H 1
 
 #include <string>
+#include <pqxx/util>
 
 // UCS-4 string with support for getting from UTF-8
 class widestring : public std::wstring
 {
 public:
+       widestring();
+       widestring(const char *from);
+       widestring(const std::string &from);
+       widestring(const std::wstring &from);
        void operator= (const char *from);
+       std::string to_utf8() const;
 };
 
+namespace pqxx
+{
+
+template<>
+inline void from_string<widestring>(const char *from, widestring &to)
+{
+       to = from;
+}
+
+}
+
 #endif /* !defined(_WIDESTRING_H) */