summaryrefslogtreecommitdiff
path: root/library/styleinterface.h
Unidiff
Diffstat (limited to 'library/styleinterface.h') (more/less context) (ignore whitespace changes)
-rw-r--r--library/styleinterface.h68
1 files changed, 68 insertions, 0 deletions
diff --git a/library/styleinterface.h b/library/styleinterface.h
new file mode 100644
index 0000000..9fea636
--- a/dev/null
+++ b/library/styleinterface.h
@@ -0,0 +1,68 @@
1/**********************************************************************
2** Copyright (C) 2002 Robert Griebl. All rights reserved.
3**
4** This file is part of OPIE (http://www.opie.info).
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14**********************************************************************/
15
16#ifndef STYLEINTERFACE_H
17#define STYLEINTERFACE_H
18
19#include <qpe/qcom.h>
20
21#ifndef QT_NO_COMPONENT
22
23// {6C33B4F9-D529-453A-8FB3-DA42B21872BD}
24# ifndef IID_Style
25# define IID_Style QUuid( 0x6c33b4f9, 0xd529, 0x453a, 0x8f, 0xb3, 0xda, 0x42, 0xb2, 0x18, 0x72, 0xbd)
26#endif
27
28// {9757A252-3FD4-438F-A756-80BE4A9FB8DC}
29# ifndef IID_StyleSettings
30# define IID_StyleSettings QUuid( 0x9757a252, 0x3fd4, 0x438f, 0xa7, 0x56, 0x80, 0xbe, 0x4a, 0x9f, 0xb8, 0xdc)
31# endif
32
33#endif
34
35class QWidget;
36class QStyle;
37
38struct StyleInterface : public QUnknownInterface
39{
40 //! Return a new style.
41 virtual QStyle *create ( ) = 0;
42
43 //! Return a (longer) description for the style.
44 virtual QString description ( ) = 0;
45
46 //! Return a short name for the style.
47 virtual QString name ( ) = 0;
48
49 //! Return the library basename (libliquid.so => liquid)
50 virtual QCString key ( ) = 0;
51
52 //! QT_VERSION like 1.2.3 == 123
53 virtual unsigned int version ( ) = 0;
54};
55
56struct StyleSettingsInterface : public QUnknownInterface
57{
58 //! Return a new settings page.
59 virtual QWidget *create ( QWidget *parent, const char *name = 0 ) = 0;
60
61 //! Callback for appearance app when OK is clicked (return true when style has to re-applied).
62 virtual bool accept ( ) = 0;
63
64 //! Callback for appeaeance app when Cancel is clicked.
65 virtual void reject ( ) = 0;
66};
67
68#endif