(root)/
fribidi-1.0.13/
lib/
fribidi-deprecated.c
       1  /* FriBidi
       2   * fribidi-deprecated.c - deprecated interfaces.
       3   *
       4   * Authors:
       5   *   Behdad Esfahbod, 2001, 2002, 2004
       6   *   Dov Grobgeld, 1999, 2000
       7   *
       8   * Copyright (C) 2004 Sharif FarsiWeb, Inc
       9   * Copyright (C) 2001,2002 Behdad Esfahbod
      10   * Copyright (C) 1999,2000 Dov Grobgeld
      11   * 
      12   * This library is free software; you can redistribute it and/or
      13   * modify it under the terms of the GNU Lesser General Public
      14   * License as published by the Free Software Foundation; either
      15   * version 2.1 of the License, or (at your option) any later version.
      16   * 
      17   * This library is distributed in the hope that it will be useful,
      18   * but WITHOUT ANY WARRANTY; without even the implied warranty of
      19   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      20   * Lesser General Public License for more details.
      21   * 
      22   * You should have received a copy of the GNU Lesser General Public License
      23   * along with this library, in a file named COPYING; if not, write to the
      24   * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
      25   * Boston, MA 02110-1301, USA
      26   * 
      27   * For licensing issues, contact <fribidi.license@gmail.com>.
      28   */
      29  
      30  #include "common.h"
      31  
      32  #undef FRIBIDI_NO_DEPRECATED
      33  
      34  #include <fribidi-deprecated.h>
      35  #include <fribidi.h>
      36  
      37  #ifdef FRIBIDI_NO_DEPRECATED
      38  #else
      39  
      40  static FriBidiFlags flags = FRIBIDI_FLAGS_DEFAULT | FRIBIDI_FLAGS_ARABIC;
      41  
      42  FRIBIDI_ENTRY fribidi_boolean
      43  fribidi_set_mirroring (
      44    /* input */
      45    fribidi_boolean state
      46  )
      47  {
      48    return FRIBIDI_ADJUST_AND_TEST_BITS (flags, FRIBIDI_FLAG_SHAPE_MIRRORING, state);
      49  }
      50  
      51  FRIBIDI_ENTRY fribidi_boolean
      52  fribidi_mirroring_status (
      53    void
      54  )
      55  {
      56    return FRIBIDI_TEST_BITS (flags, FRIBIDI_FLAG_SHAPE_MIRRORING);
      57  }
      58  
      59  FRIBIDI_ENTRY fribidi_boolean
      60  fribidi_set_reorder_nsm (
      61    /* input */
      62    fribidi_boolean state
      63  )
      64  {
      65    return FRIBIDI_ADJUST_AND_TEST_BITS (flags, FRIBIDI_FLAG_REORDER_NSM, state);
      66  }
      67  
      68  fribidi_boolean
      69  fribidi_reorder_nsm_status (
      70    void
      71  )
      72  {
      73    return FRIBIDI_TEST_BITS (flags, FRIBIDI_FLAG_REORDER_NSM);
      74  }
      75  
      76  
      77  
      78  
      79  FRIBIDI_ENTRY FriBidiLevel
      80  fribidi_log2vis_get_embedding_levels (
      81    const FriBidiCharType *bidi_types,	/* input list of bidi types as returned by
      82  					   fribidi_get_bidi_types() */
      83    const FriBidiStrIndex len,	/* input string length of the paragraph */
      84    FriBidiParType *pbase_dir,	/* requested and resolved paragraph
      85  				 * base direction */
      86    FriBidiLevel *embedding_levels	/* output list of embedding levels */
      87  )
      88  {
      89    return fribidi_get_par_embedding_levels_ex (bidi_types, NULL, len, pbase_dir, embedding_levels);
      90  }
      91  
      92  FRIBIDI_ENTRY FriBidiCharType
      93  fribidi_get_type (
      94    FriBidiChar ch		/* input character */
      95  )
      96  {
      97    return fribidi_get_bidi_type (ch);
      98  }
      99  
     100  FRIBIDI_ENTRY FriBidiCharType
     101  fribidi_get_type_internal (
     102    FriBidiChar ch		/* input character */
     103  )
     104  {
     105    return fribidi_get_bidi_type (ch);
     106  }
     107  
     108  
     109  FRIBIDI_ENTRY FriBidiLevel
     110  fribidi_get_par_embedding_levels (
     111    /* input */
     112    const FriBidiCharType *bidi_types,
     113    const FriBidiStrIndex len,
     114    /* input and output */
     115    FriBidiParType *pbase_dir,
     116    /* output */
     117    FriBidiLevel *embedding_levels
     118  )
     119  {
     120    return fribidi_get_par_embedding_levels_ex (/* input */
     121                                                bidi_types,
     122                                                NULL, /* No bracket_types */
     123                                                len,
     124                                                /* input and output */
     125                                                pbase_dir,
     126                                                /* output */
     127                                                embedding_levels);
     128  }
     129  
     130  #endif /* !FRIBIDI_NO_DEPRECATED */
     131  
     132  /* Editor directions:
     133   * vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent
     134   */