diff EXCLUDE/GLTSF/include/TSF.hpp @ 4734:0c7c67d4e6ee

Added On_Char method to Window_Listener for WM_CHAR messages. Removed a lot of TSF code because part of it was wrong and part was too complicated. Added Clear method to clear the window. IME input should work in both windowed mode and fullscreen mode with these changes. I have tested on Windows XP SP3 and Windows 7 Ultimate in VirtualBox. When you type a character (with an IME or not), the console will show the code point as U+XXXX. You use Left Alt+Shift (or whatever you have it set to) to switch input languages as usual. Hit ESC to exit (or close the window in windowed mode). The program will pause before exiting so you can review the console output (press a key to exit).
author dewyatt
date Wed, 09 Jun 2010 00:03:54 -0400
parents e1307be6cb9e
children f51a9f01b508
line wrap: on
line diff
--- a/EXCLUDE/GLTSF/include/TSF.hpp	Tue Jun 08 05:22:49 2010 -0400
+++ b/EXCLUDE/GLTSF/include/TSF.hpp	Wed Jun 09 00:03:54 2010 -0400
@@ -7,51 +7,15 @@
 class TSF
 {
 public:
-
-protected:
-	class UI_Sink : public ITfUIElementSink, public ITfInputProcessorProfileActivationSink
-	{
-	public:
-		UI_Sink();
-		~UI_Sink();
-
-		// IUnknown
-		STDMETHODIMP QueryInterface(REFIID riid, void **ppvObj);
-		STDMETHODIMP_(ULONG) AddRef(void);
-		STDMETHODIMP_(ULONG) Release(void);
-
-		// ITfUIElementSink
-		STDMETHODIMP BeginUIElement(DWORD dwUIElementId, BOOL *pbShow);
-		STDMETHODIMP UpdateUIElement(DWORD dwUIElementId);
-		STDMETHODIMP EndUIElement(DWORD dwUIElementId);
-
-		// ITfInputProcessorProfileActivationSink
-		STDMETHODIMP OnActivated(DWORD dwProfileType, LANGID langid,
-								 REFCLSID clsid, REFGUID catid,
-								 REFGUID guidProfile, HKL hkl,
-								 DWORD dwFlags);
-
-		// ITfCompartmentEventSink
-		STDMETHODIMP OnChange(REFGUID rguid);
-
-	private:
-		LONG my_Reference_Count;
-	};
-
-	TSF();
-	~TSF();
-
-	void Initialize();
-	void Finalize();
+	static void Initialize();
+	static void Finalize();
 
 private:
-	bool my_COM_Initialized;
+	TSF();
 
-	CComPtr<ITfThreadMgrEx> my_Thread_Manager;
-	UI_Sink *my_UI_Sink;
+	static bool COM_Initialized;
 
-	DWORD my_UI_Element_Sink_Cookie;
-	DWORD my_IPPA_Sink_Cookie;
+	static CComPtr<ITfThreadMgr> Thread_Manager;
 };
 
 #endif