]> git.vomp.tv Git - vompclient-marten.git/commitdiff
Portability
authorChris Tallon <chris@vomp.tv>
Sun, 26 Mar 2006 13:30:36 +0000 (13:30 +0000)
committerChris Tallon <chris@vomp.tv>
Sun, 26 Mar 2006 13:30:36 +0000 (13:30 +0000)
19 files changed:
Makefile
defines.h
demuxer.h
event.h
i18n.cc
i18n.h
language-data.h
log.h
main.cc
osd.cc
osd.h
osdmvp.cc [new file with mode: 0644]
osdmvp.h [new file with mode: 0644]
osdwin.cc [new file with mode: 0644]
osdwin.h [new file with mode: 0644]
timerreceiver.h
timers.h
vepg.h
wtextbox.h

index a57fc1bd9949086a53b260aa6a5d28853fed58c0..3b5bc3bbe466dd1cc7eb034a5911feeb3d024d03 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -25,7 +25,8 @@ OBJECTS1 = main.o command.o log.o tcp.o dsock.o thread.o timers.o i18n.o
 
 OBJECTS2 = remote.o led.o mtd.o video.o audio.o osd.o surface.o                        \
            audiomvp.o audiowin.o                                                       \
-           videomvp.o videowin.o
+           videomvp.o videowin.o                                                       \
+           osdmvp.o osdwin.o
 
 OBJECTS = $(OBJECTS1) $(OBJECTS2)
 
index bb4ebeb0a390ac66a430439a80270cb0a2a86f99..1c278f37972ec27733eac31d7c31683a17ea36e4 100644 (file)
--- a/defines.h
+++ b/defines.h
@@ -37,10 +37,12 @@ ULLONG ntohll(ULLONG a);
 #define SNPRINTF _snprintf
 #define VSNPRINTF _vsnprintf
 #define STRCASECMP stricmp
+#define STRCASESTR StrStrI
 #else
 #define SNPRINTF snprintf
 #define VSNPRINTF vsnprintf
 #define STRCASECMP strcasecmp
+#define STRCASESTR strcasestr
 #endif
 
 #endif
index f8e6e6102a3e64a9f6e19f5919df8cc32e28299a..f935dbccbf51260d41a48620bf0ee40c4a83925a 100644 (file)
--- a/demuxer.h
+++ b/demuxer.h
@@ -94,7 +94,7 @@ class Demuxer
     UCHAR* local_frame;
     static const int demuxMemoryV = 2097152;
     static const int demuxMemoryA = 524288;
