Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

fxdefs.h
1 /********************************************************************************
2 * *
3 * FOX Definitions, Types, and Macros *
4 * *
5 *********************************************************************************
6 * Copyright (C) 1997,2026 by Jeroen van der Zijp. All Rights Reserved. *
7 *********************************************************************************
8 * This library is free software; you can redistribute it and/or modify *
9 * it under the terms of the GNU Lesser General Public License as published by *
10 * the Free Software Foundation; either version 3 of the License, or *
11 * (at your option) any later version. *
12 * *
13 * This library is distributed in the hope that it will be useful, *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16 * GNU Lesser General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU Lesser General Public License *
19 * along with this program. If not, see <http://www.gnu.org/licenses/> *
20 ********************************************************************************/
21 #ifndef FXDEFS_H
22 #define FXDEFS_H
23 
24 
25 
26 /******************************** Definitions ********************************/
27 
28 // Placement new
29 #include <new>
30 
31 
32 // Path separator
33 #ifdef WIN32
34 #define PATHSEP '\\'
35 #define PATHSEPSTRING "\\"
36 #define PATHLISTSEP ';'
37 #define PATHLISTSEPSTRING ";"
38 #define ISPATHSEP(c) ((c)=='\\' || (c)=='/')
39 #define ISPATHCOMP(c) ((c) && (c)!='/' && (c)!='\\')
40 #else
41 #define PATHSEP '/'
42 #define PATHSEPSTRING "/"
43 #define PATHLISTSEP ':'
44 #define PATHLISTSEPSTRING ":"
45 #define ISPATHSEP(c) ((c)=='/')
46 #define ISPATHCOMP(c) ((c) && (c)!='/')
47 #endif
48 
49 
50 // End Of Line
51 #ifdef WIN32
52 #define ENDLINE "\r\n"
53 #else
54 #define ENDLINE "\n"
55 #endif
56 
57 
58 // Byte order definition
59 #if defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
60 #define FOX_BIGENDIAN 0
61 #elif defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
62 #define FOX_BIGENDIAN 1
63 #elif defined(__BYTE_ORDER__) && defined(__ORDER_PDP_ENDIAN__) && (__BYTE_ORDER__ == __ORDER_PDP_ENDIAN__)
64 #error "FOX_BIGENDIAN: does not support PDP endianness!"
65 #elif defined(__LITTLE_ENDIAN__) || defined(__LITTLE_ENDIAN)
66 #define FOX_BIGENDIAN 0
67 #elif defined(__BIG_ENDIAN__) || defined(__BIG_ENDIAN)
68 #define FOX_BIGENDIAN 1
69 #elif defined(_MSC_VER) || defined(__i386__) || defined(__x86_64__)
70 #define FOX_BIGENDIAN 0
71 #else
72 #error "FOX_BIGENDIAN: endianness could not be determined!"
73 #endif
74 
75 
76 // Shared library support
77 #ifdef WIN32
78 #if defined(__GNUC__)
79 #define FXLOCAL
80 #define FXEXPORT __attribute__ ((dllexport))
81 #define FXIMPORT __attribute__ ((dllimport))
82 #else
83 #define FXLOCAL
84 #define FXEXPORT __declspec(dllexport)
85 #define FXIMPORT __declspec(dllimport)
86 #endif
87 #else
88 #if defined(__GNUC__) && (__GNUC__ >= 4)
89 #define FXLOCAL __attribute__((visibility("hidden")))
90 #define FXEXPORT __attribute__((visibility("default")))
91 #define FXIMPORT __attribute__((visibility("default")))
92 #else
93 #define FXLOCAL
94 #define FXEXPORT
95 #define FXIMPORT
96 #endif
97 #endif
98 
99 
100 // Define FXAPI for DLL builds
101 #ifdef FOXDLL
102 #ifdef FOXDLL_EXPORTS
103 #define FXAPI FXEXPORT
104 #define FXTEMPLATE_EXTERN
105 #else
106 #define FXAPI FXIMPORT
107 #define FXTEMPLATE_EXTERN extern
108 #endif
109 #else
110 #define FXAPI
111 #define FXTEMPLATE_EXTERN
112 #endif
113 
114 // Flag old API as deprecated
115 #if defined(_MSC_VER) && defined(_WIN32)
116 #define FXDEPRECATED __declspec(deprecated)
117 #elif defined(__GNUC__)
118 #define FXDEPRECATED __attribute__((deprecated))
119 #else
120 #define FXDEPRECATED
121 #endif
122 
123 // Data alignment attribute
124 #if defined(__GNUC__)
125 #define __align(x) __attribute__((aligned(x)))
126 #elif defined(_MSC_VER)
127 #define __align(x) __declspec(align(x))
128 #else
129 #define __align(x)
130 #endif
131 
132 // Get alignment of pointer p to b=2^n bytes, returning 0..b-1
133 #define __alignment(p,b) (((FXival)(p))&((b)-1))
134 
135 // Check if pointer p is aligned to b=2^n bytes
136 #define __isaligned(p,b) (__alignment(p,b)==0)
137 
138 // Align pointer to b=2^n bytes
139 #define __alignto(p,b) ((void*)((((FXival)(p))+((FXival)((b)-1)))&~((FXival)((b)-1))))
140 
141 
142 // Thread-local storage attribute
143 #if defined(__GNUC__)
144 #define __threadlocal __thread
145 #elif defined(_MSC_VER)
146 #define __threadlocal __declspec(thread)
147 #else
148 #define __threadlocal
149 #endif
150 
151 // Non-returning function
152 #if defined(__GNUC__)
153 #define __noreturn __attribute__((__noreturn__))
154 #elif (_MSC_VER >= 1400)
155 #define __noreturn __declspec(noreturn)
156 #else
157 #define __noreturn
158 #endif
159 
160 // Branch prediction optimization
161 #if (__GNUC__ >= 3)
162 #define __likely(cond) __builtin_expect(!!(cond),1)
163 #define __unlikely(cond) __builtin_expect(!!(cond),0)
164 #else
165 #define __likely(cond) (!!(cond))
166 #define __unlikely(cond) (!!(cond))
167 #endif
168 
169 // An assumption that compiler may use to optimize
170 #if (__GNUC__ >= 13)
171 #define __assume(expr) __attribute__((__assume__(expr)))
172 #elif (__clang__ >= 14)
173 #define __assume(expr) __builtin_assume(expr)
174 #elif !defined(_MSC_VER)
175 #define __assume(expr)
176 #endif
177 
178 // An unreachable part of code may be optimized away
179 #if (__GNUC__ >= 4)
180 #define __unreachable() __builtin_unreachable()
181 #elif defined(_MSC_VER)
182 #define __unreachable() __assume(false)
183 #else
184 #define __unreachable()
185 #endif
186 
187 // Define parameters not-aliased hint
188 #if defined(__clang__)
189 #define __restrict
190 #elif defined(__GNUC__)
191 #define __restrict __restrict__
192 #elif !defined(_MSC_VER)
193 #define __restrict
194 #endif
195 
196 // Prefetch address
197 #if (__GNUC__ >= 4) && (defined(__i386__) || defined(__x86_64__))
198 #define __prefetch(addr) __builtin_prefetch((addr),0)
199 #define __prefetchw(addr) __builtin_prefetch((addr),1)
200 #else
201 #define __prefetch(addr)
202 #define __prefetchw(addr)
203 #endif
204 
205 // Standard call calling sequence
206 #ifdef WIN32
207 #ifndef CALLBACK
208 #define CALLBACK __stdcall
209 #endif
210 #endif
211 
212 // C Language calling sequence
213 #ifdef WIN32
214 #ifndef CDECL
215 #define CDECL __cdecl
216 #endif
217 #else
218 #ifndef CDECL
219 #define CDECL
220 #endif
221 #endif
222 
223 // Suppress unused parameter warnings
224 #define FXUNUSED(prm) (void)(prm)
225 
226 // Checking printf and scanf format strings
227 #if defined(_CC_GNU_) || defined(__GNUG__) || defined(__GNUC__)
228 #define FX_PRINTF(fmt,arg) __attribute__((format(printf,fmt,arg)))
229 #define FX_SCANF(fmt,arg) __attribute__((format(scanf,fmt,arg)))
230 #define FX_FORMAT(arg) __attribute__((format_arg(arg)))
231 #else
232 #define FX_PRINTF(fmt,arg)
233 #define FX_SCANF(fmt,arg)
234 #define FX_FORMAT(arg)
235 #endif
236 
237 // Word size issues
238 #if defined(_MSC_VER) || defined(__MINGW32__) // Windows
239 #if defined(_WIN64)
240 #define LLP64 1 // Long longs and pointers are 64 bit
241 #else
242 #define ILP32 1 // Ints, longs, and pointers are 32 bit
243 #endif
244 #elif defined(__LP64__) || defined(_LP64) || (_MIPS_SZLONG == 64) || (__WORDSIZE == 64)
245 #define LP64 1 // Longs and pointers are 64 bit
246 #else
247 #define ILP32 1 // Longs, integers, and pointers are 32 bit
248 #endif
249 
250 // Suffixes for 64-bit constants
251 #if defined(LP64)
252 #define FXLONG(c) c ## L // Long suffix for 64 bit
253 #define FXULONG(c) c ## UL
254 #elif defined(_MSC_VER) && (_MSC_VER < 1900)
255 #define FXLONG(c) c ## i64 // Special suffix for 64 bit
256 #define FXULONG(c) c ## ui64
257 #else
258 #define FXLONG(c) c ## LL // Long long suffix for 64 bit
259 #define FXULONG(c) c ## ULL
260 #endif
261 
262 
263 // Raw event type
264 #ifdef WIN32
265 struct tagMSG;
266 #else
267 union _XEvent;
268 #endif
269 
270 
271 namespace FX {
272 
273 
274 /********************************* Typedefs **********************************/
275 
276 // Forward declarations
277 class FXObject;
278 class FXStream;
279 class FXString;
280 
281 
282 // Streamable types; these are fixed size!
283 typedef char FXchar;
284 typedef signed char FXschar;
285 typedef unsigned char FXuchar;
286 typedef bool FXbool;
287 typedef unsigned short FXushort;
288 typedef short FXshort;
289 typedef unsigned int FXuint;
290 typedef int FXint;
291 typedef float FXfloat;
292 typedef double FXdouble;
293 #if defined(WIN32)
294 typedef unsigned int FXwchar;
295 #if defined(_MSC_VER) && !defined(_NATIVE_WCHAR_T_DEFINED)
296 typedef unsigned short FXnchar;
297 #elif defined(__WATCOMC__) && !defined(_WCHAR_T_DEFINED)
298 typedef long char FXnchar;
299 #else
300 typedef wchar_t FXnchar;
301 #endif
302 #else
303 typedef wchar_t FXwchar;
304 typedef unsigned short FXnchar;
305 #endif
306 #if defined(LP64)
307 typedef long FXlong;
308 typedef unsigned long FXulong;
309 #elif defined(_MSC_VER) && (_MSC_VER < 1900)
310 typedef __int64 FXlong;
311 typedef unsigned __int64 FXulong;
312 #else
313 typedef long long FXlong;
314 typedef unsigned long long FXulong;
315 #endif
316 
317 // Integral types large enough to hold value of a pointer
318 #if defined(LP64) || defined(ILP32) // Long for LP64 and ILP32 models
319 typedef long FXival;
320 typedef unsigned long FXuval;
321 #elif defined(LLP64) // Long long for LLP64 models
322 #if defined(_MSC_VER) && (_MSC_VER < 1900)
323 typedef __int64 FXival;
324 typedef unsigned __int64 FXuval;
325 #else
326 typedef long long FXival;
327 typedef unsigned long long FXuval;
328 #endif
329 #endif
330 
331 // Generic void pointer
332 typedef void* FXptr;
333 
334 
335 // Handle to something in server
336 #ifdef WIN32
337 typedef void* FXID;
338 #else
339 typedef unsigned long FXID;
340 #endif
341 
342 // Time since January 1, 1970 (UTC)
343 typedef FXlong FXTime;
344 
345 // Pixel type (could be color index)
346 typedef unsigned long FXPixel;
347 
348 // RGBA pixel value
349 typedef FXuint FXColor;
350 
351 // Hot key
352 typedef FXuint FXHotKey;
353 
354 // Input source handle type
355 #ifdef WIN32
356 typedef void* FXInputHandle;
357 #else
358 typedef FXint FXInputHandle;
359 #endif
360 
361 // Process handle
362 #if defined(WIN32)
363 typedef void* FXProcessID;
364 #else
365 typedef int FXProcessID;
366 #endif
367 
368 // Thread ID type
369 #if defined(WIN32)
370 typedef void* FXThreadID;
371 #else
372 typedef unsigned long FXThreadID;
373 #endif
374 
375 // Thread-local storage key
376 typedef FXuval FXThreadStorageKey;
377 
378 // Raw event type
379 #ifdef WIN32
380 typedef tagMSG FXRawEvent;
381 #else
382 typedef _XEvent FXRawEvent;
383 #endif
384 
385 
386 // Drag and drop data type
387 #ifdef WIN32
388 typedef FXushort FXDragType;
389 #else
390 typedef FXID FXDragType;
391 #endif
392 
393 
394 // Third logic state: unknown/indeterminate
395 enum { maybe=2 };
396 
397 // A time in the far, far future
398 const FXTime forever=FXLONG(9223372036854775807);
399 
400 // Search modes for search/replace dialogs
401 enum {
402  SEARCH_BACKWARD = 1,
403  SEARCH_FORWARD = 2,
404  SEARCH_NOWRAP = 0,
405  SEARCH_WRAP = 4,
406  SEARCH_EXACT = 0,
407  SEARCH_IGNORECASE = 8,
408  SEARCH_REGEX = 16,
409  SEARCH_PREFIX = 32,
410  SEARCH_SUFFIX = 64,
411  SEARCH_WORDS = 128
412  };
413 
414 /********************************** Macros ***********************************/
415 
417 #define FXBIT(val,b) (((val)>>(b))&1)
418 
420 #define FXABS(val) (((val)>=0)?(val):-(val))
421 
423 #define FXSGN(val) (((val)<0)?-1:1)
424 
426 #define FXSGNZ(val) ((val)<0?-1:(val)>0?1:0)
427 
429 #define FXSGNX(x,b) (((FXint)((x)<<(32-(b))))>>(32-(b)))
430 
432 #define FXMAX(a,b) (((a)>(b))?(a):(b))
433 
435 #define FXMIN(a,b) (((a)>(b))?(b):(a))
436 
438 #define FXMIN3(x,y,z) ((x)<(y)?FXMIN(x,z):FXMIN(y,z))
439 
441 #define FXMAX3(x,y,z) ((x)>(y)?FXMAX(x,z):FXMAX(y,z))
442 
444 #define FXMIN4(x,y,z,w) (FXMIN(FXMIN(x,y),FXMIN(z,w)))
445 
447 #define FXMAX4(x,y,z,w) (FXMAX(FXMAX(x,y),FXMAX(z,w)))
448 
450 #define FXMINMAX(lo,hi,a,b) ((a)<(b)?((lo)=(a),(hi)=(b)):((lo)=(b),(hi)=(a)))
451 
453 #define FXCLAMP(lo,x,hi) ((x)<(lo)?(lo):((x)>(hi)?(hi):(x)))
454 
456 #define FXSWAP(a,b,t) ((t)=(a),(a)=(b),(b)=(t))
457 
459 #define FXLERP(a,b,f) ((a)+((b)-(a))*(f))
460 
462 #define ARRAYNUMBER(array) (sizeof(array)/sizeof(array[0]))
463 
464 // Offset of member in a structure
465 #define STRUCTOFFSET(str,member) ((FXival)&(((str *)0)->member))
466 
467 // Container class of a member class
468 #define CONTAINER(ptr,str,mem) ((str*)(((FXival)(ptr))-STRUCTOFFSET(str,mem)))
469 
471 #define MKUINT(l,h) ((((FX::FXuint)(l))&0xffff) | (((FX::FXuint)(h))<<16))
472 
474 #define FXSEL(type,id) ((((FX::FXuint)(id))&0xffff) | (((FX::FXuint)(type))<<16))
475 
477 #define FXSELTYPE(s) ((FX::FXushort)(((s)>>16)&0xffff))
478 
480 #define FXSELID(s) ((FX::FXushort)((s)&0xffff))
481 
483 #define FXAVGCOLOR(ca,cb) (((ca)&(cb))+((((ca)^(cb))&0xFEFEFEFE)>>1))
484 
485 
486 // Definitions for big-endian machines
487 #if (FOX_BIGENDIAN == 1)
488 
490 #define FXRGBA(r,g,b,a) (((FX::FXuint)(FX::FXuchar)(a)) | ((FX::FXuint)(FX::FXuchar)(r)<<8) | ((FX::FXuint)(FX::FXuchar)(g)<<16) | ((FX::FXuint)(FX::FXuchar)(b)<<24))
491 
493 #define FXRGB(r,g,b) (((FX::FXuint)(FX::FXuchar)(r)<<8) | ((FX::FXuint)(FX::FXuchar)(g)<<16) | ((FX::FXuint)(FX::FXuchar)(b)<<24) | 0x000000ff)
494 
496 #define FXREDVAL(rgba) ((FX::FXuchar)(((rgba)>>8)&0xff))
497 
499 #define FXGREENVAL(rgba) ((FX::FXuchar)(((rgba)>>16)&0xff))
500 
502 #define FXBLUEVAL(rgba) ((FX::FXuchar)(((rgba)>>24)&0xff))
503 
505 #define FXALPHAVAL(rgba) ((FX::FXuchar)((rgba)&0xff))
506 
508 #define FXRGBACOMPVAL(rgba,comp) ((FX::FXuchar)(((rgba)>>((comp)<<3))&0xff))
509 
511 #define FXCOLORREF2RGB(ref) (FX::FXuint)((((ref)<<8)&0xff000000) | (((ref)<<8)&0xff0000) | (((ref)<<8)&0xff00) | 0x000000ff)
512 
514 #define FXRGB2COLORREF(rgb) (FX::FXuint)((((rgb)>>8)&0xff0000) | (((rgb)>>8)&0xff00) | (((rgb)>>8)&0xff))
515 
516 #endif
517 
518 
519 // Definitions for little-endian machines
520 #if (FOX_BIGENDIAN == 0)
521 
523 #define FXRGBA(r,g,b,a) (((FX::FXuint)(FX::FXuchar)(a)<<24) | ((FX::FXuint)(FX::FXuchar)(r)<<16) | ((FX::FXuint)(FX::FXuchar)(g)<<8) | ((FX::FXuint)(FX::FXuchar)(b)))
524 
526 #define FXRGB(r,g,b) (((FX::FXuint)(FX::FXuchar)(r)<<16) | ((FX::FXuint)(FX::FXuchar)(g)<<8) | ((FX::FXuint)(FX::FXuchar)(b)) | 0xff000000)
527 
529 #define FXREDVAL(rgba) ((FX::FXuchar)(((rgba)>>16)&0xff))
530 
532 #define FXGREENVAL(rgba) ((FX::FXuchar)(((rgba)>>8)&0xff))
533 
535 #define FXBLUEVAL(rgba) ((FX::FXuchar)((rgba)&0xff))
536 
538 #define FXALPHAVAL(rgba) ((FX::FXuchar)(((rgba)>>24)&0xff))
539 
541 #define FXRGBACOMPVAL(rgba,comp) ((FX::FXuchar)(((rgba)>>((3-(comp))<<3))&0xff))
542 
544 #define FXCOLORREF2RGB(ref) (FX::FXuint)((((ref)>>16)&0xff) | ((ref)&0xff00) | (((ref)<<16)&0xff0000) | 0xff000000)
545 
547 #define FXRGB2COLORREF(rgb) (FX::FXuint)((((rgb)<<16)&0xff0000) | ((rgb)&0xff00) | (((rgb)>>16)&0xff))
548 
549 #endif
550 
558 #ifndef NDEBUG
559 #define FXASSERT(exp) (__likely(exp)?((void)0):(void)FX::fxassert(#exp,__FILE__,__LINE__))
560 #else
561 #define FXASSERT(exp) ((void)0)
562 #endif
563 
564 
572 #ifndef NDEBUG
573 #define FXVERIFY(exp) (__likely(exp)?((void)0):(void)FX::fxverify(#exp,__FILE__,__LINE__))
574 #else
575 #define FXVERIFY(exp) ((void)(exp))
576 #endif
577 
578 
585 #if (defined(__cplusplus) && (__cplusplus >= 201103L)) || (defined(_MSC_VER) && (_MSC_VER >= 1600))
586 #define FXSTATIC_ASSERT(expr) static_assert(expr,#expr)
587 #else
588 #define FXSTATIC_ASSERT(expr) FXASSERT(expr)
589 #endif
590 
591 
595 #define VA_NUM_ARGS(...) VA_NUM_ARGS_IMPL(__VA_ARGS__,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1)
596 #define VA_NUM_ARGS_IMPL(_0,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,N,...) N
597 
598 
613 #ifndef NDEBUG
614 #define FXTRACE(topic, ...) FX::fxtrace(topic, __VA_ARGS__)
615 #else
616 #define FXTRACE(topic, ...) ((void)0)
617 #endif
618 
625 #define FXMALLOC(ptr,type,no) (FX::fxmalloc((void **)(ptr),sizeof(type)*(no)))
626 
633 #define FXCALLOC(ptr,type,no) (FX::fxcalloc((void **)(ptr),sizeof(type)*(no)))
634 
644 #define FXRESIZE(ptr,type,no) (FX::fxresize((void **)(ptr),sizeof(type)*(no)))
645 
653 #define FXMEMDUP(ptr,src,type,no) (FX::fxmemdup((void **)(ptr),(const void*)(src),sizeof(type)*(no)))
654 
661 #define FXFREE(ptr) (FX::fxfree((void **)(ptr)))
662 
663 /********************************** Globals **********************************/
664 
666 template <typename to_type>
667 static inline to_type* alias_cast(void* ptr){
668  union UNI { to_type dst[1]; };
669  return reinterpret_cast<UNI*>(ptr)->dst;
670  }
671 
673 template <typename to_type>
674 static inline const to_type* alias_cast(const void* ptr){
675  union UNI { to_type dst[1]; };
676  return reinterpret_cast<const UNI*>(ptr)->dst;
677  }
678 
680 extern FXAPI FXbool fxmalloc(void** ptr,FXuval size);
681 
683 extern FXAPI FXbool fxcalloc(void** ptr,FXuval size);
684 
686 extern FXAPI FXbool fxresize(void** ptr,FXuval size);
687 
689 extern FXAPI void fxfree(void** ptr);
690 
692 extern FXAPI FXbool fxmemdup(void** ptr,const void* src,FXuval size);
693 
695 extern FXAPI __noreturn void fxerror(const FXchar* format,...) FX_PRINTF(1,2) ;
696 
698 extern FXAPI void fxwarning(const FXchar* format,...) FX_PRINTF(1,2) ;
699 
701 extern FXAPI void fxmessage(const FXchar* format,...) FX_PRINTF(1,2) ;
702 
704 extern FXAPI void fxassert(const FXchar* expression,const FXchar* filename,unsigned int lineno);
705 
707 extern FXAPI void fxverify(const FXchar* expression,const FXchar* filename,unsigned int lineno);
708 
710 extern FXAPI void fxtrace(FXuint level,const FXchar* format,...) FX_PRINTF(2,3) ;
711 
713 extern FXAPI FXbool fxtoDOS(FXchar*& string,FXint& len);
714 
716 extern FXAPI FXbool fxfromDOS(FXchar*& string,FXint& len);
717 
719 extern FXAPI FXchar *fxstrdup(const FXchar* str);
720 
722 extern FXAPI FXuint fxstrhash(const FXchar* str);
723 
725 extern FXAPI FXival fxstrlcpy(FXchar* dst,const FXchar* src,FXival len);
726 
728 extern FXAPI FXival fxstrlcat(FXchar* dst,const FXchar* src,FXival len);
729 
731 extern FXAPI FXchar* fxstrstr(const FXchar *haystack,const FXchar *needle);
732 
734 extern FXAPI FXchar* fxstrcasestr(const FXchar *haystack,const FXchar *needle);
735 
737 extern FXAPI void fxrgb_to_hsv(FXfloat& h,FXfloat& s,FXfloat& v,FXfloat r,FXfloat g,FXfloat b);
738 
740 extern FXAPI void fxhsv_to_rgb(FXfloat& r,FXfloat& g,FXfloat& b,FXfloat h,FXfloat s,FXfloat v);
741 
743 extern FXAPI void fxrgb_to_hsl(FXfloat& h,FXfloat& s,FXfloat& l,FXfloat r,FXfloat g,FXfloat b);
744 
746 extern FXAPI void fxhsl_to_rgb(FXfloat& r,FXfloat& g,FXfloat& b,FXfloat h,FXfloat s,FXfloat l);
747 
749 extern FXchar* fxencode64(FXchar* dst,FXchar* dstend,const FXchar* src,const FXchar* srcend);
750 
752 extern FXchar* fxdecode64(FXchar* dst,FXchar* dstend,const FXchar* src,const FXchar* srcend);
753 
755 extern FXchar* fxencode85(FXchar* dst,FXchar* dstend,const FXchar* src,const FXchar* srcend);
756 
758 extern FXchar* fxdecode85(FXchar* dst,FXchar* dstend,const FXchar* src,const FXchar* srcend);
759 
761 extern FXAPI FXwchar fxkeysym2ucs(FXwchar sym);
762 
764 extern FXAPI FXwchar fxucs2keysym(FXwchar ucs);
765 
767 extern FXAPI FXint fxparsegeometry(const FXchar *string,FXint& x,FXint& y,FXint& w,FXint& h);
768 
770 extern FXAPI FXbool fxisconsole(const FXchar *path);
771 
773 extern FXAPI const FXuchar fxversion[3];
774 
776 extern FXAPI FXbool getTraceTopic(FXuint topic);
777 
779 extern FXAPI void setTraceTopic(FXuint topic,FXbool flag=true);
780 
782 extern FXAPI void setTraceLevel(FXuint level,FXbool flag=true);
783 
794 extern FXAPI FXbool setTraceTopics(const FXchar* topics,FXbool flag=true);
795 
797 extern FXAPI FXival fxosversion(FXchar version[],FXival len);
798 
799 }
800 
801 #endif
Definition: FX4Splitter.h:28

Copyright © 1997-2026 Jeroen van der Zijp