equal
deleted
inserted
replaced
1 /* A simple program to test the Input Method support in the SDL library (1.3+) */ |
1 /* A simple program to test the Input Method support in the SDL library (1.3+) */ |
2 |
2 |
3 #include <stdlib.h> |
3 #include <stdlib.h> |
4 #include <stdio.h> |
4 #include <stdio.h> |
5 #include <string.h> |
5 #include <string.h> |
6 |
6 |
7 #include "SDL.h" |
7 #include "SDL.h" |
8 #ifdef HAVE_SDL_TTF |
8 #ifdef HAVE_SDL_TTF |
9 #include "SDL_ttf.h" |
9 #include "SDL_ttf.h" |
10 #endif |
10 #endif |
11 |
11 |
12 #define DEFAULT_PTSIZE 30 |
12 #define DEFAULT_PTSIZE 30 |
13 #define DEFAULT_FONT "/System/Library/Fonts/华文细黑.ttf" |
13 #define DEFAULT_FONT "/System/Library/Fonts/华文细黑.ttf" |
14 #define MAX_TEXT_LENGTH 256 |
14 #define MAX_TEXT_LENGTH 256 |
15 |
15 |
16 SDL_Surface *screen; |
16 SDL_Surface *screen; |
208 } |
208 } |
209 } |
209 } |
210 |
210 |
211 int main(int argc, char *argv[]) |
211 int main(int argc, char *argv[]) |
212 { |
212 { |
|
213 SDL_Event event; |
|
214 int done = 0; |
|
215 |
213 InitVideo(argc, argv); |
216 InitVideo(argc, argv); |
214 InitInput(); |
217 InitInput(); |
215 Redraw(); |
218 Redraw(); |
216 |
|
217 SDL_Event event; |
|
218 int done = 0; |
|
219 |
219 |
220 while (! done && SDL_WaitEvent(&event)) |
220 while (! done && SDL_WaitEvent(&event)) |
221 { |
221 { |
222 switch (event.type) |
222 switch (event.type) |
223 { |
223 { |