The open source OpenXR runtime
at main 73 lines 1.7 kB view raw
1// Copyright 2020-2023, Collabora, Ltd. 2// SPDX-License-Identifier: BSL-1.0 3// Author: Rylie Pavlik <rylie.pavlik@collabora.com> 4 5#pragma once 6 7#include "ObjectWrapperBase.h" 8#include <string> 9 10namespace wrap { 11namespace android::content { 12class Context; 13} // namespace android::content 14 15} // namespace wrap 16 17namespace wrap { 18namespace android::provider { 19/*! 20 * Wrapper for android.provider.Settings objects. 21 */ 22class Settings : public ObjectWrapperBase { 23 public: 24 using ObjectWrapperBase::ObjectWrapperBase; 25 static constexpr const char *getTypeName() noexcept { 26 return "android/provider/Settings"; 27 } 28 29 /*! 30 * Getter for the ACTION_VR_LISTENER_SETTINGS static field value 31 * 32 * Java prototype: 33 * `public static final java.lang.String ACTION_VR_LISTENER_SETTINGS;` 34 * 35 * JNI signature: Ljava/lang/String; 36 * 37 */ 38 static std::string ACTION_VR_LISTENER_SETTINGS(); 39 40 /*! 41 * Wrapper for the canDrawOverlays static method 42 * 43 * Java prototype: 44 * `public static boolean canDrawOverlays(android.content.Context);` 45 * 46 * JNI signature: (Landroid/content/Context;)Z 47 * 48 */ 49 static bool canDrawOverlays(const content::Context &context); 50 51 /*! 52 * Class metadata 53 */ 54 struct Meta : public MetaBase { 55 impl::StaticFieldId<std::string> ACTION_VR_LISTENER_SETTINGS; 56 jni::method_t canDrawOverlays; 57 58 /*! 59 * Singleton accessor 60 */ 61 static Meta &data() { 62 static Meta instance{}; 63 return instance; 64 } 65 66 private: 67 Meta(); 68 }; 69}; 70 71} // namespace android::provider 72} // namespace wrap 73#include "android.provider.impl.h"