X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=interfaces%2Finclude%2Fwindowmanager.hpp;h=dd268dd95250c159f145825f7a8c44beba220d23;hb=09f2f0036f122e49aa49e6c446d723850192a725;hp=b587b7038c1588d415b1831833bd2714feae6ed3;hpb=cf8cd699e91df40c3f9070019f7c561432b4b4dd;p=staging%2FHomeScreen.git diff --git a/interfaces/include/windowmanager.hpp b/interfaces/include/windowmanager.hpp index b587b70..dd268dd 100644 --- a/interfaces/include/windowmanager.hpp +++ b/interfaces/include/windowmanager.hpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 Mentor Graphics Development (Deutschland) GmbH + * Copyright (C) 2016, 2017 Mentor Graphics Development (Deutschland) GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,6 +19,13 @@ #include +#define WINDOWMANAGER_NO_ERROR 0 +#define WINDOWMANAGER_ERROR_ID_ALREADY_DEFINED 1 +#define WINDOWMANAGER_ERROR_NAME_ALREADY_DEFINED 2 +#define WINDOWMANAGER_ERROR_ID_NOT_FOUND 3 +#define WINDOWMANAGER_ERROR_NAME_NOT_FOUND 4 +#define WINDOWMANAGER_ERROR_ID_IN_USE 5 + class SimplePoint { public: @@ -33,27 +40,43 @@ public: }; -class SimpleRect +class LayoutArea { public: - SimpleRect(); - virtual ~SimpleRect(); + LayoutArea(); + virtual ~LayoutArea(); int x; int y; int width; int height; - friend QDBusArgument &operator <<(QDBusArgument &argument, const SimpleRect &mSimpleRect); - friend const QDBusArgument &operator >>(const QDBusArgument &argument, SimpleRect &mSimpleRect); + friend QDBusArgument &operator <<(QDBusArgument &argument, const LayoutArea &mLayoutArea); + friend const QDBusArgument &operator >>(const QDBusArgument &argument, LayoutArea &mLayoutArea); }; +class Layout +{ +public: + Layout(); + Layout(int layoutId, const QString &layoutName, const QList &surfaceAreas); + virtual ~Layout(); + + int id; + QString name; + QList layoutAreas; + + friend QDBusArgument &operator <<(QDBusArgument &argument, const Layout &mLayout); + friend const QDBusArgument &operator >>(const QDBusArgument &argument, Layout &mLayout); +}; Q_DECLARE_METATYPE(SimplePoint) Q_DECLARE_METATYPE(QList) -Q_DECLARE_METATYPE(SimpleRect) -Q_DECLARE_METATYPE(QList) +Q_DECLARE_METATYPE(LayoutArea) +Q_DECLARE_METATYPE(QList) +Q_DECLARE_METATYPE(Layout) +Q_DECLARE_METATYPE(QList) #endif // WINDOWMANAGER_H