Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 80056
Collapse All | Expand All

(-)Eclipse SWT/win32/org/eclipse/swt/internal/BidiUtil.java (-3 / +26 lines)
Lines 70-78 Link Here
70
	static final int ETO_CLIPPED = 0x4;
70
	static final int ETO_CLIPPED = 0x4;
71
	static final int ETO_GLYPH_INDEX = 0x0010;
71
	static final int ETO_GLYPH_INDEX = 0x0010;
72
	// Windows primary language identifiers
72
	// Windows primary language identifiers
73
	static final int LANG_ARABIC = 0x01;
73
	public static final int LANG_ARABIC = 0x01;
74
	static final int LANG_HEBREW = 0x0d;
74
	public static final int LANG_HEBREW = 0x0d;
75
	static final int LANG_FARSI = 0x29;
75
	public static final int LANG_FARSI = 0x29;
76
	public static final int LANG_EN = 0x09;
76
	// code page identifiers
77
	// code page identifiers
77
	static final String CD_PG_HEBREW = "1255"; //$NON-NLS-1$
78
	static final String CD_PG_HEBREW = "1255"; //$NON-NLS-1$
78
	static final String CD_PG_ARABIC = "1256"; //$NON-NLS-1$
79
	static final String CD_PG_ARABIC = "1256"; //$NON-NLS-1$
Lines 521-526 Link Here
521
	}
522
	}
522
}
523
}
523
/**
524
/**
525
 * Set the keyboard language to the specified language.  
526
 * <p>
527
 *
528
 * @param language integer representing language. LANG_XXX constants might be used
529
 * @return true if given language was successfully set, false otherwise. 
530
 */
531
public static boolean setSpecificKeyboardLanguage(int langCode){
532
	if (System.getProperty("os.name").toLowerCase().indexOf("windows") == -1)
533
		return false; 
534
	int currentLang = OS.PRIMARYLANGID(OS.LOWORD(OS.GetKeyboardLayout(0)));
535
	if (currentLang == langCode)
536
		return true;
537
	int [] list = getKeyboardLanguageList();
538
	for (int i=0; i<list.length; i++) {
539
		if (langCode == OS.PRIMARYLANGID(OS.LOWORD(list[i]))) {
540
			OS.ActivateKeyboardLayout(list[i], 0);
541
			return true;
542
		}
543
	}
544
	return false;
545
}
546
/**
524
 * Sets the orientation (writing order) of the specified control. Text will 
547
 * Sets the orientation (writing order) of the specified control. Text will 
525
 * be right aligned for right to left writing order.
548
 * be right aligned for right to left writing order.
526
 * <p>
549
 * <p>

Return to bug 80056