Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:57:27

0001 /* fribidi-brackets.h - get bracket character property
0002  *
0003  * Copyright (C) 2004  Sharif FarsiWeb, Inc
0004  * Copyright (C) 2001, 2002, 2004  Behdad Esfahbod
0005  * Copyright (C) 1999, 2000, 2017  Dov Grobgeld
0006  * 
0007  * This file is part of GNU FriBidi.
0008  * 
0009  * GNU FriBidi is free software; you can redistribute it and/or
0010  * modify it under the terms of the GNU Lesser General Public License
0011  * as published by the Free Software Foundation; either version 2.1
0012  * of the License, or (at your option) any later version.
0013  * 
0014  * GNU FriBidi is distributed in the hope that it will be useful,
0015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0017  * GNU Lesser General Public License for more details.
0018  * 
0019  * You should have received a copy of the GNU Lesser General Public License
0020  * along with GNU FriBidi; if not, write to the Free Software
0021  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
0022  * 
0023  * For licensing issues, contact <fribidi.license@gmail.com> or write to
0024  * Sharif FarsiWeb, Inc., PO Box 13445-389, Tehran, Iran.
0025  *
0026  * Author(s):
0027  *   Behdad Esfahbod, 2001, 2002, 2004
0028  *   Dov Grobgeld, 1999, 2000, 2017
0029  */
0030 #ifndef _FRIBIDI_BRACKETS_H
0031 #define _FRIBIDI_BRACKETS_H
0032 
0033 #include "fribidi-common.h"
0034 
0035 #include "fribidi-types.h"
0036 #include "fribidi-bidi-types.h"
0037 
0038 #include "fribidi-begindecls.h"
0039 
0040 /* fribidi_get_bracket - get bracketed character
0041  *
0042  * This function finds the bracketed equivalent of a character as defined in
0043  * the file BidiBrackets.txt of the Unicode Character Database available at
0044  * http://www.unicode.org/Public/UNIDATA/BidiBrackets.txt.
0045  *
0046  * If  the input character is a declared as a brackets character in the
0047  * Unicode standard and has a bracketed equivalent.  The matching bracketed
0048  * character is put in the output, otherwise the input character itself is
0049  * put.
0050  *
0051  * Returns: The bracket type of the character. Use the
0052  * FRIBIDI_IS_BRACKET(FriBidiBracketType) to test if it is a valid
0053  * property.
0054  */
0055 FRIBIDI_ENTRY FriBidiBracketType fribidi_get_bracket (
0056   FriBidiChar ch            /* input character */
0057 );
0058 
0059 /* fribidi_get_bracket_types - get bracketed characters
0060  *
0061  * This function finds the bracketed characters of an string of characters.
0062  * See fribidi_get_bracket() for more information about the bracketed
0063  * characters returned by this function.
0064  */
0065 FRIBIDI_ENTRY void
0066 fribidi_get_bracket_types (
0067   const FriBidiChar *str,           /* input string */
0068   const FriBidiStrIndex len,        /* input string length */
0069   const FriBidiCharType *types,     /* input bidi types */
0070   FriBidiBracketType *btypes        /* output bracketed characters */
0071 );
0072 
0073 #define FRIBIDI_BRACKET_OPEN_MASK 0x80000000
0074 #define FRIBIDI_BRACKET_ID_MASK   0x7fffffff
0075 #define FRIBIDI_IS_BRACKET_OPEN(bt) ((bt & FRIBIDI_BRACKET_OPEN_MASK)>0)
0076 #define FRIBIDI_BRACKET_ID(bt) ((bt & FRIBIDI_BRACKET_ID_MASK))
0077 
0078 #include "fribidi-enddecls.h"
0079 
0080 #endif /* !_FRIBIDI_BRACKETS_H */
0081 /* Editor directions:
0082  * Local Variables:
0083  *   mode: c
0084  *   c-basic-offset: 2
0085  *   indent-tabs-mode: t
0086  *   tab-width: 8
0087  * End:
0088  * vim: textwidth=78: autoindent: cindent: shiftwidth=2: tabstop=8:
0089  */