libnx  v4.7.0
Functions
capssu.h File Reference

Application screenshot saving (caps:su) service IPC wrapper. More...

#include "../types.h"
#include "../sf/service.h"
#include "../services/acc.h"
#include "../services/caps.h"

Go to the source code of this file.

Functions

Result capssuInitialize (void)
 Initialize caps:su. Only available on [4.0.0+].
 
void capssuExit (void)
 Exit caps:su.
 
ServicecapssuGetServiceSession (void)
 Gets the Service for caps:su.
 
Result capssuSaveScreenShot (const void *buffer, size_t size, AlbumReportOption reportoption, AlbumImageOrientation orientation, CapsApplicationAlbumEntry *out)
 This is a wrapper for capssuSaveScreenShotEx0. More...
 
Result capssuSaveScreenShotWithUserData (const void *buffer, size_t size, AlbumReportOption reportoption, AlbumImageOrientation orientation, const void *userdata, size_t userdata_size, CapsApplicationAlbumEntry *out)
 Similar to capssuSaveScreenShot, except this is a wrapper for capssuSaveScreenShotEx1. More...
 
Result capssuSaveScreenShotWithUserIds (const void *buffer, size_t size, AlbumReportOption reportoption, AlbumImageOrientation orientation, const AccountUid *uids, size_t uid_count, CapsApplicationAlbumEntry *out)
 Similar to capssuSaveScreenShot, except this is a wrapper for capssuSaveScreenShotEx2. More...
 
Result capssuSaveScreenShotEx0 (const void *buffer, size_t size, const CapsScreenShotAttribute *attr, AlbumReportOption reportoption, CapsApplicationAlbumEntry *out)
 Saves an Album screenshot using the specified gfx data in the buffer, with the specified CapsScreenShotAttribute. More...
 
Result capssuSaveScreenShotEx1 (const void *buffer, size_t size, const CapsScreenShotAttribute *attr, AlbumReportOption reportoption, CapsApplicationData *appdata, CapsApplicationAlbumEntry *out)
 Same as capssuSaveScreenShotEx0, except this allows specifying the CapsApplicationData. More...
 
Result capssuSaveScreenShotEx2 (const void *buffer, size_t size, const CapsScreenShotAttribute *attr, AlbumReportOption reportoption, CapsUserIdList *list, CapsApplicationAlbumEntry *out)
 Same as capssuSaveScreenShotEx0, except this allows specifying the CapsUserIdList. More...
 

Detailed Description

Application screenshot saving (caps:su) service IPC wrapper.

Author
yellows8

Function Documentation

◆ capssuSaveScreenShot()

Result capssuSaveScreenShot ( const void *  buffer,
size_t  size,
AlbumReportOption  reportoption,
AlbumImageOrientation  orientation,
CapsApplicationAlbumEntry out 
)

This is a wrapper for capssuSaveScreenShotEx0.

Note
This uses an all-zero CapsScreenShotAttribute with orientation = input orientation, and unk_xc = 1.
Parameters
[in]bufferRGBA8 1280x720 image buffer.
[in]sizeSize of the buffer.
[in]reportoptionAlbumReportOption
[in]orientationAlbumImageOrientation
[out]outCapsApplicationAlbumEntry. Optional, can be NULL.

◆ capssuSaveScreenShotEx0()

Result capssuSaveScreenShotEx0 ( const void *  buffer,
size_t  size,
const CapsScreenShotAttribute attr,
AlbumReportOption  reportoption,
CapsApplicationAlbumEntry out 
)

Saves an Album screenshot using the specified gfx data in the buffer, with the specified CapsScreenShotAttribute.

Parameters
[in]bufferRGBA8 1280x720 image data buffer.
[in]sizeSize of the buffer, must be at least 0x384000.
[in]attrCapsScreenShotAttribute
[in]reportoptionAlbumReportOption
[out]outCapsApplicationAlbumEntry. Optional, can be NULL.

◆ capssuSaveScreenShotEx1()

Result capssuSaveScreenShotEx1 ( const void *  buffer,
size_t  size,
const CapsScreenShotAttribute attr,
AlbumReportOption  reportoption,
CapsApplicationData appdata,
CapsApplicationAlbumEntry out 
)

Same as capssuSaveScreenShotEx0, except this allows specifying the CapsApplicationData.

Note
Only available on [8.0.0+].
Parameters
[in]bufferRGBA8 1280x720 image data buffer.
[in]sizeSize of the buffer, must be at least 0x384000.
[in]attrCapsScreenShotAttribute
[in]reportoptionAlbumReportOption
[in]appdataCapsApplicationData
[out]outCapsApplicationAlbumEntry. Optional, can be NULL.

◆ capssuSaveScreenShotEx2()

Result capssuSaveScreenShotEx2 ( const void *  buffer,
size_t  size,
const CapsScreenShotAttribute attr,
AlbumReportOption  reportoption,
CapsUserIdList list,
CapsApplicationAlbumEntry out 
)

Same as capssuSaveScreenShotEx0, except this allows specifying the CapsUserIdList.

Note
Only available on [6.0.0+].
Parameters
[in]bufferRGBA8 1280x720 image data buffer.
[in]sizeSize of the buffer, must be at least 0x384000.
[in]attrCapsScreenShotAttribute
[in]reportoptionAlbumReportOption
[in]listCapsUserIdList
[out]outCapsApplicationAlbumEntry. Optional, can be NULL.

◆ capssuSaveScreenShotWithUserData()

Result capssuSaveScreenShotWithUserData ( const void *  buffer,
size_t  size,
AlbumReportOption  reportoption,
AlbumImageOrientation  orientation,
const void *  userdata,
size_t  userdata_size,
CapsApplicationAlbumEntry out 
)

Similar to capssuSaveScreenShot, except this is a wrapper for capssuSaveScreenShotEx1.

Note
This uses an all-zero CapsScreenShotAttribute with orientation = input orientation, and unk_xc = 1.
Only available on [8.0.0+].
Parameters
[in]bufferRGBA8 1280x720 image data buffer.
[in]sizeSize of the buffer.
[in]reportoptionAlbumReportOption
[in]orientationAlbumImageOrientation
[in]userdataInput UserData buffer. If NULL, the CapsApplicationData will be empty.
[in]userdata_sizeInput UserData size, must be within bounds for CapsApplicationData::userdata. If 0, the CapsApplicationData will be empty.
[out]outCapsApplicationAlbumEntry. Optional, can be NULL.

◆ capssuSaveScreenShotWithUserIds()

Result capssuSaveScreenShotWithUserIds ( const void *  buffer,
size_t  size,
AlbumReportOption  reportoption,
AlbumImageOrientation  orientation,
const AccountUid uids,
size_t  uid_count,
CapsApplicationAlbumEntry out 
)

Similar to capssuSaveScreenShot, except this is a wrapper for capssuSaveScreenShotEx2.

Note
This uses an all-zero CapsScreenShotAttribute with orientation = input orientation, and unk_xc = 1.
Only available on [6.0.0+].
Parameters
[in]bufferRGBA8 1280x720 image data buffer.
[in]sizeSize of the buffer.
[in]reportoptionAlbumReportOption
[in]orientationAlbumImageOrientation
[in]uidsInput array of AccountUid. If NULL, the CapsUserIdList will be empty.
[in]uid_countSize of the uids array in entries, must be within bounds for CapsUserIdList::uids. If 0, the CapsUserIdList will be empty.
[out]outCapsApplicationAlbumEntry. Optional, can be NULL.