summaryrefslogtreecommitdiffstats
path: root/WindowManager/src/windowmanager.hpp
blob: ee779aa89202825aa00ab33383aba1f8914880c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/*
 * Copyright (C) 2016 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.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef WINDOWMANAGER_HPP
#define WINDOWMANAGER_HPP

#include <QObject>


#ifdef __arm__
extern "C" {
#include "ilm/ilm_control.h"
}
#endif


class WindowManager : public QObject
{
    Q_OBJECT
public:
    explicit WindowManager(QObject *parent = 0);
    ~WindowManager();
private:


public:

#ifdef __arm__
    void notificationFunc_non_static(ilmObjectType object,
                                        t_ilm_uint id,
                                        t_ilm_bool created);
    static void notificationFunc_static(ilmObjectType object,
                                        t_ilm_uint id,
                                        t_ilm_bool created,
                                        void* user_data);
#endif
public slots:

};

#endif // WINDOWMANAGER_HPP
tor to initialize (+60sec)." if ! grep -q 'Usable area:' /run/platform/display/compositor.log ; then # e.g. qemu-system-arm takes loooong echo "Waiting for compositor to initialize (+60sec)." sleep 60 fi if ! grep -q 'Usable area:' /run/platform/display/compositor.log ; then # e.g. qemu-system-arm takes loooong echo "Waiting for compositor to initialize (+120sec)." sleep 120 fi if ! grep -q 'Usable area:' /run/platform/display/compositor.log ; then echo "Marker ('Usable area:') not found. Dumping log." echo "##################################" cat /run/platform/display/compositor.log echo "##################################" exit 127 #echo "CONTINUING ANYWAY !" fi AGL_SCREENSHOOTER=/usr/bin/agl-screenshooter if [ -z "$AGL_SCREENSHOOTER" ]; then echo "Failed to find agl-screenshooter. Compositor too old?" exit 127 fi #echo "Found agl-screenshoooter in $AGL_SCREENSHOOTER" rm -rf agl-screenshot-*.png if $AGL_SCREENSHOOTER; then echo "Screenshot taken" else echo "##################################" cat /run/platform/display/compositor.log echo "##################################" exit 127 fi REF_IMAGE_SHA1SUM=`sha1sum ${REF_IMAGE} | awk -F ' ' '{print $1}'` IMAGE_SHA1SUM=`sha1sum agl-screenshot-*.png | awk -F ' ' '{print $1}'` if [ "${REF_IMAGE_SHA1SUM}" == "${IMAGE_SHA1SUM}" ]; then echo "Screenshot matches the reference image" FINALRET=0 else echo "Screenshot does not match the reference image" FINALRET=127 for i in agl-screenshot-*.png ; do #set +x echo "################################################################" ( curl --upload-file "$i" https://transfer.sh/$(basename "$i") && echo "" ) || true echo "################################################################" #set -x done echo "#########################" cat /run/platform/display/*.log echo "#########################" journalctl -b --no-pager -a echo "#########################" fi # cleanup sed -i '/activate-by-default=false/d' /etc/xdg/weston/weston.ini sed -i '/hide-cursor=true/d' /etc/xdg/weston/weston.ini #rm -rf /etc/systemd/system/weston@.service.d rm -rf /etc/afm/unit.env.d/screenshot systemctl daemon-reload sync sleep 2 systemctl restart weston@display.service sleep 10 exit $FINALRET