2 * Copyright (C) 2016 Mentor Graphics Development (Deutschland) GmbH
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #include <QCoreApplication>
18 #include <QCommandLineParser>
19 #include "windowmanager.hpp"
21 int main(int argc, char *argv[])
23 QCoreApplication a(argc, argv);
25 QCoreApplication::setOrganizationDomain("LinuxFoundation");
26 QCoreApplication::setOrganizationName("AutomotiveGradeLinux");
27 QCoreApplication::setApplicationName("WindowManager");
28 QCoreApplication::setApplicationVersion("0.7.0");
30 QCommandLineParser parser;
31 parser.setApplicationDescription("AGL WindowManager - see wwww... for more details");
32 parser.addHelpOption();
33 parser.addVersionOption();
34 QCommandLineOption displayOption(QStringList() << "d" << "display-id",
35 QCoreApplication::translate("main", "The display with this <id> to manage. Default=0"),
36 QCoreApplication::translate("main", "id"));
37 parser.addOption(displayOption);
41 if (parser.isSet(displayOption))
43 displayId = parser.value(displayOption).toInt();
45 qDebug() << "Using display" << displayId;
47 qDBusRegisterMetaType<SimplePoint>();
48 qDBusRegisterMetaType<QList<SimplePoint> >();
49 qDBusRegisterMetaType<LayoutArea>();
50 qDBusRegisterMetaType<QList<LayoutArea> >();
51 qDBusRegisterMetaType<Layout>();
52 qDBusRegisterMetaType<QList<Layout> >();
54 WindowManager *windowManager = new WindowManager(displayId);
55 windowManager->start();
58 qDebug("Running on ARM architecture");
61 qDebug("Running on x86 architecture");