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,2024 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 #else
40 #define PATHSEP '/'
41 #define PATHSEPSTRING "/"
42 #define PATHLISTSEP ':'
43 #define PATHLISTSEPSTRING ":"
44 #define ISPATHSEP(c) ((c)=='/')
45 #endif
46 
47 
48 // End Of Line
49 #ifdef WIN32
50 #define ENDLINE "\r\n"
51 #else
52 #define ENDLINE "\n"
53 #endif
54 
55 
56 // FOX_BIGENDIAN is byte order
57 #if defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
58 #define FOX_BIGENDIAN 0
59 #elif defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
60 #define FOX_BIGENDIAN 1
61 #elif defined(__BYTE_ORDER__) && defined(__ORDER_PDP_ENDIAN__) && (__BYTE_ORDER__ == __ORDER_PDP_ENDIAN__)
62 #error "FOX_BIGENDIAN: does not support PDP endianness!"
63 #elif defined(__LITTLE_ENDIAN__) || defined(__LITTLE_ENDIAN)
64 #define FOX_BIGENDIAN 0
65 #elif defined(__BIG_ENDIAN__) || defined(__BIG_ENDIAN)
66 #define FOX_BIGENDIAN 1
67 #elif defined(_MSC_VER) || defined(__i386__) || defined(__x86_64__)
68 #define FOX_BIGENDIAN 0
69 #else
70 #error "FOX_BIGENDIAN: endianness could not be determined!"
71 #endif
72 
73 
74 // Shared library support
75 #ifdef WIN32
76 #if defined(__GNUC__)
77 #define FXLOCAL
78 #define FXEXPORT __attribute__ ((dllexport))
79 #define FXIMPORT __attribute__ ((dllimport))
80 #else
81 #define FXLOCAL
82 #define FXEXPORT __declspec(dllexport)
83 #define FXIMPORT __declspec(dllimport)
84 #endif
85 #else
86 #if defined(__GNUC__) && (__GNUC__ >= 4)
87 #define FXLOCAL __attribute__((visibility("hidden")))
88 #define FXEXPORT __attribute__((visibility("default")))
89 #define FXIMPORT __attribute__((visibility("default")))
90 #else
91 #define FXLOCAL
92 #define FXEXPORT
93 #define FXIMPORT
94 #endif
95 #endif
96 
97 
98 // Define FXAPI for DLL builds
99 #ifdef FOXDLL
100 #ifdef FOXDLL_EXPORTS
101 #define FXAPI FXEXPORT
102 #define FXTEMPLATE_EXTERN
103 #else
104 #define FXAPI FXIMPORT
105 #define FXTEMPLATE_EXTERN extern
106 #endif
107 #else
108 #define FXAPI
109 #define FXTEMPLATE_EXTERN
110 #endif
111 
112 // Flag old API as deprecated
113 #if defined(_MSC_VER) && defined(_WIN32)
114 #define FXDEPRECATED __declspec(deprecated)
115 #elif defined(__GNUC__)
116 #define FXDEPRECATED __attribute__((deprecated))
117 #else
118 #define FXDEPRECATED
119 #endif
120 
121 // Data alignment attribute
122 #if defined(__GNUC__)
123 #define __align(x) __attribute__((aligned(x)))
124 #elif defined(_MSC_VER)
125 #define __align(x) __declspec(align(x))
126 #else
127 #define __align(x)
128 #endif
129 
130 // Get alignment of pointer p to b=2^n bytes, returning 0..b-1
131 #define __alignment(p,b) (((FXival)(p))&((b)-1))
132 
133 // Check if pointer p is aligned to b=2^n bytes
134 #define __isaligned(p,b) (__alignment(p,b)==0)
135 
136 // Align pointer to b=2^n bytes
137 #define __alignto(p,b) ((void*)((((FXival)(p))+((FXival)((b)-1)))&~((FXival)((b)-1))))
138 
139 
140 // Thread-local storage attribute
141 #if defined(__GNUC__)
142 #define __threadlocal __thread
143 #elif defined(_MSC_VER)
144 #define __threadlocal __declspec(thread)
145 #else
146 #define __threadlocal
147 #endif
148 
149 // Non-returning function
150 #if defined(__GNUC__)
151 #define __noreturn __attribute__((__noreturn__))
152 #elif (_MSC_VER >= 1400)
153 #define __noreturn __declspec(noreturn)
154 #else
155 #define __noreturn
156 #endif
157 
158 // Branch prediction optimization
159 #if (__GNUC__ >= 3)
160 #define __likely(cond) __builtin_expect(!!(cond),1)
161 #define __unlikely(cond) __builtin_expect(!!(cond),0)
162 #else
163 #define __likely(cond) (!!(cond))
164 #define __unlikely(cond) (!!(cond))
165 #endif
166 
167 // An assumption that compiler may use to optimize
168 #if (__GNUC__ >= 13)
169 #define __assume(expr) __attribute__((__assume__(expr)))
170 #elif (__clang__ >= 14)
171 #define __assume(expr) __builtin_assume(expr)
172 #elif !defined(_MSC_VER)
173 #define __assume(expr)
174 #endif
175 
176 // An unreachable part of code may be optimized away
177 #if (__GNUC__ >= 4)
178 #define __unreachable() __builtin_unreachable()
179 #elif defined(_MSC_VER)
180 #define __unreachable() __assume(false)
181 #else
182 #define __unreachable()
183 #endif
184 
185 // Define parameters not-aliased hint
186 #if defined(__GNUC__)
187 #define __restrict __restrict__
188 #elif !defined(_MSC_VER)
189 #define __restrict
190 #endif
191 
192 // Prefetch address
193 #if (__GNUC__ >= 4) && (defined(__i386__) || defined(__x86_64__))
194 #define __prefetch(addr) __builtin_prefetch((addr),0)
195 #define __prefetchw(addr) __builtin_prefetch((addr),1)
196 #else
197 #define __prefetch(addr)
198 #define __prefetchw(addr)
199 #endif
200 
201 // Standard call calling sequence
202 #ifdef WIN32
203 #ifndef CALLBACK
204 #define CALLBACK __stdcall
205 #endif
206 #endif
207 
208 // C Language calling sequence
209 #ifdef WIN32
210 #ifndef CDECL
211 #define CDECL __cdecl
212 #endif
213 #else
214 #ifndef CDECL
215 #define CDECL
216 #endif
217 #endif
218 
219 // Suppress unused parameter warnings
220 #define FXUNUSED(prm) (void)(prm)
221 
222 // Checking printf and scanf format strings
223 #if defined(_CC_GNU_) || defined(__GNUG__) || defined(__GNUC__)
224 #define FX_PRINTF(fmt,arg) __attribute__((format(printf,fmt,arg)))
225 #define FX_SCANF(fmt,arg) __attribute__((format(scanf,fmt,arg)))
226 #define FX_FORMAT(arg) __attribute__((format_arg(arg)))
227 #else
228 #define FX_PRINTF(fmt,arg)
229 #define FX_SCANF(fmt,arg)
230 #define FX_FORMAT(arg)
231 #endif
232 
233 // Word size issues
234 #if defined(_MSC_VER) || defined(__MINGW32__) // Windows
235 #if defined(_WIN64)
236 #define LLP64 1 // Long longs and pointers are 64 bit
237 #else
238 #define ILP32 1 // Ints, longs, and pointers are 32 bit
239 #endif
240 #elif defined(__LP64__) || defined(_LP64) || (_MIPS_SZLONG == 64) || (__WORDSIZE == 64)
241 #define LP64 1 // Longs and pointers are 64 bit
242 #else
243 #define ILP32 1 // Longs, integers, and pointers are 32 bit
244 #endif
245 
246 // Suffixes for 64-bit constants
247 #if defined(LP64)
248 #define FXLONG(c) c ## L // Long suffix for 64 bit
249 #define FXULONG(c) c ## UL
250 #elif defined(_MSC_VER) && (_MSC_VER < 1900)
251 #define FXLONG(c) c ## i64 // Special suffix for 64 bit
252 #define FXULONG(c) c ## ui64
253 #else
254 #define FXLONG(c) c ## LL // Long long suffix for 64 bit
255 #define FXULONG(c) c ## ULL
256 #endif
257 
258 
259 // Raw event type
260 #ifdef WIN32
261 struct tagMSG;
262 #else
263 union _XEvent;
264 #endif
265 
266 
267 namespace FX {
268 
269 
270 /********************************* Typedefs **********************************/
271 
272 // Forward declarations
273 class FXObject;
274 class FXStream;
275 class FXString;
276 
277 
278 // Streamable types; these are fixed size!
279 typedef char FXchar;
280 typedef signed char FXschar;
281 typedef unsigned char FXuchar;
282 typedef bool FXbool;
283 typedef unsigned short FXushort;
284 typedef short FXshort;
285 typedef unsigned int FXuint;
286 typedef int FXint;
287 typedef float FXfloat;
288 typedef double FXdouble;
289 #if defined(WIN32)
290 typedef unsigned int FXwchar;
291 #if defined(_MSC_VER) && !defined(_NATIVE_WCHAR_T_DEFINED)
292 typedef unsigned short FXnchar;
293 #elif defined(__WATCOMC__) && !defined(_WCHAR_T_DEFINED)
294 typedef long char FXnchar;
295 #else
296 typedef wchar_t FXnchar;
297 #endif
298 #else
299 typedef wchar_t FXwchar;
300 typedef unsigned short FXnchar;
301 #endif
302 #if defined(LP64)
303 typedef long FXlong;
304 typedef unsigned long FXulong;
305 #elif defined(_MSC_VER) && (_MSC_VER < 1900)
306 typedef __int64 FXlong;
307 typedef unsigned __int64 FXulong;
308 #else
309 typedef long long FXlong;
310 typedef unsigned long long FXulong;
311 #endif
312 
313 // Integral types large enough to hold value of a pointer
314 #if defined(LP64) || defined(ILP32) // Long for LP64 and ILP32 models
315 typedef long FXival;
316 typedef unsigned long FXuval;
317 #elif defined(LLP64) // Long long for LLP64 models
318 #if defined(_MSC_VER) && (_MSC_VER < 1900)
319 typedef __int64 FXival;
320 typedef unsigned __int64 FXuval;
321 #else
322 typedef long long FXival;
323 typedef unsigned long long FXuval;
324 #endif
325 #endif
326 
327 // Generic void pointer
328 typedef void* FXptr;
329 
330 
331 // Handle to something in server
332 #ifdef WIN32
333 typedef void* FXID;
334 #else
335 typedef unsigned long FXID;
336 #endif
337 
338 // Time since January 1, 1970 (UTC)
339 typedef FXlong FXTime;
340 
341 // Pixel type (could be color index)
342 typedef unsigned long FXPixel;
343 
344 // RGBA pixel value
345 typedef FXuint FXColor;
346 
347 // Hot key
348 typedef FXuint FXHotKey;
349 
350 // Input source handle type
351 #ifdef WIN32
352 typedef void* FXInputHandle;
353 #else
354 typedef FXint FXInputHandle;
355 #endif
356 
357 // Process handle
358 #if defined(WIN32)
359 typedef void* FXProcessID;
360 #else
361 typedef int FXProcessID;
362 #endif
363 
364 // Thread ID type
365 #if defined(WIN32)
366 typedef void* FXThreadID;
367 #else
368 typedef unsigned long FXThreadID;
369 #endif
370 
371 // Thread-local storage key
372 typedef FXuval FXThreadStorageKey;
373 
374 // Raw event type
375 #ifdef WIN32
376 typedef tagMSG FXRawEvent;
377 #else
378 typedef _XEvent FXRawEvent;
379 #endif
380 
381 
382 // Drag and drop data type
383 #ifdef WIN32
384 typedef FXushort FXDragType;
385 #else
386 typedef FXID FXDragType;
387 #endif
388 
389 
390 // Third logic state: unknown/indeterminate
391 enum { maybe=2 };
392 
393 // A time in the far, far future
394 const FXTime forever=FXLONG(9223372036854775807);
395 
396 // Search modes for search/replace dialogs
397 enum {
398  SEARCH_BACKWARD = 1,
399  SEARCH_FORWARD = 2,
400  SEARCH_NOWRAP = 0,
401  SEARCH_WRAP = 4,
402  SEARCH_EXACT = 0,
403  SEARCH_IGNORECASE = 8,
404  SEARCH_REGEX = 16,
405  SEARCH_PREFIX = 32,
406  SEARCH_SUFFIX = 64,
407  SEARCH_WORDS = 128
408  };
409 
410 /********************************** Macros ***********************************/
411 
413 #define FXBIT(val,b) (((val)>>(b))&1)
414 
416 #define FXABS(val) (((val)>=0)?(val):-(val))
417 
419 #define FXSGN(val) (((val)<0)?-1:1)
420 
422 #define FXSGNZ(val) ((val)<0?-1:(val)>0?1:0)
423 
425 #define FXSGNX(x,b) (((FXint)((x)<<(32-(b))))>>(32-(b)))
426 
428 #define FXMAX(a,b) (((a)>(b))?(a):(b))
429 
431 #define FXMIN(a,b) (((a)>(b))?(b):(a))
432 
434 #define FXMIN3(x,y,z) ((x)<(y)?FXMIN(x,z):FXMIN(y,z))
435 
437 #define FXMAX3(x,y,z) ((x)>(y)?FXMAX(x,z):FXMAX(y,z))
438 
440 #define FXMIN4(x,y,z,w) (FXMIN(FXMIN(x,y),FXMIN(z,w)))
441 
443 #define FXMAX4(x,y,z,w) (FXMAX(FXMAX(x,y),FXMAX(z,w)))
444 
446 #define FXMINMAX(lo,hi,a,b) ((a)<(b)?((lo)=(a),(hi)=(b)):((lo)=(b),(hi)=(a)))
447 
449 #define FXCLAMP(lo,x,hi) ((x)<(lo)?(lo):((x)>(hi)?(hi):(x)))
450 
452 #define FXSWAP(a,b,t) ((t)=(a),(a)=(b),(b)=(t))
453 
455 #define FXLERP(a,b,f) ((a)+((b)-(a))*(f))
456 
458 #define ARRAYNUMBER(array) (sizeof(array)/sizeof(array[0]))
459 
460 // Offset of member in a structure
461 #define STRUCTOFFSET(str,member) ((FXival)&(((str *)0)->member))
462 
463 // Container class of a member class
464 #define CONTAINER(ptr,str,mem) ((str*)(((FXival)(ptr))-STRUCTOFFSET(str,mem)))
465 
467 #define MKUINT(l,h) ((((FX::FXuint)(l))&0xffff) | (((FX::FXuint)(h))<<16))
468 
470 #define FXSEL(type,id) ((((FX::FXuint)(id))&0xffff) | (((FX::FXuint)(type))<<16))
471 
473 #define FXSELTYPE(s) ((FX::FXushort)(((s)>>16)&0xffff))
474 
476 #define FXSELID(s) ((FX::FXushort)((s)&0xffff))
477 
479 #define FXAVGCOLOR(ca,cb) (((ca)&(cb))+((((ca)^(cb))&0xFEFEFEFE)>>1))
480 
481 
482 // Definitions for big-endian machines
483 #if (FOX_BIGENDIAN == 1)
484 
486 #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))
487 
489 #define FXRGB(r,g,b) (((FX::FXuint)(FX::FXuchar)(r)<<8) | ((FX::FXuint)(FX::FXuchar)(g)<<16) | ((FX::FXuint)(FX::FXuchar)(b)<<24) | 0x000000ff)
490 
492 #define FXREDVAL(rgba) ((FX::FXuchar)(((rgba)>>8)&0xff))
493 
495 #define FXGREENVAL(rgba) ((FX::FXuchar)(((rgba)>>16)&0xff))
496 
498 #define FXBLUEVAL(rgba) ((FX::FXuchar)(((rgba)>>24)&0xff))
499 
501 #define FXALPHAVAL(rgba) ((FX::FXuchar)((rgba)&0xff))
502 
504 #define FXRGBACOMPVAL(rgba,comp) ((FX::FXuchar)(((rgba)>>((comp)<<3))&0xff))
505 
507 #define FXCOLORREF2RGB(ref) (FX::FXuint)((((ref)<<8)&0xff000000) | (((ref)<<8)&0xff0000) | (((ref)<<8)&0xff00) | 0x000000ff)
508 
510 #define FXRGB2COLORREF(rgb) (FX::FXuint)((((rgb)>>8)&0xff0000) | (((rgb)>>8)&0xff00) | (((rgb)>>8)&0xff))
511 
512 #endif
513 
514 
515 // Definitions for little-endian machines
516 #if (FOX_BIGENDIAN == 0)
517 
519 #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)))
520 
522 #define FXRGB(r,g,b) (((FX::FXuint)(FX::FXuchar)(r)<<16) | ((FX::FXuint)(FX::FXuchar)(g)<<8) | ((FX::FXuint)(FX::FXuchar)(b)) | 0xff000000)
523 
525 #define FXREDVAL(rgba) ((FX::FXuchar)(((rgba)>>16)&0xff))
526 
528 #define FXGREENVAL(rgba) ((FX::FXuchar)(((rgba)>>8)&0xff))
529 
531 #define FXBLUEVAL(rgba) ((FX::FXuchar)((rgba)&0xff))
532 
534 #define FXALPHAVAL(rgba) ((FX::FXuchar)(((rgba)>>24)&0xff))
535 
537 #define FXRGBACOMPVAL(rgba,comp) ((FX::FXuchar)(((rgba)>>((3-(comp))<<3))&0xff))
538 
540 #define FXCOLORREF2RGB(ref) (FX::FXuint)((((ref)>>16)&0xff) | ((ref)&0xff00) | (((ref)<<16)&0xff0000) | 0xff000000)
541 
543 #define FXRGB2COLORREF(rgb) (FX::FXuint)((((rgb)<<16)&0xff0000) | ((rgb)&0xff00) | (((rgb)>>16)&0xff))
544 
545 #endif
546 
554 #ifndef NDEBUG
555 #define FXASSERT(exp) (__likely(exp)?((void)0):(void)FX::fxassert(#exp,__FILE__,__LINE__))
556 #else
557 #define FXASSERT(exp) ((void)0)
558 #endif
559 
560 
568 #ifndef NDEBUG
569 #define FXVERIFY(exp) (__likely(exp)?((void)0):(void)FX::fxverify(#exp,__FILE__,__LINE__))
570 #else
571 #define FXVERIFY(exp) ((void)(exp))
572 #endif
573 
574 
581 #if (defined(__cplusplus) && (__cplusplus >= 201103L)) || (defined(_MSC_VER) && (_MSC_VER >= 1600))
582 #define FXASSERT_STATIC(expr) static_assert(expr,#expr)
583 #else
584 #define FXASSERT_STATIC(expr) FXASSERT(expr)
585 #endif
586 
587 
591 #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)
592 #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
593 
594 
610 #ifndef NDEBUG
611 #define FXTRACE(arguments) FX::fxtrace arguments
612 #else
613 #define FXTRACE(arguments) ((void)0)
614 #endif
615 
622 #define FXMALLOC(ptr,type,no) (FX::fxmalloc((void **)(ptr),sizeof(type)*(no)))
623 
630 #define FXCALLOC(ptr,type,no) (FX::fxcalloc((void **)(ptr),sizeof(type)*(no)))
631 
641 #define FXRESIZE(ptr,type,no) (FX::fxresize((void **)(ptr),sizeof(type)*(no)))
642 
650 #define FXMEMDUP(ptr,src,type,no) (FX::fxmemdup((void **)(ptr),(const void*)(src),sizeof(type)*(no)))
651 
658 #define FXFREE(ptr) (FX::fxfree((void **)(ptr)))
659 
660 /********************************** Globals **********************************/
661 
663 template <typename to_type>
664 static inline to_type* alias_cast(void* ptr){
665  union UNI { to_type dst[1]; };
666  return reinterpret_cast<UNI*>(ptr)->dst;
667  }
668 
670 template <typename to_type>
671 static inline const to_type* alias_cast(const void* ptr){
672  union UNI { to_type dst[1]; };
673  return reinterpret_cast<const UNI*>(ptr)->dst;
674  }
675 
677 extern FXAPI FXbool fxmalloc(void** ptr,FXuval size);
678 
680 extern FXAPI FXbool fxcalloc(void** ptr,FXuval size);
681 
683 extern FXAPI FXbool fxresize(void** ptr,FXuval size);
684 
686 extern FXAPI void fxfree(void** ptr);
687 
689 extern FXAPI FXbool fxmemdup(void** ptr,const void* src,FXuval size);
690 
692 extern FXAPI __noreturn void fxerror(const FXchar* format,...) FX_PRINTF(1,2) ;
693 
695 extern FXAPI void fxwarning(const FXchar* format,...) FX_PRINTF(1,2) ;
696 
698 extern FXAPI void fxmessage(const FXchar* format,...) FX_PRINTF(1,2) ;
699 
701 extern FXAPI void fxassert(const FXchar* expression,const FXchar* filename,unsigned int lineno);
702 
704 extern FXAPI void fxverify(const FXchar* expression,const FXchar* filename,unsigned int lineno);
705 
707 extern FXAPI void fxtrace(FXuint level,const FXchar* format,...) FX_PRINTF(2,3) ;
708 
710 extern FXAPI FXbool fxtoDOS(FXchar*& string,FXint& len);
711 
713 extern FXAPI FXbool fxfromDOS(FXchar*& string,FXint& len);
714 
716 extern FXAPI FXchar *fxstrdup(const FXchar* str);
717 
719 extern FXAPI FXuint fxstrhash(const FXchar* str);
720 
722 extern FXAPI FXival fxstrlcpy(FXchar* dst,const FXchar* src,FXival len);
723 
725 extern FXAPI FXival fxstrlcat(FXchar* dst,const FXchar* src,FXival len);
726 
728 extern FXAPI FXchar* fxstrstr(const FXchar *haystack,const FXchar *needle);
729 
731 extern FXAPI FXchar* fxstrcasestr(const FXchar *haystack,const FXchar *needle);
732 
734 extern FXAPI void fxrgb_to_hsv(FXfloat& h,FXfloat& s,FXfloat& v,FXfloat r,FXfloat g,FXfloat b);
735 
737 extern FXAPI void fxhsv_to_rgb(FXfloat& r,FXfloat& g,FXfloat& b,FXfloat h,FXfloat s,FXfloat v);
738 
740 extern FXAPI void fxrgb_to_hsl(FXfloat& h,FXfloat& s,FXfloat& l,FXfloat r,FXfloat g,FXfloat b);
741 
743 extern FXAPI void fxhsl_to_rgb(FXfloat& r,FXfloat& g,FXfloat& b,FXfloat h,FXfloat s,FXfloat l);
744 
746 extern FXchar* fxencode64(FXchar* dst,FXchar* dstend,const FXchar* src,const FXchar* srcend);
747 
749 extern FXchar* fxdecode64(FXchar* dst,FXchar* dstend,const FXchar* src,const FXchar* srcend);
750 
752 extern FXchar* fxencode85(FXchar* dst,FXchar* dstend,const FXchar* src,const FXchar* srcend);
753 
755 extern FXchar* fxdecode85(FXchar* dst,FXchar* dstend,const FXchar* src,const FXchar* srcend);
756 
758 extern FXAPI FXwchar fxkeysym2ucs(FXwchar sym);
759 
761 extern FXAPI FXwchar fxucs2keysym(FXwchar ucs);
762 
764 extern FXAPI FXint fxparsegeometry(const FXchar *string,FXint& x,FXint& y,FXint& w,FXint& h);
765 
767 extern FXAPI FXbool fxisconsole(const FXchar *path);
768 
770 extern FXAPI const FXuchar fxversion[3];
771 
773 extern FXAPI FXbool getTraceTopic(FXuint topic);
774 
776 extern FXAPI void setTraceTopic(FXuint topic,FXbool flag=true);
777 
779 extern FXAPI void setTraceLevel(FXuint level,FXbool flag=true);
780 
791 extern FXAPI FXbool setTraceTopics(const FXchar* topics,FXbool flag=true);
792 
794 extern FXAPI FXival fxosversion(FXchar version[],FXival len);
795 
796 }
797 
798 #endif
Definition: FX4Splitter.h:28

Copyright © 1997-2022 Jeroen van der Zijp