|
libtransistor
A userland library for the Nintendo Switch
|
Visual Services. More...
#include <libtransistor/types.h>#include <libtransistor/ipc/am.h>#include <libtransistor/display/display.h>#include <libtransistor/display/surface.h>

Go to the source code of this file.
Functions | |
| result_t | vi_init () |
| Initialize visual services. | |
| result_t | vi_open_display (const char *name, display_t *out) |
| Open display. More... | |
| result_t | vi_close_display (display_t *display) |
| Close display. More... | |
| result_t | vi_get_display_vsync_event (display_t *display) |
| Get the V-Sync event for the given display. More... | |
| result_t | vi_create_stray_layer (uint32_t unknown, display_t *display, uint64_t *layer_id, igbp_t *igbp) |
| Create a stray layer. More... | |
| result_t | vi_open_layer (const char *display_name, uint64_t layer_id, aruid_t aruid, igbp_t *igbp) |
| Open a managed layer. More... | |
| result_t | vi_close_layer (uint64_t layer_id) |
| Close a managed layer. More... | |
| result_t | vi_create_managed_layer (uint32_t unknown, display_t *display, uint64_t aruid, uint64_t *layer_id) |
| Create a managed layer. More... | |
| result_t | vi_destroy_managed_layer (uint64_t layer_id) |
| Destroy a managed layer. More... | |
| result_t | vi_adjust_refcount (int32_t handle, int32_t addval, int32_t type) |
| Adjust reference count. More... | |
| result_t | vi_transact_parcel (int32_t handle, uint32_t transaction, uint32_t flags, void *in_parcel, size_t in_parcel_size, void *out_parcel, size_t out_parcel_size) |
| Transact parcel. More... | |
| result_t | vi_get_native_handle (int32_t handle, uint32_t native_id, revent_h *out) |
| Get a native handle from a binder. | |
| result_t | vi_imds_set_layer_visibility (bool visible, uint64_t layer_id) |
| IManagerDisplayServices - Set layer visibility. More... | |
| result_t | vi_imds_set_display_layer_stack (uint32_t stack, display_t *display) |
| IManagerDisplayServices - Set display layer stack. More... | |
| result_t | vi_imds_add_to_layer_stack (uint32_t stack, uint64_t layer_id) |
| IManagerDisplayServices - Add to layer stack. More... | |
| result_t | vi_imds_set_conductor_layer (bool conductor, uint64_t layer_id) |
| IManagerDisplayServices - Set conductor layer. More... | |
| result_t | vi_imds_set_content_visibility (bool visible) |
| IManagerDisplayServices - Set content visibility. More... | |
| result_t | vi_isds_get_z_order_count_min (uint64_t layer_id, int64_t *z_count_min) |
| ISystemDisplayServices - Get Z order count minimum. More... | |
| result_t | vi_isds_get_z_order_count_max (uint64_t layer_id, int64_t *z_count_max) |
| ISystemDisplayServices - Get Z order count maximum. More... | |
| result_t | vi_isds_get_display_logical_resolution (display_t *display, int32_t *width, int32_t *height) |
| ISystemDisplayServices - Get display logical resolution. More... | |
| result_t | vi_isds_set_layer_position (float x, float y, uint64_t layer_id) |
| ISystemDisplayServices - Set layer position. More... | |
| result_t | vi_isds_set_layer_size (uint64_t layer_id, int64_t width, int64_t height) |
| ISystemDisplayServices - Set layer size. More... | |
| result_t | vi_isds_get_layer_z (uint64_t layer_id, int64_t *z) |
| ISystemDisplayServices - Get layer Z order. More... | |
| result_t | vi_isds_set_layer_z (uint64_t layer_id, int64_t z) |
| ISystemDisplayServices - Set layer Z order. More... | |
| result_t | vi_isds_set_layer_visibility (bool visible, uint64_t layer_id) |
| ISystemDisplayServices - Set layer visibility. More... | |
| result_t | vi_iads_set_display_enabled (bool enabled, display_t *display) |
| IApplicationDisplayServices - Set display enabled. More... | |
| result_t | vi_iads_set_layer_scaling_mode (uint32_t scaling_mode, uint64_t layer_id) |
| IApplicationDisplayServices - Set layer scaling mode. More... | |
| void | vi_finalize () |
| Finalize visual services. | |
Visual Services.
| result_t vi_adjust_refcount | ( | int32_t | handle, |
| int32_t | addval, | ||
| int32_t | type | ||
| ) |
Adjust reference count.
| handle | Binder handle |
| addval | Value to add to reference count |
| type | Type of reference? |
| result_t vi_close_layer | ( | uint64_t | layer_id | ) |
Close a managed layer.
| layer_id | ID of existing managed layer |
| result_t vi_create_managed_layer | ( | uint32_t | unknown, |
| display_t * | display, | ||
| uint64_t | aruid, | ||
| uint64_t * | layer_id | ||
| ) |
Create a managed layer.
| unknown | Unknown |
| display | Display |
| aruid | Applet resource user ID |
| layer_id | ID of newly created layer |
| result_t vi_create_stray_layer | ( | uint32_t | unknown, |
| display_t * | display, | ||
| uint64_t * | layer_id, | ||
| igbp_t * | igbp | ||
| ) |
Create a stray layer.
| unknown | Unknown |
| display | Display to create it for |
| layer_id | ID of created layer |
| igbp | IGraphicBufferProducer for the newly created layer |
| result_t vi_destroy_managed_layer | ( | uint64_t | layer_id | ) |
Destroy a managed layer.
| layer_id | Layer ID |
Get the V-Sync event for the given display.
| display | Display to get V-Sync event for |
IApplicationDisplayServices - Set display enabled.
| enabled | Enabled? |
| display | Display |
| result_t vi_iads_set_layer_scaling_mode | ( | uint32_t | scaling_mode, |
| uint64_t | layer_id | ||
| ) |
IApplicationDisplayServices - Set layer scaling mode.
| scaling_mode | Scaling mode |
| layer_id | Layer |
| result_t vi_imds_add_to_layer_stack | ( | uint32_t | stack, |
| uint64_t | layer_id | ||
| ) |
IManagerDisplayServices - Add to layer stack.
| stack | ID of layer stack |
| layer_id | Layer to add to stack |
| result_t vi_imds_set_conductor_layer | ( | bool | conductor, |
| uint64_t | layer_id | ||
| ) |
IManagerDisplayServices - Set conductor layer.
| conductor | Is conductor |
| layer_id | Layer ID |
No idea what "conductor" means in this context.
| result_t vi_imds_set_content_visibility | ( | bool | visible | ) |
IManagerDisplayServices - Set content visibility.
| visible | Visible |
IManagerDisplayServices - Set display layer stack.
| stack | ID of layer stack |
| display | Display |
Not really sure about this, but I think it changes which layer stack is currently being displayed.
| result_t vi_imds_set_layer_visibility | ( | bool | visible, |
| uint64_t | layer_id | ||
| ) |
IManagerDisplayServices - Set layer visibility.
| visible | Visible |
| layer_id | Layer ID |
| result_t vi_isds_get_display_logical_resolution | ( | display_t * | display, |
| int32_t * | width, | ||
| int32_t * | height | ||
| ) |
ISystemDisplayServices - Get display logical resolution.
| display | Display |
| width | Output for width |
| height | Output for height |
| result_t vi_isds_get_layer_z | ( | uint64_t | layer_id, |
| int64_t * | z | ||
| ) |
ISystemDisplayServices - Get layer Z order.
| layer_id | Layer |
| z | Output for Z order |
| result_t vi_isds_get_z_order_count_max | ( | uint64_t | layer_id, |
| int64_t * | z_count_max | ||
| ) |
ISystemDisplayServices - Get Z order count maximum.
| layer_id | Layer ID |
| z_count_max | Output for Z order count minimum |
| result_t vi_isds_get_z_order_count_min | ( | uint64_t | layer_id, |
| int64_t * | z_count_min | ||
| ) |
ISystemDisplayServices - Get Z order count minimum.
| layer_id | Layer ID |
| z_count_min | Output for Z order count minimum |
| result_t vi_isds_set_layer_position | ( | float | x, |
| float | y, | ||
| uint64_t | layer_id | ||
| ) |
ISystemDisplayServices - Set layer position.
| x | X position |
| y | Y position |
| layer_id | Layer |
| result_t vi_isds_set_layer_size | ( | uint64_t | layer_id, |
| int64_t | width, | ||
| int64_t | height | ||
| ) |
ISystemDisplayServices - Set layer size.
| layer_id | Layer |
| width | Width |
| height | Height |
| result_t vi_isds_set_layer_visibility | ( | bool | visible, |
| uint64_t | layer_id | ||
| ) |
ISystemDisplayServices - Set layer visibility.
| visible | Is visible? |
| layer_id | Layer |
| result_t vi_isds_set_layer_z | ( | uint64_t | layer_id, |
| int64_t | z | ||
| ) |
ISystemDisplayServices - Set layer Z order.
| layer_id | Layer |
| z | Z order |
Open display.
| name | Name of display to open |
| out | Structure to initialize |
Default is usually a good option for which display to open.
| result_t vi_open_layer | ( | const char * | display_name, |
| uint64_t | layer_id, | ||
| aruid_t | aruid, | ||
| igbp_t * | igbp | ||
| ) |
Open a managed layer.
| display_name | Name of display |
| layer_id | ID of existing managed layer |
| aruid | Applet resource user ID |
| igbp | IGraphicBufferProducer for the layer |
| result_t vi_transact_parcel | ( | int32_t | handle, |
| uint32_t | transaction, | ||
| uint32_t | flags, | ||
| void * | in_parcel, | ||
| size_t | in_parcel_size, | ||
| void * | out_parcel, | ||
| size_t | out_parcel_size | ||
| ) |
Transact parcel.
| handle | Binder handle |
| transaction | Transaction ID |
| flags | Transaction flags |
| in_parcel | Parcel data |
| in_parcel_size | Size of parcel data |
| out_parcel | Parcel data |
| out_parcel_size | Size of parcel data |
1.8.6