C

Qt Quick Ultralite interrupt_handler Example

// Copyright (C) 2024 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#pragma once

#include <qul/signal.h>
#include <qul/singleton.h>
#include <qul/eventqueue.h>

typedef int HWButtonEvent;

class HWButtonInput : public Qul::Singleton<HWButtonInput>, public Qul::EventQueue<HWButtonEvent>
{
public:
    Qul::Signal<void(int button)> buttonEvent;

    void onEvent(const HWButtonEvent &inputEvent);
};