The open source OpenXR runtime

external: Update android-jni-wrap

authored by

Jarvis Huang and committed by
Jakob Bornecrantz
4f90666b 3587d794

+280 -105
+17 -3
src/external/android-jni-wrap/wrap/android.hardware.display.cpp
··· 1 - // Copyright 2022, Qualcomm Innovation Center, Inc. 1 + // Copyright 2022-2023, Qualcomm Innovation Center, Inc. 2 2 // SPDX-License-Identifier: BSL-1.0 3 3 // Author: Jarvis Huang 4 4 ··· 6 6 7 7 namespace wrap { 8 8 namespace android::hardware::display { 9 - DisplayManager::Meta::Meta() 9 + DisplayManager::Meta::Meta(bool deferDrop) 10 10 : MetaBaseDroppable(DisplayManager::getTypeName()), 11 - getDisplay(classRef().getMethod("getDisplay", "(I)Landroid/view/Display;")) { 11 + DISPLAY_CATEGORY_PRESENTATION(classRef(), 12 + "DISPLAY_CATEGORY_PRESENTATION"), 13 + getDisplay( 14 + classRef().getMethod("getDisplay", "(I)Landroid/view/Display;")), 15 + getDisplays( 16 + classRef().getMethod("getDisplays", "()[Landroid/view/Display;")), 17 + getDisplays1(classRef().getMethod( 18 + "getDisplays", "(Ljava/lang/String;)[Landroid/view/Display;")) { 19 + if (!deferDrop) { 20 + MetaBaseDroppable::dropClassRef(); 21 + } 22 + } 23 + DeviceProductInfo::Meta::Meta() 24 + : MetaBaseDroppable(DeviceProductInfo::getTypeName()), 25 + getName(classRef().getMethod("getName", "()Ljava/lang/String;")) { 12 26 MetaBaseDroppable::dropClassRef(); 13 27 } 14 28 } // namespace android::hardware::display
+80 -3
src/external/android-jni-wrap/wrap/android.hardware.display.h
··· 1 - // Copyright 2022, Qualcomm Innovation Center, Inc. 1 + // Copyright 2022-2023, Qualcomm Innovation Center, Inc. 2 2 // SPDX-License-Identifier: BSL-1.0 3 3 // Author: Jarvis Huang 4 4 5 5 #pragma once 6 6 7 7 #include "ObjectWrapperBase.h" 8 + #include <string> 8 9 9 10 namespace wrap { 10 11 namespace android::view { ··· 25 26 } 26 27 27 28 /*! 29 + * Getter for the DISPLAY_CATEGORY_PRESENTATION static field value 30 + * 31 + * Java prototype: 32 + * `public static final java.lang.String DISPLAY_CATEGORY_PRESENTATION;` 33 + * 34 + * JNI signature: Ljava/lang/String; 35 + * 36 + */ 37 + static std::string DISPLAY_CATEGORY_PRESENTATION(); 38 + 39 + /*! 28 40 * Wrapper for the getDisplay method 29 41 * 30 42 * Java prototype: 31 - * `public Display getDisplay(int)` 43 + * `public android.view.Display getDisplay(int);` 32 44 * 33 45 * JNI signature: (I)Landroid/view/Display; 34 46 * 35 47 */ 36 - android::view::Display getDisplay(int32_t displayId); 48 + view::Display getDisplay(int32_t displayId) const; 49 + 50 + /*! 51 + * Wrapper for the getDisplays method 52 + * 53 + * Java prototype: 54 + * `public android.view.Display[] getDisplays();` 55 + * 56 + * JNI signature: ()[Landroid/view/Display; 57 + * 58 + */ 59 + jni::Array<jni::Object> getDisplays() const; 60 + 61 + /*! 62 + * Wrapper for the getDisplays method 63 + * 64 + * Java prototype: 65 + * `public android.view.Display[] getDisplays(java.lang.String);` 66 + * 67 + * JNI signature: (Ljava/lang/String;)[Landroid/view/Display; 68 + * 69 + */ 70 + jni::Array<jni::Object> getDisplays(std::string const &category); 37 71 38 72 /*! 39 73 * Class metadata 40 74 */ 41 75 struct Meta : public MetaBaseDroppable { 76 + impl::StaticFieldId<std::string> DISPLAY_CATEGORY_PRESENTATION; 42 77 jni::method_t getDisplay; 78 + jni::method_t getDisplays; 79 + jni::method_t getDisplays1; 80 + 81 + /*! 82 + * Singleton accessor 83 + */ 84 + static Meta &data(bool deferDrop = false) { 85 + static Meta instance{deferDrop}; 86 + return instance; 87 + } 88 + 89 + private: 90 + explicit Meta(bool deferDrop); 91 + }; 92 + }; 93 + 94 + /*! 95 + * Wrapper for android.hardware.display.DeviceProductInfo objects. 96 + */ 97 + class DeviceProductInfo : public ObjectWrapperBase { 98 + public: 99 + using ObjectWrapperBase::ObjectWrapperBase; 100 + static constexpr const char *getTypeName() noexcept { 101 + return "android/hardware/display/DeviceProductInfo"; 102 + } 103 + 104 + /*! 105 + * Wrapper for the getName method 106 + * 107 + * Java prototype: 108 + * `public java.lang.String getName();` 109 + * 110 + * JNI signature: ()Ljava/lang/String; 111 + * 112 + */ 113 + std::string getName() const; 114 + 115 + /*! 116 + * Class metadata 117 + */ 118 + struct Meta : public MetaBaseDroppable { 119 + jni::method_t getName; 43 120 44 121 /*! 45 122 * Singleton accessor
+37 -4
src/external/android-jni-wrap/wrap/android.hardware.display.impl.h
··· 1 - // Copyright 2022, Qualcomm Innovation Center, Inc. 1 + // Copyright 2022-2023, Qualcomm Innovation Center, Inc. 2 2 // SPDX-License-Identifier: BSL-1.0 3 3 // Author: Jarvis Huang 4 4 // Inline implementations: do not include on its own! ··· 6 6 #pragma once 7 7 8 8 #include "android.view.h" 9 + #include <string> 9 10 10 11 namespace wrap { 11 12 namespace android::hardware::display { 12 - inline android::view::Display DisplayManager::getDisplay(int32_t displayId) { 13 + inline std::string DisplayManager::DISPLAY_CATEGORY_PRESENTATION() { 14 + auto &data = Meta::data(true); 15 + auto ret = get(data.DISPLAY_CATEGORY_PRESENTATION, data.clazz()); 16 + data.dropClassRef(); 17 + return ret; 18 + } 19 + 20 + inline view::Display DisplayManager::getDisplay(int32_t displayId) const { 21 + assert(!isNull()); 22 + return view::Display( 23 + object().call<jni::Object>(Meta::data().getDisplay, displayId)); 24 + } 25 + 26 + inline jni::Array<jni::Object> DisplayManager::getDisplays() const { 27 + assert(!isNull()); 28 + return jni::Array<jni::Object>( 29 + (jobjectArray)object() 30 + .call<jni::Object>(Meta::data().getDisplays) 31 + .getHandle(), 32 + 0); 33 + } 34 + 35 + inline jni::Array<jni::Object> 36 + DisplayManager::getDisplays(std::string const &category) { 13 37 assert(!isNull()); 14 - return android::view::Display( 15 - object().call<jni::Object>(Meta::data().getDisplay, displayId)); 38 + return jni::Array<jni::Object>( 39 + (jobjectArray)object() 40 + .call<jni::Object>(Meta::data().getDisplays1, category) 41 + .getHandle(), 42 + 0); 16 43 } 44 + 45 + inline std::string DeviceProductInfo::getName() const { 46 + assert(!isNull()); 47 + return object().call<std::string>(Meta::data().getName); 48 + } 49 + 17 50 } // namespace android::hardware::display 18 51 } // namespace wrap
+21 -19
src/external/android-jni-wrap/wrap/android.view.cpp
··· 9 9 Display::Meta::Meta(bool deferDrop) 10 10 : MetaBaseDroppable(Display::getTypeName()), 11 11 DEFAULT_DISPLAY(classRef(), "DEFAULT_DISPLAY"), 12 + getDisplayId(classRef().getMethod("getDisplayId", "()I")), 13 + getName(classRef().getMethod("getName", "()Ljava/lang/String;")), 14 + getDeviceProductInfo(classRef().getMethod( 15 + "getDeviceProductInfo", 16 + "()Landroid/hardware/display/DeviceProductInfo;")), 12 17 getRealSize( 13 18 classRef().getMethod("getRealSize", "(Landroid/graphics/Point;)V")), 14 19 getRealMetrics(classRef().getMethod("getRealMetrics", 15 - "(Landroid/util/DisplayMetrics;)V")), 16 - getDisplayId(classRef().getMethod("getDisplayId", "()I")) { 20 + "(Landroid/util/DisplayMetrics;)V")) { 17 21 if (!deferDrop) { 18 22 MetaBaseDroppable::dropClassRef(); 19 23 } ··· 30 34 MetaBaseDroppable::dropClassRef(); 31 35 } 32 36 WindowManager::Meta::Meta() 33 - : MetaBaseDroppable(WindowManager::getTypeName()), 34 - getDefaultDisplay( 35 - classRef().getMethod("getDefaultDisplay", "()Landroid/view/Display;")) { 37 + : MetaBaseDroppable(WindowManager::getTypeName()), 38 + getDefaultDisplay(classRef().getMethod("getDefaultDisplay", 39 + "()Landroid/view/Display;")) { 36 40 MetaBaseDroppable::dropClassRef(); 37 41 } 38 - WindowManager_LayoutParams::Meta::Meta(bool deferDrop) 39 - : MetaBaseDroppable(WindowManager_LayoutParams::getTypeName()), 40 - TYPE_APPLICATION(classRef(), "TYPE_APPLICATION"), 41 - TYPE_APPLICATION_OVERLAY(classRef(), "TYPE_APPLICATION_OVERLAY"), 42 - FLAG_FULLSCREEN(classRef(), "FLAG_FULLSCREEN"), 43 - FLAG_NOT_FOCUSABLE(classRef(), "FLAG_NOT_FOCUSABLE"), 44 - FLAG_NOT_TOUCHABLE(classRef(), "FLAG_NOT_TOUCHABLE"), 45 - init(classRef().getMethod("<init>", "()V")), 46 - init1(classRef().getMethod("<init>", "(I)V")), 47 - init2(classRef().getMethod("<init>", "(II)V")) { 48 - if (!deferDrop) { 49 - MetaBaseDroppable::dropClassRef(); 50 - } 51 - } 42 + WindowManager_LayoutParams::Meta::Meta() 43 + : MetaBase(WindowManager_LayoutParams::getTypeName()), 44 + FLAG_FULLSCREEN(classRef(), "FLAG_FULLSCREEN"), 45 + FLAG_NOT_FOCUSABLE(classRef(), "FLAG_NOT_FOCUSABLE"), 46 + FLAG_NOT_TOUCHABLE(classRef(), "FLAG_NOT_TOUCHABLE"), 47 + TYPE_APPLICATION(classRef(), "TYPE_APPLICATION"), 48 + TYPE_APPLICATION_OVERLAY(classRef(), "TYPE_APPLICATION_OVERLAY"), 49 + init(classRef().getMethod("<init>", "()V")), 50 + init1(classRef().getMethod("<init>", "(I)V")), 51 + init2(classRef().getMethod("<init>", "(II)V")), 52 + setTitle( 53 + classRef().getMethod("setTitle", "(Ljava/lang/CharSequence;)V")) {} 52 54 Display_Mode::Meta::Meta() : MetaBaseDroppable(Display_Mode::getTypeName()), 53 55 getModeId(classRef().getMethod("getModeId", "()I")), 54 56 getPhysicalHeight(classRef().getMethod("getPhysicalHeight", "()I")),
+83 -40
src/external/android-jni-wrap/wrap/android.view.h
··· 11 11 class Point; 12 12 } // namespace android::graphics 13 13 14 + namespace android::hardware::display { 15 + class DeviceProductInfo; 16 + } // namespace android::hardware::display 17 + 14 18 namespace android::util { 15 19 class DisplayMetrics; 16 20 } // namespace android::util 17 21 18 22 namespace android::view { 23 + class Display; 19 24 class Surface; 25 + class WindowManager_LayoutParams; 20 26 } // namespace android::view 21 27 22 28 } // namespace wrap ··· 45 51 static int32_t DEFAULT_DISPLAY(); 46 52 47 53 /*! 54 + * Wrapper for the getDisplayId method 55 + * 56 + * Java prototype: 57 + * `public int getDisplayId();` 58 + * 59 + * JNI signature: ()I 60 + * 61 + */ 62 + int32_t getDisplayId() const; 63 + 64 + /*! 65 + * Wrapper for the getName method 66 + * 67 + * Java prototype: 68 + * `public java.lang.String getName();` 69 + * 70 + * JNI signature: ()Ljava/lang/String; 71 + * 72 + */ 73 + std::string getName() const; 74 + 75 + /*! 76 + * Wrapper for the getDeviceProductInfo method 77 + * 78 + * Java prototype: 79 + * `public android.hardware.display.DeviceProductInfo 80 + * getDeviceProductInfo();` 81 + * 82 + * JNI signature: ()Landroid/hardware/display/DeviceProductInfo; 83 + * 84 + */ 85 + hardware::display::DeviceProductInfo getDeviceProductInfo() const; 86 + 87 + /*! 48 88 * Wrapper for the getRealSize method 49 89 * 50 90 * Java prototype: ··· 67 107 void getRealMetrics(util::DisplayMetrics &out_displayMetrics); 68 108 69 109 /*! 70 - * Wrapper for the getDisplayId method 71 - * 72 - * Java prototype: 73 - * `public int getDisplayId();` 74 - * 75 - * JNI signature: ()I 76 - * 77 - */ 78 - int32_t getDisplayId(); 79 - 80 - /*! 81 110 * Class metadata 82 111 */ 83 112 struct Meta : public MetaBaseDroppable { 84 113 impl::StaticFieldId<int32_t> DEFAULT_DISPLAY; 114 + jni::method_t getDisplayId; 115 + jni::method_t getName; 116 + jni::method_t getDeviceProductInfo; 85 117 jni::method_t getRealSize; 86 118 jni::method_t getRealMetrics; 87 - jni::method_t getDisplayId; 88 119 89 120 /*! 90 121 * Singleton accessor ··· 95 126 } 96 127 97 128 private: 98 - Meta(bool deferDrop); 129 + explicit Meta(bool deferDrop); 99 130 }; 100 131 }; 101 132 ··· 183 214 * Wrapper for android.view.WindowManager objects. 184 215 */ 185 216 class WindowManager : public ObjectWrapperBase { 186 - public: 217 + public: 187 218 using ObjectWrapperBase::ObjectWrapperBase; 188 219 static constexpr const char *getTypeName() noexcept { 189 220 return "android/view/WindowManager"; ··· 198 229 * JNI signature: ()Landroid/view/Display; 199 230 * 200 231 */ 201 - Display getDefaultDisplay(); 232 + Display getDefaultDisplay() const; 202 233 203 234 /*! 204 235 * Class metadata ··· 214 245 return instance; 215 246 } 216 247 217 - private: 248 + private: 218 249 Meta(); 219 250 }; 220 251 }; 221 252 222 253 /*! 223 - * Wrapper for android.view.WindowManager objects. 254 + * Wrapper for android.view.WindowManager$LayoutParams objects. 224 255 */ 225 256 class WindowManager_LayoutParams : public ObjectWrapperBase { 226 - public: 257 + public: 227 258 using ObjectWrapperBase::ObjectWrapperBase; 228 259 static constexpr const char *getTypeName() noexcept { 229 260 return "android/view/WindowManager$LayoutParams"; 230 261 } 231 262 232 263 /*! 233 - * Getter for the TYPE_APPLICATION static field value 264 + * Getter for the FLAG_FULLSCREEN static field value 234 265 * 235 266 * Java prototype: 236 - * `public static final int TYPE_APPLICATION;` 267 + * `public static final int FLAG_FULLSCREEN;` 237 268 * 238 269 * JNI signature: I 239 270 * 240 271 */ 241 - static int32_t TYPE_APPLICATION(); 272 + static int32_t FLAG_FULLSCREEN(); 242 273 243 274 /*! 244 - * Getter for the TYPE_APPLICATION_OVERLAY static field value 275 + * Getter for the FLAG_NOT_FOCUSABLE static field value 245 276 * 246 277 * Java prototype: 247 - * `public static final int TYPE_APPLICATION_OVERLAY;` 278 + * `public static final int FLAG_NOT_FOCUSABLE;` 248 279 * 249 280 * JNI signature: I 250 281 * 251 282 */ 252 - static int32_t TYPE_APPLICATION_OVERLAY(); 283 + static int32_t FLAG_NOT_FOCUSABLE(); 253 284 254 285 /*! 255 - * Getter for the FLAG_FULLSCREEN static field value 286 + * Getter for the FLAG_NOT_TOUCHABLE static field value 256 287 * 257 288 * Java prototype: 258 - * `public static final int FLAG_FULLSCREEN;` 289 + * `public static final int FLAG_NOT_TOUCHABLE;` 259 290 * 260 291 * JNI signature: I 261 292 * 262 293 */ 263 - static int32_t FLAG_FULLSCREEN(); 294 + static int32_t FLAG_NOT_TOUCHABLE(); 264 295 265 296 /*! 266 - * Getter for the FLAG_NOT_FOCUSABLE static field value 297 + * Getter for the TYPE_APPLICATION static field value 267 298 * 268 299 * Java prototype: 269 - * `public static final int FLAG_NOT_FOCUSABLE;` 300 + * `public static final int TYPE_APPLICATION;` 270 301 * 271 302 * JNI signature: I 272 303 * 273 304 */ 274 - static int32_t FLAG_NOT_FOCUSABLE(); 305 + static int32_t TYPE_APPLICATION(); 275 306 276 307 /*! 277 - * Getter for the FLAG_NOT_TOUCHABLE static field value 308 + * Getter for the TYPE_APPLICATION_OVERLAY static field value 278 309 * 279 310 * Java prototype: 280 - * `public static final int FLAG_NOT_TOUCHABLE;` 311 + * `public static final int TYPE_APPLICATION_OVERLAY;` 281 312 * 282 313 * JNI signature: I 283 314 * 284 315 */ 285 - static int32_t FLAG_NOT_TOUCHABLE(); 316 + static int32_t TYPE_APPLICATION_OVERLAY(); 286 317 287 318 /*! 288 319 * Wrapper for a constructor ··· 316 347 * 317 348 */ 318 349 static WindowManager_LayoutParams construct(int32_t type, int32_t flags); 350 + 351 + /*! 352 + * Wrapper for the setTitle method 353 + * 354 + * Java prototype: 355 + * `public final void setTitle(java.lang.CharSequence);` 356 + * 357 + * JNI signature: (Ljava/lang/CharSequence;)V 358 + * 359 + */ 360 + void setTitle(std::string const &title); 319 361 320 362 /*! 321 363 * Class metadata 322 364 */ 323 - struct Meta : public MetaBaseDroppable { 324 - impl::StaticFieldId<int32_t> TYPE_APPLICATION; 325 - impl::StaticFieldId<int32_t> TYPE_APPLICATION_OVERLAY; 365 + struct Meta : public MetaBase { 326 366 impl::StaticFieldId<int32_t> FLAG_FULLSCREEN; 327 367 impl::StaticFieldId<int32_t> FLAG_NOT_FOCUSABLE; 328 368 impl::StaticFieldId<int32_t> FLAG_NOT_TOUCHABLE; 369 + impl::StaticFieldId<int32_t> TYPE_APPLICATION; 370 + impl::StaticFieldId<int32_t> TYPE_APPLICATION_OVERLAY; 329 371 jni::method_t init; 330 372 jni::method_t init1; 331 373 jni::method_t init2; 374 + jni::method_t setTitle; 332 375 333 376 /*! 334 377 * Singleton accessor 335 378 */ 336 - static Meta &data(bool deferDrop = false) { 337 - static Meta instance{deferDrop}; 379 + static Meta &data() { 380 + static Meta instance{}; 338 381 return instance; 339 382 } 340 383 341 - private: 342 - Meta(bool deferDrop); 384 + private: 385 + Meta(); 343 386 }; 344 387 }; 345 388
+42 -36
src/external/android-jni-wrap/wrap/android.view.impl.h
··· 6 6 #pragma once 7 7 8 8 #include "android.graphics.h" 9 + #include "android.hardware.display.h" 9 10 #include "android.util.h" 11 + #include <string> 10 12 11 13 namespace wrap { 12 14 namespace android::view { ··· 17 19 return ret; 18 20 } 19 21 22 + inline int32_t Display::getDisplayId() const { 23 + assert(!isNull()); 24 + return object().call<int32_t>(Meta::data().getDisplayId); 25 + } 26 + 27 + inline std::string Display::getName() const { 28 + assert(!isNull()); 29 + return object().call<std::string>(Meta::data().getName); 30 + } 31 + 32 + inline hardware::display::DeviceProductInfo 33 + Display::getDeviceProductInfo() const { 34 + assert(!isNull()); 35 + return hardware::display::DeviceProductInfo( 36 + object().call<jni::Object>(Meta::data().getDeviceProductInfo)); 37 + } 38 + 20 39 inline void Display::getRealSize(graphics::Point &out_size) { 21 40 assert(!isNull()); 22 41 return object().call<void>(Meta::data().getRealSize, out_size.object()); ··· 28 47 out_displayMetrics.object()); 29 48 } 30 49 31 - inline int32_t Display::getDisplayId() { 32 - assert(!isNull()); 33 - return object().call<int32_t>(Meta::data().getDisplayId); 34 - } 35 - 36 50 inline bool Surface::isValid() const { 37 51 assert(!isNull()); 38 52 return object().call<bool>(Meta::data().isValid); ··· 43 57 return Surface(object().call<jni::Object>(Meta::data().getSurface)); 44 58 } 45 59 46 - inline Display WindowManager::getDefaultDisplay() { 60 + inline Display WindowManager::getDefaultDisplay() const { 47 61 assert(!isNull()); 48 62 return Display(object().call<jni::Object>(Meta::data().getDefaultDisplay)); 49 63 } 50 64 51 - inline int32_t WindowManager_LayoutParams::TYPE_APPLICATION() { 52 - auto &data = Meta::data(true); 53 - auto ret = get(data.TYPE_APPLICATION, data.clazz()); 54 - data.dropClassRef(); 55 - return ret; 65 + inline int32_t WindowManager_LayoutParams::FLAG_FULLSCREEN() { 66 + return get(Meta::data().FLAG_FULLSCREEN, Meta::data().clazz()); 56 67 } 57 68 58 - inline int32_t WindowManager_LayoutParams::TYPE_APPLICATION_OVERLAY() { 59 - auto &data = Meta::data(true); 60 - auto ret = get(data.TYPE_APPLICATION_OVERLAY, data.clazz()); 61 - data.dropClassRef(); 62 - return ret; 69 + inline int32_t WindowManager_LayoutParams::FLAG_NOT_FOCUSABLE() { 70 + return get(Meta::data().FLAG_NOT_FOCUSABLE, Meta::data().clazz()); 63 71 } 64 72 65 - inline int32_t WindowManager_LayoutParams::FLAG_FULLSCREEN() { 66 - auto &data = Meta::data(true); 67 - auto ret = get(data.FLAG_FULLSCREEN, data.clazz()); 68 - data.dropClassRef(); 69 - return ret; 73 + inline int32_t WindowManager_LayoutParams::FLAG_NOT_TOUCHABLE() { 74 + return get(Meta::data().FLAG_NOT_TOUCHABLE, Meta::data().clazz()); 70 75 } 71 76 72 - inline int32_t WindowManager_LayoutParams::FLAG_NOT_FOCUSABLE() { 73 - auto &data = Meta::data(true); 74 - auto ret = get(data.FLAG_NOT_FOCUSABLE, data.clazz()); 75 - data.dropClassRef(); 76 - return ret; 77 + inline int32_t WindowManager_LayoutParams::TYPE_APPLICATION() { 78 + return get(Meta::data().TYPE_APPLICATION, Meta::data().clazz()); 77 79 } 78 80 79 - inline int32_t WindowManager_LayoutParams::FLAG_NOT_TOUCHABLE() { 80 - auto &data = Meta::data(true); 81 - auto ret = get(data.FLAG_NOT_TOUCHABLE, data.clazz()); 82 - data.dropClassRef(); 83 - return ret; 81 + inline int32_t WindowManager_LayoutParams::TYPE_APPLICATION_OVERLAY() { 82 + return get(Meta::data().TYPE_APPLICATION_OVERLAY, Meta::data().clazz()); 84 83 } 85 84 86 85 inline WindowManager_LayoutParams WindowManager_LayoutParams::construct() { 87 86 return WindowManager_LayoutParams( 88 - Meta::data().clazz().newInstance(Meta::data().init)); 87 + Meta::data().clazz().newInstance(Meta::data().init)); 89 88 } 90 89 91 - inline WindowManager_LayoutParams WindowManager_LayoutParams::construct(int32_t type) { 90 + inline WindowManager_LayoutParams 91 + WindowManager_LayoutParams::construct(int32_t type) { 92 92 return WindowManager_LayoutParams( 93 - Meta::data().clazz().newInstance(Meta::data().init1, type)); 93 + Meta::data().clazz().newInstance(Meta::data().init1, type)); 94 94 } 95 95 96 - inline WindowManager_LayoutParams WindowManager_LayoutParams::construct(int32_t type, int32_t flags) { 96 + inline WindowManager_LayoutParams 97 + WindowManager_LayoutParams::construct(int32_t type, int32_t flags) { 97 98 return WindowManager_LayoutParams( 98 - Meta::data().clazz().newInstance(Meta::data().init2, type, flags)); 99 + Meta::data().clazz().newInstance(Meta::data().init2, type, flags)); 100 + } 101 + 102 + inline void WindowManager_LayoutParams::setTitle(std::string const &title) { 103 + assert(!isNull()); 104 + return object().call<void>(Meta::data().setTitle, title); 99 105 } 100 106 101 107 inline int Display_Mode::getModeId() {