libyui
Loading...
Searching...
No Matches
YUILoader.h
1/*
2 Copyright (C) 2000-2017 Novell, Inc
3 This library is free software; you can redistribute it and/or modify
4 it under the terms of the GNU Lesser General Public License as
5 published by the Free Software Foundation; either version 2.1 of the
6 License, or (at your option) version 3.0 of the License. This library
7 is distributed in the hope that it will be useful, but WITHOUT ANY
8 WARRANTY; without even the implied warranty of MERCHANTABILITY or
9 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
10 License for more details. You should have received a copy of the GNU
11 Lesser General Public License along with this library; if not, write
12 to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
13 Floor, Boston, MA 02110-1301 USA
14*/
15
16
17/*-/
18
19 File: YUILoader.h
20
21 Author: Stefan Hundhammer <shundhammer@suse.de>
22
23/-*/
24
25
26#ifndef YUILoader_h
27#define YUILoader_h
28
29
30#include <string>
31
32#include "YUI.h"
33#include "YExternalWidgets.h"
34
35
36
37#define YUIPlugin_Qt "qt"
38#define YUIPlugin_NCurses "ncurses"
39#define YUIPlugin_Gtk "gtk"
40
41#define YUIPlugin_RestAPI "rest-api"
42#define YUIPlugin_Ncurses_RestAPI "ncurses-rest-api"
43#define YUIPlugin_Qt_RestAPI "qt-rest-api"
44
49class YUILoader
50{
51public:
93 static void loadUI( bool withThreads = false );
94
103 static void deleteUI();
104
109 static void loadRestAPIPlugin( const std::string & wantedGUI, bool withThreads = false );
110
116 static void loadPlugin( const std::string & name, bool withThreads = false );
117
121 static bool pluginExists( const std::string & pluginBaseName );
122
138 static void loadExternalWidgets( const std::string & name,
139 const std::string & symbol = "_Z21createExternalWidgetsPKc" );
140
141private:
142 YUILoader() {}
143 ~YUILoader() {}
144
156 static void loadExternalWidgetsPlugin( const std::string & name,
157 const std::string & plugin_name,
158 const std::string & symbol );
159};
160
161
170typedef YUI * (*createUIFunction_t)( bool );
171
180typedef YExternalWidgets * (*createEWFunction_t)( const char * );
181
189typedef void (*getServerFunction_t)();
190
191
192#endif // YUILoader_h
Definition YExternalWidgets.h:30
static void loadRestAPIPlugin(const std::string &wantedGUI, bool withThreads=false)
Definition YUILoader.cc:187
static bool pluginExists(const std::string &pluginBaseName)
Definition YUILoader.cc:335
static void deleteUI()
Definition YUILoader.cc:238
static void loadExternalWidgets(const std::string &name, const std::string &symbol="_Z21createExternalWidgetsPKc")
Definition YUILoader.cc:306
static void loadPlugin(const std::string &name, bool withThreads=false)
Definition YUILoader.cc:250
static void loadUI(bool withThreads=false)
Definition YUILoader.cc:51
Definition YUI.h:50