2020-08-25 21:23:38 +02:00
|
|
|
/*
|
2021-01-26 04:03:26 +01:00
|
|
|
* Copyright (c) 2020-2021 ndeadly
|
2020-08-25 21:23:38 +02:00
|
|
|
*
|
2020-08-27 00:50:34 +02:00
|
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
|
|
* under the terms and conditions of the GNU General Public License,
|
|
|
|
* version 2, as published by the Free Software Foundation.
|
2020-08-25 21:23:38 +02:00
|
|
|
*
|
2020-08-27 00:50:34 +02:00
|
|
|
* This program is distributed in the hope it will be useful, but WITHOUT
|
|
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
|
|
* more details.
|
2020-08-25 21:23:38 +02:00
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
2020-06-13 02:08:43 +02:00
|
|
|
#pragma once
|
|
|
|
#include <switch.h>
|
2020-07-01 15:34:07 +02:00
|
|
|
#include <stratosphere.hpp>
|
|
|
|
#include "bluetooth_types.hpp"
|
2020-06-13 02:08:43 +02:00
|
|
|
|
2020-06-13 19:15:59 +02:00
|
|
|
namespace ams::bluetooth::hid {
|
2020-06-13 02:08:43 +02:00
|
|
|
|
2020-06-15 00:18:46 +02:00
|
|
|
bool IsInitialized(void);
|
2021-02-21 00:43:56 +01:00
|
|
|
void WaitInitialized(void);
|
2020-06-13 19:15:59 +02:00
|
|
|
|
2021-02-21 02:42:06 +01:00
|
|
|
os::SystemEvent *GetSystemEvent(void);
|
|
|
|
os::SystemEvent *GetForwardEvent(void);
|
|
|
|
os::SystemEvent *GetUserForwardEvent(void);
|
2020-06-13 19:15:59 +02:00
|
|
|
|
2020-08-26 20:52:47 +02:00
|
|
|
Result Initialize(Handle event_handle);
|
2020-06-15 00:18:46 +02:00
|
|
|
void Finalize(void);
|
|
|
|
|
2021-02-21 17:36:24 +01:00
|
|
|
Result GetEventInfo(bluetooth::HidEventType *type, void *buffer, size_t size);
|
2020-06-15 00:18:46 +02:00
|
|
|
void HandleEvent(void);
|
2020-06-13 19:15:59 +02:00
|
|
|
|
2021-02-10 01:23:12 +01:00
|
|
|
void SignalFakeEvent(bluetooth::HidEventType type, const void *data, size_t size);
|
2021-02-09 21:53:32 +01:00
|
|
|
|
2020-06-13 19:15:59 +02:00
|
|
|
}
|