comparison dwt/internal/BidiUtil.d @ 0:380af2bdd8e5

Upload of whole dwt tree
author Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
date Sat, 09 Aug 2008 17:00:02 +0200
parents
children 8b48be5454ce
comparison
equal deleted inserted replaced
-1:000000000000 0:380af2bdd8e5
1 /*******************************************************************************
2 * Copyright (c) 2000, 2004 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors:
9 * IBM Corporation - initial API and implementation
10 *
11 * Port to the D Programming language:
12 * Jacob Carlborg <jacob.carlborg@gmail.com>
13 *******************************************************************************/
14 module dwt.internal.BidiUtil;
15
16 import dwt.dwthelper.Runnable;
17 import dwt.dwthelper.utils;
18 import dwt.graphics.GC;
19 import dwt.widgets.Control;
20
21 /*
22 * This class is supplied so that the StyledText code that supports bidi text (supported
23 * for win platforms) is not platform dependent. Bidi text is not implemented on
24 * emulated platforms.
25 */
26 public class BidiUtil
27 {
28 // Keyboard language types
29 public static const int KEYBOARD_NON_BIDI = 0;
30 public static const int KEYBOARD_BIDI = 1;
31
32 // bidi rendering input flag constants, not used
33 // on emulated platforms
34 public static const int CLASSIN = 1;
35 public static const int LINKBEFORE = 2;
36 public static const int LINKAFTER = 4;
37
38 // bidi rendering/ordering constants, not used on
39 // emulated platforms
40 public static const int CLASS_HEBREW = 2;
41 public static const int CLASS_ARABIC = 2;
42 public static const int CLASS_LOCALNUMBER = 4;
43 public static const int CLASS_LATINNUMBER = 5;
44 public static const int REORDER = 0;
45 public static const int LIGATE = 0;
46 public static const int GLYPHSHAPE = 0;
47
48 /*
49 * Not implemented.
50 */
51 public static void addLanguageListener (int /*long*/hwnd,
52 Runnable runnable)
53 {
54 }
55
56 public static void addLanguageListener (Control control, Runnable runnable)
57 {
58 }
59
60 /*
61 * Not implemented.
62 *
63 */
64 public static void drawGlyphs (GC gc, char[] renderBuffer, int[] renderDx,
65 int x, int y)
66 {
67 }
68
69 /*
70 * Bidi not supported on emulated platforms.
71 *
72 */
73 public static bool isBidiPlatform ()
74 {
75 return false;
76 }
77
78 /*
79 * Not implemented.
80 */
81 public static bool isKeyboardBidi ()
82 {
83 return false;
84 }
85
86 /*
87 * Not implemented.
88 */
89 public static int getFontBidiAttributes (GC gc)
90 {
91 return 0;
92 }
93
94 /*
95 * Not implemented.
96 *
97 */
98 public static void getOrderInfo (GC gc, String text, int[] order,
99 byte[] classBuffer, int flags, int[] offsets)
100 {
101 }
102
103 /*
104 * Not implemented. Returns null.
105 *
106 */
107 public static char[] getRenderInfo (GC gc, String text, int[] order,
108 byte[] classBuffer, int[] dx, int flags, int[] offsets)
109 {
110 return null;
111 }
112
113 /*
114 * Not implemented. Returns 0.
115 */
116 public static int getKeyboardLanguage ()
117 {
118 return 0;
119 }
120
121 /*
122 * Not implemented.
123 */
124 public static void removeLanguageListener (int /*long*/hwnd)
125 {
126 }
127
128 public static void removeLanguageListener (Control control)
129 {
130 }
131
132 /*
133 * Not implemented.
134 */
135 public static void setKeyboardLanguage (int language)
136 {
137 }
138
139 /*
140 * Not implemented.
141 */
142 public static bool setOrientation (int /*long*/hwnd, int orientation)
143 {
144 return false;
145 }
146
147 public static bool setOrientation (Control control, int orientation)
148 {
149 return false;
150 }
151 }