-    static const int Demuxer::FrameRates[9];
+    static const int FrameRates[9];
 
     enum FRAMETYPE
     {
diff --git a/event.h b/event.h
index f73f1a679a6571bb9d61ca9335600bac50ca204c..63ab88f23593a6b1d4f680fff7b57c2578f26be0 100644 (file)
--- a/event.h
+++ b/event.h
@@ -22,6 +22,7 @@
 #define EVENT_H
 
 #include <stdio.h>
+#include <string.h>
 
 #include "defines.h"
 
diff --git a/i18n.cc b/i18n.cc
index 28904a0c65180035ef64001a27cd7ed66e8dcffe..4097bf7b0bafe6f5c76f850f6b8784b161571fe7 100644 (file)
--- a/i18n.cc
+++ b/i18n.cc
@@ -91,7 +91,7 @@ int I18n::LanguageIndex(const char* Name)
 {
   for (int i = 0; i < NumLanguages; i++)
   {
-    if (strcasestr(Languages[i], Name)) return i;
+    if (STRCASESTR(Languages[i], Name)) return i;
   }
   Log::getInstance()->log("I18n", Log::ERR, "Unknown language: '%s'", Name);
   return -1;
diff --git a/i18n.h b/i18n.h
index 0bc8515878842d4f1439be41dec9826719d3f76a..cad5c9113757ea0e13b97236e289727de834eb6a 100644 (file)
--- a/i18n.h
+++ b/i18n.h
 #define I18N_H
 
 #include <stdio.h>
+#include <string.h>
+#ifdef WIN32
+#include <shlwapi.h>
+#endif
+
+#include "defines.h"
 #include "log.h"
 #include "vdr.h"
 
index 8f14bc41113811d1e915fe66a400b0418ec99fee..971482f2f7df14c44a530bb6c4179ede888ebf10 100644 (file)
-/*\r
- * language_data.h: Internationalization\r
- *\r
- * This code is taken from the VDR project and modified for VOMP.\r
- * See the main source file 'vdr.c' for original copyright information.\r
- * Modifications (C) 2005 D Pickles.\r
-\r
-    This file is part of VOMP.\r
-\r
-    VOMP is free software; you can redistribute it and/or modify\r
-    it under the terms of the GNU General Public License as published by\r
-    the Free Software Foundation; either version 2 of the License, or\r
-    (at your option) any later version.\r
-\r
-    VOMP is distributed in the hope that it will be useful,\r
-    but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
-    GNU General Public License for more details.\r
-\r
-    You should have received a copy of the GNU General Public License\r
-    along with VOMP; if not, write to the Free Software\r
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
-*/\r
-\r
-/*\r
- * How to add a new language:\r
- *\r
- * 1. Announce your translation action on the VOMP forum\r
- *    to avoid duplicate work.\r
- * 2. Increase the value of 'NUM_LANGUAGES' below.\r
- * 3. Insert a new line in the 'Languages' array containing the name of your\r
- *    language IN YOUR LANGUAGE, so 'Italiano' not 'Italian' for example.\r
- *    Append your language after the last existing language\r
- *    but before the 'test' language\r
- * 4. Insert a new line in the charSets array containing the name of the character\r
- *    set needed for your language. Note that at present only ISO8859-1 is\r
- *    supported\r
- * 5. Insert a new line in the languageCodes array containing the 3-letter\r
- *    abbreviation(s) for your language as used in the channels.conf.\r
- * 6. Insert a line in every member of the 'Phrases[]' array,\r
- *    containing the translated text for your language. You can use the 'test'\r
- *    language to see where the phrases appear on the screen.\r
- * 7. If your language requires a character set other than the default iso8859-1\r
- *    then work will be needed elsewhere in vomp to manage multiple font files.\r
- * 8. Compile VOMP and test the new language by switching to it\r
- *    in the "Options" menu.\r
- * 9. Send the modified files to Chris to have it included in the next version.\r
- *\r
- * In case an English phrase is used in more than one context (and might need\r
- * different translations in other languages) it can be preceeded with an\r
- * arbitrary string to describe its context, separated from the actual phrase\r
- * by a '$' character (see for instance "Button$Stop" vs. "Stop").\r
- * Of course this means that no English phrase may contain the '$' character!\r
- * If this should ever become necessary, the existing '$' would have to be\r
- * replaced with something different...\r
- */\r
-\r
-#ifdef I18N_HEADER\r
-\r
-#define NUM_LANGUAGES 7\r
-#define DEFAULT_LANGUAGE_INDEX 0\r
-\r
-#else\r
-\r
-// The names of the languages (English MUST be first!):\r
-const char* const I18n::Languages[] =\r
-{\r
-  "English",\r
-  "Deutsch",  // German by André Jagusch\r
-  "Svenska",  // Swedish by Lars Fredriksson\r
-  "Magyar",   // Hungarian by Pák Gergely\r
-  "Suomi",    // Finnish by Kimmo Lahdensivu\r
-  "Francais", // French by jtk\r
-  "Test"\r
-};\r
-\r
-// The character set needed for each language:\r
-const char* const I18n::charSets[] =\r
-{\r
-  "iso8859-1",\r
-  "iso8859-1",\r
-  "iso8859-1",\r
-  "iso8859-1",\r
-  "iso8859-1",\r
-  "iso8859-1",\r
-  "iso8859-1"\r
-};\r
-\r
-// The 3-letter names of the language (this MUST be the third phrase!):\r
-const char* const I18n::languageCodes[] =\r
-{\r
-  "eng,dos",\r
-  "deu,ger",\r
-  "sve,swe",\r
-  "hun",\r
-  "fin",\r
-  "fre",\r
-  "tst,xxx"\r
-};\r
-\r
-// The phrases to be translated:\r
-const I18n::tI18nPhrase I18n::Phrases[] =\r
-{\r
-  // Menu titles:\r
-  { "VDR",\r
-    "VDR",\r
-    "VDR",\r
-    "VDR",\r
-    "VDR",\r
-    "VDR",\r
-    "VDR",\r
-  },\r
-  // Welcome screen\r
-  { "Welcome",\r
-    "Willkommen",\r
-    "Välkommen",\r
-    "Tervetuloa",\r
-    "Üdvözöljük",\r
-    "Bonjour",\r
-    "1",\r
-  },\r
-  { "1. Live TV",\r
-    "1. Fernsehen",\r
-    "1. TV",\r
-    "1. TV",\r
-    "1. TV",\r
-    "1. TV en direct",\r
-    "2",\r
-  },\r
-  { "2. Radio",\r
-    "2. Radio",\r
-    "2. Radio",\r
-    "2. Rádió",\r
-    "2. Radio",\r
-    "2. Radio",\r
-    "3",\r
-  },\r
-  { "3. Recordings",\r
-    "3. Aufnahmen",\r
-    "3. Inspelningar",\r
-    "3. Felvett müsorok",\r
-    "3. Tallenteet",\r
-    "3. Enregistrements",\r
-    "4",\r
-  },\r
-  { "4. Timers",\r
-    "",\r
-    "",\r
-    "4. Felvétel",\r
-    "",\r
-    "",\r
-    "5",\r
-  },\r
-  { "5. Options",\r
-    "5. Einstellungen",\r
-    "5. Inställningar",\r
-    "5. Beállítások",\r
-    "5. Asetukset",\r
-    "5. Options",\r
-    "6",\r
-  },\r
-  { "6. Reboot",\r
-    "6. Neustart",\r
-    "6. Starta om",\r
-    "6. Újraindítás",\r
-    "6. Uudelleenkäynnistys",\r
-    "6. Redemarrer",\r
-    "7",\r
-  },\r
-  { "Downloading recordings list",\r
-    "Lade die Aufnahmen-Liste",\r
-    "Laddar lista över inspelningar",\r
-    "Felvétellista letöltése",\r
-    "Ladataan tallennelistaa",\r
-    "Recuperer liste enregistrements",\r
-    "8",\r
-  },\r
-  // Recordings list\r
-  { "Recordings - %s",\r
-    "Aufnahmen - %s",\r
-    "Inspelningar - %s",\r
-    "Felvételek - %s",\r
-    "Tallenteet - %s",\r
-    "Enregistrements - %s",\r
-    "9 - %s",\r
-  },\r
-  { "Recordings",\r
-    "Aufnahmen",\r
-    "Inspelningar",\r
-    "Felvételek",\r
-    "Tallenteet",\r
-    "Enregistrements",\r
-    "10",\r
-  },\r
-  { "<dir> %lu\t%s",\r
-    "<dir> %lu\t%s",\r
-    "<dir> %lu\t%s",\r
-    "<dir> %lu\t%s",\r
-    "<dir> %lu\t%s",\r
-    "<dir> %lu\t%s",\r
-    "11 %lu\t%s",\r
-  },\r
-  { "[ok] = menu",\r
-    "[ok] = Menü",\r
-    "[ok] = meny",\r
-    "[ok] = menü",\r
-    "[ok] = menu",\r
-    "[ok] = valikko",\r
-    "12",\r
-  },\r
-  { "%lu%% used, %iGB free",\r
-    "%lu%% belegt, %iGB frei",\r
-    "%lu%% använt, %iGB ledigt",\r
-    "%lu%% felhasznált, %iGB szabad",\r
-    "%lu%% käytetty, %iGt vapaana",\r
-    "%lu%% utilise, %iGB libre",\r
-    "13 %lu%% %i",\r
-  },\r
-  { "%i to %i of %i", // Also used in channels list\r
-    "%i bis %i (von %i)",\r
-    "%i av %i till %i",\r
-    "%i - %i (összesen %i)",\r
-    "%i - %i (yhteensä %i)",\r
-    "%i de %i a %i",\r
-    "14 %i %i %i",\r
-  },\r
-  // Question\r
-  { "Yes",\r
-    "Ja",\r
-    "Ja",\r
-    "Igen",\r
-    "Kyllä",\r
-    "Oui",\r
-    "15",\r
-  },\r
-  { "No",\r
-    "Nein",\r
-    "Nej",\r
-    "Nem",\r
-    "Ei",\r
-    "Non",\r
-    "16",\r
-  },\r
-  // Recording Menu\r
-  { "Programme menu",\r
-    "Programm-Menü",\r
-    "Programmeny",\r
-    "Müsor menü",\r
-    "Ohjelmavalikko",\r
-    "Menu Programation",\r
-    "17",\r
-  },\r
-  { "Play",\r
-    "Wiedergeben",\r
-    "Spela upp",\r
-    "Lejátszás",\r
-    "Näytä",\r
-    "Jouer",\r
-    "18",\r
-  },\r
-  { "Resume",\r
-    "Fortsetzen",\r
-    "Återuppta",\r
-    "Folytatás",\r
-    "Jatka",\r
-    "Reprendre",\r
-    "19",\r
-  },\r
-  { "Summary",\r
-    "Inhalt",\r
-    "Sammanfattning",\r
-    "Tartalom",\r
-    "Yhteenveto",\r
-    "Resume",\r
-    "20",\r
-  },\r
-  { "Delete",\r
-    "Löschen",\r
-    "Ta bort",\r
-    "Törlés",\r
-    "Poista",\r
-    "Supprimer",\r
-    "21",\r
-  },\r
-  { "Programme summary",\r
-    "Programminhalt",\r
-    "Programsammanfattning",\r
-    "Müsor tartalom",\r
-    "Ohjelmayhteenveto",\r
-    "Sommaire programmes",\r
-    "22",\r
-  },\r
-  { "Summary unavailable",\r
-    "Inhalt nicht verfügbar",\r
-    "Ingen sammanfattning tillgänglig",\r
-    "Tartalom nem elérhetö",\r
-    "Yhteenvetoa ei saatavissa",\r
-    "Sommaire indisponible",\r
-    "23",\r
-  },\r
-  { "Delete recording",\r
-    "Aufnahme löschen",\r
-    "Ta bort inspelning",\r
-    "Felvétel törlése",\r
-    "Poista tallenne",\r
-    "Effacer enregistrement",\r
-    "24",\r
-  },\r
-  { "Are you sure you want to delete this recording?",\r
-    "Sind Sie sich sicher, dass Sie diese Aufnahme löschen möchten?",\r
-    "Är du säker att du vill ta bort den här inspelningen",\r
-    "Biztosan törölni szeretné ezt a felvételt?",\r
-    "Oletko varma, että haluat poistaa tämän tallenteen?",\r
-    "Etes-vous sur de vouloir supprimer cet enregistrement?",\r
-    "25",\r
-  },\r
-  // Server select\r
-  { "Choose a VDR server",\r
-    "Wählen Sie einen VDR-Server",\r
-    "Välj VDR server",\r
-    "Válasszon egy VDR szervert",\r
-    "Valitse VDR-palvelin",\r
-    "Choisir une serveur VDR",\r
-    "26",\r
-  },\r
-\r
-  // Option menus\r
-  { "Options",\r
-    "Einstellungen",\r
-    "Inställningar",\r
-    "Beállitások",\r
-    "Asetukset",\r
-    "Options",\r
-    "27",\r
-  },\r
-  { "TV connection type",\r
-    "TV-Anschlußart",\r
-    "Typ av TV-anslutning",\r
-    "TV csatlakozás tipusa",\r
-    "TV-liityntä",\r
-    "Type de connection TV",\r
-    "28",\r
-  },\r
-  { "Remote control type",\r
-    "Fernbedienungstyp",\r
-    "Fjärrkontroll",\r
-    "Távirányitó tipusa",\r
-    "Kauko-ohjaimen tyyppi",\r
-    "Type telecommande",\r
-    "29",\r
-  },\r
-  { "TV aspect ratio",\r
-    "Seitenverhältnis",\r
-    "TV-format",\r
-    "TV képformátum",\r
-    "Kuvasuhde",\r
-    "Rapport TV",\r
-    "30",\r
-  },\r
-  { "16:9 on 4:3 display mode",\r
-    "16:9 auf 4:3-Modus",\r
-    "16:9 på 4:3-skärm",\r
-    "16:9 a 4:3-as képernyön",\r
-    "16:9 kuvasuhde 4:3 TV:ssä",\r
-    "16:9 sur affichage 4:3",\r
-    "30a",\r
-  },\r
-  { "Power state after bootup",\r
-    "Einschalten nach Neustart",\r
-    "Läge efter strömborfall",\r
-    "Bekapcsolás utáni állapot",\r
-    "Tila käynnistyksen jälkeen",\r
-    "Marche apres demarrage",\r
-    "31",\r
-  },\r
-  { "Display channels",\r
-    "Kanäle anzeigen",\r
-    "Visa kanaler",\r
-    "Csatornák megjelenítése",\r
-    "Näytä kanavat",\r
-    "Afficher chaines",\r
-    "32",\r
-  },\r
-  { "Language",\r
-    "Sprache",\r
-    "Språk",\r
-    "Nyelv",\r
-    "Kieli",\r
-    "Langue",\r
-    "33",\r
-  },\r
-  { "Press back to exit, <, > or [ok] to change",\r
-    "Zum Verlassen back drücken, <, > oder [ok] zum Wechseln",\r
-    "Tryck [back] för att avsluta, eller [ok] för att ändra",\r
-    "[back] gombbal kilép, [<], [>] vagy [ok] gombbal választ",\r
-    "Paina [back] poistuaksesi, <, > tao [ok] muuttaaksesi",\r
-    "Appuyer retour pour sortir <, > ou [ok] pour valider",\r
-    "34",\r
-  },\r
-  { "VDR-Pri 0=OK !See forums!",\r
-    "VDR-Pri 0=OK !Siehe Forum!",\r
-    "VDR-Prio 0=OK !Se forum!",\r
-    "VDR-Pri 0=OK !lásd. fórum!",\r
-    "VDR-Pri 0=OK !Lue forumit!",\r
-    "VDR-Pri 0=OK !Voir forums!",\r
-    "34a",\r
-  },\r
-  // Option choices\r
-  { "Old",\r
-    "Alt",\r
-    "Gammal modell",\r
-    "Régi",\r
-    "Vanha",\r
-    "Vieux",\r
-    "35",\r
-  },\r
-  { "New",\r
-    "Neu",\r
-    "Ny modell",\r
-    "Új",\r
-    "Uusi",\r
-    "Nouveau",\r
-    "36",\r
-  },\r
-  { "RGB+composite",\r
-    "RGB+composite",\r
-    "RGB+komposit",\r
-    "RGB+composite",\r
-    "RGB+komposiitti",\r
-    "RGB+composite",\r
-    "37",\r
-  },\r
-  { "S-Video",\r
-    "S-Video",\r
-    "S-Video",\r
-    "S-Video",\r
-    "S-Video",\r
-    "S-Video",\r
-    "38",\r
-  },\r
-  { "Chop sides",\r
-    "Seiten abschneiden",\r
-    "Ta bort på sidorna",\r
-    "Szélek levágva",\r
-    "Leikkaa sivut",\r
-    "Couper bords",\r
-    "39",\r
-  },\r
-  { "Letterbox",\r
-    "Letterbox",\r
-    "Letterbox",\r
-    "Letterbox",\r
-    "Letterbox",\r
-    "Letterbox",\r
-    "40",\r
-  },\r
-  { "Last state",\r
-    "Letzter Zustand",\r
-    "Återgå til senaste läge",\r
-    "Utolsó állapot",\r
-    "Edellinen tila",\r
-    "Etat precedent",\r
-    "41",\r
-  },\r
-  { "All",\r
-    "Alle",\r
-    "Alla",\r
-    "Összes",\r
-    "Kaikki",\r
-    "Tout",\r
-    "42",\r
-  },\r
-  { "FTA only",\r
-    "nur FTA",\r
-    "Endast FTA",\r
-    "Csak FTA",\r
-    "Vain FTA",\r
-    "FTA seulement",\r
-    "43",\r
-  },\r
-  { "On",\r
-    "An",\r
-    "På",\r
-    "Be",\r
-    "Päällä",\r
-    "On",\r
-    "44",\r
-  },\r
-  { "Off",\r
-    "Aus",\r
-    "Av",\r
-    "Ki",\r
-    "Poissa",\r
-    "Off",\r
-    "45",\r
-  },\r
-\r
-  // Channel Lists\r
-  { "Channels",\r
-    "Fernsehkanäle",\r
-    "Kanaler",\r
-    "Csatornák",\r
-    "Kanavat",\r
-    "Chaines",\r
-    "46",\r
-  },\r
-  { "Radio Stations",\r
-    "Radiokanäle",\r
-    "Radiostationer",\r
-    "Rádiócsatornák",\r
-    "Radiokanavat",\r
-    "Stations Radio",\r
-    "47",\r
-  },\r
-  // Banners\r
-  { "No channel data available",\r
-    "Keine Daten für diesen Kanal verfügbar",\r
-    "Ingen programinformation tillgänglig",\r
-    "Csatorna-adatok nem állnak rendelkezésre",\r
-    "Kanavatietoa ei saatavilla",\r
-    "Pas de chaines disponibles",\r
-    "48",\r
-  },\r
-  { "info",\r
-    "Info",\r
-    "Info",\r
-    "Infó",\r
-    "Info",\r
-    "Info",\r
-    "49",\r
-  },\r
-  { "Channel unavailable",\r
-    "Kanal nicht verfügbar",\r
-    "Kanalen är inte tillgänglig",\r
-    "A csatorna nem elérhetö",\r
-    "Kanava ei saatavilla",\r
-    "Chaine indisponible",\r
-    "51",\r
-  },\r
-  // Connect screen\r
-  { "Locating server",\r
-    "Lokalisiere Server",\r
-    "Letar efter server",\r
-    "Szerver keresése",\r
-    "Etsitään palvelinta",\r
-    "Recherche serveur",\r
-    "52",\r
-  },\r
-  { "Connecting to VDR",\r
-    "Verbinde zum VDR",\r
-    "Ansluter till VDR",\r
-    "Csatlakozás a VDR-hez",\r
-    "Yhdistetään VDR:ään",\r
-    "Connection au VDR",\r
-    "53",\r
-  },\r
-  { "Login failed",\r
-    "Login fehlgeschlagen",\r
-    "Inloggning misslycklades",\r
-    "Bejelentkezés sikertelen",\r
-    "Sisäänkirjautuminen epäonnistui",\r
-    "Echec de login",\r
-    "54",\r
-  },\r
-  { "Connection failed",\r
-    "Verbindung fehlgeschlagen",\r
-    "Anslutning misslyckades",\r
-    "Kapcsolódás sikertelen",\r
-    "Yhteys epäonnistui",\r
-    "Echec de connection",\r
-    "55",\r
-  },\r
-  // Command\r
-  { "Connected, loading config",\r
-    "Verbunden, lade Einstellungen",\r
-    "Ansluten, laddar konfigurering",\r
-    "Kapcsolódva, beállitások betöltése",\r
-    "Yhdistetty, ladataan konfiguraatiota",\r
-    "Connecte, chargement configuration",\r
-    "56",\r
-  },\r
-  // EPG\r
-  { "EPG",\r
-    "EPG",\r
-    "EPG",\r
-    "EPG",\r
-    "EPG",\r
-    "EPG",\r
-    "57",\r
-  },\r
-  { "OK",\r
-    "OK",\r
-    "OK",\r
-    "OK",\r
-    "OK",\r
-    "OK",\r
-    "57.5",\r
-  },\r
-  { "Page up",\r
-    "Seite hoch",\r
-    "Föregående sida",\r
-    "Fel",\r
-    "Seuraava sivu",\r
-    "Haut de page",\r
-    "58",\r
-  },\r
-  { "Page down",\r
-    "Seite runter",\r
-    "Nästa sida",\r
-    "Le",\r
-    "Edellinen sivu",\r
-    "Bas de page",\r
-    "59",\r
-  },\r
-  { "-24 hours",\r
-    "-24 Std.",\r
-    "-24 timmar",\r
-    "-24 óra",\r
-    "-24 tuntia",\r
-    "-24 heures",\r
-    "60",\r
-  },\r
-  { "+24 hours",\r
-    "+24 Std.",\r
-    "+24 timmar",\r
-    "+24 óra",\r
-    "+24 tuntia",\r
-    "+24 heures",\r
-    "61",\r
-  },\r
-  { "Go: Preview",\r
-    "Go: Vorschau",\r
-    "Go: Visa",\r
-    "Go: Betekintés",\r
-    "Go: Esikatselu",\r
-    "Go: apercu",\r
-    "61.5",\r
-  },\r
-  { "Guide / Back: Close",\r
-    "Back: EPG schließen",\r
-    "Guide / Back: Stäng",\r
-    "Guide/Back: Bezárás",\r
-    "Guide / Back: Sulje",\r
-    "Guide / Back: Fermer",\r
-    "62",\r
-  },\r
-  { "Rec: Set timer",\r
-    "Rec: Aufnahme programmieren",\r
-    "Rec: Programmera timer",\r
-    "Rec: Felvétel beállítása",\r
-    "Rec: Aseta ajastus",\r
-    "Rec: Definir heure",\r
-    "63",\r
-  },\r
-  { "Sel channel",\r
-    "Umschalten",\r
-    "Välj kanal",\r
-    "Csatornaválasztás",\r
-    "Valitse kanava",\r
-    "Selection chaine",\r
-    "64",\r
-  },\r
-  { "There are no programme details available for this period",\r
-    "Es sind keine Programminformationen für diesen Zeitraum verfügbar",\r
-    "Det finns ingen programinforamtion för denna period",\r
-    "Nincs programinformáció ehhez az idöszakhoz",\r
-    "Tälle ajanjaksolle ei saatavilla ohjelmatietoja",\r
-    "Aucune information sur le programme pour cette periode",\r
-    "65",\r
-  },\r
-  { "No programme details",\r
-    "Keine Programminformation",\r
-    "Ingen programinformation tillgänglig",\r
-    "Nincs programinformáció",\r
-    "Ei ohjelmatietoja",\r
-    "Pas de detail du programme",\r
-    "66",\r
-  },\r
-  // Edit timer\r
-  { "Edit Timer",\r
-    "",\r
-    "",\r
-    "",\r
-    "",\r
-    "",\r
-    "67",\r
-  },\r
- // End marker.\r
-  { NULL }\r
-};\r
-\r
-#endif\r
+/*
+ * language_data.h: Internationalization
+ *
+ * This code is taken from the VDR project and modified for VOMP.
+ * See the main source file 'vdr.c' for original copyright information.
+ * Modifications (C) 2005 D Pickles.
+
+    This file is part of VOMP.
+
+    VOMP is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    VOMP is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with VOMP; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+/*
+ * How to add a new language:
+ *
+ * 1. Announce your translation action on the VOMP forum
+ *    to avoid duplicate work.
+ * 2. Increase the value of 'NUM_LANGUAGES' below.
+ * 3. Insert a new line in the 'Languages' array containing the name of your
+ *    language IN YOUR LANGUAGE, so 'Italiano' not 'Italian' for example.
+ *    Append your language after the last existing language
+ *    but before the 'test' language
+ * 4. Insert a new line in the charSets array containing the name of the character
+ *    set needed for your language. Note that at present only ISO8859-1 is
+ *    supported
+ * 5. Insert a new line in the languageCodes array containing the 3-letter
+ *    abbreviation(s) for your language as used in the channels.conf.
+ * 6. Insert a line in every member of the 'Phrases[]' array,
+ *    containing the translated text for your language. You can use the 'test'
+ *    language to see where the phrases appear on the screen.
+ * 7. If your language requires a character set other than the default iso8859-1
+ *    then work will be needed elsewhere in vomp to manage multiple font files.
+ * 8. Compile VOMP and test the new language by switching to it
+ *    in the "Options" menu.
+ * 9. Send the modified files to Chris to have it included in the next version.
+ *
+ * In case an English phrase is used in more than one context (and might need
+ * different translations in other languages) it can be preceeded with an
+ * arbitrary string to describe its context, separated from the actual phrase
+ * by a '$' character (see for instance "Button$Stop" vs. "Stop").
+ * Of course this means that no English phrase may contain the '$' character!
+ * If this should ever become necessary, the existing '$' would have to be
+ * replaced with something different...
+ */
+
+#ifdef I18N_HEADER
+
+#define NUM_LANGUAGES 7
+#define DEFAULT_LANGUAGE_INDEX 0
+
+#else
+
+// The names of the languages (English MUST be first!):
+const char* const I18n::Languages[] =
+{
+  "English",
+  "Deutsch",  // German by André Jagusch
+  "Svenska",  // Swedish by Lars Fredriksson
+  "Magyar",   // Hungarian by Pák Gergely
+  "Suomi",    // Finnish by Kimmo Lahdensivu
+  "Francais", // French by jtk
+  "Test"
+};
+
+// The character set needed for each language:
+const char* const I18n::charSets[] =
+{
+  "iso8859-1",
+  "iso8859-1",
+  "iso8859-1",
+  "iso8859-1",
+  "iso8859-1",
+  "iso8859-1",
+  "iso8859-1"
+};
+
+// The 3-letter names of the language (this MUST be the third phrase!):
+const char* const I18n::languageCodes[] =
+{
+  "eng,dos",
+  "deu,ger",
+  "sve,swe",
+  "hun",
+  "fin",
+  "fre",
+  "tst,xxx"
+};
+
+// The phrases to be translated:
+const I18n::tI18nPhrase I18n::Phrases[] =
+{
+  // Menu titles:
+  { "VDR",
+    "VDR",
+    "VDR",
+    "VDR",
+    "VDR",
+    "VDR",
+    "VDR",
+  },
+  // Welcome screen
+  { "Welcome",
+    "Willkommen",
+    "Välkommen",
+    "Tervetuloa",
+    "Üdvözöljük",
+    "Bonjour",
+    "1",
+  },
+  { "1. Live TV",
+    "1. Fernsehen",
+    "1. TV",
+    "1. TV",
+    "1. TV",
+    "1. TV en direct",
+    "2",
+  },
+  { "2. Radio",
+    "2. Radio",
+    "2. Radio",
+    "2. Rádió",
+    "2. Radio",
+    "2. Radio",
+    "3",
+  },
+  { "3. Recordings",
+    "3. Aufnahmen",
+    "3. Inspelningar",
+    "3. Felvett müsorok",
+    "3. Tallenteet",
+    "3. Enregistrements",
+    "4",
+  },
+  { "4. Timers",
+    "",
+    "",
+    "4. Felvétel",
+    "",
+    "",
+    "5",
+  },
+  { "5. Options",
+    "5. Einstellungen",
+    "5. Inställningar",
+    "5. Beállítások",
+    "5. Asetukset",
+    "5. Options",
+    "6",
+  },
+  { "6. Reboot",
+    "6. Neustart",
+    "6. Starta om",
+    "6. Újraindítás",
+    "6. Uudelleenkäynnistys",
+    "6. Redemarrer",
+    "7",
+  },
+  { "Downloading recordings list",
+    "Lade die Aufnahmen-Liste",
+    "Laddar lista över inspelningar",
+    "Felvétellista letöltése",
+    "Ladataan tallennelistaa",
+    "Recuperer liste enregistrements",
+    "8",
+  },
+  // Recordings list
+  { "Recordings - %s",
+    "Aufnahmen - %s",
+    "Inspelningar - %s",
+    "Felvételek - %s",
+    "Tallenteet - %s",
+    "Enregistrements - %s",
+    "9 - %s",
+  },
+  { "Recordings",
+    "Aufnahmen",
+    "Inspelningar",
+    "Felvételek",
+    "Tallenteet",
+    "Enregistrements",
+    "10",
+  },
+  { "<dir> %lu\t%s",
+    "<dir> %lu\t%s",
+    "<dir> %lu\t%s",
+    "<dir> %lu\t%s",
+    "<dir> %lu\t%s",
+    "<dir> %lu\t%s",
+    "11 %lu\t%s",
+  },
+  { "[ok] = menu",
+    "[ok] = Menü",
+    "[ok] = meny",
+    "[ok] = menü",
+    "[ok] = menu",
+    "[ok] = valikko",
+    "12",
+  },
+  { "%lu%% used, %iGB free",
+    "%lu%% belegt, %iGB frei",
+    "%lu%% använt, %iGB ledigt",
+    "%lu%% felhasznált, %iGB szabad",
+    "%lu%% käytetty, %iGt vapaana",
+    "%lu%% utilise, %iGB libre",
+    "13 %lu%% %i",
+  },
+  { "%i to %i of %i", // Also used in channels list
+    "%i bis %i (von %i)",
+    "%i av %i till %i",
+    "%i - %i (összesen %i)",
+    "%i - %i (yhteensä %i)",
+    "%i de %i a %i",
+    "14 %i %i %i",
+  },
+  // Question
+  { "Yes",
+    "Ja",
+    "Ja",
+    "Igen",
+    "Kyllä",
+    "Oui",
+    "15",
+  },
+  { "No",
+    "Nein",
+    "Nej",
+    "Nem",
+    "Ei",
+    "Non",
+    "16",
+  },
+  // Recording Menu
+  { "Programme menu",
+    "Programm-Menü",
+    "Programmeny",
+    "Müsor menü",
+    "Ohjelmavalikko",
+    "Menu Programation",
+    "17",
+  },
+  { "Play",
+    "Wiedergeben",
+    "Spela upp",
+    "Lejátszás",
+    "Näytä",
+    "Jouer",
+    "18",
+  },
+  { "Resume",
+    "Fortsetzen",
+    "Återuppta",
+    "Folytatás",
+    "Jatka",
+    "Reprendre",
+    "19",
+  },
+  { "Summary",
+    "Inhalt",
+    "Sammanfattning",
+    "Tartalom",
+    "Yhteenveto",
+    "Resume",
+    "20",
+  },
+  { "Delete",
+    "Löschen",
+    "Ta bort",
+    "Törlés",
+    "Poista",
+    "Supprimer",
+    "21",
+  },
+  { "Programme summary",
+    "Programminhalt",
+    "Programsammanfattning",
+    "Müsor tartalom",
+    "Ohjelmayhteenveto",
+    "Sommaire programmes",
+    "22",
+  },
+  { "Summary unavailable",
+    "Inhalt nicht verfügbar",
+    "Ingen sammanfattning tillgänglig",
+    "Tartalom nem elérhetö",
+    "Yhteenvetoa ei saatavissa",
+    "Sommaire indisponible",
+    "23",
+  },
+  { "Delete recording",
+    "Aufnahme löschen",
+    "Ta bort inspelning",
+    "Felvétel törlése",
+    "Poista tallenne",
+    "Effacer enregistrement",
+    "24",
+  },
+  { "Are you sure you want to delete this recording?",
+    "Sind Sie sich sicher, dass Sie diese Aufnahme löschen möchten?",
+    "Är du säker att du vill ta bort den här inspelningen",
+    "Biztosan törölni szeretné ezt a felvételt?",
+    "Oletko varma, että haluat poistaa tämän tallenteen?",
+    "Etes-vous sur de vouloir supprimer cet enregistrement?",
+    "25",
+  },
+  // Server select
+  { "Choose a VDR server",
+    "Wählen Sie einen VDR-Server",
+    "Välj VDR server",
+    "Válasszon egy VDR szervert",
+    "Valitse VDR-palvelin",
+    "Choisir une serveur VDR",
+    "26",
+  },
+
+  // Option menus
+  { "Options",
+    "Einstellungen",
+    "Inställningar",
+    "Beállitások",
+    "Asetukset",
+    "Options",
+    "27",
+  },
+  { "TV connection type",
+    "TV-Anschlußart",
+    "Typ av TV-anslutning",
+    "TV csatlakozás tipusa",
+    "TV-liityntä",
+    "Type de connection TV",
+    "28",
+  },
+  { "Remote control type",
+    "Fernbedienungstyp",
+    "Fjärrkontroll",
+    "Távirányitó tipusa",
+    "Kauko-ohjaimen tyyppi",
+    "Type telecommande",
+    "29",
+  },
+  { "TV aspect ratio",
+    "Seitenverhältnis",
+    "TV-format",
+    "TV képformátum",
+    "Kuvasuhde",
+    "Rapport TV",
+    "30",
+  },
+  { "16:9 on 4:3 display mode",
+    "16:9 auf 4:3-Modus",
+    "16:9 på 4:3-skärm",
+    "16:9 a 4:3-as képernyön",
+    "16:9 kuvasuhde 4:3 TV:ssä",
+    "16:9 sur affichage 4:3",
+    "30a",
+  },
+  { "Power state after bootup",
+    "Einschalten nach Neustart",
+    "Läge efter strömborfall",
+    "Bekapcsolás utáni állapot",
+    "Tila käynnistyksen jälkeen",
+    "Marche apres demarrage",
+    "31",
+  },
+  { "Display channels",
+    "Kanäle anzeigen",
+    "Visa kanaler",
+    "Csatornák megjelenítése",
+    "Näytä kanavat",
+    "Afficher chaines",
+    "32",
+  },
+  { "Language",
+    "Sprache",
+    "Språk",
+    "Nyelv",
+    "Kieli",
+    "Langue",
+    "33",
+  },
+  { "Press back to exit, <, > or [ok] to change",
+    "Zum Verlassen back drücken, <, > oder [ok] zum Wechseln",
+    "Tryck [back] för att avsluta, eller [ok] för att ändra",
+    "[back] gombbal kilép, [<], [>] vagy [ok] gombbal választ",
+    "Paina [back] poistuaksesi, <, > tao [ok] muuttaaksesi",
+    "Appuyer retour pour sortir <, > ou [ok] pour valider",
+    "34",
+  },
+  { "VDR-Pri 0=OK !See forums!",
+    "VDR-Pri 0=OK !Siehe Forum!",
+    "VDR-Prio 0=OK !Se forum!",
+    "VDR-Pri 0=OK !lásd. fórum!",
+    "VDR-Pri 0=OK !Lue forumit!",
+    "VDR-Pri 0=OK !Voir forums!",
+    "34a",
+  },
+  // Option choices
+  { "Old",
+    "Alt",
+    "Gammal modell",
+    "Régi",
+    "Vanha",
+    "Vieux",
+    "35",
+  },
+  { "New",
+    "Neu",
+    "Ny modell",
+    "Új",
+    "Uusi",
+    "Nouveau",
+    "36",
+  },
+  { "RGB+composite",
+    "RGB+composite",
+    "RGB+komposit",
+    "RGB+composite",
+    "RGB+komposiitti",
+    "RGB+composite",
+    "37",
+  },
+  { "S-Video",
+    "S-Video",
+    "S-Video",
+    "S-Video",
+    "S-Video",
+    "S-Video",
+    "38",
+  },
+  { "Chop sides",
+    "Seiten abschneiden",
+    "Ta bort på sidorna",
+    "Szélek levágva",
+    "Leikkaa sivut",
+    "Couper bords",
+    "39",
+  },
+  { "Letterbox",
+    "Letterbox",
+    "Letterbox",
+    "Letterbox",
+    "Letterbox",
+    "Letterbox",
+    "40",
+  },
+  { "Last state",
+    "Letzter Zustand",
+    "Återgå til senaste läge",
+    "Utolsó állapot",
+    "Edellinen tila",
+    "Etat precedent",
+    "41",
+  },
+  { "All",
+    "Alle",
+    "Alla",
+    "Összes",
+    "Kaikki",
+    "Tout",
+    "42",
+  },
+  { "FTA only",
+    "nur FTA",
+    "Endast FTA",
+    "Csak FTA",
+    "Vain FTA",
+    "FTA seulement",
+    "43",
+  },
+  { "On",
+    "An",
+    "På",
+    "Be",
+    "Päällä",
+    "On",
+    "44",
+  },
+  { "Off",
+    "Aus",
+    "Av",
+    "Ki",
+    "Poissa",
+    "Off",
+    "45",
+  },
+
+  // Channel Lists
+  { "Channels",
+    "Fernsehkanäle",
+    "Kanaler",
+    "Csatornák",
+    "Kanavat",
+    "Chaines",
+    "46",
+  },
+  { "Radio Stations",
+    "Radiokanäle",
+    "Radiostationer",
+    "Rádiócsatornák",
+    "Radiokanavat",
+    "Stations Radio",
+    "47",
+  },
+  // Banners
+  { "No channel data available",
+    "Keine Daten für diesen Kanal verfügbar",
+    "Ingen programinformation tillgänglig",
+    "Csatorna-adatok nem állnak rendelkezésre",
+    "Kanavatietoa ei saatavilla",
+    "Pas de chaines disponibles",
+    "48",
+  },
+  { "info",
+    "Info",
+    "Info",
+    "Infó",
+    "Info",
+    "Info",
+    "49",
+  },
+  { "Channel unavailable",
+    "Kanal nicht verfügbar",
+    "Kanalen är inte tillgänglig",
+    "A csatorna nem elérhetö",
+    "Kanava ei saatavilla",
+    "Chaine indisponible",
+    "51",
+  },
+  // Connect screen
+  { "Locating server",
+    "Lokalisiere Server",
+    "Letar efter server",
+    "Szerver keresése",
+    "Etsitään palvelinta",
+    "Recherche serveur",
+    "52",
+  },
+  { "Connecting to VDR",
+    "Verbinde zum VDR",
+    "Ansluter till VDR",
+    "Csatlakozás a VDR-hez",
+    "Yhdistetään VDR:ään",
+    "Connection au VDR",
+    "53",
+  },
+  { "Login failed",
+    "Login fehlgeschlagen",
+    "Inloggning misslycklades",
+    "Bejelentkezés sikertelen",
+    "Sisäänkirjautuminen epäonnistui",
+    "Echec de login",
+    "54",
+  },
+  { "Connection failed",
+    "Verbindung fehlgeschlagen",
+    "Anslutning misslyckades",
+    "Kapcsolódás sikertelen",
+    "Yhteys epäonnistui",
+    "Echec de connection",
+    "55",
+  },
+  // Command
+  { "Connected, loading config",
+    "Verbunden, lade Einstellungen",
+    "Ansluten, laddar konfigurering",
+    "Kapcsolódva, beállitások betöltése",
+    "Yhdistetty, ladataan konfiguraatiota",
+    "Connecte, chargement configuration",
+    "56",
+  },
+  // EPG
+  { "EPG",
+    "EPG",
+    "EPG",
+    "EPG",
+    "EPG",
+    "EPG",
+    "57",
+  },
+  { "OK",
+    "OK",
+    "OK",
+    "OK",
+    "OK",
+    "OK",
+    "57.5",
+  },
+  { "Page up",
+    "Seite hoch",
+    "Föregående sida",
+    "Fel",
+    "Seuraava sivu",
+    "Haut de page",
+    "58",
+  },
+  { "Page down",
+    "Seite runter",
+    "Nästa sida",
+    "Le",
+    "Edellinen sivu",
+    "Bas de page",
+    "59",
+  },
+  { "-24 hours",
+    "-24 Std.",
+    "-24 timmar",
+    "-24 óra",
+    "-24 tuntia",
+    "-24 heures",
+    "60",
+  },
+  { "+24 hours",
+    "+24 Std.",
+    "+24 timmar",
+    "+24 óra",
+    "+24 tuntia",
+    "+24 heures",
+    "61",
+  },
+  { "Go: Preview",
+    "Go: Vorschau",
+    "Go: Visa",
+    "Go: Betekintés",
+    "Go: Esikatselu",
+    "Go: apercu",
+    "61.5",
+  },
+  { "Guide / Back: Close",
+    "Back: EPG schließen",
+    "Guide / Back: Stäng",
+    "Guide/Back: Bezárás",
+    "Guide / Back: Sulje",
+    "Guide / Back: Fermer",
+    "62",
+  },
+  { "Rec: Set timer",
+    "Rec: Aufnahme programmieren",
+    "Rec: Programmera timer",
+    "Rec: Felvétel beállítása",
+    "Rec: Aseta ajastus",
+    "Rec: Definir heure",
+    "63",
+  },
+  { "Sel channel",
+    "Umschalten",
+    "Välj kanal",
+    "Csatornaválasztás",
+    "Valitse kanava",
+    "Selection chaine",
+    "64",
+  },
+  { "There are no programme details available for this period",
+    "Es sind keine Programminformationen für diesen Zeitraum verfügbar",
+    "Det finns ingen programinforamtion för denna period",
+    "Nincs programinformáció ehhez az idöszakhoz",
+    "Tälle ajanjaksolle ei saatavilla ohjelmatietoja",
+    "Aucune information sur le programme pour cette periode",
+    "65",
+  },
+  { "No programme details",
+    "Keine Programminformation",
+    "Ingen programinformation tillgänglig",
+    "Nincs programinformáció",
+    "Ei ohjelmatietoja",
+    "Pas de detail du programme",
+    "66",
+  },
+  // Edit timer
+  { "Edit Timer",
+    "",
+    "",
+    "",
+    "",
+    "",
+    "67",
+  },
+ // End marker.
+  { NULL }
+};
+
+#endif
diff --git a/log.h b/log.h
index ff91243100013e7cf968a6d6de0807a96c698bfe..0b5c197bed65e4ef3b95b0a7cfea1413a668c213 100644 (file)
--- a/log.h
+++ b/log.h
 #define LOG_H
 
 #include <stdio.h>
+#ifndef WIN32
+ #include <sys/time.h>
+#else
+ #include <sys/timeb.h>
+#endif
+
 #include <time.h>
-#include <sys/time.h>
 #include <string.h>
 #include <stdarg.h>
 #include "defines.h"
diff --git a/main.cc b/main.cc
index 7fc06810dfaebb9ee184a44847705385c015cbb5..e33bae86bd1135592e244bce206c9cfae962306b 100644 (file)
--- a/main.cc
+++ b/main.cc
 #include "mtd.h"
 #include "timers.h"
 #include "vdr.h"
-#include "osd.h"
 #include "viewman.h"
 #include "command.h"
 
 #ifndef WIN32
+  #include "osdmvp.h"
   #include "audiomvp.h"
   #include "videomvp.h"
 #else
+  #include "osdwin.h"
   #include "audiowin.h"
   #include "videowin.h"
 #endif
@@ -73,12 +74,13 @@ int main(int argc, char** argv)
   mtd        = new Mtd();
   led        = new Led();
   timers     = new Timers();
-  osd        = new Osd();
   vdr        = new VDR();
 #ifndef WIN32
+  osd        = new OsdMVP();
   audio      = new AudioMVP();
   video      = new VideoMVP();
 #else
+  osd        = new OsdWin();
   audio      = new AudioWin();
   video      = new VideoWin();
 #endif
diff --git a/osd.cc b/osd.cc
index 751b85850edc96751d8cbe05216eb4cd629a3c65..96db8e37ac742e11224ee70763ef2a230a6fee9b 100644 (file)
--- a/osd.cc
+++ b/osd.cc
@@ -34,7 +34,6 @@ Osd::Osd()
 
 Osd::~Osd()
 {
-  if (initted) shutdown();
   instance = NULL;
 }
 
@@ -42,47 +41,3 @@ Osd* Osd::getInstance()
 {
   return instance;
 }
-
-int Osd::getFD()
-{
-  if (!initted) return 0;
-  return fdOsd;
-}
-
-int Osd::init(char* device)
-{
-  if (initted) return 0;
-
-  fdOsd = open(device, O_RDWR);
-  if (!fdOsd)
-  {
-    Log::getInstance()->log("OSD", Log::DEBUG, "Could not open OSD device!");
-    return 0;
-  }
-
-  initted = 1; // must set this here or create surface won't work
-
-  Surface::initConversionTables();
-
-  Video* video = Video::getInstance();
-
-  screen = new Surface(Surface::SCREEN);
-  screen->create(video->getScreenWidth(), video->getScreenHeight());
-  screen->display();
-
-  return 1;
-}
-
-int Osd::shutdown()
-{
-  if (!initted) return 0;
-  initted = 0;
-  delete screen;
-  close(fdOsd);
-  return 1;
-}
-
-void Osd::screenShot(char* fileName)
-{
-  screen->screenShot(fileName);
-}
diff --git a/osd.h b/osd.h
index cc258ed022f95e83fd61e0c48ff07191ab09e1e4..e0d57b225d1aac4d93e44ffdf1cd20c13f2e694e 100644 (file)
--- a/osd.h
+++ b/osd.h
 #define OSD_H
 
 #include <stdio.h>
-#include <fcntl.h>
-#include <unistd.h>
 
-#include "defines.h"
-#include "log.h"
 #include "surface.h"
-#include "video.h"
 
 class Osd
 {
   public:
     Osd();
-    ~Osd();
+    virtual ~Osd();
     static Osd* getInstance();
 
-    int init(char* device);
-    int shutdown();
+    virtual int init(char* device)=0;
+    virtual int shutdown()=0;
 
-    int getFD();
+    virtual int getFD()=0;
 
-    void screenShot(char* fileName);
+    virtual void screenShot(char* fileName)=0;
 
-  private:
+  protected:
     static Osd* instance;
     int initted;
     Surface* screen;
diff --git a/osdmvp.cc b/osdmvp.cc
new file mode 100644 (file)
index 0000000..b4fda69
--- /dev/null
+++ b/osdmvp.cc
@@ -0,0 +1,75 @@
+/*
+    Copyright 2004-2005 Chris Tallon
+
+    This file is part of VOMP.
+
+    VOMP is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    VOMP is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with VOMP; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+#include "osdmvp.h"
+
+OsdMVP::OsdMVP()
+{
+  if (instance) return;
+}
+
+OsdMVP::~OsdMVP()
+{
+  if (initted) shutdown();
+}
+
+int OsdMVP::getFD()
+{
+  if (!initted) return 0;
+  return fdOsd;
+}
+
+int OsdMVP::init(char* device)
+{
+  if (initted) return 0;
+
+  fdOsd = open(device, O_RDWR);
+  if (!fdOsd)
+  {
+    Log::getInstance()->log("OSD", Log::DEBUG, "Could not open OSD device!");
+    return 0;
+  }
+
+  initted = 1; // must set this here or create surface won't work
+
+  Surface::initConversionTables();
+
+  Video* video = Video::getInstance();
+
+  screen = new Surface(Surface::SCREEN);
+  screen->create(video->getScreenWidth(), video->getScreenHeight());
+  screen->display();
+
+  return 1;
+}
+
+int OsdMVP::shutdown()
+{
+  if (!initted) return 0;
+  initted = 0;
+  delete screen;
+  close(fdOsd);
+  return 1;
+}
+
+void OsdMVP::screenShot(char* fileName)
+{
+  screen->screenShot(fileName);
+}
diff --git a/osdmvp.h b/osdmvp.h
new file mode 100644 (file)
index 0000000..dbea737
--- /dev/null
+++ b/osdmvp.h
@@ -0,0 +1,50 @@
+/*
+    Copyright 2004-2005 Chris Tallon
+
+    This file is part of VOMP.
+
+    VOMP is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    VOMP is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with VOMP; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+#ifndef OSDMVP_H
+#define OSDMVP_H
+
+#include <stdio.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+#include "osd.h"
+#include "defines.h"
+#include "log.h"
+#include "surface.h"
+#include "video.h"
+
+class OsdMVP : public Osd
+{
+  public:
+    OsdMVP();
+    ~OsdMVP();
+
+    int init(char* device);
+    int shutdown();
+
+    int getFD();
+
+    void screenShot(char* fileName);
+
+  private:
+};
+
+#endif
diff --git a/osdwin.cc b/osdwin.cc
new file mode 100644 (file)
index 0000000..9e4c9a5
--- /dev/null
+++ b/osdwin.cc
@@ -0,0 +1,57 @@
+/*
+    Copyright 2004-2005 Chris Tallon
+
+    This file is part of VOMP.
+
+    VOMP is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    VOMP is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with VOMP; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+#include "osdwin.h"
+
+OsdWin::OsdWin()
+{
+  if (instance) return;
+}
+
+OsdWin::~OsdWin()
+{
+  if (initted) shutdown();
+}
+
+int OsdWin::getFD()
+{
+  if (!initted) return 0;
+  return fdOsd;
+}
+
+int OsdWin::init(char* device)
+{
+  if (initted) return 0;
+  initted = 1; // must set this here or create surface won't work
+
+  return 1;
+}
+
+int OsdWin::shutdown()
+{
+  if (!initted) return 0;
+  initted = 0;
+  return 1;
+}
+
+void OsdWin::screenShot(char* fileName)
+{
+  screen->screenShot(fileName);
+}
diff --git a/osdwin.h b/osdwin.h
new file mode 100644 (file)
index 0000000..0a084be
--- /dev/null
+++ b/osdwin.h
@@ -0,0 +1,46 @@
+/*
+    Copyright 2004-2005 Chris Tallon
+
+    This file is part of VOMP.
+
+    VOMP is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    VOMP is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with VOMP; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+#ifndef OSDWIN_H
+#define OSDWIN_H
+
+#include <stdio.h>
+
+#include "osd.h"
+#include "defines.h"
+#include "log.h"
+
+class OsdWin : public Osd
+{
+  public:
+    OsdWin();
+    ~OsdWin();
+
+    int init(char* device);
+    int shutdown();
+
+    int getFD();
+
+    void screenShot(char* fileName);
+
+  private:
+};
+
+#endif
index db11b61ad19e5c0734aeba65a1ca934b89258176..4c3740118dd2998337bdb9af29dea05601ebca30 100755 (executable)
@@ -1,30 +1,30 @@
-/*\r
-    Copyright 2005 Chris Tallon\r
-\r
-    This file is part of VOMP.\r
-\r
-    VOMP is free software; you can redistribute it and/or modify\r
-    it under the terms of the GNU General Public License as published by\r
-    the Free Software Foundation; either version 2 of the License, or\r
-    (at your option) any later version.\r
-\r
-    VOMP is distributed in the hope that it will be useful,\r
-    but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
-    GNU General Public License for more details.\r
-\r
-    You should have received a copy of the GNU General Public License\r
-    along with VOMP; if not, write to the Free Software\r
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
-*/\r
-\r
-#ifndef TIMERRECEIVER_H\r
-#define TIMERRECEIVER_H\r
-\r
-class TimerReceiver\r
-{\r
-  public:\r
-    virtual void timercall(int clientReference)=0;\r
-};\r
-\r
-#endif\r
+/*
+    Copyright 2005 Chris Tallon
+
+    This file is part of VOMP.
+
+    VOMP is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    VOMP is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with VOMP; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+#ifndef TIMERRECEIVER_H
+#define TIMERRECEIVER_H
+
+class TimerReceiver
+{
+  public:
+    virtual void timercall(int clientReference)=0;
+};
+
+#endif
index 1044b1f24e98745b7c465c2d522a311f857a245f..562f00c40dec3761bb2a1b55712205e117cfcba5 100755 (executable)
--- a/timers.h
+++ b/timers.h
@@ -1,93 +1,93 @@
-/*\r
-    Copyright 2004-2005 Chris Tallon\r
-\r
-    This file is part of VOMP.\r
-\r
-    VOMP is free software; you can redistribute it and/or modify\r
-    it under the terms of the GNU General Public License as published by\r
-    the Free Software Foundation; either version 2 of the License, or\r
-    (at your option) any later version.\r
-\r
-    VOMP is distributed in the hope that it will be useful,\r
-    but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
-    GNU General Public License for more details.\r
-\r
-    You should have received a copy of the GNU General Public License\r
-    along with VOMP; if not, write to the Free Software\r
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
-*/\r
-\r
-#ifndef TIMERS_H\r
-#define TIMERS_H\r
-\r
-#include <stdio.h>\r
-#include <pthread.h>\r
-#include <list>\r
-\r
-#include "defines.h"\r
-#include "log.h"\r
-#include "thread.h"\r
-#include "command.h"\r
-#include "timerreceiver.h"\r
-\r
-/*\r
-\r
-Timers documentation\r
-\r
-Call setTimer to set a timer.... cancelTimer to delete a running timer.\r
-Derive your object from TimerReceiver (timerreceiver.h), implement timercall() in your class\r
-and supply your 'this' pointer to setTimer.\r
-\r
-Once a timer has fired it does not exist anymore, you have to keep creating them if you want\r
-a constant pulse.\r
-\r
-clientReference is any int of your choice. It will be supplied back to you in the timercall()\r
-so you can identify which timer has fired if you have more than one.\r
-\r
-You can reset a timer by calling setTimer again. This will not create 2 timers, it will overwrite the first one.\r
-\r
-You must not allow a timer to fire on an object that has been deleted already, unless you want\r
-segfaulty hell.\r
-\r
-*/\r
-\r
-class Timer\r
-{\r
-  public:\r
-    TimerReceiver* client;\r
-    int clientReference;\r
-    struct timespec requestedTime;\r
-};\r
-\r
-using namespace std;\r
-//using namespace __gnu_cxx;\r
-typedef list<Timer*> TimerList;\r
-\r
-class Timers : public Thread\r
-{\r
-  public:\r
-    Timers();\r
-    virtual ~Timers();\r
-    static Timers* getInstance();\r
-\r
-    int init();\r
-    int shutdown();\r
-\r
-    int setTimer(TimerReceiver* client, int clientReference, long int requestedTime, long int requestedTimeNSEC=0);\r
-    int setTimer(TimerReceiver* client, int clientReference, timespec duration);\r
-    int cancelTimer(TimerReceiver* client, int clientReference);\r
-\r
-    // Thread stuff\r
-    virtual void threadMethod();\r
-    virtual void threadPostStopCleanup() {};\r
-\r
-  private:\r
-    static Timers* instance;\r
-    Log* logger;\r
-    bool initted;\r
-    TimerList timerList;\r
-    bool resetThreadFlag;\r
-};\r
-\r
-#endif\r
+/*
+    Copyright 2004-2005 Chris Tallon
+
+    This file is part of VOMP.
+
+    VOMP is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    VOMP is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with VOMP; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+#ifndef TIMERS_H
+#define TIMERS_H
+
+#include <stdio.h>
+#include <pthread.h>
+#include <list>
+
+#include "defines.h"
+#include "log.h"
+#include "thread.h"
+#include "command.h"
+#include "timerreceiver.h"
+
+/*
+
+Timers documentation
+
+Call setTimer to set a timer.... cancelTimer to delete a running timer.
+Derive your object from TimerReceiver (timerreceiver.h), implement timercall() in your class
+and supply your 'this' pointer to setTimer.
+
+Once a timer has fired it does not exist anymore, you have to keep creating them if you want
+a constant pulse.
+
+clientReference is any int of your choice. It will be supplied back to you in the timercall()
+so you can identify which timer has fired if you have more than one.
+
+You can reset a timer by calling setTimer again. This will not create 2 timers, it will overwrite the first one.
+
+You must not allow a timer to fire on an object that has been deleted already, unless you want
+segfaulty hell.
+
+*/
+
+class Timer
+{
+  public:
+    TimerReceiver* client;
+    int clientReference;
+    struct timespec requestedTime;
+};
+
+using namespace std;
+//using namespace __gnu_cxx;
+typedef list<Timer*> TimerList;
+
+class Timers : public Thread
+{
+  public:
+    Timers();
+    virtual ~Timers();
+    static Timers* getInstance();
+
+    int init();
+    int shutdown();
+
+    int setTimer(TimerReceiver* client, int clientReference, long int requestedTime, long int requestedTimeNSEC=0);
+    int setTimer(TimerReceiver* client, int clientReference, timespec duration);
+    int cancelTimer(TimerReceiver* client, int clientReference);
+
+    // Thread stuff
+    virtual void threadMethod();
+    virtual void threadPostStopCleanup() {};
+
+  private:
+    static Timers* instance;
+    Log* logger;
+    bool initted;
+    TimerList timerList;
+    bool resetThreadFlag;
+};
+
+#endif
diff --git a/vepg.h b/vepg.h
index a00da97d42dfdc746ef214080c0efe9b68814a94..27f8e9f99377f51d6bfd9155221ac0c410c7a390 100644 (file)
--- a/vepg.h
+++ b/vepg.h
@@ -1,89 +1,89 @@
-/*\r
-    Copyright 2005 Brian Walton\r
-\r
-    This file is part of VOMP.\r
-\r
-    VOMP is free software; you can redistribute it and/or modify\r
-    it under the terms of the GNU General Public License as published by\r
-    the Free Software Foundation; either version 2 of the License, or\r
-    (at your option) any later version.\r
-\r
-    VOMP is distributed in the hope that it will be useful,\r
-    but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
-    GNU General Public License for more details.\r
-\r
-    You should have received a copy of the GNU General Public License\r
-    along with VOMP; if not, write to the Free Software\r
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
-*/\r
-\r
-#ifndef VEPG_H\r
-#define VEPG_H\r
-#define WINDOW_WIDTH (150)\r
-#define MINUTE_SCALE (3)\r
-#include <stdio.h>\r
-#include <string.h>\r
-\r
-#include "view.h"\r
-#include "remote.h"\r
-#include "wselectlist.h"\r
-#include "viewman.h"\r
-#include "vdr.h"\r
-#include "vchannellist.h"\r
-#include "command.h"\r
-#include "message.h"\r
-#include "colour.h"\r
-#include "video.h"\r
-#include "wtextbox.h"\r
-#include "event.h"\r
-#include "message.h"\r
-#include "vvideolive.h"\r
-#include "vepgsettimer.h"\r
-\r
-class VVideoLive;\r
-\r
-class VEpg : public View\r
-{\r
-  public:\r
-    VEpg(VVideoLive* v, UINT currentChannel = 0);\r
-    ~VEpg();\r
-    static VEpg* getInstance();\r
-\r
-    int handleCommand(int command); // deal with commands (from remote control)\r
-    void draw(); // draw epg view\r
-    void setCurrentChannel(char* chname);\r
-\r
-  private:\r
-    static VEpg* instance;\r
-\r
-    void setInfo(Event* event); // display details of selected programme\r
-    void drawgrid(); // redraws grid and select programme\r
-    void drawData();\r
-\r
-    WSelectList chanListbox; // listbox to display available channels\r
-    WTextbox progTitle; // area to display time and title of selected programme\r
-    WTextbox progInfo; // area to display details of selected programme\r
-    EventList* eventList; // list of events (programmes) for a channel\r
-    Event thisEvent; // the selected event\r
-    time_t selTime; // current selection time\r
-    UINT e; // temp used to point to an event\r
-    ChannelList* chanList; // list of available channels\r
-    tm* epgtime; // selected time within epg\r
-    tm* Ltime; // time of LHS of epg view\r
-    time_t ltime; // time of LHS of epg view\r
-    time_t lastEnd; // end time of last painted cell - used to look for gaps in epg\r
-    WTextbox chanName;\r
-    EventList* eventLista[7];\r
-    int listTop;\r
-    int listWindowSize;\r
-    void updateChanList();\r
-    void updateEventList();\r
-    void paintCell(Event* event, int yOffset, Colour bg, Colour fg);\r
-    time_t prevHour(time_t* t);\r
-    VVideoLive* videoLive;\r
-    ViewMan* viewman;\r
-    UINT gridRows;\r
-};\r
-\r
-#endif\r
+/*
+    Copyright 2005 Brian Walton
+
+    This file is part of VOMP.
+
+    VOMP is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    VOMP is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with VOMP; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+#ifndef VEPG_H
+#define VEPG_H
+#define WINDOW_WIDTH (150)
+#define MINUTE_SCALE (3)
+#include <stdio.h>
+#include <string.h>
+
+#include "view.h"
+#include "remote.h"
+#include "wselectlist.h"
+#include "viewman.h"
+#include "vdr.h"
+#include "vchannellist.h"
+#include "command.h"
+#include "message.h"
+#include "colour.h"
+#include "video.h"
+#include "wtextbox.h"
+#include "event.h"
+#include "message.h"
+#include "vvideolive.h"
+#include "vepgsettimer.h"
+
+class VVideoLive;
+
+class VEpg : public View
+{
+  public:
+    VEpg(VVideoLive* v, UINT currentChannel = 0);
+    ~VEpg();
+    static VEpg* getInstance();
+
+    int handleCommand(int command); // deal with commands (from remote control)
+    void draw(); // draw epg view
+    void setCurrentChannel(char* chname);
+
+  private:
+    static VEpg* instance;
+
+    void setInfo(Event* event); // display details of selected programme
+    void drawgrid(); // redraws grid and select programme
+    void drawData();
+
+    WSelectList chanListbox; // listbox to display available channels
+    WTextbox progTitle; // area to display time and title of selected programme
+    WTextbox progInfo; // area to display details of selected programme
+    EventList* eventList; // list of events (programmes) for a channel
+    Event thisEvent; // the selected event
+    time_t selTime; // current selection time
+    UINT e; // temp used to point to an event
+    ChannelList* chanList; // list of available channels
+    tm* epgtime; // selected time within epg
+    tm* Ltime; // time of LHS of epg view
+    time_t ltime; // time of LHS of epg view
+    time_t lastEnd; // end time of last painted cell - used to look for gaps in epg
+    WTextbox chanName;
+    EventList* eventLista[7];
+    int listTop;
+    int listWindowSize;
+    void updateChanList();
+    void updateEventList();
+    void paintCell(Event* event, int yOffset, Colour bg, Colour fg);
+    time_t prevHour(time_t* t);
+    VVideoLive* videoLive;
+    ViewMan* viewman;
+    UINT gridRows;
+};
+
+#endif
index 53bd72190b799f6104222c265c3f61bdc4fb15cb..87bdaae50319f1c6cf5e8007dbb0dbd8c9b5bc1e 100644 (file)
@@ -1,51 +1,51 @@
-/*\r
-    Copyright 2005 Brian Walton\r
-\r
-    This file is part of VOMP.\r
-\r
-    VOMP is free software; you can redistribute it and/or modify\r
-    it under the terms of the GNU General Public License as published by\r
-    the Free Software Foundation; either version 2 of the License, or\r
-    (at your option) any later version.\r
-\r
-    VOMP is distributed in the hope that it will be useful,\r
-    but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
-    GNU General Public License for more details.\r
-\r
-    You should have received a copy of the GNU General Public License\r
-    along with VOMP; if not, write to the Free Software\r
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
-*/\r
-\r
-#ifndef WTEXTBOX_H\r
-#define WTEXTBOX_H\r
-\r
-#include <stdio.h>\r
-#include <string.h>\r
-\r
-#include "defines.h"\r
-#include "widget.h"\r
-#include "colour.h"\r
-\r
-class WTextbox : public Widget\r
-{\r
-  public:\r
-    WTextbox();\r
-    ~WTextbox();\r
-    void setText(char* text);\r
-    void draw();\r
-    void setBackgroundColour(Colour bcolour);\r
-    void setForegroundColour(Colour fcolour);\r
-    void setTextPos(int x, int y); // optional\r
-\r
-  private:\r
-\r
-    char* text;\r
-    Colour foreColour;\r
-    Colour backColour;\r
-    int textX;\r
-    int textY;\r
-};\r
-\r
-#endif\r
+/*
+    Copyright 2005 Brian Walton
+
+    This file is part of VOMP.
+
+    VOMP is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    VOMP is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with VOMP; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+#ifndef WTEXTBOX_H
+#define WTEXTBOX_H
+
+#include <stdio.h>
+#include <string.h>
+
+#include "defines.h"
+#include "widget.h"
+#include "colour.h"
+
+class WTextbox : public Widget
+{
+  public:
+    WTextbox();
+    ~WTextbox();
+    void setText(char* text);
+    void draw();
+    void setBackgroundColour(Colour bcolour);
+    void setForegroundColour(Colour fcolour);
+    void setTextPos(int x, int y); // optional
+
+  private:
+
+    char* text;
+    Colour foreColour;
+    Colour backColour;
+    int textX;
+    int textY;
+};
+
+#endif