The open source OpenXR runtime
1// Copyright 2020-2021, 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
9namespace wrap {
10namespace android::graphics {
11/*!
12 * Wrapper for android.graphics.Point objects.
13 */
14class Point : public ObjectWrapperBase {
15 public:
16 using ObjectWrapperBase::ObjectWrapperBase;
17 static constexpr const char *getTypeName() noexcept {
18 return "android/graphics/Point";
19 }
20
21 /*!
22 * Getter for the x field value
23 *
24 * Java prototype:
25 * `public int x;`
26 *
27 * JNI signature: I
28 *
29 */
30 int32_t getX() const;
31
32 /*!
33 * Getter for the y field value
34 *
35 * Java prototype:
36 * `public int y;`
37 *
38 * JNI signature: I
39 *
40 */
41 int32_t getY() const;
42
43 /*!
44 * Class metadata
45 */
46 struct Meta : public MetaBaseDroppable {
47 impl::FieldId<int32_t> x;
48 impl::FieldId<int32_t> y;
49
50 /*!
51 * Singleton accessor
52 */
53 static Meta &data() {
54 static Meta instance{};
55 return instance;
56 }
57
58 private:
59 Meta();
60 };
61};
62
63class PixelFormat : public ObjectWrapperBase {
64public:
65 using ObjectWrapperBase::ObjectWrapperBase;
66 static constexpr const char *getTypeName() noexcept {
67 return "android/graphics/PixelFormat";
68 }
69
70 static int32_t OPAQUE();
71
72 /*!
73 * Class metadata
74 */
75 struct Meta : public MetaBaseDroppable {
76 impl::StaticFieldId<int32_t> OPAQUE;
77
78 /*!
79 * Singleton accessor
80 */
81 static Meta &data() {
82 static Meta instance{};
83 return instance;
84 }
85
86 private:
87 Meta();
88 };
89};
90} // namespace android::graphics
91} // namespace wrap
92#include "android.graphics.impl.h"