|
fltk 1.3.0rc3
About: FLTK (Fast Light Tool Kit) is a cross-platform C++ GUI toolkit for UNIX/Linux (X11), Microsoft Windows, and MacOS X. Release candidate.
SfR Fresh Dox: fltk-1.3.0rc3-source.tar.gz ("inofficial" and yet experimental doxygen-generated source code documentation) ![]() |
00001 /* "$Id: $" 00002 * 00003 * Author: Jean-Marc Lienher ( http://oksid.ch ) 00004 * Copyright 2000-2010 by O'ksi'D. 00005 * 00006 * This library is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU Library General Public 00008 * License as published by the Free Software Foundation; either 00009 * version 2 of the License, or (at your option) any later version. 00010 * 00011 * This library is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * Library General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU Library General Public 00017 * License along with this library; if not, write to the Free Software 00018 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 00019 * USA. 00020 * 00021 * Please report all bugs and problems on the following page: 00022 * 00023 * http://www.fltk.org/str.php 00024 */ 00025 00026 /* 00027 * This file is required on all platforms for utf8 support 00028 */ 00029 00030 unsigned short 00031 XUtf8IsRightToLeft(unsigned int ucs) { 00032 00033 #if 0 00034 /* for debug only */ 00035 if (ucs <= 0x005A) { 00036 if (ucs >= 0x0041) return 1; 00037 return 0; 00038 } 00039 #endif 00040 00041 /* HEBREW */ 00042 if (ucs <= 0x05F4) { 00043 if (ucs >= 0x0591) return 1; 00044 return 0; 00045 } 00046 00047 /* ARABIC */ 00048 if (ucs <= 0x06ED) { 00049 if (ucs >= 0x060C) return 1; 00050 return 0; 00051 } 00052 00053 if (ucs <= 0x06F9) { 00054 if (ucs >= 0x06F0) return 1; 00055 return 0; 00056 } 00057 00058 if (ucs == 0x200F) return 1; 00059 00060 if (ucs == 0x202B) return 1; 00061 00062 if (ucs == 0x202E) return 1; 00063 00064 if (ucs <= 0xFB4F) { 00065 if (ucs >= 0xFB1E) return 1; 00066 return 0; 00067 } 00068 00069 if (ucs <= 0xFDFB) { 00070 if (ucs >= 0xFB50) return 1; 00071 return 0; 00072 } 00073 00074 if (ucs <= 0xFEFC) { 00075 if (ucs >= 0xFE70) return 1; 00076 return 0; 00077 } 00078 00079 return 0; 00080 } 00081 00082 /* 00083 * End of "$Id$". 00084 */