1 /******************************************************************************* 2 * Copyright (c) 2000, 2007 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 * Port to the D programming language: 11 * Frank Benoit <benoit@tionex.de> 12 *******************************************************************************/ 13 module org.eclipse.swt.internal.BidiUtil; 14 15 import java.lang.all; 16 17 import org.eclipse.swt.graphics.GC; 18 import org.eclipse.swt.widgets.Control; 19 import org.eclipse.swt.internal.gtk.OS; 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 // Keyboard language types 28 public static const int KEYBOARD_NON_BIDI = 0; 29 public static const int KEYBOARD_BIDI = 1; 30 31 // bidi rendering input flag constants, not used 32 // on emulated platforms 33 public static const int CLASSIN = 1; 34 public static const int LINKBEFORE = 2; 35 public static const int LINKAFTER = 4; 36 37 // bidi rendering/ordering constants, not used on 38 // emulated platforms 39 public static const int CLASS_HEBREW = 2; 40 public static const int CLASS_ARABIC = 2; 41 public static const int CLASS_LOCALNUMBER = 4; 42 public static const int CLASS_LATINNUMBER = 5; 43 public static const int REORDER = 0; 44 public static const int LIGATE = 0; 45 public static const int GLYPHSHAPE = 0; 46 47 /* 48 * Not implemented. 49 */ 50 public static void addLanguageListener(GtkWidget* hwnd, Runnable runnable) { 51 } 52 public static void addLanguageListener (Control control, Runnable runnable) { 53 } 54 /* 55 * Not implemented. 56 * 57 */ 58 public static void drawGlyphs(GC gc, char[] renderBuffer, int[] renderDx, int x, int y) { 59 } 60 /* 61 * Bidi not supported on emulated platforms. 62 * 63 */ 64 public static bool isBidiPlatform() { 65 return false; 66 } 67 /* 68 * Not implemented. 69 */ 70 public static bool isKeyboardBidi() { 71 return false; 72 } 73 /* 74 * Not implemented. 75 */ 76 public static int getFontBidiAttributes(GC gc) { 77 return 0; 78 } 79 /* 80 * Not implemented. 81 * 82 */ 83 public static void getOrderInfo(GC gc, String text, int[] order, byte[] classBuffer, int flags, int [] offsets) { 84 } 85 /* 86 * Not implemented. Returns null. 87 * 88 */ 89 public static char[] getRenderInfo(GC gc, String text, int[] order, byte[] classBuffer, int[] dx, int flags, int[] offsets) { 90 return null; 91 } 92 /* 93 * Not implemented. Returns 0. 94 */ 95 public static int getKeyboardLanguage() { 96 return 0; 97 } 98 /* 99 * Not implemented. 100 */ 101 public static void removeLanguageListener(GtkWidget* hwnd) { 102 } 103 public static void removeLanguageListener (Control control) { 104 } 105 /* 106 * Not implemented. 107 */ 108 public static void setKeyboardLanguage(int language) { 109 } 110 /* 111 * Not implemented. 112 */ 113 public static bool setOrientation(GtkWidget* hwnd, int orientation) { 114 return false; 115 } 116 public static bool setOrientation (Control control, int orientation) { 117 return false; 118 } 119 }