Commit 301e0597 authored by dewyatt's avatar dewyatt

Adding some initial TSF code

parent 249f46e7
...@@ -81,6 +81,7 @@ ...@@ -81,6 +81,7 @@
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="include\App.hpp" /> <ClInclude Include="include\App.hpp" />
<ClInclude Include="include\TSF.hpp" />
<ClInclude Include="include\Video_Mode.hpp" /> <ClInclude Include="include\Video_Mode.hpp" />
<ClInclude Include="include\Window.hpp" /> <ClInclude Include="include\Window.hpp" />
<ClInclude Include="include\Window_Listener.hpp" /> <ClInclude Include="include\Window_Listener.hpp" />
...@@ -88,6 +89,7 @@ ...@@ -88,6 +89,7 @@
<ItemGroup> <ItemGroup>
<ClCompile Include="src\App.cpp" /> <ClCompile Include="src\App.cpp" />
<ClCompile Include="src\Main.cpp" /> <ClCompile Include="src\Main.cpp" />
<ClCompile Include="src\TSF.cpp" />
<ClCompile Include="src\Video_Mode.cpp" /> <ClCompile Include="src\Video_Mode.cpp" />
<ClCompile Include="src\Window.cpp" /> <ClCompile Include="src\Window.cpp" />
</ItemGroup> </ItemGroup>
......
...@@ -27,6 +27,9 @@ ...@@ -27,6 +27,9 @@
<ClInclude Include="include\Window_Listener.hpp"> <ClInclude Include="include\Window_Listener.hpp">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="include\TSF.hpp">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="src\App.cpp"> <ClCompile Include="src\App.cpp">
...@@ -41,5 +44,8 @@ ...@@ -41,5 +44,8 @@
<ClCompile Include="src\Window.cpp"> <ClCompile Include="src\Window.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="src\TSF.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
</Project> </Project>
\ No newline at end of file
#ifndef TSF_HPP
#define TSF_HPP
#include <msctf.h>
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;
};
private:
};
#endif
#include "TSF.hpp"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment