Mercurial > sdl-ios-xcode
annotate EXCLUDE/GLTSF/include/App.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 | 6032ada8b9e5 |
children | 381d402a5e90 |
rev | line source |
---|---|
4730
6032ada8b9e5
Adding GLTSF (somewhat based on SFML, no actual TSF code yet)
dewyatt
parents:
diff
changeset
|
1 #ifndef APP_HPP |
6032ada8b9e5
Adding GLTSF (somewhat based on SFML, no actual TSF code yet)
dewyatt
parents:
diff
changeset
|
2 #define APP_HPP |
6032ada8b9e5
Adding GLTSF (somewhat based on SFML, no actual TSF code yet)
dewyatt
parents:
diff
changeset
|
3 |
6032ada8b9e5
Adding GLTSF (somewhat based on SFML, no actual TSF code yet)
dewyatt
parents:
diff
changeset
|
4 #include "Window.hpp" |
6032ada8b9e5
Adding GLTSF (somewhat based on SFML, no actual TSF code yet)
dewyatt
parents:
diff
changeset
|
5 |
6032ada8b9e5
Adding GLTSF (somewhat based on SFML, no actual TSF code yet)
dewyatt
parents:
diff
changeset
|
6 class App : public Window_Listener |
6032ada8b9e5
Adding GLTSF (somewhat based on SFML, no actual TSF code yet)
dewyatt
parents:
diff
changeset
|
7 { |
6032ada8b9e5
Adding GLTSF (somewhat based on SFML, no actual TSF code yet)
dewyatt
parents:
diff
changeset
|
8 public: |
6032ada8b9e5
Adding GLTSF (somewhat based on SFML, no actual TSF code yet)
dewyatt
parents:
diff
changeset
|
9 App(); |
6032ada8b9e5
Adding GLTSF (somewhat based on SFML, no actual TSF code yet)
dewyatt
parents:
diff
changeset
|
10 virtual ~App(); |
6032ada8b9e5
Adding GLTSF (somewhat based on SFML, no actual TSF code yet)
dewyatt
parents:
diff
changeset
|
11 |
6032ada8b9e5
Adding GLTSF (somewhat based on SFML, no actual TSF code yet)
dewyatt
parents:
diff
changeset
|
12 void Initialize(); |
6032ada8b9e5
Adding GLTSF (somewhat based on SFML, no actual TSF code yet)
dewyatt
parents:
diff
changeset
|
13 void Finalize(); |
6032ada8b9e5
Adding GLTSF (somewhat based on SFML, no actual TSF code yet)
dewyatt
parents:
diff
changeset
|
14 |
6032ada8b9e5
Adding GLTSF (somewhat based on SFML, no actual TSF code yet)
dewyatt
parents:
diff
changeset
|
15 void Run(); |
6032ada8b9e5
Adding GLTSF (somewhat based on SFML, no actual TSF code yet)
dewyatt
parents:
diff
changeset
|
16 |
6032ada8b9e5
Adding GLTSF (somewhat based on SFML, no actual TSF code yet)
dewyatt
parents:
diff
changeset
|
17 virtual void On_Close(); |
6032ada8b9e5
Adding GLTSF (somewhat based on SFML, no actual TSF code yet)
dewyatt
parents:
diff
changeset
|
18 virtual void On_Key_Down(int Key); |
6032ada8b9e5
Adding GLTSF (somewhat based on SFML, no actual TSF code yet)
dewyatt
parents:
diff
changeset
|
19 virtual void On_Key_Up(int Key); |
4734
0c7c67d4e6ee
Added On_Char method to Window_Listener for WM_CHAR messages.
dewyatt
parents:
4730
diff
changeset
|
20 virtual void On_Char(unsigned int Char); |
4730
6032ada8b9e5
Adding GLTSF (somewhat based on SFML, no actual TSF code yet)
dewyatt
parents:
diff
changeset
|
21 |
6032ada8b9e5
Adding GLTSF (somewhat based on SFML, no actual TSF code yet)
dewyatt
parents:
diff
changeset
|
22 private: |
4734
0c7c67d4e6ee
Added On_Char method to Window_Listener for WM_CHAR messages.
dewyatt
parents:
4730
diff
changeset
|
23 static const int Width = 800; |
0c7c67d4e6ee
Added On_Char method to Window_Listener for WM_CHAR messages.
dewyatt
parents:
4730
diff
changeset
|
24 static const int Height = 600; |
0c7c67d4e6ee
Added On_Char method to Window_Listener for WM_CHAR messages.
dewyatt
parents:
4730
diff
changeset
|
25 static const int Bits_Per_Pixel = 32; |
0c7c67d4e6ee
Added On_Char method to Window_Listener for WM_CHAR messages.
dewyatt
parents:
4730
diff
changeset
|
26 static const bool Fullscreen = false; |
0c7c67d4e6ee
Added On_Char method to Window_Listener for WM_CHAR messages.
dewyatt
parents:
4730
diff
changeset
|
27 |
4730
6032ada8b9e5
Adding GLTSF (somewhat based on SFML, no actual TSF code yet)
dewyatt
parents:
diff
changeset
|
28 Window my_Window; |
6032ada8b9e5
Adding GLTSF (somewhat based on SFML, no actual TSF code yet)
dewyatt
parents:
diff
changeset
|
29 bool my_Done; |
6032ada8b9e5
Adding GLTSF (somewhat based on SFML, no actual TSF code yet)
dewyatt
parents:
diff
changeset
|
30 }; |
6032ada8b9e5
Adding GLTSF (somewhat based on SFML, no actual TSF code yet)
dewyatt
parents:
diff
changeset
|
31 |
6032ada8b9e5
Adding GLTSF (somewhat based on SFML, no actual TSF code yet)
dewyatt
parents:
diff
changeset
|
32 #endif |