@@ -48,6 +48,23 @@ pub enum UtilityDialogButtonAccept {
48
48
Cross ,
49
49
}
50
50
51
+ #[ repr( u32 ) ]
52
+ #[ derive( Debug , Clone , Copy , TryFromPrimitive ) ]
53
+ /// Return-values for the various `sceUtility***GetStatus()` functions, when they don't return an error.
54
+ ///
55
+ /// # Example
56
+ ///
57
+ /// ```no_run
58
+ /// let status: PspUtilityDialogState = unsafe { sceUtilityOskGetStatus().try_into().unwrap() };
59
+ /// ```
60
+ pub enum PspUtilityDialogState {
61
+ None ,
62
+ Init ,
63
+ Visible ,
64
+ Quit ,
65
+ Finished ,
66
+ }
67
+
51
68
#[ repr( u32 ) ]
52
69
#[ derive( Debug , Clone , Copy ) ]
53
70
pub enum SceUtilityOskInputLanguage {
@@ -695,8 +712,8 @@ pub struct SceUtilityOskParams {
695
712
pub datacount : i32 ,
696
713
/// Pointer to the start of the data for the input fields
697
714
pub data : * mut SceUtilityOskData ,
698
- /// The local OSK state, one of `SceUtilityOskState`
699
- pub state : SceUtilityOskState ,
715
+ /// The local OSK state, one of [`PspUtilityDialogState`]
716
+ pub state : PspUtilityDialogState ,
700
717
/// Unknown. Pass 0
701
718
pub unk_60 : i32 ,
702
719
}
@@ -783,7 +800,7 @@ psp_extern! {
783
800
///
784
801
/// # Return Value
785
802
///
786
- /// one of DialogState on success, < 0 on error
803
+ /// one of [`PspUtilityDialogState`] on success, < 0 on error
787
804
pub fn sceUtilityNetconfGetStatus( ) -> i32 ;
788
805
789
806
#[ psp( 0x5EEE6548 ) ]
@@ -1033,9 +1050,23 @@ psp_extern! {
1033
1050
#[ psp( 0xF3F76017 ) ]
1034
1051
/// Get the status of a on-screen keyboard currently active.
1035
1052
///
1053
+ /// # Example
1054
+ ///
1055
+ /// ```
1056
+ /// unsafe {
1057
+ /// let status: PspUtilityDialogState = sceUtilityOskGetStatus().try_into().unwrap();
1058
+ /// match status {
1059
+ /// PspUtilityDialogState::Visible => {
1060
+ /// // do something
1061
+ /// }
1062
+ /// // ...
1063
+ /// }
1064
+ /// }
1065
+ /// ```
1066
+ ///
1036
1067
/// # Return Value
1037
1068
///
1038
- /// the current status of the keyboard. See ::DialogState for details.
1069
+ /// the current status of the keyboard. See [`PspUtilityDialogState`] for details.
1039
1070
pub fn sceUtilityOskGetStatus( ) -> i32 ;
1040
1071
1041
1072
#[ psp( 0x1579a159 ) ]
0 commit comments