|
| MonadoView (Context context) |
|
long | getNativePointer () |
|
SurfaceHolder | waitGetSurfaceHolder (int wait_ms) |
| Block up to a specified amount of time, waiting for the surfaceCreated callback to be fired and populate the currentSurfaceHolder. More...
|
|
void | markAsDiscardedByNative () |
| Change the flag and notify those waiting on it, to indicate that native code is done with this object. More...
|
|
void | surfaceCreated (@NonNull SurfaceHolder surfaceHolder) |
|
void | surfaceChanged ( @NonNull SurfaceHolder surfaceHolder, int format, int width, int height) |
|
void | surfaceDestroyed (@NonNull SurfaceHolder surfaceHolder) |
|
void | surfaceRedrawNeeded (@NonNull SurfaceHolder surfaceHolder) |
|
|
int | width = -1 |
|
int | height = -1 |
|
int | format = -1 |
|
◆ attachToActivity()
static MonadoView org.freedesktop.monado.auxiliary.MonadoView.attachToActivity |
( |
@NonNull final Activity |
activity | ) |
|
|
inlinestatic |
Construct and start attaching a MonadoView to a client application.
- Parameters
-
activity | The activity to attach to. |
- Returns
- The MonadoView instance created and asynchronously attached.
◆ attachToWindow()
static MonadoView org.freedesktop.monado.auxiliary.MonadoView.attachToWindow |
( |
@NonNull final Context |
displayContext, |
|
|
long |
nativePointer, |
|
|
WindowManager.LayoutParams |
lp |
|
) |
| throws IllegalArgumentException |
|
inlinestatic |
Construct and start attaching a MonadoView to window.
- Parameters
-
displayContext | Display context used for looking for target window. |
nativePointer | The native android_custom_surface pointer, cast to a long. |
lp | Layout parameters associated with view. |
- Returns
- The MonadoView instance created and asynchronously attached.
◆ getDisplayModeIdHeight()
static int org.freedesktop.monado.auxiliary.MonadoView.getDisplayModeIdHeight |
( |
@NonNull final Context |
context, |
|
|
int |
display, |
|
|
int |
displayModeId |
|
) |
| |
|
inlinestatic |
Get the height of the specified display mode on the specified display ID.
If the specified mode ID is not in the list of supported mode IDs for the specified display ID, then a value of 0 is returned.
- Parameters
-
context | Display context used for looking for target window. |
display | The display ID for which the mode is to be queried. |
displayModeId | The display mode ID for which the height is returned. This is a zero-indexed mode ID. |
- Returns
- The height in pixels for the specified mode ID on the specified display.
◆ getDisplayModeIdWidth()
static int org.freedesktop.monado.auxiliary.MonadoView.getDisplayModeIdWidth |
( |
@NonNull final Context |
context, |
|
|
int |
display, |
|
|
int |
displayModeId |
|
) |
| |
|
inlinestatic |
Get the width of the specified display mode on the specified display ID.
If the specified mode ID is not in the list of supported mode IDs for the specified display ID, then a value of 0 is returned.
- Parameters
-
context | Display context used for looking for target window. |
display | The display ID for which the mode is to be queried. |
displayModeId | The display mode ID for which the width is returned. This is a zero-indexed mode ID. |
- Returns
- The width in pixels for the specified mode ID on the specified display.
◆ markAsDiscardedByNative()
void org.freedesktop.monado.auxiliary.MonadoView.markAsDiscardedByNative |
( |
| ) |
|
|
inline |
◆ removeFromWindow()
static void org.freedesktop.monado.auxiliary.MonadoView.removeFromWindow |
( |
@NonNull MonadoView |
view | ) |
|
|
inlinestatic |
◆ waitGetSurfaceHolder()
SurfaceHolder org.freedesktop.monado.auxiliary.MonadoView.waitGetSurfaceHolder |
( |
int |
wait_ms | ) |
|
|
inline |
Block up to a specified amount of time, waiting for the surfaceCreated callback to be fired and populate the currentSurfaceHolder.
If it returns a SurfaceHolder, the usedByNativeCode
flag will be set.
Called by native code!
- Parameters
-
wait_ms | Max duration you prefer to wait, in milliseconds. Spurious wakeups mean this not be totally precise. |
- Returns
- A SurfaceHolder or null.
References org.freedesktop.monado.auxiliary.NativeCounterpart.markAsUsedByNativeCode().
The documentation for this class was generated from the following file:
- auxiliary/android/src/main/java/org/freedesktop/monado/auxiliary/MonadoView.java