Advertisement
Guest User

Untitled

a guest
Nov 24th, 2013
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.88 KB | None | 0 0
  1. /**
  2.  *
  3.  * Copyright (C) 2013 Jolla Ltd.
  4.  * Contact: Thomas Perl <thomas.perl@jollamobile.com>
  5.  * All rights reserved.
  6.  *
  7.  * This file is part of libsailfishapp
  8.  *
  9.  * You may use this file under the terms of the GNU Lesser General
  10.  * Public License version 2.1 as published by the Free Software Foundation
  11.  * and appearing in the file license.lgpl included in the packaging
  12.  * of this file.
  13.  *
  14.  * This library is free software; you can redistribute it and/or
  15.  * modify it under the terms of the GNU Lesser General Public
  16.  * License version 2.1 as published by the Free Software Foundation
  17.  * and appearing in the file license.lgpl included in the packaging
  18.  * of this file.
  19.  *
  20.  * This library is distributed in the hope that it will be useful,
  21.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  22.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  23.  * Lesser General Public License for more details.
  24.  *
  25.  **/
  26.  
  27. #ifndef LIBSAILFISHAPP_SAILFISHAPP_H
  28. #define LIBSAILFISHAPP_SAILFISHAPP_H
  29.  
  30. #include <QtGlobal>
  31. #include <QUrl>
  32.  
  33. class QGuiApplication;
  34. class QQuickView;
  35. class QString;
  36.  
  37. #if defined(LIBSAILFISHAPP_LIBRARY)
  38. #  define SAILFISHAPP_EXPORT Q_DECL_EXPORT
  39. #else
  40. #  define SAILFISHAPP_EXPORT Q_DECL_IMPORT
  41. #endif
  42.  
  43. namespace SailfishApp {
  44.     // Simple interface: Get boosted application and view
  45.     SAILFISHAPP_EXPORT QGuiApplication *application(int &argc, char **argv);
  46.     SAILFISHAPP_EXPORT QQuickView *createView();
  47.  
  48.     // Get fully-qualified path to a file in the data directory
  49.     SAILFISHAPP_EXPORT QUrl pathTo(const QString &filename);
  50.  
  51.     // Very simple interface: Uses "qml/<appname>.qml" as QML entry point
  52.     SAILFISHAPP_EXPORT int main(int &argc, char **argv);
  53. };
  54.  
  55. /* Forward-declare that main() is exportable (needed for booster) */
  56. Q_DECL_EXPORT int main(int argc, char *argv[]);
  57.  
  58. #endif /* LIBSAILFISHAPP_SAILFISHAPP_H */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement