00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef FXDEFS_H
00025 #define FXDEFS_H
00026
00027
00028
00029
00030
00031 #ifndef TRUE
00032 #define TRUE 1
00033 #endif
00034 #ifndef FALSE
00035 #define FALSE 0
00036 #endif
00037 #ifndef MAYBE
00038 #define MAYBE 2
00039 #endif
00040 #ifndef NULL
00041 #define NULL 0
00042 #endif
00043
00044
00045 #ifndef PI
00046 #define PI 3.1415926535897932384626433833
00047 #endif
00048
00049
00050 #define EULER 2.7182818284590452353602874713
00051
00052
00053 #define DTOR 0.0174532925199432957692369077
00054
00055
00056 #define RTOD 57.295779513082320876798154814
00057
00058
00059
00060 #ifdef WIN32
00061 #define PATHSEP '\\'
00062 #define PATHSEPSTRING "\\"
00063 #define PATHLISTSEP ';'
00064 #define PATHLISTSEPSTRING ";"
00065 #define ISPATHSEP(c) ((c)=='/' || (c)=='\\')
00066 #else
00067 #define PATHSEP '/'
00068 #define PATHSEPSTRING "/"
00069 #define PATHLISTSEP ':'
00070 #define PATHLISTSEPSTRING ":"
00071 #define ISPATHSEP(c) ((c)=='/')
00072 #endif
00073
00074
00075 #ifdef WIN32
00076 #define ENDLINE "\r\n"
00077 #else
00078 #define ENDLINE "\n"
00079 #endif
00080
00081
00082
00083 #ifdef _DEBUG
00084 #ifndef DEBUG
00085 #define DEBUG
00086 #endif
00087 #endif
00088 #ifdef _NDEBUG
00089 #ifndef NDEBUG
00090 #define NDEBUG
00091 #endif
00092 #endif
00093
00094
00095
00096 #ifdef WIN32
00097 #define FXLOCAL
00098 #define FXEXPORT __declspec(dllexport)
00099 #define FXIMPORT __declspec(dllimport)
00100 #else
00101 #if defined(__GNUC__) && (__GNUC__ >= 4)
00102 #define FXLOCAL __attribute__ ((visibility("hidden")))
00103 #define FXEXPORT __attribute__ ((visibility("default")))
00104 #define FXIMPORT
00105 #else
00106 #define FXLOCAL
00107 #define FXEXPORT
00108 #define FXIMPORT
00109 #endif
00110 #endif
00111
00112
00113 #ifdef FOXDLL
00114 #ifdef FOXDLL_EXPORTS
00115 #define FXAPI FXEXPORT
00116 #define FXTEMPLATE_EXTERN
00117 #else
00118 #define FXAPI FXIMPORT
00119 #define FXTEMPLATE_EXTERN extern
00120 #endif
00121 #else
00122 #define FXAPI
00123 #define FXTEMPLATE_EXTERN
00124 #endif
00125
00126
00127 #ifdef WIN32
00128 #ifndef CALLBACK
00129 #define CALLBACK __stdcall
00130 #endif
00131 #endif
00132
00133
00134
00135 #ifdef _MSC_VER
00136 #pragma warning(disable: 4251)
00137 #pragma warning(disable: 4231)
00138 #pragma warning(disable: 4244)
00139 #endif
00140
00141
00142 #if defined(_CC_GNU_) || defined(__GNUG__) || defined(__GNUC__)
00143 #define FX_PRINTF(fmt,arg) __attribute__((format(printf,fmt,arg)))
00144 #define FX_SCANF(fmt,arg) __attribute__((format(scanf,fmt,arg)))
00145 #else
00146 #define FX_PRINTF(fmt,arg)
00147 #define FX_SCANF(fmt,arg)
00148 #endif
00149
00150
00151 #ifndef WIN32
00152 union _XEvent;
00153 #else
00154 struct tagMSG;
00155 #endif
00156
00157
00158 namespace FX {
00159
00160
00161
00162 enum FXSelType {
00163 SEL_NONE,
00164 SEL_KEYPRESS,
00165 SEL_KEYRELEASE,
00166 SEL_LEFTBUTTONPRESS,
00167 SEL_LEFTBUTTONRELEASE,
00168 SEL_MIDDLEBUTTONPRESS,
00169 SEL_MIDDLEBUTTONRELEASE,
00170 SEL_RIGHTBUTTONPRESS,
00171 SEL_RIGHTBUTTONRELEASE,
00172 SEL_MOTION,
00173 SEL_ENTER,
00174 SEL_LEAVE,
00175 SEL_FOCUSIN,
00176 SEL_FOCUSOUT,
00177 SEL_KEYMAP,
00178 SEL_UNGRABBED,
00179 SEL_PAINT,
00180 SEL_CREATE,
00181 SEL_DESTROY,
00182 SEL_UNMAP,
00183 SEL_MAP,
00184 SEL_CONFIGURE,
00185 SEL_SELECTION_LOST,
00186 SEL_SELECTION_GAINED,
00187 SEL_SELECTION_REQUEST,
00188 SEL_RAISED,
00189 SEL_LOWERED,
00190 SEL_CLOSE,
00191 SEL_DELETE,
00192 SEL_MINIMIZE,
00193 SEL_RESTORE,
00194 SEL_MAXIMIZE,
00195 SEL_UPDATE,
00196 SEL_COMMAND,
00197 SEL_CLICKED,
00198 SEL_DOUBLECLICKED,
00199 SEL_TRIPLECLICKED,
00200 SEL_MOUSEWHEEL,
00201 SEL_CHANGED,
00202 SEL_VERIFY,
00203 SEL_DESELECTED,
00204 SEL_SELECTED,
00205 SEL_INSERTED,
00206 SEL_REPLACED,
00207 SEL_DELETED,
00208 SEL_OPENED,
00209 SEL_CLOSED,
00210 SEL_EXPANDED,
00211 SEL_COLLAPSED,
00212 SEL_BEGINDRAG,
00213 SEL_ENDDRAG,
00214 SEL_DRAGGED,
00215 SEL_LASSOED,
00216 SEL_TIMEOUT,
00217 SEL_SIGNAL,
00218 SEL_CLIPBOARD_LOST,
00219 SEL_CLIPBOARD_GAINED,
00220 SEL_CLIPBOARD_REQUEST,
00221 SEL_CHORE,
00222 SEL_FOCUS_SELF,
00223 SEL_FOCUS_RIGHT,
00224 SEL_FOCUS_LEFT,
00225 SEL_FOCUS_DOWN,
00226 SEL_FOCUS_UP,
00227 SEL_FOCUS_NEXT,
00228 SEL_FOCUS_PREV,
00229 SEL_DND_ENTER,
00230 SEL_DND_LEAVE,
00231 SEL_DND_DROP,
00232 SEL_DND_MOTION,
00233 SEL_DND_REQUEST,
00234 SEL_IO_READ,
00235 SEL_IO_WRITE,
00236 SEL_IO_EXCEPT,
00237 SEL_PICKED,
00238 SEL_QUERY_TIP,
00239 SEL_QUERY_HELP,
00240 SEL_DOCKED,
00241 SEL_FLOATED,
00242 SEL_SESSION_NOTIFY,
00243 SEL_SESSION_CLOSED,
00244 SEL_LAST
00245 };
00246
00247
00248
00249 enum {
00250 SHIFTMASK = 0x001,
00251 CAPSLOCKMASK = 0x002,
00252 CONTROLMASK = 0x004,
00253 #ifdef __APPLE__
00254 ALTMASK = 0x2000,
00255 METAMASK = 0x10,
00256 #else
00257 ALTMASK = 0x008,
00258 METAMASK = 0x040,
00259 #endif
00260 NUMLOCKMASK = 0x010,
00261 SCROLLLOCKMASK = 0x0E0,
00262 LEFTBUTTONMASK = 0x100,
00263 MIDDLEBUTTONMASK = 0x200,
00264 RIGHTBUTTONMASK = 0x400
00265 };
00266
00267
00268
00269 enum {
00270 LEFTBUTTON = 1,
00271 MIDDLEBUTTON = 2,
00272 RIGHTBUTTON = 3
00273 };
00274
00275
00276
00277 enum {
00278 CROSSINGNORMAL,
00279 CROSSINGGRAB,
00280 CROSSINGUNGRAB
00281 };
00282
00283
00284
00285 enum {
00286 VISIBILITYTOTAL,
00287 VISIBILITYPARTIAL,
00288 VISIBILITYNONE
00289 };
00290
00291
00292
00293 enum {
00294 FILEMATCH_FILE_NAME = 1,
00295 FILEMATCH_NOESCAPE = 2,
00296 FILEMATCH_PERIOD = 4,
00297 FILEMATCH_LEADING_DIR = 8,
00298 FILEMATCH_CASEFOLD = 16
00299 };
00300
00301
00302
00303 enum FXDragAction {
00304 DRAG_REJECT = 0,
00305 DRAG_ACCEPT = 1,
00306 DRAG_COPY = 2,
00307 DRAG_MOVE = 3,
00308 DRAG_LINK = 4,
00309 DRAG_PRIVATE = 5
00310 };
00311
00312
00313
00314 enum FXDNDOrigin {
00315 FROM_SELECTION = 0,
00316 FROM_CLIPBOARD = 1,
00317 FROM_DRAGNDROP = 2
00318 };
00319
00320
00321
00322 enum FXExponent {
00323 EXP_NEVER=FALSE,
00324 EXP_ALWAYS=TRUE,
00325 EXP_AUTO=MAYBE
00326 };
00327
00328
00329
00330 enum {
00331 SEARCH_FORWARD = 0,
00332 SEARCH_BACKWARD = 1,
00333 SEARCH_NOWRAP = 0,
00334 SEARCH_WRAP = 2,
00335 SEARCH_EXACT = 0,
00336 SEARCH_IGNORECASE = 4,
00337 SEARCH_REGEX = 8,
00338 SEARCH_PREFIX = 16
00339 };
00340
00341
00342
00343
00344
00345 class FXObject;
00346 class FXStream;
00347 class FXString;
00348
00349
00350
00351 typedef char FXchar;
00352 typedef unsigned char FXuchar;
00353 typedef FXuchar FXbool;
00354 typedef unsigned short FXushort;
00355 typedef short FXshort;
00356 typedef unsigned int FXuint;
00357 typedef int FXint;
00358 typedef float FXfloat;
00359 typedef double FXdouble;
00360 typedef FXObject *FXObjectPtr;
00361 #ifdef WIN32
00362 typedef unsigned int FXwchar;
00363 #if defined(_MSC_VER) && !defined(_NATIVE_WCHAR_T_DEFINED)
00364 typedef unsigned short FXnchar;
00365 #elif defined(__WATCOM_INT64__)
00366 typedef long char FXnchar;
00367 #else
00368 typedef wchar_t FXnchar;
00369 #endif
00370 #else
00371 typedef wchar_t FXwchar;
00372 typedef unsigned short FXnchar;
00373 #endif
00374 #if defined(__LP64__) || defined(_LP64) || (_MIPS_SZLONG == 64) || (__WORDSIZE == 64)
00375 typedef unsigned long FXulong;
00376 typedef long FXlong;
00377 #elif defined(_MSC_VER) || (defined(__BCPLUSPLUS__) && __BORLANDC__ > 0x500) || defined(__WATCOM_INT64__)
00378 typedef unsigned __int64 FXulong;
00379 typedef __int64 FXlong;
00380 #elif defined(__GNUG__) || defined(__GNUC__) || defined(__SUNPRO_CC) || defined(__MWERKS__) || defined(__SC__) || defined(_LONGLONG)
00381 typedef unsigned long long FXulong;
00382 typedef long long FXlong;
00383 #else
00384 #error "FXlong and FXulong not defined for this architecture!"
00385 #endif
00386
00387
00388 #if defined(_MSC_VER) && defined(_WIN64)
00389 typedef __int64 FXival;
00390 typedef unsigned __int64 FXuval;
00391 #else
00392 typedef long FXival;
00393 typedef unsigned long FXuval;
00394 #endif
00395
00396
00397
00398 #ifndef WIN32
00399 typedef unsigned long FXID;
00400 #else
00401 typedef void* FXID;
00402 #endif
00403
00404
00405 typedef long FXTime;
00406
00407
00408 typedef unsigned long FXPixel;
00409
00410
00411 typedef FXuint FXColor;
00412
00413
00414 typedef FXuint FXHotKey;
00415
00416
00417 #ifndef WIN32
00418 typedef FXID FXDragType;
00419 #else
00420 typedef FXushort FXDragType;
00421 #endif
00422
00423
00424 #ifndef WIN32
00425 typedef FXint FXInputHandle;
00426 #else
00427 typedef void* FXInputHandle;
00428 #endif
00429
00430
00431 #ifndef WIN32
00432 typedef _XEvent FXRawEvent;
00433 #else
00434 typedef tagMSG FXRawEvent;
00435 #endif
00436
00437
00438
00439
00440
00441
00442 #define FXABS(val) (((val)>=0)?(val):-(val))
00443
00444
00445 #define FXMAX(a,b) (((a)>(b))?(a):(b))
00446
00447
00448 #define FXMIN(a,b) (((a)>(b))?(b):(a))
00449
00450
00451 #define FXMIN3(x,y,z) ((x)<(y)?FXMIN(x,z):FXMIN(y,z))
00452
00453
00454 #define FXMAX3(x,y,z) ((x)>(y)?FXMAX(x,z):FXMAX(y,z))
00455
00456
00457 #define FXMIN4(x,y,z,w) (FXMIN(FXMIN(x,y),FXMIN(z,w)))
00458
00459
00460 #define FXMAX4(x,y,z,w) (FXMAX(FXMAX(x,y),FXMAX(z,w)))
00461
00462
00463 #define FXMINMAX(lo,hi,a,b) ((a)<(b)?((lo)=(a),(hi)=(b)):((lo)=(b),(hi)=(a)))
00464
00465
00466 #define FXCLAMP(lo,x,hi) ((x)<(lo)?(lo):((x)>(hi)?(hi):(x)))
00467
00468
00469 #define FXSWAP(a,b,t) ((t)=(a),(a)=(b),(b)=(t))
00470
00471
00472 #define FXLERP(a,b,f) ((a)+((b)-(a))*(f))
00473
00474
00475 #define STRUCTOFFSET(str,member) (((char *)(&(((str *)0)->member)))-((char *)0))
00476
00477
00478 #define ARRAYNUMBER(array) (sizeof(array)/sizeof(array[0]))
00479
00480
00481 #define CONTAINER(ptr,str,mem) ((str*)(((char*)(ptr))-STRUCTOFFSET(str,mem)))
00482
00483
00484 #define MKUINT(l,h) ((((FX::FXuint)(l))&0xffff) | (((FX::FXuint)(h))<<16))
00485
00486
00487 #define FXSEL(type,id) ((((FX::FXuint)(id))&0xffff) | (((FX::FXuint)(type))<<16))
00488
00489
00490 #define FXSELTYPE(s) ((FX::FXushort)(((s)>>16)&0xffff))
00491
00492
00493 #define FXSELID(s) ((FX::FXushort)((s)&0xffff))
00494
00495
00496 #define FXBITREVERSE(b) (((b&0x01)<<7)|((b&0x02)<<5)|((b&0x04)<<3)|((b&0x08)<<1)|((b&0x10)>>1)|((b&0x20)>>3)|((b&0x40)>>5)|((b&0x80)>>7))
00497
00498
00499 #define FXISUTF(c) (((c)&0xC0)!=0x80)
00500
00501
00502
00503 #if FOX_BIGENDIAN == 1
00504
00505
00506 #define FXRGBA(r,g,b,a) (((FX::FXuint)(FX::FXuchar)(r)<<24) | ((FX::FXuint)(FX::FXuchar)(g)<<16) | ((FX::FXuint)(FX::FXuchar)(b)<<8) | ((FX::FXuint)(FX::FXuchar)(a)))
00507
00508
00509 #define FXRGB(r,g,b) (((FX::FXuint)(FX::FXuchar)(r)<<24) | ((FX::FXuint)(FX::FXuchar)(g)<<16) | ((FX::FXuint)(FX::FXuchar)(b)<<8) | 0x000000ff)
00510
00511
00512 #define FXREDVAL(rgba) ((FX::FXuchar)(((rgba)>>24)&0xff))
00513
00514
00515 #define FXGREENVAL(rgba) ((FX::FXuchar)(((rgba)>>16)&0xff))
00516
00517
00518 #define FXBLUEVAL(rgba) ((FX::FXuchar)(((rgba)>>8)&0xff))
00519
00520
00521 #define FXALPHAVAL(rgba) ((FX::FXuchar)((rgba)&0xff))
00522
00523
00524 #define FXRGBACOMPVAL(rgba,comp) ((FX::FXuchar)(((rgba)>>((3-(comp))<<3))&0xff))
00525
00526 #endif
00527
00528
00529
00530 #if FOX_BIGENDIAN == 0
00531
00532
00533 #define FXRGBA(r,g,b,a) (((FX::FXuint)(FX::FXuchar)(r)) | ((FX::FXuint)(FX::FXuchar)(g)<<8) | ((FX::FXuint)(FX::FXuchar)(b)<<16) | ((FX::FXuint)(FX::FXuchar)(a)<<24))
00534
00535
00536 #define FXRGB(r,g,b) (((FX::FXuint)(FX::FXuchar)(r)) | ((FX::FXuint)(FX::FXuchar)(g)<<8) | ((FX::FXuint)(FX::FXuchar)(b)<<16) | 0xff000000)
00537
00538
00539 #define FXREDVAL(rgba) ((FX::FXuchar)((rgba)&0xff))
00540
00541
00542 #define FXGREENVAL(rgba) ((FX::FXuchar)(((rgba)>>8)&0xff))
00543
00544
00545 #define FXBLUEVAL(rgba) ((FX::FXuchar)(((rgba)>>16)&0xff))
00546
00547
00548 #define FXALPHAVAL(rgba) ((FX::FXuchar)(((rgba)>>24)&0xff))
00549
00550
00551 #define FXRGBACOMPVAL(rgba,comp) ((FX::FXuchar)(((rgba)>>((comp)<<3))&0xff))
00552
00553 #endif
00554
00555
00556
00557
00558
00559
00560
00561
00562
00563 #ifndef NDEBUG
00564 #define FXASSERT(exp) ((exp)?((void)0):(void)FX::fxassert(#exp,__FILE__,__LINE__))
00565 #else
00566 #define FXASSERT(exp) ((void)0)
00567 #endif
00568
00569
00570
00571
00572
00573
00574
00575
00576
00577
00578
00579
00580
00581
00582 #ifndef NDEBUG
00583 #define FXTRACE(arguments) FX::fxtrace arguments
00584 #else
00585 #define FXTRACE(arguments) ((void)0)
00586 #endif
00587
00588
00589
00590
00591
00592
00593
00594
00595 #define FXMALLOC(ptr,type,no) (FX::fxmalloc((void **)(ptr),sizeof(type)*(no)))
00596
00597
00598
00599
00600
00601
00602
00603 #define FXCALLOC(ptr,type,no) (FX::fxcalloc((void **)(ptr),sizeof(type)*(no)))
00604
00605
00606
00607
00608
00609
00610
00611
00612
00613
00614 #define FXRESIZE(ptr,type,no) (FX::fxresize((void **)(ptr),sizeof(type)*(no)))
00615
00616
00617
00618
00619
00620
00621
00622
00623 #define FXMEMDUP(ptr,src,type,no) (FX::fxmemdup((void **)(ptr),(const void*)(src),sizeof(type)*(no)))
00624
00625
00626
00627
00628
00629
00630
00631 #define FXFREE(ptr) (FX::fxfree((void **)(ptr)))
00632
00633
00634
00635
00636
00637
00638
00639
00640
00641
00642 #ifdef __OpenBSD__
00643 #define FLOAT_MATH_FUNCTIONS
00644 #endif
00645 #ifndef FLOAT_MATH_FUNCTIONS
00646 #ifndef __USE_ISOC99
00647 #ifndef __APPLE__
00648 #define fabsf(x) ((float)fabs((double)(x)))
00649 #define ceilf(x) ((float)ceil((double)(x)))
00650 #define floorf(x) ((float)floor((double)(x)))
00651 #define fmodf(x,y) ((float)fmod((double)(x),(double)(y)))
00652 #endif
00653 #define sqrtf(x) ((float)sqrt((double)(x)))
00654 #define sinf(x) ((float)sin((double)(x)))
00655 #define cosf(x) ((float)cos((double)(x)))
00656 #define tanf(x) ((float)tan((double)(x)))
00657 #define asinf(x) ((float)asin((double)(x)))
00658 #define acosf(x) ((float)acos((double)(x)))
00659 #define atanf(x) ((float)atan((double)(x)))
00660 #define atan2f(y,x) ((float)atan2((double)(y),(double)(x)))
00661 #define powf(x,y) ((float)pow((double)(x),(double)(y)))
00662 #define expf(x) ((float)exp((double)(x)))
00663 #define logf(x) ((float)log((double)(x)))
00664 #define log10f(x) ((float)log10((double)(x)))
00665 #endif
00666 #endif
00667
00668
00669
00670
00671
00672 extern FXAPI FXuint fxrandom(FXuint& seed);
00673
00674
00675 extern FXAPI FXint fxmalloc(void** ptr,unsigned long size);
00676
00677
00678 extern FXAPI FXint fxcalloc(void** ptr,unsigned long size);
00679
00680
00681 extern FXAPI FXint fxresize(void** ptr,unsigned long size);
00682
00683
00684 extern FXAPI FXint fxmemdup(void** ptr,const void* src,unsigned long size);
00685
00686
00687 extern FXAPI void fxfree(void** ptr);
00688
00689
00690 extern FXAPI void fxerror(const char* format,...) FX_PRINTF(1,2) ;
00691
00692
00693 extern FXAPI void fxwarning(const char* format,...) FX_PRINTF(1,2) ;
00694
00695
00696 extern FXAPI void fxmessage(const char* format,...) FX_PRINTF(1,2) ;
00697
00698
00699 extern FXAPI void fxassert(const char* expression,const char* filename,unsigned int lineno);
00700
00701
00702 extern FXAPI void fxtrace(unsigned int level,const char* format,...) FX_PRINTF(2,3) ;
00703
00704
00705 extern FXAPI void fxsleep(unsigned int n);
00706
00707
00708 extern FXAPI bool fxfilematch(const char *pattern,const char *string,FXuint flags=(FILEMATCH_NOESCAPE|FILEMATCH_FILE_NAME));
00709
00710
00711 extern FXAPI FXColor makeHiliteColor(FXColor clr);
00712
00713
00714 extern FXAPI FXColor makeShadowColor(FXColor clr);
00715
00716
00717 extern FXAPI FXint fxgetpid();
00718
00719
00720 extern FXAPI bool fxtoDOS(FXchar*& string,FXint& len);
00721
00722
00723 extern FXAPI bool fxfromDOS(FXchar*& string,FXint& len);
00724
00725
00726 extern FXAPI FXchar *fxstrdup(const FXchar* str);
00727
00728
00729 extern FXAPI FXuint fxstrhash(const FXchar* str);
00730
00731
00732 extern FXAPI FXColor fxcolorfromname(const FXchar* colorname);
00733
00734
00735 extern FXAPI FXchar* fxnamefromcolor(FXchar *colorname,FXColor color);
00736
00737
00738 extern FXAPI void fxrgb_to_hsv(FXfloat& h,FXfloat& s,FXfloat& v,FXfloat r,FXfloat g,FXfloat b);
00739
00740
00741 extern FXAPI void fxhsv_to_rgb(FXfloat& r,FXfloat& g,FXfloat& b,FXfloat h,FXfloat s,FXfloat v);
00742
00743
00744 extern FXAPI FXint fxieeefloatclass(FXfloat number);
00745 extern FXAPI FXint fxieeedoubleclass(FXdouble number);
00746
00747
00748 extern FXAPI FXwchar fxkeysym2ucs(FXwchar sym);
00749
00750
00751 extern FXAPI FXwchar fxucs2keysym(FXwchar ucs);
00752
00753
00754 extern FXAPI FXint fxparsegeometry(const FXchar *string,FXint& x,FXint& y,FXint& w,FXint& h);
00755
00756
00757 extern FXAPI FXbool fxisconsole(const FXchar *path);
00758
00759
00760 extern FXAPI const FXuchar fxversion[3];
00761
00762
00763 extern FXAPI unsigned int fxTraceLevel;
00764
00765
00766 extern FXAPI FXwchar wc(const FXchar *ptr);
00767
00768
00769 extern FXAPI FXwchar wc(const FXnchar *ptr);
00770
00771
00772 extern FXAPI FXint wclen(const FXchar *ptr);
00773
00774
00775 extern FXAPI FXint wclen(const FXnchar *ptr);
00776
00777
00778 extern FXAPI FXint wcvalidate(const FXchar* string,FXint pos);
00779
00780
00781 extern FXAPI FXint wcvalidate(const FXnchar *string,FXint pos);
00782
00783
00784 extern FXAPI FXint wcinc(const FXchar* string,FXint pos);
00785
00786
00787 extern FXAPI FXint wcinc(const FXnchar *string,FXint pos);
00788
00789
00790 extern FXAPI FXint wcdec(const FXchar* string,FXint pos);
00791
00792
00793 extern FXAPI FXint wcdec(const FXnchar *string,FXint pos);
00794
00795
00796 extern FXAPI FXint utfslen(const FXwchar *str,FXint n);
00797
00798
00799 extern FXAPI FXint utfslen(const FXwchar *str);
00800
00801
00802 extern FXAPI FXint utfslen(const FXnchar *str,FXint n);
00803
00804
00805 extern FXAPI FXint utfslen(const FXnchar *str);
00806
00807
00808 extern FXAPI FXint wcslen(const FXchar *str,FXint n);
00809
00810
00811 extern FXAPI FXint wcslen(const FXchar *str);
00812
00813
00814 extern FXAPI FXint ncslen(const FXchar *str,FXint n);
00815
00816
00817 extern FXAPI FXint ncslen(const FXchar *str);
00818
00819
00820 extern FXAPI FXint utf2wcs(FXwchar *dst,const FXchar *src,FXint n);
00821
00822
00823 extern FXAPI FXint utf2wcs(FXwchar *dst,const FXchar *src);
00824
00825
00826 extern FXAPI FXint utf2ncs(FXnchar *dst,const FXchar *src,FXint n);
00827
00828
00829 extern FXAPI FXint utf2ncs(FXnchar *dst,const FXchar *src);
00830
00831
00832 extern FXAPI FXint wc2utfs(FXchar* dst,const FXwchar *src,FXint n);
00833
00834
00835 extern FXAPI FXint wc2utfs(FXchar* dst,const FXwchar *src);
00836
00837
00838 extern FXAPI FXint nc2utfs(FXchar* dst,const FXnchar *src,FXint n);
00839
00840
00841 extern FXAPI FXint nc2utfs(FXchar* dst,const FXnchar *src);
00842
00843
00844 }
00845
00846 #endif