Atlas - SDL_fribidi.h
Home / ext / SDL / src / core / unix Lines: 1 | Size: 3042 bytes [Download] [Show on GitHub] [Search similar files] [Raw] [Raw (proxy)][FILE BEGIN]1/* 2 Simple DirectMedia Layer 3 Copyright (C) 1997-2025 Sam Lantinga <[email protected]> 4 5 This software is provided 'as-is', without any express or implied 6 warranty. In no event will the authors be held liable for any damages 7 arising from the use of this software. 8 9 Permission is granted to anyone to use this software for any purpose, 10 including commercial applications, and to alter it and redistribute it 11 freely, subject to the following restrictions: 12 13 1. The origin of this software must not be misrepresented; you must not 14 claim that you wrote the original software. If you use this software 15 in a product, an acknowledgment in the product documentation would be 16 appreciated but is not required. 17 2. Altered source versions must be plainly marked as such, and must not be 18 misrepresented as being the original software. 19 3. This notice may not be removed or altered from any source distribution. 20*/ 21 22#include "SDL_internal.h" 23 24#ifndef SDL_fribidi_h_ 25#define SDL_fribidi_h_ 26 27#ifdef HAVE_FRIBIDI_H 28#include <sys/types.h> // for ssize_t 29#include <fribidi.h> 30 31typedef FriBidiStrIndex (*SDL_FriBidiUnicodeToCharset)(FriBidiCharSet, const FriBidiChar *, FriBidiStrIndex, char *); 32typedef FriBidiStrIndex (*SDL_FriBidiCharsetToUnicode)(FriBidiCharSet, const char *, FriBidiStrIndex, FriBidiChar *); 33typedef void (*SDL_FriBidiGetBidiTypes)(const FriBidiChar *, const FriBidiStrIndex, FriBidiCharType *); 34typedef FriBidiParType (*SDL_FriBidiGetParDirection)(const FriBidiCharType *, const FriBidiStrIndex); 35typedef FriBidiLevel (*SDL_FriBidiGetParEmbeddingLevels)(const FriBidiCharType *, const FriBidiStrIndex, FriBidiParType *, FriBidiLevel *); 36typedef void (*SDL_FriBidiGetJoiningTypes)(const FriBidiChar *, const FriBidiStrIndex, FriBidiJoiningType *); 37typedef void (*SDL_FriBidiJoinArabic)(const FriBidiCharType *, const FriBidiStrIndex, const FriBidiLevel *, FriBidiArabicProp *); 38typedef void (*SDL_FriBidiShape)(FriBidiFlags flags, const FriBidiLevel *, const FriBidiStrIndex, FriBidiArabicProp *, FriBidiChar *str); 39typedef FriBidiLevel (*SDL_FriBidiReorderLine)(FriBidiFlags flags, const FriBidiCharType *, const FriBidiStrIndex, const FriBidiStrIndex, const FriBidiParType, FriBidiLevel *, FriBidiChar *, FriBidiStrIndex *); 40 41typedef struct SDL_FriBidi { 42 SDL_SharedObject *lib; 43 SDL_FriBidiUnicodeToCharset unicode_to_charset; 44 SDL_FriBidiCharsetToUnicode charset_to_unicode; 45 SDL_FriBidiGetBidiTypes get_bidi_types; 46 SDL_FriBidiGetParDirection get_par_direction; 47 SDL_FriBidiGetParEmbeddingLevels get_par_embedding_levels; 48 SDL_FriBidiGetJoiningTypes get_joining_types; 49 SDL_FriBidiJoinArabic join_arabic; 50 SDL_FriBidiShape shape; 51 SDL_FriBidiReorderLine reorder_line; 52} SDL_FriBidi; 53 54extern SDL_FriBidi *SDL_FriBidi_Create(void); 55extern char *SDL_FriBidi_Process(SDL_FriBidi *fribidi, char *utf8, ssize_t utf8_len, bool shaping, FriBidiParType *out_par_type); 56extern void SDL_FriBidi_Destroy(SDL_FriBidi *fribidi); 57 58#endif // HAVE_FRIBIDI_H 59 60#endif // SDL_fribidi_h_ 61[FILE END](C) 2025 0x4248 (C) 2025 4248 Media and 4248 Systems, All part of 0x4248 See LICENCE files for more information. Not all files are by 0x4248 always check Licencing.