libnx  v4.2.2
pl.h
Go to the documentation of this file.
1 /**
2  * @file pl.h
3  * @brief pl:u service IPC wrapper.
4  * @author yellows8
5  * @copyright libnx Authors
6  */
7 #pragma once
8 #include "../types.h"
9 #include "../sf/service.h"
10 
11 typedef enum {
12  PlServiceType_User = 0, ///< Initializes pl:u.
13  PlServiceType_System = 1, ///< Initializes pl:s.
15 
16 /// SharedFontType
17 typedef enum {
18  PlSharedFontType_Standard = 0, ///< Japan, US and Europe
19  PlSharedFontType_ChineseSimplified = 1, ///< Chinese Simplified
20  PlSharedFontType_ExtChineseSimplified = 2, ///< Extended Chinese Simplified
21  PlSharedFontType_ChineseTraditional = 3, ///< Chinese Traditional
22  PlSharedFontType_KO = 4, ///< Korean (Hangul)
23  PlSharedFontType_NintendoExt = 5, ///< Nintendo Extended. This font only has the special Nintendo-specific characters, which aren't available with the other fonts.
24  PlSharedFontType_Total, ///< Total fonts supported by this enum.
26 
27 /// FontData
28 typedef struct {
29  u32 type; ///< \ref PlSharedFontType
30  u32 offset; ///< Offset of the font in sharedmem.
31  u32 size; ///< Size of the font.
32  void* address; ///< Address of the actual font.
33 } PlFontData;
34 
35 /// Initialize pl.
36 Result plInitialize(PlServiceType service_type);
37 
38 /// Exit pl.
39 void plExit(void);
40 
41 /// Gets the Service object for the actual pl service session.
43 
44 /// Gets the address of the SharedMemory.
45 void* plGetSharedmemAddr(void);
46 
47 ///< Gets a specific shared-font via \ref PlSharedFontType.
49 
50 ///< Gets shared font(s).
51 Result plGetSharedFont(u64 LanguageCode, PlFontData* fonts, s32 max_fonts, s32* total_fonts);
52 
PlFontData::size
u32 size
Size of the font.
Definition: pl.h:31
plGetSharedmemAddr
void * plGetSharedmemAddr(void)
Gets the address of the SharedMemory.
PlSharedFontType_NintendoExt
@ PlSharedFontType_NintendoExt
Nintendo Extended. This font only has the special Nintendo-specific characters, which aren't availabl...
Definition: pl.h:23
PlServiceType_User
@ PlServiceType_User
Initializes pl:u.
Definition: pl.h:12
PlSharedFontType_ChineseSimplified
@ PlSharedFontType_ChineseSimplified
Chinese Simplified.
Definition: pl.h:19
s32
int32_t s32
32-bit signed integer.
Definition: types.h:27
PlSharedFontType_Total
@ PlSharedFontType_Total
Total fonts supported by this enum.
Definition: pl.h:24
plExit
void plExit(void)
Exit pl.
plGetSharedFontByType
Result plGetSharedFontByType(PlFontData *font, PlSharedFontType SharedFontType)
Gets shared font(s).
u32
uint32_t u32
32-bit unsigned integer.
Definition: types.h:21
PlSharedFontType_Standard
@ PlSharedFontType_Standard
Japan, US and Europe.
Definition: pl.h:18
u64
uint64_t u64
64-bit unsigned integer.
Definition: types.h:22
Result
u32 Result
Function error code result type.
Definition: types.h:44
PlSharedFontType
PlSharedFontType
SharedFontType.
Definition: pl.h:17
PlFontData::address
void * address
Address of the actual font.
Definition: pl.h:32
PlServiceType
PlServiceType
Definition: pl.h:11
PlFontData::offset
u32 offset
Offset of the font in sharedmem.
Definition: pl.h:30
PlFontData
FontData.
Definition: pl.h:28
Service
Service object structure.
Definition: service.h:13
PlSharedFontType_ChineseTraditional
@ PlSharedFontType_ChineseTraditional
Chinese Traditional.
Definition: pl.h:21
PlFontData::type
u32 type
PlSharedFontType
Definition: pl.h:29
plGetServiceSession
Service * plGetServiceSession(void)
Gets the Service object for the actual pl service session.
PlSharedFontType_KO
@ PlSharedFontType_KO
Korean (Hangul)
Definition: pl.h:22
PlServiceType_System
@ PlServiceType_System
Initializes pl:s.
Definition: pl.h:13
PlSharedFontType_ExtChineseSimplified
@ PlSharedFontType_ExtChineseSimplified
Extended Chinese Simplified.
Definition: pl.h:20
plInitialize
Result plInitialize(PlServiceType service_type)
Initialize pl.