libnx
Data Structures | Typedefs | Enumerations | Functions
applet.h File Reference

Applet (applet) service IPC wrapper. More...

#include "../types.h"

Go to the source code of this file.

Data Structures

struct  AppletHookCookie
 applet hook cookie. More...
 

Typedefs

typedef void(* AppletHookFn) (AppletHookType hook, void *param)
 applet hook function.
 

Enumerations

enum  AppletType {
  AppletType_None = -2,
  AppletType_Default = -1,
  AppletType_Application = 0,
  AppletType_SystemApplet = 1,
  AppletType_LibraryApplet = 2,
  AppletType_OverlayApplet = 3,
  AppletType_SystemApplication = 4
}
 
enum  AppletOperationMode {
  AppletOperationMode_Handheld = 0,
  AppletOperationMode_Docked = 1
}
 
enum  AppletHookType {
  AppletHookType_OnFocusState = 0,
  AppletHookType_OnOperationMode,
  AppletHookType_OnPerformanceMode,
  AppletHookType_Max
}
 applet hook types. More...
 

Functions

Result appletInitialize (void)
 
void appletExit (void)
 
Result appletGetAppletResourceUserId (u64 *out)
 
void appletNotifyRunning (u8 *out)
 
Result appletCreateManagedDisplayLayer (u64 *out)
 
Result appletGetDesiredLanguage (u64 *LanguageCode)
 
Result appletSetScreenShotPermission (s32 val)
 Controls whether screenshot-capture is allowed. More...
 
Result appletSetScreenShotImageOrientation (s32 val)
 
bool appletMainLoop (void)
 Processes the current applet status. More...
 
void appletHook (AppletHookCookie *cookie, AppletHookFn callback, void *param)
 Sets up an applet status hook. More...
 
void appletUnhook (AppletHookCookie *cookie)
 Removes an applet status hook. More...
 
u8 appletGetOperationMode (void)
 These return state which is updated by appletMainLoop() when notifications are received.
 
u32 appletGetPerformanceMode (void)
 
u8 appletGetFocusState (void)
 

Detailed Description

Applet (applet) service IPC wrapper.

Author
yellows8

Enumeration Type Documentation

applet hook types.

Enumerator
AppletHookType_OnFocusState 

FocusState changed.

AppletHookType_OnOperationMode 

OperationMode changed.

AppletHookType_OnPerformanceMode 

PerformanceMode changed.

AppletHookType_Max 

Number of applet hook types.

Function Documentation

void appletHook ( AppletHookCookie cookie,
AppletHookFn  callback,
void *  param 
)

Sets up an applet status hook.

Parameters
cookieHook cookie to use.
callbackFunction to call when applet's status changes.
paramUser-defined parameter to pass to the callback.
bool appletMainLoop ( void  )

Processes the current applet status.

Generally used within a main loop.

Returns
Whether the application should continue running.
Result appletSetScreenShotPermission ( s32  val)

Controls whether screenshot-capture is allowed.

Parameters
val0 = disable, 1 = enable.
void appletUnhook ( AppletHookCookie cookie)

Removes an applet status hook.

Parameters
cookieHook cookie to remove.