2021-04-30 15:35:28 +00:00
|
|
|
// Copyright 2020-2021, Collabora, Ltd.
|
2020-10-28 16:37:06 +00:00
|
|
|
// SPDX-License-Identifier: BSL-1.0
|
|
|
|
/*!
|
|
|
|
* @file
|
|
|
|
* @brief Partially-generated wrapper for the
|
|
|
|
* `org.freedesktop.monado.auxiliary` Java package.
|
|
|
|
* @author Ryan Pavlik <ryan.pavlik@collabora.com>
|
|
|
|
* @ingroup aux_android
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "wrap/ObjectWrapperBase.h"
|
|
|
|
|
|
|
|
namespace wrap {
|
|
|
|
namespace android::app {
|
|
|
|
class Activity;
|
|
|
|
} // namespace android::app
|
|
|
|
|
|
|
|
namespace android::view {
|
|
|
|
class SurfaceHolder;
|
|
|
|
} // namespace android::view
|
|
|
|
|
|
|
|
namespace org::freedesktop::monado::auxiliary {
|
|
|
|
class MonadoView;
|
|
|
|
} // namespace org::freedesktop::monado::auxiliary
|
|
|
|
|
|
|
|
} // namespace wrap
|
|
|
|
|
2021-04-30 15:35:28 +00:00
|
|
|
|
2020-10-28 16:37:06 +00:00
|
|
|
namespace wrap {
|
|
|
|
namespace org::freedesktop::monado::auxiliary {
|
|
|
|
/*!
|
|
|
|
* Wrapper for org.freedesktop.monado.auxiliary.MonadoView objects.
|
|
|
|
*/
|
|
|
|
class MonadoView : public ObjectWrapperBase
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
using ObjectWrapperBase::ObjectWrapperBase;
|
|
|
|
static constexpr const char *
|
|
|
|
getTypeName() noexcept
|
|
|
|
{
|
|
|
|
return "org/freedesktop/monado/auxiliary/MonadoView";
|
|
|
|
}
|
|
|
|
|
2021-04-30 15:35:28 +00:00
|
|
|
static constexpr const char *
|
|
|
|
getFullyQualifiedTypeName() noexcept
|
|
|
|
{
|
|
|
|
return "org.freedesktop.monado.auxiliary.MonadoView";
|
|
|
|
}
|
|
|
|
|
2020-10-28 16:37:06 +00:00
|
|
|
/*!
|
|
|
|
* Wrapper for the attachToActivity static method
|
|
|
|
*
|
|
|
|
* Java prototype:
|
2021-04-30 15:35:28 +00:00
|
|
|
* `public static org.freedesktop.monado.auxiliary.MonadoView attachToActivity(android.app.Activity,
|
|
|
|
* long);`
|
2020-10-28 16:37:06 +00:00
|
|
|
*
|
2021-04-30 15:35:28 +00:00
|
|
|
* JNI signature: (Landroid/app/Activity;J)Lorg/freedesktop/monado/auxiliary/MonadoView;
|
2020-10-28 16:37:06 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
static MonadoView
|
2021-01-14 14:13:48 +00:00
|
|
|
attachToActivity(android::app::Activity const &activity, void *nativePointer);
|
2020-10-28 16:37:06 +00:00
|
|
|
|
|
|
|
/*!
|
2021-04-30 15:35:28 +00:00
|
|
|
* Wrapper for the attachToActivity static method
|
2020-10-28 16:37:06 +00:00
|
|
|
*
|
|
|
|
* Java prototype:
|
2021-04-30 15:35:28 +00:00
|
|
|
* `public static org.freedesktop.monado.auxiliary.MonadoView attachToActivity(android.app.Activity);`
|
2020-10-28 16:37:06 +00:00
|
|
|
*
|
2021-04-30 15:35:28 +00:00
|
|
|
* JNI signature: (Landroid/app/Activity;)Lorg/freedesktop/monado/auxiliary/MonadoView;
|
2020-10-28 16:37:06 +00:00
|
|
|
*
|
|
|
|
*/
|
2021-04-30 15:35:28 +00:00
|
|
|
static MonadoView
|
|
|
|
attachToActivity(android::app::Activity const &activity);
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* Wrapper for the getDisplayMetrics static method
|
|
|
|
*
|
|
|
|
* Java prototype:
|
|
|
|
* `public static android.util.DisplayMetrics getDisplayMetrics(android.app.Activity);`
|
|
|
|
*
|
|
|
|
* JNI signature: (Landroid/app/Activity;)Landroid/util/DisplayMetrics;
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
static jni::Object
|
|
|
|
getDisplayMetrics(android::app::Activity const &activity);
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* Wrapper for the getNativePointer method
|
|
|
|
*
|
|
|
|
* Java prototype:
|
|
|
|
* `public long getNativePointer();`
|
|
|
|
*
|
|
|
|
* JNI signature: ()J
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
void *
|
|
|
|
getNativePointer();
|
2020-10-28 16:37:06 +00:00
|
|
|
|
|
|
|
/*!
|
|
|
|
* Wrapper for the markAsDiscardedByNative method
|
|
|
|
*
|
|
|
|
* Java prototype:
|
|
|
|
* `public void markAsDiscardedByNative();`
|
|
|
|
*
|
|
|
|
* JNI signature: ()V
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
markAsDiscardedByNative();
|
|
|
|
|
2021-04-30 15:35:28 +00:00
|
|
|
/*!
|
|
|
|
* Wrapper for the waitGetSurfaceHolder method
|
|
|
|
*
|
|
|
|
* Java prototype:
|
|
|
|
* `public android.view.SurfaceHolder waitGetSurfaceHolder(int);`
|
|
|
|
*
|
|
|
|
* JNI signature: (I)Landroid/view/SurfaceHolder;
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
android::view::SurfaceHolder
|
|
|
|
waitGetSurfaceHolder(int32_t wait_ms);
|
2020-11-27 14:42:11 +00:00
|
|
|
|
2020-10-28 16:37:06 +00:00
|
|
|
/*!
|
|
|
|
* Initialize the static metadata of this wrapper with a known
|
|
|
|
* (non-null) Java class.
|
|
|
|
*/
|
|
|
|
static void
|
|
|
|
staticInitClass(jni::jclass clazz)
|
|
|
|
{
|
|
|
|
Meta::data(clazz);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* Class metadata
|
|
|
|
*/
|
|
|
|
struct Meta : public MetaBase
|
|
|
|
{
|
|
|
|
jni::method_t attachToActivity;
|
2021-04-30 15:35:28 +00:00
|
|
|
jni::method_t attachToActivity1;
|
2020-11-27 14:42:11 +00:00
|
|
|
jni::method_t getDisplayMetrics;
|
2021-04-30 15:35:28 +00:00
|
|
|
jni::method_t getNativePointer;
|
|
|
|
jni::method_t markAsDiscardedByNative;
|
|
|
|
jni::method_t waitGetSurfaceHolder;
|
2020-10-28 16:37:06 +00:00
|
|
|
|
|
|
|
/*!
|
|
|
|
* Singleton accessor
|
|
|
|
*/
|
|
|
|
static Meta &
|
|
|
|
data(jni::jclass clazz = nullptr)
|
|
|
|
{
|
|
|
|
static Meta instance{clazz};
|
|
|
|
return instance;
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
2021-04-30 15:35:28 +00:00
|
|
|
explicit Meta(jni::jclass clazz);
|
2020-10-28 16:37:06 +00:00
|
|
|
};
|
|
|
|
};
|
2021-04-30 15:35:28 +00:00
|
|
|
|
2020-10-28 16:37:06 +00:00
|
|
|
} // namespace org::freedesktop::monado::auxiliary
|
|
|
|
} // namespace wrap
|
|
|
|
#include "org.freedesktop.monado.auxiliary.impl.hpp"
|