summaryrefslogtreecommitdiff
path: root/noncore/games/kpacman/portable.h
Unidiff
Diffstat (limited to 'noncore/games/kpacman/portable.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/kpacman/portable.h63
1 files changed, 63 insertions, 0 deletions
diff --git a/noncore/games/kpacman/portable.h b/noncore/games/kpacman/portable.h
new file mode 100644
index 0000000..ff0912b
--- a/dev/null
+++ b/noncore/games/kpacman/portable.h
@@ -0,0 +1,63 @@
1/***************************************************************************
2 portable.h - various bits that ease porting kpacman to other platforms.
3 Currently KDE2 and Qtopia ports exist.
4 -------------------
5 begin : Mon Mar 18 12:35:24 EET 2002
6 copyright : (C) 2002 by Catalin Climov
7 email : catalin@climov.com
8 ***************************************************************************/
9
10/***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************/
18
19#ifndef PORTABLE_H
20#define PORTABLE_H
21
22#ifdef QWS
23#define QPE_PORT
24#else
25#define KDE2_PORT
26#define KDE_PORT
27#endif
28
29#if defined( KDE2_PORT )
30
31#define APP kapp
32
33#define APP_CONFIG_BEGIN( cfgname ) KConfig cfgname = kapp->config()
34#define APP_CONFIG_END( cfgname ) cfgname->sync()
35#define SAVE_CONFIG_GROUP( cfgname, groupname ) QString groupname = configname->group()
36#define RESTORE_CONFIG_GROUP( cfgname, groupname ) configname->setGroup( groupname )
37
38#define FIND_APP_DATA( dataname ) KGlobal::dirs()->findResource( "appdata", dataname )
39
40#elif defined( QPE_PORT )
41
42#define i18n( x ) x
43#define KTMainWindow QMainWindow
44#define KMenuBar QMenuBar
45#define KAccel QAccel
46#define APP qApp
47
48#define APP_CONFIG_BEGIN( cfgname ) Config* cfgname = new Config("kpacman"); cfgname->setGroup("Default");
49#define APP_CONFIG_END( cfgname ) delete cfgname
50#define SAVE_CONFIG_GROUP( cfgname, groupname )
51#define RESTORE_CONFIG_GROUP( cfgname, groupname ) cfgname->setGroup("Default")
52
53#define FIND_APP_DATA( dataname ) (QPEApplication::qpeDir()+"share/kpacman/"+dataname)
54
55#else
56
57#error "Err, I don't know what platform to compile for (KDE2 or Qtopia)"
58
59#endif
60
61#define APP_QUIT() APP->quit()
62
63#endif // PORTABLE_H