[Tux4kids-commits] r194 - in tuxtype/branches/tuxtype-indic: . tuxtype tuxtype/data tuxtype/data/images/keyboard tuxtype/data/themes/malayalam tuxtype/data/themes/malayalam/images tuxtype/data/themes/malayalam/images/keyboard
mobin-guest at alioth.debian.org
mobin-guest at alioth.debian.org
Sun Aug 19 10:39:08 UTC 2007
Author: mobin-guest
Date: 2007-08-19 10:39:08 +0000 (Sun, 19 Aug 2007)
New Revision: 194
Added:
tuxtype/branches/tuxtype-indic/tuxtype/data/images/keyboard/key.png
tuxtype/branches/tuxtype-indic/tuxtype/data/phrases.txt
tuxtype/branches/tuxtype-indic/tuxtype/data/themes/malayalam/images/keyboard/
tuxtype/branches/tuxtype-indic/tuxtype/data/themes/malayalam/images/keyboard/Makefile.am
tuxtype/branches/tuxtype-indic/tuxtype/data/themes/malayalam/images/keyboard/Makefile.in
tuxtype/branches/tuxtype-indic/tuxtype/data/themes/malayalam/images/keyboard/key.png
tuxtype/branches/tuxtype-indic/tuxtype/data/themes/malayalam/images/keyboard/keyboard.png
tuxtype/branches/tuxtype-indic/tuxtype/data/themes/malayalam/phrases.txt
Modified:
tuxtype/branches/tuxtype-indic/config.status
tuxtype/branches/tuxtype-indic/configure
tuxtype/branches/tuxtype-indic/configure.ac
tuxtype/branches/tuxtype-indic/tuxtype/alphabet.c
tuxtype/branches/tuxtype-indic/tuxtype/data/Makefile.am
tuxtype/branches/tuxtype-indic/tuxtype/data/Makefile.in
tuxtype/branches/tuxtype-indic/tuxtype/data/themes/malayalam/Makefile
tuxtype/branches/tuxtype-indic/tuxtype/data/themes/malayalam/Makefile.am
tuxtype/branches/tuxtype-indic/tuxtype/data/themes/malayalam/Makefile.in
tuxtype/branches/tuxtype-indic/tuxtype/data/themes/malayalam/images/Makefile.am
tuxtype/branches/tuxtype-indic/tuxtype/data/themes/malayalam/images/Makefile.in
tuxtype/branches/tuxtype-indic/tuxtype/funcs.h
tuxtype/branches/tuxtype-indic/tuxtype/practice.c
tuxtype/branches/tuxtype-indic/tuxtype/titlescreen.c
Log:
Modified Practice section in the Indic subproject
Modified: tuxtype/branches/tuxtype-indic/config.status
===================================================================
--- tuxtype/branches/tuxtype-indic/config.status 2007-08-01 23:02:27 UTC (rev 193)
+++ tuxtype/branches/tuxtype-indic/config.status 2007-08-19 10:39:08 UTC (rev 194)
@@ -301,7 +301,7 @@
"
# Files that config.status was made for.
-config_files=" Makefile tuxtype/Makefile tuxtype/data/Makefile tuxtype/data/fonts/Makefile tuxtype/data/images/Makefile tuxtype/data/images/backgrounds/Makefile tuxtype/data/images/cities/Makefile tuxtype/data/images/comets/Makefile tuxtype/data/images/hands/Makefile tuxtype/data/images/keyboard/Makefile tuxtype/data/images/menu/Makefile tuxtype/data/images/status/Makefile tuxtype/data/images/tux/Makefile tuxtype/data/scripts/Makefile tuxtype/data/sounds/Makefile tuxtype/data/themes/Makefile tuxtype/data/themes/armenian/Makefile tuxtype/data/themes/armenian/images/Makefile tuxtype/data/themes/bokmal/Makefile tuxtype/data/themes/bokmal/words/Makefile tuxtype/data/themes/bokmal/images/Makefile tuxtype/data/themes/bokmal/images/status/Makefile tuxtype/data/themes/brazilian-portuguese/Makefile tuxtype/data/themes/brazilian-portuguese/images/Makefile tuxtype/data/themes/brazilian-portuguese/words/Makefile tuxtype/data/themes/catalan/Makefile tuxtype/data/themes/catalan/words/Makefile tuxtype/data/themes/dansk/Makefile tuxtype/data/themes/dansk/sounds/Makefile tuxtype/data/themes/dansk/words/Makefile tuxtype/data/themes/deutsch/Makefile tuxtype/data/themes/deutsch/words/Makefile tuxtype/data/themes/espanol/Makefile tuxtype/data/themes/espanol/images/Makefile tuxtype/data/themes/espanol/words/Makefile tuxtype/data/themes/euskara/Makefile tuxtype/data/themes/euskara/images/Makefile tuxtype/data/themes/euskara/words/Makefile tuxtype/data/themes/french/Makefile tuxtype/data/themes/french/words/Makefile tuxtype/data/themes/greek/Makefile tuxtype/data/themes/greek/words/Makefile tuxtype/data/themes/italian/Makefile tuxtype/data/themes/italian/words/Makefile tuxtype/data/themes/jamaican/Makefile tuxtype/data/themes/jamaican/images/Makefile tuxtype/data/themes/jamaican/words/Makefile tuxtype/data/themes/lithuanian/Makefile tuxtype/data/themes/lithuanian/images/Makefile tuxtype/data/themes/lithuanian/images/status/Makefile tuxtype/data/themes/lithuanian/sounds/Makefile tuxtype/data/themes/lithuanian/words/Makefile tuxtype/data/themes/nederlands/Makefile tuxtype/data/themes/malayalam/Makefile tuxtype/data/themes/malayalam/images/Makefile tuxtype/data/themes/malayalam/images/status/Makefile tuxtype/data/themes/malayalam/words/Makefile tuxtype/data/themes/nederlands/words/Makefile tuxtype/data/themes/nynorsk/Makefile tuxtype/data/themes/nynorsk/images/Makefile tuxtype/data/themes/nynorsk/images/status/Makefile tuxtype/data/themes/nynorsk/words/Makefile tuxtype/data/themes/russian/Makefile tuxtype/data/themes/russian/images/Makefile tuxtype/data/themes/russian/images/status/Makefile tuxtype/data/themes/russian/words/Makefile tuxtype/data/themes/svenska/Makefile tuxtype/data/themes/svenska/words/Makefile tuxtype/data/themes/swahili/Makefile tuxtype/data/themes/swahili/words/Makefile tuxtype/data/words/Makefile tuxtype/docs/Makefile tuxtype/docs/en/Makefile tuxtype.spec nsis/tuxtype.nsi"
+config_files=" Makefile tuxtype/Makefile tuxtype/data/Makefile tuxtype/data/fonts/Makefile tuxtype/data/images/Makefile tuxtype/data/images/backgrounds/Makefile tuxtype/data/images/cities/Makefile tuxtype/data/images/comets/Makefile tuxtype/data/images/hands/Makefile tuxtype/data/images/keyboard/Makefile tuxtype/data/images/menu/Makefile tuxtype/data/images/status/Makefile tuxtype/data/images/tux/Makefile tuxtype/data/scripts/Makefile tuxtype/data/sounds/Makefile tuxtype/data/themes/Makefile tuxtype/data/themes/armenian/Makefile tuxtype/data/themes/armenian/images/Makefile tuxtype/data/themes/bokmal/Makefile tuxtype/data/themes/bokmal/words/Makefile tuxtype/data/themes/bokmal/images/Makefile tuxtype/data/themes/bokmal/images/status/Makefile tuxtype/data/themes/brazilian-portuguese/Makefile tuxtype/data/themes/brazilian-portuguese/images/Makefile tuxtype/data/themes/brazilian-portuguese/words/Makefile tuxtype/data/themes/catalan/Makefile tuxtype/data/themes/catalan/words/Makefile tuxtype/data/themes/dansk/Makefile tuxtype/data/themes/dansk/sounds/Makefile tuxtype/data/themes/dansk/words/Makefile tuxtype/data/themes/deutsch/Makefile tuxtype/data/themes/deutsch/words/Makefile tuxtype/data/themes/espanol/Makefile tuxtype/data/themes/espanol/images/Makefile tuxtype/data/themes/espanol/words/Makefile tuxtype/data/themes/euskara/Makefile tuxtype/data/themes/euskara/images/Makefile tuxtype/data/themes/euskara/words/Makefile tuxtype/data/themes/french/Makefile tuxtype/data/themes/french/words/Makefile tuxtype/data/themes/greek/Makefile tuxtype/data/themes/greek/words/Makefile tuxtype/data/themes/italian/Makefile tuxtype/data/themes/italian/words/Makefile tuxtype/data/themes/jamaican/Makefile tuxtype/data/themes/jamaican/images/Makefile tuxtype/data/themes/jamaican/words/Makefile tuxtype/data/themes/lithuanian/Makefile tuxtype/data/themes/lithuanian/images/Makefile tuxtype/data/themes/lithuanian/images/status/Makefile tuxtype/data/themes/lithuanian/sounds/Makefile tuxtype/data/themes/lithuanian/words/Makefile tuxtype/data/themes/nederlands/Makefile tuxtype/data/themes/malayalam/Makefile tuxtype/data/themes/malayalam/images/Makefile tuxtype/data/themes/malayalam/images/keyboard/Makefile tuxtype/data/themes/malayalam/images/status/Makefile tuxtype/data/themes/malayalam/words/Makefile tuxtype/data/themes/nederlands/words/Makefile tuxtype/data/themes/nynorsk/Makefile tuxtype/data/themes/nynorsk/images/Makefile tuxtype/data/themes/nynorsk/images/status/Makefile tuxtype/data/themes/nynorsk/words/Makefile tuxtype/data/themes/russian/Makefile tuxtype/data/themes/russian/images/Makefile tuxtype/data/themes/russian/images/status/Makefile tuxtype/data/themes/russian/words/Makefile tuxtype/data/themes/svenska/Makefile tuxtype/data/themes/svenska/words/Makefile tuxtype/data/themes/swahili/Makefile tuxtype/data/themes/swahili/words/Makefile tuxtype/data/words/Makefile tuxtype/docs/Makefile tuxtype/docs/en/Makefile tuxtype.spec nsis/tuxtype.nsi"
config_headers=" config.h"
config_commands=" depfiles"
@@ -492,6 +492,7 @@
"tuxtype/data/themes/malayalam/Makefile") CONFIG_FILES="$CONFIG_FILES tuxtype/data/themes/malayalam/Makefile" ;;
"tuxtype/data/themes/malayalam/images/Makefile") CONFIG_FILES="$CONFIG_FILES tuxtype/data/themes/malayalam/images/Makefile" ;;
+ "tuxtype/data/themes/malayalam/images/keyboard/Makefile") CONFIG_FILES="$CONFIG_FILES tuxtype/data/themes/malayalam/images/keyboard/Makefile" ;;
"tuxtype/data/themes/malayalam/images/status/Makefile") CONFIG_FILES="$CONFIG_FILES tuxtype/data/themes/malayalam/images/status/Makefile" ;;
"tuxtype/data/themes/malayalam/words/Makefile") CONFIG_FILES="$CONFIG_FILES tuxtype/data/themes/malayalam/words/Makefile" ;;
Modified: tuxtype/branches/tuxtype-indic/configure
===================================================================
--- tuxtype/branches/tuxtype-indic/configure 2007-08-01 23:02:27 UTC (rev 193)
+++ tuxtype/branches/tuxtype-indic/configure 2007-08-19 10:39:08 UTC (rev 194)
@@ -5362,7 +5362,7 @@
# Sam's Install Kludge-work
CPPFLAGS="$CPPFLAGS -DDATA_PREFIX=\\\"\$(prefix)\\\""
-ac_config_files="$ac_config_files Makefile tuxtype/Makefile tuxtype/data/Makefile tuxtype/data/fonts/Makefile tuxtype/data/images/Makefile tuxtype/data/images/backgrounds/Makefile tuxtype/data/images/cities/Makefile tuxtype/data/images/comets/Makefile tuxtype/data/images/hands/Makefile tuxtype/data/images/keyboard/Makefile tuxtype/data/images/menu/Makefile tuxtype/data/images/status/Makefile tuxtype/data/images/tux/Makefile tuxtype/data/scripts/Makefile tuxtype/data/sounds/Makefile tuxtype/data/themes/Makefile tuxtype/data/themes/armenian/Makefile tuxtype/data/themes/armenian/images/Makefile tuxtype/data/themes/bokmal/Makefile tuxtype/data/themes/bokmal/words/Makefile tuxtype/data/themes/bokmal/images/Makefile tuxtype/data/themes/bokmal/images/status/Makefile tuxtype/data/themes/brazilian-portuguese/Makefile tuxtype/data/themes/brazilian-portuguese/images/Makefile tuxtype/data/themes/brazilian-portuguese/words/Makefile tuxtype/data/themes/catalan/Makefile tuxtype/data/themes/catalan/words/Makefile tuxtype/data/themes/dansk/Makefile tuxtype/data/themes/dansk/sounds/Makefile tuxtype/data/themes/dansk/words/Makefile tuxtype/data/themes/deutsch/Makefile tuxtype/data/themes/deutsch/words/Makefile tuxtype/data/themes/espanol/Makefile tuxtype/data/themes/espanol/images/Makefile tuxtype/data/themes/espanol/words/Makefile tuxtype/data/themes/euskara/Makefile tuxtype/data/themes/euskara/images/Makefile tuxtype/data/themes/euskara/words/Makefile tuxtype/data/themes/french/Makefile tuxtype/data/themes/french/words/Makefile tuxtype/data/themes/greek/Makefile tuxtype/data/themes/greek/words/Makefile tuxtype/data/themes/italian/Makefile tuxtype/data/themes/italian/words/Makefile tuxtype/data/themes/jamaican/Makefile tuxtype/data/themes/jamaican/images/Makefile tuxtype/data/themes/jamaican/words/Makefile tuxtype/data/themes/lithuanian/Makefile tuxtype/data/themes/lithuanian/images/Makefile tuxtype/data/themes/lithuanian/images/status/Makefile tuxtype/data/themes/lithuanian/sounds/Makefile tuxtype/data/themes/lithuanian/words/Makefile tuxtype/data/themes/malayalam/Makefile tuxtype/data/themes/malayalam/images/Makefile tuxtype/data/themes/malayalam/images/status/Makefile tuxtype/data/themes/malayalam/words/Makefile tuxtype/data/themes/nederlands/Makefile tuxtype/data/themes/nederlands/words/Makefile tuxtype/data/themes/nynorsk/Makefile tuxtype/data/themes/nynorsk/images/Makefile tuxtype/data/themes/nynorsk/images/status/Makefile tuxtype/data/themes/nynorsk/words/Makefile tuxtype/data/themes/russian/Makefile tuxtype/data/themes/russian/images/Makefile tuxtype/data/themes/russian/images/status/Makefile tuxtype/data/themes/russian/words/Makefile tuxtype/data/themes/svenska/Makefile tuxtype/data/themes/svenska/words/Makefile tuxtype/data/themes/swahili/Makefile tuxtype/data/themes/swahili/words/Makefile tuxtype/data/words/Makefile tuxtype/docs/Makefile tuxtype/docs/en/Makefile tuxtype.spec"
+ac_config_files="$ac_config_files Makefile tuxtype/Makefile tuxtype/data/Makefile tuxtype/data/fonts/Makefile tuxtype/data/images/Makefile tuxtype/data/images/backgrounds/Makefile tuxtype/data/images/cities/Makefile tuxtype/data/images/comets/Makefile tuxtype/data/images/hands/Makefile tuxtype/data/images/keyboard/Makefile tuxtype/data/images/menu/Makefile tuxtype/data/images/status/Makefile tuxtype/data/images/tux/Makefile tuxtype/data/scripts/Makefile tuxtype/data/sounds/Makefile tuxtype/data/themes/Makefile tuxtype/data/themes/armenian/Makefile tuxtype/data/themes/armenian/images/Makefile tuxtype/data/themes/bokmal/Makefile tuxtype/data/themes/bokmal/words/Makefile tuxtype/data/themes/bokmal/images/Makefile tuxtype/data/themes/bokmal/images/status/Makefile tuxtype/data/themes/brazilian-portuguese/Makefile tuxtype/data/themes/brazilian-portuguese/images/Makefile tuxtype/data/themes/brazilian-portuguese/words/Makefile tuxtype/data/themes/catalan/Makefile tuxtype/data/themes/catalan/words/Makefile tuxtype/data/themes/dansk/Makefile tuxtype/data/themes/dansk/sounds/Makefile tuxtype/data/themes/dansk/words/Makefile tuxtype/data/themes/deutsch/Makefile tuxtype/data/themes/deutsch/words/Makefile tuxtype/data/themes/espanol/Makefile tuxtype/data/themes/espanol/images/Makefile tuxtype/data/themes/espanol/words/Makefile tuxtype/data/themes/euskara/Makefile tuxtype/data/themes/euskara/images/Makefile tuxtype/data/themes/euskara/words/Makefile tuxtype/data/themes/french/Makefile tuxtype/data/themes/french/words/Makefile tuxtype/data/themes/greek/Makefile tuxtype/data/themes/greek/words/Makefile tuxtype/data/themes/italian/Makefile tuxtype/data/themes/italian/words/Makefile tuxtype/data/themes/jamaican/Makefile tuxtype/data/themes/jamaican/images/Makefile tuxtype/data/themes/jamaican/words/Makefile tuxtype/data/themes/lithuanian/Makefile tuxtype/data/themes/lithuanian/images/Makefile tuxtype/data/themes/lithuanian/images/status/Makefile tuxtype/data/themes/lithuanian/sounds/Makefile tuxtype/data/themes/lithuanian/words/Makefile tuxtype/data/themes/malayalam/Makefile tuxtype/data/themes/malayalam/images/Makefile tuxtype/data/themes/malayalam/images/keyboard/Makefile tuxtype/data/themes/malayalam/images/status/Makefile tuxtype/data/themes/malayalam/words/Makefile tuxtype/data/themes/nederlands/Makefile tuxtype/data/themes/nederlands/words/Makefile tuxtype/data/themes/nynorsk/Makefile tuxtype/data/themes/nynorsk/images/Makefile tuxtype/data/themes/nynorsk/images/status/Makefile tuxtype/data/themes/nynorsk/words/Makefile tuxtype/data/themes/russian/Makefile tuxtype/data/themes/russian/images/Makefile tuxtype/data/themes/russian/images/status/Makefile tuxtype/data/themes/russian/words/Makefile tuxtype/data/themes/svenska/Makefile tuxtype/data/themes/svenska/words/Makefile tuxtype/data/themes/swahili/Makefile tuxtype/data/themes/swahili/words/Makefile tuxtype/data/words/Makefile tuxtype/docs/Makefile tuxtype/docs/en/Makefile tuxtype.spec"
# Support for building NSIS Win32 installer (adapted from TuxMath NSIS):
@@ -6088,6 +6088,7 @@
"tuxtype/data/themes/malayalam/Makefile") CONFIG_FILES="$CONFIG_FILES tuxtype/data/themes/malayalam/Makefile" ;;
"tuxtype/data/themes/malayalam/images/Makefile") CONFIG_FILES="$CONFIG_FILES tuxtype/data/themes/malayalam/images/Makefile" ;;
"tuxtype/data/themes/malayalam/images/status/Makefile") CONFIG_FILES="$CONFIG_FILES tuxtype/data/themes/malayalam/images/status/Makefile" ;;
+ "tuxtype/data/themes/malayalam/images/keyboard/Makefile") CONFIG_FILES="$CONFIG_FILES tuxtype/data/themes/malayalam/images/keyboard/Makefile" ;;
"tuxtype/data/themes/malayalam/words/Makefile") CONFIG_FILES="$CONFIG_FILES tuxtype/data/themes/malayalam/words/Makefile" ;;
"tuxtype/data/themes/nederlands/Makefile") CONFIG_FILES="$CONFIG_FILES tuxtype/data/themes/nederlands/Makefile" ;;
"tuxtype/data/themes/nederlands/words/Makefile") CONFIG_FILES="$CONFIG_FILES tuxtype/data/themes/nederlands/words/Makefile" ;;
Modified: tuxtype/branches/tuxtype-indic/configure.ac
===================================================================
--- tuxtype/branches/tuxtype-indic/configure.ac 2007-08-01 23:02:27 UTC (rev 193)
+++ tuxtype/branches/tuxtype-indic/configure.ac 2007-08-19 10:39:08 UTC (rev 194)
@@ -141,6 +141,7 @@
tuxtype/data/themes/lithuanian/words/Makefile
tuxtype/data/themes/malayalam/Makefile
tuxtype/data/themes/malayalam/images/Makefile
+tuxtype/data/themes/malayalam/images/keyboard/Makefile
tuxtype/data/themes/malayalam/images/status/Makefile
tuxtype/data/themes/malayalam/words/Makefile
tuxtype/data/themes/nederlands/Makefile
Modified: tuxtype/branches/tuxtype-indic/tuxtype/alphabet.c
===================================================================
--- tuxtype/branches/tuxtype-indic/tuxtype/alphabet.c 2007-08-01 23:02:27 UTC (rev 193)
+++ tuxtype/branches/tuxtype-indic/tuxtype/alphabet.c 2007-08-19 10:39:08 UTC (rev 194)
@@ -55,7 +55,7 @@
static void set_letters(unsigned char* t);
static void show_letters(void);
static void clear_keyboard(void);
-static int convert_from_UTF8(wchar_t* wide_word, const char* UTF8_word);
+int convert_from_UTF8(wchar_t* wide_word, const char* UTF8_word);
/*****************************************************/
/* */
@@ -881,7 +881,7 @@
/* It returns -1 on error, otherwise returns the length of the */
/* converted, null-terminated wchar_t* string now stored in the */
/* location of the 'wide_word' pointer. */
-static int convert_from_UTF8(wchar_t* wide_word, const char* UTF8_word)
+int convert_from_UTF8(wchar_t* wide_word, const char* UTF8_word)
{
int i = 0;
ConversionResult result;
@@ -920,3 +920,120 @@
return wcslen(wide_word);
}
+
+
+int convert_from_UTF32( char* UTF8_word, wchar_t* wide_word)
+{
+ int i = 0;
+ ConversionResult result;
+ UTF8 temp_UTF8[FNLEN];
+ UTF32 temp_UTF32[FNLEN];
+
+ UTF8* UTF8_Start = temp_UTF8;
+ UTF8* UTF8_End = &temp_UTF8[FNLEN-1];
+ const UTF32* UTF32_Start = temp_UTF32;
+ const UTF32* UTF32_End = &temp_UTF32[FNLEN-1];
+
+ wcsncpy(temp_UTF32, wide_word, FNLEN);
+
+ ConvertUTF32toUTF8(&UTF32_Start, UTF32_End, &UTF8_Start, UTF8_End, 0);
+
+ UTF8_word[0] = 0;
+
+ while ((i < FNLEN) && (temp_UTF8[i] != 0))
+ {
+ UTF8_word[i] = temp_UTF8[i];
+ i++;
+ }
+
+ if (i >= FNLEN)
+ {
+ fprintf(stderr, "convert_from_UTF8(): buffer overflow\n");
+ return -1;
+ }
+ else //need terminating null:
+ {
+ for(i;i<FNLEN;i++)
+ UTF8_word[i] = 0;
+ }
+
+ DEBUGCODE {fprintf(stderr, "UTF8_word = %s\n", UTF8_word);}
+
+ return strlen(UTF8_word);
+}
+
+SDL_Surface* create_surface_wchar(wchar_t *t, TTF_Font *font, const SDL_Color *c,int size)
+{
+ char tmp[512];
+ int i;
+ wchar_t wchar_tmp[512];
+ SDL_Surface* out = NULL;
+ SDL_Surface* black_letters = NULL;
+ SDL_Surface* white_letters = NULL;
+ SDL_Surface* bg = NULL;
+ SDL_Rect dstrect;
+ Uint32 color_key;
+
+ SDLPango_Matrix *colour;
+ colour=SDL_Colour_to_SDLPango_Matrix(c);
+
+
+ if (!t || !font || !c)
+ {
+ fprintf(stderr, "BlackOutline(): invalid ptr parameter, returning.");
+ return NULL;
+ }
+
+ wcsncpy( wchar_tmp, t, size);
+ wchar_tmp[size]=0;
+ i=convert_from_UTF32( tmp, wchar_tmp);
+ tmp[i]=0;
+ DEBUGCODE { printf("wchar:%S to string: %s\n", wchar_tmp, tmp); }
+ DEBUGCODE { printf("Entering create_surface_wchar with: %s\n",tmp); }
+ DEBUGCODE { printf("string size:%d Wchar size:%d\n",i,wcslen(wchar_tmp)); }
+ //DEBUGCODE { exit(-1); }
+ context = SDLPango_CreateContext();
+ SDLPango_SetDpi(context, 125.0, 125.0);
+ SDLPango_SetDefaultColor(context, MATRIX_TRANSPARENT_BACK_BLACK_LETTER );
+ SDLPango_SetBaseDirection(context, SDLPANGO_DIRECTION_LTR);
+ SDLPango_SetMarkup(context,tmp, -1);
+
+ black_letters = SDLPango_CreateSurfaceDraw(context);
+
+ bg = SDL_CreateRGBSurface(SDL_SWSURFACE,
+ (black_letters->w) + 5,
+ (black_letters->h) + 5,
+ 32,
+ rmask, gmask, bmask, amask);
+ SDLPango_Draw(context, bg, 0, 0);
+ /* Use color key for eventual transparency: */
+ color_key = SDL_MapRGB(bg->format, 10, 10, 10);
+ SDL_FillRect(bg, NULL, color_key);
+ /* Now draw black outline/shadow 2 pixels on each side: */
+ dstrect.w = black_letters->w;
+ dstrect.h = black_letters->h;
+
+ /* NOTE: can make the "shadow" more or less pronounced by */
+ /* changing the parameters of these loops. */
+ for (dstrect.x = 1; dstrect.x < 4; dstrect.x++)
+ for (dstrect.y = 1; dstrect.y < 3; dstrect.y++)
+ SDL_BlitSurface(black_letters , NULL, bg, &dstrect );
+
+ SDL_FreeSurface(black_letters);
+
+ /* --- Put the color version of the text on top! --- */
+
+
+ SDLPango_SetDefaultColor(context, colour);
+ white_letters = SDLPango_CreateSurfaceDraw(context);
+ dstrect.x = 1;
+ dstrect.y = 1;
+ SDL_BlitSurface(white_letters, NULL, bg, &dstrect);
+ SDL_FreeSurface(white_letters);
+ /* --- Convert to the screen format for quicker blits --- */
+ SDL_SetColorKey(bg, SDL_SRCCOLORKEY|SDL_RLEACCEL, color_key);
+ out = SDL_DisplayFormatAlpha(bg);
+ SDL_FreeSurface(bg);
+ return out;
+}
+
Modified: tuxtype/branches/tuxtype-indic/tuxtype/data/Makefile.am
===================================================================
--- tuxtype/branches/tuxtype-indic/tuxtype/data/Makefile.am 2007-08-01 23:02:27 UTC (rev 193)
+++ tuxtype/branches/tuxtype-indic/tuxtype/data/Makefile.am 2007-08-19 10:39:08 UTC (rev 194)
@@ -1,12 +1,16 @@
SUBDIRS = images scripts sounds themes words fonts
-EXTRA_DIST = keyboard.lst
+EXTRA_DIST = keyboard.lst phrases.txt
install-data-local:
$(mkinstalldirs) $(DESTDIR)$(prefix)/share/$(PACKAGE)/data
$(INSTALL_DATA) $(srcdir)/keyboard.lst $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/keyboard.lst
+ $(mkinstalldirs) $(DESTDIR)$(prefix)/share/$(PACKAGE)/data
+ $(INSTALL_DATA) $(srcdir)/phrases.txt $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/phrases.txt
+
uninstall-local:
rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/keyboard.lst
+ rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/phrases.txt
Modified: tuxtype/branches/tuxtype-indic/tuxtype/data/Makefile.in
===================================================================
--- tuxtype/branches/tuxtype-indic/tuxtype/data/Makefile.in 2007-08-01 23:02:27 UTC (rev 193)
+++ tuxtype/branches/tuxtype-indic/tuxtype/data/Makefile.in 2007-08-19 10:39:08 UTC (rev 194)
@@ -162,7 +162,7 @@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = images scripts sounds themes words fonts
-EXTRA_DIST = keyboard.lst
+EXTRA_DIST = keyboard.lst phrases.txt
all: all-recursive
.SUFFIXES:
@@ -474,9 +474,12 @@
install-data-local:
$(mkinstalldirs) $(DESTDIR)$(prefix)/share/$(PACKAGE)/data
$(INSTALL_DATA) $(srcdir)/keyboard.lst $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/keyboard.lst
+ $(mkinstalldirs) $(DESTDIR)$(prefix)/share/$(PACKAGE)/data
+ $(INSTALL_DATA) $(srcdir)/phrases.txt $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/phrases.txt
uninstall-local:
rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/keyboard.lst
+ rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/phrases.txt
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
Added: tuxtype/branches/tuxtype-indic/tuxtype/data/images/keyboard/key.png
===================================================================
(Binary files differ)
Property changes on: tuxtype/branches/tuxtype-indic/tuxtype/data/images/keyboard/key.png
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: tuxtype/branches/tuxtype-indic/tuxtype/data/phrases.txt
===================================================================
--- tuxtype/branches/tuxtype-indic/tuxtype/data/phrases.txt (rev 0)
+++ tuxtype/branches/tuxtype-indic/tuxtype/data/phrases.txt 2007-08-19 10:39:08 UTC (rev 194)
@@ -0,0 +1,4 @@
+Twinkle, twinkle, little star,
+How I wonder what you are!
+Up above the world so high,
+Like a diamond in the sky!
Modified: tuxtype/branches/tuxtype-indic/tuxtype/data/themes/malayalam/Makefile
===================================================================
--- tuxtype/branches/tuxtype-indic/tuxtype/data/themes/malayalam/Makefile 2007-08-01 23:02:27 UTC (rev 193)
+++ tuxtype/branches/tuxtype-indic/tuxtype/data/themes/malayalam/Makefile 2007-08-19 10:39:08 UTC (rev 194)
@@ -57,11 +57,11 @@
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = ${SHELL} /root/Desktop/tuxtype-indic/missing --run aclocal-1.10
-AMTAR = ${SHELL} /root/Desktop/tuxtype-indic/missing --run tar
-AUTOCONF = ${SHELL} /root/Desktop/tuxtype-indic/missing --run autoconf
-AUTOHEADER = ${SHELL} /root/Desktop/tuxtype-indic/missing --run autoheader
-AUTOMAKE = ${SHELL} /root/Desktop/tuxtype-indic/missing --run automake-1.10
+ACLOCAL = ${SHELL} /usr/local/src/tuxtype-indic/missing --run aclocal-1.10
+AMTAR = ${SHELL} /usr/local/src/tuxtype-indic/missing --run tar
+AUTOCONF = ${SHELL} /usr/local/src/tuxtype-indic/missing --run autoconf
+AUTOHEADER = ${SHELL} /usr/local/src/tuxtype-indic/missing --run autoheader
+AUTOMAKE = ${SHELL} /usr/local/src/tuxtype-indic/missing --run automake-1.10
AWK = gawk
CC = gcc
CCDEPMODE = depmode=gcc3
@@ -84,13 +84,13 @@
INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
LDFLAGS =
LIBOBJS =
-LIBS = -L/usr/lib -lSDL -lSDL_image -lSDL_ttf -lSDL_mixer
+LIBS = -L/usr/lib -lSDL -lSDL_Pango -lSDL_image -lSDL_ttf -lSDL_mixer
LN_S = ln -s
LTLIBOBJS =
-MAKEINFO = ${SHELL} /root/Desktop/tuxtype-indic/missing --run makeinfo
+MAKEINFO = ${SHELL} /usr/local/src/tuxtype-indic/missing --run makeinfo
MKDIR_P = /bin/mkdir -p
NSIS = no
-NSI_DLL_DIR = /root/tuxtype_dll
+NSI_DLL_DIR = /home/mobin/tuxtype_dll
NSI_INSTALL_DIR = mingw32
OBJEXT = o
PACKAGE = tuxtype
@@ -108,10 +108,10 @@
STRIP =
VERSION = 1.5.10
WINDRES =
-abs_builddir = /root/Desktop/tuxtype-indic/tuxtype/data/themes/malayalam
-abs_srcdir = /root/Desktop/tuxtype-indic/tuxtype/data/themes/malayalam
-abs_top_builddir = /root/Desktop/tuxtype-indic
-abs_top_srcdir = /root/Desktop/tuxtype-indic
+abs_builddir = /usr/local/src/tuxtype-indic/tuxtype/data/themes/malayalam
+abs_srcdir = /usr/local/src/tuxtype-indic/tuxtype/data/themes/malayalam
+abs_top_builddir = /usr/local/src/tuxtype-indic
+abs_top_srcdir = /usr/local/src/tuxtype-indic
ac_ct_CC = gcc
am__include = include
am__leading_dot = .
@@ -138,7 +138,7 @@
htmldir = ${docdir}
includedir = ${prefix}/include
infodir = ${datarootdir}/info
-install_sh = $(SHELL) /root/Desktop/tuxtype-indic/install-sh
+install_sh = $(SHELL) /usr/local/src/tuxtype-indic/install-sh
libdir = ${exec_prefix}/lib
libexecdir = ${exec_prefix}/libexec
localedir = ${datarootdir}/locale
@@ -165,7 +165,7 @@
images\
words
-EXTRA_DIST = keyboard.lst lang.po
+EXTRA_DIST = keyboard.lst lang.po phrases.txt
all: all-recursive
.SUFFIXES:
@@ -479,10 +479,13 @@
$(INSTALL_DATA) $(srcdir)/lang.po $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/malayalam/lang.po
$(mkinstalldirs) $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/malayalam
$(INSTALL_DATA) $(srcdir)/keyboard.lst $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/malayalam/keyboard.lst
+ $(mkinstalldirs) $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/malayalam
+ $(INSTALL_DATA) $(srcdir)/phrases.txt $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/malayalam/phrases.txt
uninstall-local:
rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/malayalam/keyboard.lst
rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/malayalam/lang.po
+ rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/malayalam/phrases.txt
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
Modified: tuxtype/branches/tuxtype-indic/tuxtype/data/themes/malayalam/Makefile.am
===================================================================
--- tuxtype/branches/tuxtype-indic/tuxtype/data/themes/malayalam/Makefile.am 2007-08-01 23:02:27 UTC (rev 193)
+++ tuxtype/branches/tuxtype-indic/tuxtype/data/themes/malayalam/Makefile.am 2007-08-19 10:39:08 UTC (rev 194)
@@ -3,14 +3,19 @@
images\
words
-EXTRA_DIST = keyboard.lst lang.po
+EXTRA_DIST = keyboard.lst lang.po phrases.txt
install-data-local:
$(mkinstalldirs) $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/malayalam
$(INSTALL_DATA) $(srcdir)/lang.po $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/malayalam/lang.po
$(mkinstalldirs) $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/malayalam
$(INSTALL_DATA) $(srcdir)/keyboard.lst $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/malayalam/keyboard.lst
+ $(mkinstalldirs) $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/malayalam
+ $(INSTALL_DATA) $(srcdir)/phrases.txt $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/malayalam/phrases.txt
+
uninstall-local:
rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/malayalam/keyboard.lst
rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/malayalam/lang.po
+ rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/malayalam/phrases.txt
+
Modified: tuxtype/branches/tuxtype-indic/tuxtype/data/themes/malayalam/Makefile.in
===================================================================
--- tuxtype/branches/tuxtype-indic/tuxtype/data/themes/malayalam/Makefile.in 2007-08-01 23:02:27 UTC (rev 193)
+++ tuxtype/branches/tuxtype-indic/tuxtype/data/themes/malayalam/Makefile.in 2007-08-19 10:39:08 UTC (rev 194)
@@ -165,7 +165,7 @@
images\
words
-EXTRA_DIST = keyboard.lst lang.po
+EXTRA_DIST = keyboard.lst lang.po phrases.txt
all: all-recursive
.SUFFIXES:
@@ -479,10 +479,13 @@
$(INSTALL_DATA) $(srcdir)/lang.po $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/malayalam/lang.po
$(mkinstalldirs) $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/malayalam
$(INSTALL_DATA) $(srcdir)/keyboard.lst $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/malayalam/keyboard.lst
+ $(mkinstalldirs) $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/malayalam
+ $(INSTALL_DATA) $(srcdir)/phrases.txt $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/malayalam/phrases.txt
uninstall-local:
rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/malayalam/keyboard.lst
rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/malayalam/lang.po
+ rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/malayalam/phrases.txt
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
Modified: tuxtype/branches/tuxtype-indic/tuxtype/data/themes/malayalam/images/Makefile.am
===================================================================
--- tuxtype/branches/tuxtype-indic/tuxtype/data/themes/malayalam/images/Makefile.am 2007-08-01 23:02:27 UTC (rev 193)
+++ tuxtype/branches/tuxtype-indic/tuxtype/data/themes/malayalam/images/Makefile.am 2007-08-19 10:39:08 UTC (rev 194)
@@ -1,5 +1,5 @@
-SUBDIRS = status
+SUBDIRS = status keyboard
EXTRA_DIST = \
splat0.png
Modified: tuxtype/branches/tuxtype-indic/tuxtype/data/themes/malayalam/images/Makefile.in
===================================================================
--- tuxtype/branches/tuxtype-indic/tuxtype/data/themes/malayalam/images/Makefile.in 2007-08-01 23:02:27 UTC (rev 193)
+++ tuxtype/branches/tuxtype-indic/tuxtype/data/themes/malayalam/images/Makefile.in 2007-08-19 10:39:08 UTC (rev 194)
@@ -161,7 +161,7 @@
target_vendor = @target_vendor@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-SUBDIRS = status
+SUBDIRS = status keyboard
EXTRA_DIST = \
splat0.png
Added: tuxtype/branches/tuxtype-indic/tuxtype/data/themes/malayalam/images/keyboard/Makefile.am
===================================================================
--- tuxtype/branches/tuxtype-indic/tuxtype/data/themes/malayalam/images/keyboard/Makefile.am (rev 0)
+++ tuxtype/branches/tuxtype-indic/tuxtype/data/themes/malayalam/images/keyboard/Makefile.am 2007-08-19 10:39:08 UTC (rev 194)
@@ -0,0 +1,11 @@
+
+EXTRA_DIST = \
+key.png
+
+install-data-local:
+ $(mkinstalldirs) $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/malayalam/images/keyboard
+ $(INSTALL_DATA) $(srcdir)/key.png $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/malayalam/images/keyboard/key.png
+
+uninstall-local:
+ rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/malayalam/images/keyboard/key.png
+
Added: tuxtype/branches/tuxtype-indic/tuxtype/data/themes/malayalam/images/keyboard/Makefile.in
===================================================================
--- tuxtype/branches/tuxtype-indic/tuxtype/data/themes/malayalam/images/keyboard/Makefile.in (rev 0)
+++ tuxtype/branches/tuxtype-indic/tuxtype/data/themes/malayalam/images/keyboard/Makefile.in 2007-08-19 10:39:08 UTC (rev 194)
@@ -0,0 +1,325 @@
+# Makefile.in generated by automake 1.10 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = tuxtype/data/themes/malayalam/images/keyboard
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NSIS = @NSIS@
+NSI_DLL_DIR = @NSI_DLL_DIR@
+NSI_INSTALL_DIR = @NSI_INSTALL_DIR@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+SDL_CFLAGS = @SDL_CFLAGS@
+SDL_CONFIG = @SDL_CONFIG@
+SDL_LIBS = @SDL_LIBS@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+WINDRES = @WINDRES@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+EXTRA_DIST = \
+key.png
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tuxtype/data/themes/malayalam/images/keyboard/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --foreign tuxtype/data/themes/malayalam/images/keyboard/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-data-local
+
+install-dvi: install-dvi-am
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-local
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic distclean \
+ distclean-generic distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am \
+ install-data-local install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am uninstall uninstall-am uninstall-local
+
+
+install-data-local:
+ $(mkinstalldirs) $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/malayalam/images/keyboard
+ $(INSTALL_DATA) $(srcdir)/key.png $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/malayalam/images/keyboard/key.png
+
+uninstall-local:
+ rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/malayalam/images/keyboard/key.png
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Added: tuxtype/branches/tuxtype-indic/tuxtype/data/themes/malayalam/images/keyboard/key.png
===================================================================
(Binary files differ)
Property changes on: tuxtype/branches/tuxtype-indic/tuxtype/data/themes/malayalam/images/keyboard/key.png
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: tuxtype/branches/tuxtype-indic/tuxtype/data/themes/malayalam/images/keyboard/keyboard.png
===================================================================
(Binary files differ)
Property changes on: tuxtype/branches/tuxtype-indic/tuxtype/data/themes/malayalam/images/keyboard/keyboard.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: tuxtype/branches/tuxtype-indic/tuxtype/data/themes/malayalam/phrases.txt
===================================================================
(Binary files differ)
Property changes on: tuxtype/branches/tuxtype-indic/tuxtype/data/themes/malayalam/phrases.txt
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: tuxtype/branches/tuxtype-indic/tuxtype/funcs.h
===================================================================
--- tuxtype/branches/tuxtype-indic/tuxtype/funcs.h 2007-08-01 23:02:27 UTC (rev 193)
+++ tuxtype/branches/tuxtype-indic/tuxtype/funcs.h 2007-08-19 10:39:08 UTC (rev 194)
@@ -34,6 +34,7 @@
void LoadKeyboard(void);
int RenderLetters(const TTF_Font* letter_font);
void UseAlphabet(void);
+int convert_from_UTF8(wchar_t* wide_word, const char* UTF8_word);
/* In audio.c: */
Modified: tuxtype/branches/tuxtype-indic/tuxtype/practice.c
===================================================================
--- tuxtype/branches/tuxtype-indic/tuxtype/practice.c 2007-08-01 23:02:27 UTC (rev 193)
+++ tuxtype/branches/tuxtype-indic/tuxtype/practice.c 2007-08-19 10:39:08 UTC (rev 194)
@@ -25,19 +25,27 @@
TTF_Font *font;
char phrase[255][FNLEN];
+wchar_t wphrase[255][FNLEN];
+
Mix_Chunk *wrong;
/*local function prototypes: */
-static int get_phrase(const char* phr);
+static int get_phrase(wchar_t* phr);
static void practice_load_media(void);
static void practice_unload_media(void);
-static void print_at(const char *pphrase, int wrap, int x, int y);
+static void print_at(wchar_t *pphrase, int wrap, int x, int y);
static void show(unsigned char t);
+void create_letters(wchar_t* widestr);
+static void print_string_at(const char *string,int x,int y);
+static void next_letter(wchar_t *wphrase, int c);
-/************************************************************************/
+
+//static int convert_from_UTF8(wchar_t*, const char*);
+
+//************************************************************************/
/* */
-/* "Public" functions (callable throughout program) */
+/* "Public" functions (callable throughout program) convert_from_UTF8(wphrase, pphrase); */
/* */
/************************************************************************/
@@ -50,6 +58,9 @@
*
*
*/
+ SDL_Surface *tmp;
+ SDL_Surface *clear_text;
+ wchar_t wphrase[128];
Uint32 start=0,a=0;
int quit=0,
@@ -60,26 +71,48 @@
total=0,
state=0;
int key[100];
- SDL_Rect dst, dst2, dst3, dst4,dst5;
+ SDL_Rect dst, dst2, dst3, dst4,dst5,clear_dst;
char keytime[FNLEN],
totaltime[FNLEN];
practice_load_media();
+
+ clear_text = SDL_CreateRGBSurface(SDL_SWSURFACE, 700, 50, 32, rmask, gmask, bmask, amask);
+
+ SDL_FillRect(clear_text, NULL, 0xff000000);
+
SDL_BlitSurface(bkg, NULL, screen, NULL);
SDL_BlitSurface(hands, NULL, screen, &hand_loc);
SDL_Flip(screen);
- wp = get_phrase(pphrase);
+ convert_from_UTF8(wphrase, pphrase);
+
+ wp = get_phrase(wphrase);
if (!strncmp(phrase[0], "", 1))
strncpy(pphrase, phrase[0], 80);
- dst.x = 320 - (letters[65]->w/2); dst.y = 100; dst.w = letters[65]->w; dst.h = letters[65]->h;
+/* dst.x = 320 - (letters[65]->w/2); dst.y = 100; dst.w = letters[65]->w; dst.h = letters[65]->h;
dst2.x = 50; dst2.y = 400; dst2.w = letters[65]->w; dst2.h = letters[65]->h;
dst3.x = 50; dst3.y = 400; dst3.w = 160; dst3.h = 50;
dst4.x = 480; dst4.y = 400; dst4.w = 240; dst4.h = 50;
dst5.x = 480; dst5.y = 400; dst5.w = 240; dst5.h = 50;
dst.x = 40;
+*/
+
+ dst.x = 320 - 10; dst.y = 100; dst.w = 21; dst.h = 21;
+ dst2.x = 50; dst2.y = 400; dst2.w = 21; dst2.h = 21;
+ dst3.x = 50; dst3.y = 400; dst3.w = 160; dst3.h = 50;
+ dst4.x = 480; dst4.y = 400; dst4.w = 240; dst4.h = 50;
+ dst5.x = 480; dst5.y = 400; dst5.w = 240; dst5.h = 50;
+ dst.x = 40;
+ clear_dst.x = dst.x-70;
+ clear_dst.y = dst.y;
+ clear_dst.w = 700;
+ clear_dst.h=40;
+ SDL_BlitSurface(clear_text, NULL, screen, &clear_dst);
+
+
start = SDL_GetTicks();
do {
@@ -92,7 +125,8 @@
case 1:
if (SDL_GetTicks() - start > 500) {
for (i=0; i<10; i++)
- if (FINGER[(int)pphrase[c]][i]){
+ if (FINGER[(int)wphrase[c]][i]){
+
SDL_BlitSurface(hand[i], NULL, screen, &hand_loc);
}
state = 2;
@@ -109,7 +143,8 @@
break;
case 4:
for (i=0; i<10; i++)
- if (FINGER[(int)pphrase[c]][i])
+ if (FINGER[(int)wphrase[c]][i])
+
SDL_BlitSurface(hand[i], NULL, screen, &hand_loc);
state = 11;
break;
@@ -117,6 +152,8 @@
state -= 2; // this is to make the flashing slower
}
+ next_letter(wphrase, c);
+
while (SDL_PollEvent(&event)) {
if (event.type == SDL_KEYDOWN) {
a=SDL_GetTicks();
@@ -131,31 +168,41 @@
//practice next phase in list
//a=a;
} else {
- if (ALPHABET[event.key.keysym.unicode] && pphrase[c]==(char)event.key.keysym.unicode){
+ if (wphrase[c]==event.key.keysym.unicode){
+
state=0;
dst2.x=40;
dst4.x=480;
SDL_BlitSurface(bkg, &dst3, screen, &dst2);
SDL_BlitSurface(bkg, &dst5, screen, &dst4);
SDL_Flip(screen);
- SDL_BlitSurface(letters[event.key.keysym.unicode], NULL, screen, &dst);
- for (z=0;z<strlen(keytime);z++){
- SDL_BlitSurface(letters[(int)keytime[z]], NULL, screen, &dst2);
- dst2.x = dst2.x + letters[(int)keytime[z]]->w-2;
- }
- for (z=0;z<strlen(totaltime);z++){
- SDL_BlitSurface(letters[(int)totaltime[z]], NULL, screen, &dst4);
- dst4.x = dst4.x + letters[(int)totaltime[z]]->w-2;
- }
- dst.x = (dst.x + letters[event.key.keysym.unicode]->w) - 5;
- if (c==(strlen(pphrase)-1)){
- print_at("Great!",6 ,275 ,200);
+
+
+
+ if(c>wp)
+ {
+
+ dst.y=142;
+ clear_dst.y = dst.y; tmp = create_surface_wchar(wphrase+wp+2,font, &white, (c+2)%wp);
+ }
+ else
+ tmp = create_surface_wchar(wphrase,font, &white, c+1);
+ SDL_BlitSurface(clear_text, NULL, screen, &clear_dst); SDL_BlitSurface(tmp, NULL, screen, &dst);
+ SDL_FreeSurface(tmp);
+
+ print_string_at(keytime,dst2.x,dst2.y);
+ print_string_at(keytime,dst4.x,dst4.y);
+
+
+
+ if (c==(wcslen(wphrase)-1)){
+ print_string_at(_("Great!"),275 ,200);
SDL_Flip(screen);
SDL_Delay(2500);
quit=1;
}
if (c==wp){
- c++;
+ //c++;
dst.x=40;
dst.y=142;
}
@@ -170,6 +217,7 @@
SDL_Flip(screen);
SDL_Delay(30);
}while (!quit);
+ SDL_FreeSurface(clear_text);
practice_unload_media();
return 1;
}
@@ -188,7 +236,7 @@
{
int i;
unsigned char fn[FNLEN];
- unsigned char let[5];
+ //unsigned char let[5];
LOG("Loading practice media\n");
for (i=0; i<10; i++) {
@@ -202,15 +250,15 @@
hand_loc.w = (hand[0]->w);
hand_loc.h = (hand[0]->h);
- bkg = LoadImage("main_bkg.png", IMG_ALPHA);
+ bkg = LoadImage("keyboard/key.png", IMG_ALPHA);
font = LoadFont( ttf_font, 32 );
wrong = LoadSound("tock.wav");
- let[1]=0;
+ //let[1]=0;
- for (i=1; i<255; i++)
+ /*for (i=1; i<255; i++)
{
if (ALPHABET[i])
{
@@ -224,6 +272,7 @@
letters[i] = NULL;
}
}
+*/
LOG("DONE - Loading practice media\n");
TTF_CloseFont(font);
@@ -241,15 +290,15 @@
for (i=0; i<10; i++)
SDL_FreeSurface(hand[i]);
- for (i=1; i<255; i++)
+/* for (i=1; i<255; i++)
if (ALPHABET[i])
SDL_FreeSurface(letters[i]);
- Mix_FreeChunk(wrong);
+*/ Mix_FreeChunk(wrong);
}
-static void show(unsigned char t)
+/*static void show(unsigned char t)
{
SDL_Rect dst;
dst.x = 320 - (letters[(int)t]->w/2);
@@ -258,25 +307,24 @@
dst.h = letters[(int)t]->h;
SDL_BlitSurface(letters[(int)t], NULL, screen, &dst);
}
+*/
-
-static int get_phrase(const char* phr)
-{
- int pc=0,
+static int get_phrase(wchar_t* wphrase)
+{ int pc=0,
pw[256] = { 0 },
wp=0,
i=0,
- c=0,
+// c=0
z=0;
- char fn[FNLEN];
+// char fn[FNLEN];
/* If we didn't receive a phrase get the first one from the file...*/
- if (strncmp("", phr, 40)==0){
- FILE *pf;
- /* set the phrases directory/file */
- #ifdef WIN32
+// if (strncmp("", phr, 40)==0){
+// FILE *pf;
+// /* set the phrases directory/file */
+/* #ifdef WIN32
snprintf( fn, FNLEN-1, "userdata/phrases.txt" );
#else
snprintf( fn, FNLEN-1, (const char*)"%s/.tuxtype/phrases.txt", getenv("HOME") );
@@ -342,15 +390,54 @@
LOG("Leaving get_phrase()\n");
return(wp);
}
+*/
-static void print_at(const char *pphrase, int wrap, int x, int y)
+
+//Calculate and record pixel width of phrases
+ //Find wrapping point
+ if (wcslen(wphrase)<50)
+ {
+ wp=wcslen(wphrase);
+ print_at( wphrase, wp, 40, 10 );
+
+ }
+ else
+ {
+ z=0;
+ wp=0;
+ for (i=0;i<wcslen(wphrase);i++)
+ {
+
+ z++;
+ if (wp == 0 && z > 50)
+ {
+ wp = i-1;
+ break;
+ }
+ }
+ for (i=wp;i>=0;i--){
+ if (wphrase[i] == ' ')
+ {
+ wp=i-1;
+ break;
+ }
+ }
+ print_at( wphrase, wp, 40, 10 );
+
+ }
+ return(wp);
+}
+
+
+static void print_at(wchar_t *pphrase, int wrap, int x, int y)
{
int z=0;
+ SDL_Surface *tmp;
letter_loc.x = x;
letter_loc.y = y;
- letter_loc.w = letters[65]->w;
+/* letter_loc.w = letters[65]->w;
letter_loc.h = letters[65]->h;
if ( wrap == strlen(pphrase) ){
for (z=0;z<strlen(pphrase);z++){
@@ -371,4 +458,73 @@
}
}
}
+*/
+ font = LoadFont( ttf_font, 32 );
+ DEBUGCODE { printf("\n\n\nEntering print_at with : %S\n",pphrase); }
+ if ( wrap == wcslen(pphrase) ){
+ tmp = create_surface_wchar(pphrase,font, &white, wrap);
+ letter_loc.w = tmp->w+5;
+ letter_loc.h = tmp->h+5;
+ SDL_BlitSurface(tmp, NULL, screen, &letter_loc);
+ SDL_FreeSurface(tmp);
+ }else{
+ tmp = create_surface_wchar(pphrase,font, &white, wrap+1);
+ letter_loc.w = tmp->w+5;
+ letter_loc.h = tmp->h+5;
+ SDL_BlitSurface(tmp, NULL, screen, &letter_loc);
+ SDL_FreeSurface(tmp);
+ letter_loc.x = 40;
+ // - (letter_loc.h/4) to account for free space at top and bottom of rendered letters
+ letter_loc.y = letter_loc.y + letter_loc.h - (letter_loc.h/4);
+ tmp = create_surface_wchar(pphrase+wrap+2,font, &white, wcslen(pphrase));
+ letter_loc.w = tmp->w+5;
+ letter_loc.h = tmp->h+5;
+ SDL_BlitSurface(tmp, NULL, screen, &letter_loc);
+ SDL_FreeSurface(tmp);
+ }
+ TTF_CloseFont(font);
+ // DEBUGCODE { exit(-1); }
+ DEBUGCODE { printf("Leaving print_at \n\n\n"); }
+}
+
+
+
+static void print_string_at(const char *string,int x,int y)
+{
+ wchar_t t[512];
+ SDL_Surface *tmp;
+ SDL_Rect dst;
+ dst.x=x;
+ dst.y=y;
+ dst.h=21;
+ dst.w=21;
+ convert_from_UTF8(t, string);
+ tmp = create_surface_wchar( t, font, &white, wcslen(t));
+ SDL_BlitSurface(tmp, NULL, screen, &dst);
+ SDL_FreeSurface(tmp);
+
+}
+
+
+static void next_letter(wchar_t *t, int c)
+{
+ //int i=21;
+ SDL_Surface *tmp;
+ SDL_Rect dst;
+ print_string_at(_("Next letter:"), 230, 400);
+ dst.x=320;
+ dst.y=350;
+ dst.h=100;
+ dst.w=100;
+ tmp = SDL_CreateRGBSurface(SDL_SWSURFACE, 100, 100, 32, rmask, gmask, bmask, amask);
+ SDL_BlitSurface(tmp, NULL, screen, &dst);
+ SDL_FreeSurface(tmp);
+ dst.x=390;
+ dst.y=400;
+ dst.h=21;
+ dst.w=21;
+ tmp = create_surface_wchar( t+c, font, &white,1);
+ SDL_BlitSurface(tmp, NULL, screen, &dst);
+ SDL_FreeSurface(tmp);
+}
Modified: tuxtype/branches/tuxtype-indic/tuxtype/titlescreen.c
===================================================================
--- tuxtype/branches/tuxtype-indic/tuxtype/titlescreen.c 2007-08-01 23:02:27 UTC (rev 193)
+++ tuxtype/branches/tuxtype-indic/tuxtype/titlescreen.c 2007-08-19 10:39:08 UTC (rev 194)
@@ -88,7 +88,7 @@
Uint32 frame = 0;
Uint32 start = 0;
- int i, j, tux_frame = 0;
+ int i, j, l, tux_frame = 0;
int done = 0;
int firstloop = 1;
int menu_opt = NONE;
@@ -97,7 +97,9 @@
int redraw = 0;
int key_menu = 1;
int old_key_menu = 5;
+ char fn[128];
char phrase[128];
+ FILE *f;
if (sys_sound)
@@ -108,14 +110,15 @@
/* FIXME phrase(s) should come from file */
- strncpy( phrase, "Now is the time for all good men to come to the aid of their country.", 128);
- start = SDL_GetTicks();
+// strncpy( phrase, "Now is the time for all good men to come to the aid of their country.", 128);
+// start = SDL_GetTicks();
-
/*
* StandbyScreen: Display the Standby screen....
*/
+
+
if (show_tux4kids)
{
SDL_Surface *standby;
@@ -631,12 +634,30 @@
if (menu_opt == FREETYPE)
{
unload_media();
- Phrases( phrase );
+ for (l=useEnglish; l<2; l++) {
+ sprintf( fn , "%s/phrases.txt", realPath[l]);
+ if ( CheckFile(fn) ) {
+ unsigned char str[255];
+ f = fopen( fn, "r" );
+ if (f == NULL)
+ continue;
+ DEBUGCODE { printf("Opening file %s\n",fn); }
+ do {
+ fscanf( f, "%[^\n]\n", phrase);
+ Phrases( phrase );
+ } while (!feof(f));
+ break;
+ }
+
+ }
//Practice();
+ fclose(f);
load_media();
redraw = 1;
}
+
+
/* ------ End menu_opt processing ----------- */
More information about the Tux4kids-commits
mailing list