libnx  v4.8.0
Data Structures | Typedefs | Enumerations | Functions
vi.h File Reference

Display (vi:*) service IPC wrapper. More...

#include "../types.h"
#include "../kernel/event.h"
#include "../sf/service.h"
#include "pl.h"

Go to the source code of this file.

Data Structures

struct  ViDisplayName
 
struct  ViDisplay
 
struct  ViLayer
 

Typedefs

typedef u16 ViColorRgba4444
 Used as argument for certain drawing commands.
 
typedef u32 ViColorRgba8888
 

Enumerations

enum  ViServiceType {
  ViServiceType_Default = -1 ,
  ViServiceType_Application = 0 ,
  ViServiceType_System = 1 ,
  ViServiceType_Manager = 2
}
 
enum  ViLayerFlags { ViLayerFlags_Default = 0x1 }
 Used by viCreateLayer when CreateStrayLayer is used internally.
 
enum  ViScalingMode {
  ViScalingMode_None = 0x0 ,
  ViScalingMode_FitToLayer = 0x2 ,
  ViScalingMode_PreserveAspectRatio = 0x4 ,
  ViScalingMode_Default = ViScalingMode_FitToLayer
}
 Used with viSetLayerScalingMode.
 
enum  ViPowerState {
  ViPowerState_Off = 0 ,
  ViPowerState_NotScanning = 1 ,
  ViPowerState_On = 2 ,
  ViPowerState_On_Deprecated = 1
}
 Used with viSetDisplayPowerState. More...
 
enum  ViLayerStack {
  ViLayerStack_Default = 0 ,
  ViLayerStack_Lcd = 1 ,
  ViLayerStack_Screenshot = 2 ,
  ViLayerStack_Recording = 3 ,
  ViLayerStack_LastFrame = 4 ,
  ViLayerStack_Arbitrary = 5 ,
  ViLayerStack_ApplicationForDebug = 6 ,
  ViLayerStack_Null = 10
}
 Used as argument to many capture functions. More...
 

Functions

Result viInitialize (ViServiceType service_type)
 
void viExit (void)
 
ServiceviGetSession_IApplicationDisplayService (void)
 
ServiceviGetSession_IHOSBinderDriverRelay (void)
 
ServiceviGetSession_ISystemDisplayService (void)
 
ServiceviGetSession_IManagerDisplayService (void)
 
ServiceviGetSession_IHOSBinderDriverIndirect (void)
 
Result viSetContentVisibility (bool v)
 
Result viOpenDisplay (const char *display_name, ViDisplay *display)
 
Result viCloseDisplay (ViDisplay *display)
 
static Result viOpenDefaultDisplay (ViDisplay *display)
 
Result viGetDisplayResolution (ViDisplay *display, s32 *width, s32 *height)
 
Result viGetDisplayLogicalResolution (ViDisplay *display, s32 *width, s32 *height)
 
Result viSetDisplayMagnification (ViDisplay *display, s32 x, s32 y, s32 width, s32 height)
 Only available on [3.0.0+].
 
Result viGetDisplayVsyncEvent (ViDisplay *display, Event *event_out)
 
Result viSetDisplayPowerState (ViDisplay *display, ViPowerState state)
 
Result viSetDisplayAlpha (ViDisplay *display, float alpha)
 
Result viGetZOrderCountMin (ViDisplay *display, s32 *z)
 
Result viGetZOrderCountMax (ViDisplay *display, s32 *z)
 
Result viCreateLayer (const ViDisplay *display, ViLayer *layer)
 
Result viCreateManagedLayer (const ViDisplay *display, ViLayerFlags layer_flags, u64 aruid, u64 *layer_id)
 
Result viSetLayerSize (ViLayer *layer, s32 width, s32 height)
 
Result viSetLayerZ (ViLayer *layer, s32 z)
 
Result viSetLayerPosition (ViLayer *layer, float x, float y)
 
Result viCloseLayer (ViLayer *layer)
 
Result viDestroyManagedLayer (ViLayer *layer)
 
Result viSetLayerScalingMode (ViLayer *layer, ViScalingMode scaling_mode)
 
Result viGetIndirectLayerImageMap (void *buffer, size_t size, s32 width, s32 height, u64 IndirectLayerConsumerHandle, u64 *out_size, u64 *out_stride)
 
Result viGetIndirectLayerImageRequiredMemoryInfo (s32 width, s32 height, u64 *out_size, u64 *out_alignment)
 
Result viManagerPrepareFatal (void)
 [16.0.0+]
 
Result viManagerShowFatal (void)
 [16.0.0+]
 
Result viManagerDrawFatalRectangle (s32 x, s32 y, s32 end_x, s32 end_y, ViColorRgba4444 color)
 [16.0.0+]
 
Result viManagerDrawFatalText32 (s32 *out_advance, s32 x, s32 y, const u32 *utf32_codepoints, size_t num_codepoints, float scale_x, float scale_y, PlSharedFontType font_type, ViColorRgba8888 bg_color, ViColorRgba8888 fg_color, s32 initial_advance)
 [16.0.0+]
 

Detailed Description

Display (vi:*) service IPC wrapper.

Author
yellows8

Enumeration Type Documentation

◆ ViLayerStack

Used as argument to many capture functions.

Enumerator
ViLayerStack_Default 

Default layer stack, includes all layers.

ViLayerStack_Lcd 

Includes only layers for the LCD.

ViLayerStack_Screenshot 

Includes only layers for user screenshots.

ViLayerStack_Recording 

Includes only layers for recording videos.

ViLayerStack_LastFrame 

Includes only layers for the last applet-transition frame.

ViLayerStack_Arbitrary 

Captures some arbitrary layer. This is normally only for am.

ViLayerStack_ApplicationForDebug 

Captures layers for the current application. This is normally used by creport/debugging tools.

ViLayerStack_Null 

Layer stack for the empty display.

◆ ViPowerState

Used with viSetDisplayPowerState.

Enumerator
ViPowerState_Off 

Screen is off.

ViPowerState_NotScanning 

[3.0.0+] Screen is on, but not scanning content.

ViPowerState_On 

[3.0.0+] Screen is on.

ViPowerState_On_Deprecated 

[1.0.0 - 2.3.0] Screen is on.