Up to Lgi...
- Added support for converting between UTF-8 and UTF-16:
void *GdcConvertUtf(int OutBits, void *In, int InBits, int Len = -1);
- Added UTF-16 API to the GFont object for drawing and sizing Unicode text:
// Unicode void TextW( GSurface *pDC, int x, int y, uint16 *Str, int Len = -1, GRegion *r = 0, int TabOrigin = 0); void SizeW( int *x, int *y, uint16 *Str, int Len = -1, int Flags = 0); int XW(uint16 *Str, int Len = -1); int YW(uint16 *Str, int Len = -1); int CharAtW(int x, uint16 *Str, int Len = -1, int TabOffset = 0);The new api is implemented in _Common/Gdc2/Font/GFont_W.cpp and the old 8bit part of the api is now in _Common/Gdc2/Font/GFont_A.cpp, common parts of the GFont object havn't changed file, but they are in the Font subdirectory instead of Gdc2.
- Added UTF-16 versions of the string handling functions:
char16 *StrchrW(char16 *s, char16 c); char16 *StrrchrW(char16 *s, char16 c); char16 *StrnchrW(char16 *s, char16 c, int Len); char16 *StrstrW(char16 *a, char16 *b); char16 *StristrW(char16 *a, char16 *b); char16 *StrnstrW(char16 *a, char16 *b, int n); char16 *StrnistrW(char16 *a, char16 *b, int n); int StrcmpW(char16 *a, char16 *b); int StricmpW(char16 *a, char16 *b); int StrncmpW(char16 *a, char16 *b, int n); int StrnicmpW(char16 *a, char16 *b, int n); char16 *StrcpyW(char16 *a, char16 *b); char16 *StrncpyW(char16 *a, char16 *b, int n); int StrlenW(char16 *a); int HtoiW(char16 *a); char16 *NewStrW(char16 *s, int Len = -1); char16 *TrimStrW(char16 *s, char16 *Delim = L" "); bool ValidStrW(char16 *s);All these functions are not dependent on the OS for anything. They aren't aware of unicode chars, there are mearly ports of the 8bit versions. However that doesn't need to remain that way forever. They are all NULL pointer safe and behave the same as their namesake except for StrncpyW which always appends a NULL as the last character if it runs out of space. strncpy (at least on some platforms) doesn't. StrlenW will return the number of 16bit shorts before the NULL, not the number of characters, as some UTF-16 characters can be 32bits long.
- Added UTF-16 functions for getting and setting a GView's name:
virtual bool NameW(char16 *n); virtual char16 *NameW();Currently the string is not cached in the object like the 8 bit version when there is no actual OS Handle (HWND etc).
- Added a UTF-16 version of the editor object GTextView. It's in _Common/Include/GTextView3.h and _Common/Text/GTextView3.cpp. The ::Name(char *) and char *Name() function convert to/from UTF-8 from the internal UTF-16 representation.
- Changed the default button handling to be internal and thus consistant across platforms.
- [Win32] Added arrow key support onto the combo box.
- [Win32] Fixed some problems in dran'n'drop.
- Intergrated printer support from Scribe.
- Added GVariant class for making generic LGI API's talk together.
- Changed the implementation of GToken to use only 2 memory blocks instead of one block for each token and also changed increased the execution speed through a lookup table approach.