delay a few things on startup, such as setting the visibility mode, which ensures...
[personal-kdebase.git] / apps / nsplugins / viewer / resolve.h
blobfc7211e4fc38f5574714f6791d38af26667cdcde
1 /*
2 Copyright (c) 2000 Matthias Hoelzer-Kluepfel <hoelzer@kde.org>
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 */
20 #ifndef VIEWER_RESOLVE_H
21 #define VIEWER_RESOLVE_H
23 #define RESOLVE_RETVAL(fname,error) \
24 kDebug() << "NSPluginInstance::"; \
26 if (!_handle) \
27 return error; \
29 if (!func_ ## fname) \
30 func_ ## fname = _handle->symbol("NPP_"#fname); \
32 if (!func_ ## fname) \
33 { \
34 kDebug() << "Failed: NPP_"; \
35 return error; \
36 } \
37 kDebug() << "Resolved NPP_";
40 #define RESOLVE(fname) RESOLVE_RETVAL(fname, NPERR_GENERIC_ERROR)
41 #define RESOLVE_VOID(fname) RESOLVE_RETVAL(fname, ;)
44 #define CHECK(fname,error) \
45 kDebug() << "results in " << error; \
46 return error;
48 #endif /* VIEWER_RESOLVE_H */