1 //! PSP C type definitions 2 //! 3 //! These type declarations are not enough, as they must be ultimately resolved 4 //! by the linker. Crates that use these definitions must, somewhere in the 5 //! crate graph, include a stub provider crate such as the `psp` crate. 6 7 pub type c_schar = i8; 8 pub type c_uchar = u8; 9 pub type c_short = i16; 10 pub type c_ushort = u16; 11 pub type c_int = i32; 12 pub type c_uint = u32; 13 pub type c_float = f32; 14 pub type c_double = f64; 15 pub type c_longlong = i64; 16 pub type c_ulonglong = u64; 17 pub type intmax_t = i64; 18 pub type uintmax_t = u64; 19 20 pub type size_t = usize; 21 pub type ptrdiff_t = isize; 22 pub type intptr_t = isize; 23 pub type uintptr_t = usize; 24 pub type ssize_t = isize; 25 26 pub type c_char = u8; 27 pub type c_long = i64; 28 pub type c_ulong = u64; 29 30 cfg_if! { 31 if #[cfg(libc_core_cvoid)] { 32 pub use ::ffi::c_void; 33 } else { 34 // Use repr(u8) as LLVM expects `void*` to be the same as `i8*` to help 35 // enable more optimization opportunities around it recognizing things 36 // like malloc/free. 37 #[repr(u8)] 38 #[allow(missing_copy_implementations)] 39 #[allow(missing_debug_implementations)] 40 pub enum c_void { 41 // Two dummy variants so the #[repr] attribute can be used. 42 #[doc(hidden)] 43 __variant1, 44 #[doc(hidden)] 45 __variant2, 46 } 47 } 48 } 49 50 pub type SceKernelVTimerHandler = unsafe extern "C" fn( 51 uid: SceUid, 52 arg1: *mut SceKernelSysClock, 53 arg2: *mut SceKernelSysClock, 54 arg3: *mut c_void, 55 ) -> u32; 56 57 pub type SceKernelVTimerHandlerWide = unsafe extern "C" fn( 58 uid: SceUid, 59 arg1: i64, 60 arg2: i64, 61 arg3: *mut c_void, 62 ) -> u32; 63 64 pub type SceKernelThreadEventHandler = 65 unsafe extern "C" fn(mask: i32, thid: SceUid, common: *mut c_void) -> i32; 66 67 pub type SceKernelAlarmHandler = 68 unsafe extern "C" fn(common: *mut c_void) -> u32; 69 70 pub type SceKernelCallbackFunction = 71 unsafe extern "C" fn(arg1: i32, arg2: i32, arg: *mut c_void) -> i32; 72 73 pub type SceKernelThreadEntry = 74 unsafe extern "C" fn(args: usize, argp: *mut c_void) -> i32; 75 76 pub type PowerCallback = extern "C" fn(unknown: i32, power_info: i32); 77 78 pub type IoPermissions = i32; 79 80 pub type UmdCallback = fn(unknown: i32, event: i32) -> i32; 81 82 pub type SceMpegRingbufferCb = ::Option< 83 unsafe extern "C" fn( 84 data: *mut c_void, 85 num_packets: i32, 86 param: *mut c_void, 87 ) -> i32, 88 >; 89 90 pub type GuCallback = ::Option<extern "C" fn(id: i32, arg: *mut c_void)>; 91 pub type GuSwapBuffersCallback = ::Option< 92 extern "C" fn(display: *mut *mut c_void, render: *mut *mut c_void), 93 >; 94 95 pub type SceNetAdhocctlHandler = ::Option< 96 unsafe extern "C" fn(flag: i32, error: i32, unknown: *mut c_void), 97 >; 98 99 pub type AdhocMatchingCallback = ::Option< 100 unsafe extern "C" fn( 101 matching_id: i32, 102 event: i32, 103 mac: *mut u8, 104 opt_len: i32, 105 opt_data: *mut c_void, 106 ), 107 >; 108 109 pub type SceNetApctlHandler = ::Option< 110 unsafe extern "C" fn( 111 oldState: i32, 112 newState: i32, 113 event: i32, 114 error: i32, 115 pArg: *mut c_void, 116 ), 117 >; 118 119 pub type HttpMallocFunction = 120 ::Option<unsafe extern "C" fn(size: usize) -> *mut c_void>; 121 pub type HttpReallocFunction = 122 ::Option<unsafe extern "C" fn(p: *mut c_void, size: usize) -> *mut c_void>; 123 pub type HttpFreeFunction = ::Option<unsafe extern "C" fn(p: *mut c_void)>; 124 pub type HttpPasswordCB = ::Option< 125 unsafe extern "C" fn( 126 request: i32, 127 auth_type: HttpAuthType, 128 realm: *const u8, 129 username: *mut u8, 130 password: *mut u8, 131 need_entity: i32, 132 entity_body: *mut *mut u8, 133 entity_size: *mut usize, 134 save: *mut i32, 135 ) -> i32, 136 >; 137 138 pub type socklen_t = u32; 139 140 e! { 141 #[repr(u32)] 142 pub enum AudioFormat { 143 Stereo = 0, 144 Mono = 0x10, 145 } 146 147 #[repr(u32)] 148 pub enum DisplayMode { 149 Lcd = 0, 150 } 151 152 #[repr(u32)] 153 pub enum DisplayPixelFormat { 154 Psm5650 = 0, 155 Psm5551 = 1, 156 Psm4444 = 2, 157 Psm8888 = 3, 158 } 159 160 #[repr(u32)] 161 pub enum DisplaySetBufSync { 162 Immediate = 0, 163 NextFrame = 1, 164 } 165 166 #[repr(i32)] 167 pub enum AudioOutputFrequency { 168 Khz48 = 48000, 169 Khz44_1 = 44100, 170 Khz32 = 32000, 171 Khz24 = 24000, 172 Khz22_05 = 22050, 173 Khz16 = 16000, 174 Khz12 = 12000, 175 Khz11_025 = 11025, 176 Khz8 = 8000, 177 } 178 179 #[repr(i32)] 180 pub enum AudioInputFrequency { 181 Khz44_1 = 44100, 182 Khz22_05 = 22050, 183 Khz11_025 = 11025, 184 } 185 186 #[repr(u32)] 187 pub enum CtrlMode { 188 Digital = 0, 189 Analog, 190 } 191 192 #[repr(i32)] 193 pub enum GeMatrixType { 194 Bone0 = 0, 195 Bone1, 196 Bone2, 197 Bone3, 198 Bone4, 199 Bone5, 200 Bone6, 201 Bone7, 202 World, 203 View, 204 Projection, 205 TexGen, 206 } 207 208 #[repr(i32)] 209 pub enum GeListState { 210 Done = 0, 211 Queued, 212 DrawingDone, 213 StallReached, 214 CancelDone, 215 } 216 217 #[repr(u8)] 218 pub enum GeCommand { 219 Nop = 0, 220 Vaddr = 0x1, 221 Iaddr = 0x2, 222 Prim = 0x4, 223 Bezier = 0x5, 224 Spline = 0x6, 225 BoundingBox = 0x7, 226 Jump = 0x8, 227 BJump = 0x9, 228 Call = 0xa, 229 Ret = 0xb, 230 End = 0xc, 231 Signal = 0xe, 232 Finish = 0xf, 233 Base = 0x10, 234 VertexType = 0x12, 235 OffsetAddr = 0x13, 236 Origin = 0x14, 237 Region1 = 0x15, 238 Region2 = 0x16, 239 LightingEnable = 0x17, 240 LightEnable0 = 0x18, 241 LightEnable1 = 0x19, 242 LightEnable2 = 0x1a, 243 LightEnable3 = 0x1b, 244 DepthClampEnable = 0x1c, 245 CullFaceEnable = 0x1d, 246 TextureMapEnable = 0x1e, 247 FogEnable = 0x1f, 248 DitherEnable = 0x20, 249 AlphaBlendEnable = 0x21, 250 AlphaTestEnable = 0x22, 251 ZTestEnable = 0x23, 252 StencilTestEnable = 0x24, 253 AntiAliasEnable = 0x25, 254 PatchCullEnable = 0x26, 255 ColorTestEnable = 0x27, 256 LogicOpEnable = 0x28, 257 BoneMatrixNumber = 0x2a, 258 BoneMatrixData = 0x2b, 259 MorphWeight0 = 0x2c, 260 MorphWeight1 = 0x2d, 261 MorphWeight2 = 0x2e, 262 MorphWeight3 = 0x2f, 263 MorphWeight4 = 0x30, 264 MorphWeight5 = 0x31, 265 MorphWeight6 = 0x32, 266 MorphWeight7 = 0x33, 267 PatchDivision = 0x36, 268 PatchPrimitive = 0x37, 269 PatchFacing = 0x38, 270 WorldMatrixNumber = 0x3a, 271 WorldMatrixData = 0x3b, 272 ViewMatrixNumber = 0x3c, 273 ViewMatrixData = 0x3d, 274 ProjMatrixNumber = 0x3e, 275 ProjMatrixData = 0x3f, 276 TGenMatrixNumber = 0x40, 277 TGenMatrixData = 0x41, 278 ViewportXScale = 0x42, 279 ViewportYScale = 0x43, 280 ViewportZScale = 0x44, 281 ViewportXCenter = 0x45, 282 ViewportYCenter = 0x46, 283 ViewportZCenter = 0x47, 284 TexScaleU = 0x48, 285 TexScaleV = 0x49, 286 TexOffsetU = 0x4a, 287 TexOffsetV = 0x4b, 288 OffsetX = 0x4c, 289 OffsetY = 0x4d, 290 ShadeMode = 0x50, 291 ReverseNormal = 0x51, 292 MaterialUpdate = 0x53, 293 MaterialEmissive = 0x54, 294 MaterialAmbient = 0x55, 295 MaterialDiffuse = 0x56, 296 MaterialSpecular = 0x57, 297 MaterialAlpha = 0x58, 298 MaterialSpecularCoef = 0x5b, 299 AmbientColor = 0x5c, 300 AmbientAlpha = 0x5d, 301 LightMode = 0x5e, 302 LightType0 = 0x5f, 303 LightType1 = 0x60, 304 LightType2 = 0x61, 305 LightType3 = 0x62, 306 Light0X = 0x63, 307 Light0Y, 308 Light0Z, 309 Light1X, 310 Light1Y, 311 Light1Z, 312 Light2X, 313 Light2Y, 314 Light2Z, 315 Light3X, 316 Light3Y, 317 Light3Z, 318 Light0DirectionX = 0x6f, 319 Light0DirectionY, 320 Light0DirectionZ, 321 Light1DirectionX, 322 Light1DirectionY, 323 Light1DirectionZ, 324 Light2DirectionX, 325 Light2DirectionY, 326 Light2DirectionZ, 327 Light3DirectionX, 328 Light3DirectionY, 329 Light3DirectionZ, 330 Light0ConstantAtten = 0x7b, 331 Light0LinearAtten, 332 Light0QuadtraticAtten, 333 Light1ConstantAtten, 334 Light1LinearAtten, 335 Light1QuadtraticAtten, 336 Light2ConstantAtten, 337 Light2LinearAtten, 338 Light2QuadtraticAtten, 339 Light3ConstantAtten, 340 Light3LinearAtten, 341 Light3QuadtraticAtten, 342 Light0ExponentAtten = 0x87, 343 Light1ExponentAtten, 344 Light2ExponentAtten, 345 Light3ExponentAtten, 346 Light0CutoffAtten = 0x8b, 347 Light1CutoffAtten, 348 Light2CutoffAtten, 349 Light3CutoffAtten, 350 Light0Ambient = 0x8f, 351 Light0Diffuse, 352 Light0Specular, 353 Light1Ambient, 354 Light1Diffuse, 355 Light1Specular, 356 Light2Ambient, 357 Light2Diffuse, 358 Light2Specular, 359 Light3Ambient, 360 Light3Diffuse, 361 Light3Specular, 362 Cull = 0x9b, 363 FrameBufPtr = 0x9c, 364 FrameBufWidth = 0x9d, 365 ZBufPtr = 0x9e, 366 ZBufWidth = 0x9f, 367 TexAddr0 = 0xa0, 368 TexAddr1, 369 TexAddr2, 370 TexAddr3, 371 TexAddr4, 372 TexAddr5, 373 TexAddr6, 374 TexAddr7, 375 TexBufWidth0 = 0xa8, 376 TexBufWidth1, 377 TexBufWidth2, 378 TexBufWidth3, 379 TexBufWidth4, 380 TexBufWidth5, 381 TexBufWidth6, 382 TexBufWidth7, 383 ClutAddr = 0xb0, 384 ClutAddrUpper = 0xb1, 385 TransferSrc, 386 TransferSrcW, 387 TransferDst, 388 TransferDstW, 389 TexSize0 = 0xb8, 390 TexSize1, 391 TexSize2, 392 TexSize3, 393 TexSize4, 394 TexSize5, 395 TexSize6, 396 TexSize7, 397 TexMapMode = 0xc0, 398 TexShadeLs = 0xc1, 399 TexMode = 0xc2, 400 TexFormat = 0xc3, 401 LoadClut = 0xc4, 402 ClutFormat = 0xc5, 403 TexFilter = 0xc6, 404 TexWrap = 0xc7, 405 TexLevel = 0xc8, 406 TexFunc = 0xc9, 407 TexEnvColor = 0xca, 408 TexFlush = 0xcb, 409 TexSync = 0xcc, 410 Fog1 = 0xcd, 411 Fog2 = 0xce, 412 FogColor = 0xcf, 413 TexLodSlope = 0xd0, 414 FramebufPixFormat = 0xd2, 415 ClearMode = 0xd3, 416 Scissor1 = 0xd4, 417 Scissor2 = 0xd5, 418 MinZ = 0xd6, 419 MaxZ = 0xd7, 420 ColorTest = 0xd8, 421 ColorRef = 0xd9, 422 ColorTestmask = 0xda, 423 AlphaTest = 0xdb, 424 StencilTest = 0xdc, 425 StencilOp = 0xdd, 426 ZTest = 0xde, 427 BlendMode = 0xdf, 428 BlendFixedA = 0xe0, 429 BlendFixedB = 0xe1, 430 Dith0 = 0xe2, 431 Dith1, 432 Dith2, 433 Dith3, 434 LogicOp = 0xe6, 435 ZWriteDisable = 0xe7, 436 MaskRgb = 0xe8, 437 MaskAlpha = 0xe9, 438 TransferStart = 0xea, 439 TransferSrcPos = 0xeb, 440 TransferDstPos = 0xec, 441 TransferSize = 0xee, 442 Vscx = 0xf0, 443 Vscy = 0xf1, 444 Vscz = 0xf2, 445 Vtcs = 0xf3, 446 Vtct = 0xf4, 447 Vtcq = 0xf5, 448 Vcv = 0xf6, 449 Vap = 0xf7, 450 Vfc = 0xf8, 451 Vscv = 0xf9, 452 453 Unknown03 = 0x03, 454 Unknown0D = 0x0d, 455 Unknown11 = 0x11, 456 Unknown29 = 0x29, 457 Unknown34 = 0x34, 458 Unknown35 = 0x35, 459 Unknown39 = 0x39, 460 Unknown4E = 0x4e, 461 Unknown4F = 0x4f, 462 Unknown52 = 0x52, 463 Unknown59 = 0x59, 464 Unknown5A = 0x5a, 465 UnknownB6 = 0xb6, 466 UnknownB7 = 0xb7, 467 UnknownD1 = 0xd1, 468 UnknownED = 0xed, 469 UnknownEF = 0xef, 470 UnknownFA = 0xfa, 471 UnknownFB = 0xfb, 472 UnknownFC = 0xfc, 473 UnknownFD = 0xfd, 474 UnknownFE = 0xfe, 475 NopFF = 0xff, 476 } 477 478 #[repr(i32)] 479 pub enum SceSysMemPartitionId { 480 SceKernelUnknownPartition = 0, 481 SceKernelPrimaryKernelPartition = 1, 482 SceKernelPrimaryUserPartition = 2, 483 SceKernelOtherKernelPartition1 = 3, 484 SceKernelOtherKernelPartition2 = 4, 485 SceKernelVshellPARTITION = 5, 486 SceKernelScUserPartition = 6, 487 SceKernelMeUserPartition = 7, 488 SceKernelExtendedScKernelPartition = 8, 489 SceKernelExtendedSc2KernelPartition = 9, 490 SceKernelExtendedMeKernelPartition = 10, 491 SceKernelVshellKernelPartition = 11, 492 SceKernelExtendedKernelPartition = 12, 493 } 494 495 #[repr(i32)] 496 pub enum SceSysMemBlockTypes { 497 Low = 0, 498 High, 499 Addr, 500 } 501 502 #[repr(u32)] 503 pub enum Interrupt { 504 Gpio = 4, 505 Ata = 5, 506 Umd = 6, 507 Mscm0 = 7, 508 Wlan = 8, 509 Audio = 10, 510 I2c = 12, 511 Sircs = 14, 512 Systimer0 = 15, 513 Systimer1 = 16, 514 Systimer2 = 17, 515 Systimer3 = 18, 516 Thread0 = 19, 517 Nand = 20, 518 Dmacplus = 21, 519 Dma0 = 22, 520 Dma1 = 23, 521 Memlmd = 24, 522 Ge = 25, 523 Vblank = 30, 524 Mecodec = 31, 525 Hpremote = 36, 526 Mscm1 = 60, 527 Mscm2 = 61, 528 Thread1 = 65, 529 Interrupt = 66, 530 } 531 532 #[repr(u32)] 533 pub enum SubInterrupt { 534 Gpio = Interrupt::Gpio as u32, 535 Ata = Interrupt::Ata as u32, 536 Umd = Interrupt::Umd as u32, 537 Dmacplus = Interrupt::Dmacplus as u32, 538 Ge = Interrupt::Ge as u32, 539 Display = Interrupt::Vblank as u32, 540 } 541 542 #[repr(u32)] 543 pub enum SceKernelIdListType { 544 Thread = 1, 545 Semaphore = 2, 546 EventFlag = 3, 547 Mbox = 4, 548 Vpl = 5, 549 Fpl = 6, 550 Mpipe = 7, 551 Callback = 8, 552 ThreadEventHandler = 9, 553 Alarm = 10, 554 VTimer = 11, 555 SleepThread = 64, 556 DelayThread = 65, 557 SuspendThread = 66, 558 DormantThread = 67, 559 } 560 561 #[repr(i32)] 562 pub enum UsbCamResolution { 563 Px160_120 = 0, 564 Px176_144 = 1, 565 Px320_240 = 2, 566 Px352_288 = 3, 567 Px640_480 = 4, 568 Px1024_768 = 5, 569 Px1280_960 = 6, 570 Px480_272 = 7, 571 Px360_272 = 8, 572 } 573 574 #[repr(i32)] 575 pub enum UsbCamResolutionEx { 576 Px160_120 = 0, 577 Px176_144 = 1, 578 Px320_240 = 2, 579 Px352_288 = 3, 580 Px360_272 = 4, 581 Px480_272 = 5, 582 Px640_480 = 6, 583 Px1024_768 = 7, 584 Px1280_960 = 8, 585 } 586 587 #[repr(i32)] 588 pub enum UsbCamDelay { 589 NoDelay = 0, 590 Delay10Sec = 1, 591 Delay20Sec = 2, 592 Delay30Sec = 3, 593 } 594 595 #[repr(i32)] 596 pub enum UsbCamFrameRate { 597 Fps3_75 = 0, 598 Fps5 = 1, 599 Fps7_5 = 2, 600 Fps10 = 3, 601 Fps15 = 4, 602 Fps20 = 5, 603 Fps30 = 6, 604 Fps60 = 7, 605 } 606 607 #[repr(i32)] 608 pub enum UsbCamWb { 609 Auto = 0, 610 Daylight = 1, 611 Fluorescent = 2, 612 Incadescent = 3, 613 } 614 615 #[repr(i32)] 616 pub enum UsbCamEffectMode { 617 Normal = 0, 618 Negative = 1, 619 Blackwhite = 2, 620 Sepia = 3, 621 Blue = 4, 622 Red = 5, 623 Green = 6, 624 } 625 626 #[repr(i32)] 627 pub enum UsbCamEvLevel { 628 Pos2_0 = 0, 629 Pos1_7 = 1, 630 Pos1_5 = 2, 631 Pos1_3 = 3, 632 Pos1_0 = 4, 633 Pos0_7 = 5, 634 Pos0_5 = 6, 635 Pos0_3 = 7, 636 Zero = 8, 637 Neg0_3, 638 Neg0_5, 639 Neg0_7, 640 Neg1_0, 641 Neg1_3, 642 Neg1_5, 643 Neg1_7, 644 Neg2_0, 645 } 646 647 #[repr(i32)] 648 pub enum RtcCheckValidError { 649 InvalidYear = -1, 650 InvalidMonth = -2, 651 InvalidDay = -3, 652 InvalidHour = -4, 653 InvalidMinutes = -5, 654 InvalidSeconds = -6, 655 InvalidMicroseconds = -7, 656 } 657 658 #[repr(u32)] 659 pub enum PowerTick { 660 All = 0, 661 Suspend = 1, 662 Display = 6, 663 } 664 665 #[repr(u32)] 666 pub enum IoAssignPerms { 667 RdWr = 0, 668 RdOnly = 1, 669 } 670 671 #[repr(u32)] 672 pub enum IoWhence { 673 Set = 0, 674 Cur = 1, 675 End = 2, 676 } 677 678 #[repr(u32)] 679 pub enum UmdType { 680 Game = 0x10, 681 Video = 0x20, 682 Audio = 0x40, 683 } 684 685 #[repr(u32)] 686 pub enum GuPrimitive { 687 Points = 0, 688 Lines = 1, 689 LineStrip = 2, 690 Triangles = 3, 691 TriangleStrip = 4, 692 TriangleFan = 5, 693 Sprites = 6, 694 } 695 696 #[repr(u32)] 697 pub enum PatchPrimitive { 698 Points = 0, 699 LineStrip = 2, 700 TriangleStrip = 4, 701 } 702 703 #[repr(u32)] 704 pub enum GuState { 705 AlphaTest = 0, 706 DepthTest = 1, 707 ScissorTest = 2, 708 StencilTest = 3, 709 Blend = 4, 710 CullFace = 5, 711 Dither = 6, 712 Fog = 7, 713 ClipPlanes = 8, 714 Texture2D = 9, 715 Lighting = 10, 716 Light0 = 11, 717 Light1 = 12, 718 Light2 = 13, 719 Light3 = 14, 720 LineSmooth = 15, 721 PatchCullFace = 16, 722 ColorTest = 17, 723 ColorLogicOp = 18, 724 FaceNormalReverse = 19, 725 PatchFace = 20, 726 Fragment2X = 21, 727 } 728 729 #[repr(u32)] 730 pub enum MatrixMode { 731 Projection = 0, 732 View = 1, 733 Model = 2, 734 Texture = 3, 735 } 736 737 #[repr(u32)] 738 pub enum TexturePixelFormat { 739 Psm5650 = 0, 740 Psm5551 = 1, 741 Psm4444 = 2, 742 Psm8888 = 3, 743 PsmT4 = 4, 744 PsmT8 = 5, 745 PsmT16 = 6, 746 PsmT32 = 7, 747 PsmDxt1 = 8, 748 PsmDxt3 = 9, 749 PsmDxt5 = 10, 750 } 751 752 #[repr(u32)] 753 pub enum SplineMode { 754 FillFill = 0, 755 OpenFill = 1, 756 FillOpen = 2, 757 OpenOpen = 3, 758 } 759 760 #[repr(u32)] 761 pub enum ShadingModel { 762 Flat = 0, 763 Smooth = 1, 764 } 765 766 #[repr(u32)] 767 pub enum LogicalOperation { 768 Clear = 0, 769 And = 1, 770 AndReverse = 2, 771 Copy = 3, 772 AndInverted = 4, 773 Noop = 5, 774 Xor = 6, 775 Or = 7, 776 Nor = 8, 777 Equiv = 9, 778 Inverted = 10, 779 OrReverse = 11, 780 CopyInverted = 12, 781 OrInverted = 13, 782 Nand = 14, 783 Set = 15, 784 } 785 786 #[repr(u32)] 787 pub enum TextureFilter { 788 Nearest = 0, 789 Linear = 1, 790 NearestMipmapNearest = 4, 791 LinearMipmapNearest = 5, 792 NearestMipmapLinear = 6, 793 LinearMipmapLinear = 7, 794 } 795 796 #[repr(u32)] 797 pub enum TextureMapMode { 798 TextureCoords = 0, 799 TextureMatrix = 1, 800 EnvironmentMap = 2, 801 } 802 803 #[repr(u32)] 804 pub enum TextureLevelMode { 805 Auto = 0, 806 Const = 1, 807 Slope = 2, 808 } 809 810 #[repr(u32)] 811 pub enum TextureProjectionMapMode { 812 Position = 0, 813 Uv = 1, 814 NormalizedNormal = 2, 815 Normal = 3, 816 } 817 818 #[repr(u32)] 819 pub enum GuTexWrapMode { 820 Repeat = 0, 821 Clamp = 1, 822 } 823 824 #[repr(u32)] 825 pub enum FrontFaceDirection { 826 Clockwise = 0, 827 CounterClockwise = 1, 828 } 829 830 #[repr(u32)] 831 pub enum AlphaFunc { 832 Never = 0, 833 Always, 834 Equal, 835 NotEqual, 836 Less, 837 LessOrEqual, 838 Greater, 839 GreaterOrEqual, 840 } 841 842 #[repr(u32)] 843 pub enum StencilFunc { 844 Never = 0, 845 Always, 846 Equal, 847 NotEqual, 848 Less, 849 LessOrEqual, 850 Greater, 851 GreaterOrEqual, 852 } 853 854 #[repr(u32)] 855 pub enum ColorFunc { 856 Never = 0, 857 Always, 858 Equal, 859 NotEqual, 860 } 861 862 #[repr(u32)] 863 pub enum DepthFunc { 864 Never = 0, 865 Always, 866 Equal, 867 NotEqual, 868 Less, 869 LessOrEqual, 870 Greater, 871 GreaterOrEqual, 872 } 873 874 #[repr(u32)] 875 pub enum TextureEffect { 876 Modulate = 0, 877 Decal = 1, 878 Blend = 2, 879 Replace = 3, 880 Add = 4, 881 } 882 883 #[repr(u32)] 884 pub enum TextureColorComponent { 885 Rgb = 0, 886 Rgba = 1, 887 } 888 889 #[repr(u32)] 890 pub enum MipmapLevel { 891 None = 0, 892 Level1, 893 Level2, 894 Level3, 895 Level4, 896 Level5, 897 Level6, 898 Level7, 899 } 900 901 #[repr(u32)] 902 pub enum BlendOp { 903 Add = 0, 904 Subtract = 1, 905 ReverseSubtract = 2, 906 Min = 3, 907 Max = 4, 908 Abs = 5, 909 } 910 911 #[repr(u32)] 912 pub enum BlendSrc { 913 SrcColor = 0, 914 OneMinusSrcColor = 1, 915 SrcAlpha = 2, 916 OneMinusSrcAlpha = 3, 917 Fix = 10, 918 } 919 920 #[repr(u32)] 921 pub enum BlendDst { 922 DstColor = 0, 923 OneMinusDstColor = 1, 924 DstAlpha = 4, 925 OneMinusDstAlpha = 5, 926 Fix = 10, 927 } 928 929 #[repr(u32)] 930 pub enum StencilOperation { 931 Keep = 0, 932 Zero = 1, 933 Replace = 2, 934 Invert = 3, 935 Incr = 4, 936 Decr = 5, 937 } 938 939 #[repr(u32)] 940 pub enum LightMode { 941 SingleColor = 0, 942 SeparateSpecularColor = 1, 943 } 944 945 #[repr(u32)] 946 pub enum LightType { 947 Directional = 0, 948 Pointlight = 1, 949 Spotlight = 2, 950 } 951 952 #[repr(u32)] 953 pub enum GuContextType { 954 Direct = 0, 955 Call = 1, 956 Send = 2, 957 } 958 959 #[repr(u32)] 960 pub enum GuQueueMode { 961 Tail = 0, 962 Head = 1, 963 } 964 965 #[repr(u32)] 966 pub enum GuSyncMode { 967 Finish = 0, 968 Signal = 1, 969 Done = 2, 970 List = 3, 971 Send = 4, 972 } 973 974 #[repr(u32)] 975 pub enum GuSyncBehavior { 976 Wait = 0, 977 NoWait = 1, 978 } 979 980 #[repr(u32)] 981 pub enum GuCallbackId { 982 Signal = 1, 983 Finish = 4, 984 } 985 986 #[repr(u32)] 987 pub enum SignalBehavior { 988 Suspend = 1, 989 Continue = 2, 990 } 991 992 #[repr(u32)] 993 pub enum ClutPixelFormat { 994 Psm5650 = 0, 995 Psm5551 = 1, 996 Psm4444 = 2, 997 Psm8888 = 3, 998 } 999 1000 #[repr(C)] 1001 pub enum KeyType { 1002 Directory = 1, 1003 Integer = 2, 1004 String = 3, 1005 Bytes = 4, 1006 } 1007 1008 #[repr(u32)] 1009 pub enum UtilityMsgDialogMode { 1010 Error, 1011 Text, 1012 } 1013 1014 #[repr(u32)] 1015 pub enum UtilityMsgDialogPressed { 1016 Unknown1, 1017 Yes, 1018 No, 1019 Back, 1020 } 1021 1022 #[repr(u32)] 1023 pub enum UtilityDialogButtonAccept { 1024 Circle, 1025 Cross, 1026 } 1027 1028 #[repr(u32)] 1029 pub enum SceUtilityOskInputLanguage { 1030 Default, 1031 Japanese, 1032 English, 1033 French, 1034 Spanish, 1035 German, 1036 Italian, 1037 Dutch, 1038 Portugese, 1039 Russian, 1040 Korean, 1041 } 1042 1043 #[repr(u32)] 1044 pub enum SceUtilityOskInputType { 1045 All, 1046 LatinDigit, 1047 LatinSymbol, 1048 LatinLowercase = 4, 1049 LatinUppercase = 8, 1050 JapaneseDigit = 0x100, 1051 JapaneseSymbol = 0x200, 1052 JapaneseLowercase = 0x400, 1053 JapaneseUppercase = 0x800, 1054 JapaneseHiragana = 0x1000, 1055 JapaneseHalfWidthKatakana = 0x2000, 1056 JapaneseKatakana = 0x4000, 1057 JapaneseKanji = 0x8000, 1058 RussianLowercase = 0x10000, 1059 RussianUppercase = 0x20000, 1060 Korean = 0x40000, 1061 Url = 0x80000, 1062 } 1063 1064 #[repr(u32)] 1065 pub enum SceUtilityOskState { 1066 None, 1067 Initializing, 1068 Initialized, 1069 Visible, 1070 Quit, 1071 Finished, 1072 } 1073 1074 #[repr(u32)] 1075 pub enum SceUtilityOskResult { 1076 Unchanged, 1077 Cancelled, 1078 Changed, 1079 } 1080 1081 #[repr(u32)] 1082 pub enum SystemParamLanguage { 1083 Japanese, 1084 English, 1085 French, 1086 Spanish, 1087 German, 1088 Italian, 1089 Dutch, 1090 Portugese, 1091 Russian, 1092 Korean, 1093 ChineseTraditional, 1094 ChineseSimplified, 1095 } 1096 1097 #[repr(u32)] 1098 pub enum SystemParamId { 1099 StringNickname = 1, 1100 AdhocChannel, 1101 WlanPowerSave, 1102 DateFormat, 1103 TimeFormat, 1104 Timezone, 1105 DaylightSavings, 1106 Language, 1107 Unknown, 1108 } 1109 1110 #[repr(u32)] 1111 pub enum SystemParamAdhocChannel { 1112 ChannelAutomatic = 0, 1113 Channel1 = 1, 1114 Channel6 = 6, 1115 Channel11 = 11, 1116 } 1117 1118 #[repr(u32)] 1119 pub enum SystemParamWlanPowerSaveState { 1120 Off, 1121 On, 1122 } 1123 1124 #[repr(u32)] 1125 pub enum SystemParamDateFormat { 1126 YYYYMMDD, 1127 MMDDYYYY, 1128 DDMMYYYY, 1129 } 1130 1131 #[repr(u32)] 1132 pub enum SystemParamTimeFormat { 1133 Hour24, 1134 Hour12, 1135 } 1136 1137 #[repr(u32)] 1138 pub enum SystemParamDaylightSavings { 1139 Std, 1140 Dst, 1141 } 1142 1143 #[repr(u32)] 1144 pub enum AvModule { 1145 AvCodec, 1146 SasCore, 1147 Atrac3Plus, 1148 MpegBase, 1149 Mp3, 1150 Vaudio, 1151 Aac, 1152 G729, 1153 } 1154 1155 #[repr(u32)] 1156 pub enum Module { 1157 NetCommon = 0x100, 1158 NetAdhoc, 1159 NetInet, 1160 NetParseUri, 1161 NetHttp, 1162 NetSsl, 1163 1164 UsbPspCm = 0x200, 1165 UsbMic, 1166 UsbCam, 1167 UsbGps, 1168 1169 AvCodec = 0x300, 1170 AvSascore, 1171 AvAtrac3Plus, 1172 AvMpegBase, 1173 AvMp3, 1174 AvVaudio, 1175 AvAac, 1176 AvG729, 1177 1178 NpCommon = 0x400, 1179 NpService, 1180 NpMatching2, 1181 NpDrm = 0x500, 1182 1183 Irda = 0x600, 1184 } 1185 1186 #[repr(u32)] 1187 pub enum NetModule { 1188 NetCommon = 1, 1189 NetAdhoc, 1190 NetInet, 1191 NetParseUri, 1192 NetHttp, 1193 NetSsl, 1194 } 1195 1196 #[repr(u32)] 1197 pub enum UsbModule { 1198 UsbPspCm = 1, 1199 UsbAcc, 1200 UsbMic, 1201 UsbCam, 1202 UsbGps, 1203 } 1204 1205 #[repr(u32)] 1206 pub enum NetParam { 1207 Name, 1208 Ssid, 1209 Secure, 1210 WepKey, 1211 IsStaticIp, 1212 Ip, 1213 NetMask, 1214 Route, 1215 ManualDns, 1216 PrimaryDns, 1217 SecondaryDns, 1218 ProxyUser, 1219 ProxyPass, 1220 UseProxy, 1221 ProxyServer, 1222 ProxyPort, 1223 Unknown1, 1224 Unknown2, 1225 } 1226 1227 #[repr(u32)] 1228 pub enum UtilityNetconfAction { 1229 ConnectAP, 1230 DisplayStatus, 1231 ConnectAdhoc, 1232 } 1233 1234 #[repr(u32)] 1235 pub enum UtilitySavedataMode { 1236 AutoLoad, 1237 AutoSave, 1238 Load, 1239 Save, 1240 ListLoad, 1241 ListSave, 1242 ListDelete, 1243 Delete, 1244 } 1245 1246 #[repr(u32)] 1247 pub enum UtilitySavedataFocus { 1248 Unknown1, 1249 FirstList, 1250 LastList, 1251 Latest, 1252 Oldest, 1253 Unknown2, 1254 Unknown3, 1255 FirstEmpty, 1256 LastEmpty, 1257 } 1258 1259 #[repr(u32)] 1260 pub enum UtilityGameSharingMode { 1261 Single = 1, 1262 Multiple, 1263 } 1264 1265 #[repr(u32)] 1266 pub enum UtilityGameSharingDataType { 1267 File = 1, 1268 Memory, 1269 } 1270 1271 #[repr(u32)] 1272 pub enum UtilityHtmlViewerInterfaceMode { 1273 Full, 1274 Limited, 1275 None, 1276 } 1277 1278 #[repr(u32)] 1279 pub enum UtilityHtmlViewerCookieMode { 1280 Disabled = 0, 1281 Enabled, 1282 Confirm, 1283 Default, 1284 } 1285 1286 #[repr(u32)] 1287 pub enum UtilityHtmlViewerTextSize { 1288 Large, 1289 Normal, 1290 Small, 1291 } 1292 1293 #[repr(u32)] 1294 pub enum UtilityHtmlViewerDisplayMode { 1295 Normal, 1296 Fit, 1297 SmartFit, 1298 } 1299 1300 #[repr(u32)] 1301 pub enum UtilityHtmlViewerConnectMode { 1302 Last, 1303 ManualOnce, 1304 ManualAll, 1305 } 1306 1307 #[repr(u32)] 1308 pub enum UtilityHtmlViewerDisconnectMode { 1309 Enable, 1310 Disable, 1311 Confirm, 1312 } 1313 1314 #[repr(u32)] 1315 pub enum ScePspnetAdhocPtpState { 1316 Closed, 1317 Listen, 1318 SynSent, 1319 SynReceived, 1320 Established, 1321 } 1322 1323 #[repr(u32)] 1324 pub enum AdhocMatchingMode { 1325 Host = 1, 1326 Client, 1327 Ptp, 1328 } 1329 1330 #[repr(u32)] 1331 pub enum ApctlState { 1332 Disconnected, 1333 Scanning, 1334 Joining, 1335 GettingIp, 1336 GotIp, 1337 EapAuth, 1338 KeyExchange, 1339 } 1340 1341 #[repr(u32)] 1342 pub enum ApctlEvent { 1343 ConnectRequest, 1344 ScanRequest, 1345 ScanComplete, 1346 Established, 1347 GetIp, 1348 DisconnectRequest, 1349 Error, 1350 Info, 1351 EapAuth, 1352 KeyExchange, 1353 Reconnect, 1354 } 1355 1356 #[repr(u32)] 1357 pub enum ApctlInfo { 1358 ProfileName, 1359 Bssid, 1360 Ssid, 1361 SsidLength, 1362 SecurityType, 1363 Strength, 1364 Channel, 1365 PowerSave, 1366 Ip, 1367 SubnetMask, 1368 Gateway, 1369 PrimaryDns, 1370 SecondaryDns, 1371 UseProxy, 1372 ProxyUrl, 1373 ProxyPort, 1374 EapType, 1375 StartBrowser, 1376 Wifisp, 1377 } 1378 1379 #[repr(u32)] 1380 pub enum ApctlInfoSecurityType { 1381 None, 1382 Wep, 1383 Wpa, 1384 } 1385 1386 #[repr(u32)] 1387 pub enum HttpMethod { 1388 Get, 1389 Post, 1390 Head, 1391 } 1392 1393 #[repr(u32)] 1394 pub enum HttpAuthType { 1395 Basic, 1396 Digest, 1397 } 1398 } 1399 1400 s_paren! { 1401 #[repr(transparent)] 1402 pub struct SceUid(pub i32); 1403 1404 #[repr(transparent)] 1405 pub struct SceMpeg(*mut *mut c_void); 1406 1407 #[repr(transparent)] 1408 pub struct SceMpegStream(*mut c_void); 1409 1410 #[repr(transparent)] 1411 pub struct Mp3Handle(pub i32); 1412 1413 #[repr(transparent)] 1414 pub struct RegHandle(u32); 1415 } 1416 1417 s! { 1418 pub struct sockaddr { 1419 pub sa_len: u8, 1420 pub sa_family: u8, 1421 pub sa_data: [u8;14], 1422 } 1423 1424 pub struct in_addr { 1425 pub s_addr: u32, 1426 } 1427 1428 pub struct AudioInputParams { 1429 pub unknown1: i32, 1430 pub gain: i32, 1431 pub unknown2: i32, 1432 pub unknown3: i32, 1433 pub unknown4: i32, 1434 pub unknown5: i32, 1435 } 1436 1437 pub struct Atrac3BufferInfo { 1438 pub puc_write_position_first_buf: *mut u8, 1439 pub ui_writable_byte_first_buf: u32, 1440 pub ui_min_write_byte_first_buf: u32, 1441 pub ui_read_position_first_buf: u32, 1442 pub puc_write_position_second_buf: *mut u8, 1443 pub ui_writable_byte_second_buf: u32, 1444 pub ui_min_write_byte_second_buf: u32, 1445 pub ui_read_position_second_buf: u32, 1446 } 1447 1448 pub struct SceCtrlData { 1449 pub timestamp: u32, 1450 pub buttons: i32, 1451 pub lx: u8, 1452 pub ly: u8, 1453 pub rsrv: [u8; 6], 1454 } 1455 1456 pub struct SceCtrlLatch { 1457 pub ui_make: u32, 1458 pub ui_break: u32, 1459 pub ui_press: u32, 1460 pub ui_release: u32, 1461 } 1462 1463 pub struct GeStack { 1464 pub stack: [u32; 8], 1465 } 1466 1467 pub struct GeCallbackData { 1468 pub signal_func: ::Option<extern "C" fn(id: i32, arg: *mut c_void)>, 1469 pub signal_arg: *mut c_void, 1470 pub finish_func: ::Option<extern "C" fn(id: i32, arg: *mut c_void)>, 1471 pub finish_arg: *mut c_void, 1472 } 1473 1474 pub struct GeListArgs { 1475 pub size: u32, 1476 pub context: *mut GeContext, 1477 pub num_stacks: u32, 1478 pub stacks: *mut GeStack, 1479 } 1480 1481 pub struct GeBreakParam { 1482 pub buf: [u32; 4], 1483 } 1484 1485 pub struct SceKernelLoadExecParam { 1486 pub size: usize, 1487 pub args: usize, 1488 pub argp: *mut c_void, 1489 pub key: *const u8, 1490 } 1491 1492 pub struct timeval { 1493 pub tv_sec: i32, 1494 pub tv_usec: i32, 1495 } 1496 1497 pub struct timezone { 1498 pub tz_minutes_west: i32, 1499 pub tz_dst_time: i32, 1500 } 1501 1502 pub struct IntrHandlerOptionParam { 1503 size: i32, 1504 entry: u32, 1505 common: u32, 1506 gp: u32, 1507 intr_code: u16, 1508 sub_count: u16, 1509 intr_level: u16, 1510 enabled: u16, 1511 calls: u32, 1512 field_1c: u32, 1513 total_clock_lo: u32, 1514 total_clock_hi: u32, 1515 min_clock_lo: u32, 1516 min_clock_hi: u32, 1517 max_clock_lo: u32, 1518 max_clock_hi: u32, 1519 } 1520 1521 pub struct SceKernelLMOption { 1522 pub size: usize, 1523 pub m_pid_text: SceUid, 1524 pub m_pid_data: SceUid, 1525 pub flags: u32, 1526 pub position: u8, 1527 pub access: u8, 1528 pub c_reserved: [u8; 2usize], 1529 } 1530 1531 pub struct SceKernelSMOption { 1532 pub size: usize, 1533 pub m_pid_stack: SceUid, 1534 pub stack_size: usize, 1535 pub priority: i32, 1536 pub attribute: u32, 1537 } 1538 1539 pub struct SceKernelModuleInfo { 1540 pub size: usize, 1541 pub n_segment: u8, 1542 pub reserved: [u8; 3usize], 1543 pub segment_addr: [i32; 4usize], 1544 pub segment_size: [i32; 4usize], 1545 pub entry_addr: u32, 1546 pub gp_value: u32, 1547 pub text_addr: u32, 1548 pub text_size: u32, 1549 pub data_size: u32, 1550 pub bss_size: u32, 1551 pub attribute: u16, 1552 pub version: [u8; 2usize], 1553 pub name: [u8; 28usize], 1554 } 1555 1556 pub struct DebugProfilerRegs { 1557 pub enable: u32, 1558 pub systemck: u32, 1559 pub cpuck: u32, 1560 pub internal: u32, 1561 pub memory: u32, 1562 pub copz: u32, 1563 pub vfpu: u32, 1564 pub sleep: u32, 1565 pub bus_access: u32, 1566 pub uncached_load: u32, 1567 pub uncached_store: u32, 1568 pub cached_load: u32, 1569 pub cached_store: u32, 1570 pub i_miss: u32, 1571 pub d_miss: u32, 1572 pub d_writeback: u32, 1573 pub cop0_inst: u32, 1574 pub fpu_inst: u32, 1575 pub vfpu_inst: u32, 1576 pub local_bus: u32, 1577 } 1578 1579 pub struct SceKernelSysClock { 1580 pub low: u32, 1581 pub hi: u32, 1582 } 1583 1584 pub struct SceKernelThreadOptParam { 1585 pub size: usize, 1586 pub stack_mpid: SceUid, 1587 } 1588 1589 pub struct SceKernelThreadInfo { 1590 pub size: usize, 1591 pub name: [u8; 32], 1592 pub attr: u32, 1593 pub status: i32, 1594 pub entry: SceKernelThreadEntry, 1595 pub stack: *mut c_void, 1596 pub stack_size: i32, 1597 pub gp_reg: *mut c_void, 1598 pub init_priority: i32, 1599 pub current_priority: i32, 1600 pub wait_type: i32, 1601 pub wait_id: SceUid, 1602 pub wakeup_count: i32, 1603 pub exit_status: i32, 1604 pub run_clocks: SceKernelSysClock, 1605 pub intr_preempt_count: u32, 1606 pub thread_preempt_count: u32, 1607 pub release_count: u32, 1608 } 1609 1610 pub struct SceKernelThreadRunStatus { 1611 pub size: usize, 1612 pub status: i32, 1613 pub current_priority: i32, 1614 pub wait_type: i32, 1615 pub wait_id: i32, 1616 pub wakeup_count: i32, 1617 pub run_clocks: SceKernelSysClock, 1618 pub intr_preempt_count: u32, 1619 pub thread_preempt_count: u32, 1620 pub release_count: u32, 1621 } 1622 1623 pub struct SceKernelSemaOptParam { 1624 pub size: usize, 1625 } 1626 1627 pub struct SceKernelSemaInfo { 1628 pub size: usize, 1629 pub name: [u8; 32], 1630 pub attr: u32, 1631 pub init_count: i32, 1632 pub current_count: i32, 1633 pub max_count: i32, 1634 pub num_wait_threads: i32, 1635 } 1636 1637 pub struct SceKernelEventFlagInfo { 1638 pub size: usize, 1639 pub name: [u8; 32], 1640 pub attr: u32, 1641 pub init_pattern: u32, 1642 pub current_pattern: u32, 1643 pub num_wait_threads: i32, 1644 } 1645 1646 pub struct SceKernelEventFlagOptParam { 1647 pub size: usize, 1648 } 1649 1650 pub struct SceKernelMbxOptParam { 1651 pub size: usize, 1652 } 1653 1654 pub struct SceKernelMbxInfo { 1655 pub size: usize, 1656 pub name: [u8; 32usize], 1657 pub attr: u32, 1658 pub num_wait_threads: i32, 1659 pub num_messages: i32, 1660 pub first_message: *mut c_void, 1661 } 1662 1663 pub struct SceKernelVTimerInfo { 1664 pub size: usize, 1665 pub name: [u8; 32], 1666 pub active: i32, 1667 pub base: SceKernelSysClock, 1668 pub current: SceKernelSysClock, 1669 pub schedule: SceKernelSysClock, 1670 pub handler: SceKernelVTimerHandler, 1671 pub common: *mut c_void, 1672 } 1673 1674 pub struct SceKernelThreadEventHandlerInfo { 1675 pub size: usize, 1676 pub name: [u8; 32], 1677 pub thread_id: SceUid, 1678 pub mask: i32, 1679 pub handler: SceKernelThreadEventHandler, 1680 pub common: *mut c_void, 1681 } 1682 1683 pub struct SceKernelAlarmInfo { 1684 pub size: usize, 1685 pub schedule: SceKernelSysClock, 1686 pub handler: SceKernelAlarmHandler, 1687 pub common: *mut c_void, 1688 } 1689 1690 pub struct SceKernelSystemStatus { 1691 pub size: usize, 1692 pub status: u32, 1693 pub idle_clocks: SceKernelSysClock, 1694 pub comes_out_of_idle_count: u32, 1695 pub thread_switch_count: u32, 1696 pub vfpu_switch_count: u32, 1697 } 1698 1699 pub struct SceKernelMppInfo { 1700 pub size: usize, 1701 pub name: [u8; 32], 1702 pub attr: u32, 1703 pub buf_size: i32, 1704 pub free_size: i32, 1705 pub num_send_wait_threads: i32, 1706 pub num_receive_wait_threads: i32, 1707 } 1708 1709 pub struct SceKernelVplOptParam { 1710 pub size: usize, 1711 } 1712 1713 pub struct SceKernelVplInfo { 1714 pub size: usize, 1715 pub name: [u8; 32], 1716 pub attr: u32, 1717 pub pool_size: i32, 1718 pub free_size: i32, 1719 pub num_wait_threads: i32, 1720 } 1721 1722 pub struct SceKernelFplOptParam { 1723 pub size: usize, 1724 } 1725 1726 pub struct SceKernelFplInfo { 1727 pub size: usize, 1728 pub name: [u8; 32usize], 1729 pub attr: u32, 1730 pub block_size: i32, 1731 pub num_blocks: i32, 1732 pub free_blocks: i32, 1733 pub num_wait_threads: i32, 1734 } 1735 1736 pub struct SceKernelVTimerOptParam { 1737 pub size: usize, 1738 } 1739 1740 pub struct SceKernelCallbackInfo { 1741 pub size: usize, 1742 pub name: [u8; 32usize], 1743 pub thread_id: SceUid, 1744 pub callback: SceKernelCallbackFunction, 1745 pub common: *mut c_void, 1746 pub notify_count: i32, 1747 pub notify_arg: i32, 1748 } 1749 1750 pub struct UsbCamSetupStillParam { 1751 pub size: i32, 1752 pub resolution: UsbCamResolution, 1753 pub jpeg_size: i32, 1754 pub reverse_flags: i32, 1755 pub delay: UsbCamDelay, 1756 pub comp_level: i32, 1757 } 1758 1759 pub struct UsbCamSetupStillExParam { 1760 pub size: i32, 1761 pub unk: u32, 1762 pub resolution: UsbCamResolutionEx, 1763 pub jpeg_size: i32, 1764 pub comp_level: i32, 1765 pub unk2: u32, 1766 pub unk3: u32, 1767 pub flip: i32, 1768 pub mirror: i32, 1769 pub delay: UsbCamDelay, 1770 pub unk4: [u32; 5usize], 1771 } 1772 1773 pub struct UsbCamSetupVideoParam { 1774 pub size: i32, 1775 pub resolution: UsbCamResolution, 1776 pub framerate: UsbCamFrameRate, 1777 pub white_balance: UsbCamWb, 1778 pub saturation: i32, 1779 pub brightness: i32, 1780 pub contrast: i32, 1781 pub sharpness: i32, 1782 pub effect_mode: UsbCamEffectMode, 1783 pub frame_size: i32, 1784 pub unk: u32, 1785 pub evl_evel: UsbCamEvLevel, 1786 } 1787 1788 pub struct UsbCamSetupVideoExParam { 1789 pub size: i32, 1790 pub unk: u32, 1791 pub resolution: UsbCamResolutionEx, 1792 pub framerate: UsbCamFrameRate, 1793 pub unk2: u32, 1794 pub unk3: u32, 1795 pub white_balance: UsbCamWb, 1796 pub saturation: i32, 1797 pub brightness: i32, 1798 pub contrast: i32, 1799 pub sharpness: i32, 1800 pub unk4: u32, 1801 pub unk5: u32, 1802 pub unk6: [u32; 3usize], 1803 pub effect_mode: UsbCamEffectMode, 1804 pub unk7: u32, 1805 pub unk8: u32, 1806 pub unk9: u32, 1807 pub unk10: u32, 1808 pub unk11: u32, 1809 pub frame_size: i32, 1810 pub unk12: u32, 1811 pub ev_level: UsbCamEvLevel, 1812 } 1813 1814 pub struct ScePspDateTime { 1815 pub year: u16, 1816 pub month: u16, 1817 pub day: u16, 1818 pub hour: u16, 1819 pub minutes: u16, 1820 pub seconds: u16, 1821 pub microseconds: u32, 1822 } 1823 1824 pub struct SceIoStat { 1825 pub st_mode: i32, 1826 pub st_attr: i32, 1827 pub st_size: i64, 1828 pub st_ctime: ScePspDateTime, 1829 pub st_atime: ScePspDateTime, 1830 pub st_mtime: ScePspDateTime, 1831 pub st_private: [u32; 6usize], 1832 } 1833 1834 pub struct UmdInfo { 1835 pub size: u32, 1836 pub type_: UmdType, 1837 } 1838 1839 pub struct SceMpegRingbuffer { 1840 pub packets: i32, 1841 pub unk0: u32, 1842 pub unk1: u32, 1843 pub unk2: u32, 1844 pub unk3: u32, 1845 pub data: *mut c_void, 1846 pub callback: SceMpegRingbufferCb, 1847 pub cb_param: *mut c_void, 1848 pub unk4: u32, 1849 pub unk5: u32, 1850 pub sce_mpeg: *mut c_void, 1851 } 1852 1853 pub struct SceMpegAu { 1854 pub pts_msb: u32, 1855 pub pts: u32, 1856 pub dts_msb: u32, 1857 pub dts: u32, 1858 pub es_buffer: u32, 1859 pub au_size: u32, 1860 } 1861 1862 pub struct SceMpegAvcMode { 1863 pub unk0: i32, 1864 pub pixel_format: super::DisplayPixelFormat, 1865 } 1866 1867 #[repr(align(64))] 1868 pub struct SceMpegLLI { 1869 pub src: *mut c_void, 1870 pub dst: *mut c_void, 1871 pub next: *mut c_void, 1872 pub size: i32, 1873 } 1874 1875 #[repr(align(64))] 1876 pub struct SceMpegYCrCbBuffer { 1877 pub frame_buffer_height16: i32, 1878 pub frame_buffer_width16: i32, 1879 pub unknown: i32, 1880 pub unknown2: i32, 1881 pub y_buffer: *mut c_void, 1882 pub y_buffer2: *mut c_void, 1883 pub cr_buffer: *mut c_void, 1884 pub cb_buffer: *mut c_void, 1885 pub cr_buffer2: *mut c_void, 1886 pub cb_buffer2: *mut c_void, 1887 1888 pub frame_height: i32, 1889 pub frame_width: i32, 1890 pub frame_buffer_width: i32, 1891 pub unknown3: [i32; 11usize], 1892 } 1893 1894 pub struct ScePspSRect { 1895 pub x: i16, 1896 pub y: i16, 1897 pub w: i16, 1898 pub h: i16, 1899 } 1900 1901 pub struct ScePspIRect { 1902 pub x: i32, 1903 pub y: i32, 1904 pub w: i32, 1905 pub h: i32, 1906 } 1907 1908 pub struct ScePspL64Rect { 1909 pub x: u64, 1910 pub y: u64, 1911 pub w: u64, 1912 pub h: u64, 1913 } 1914 1915 pub struct ScePspSVector2 { 1916 pub x: i16, 1917 pub y: i16, 1918 } 1919 1920 pub struct ScePspIVector2 { 1921 pub x: i32, 1922 pub y: i32, 1923 } 1924 1925 pub struct ScePspL64Vector2 { 1926 pub x: u64, 1927 pub y: u64, 1928 } 1929 1930 pub struct ScePspSVector3 { 1931 pub x: i16, 1932 pub y: i16, 1933 pub z: i16, 1934 } 1935 1936 pub struct ScePspIVector3 { 1937 pub x: i32, 1938 pub y: i32, 1939 pub z: i32, 1940 } 1941 1942 pub struct ScePspL64Vector3 { 1943 pub x: u64, 1944 pub y: u64, 1945 pub z: u64, 1946 } 1947 1948 pub struct ScePspSVector4 { 1949 pub x: i16, 1950 pub y: i16, 1951 pub z: i16, 1952 pub w: i16, 1953 } 1954 1955 pub struct ScePspIVector4 { 1956 pub x: i32, 1957 pub y: i32, 1958 pub z: i32, 1959 pub w: i32, 1960 } 1961 1962 pub struct ScePspL64Vector4 { 1963 pub x: u64, 1964 pub y: u64, 1965 pub z: u64, 1966 pub w: u64, 1967 } 1968 1969 pub struct ScePspIMatrix2 { 1970 pub x: ScePspIVector2, 1971 pub y: ScePspIVector2, 1972 } 1973 1974 pub struct ScePspIMatrix3 { 1975 pub x: ScePspIVector3, 1976 pub y: ScePspIVector3, 1977 pub z: ScePspIVector3, 1978 } 1979 1980 #[repr(align(16))] 1981 pub struct ScePspIMatrix4 { 1982 pub x: ScePspIVector4, 1983 pub y: ScePspIVector4, 1984 pub z: ScePspIVector4, 1985 pub w: ScePspIVector4, 1986 } 1987 1988 pub struct ScePspIMatrix4Unaligned { 1989 pub x: ScePspIVector4, 1990 pub y: ScePspIVector4, 1991 pub z: ScePspIVector4, 1992 pub w: ScePspIVector4, 1993 } 1994 1995 pub struct SceMp3InitArg { 1996 pub mp3_stream_start: u32, 1997 pub unk1: u32, 1998 pub mp3_stream_end: u32, 1999 pub unk2: u32, 2000 pub mp3_buf: *mut c_void, 2001 pub mp3_buf_size: i32, 2002 pub pcm_buf: *mut c_void, 2003 pub pcm_buf_size: i32, 2004 } 2005 2006 pub struct OpenPSID { 2007 pub data: [u8; 16usize], 2008 } 2009 2010 pub struct UtilityDialogCommon { 2011 pub size: u32, 2012 pub language: SystemParamLanguage, 2013 pub button_accept: UtilityDialogButtonAccept, 2014 pub graphics_thread: i32, 2015 pub access_thread: i32, 2016 pub font_thread: i32, 2017 pub sound_thread: i32, 2018 pub result: i32, 2019 pub reserved: [i32; 4usize], 2020 } 2021 2022 pub struct UtilityNetconfAdhoc { 2023 pub name: [u8; 8usize], 2024 pub timeout: u32, 2025 } 2026 2027 pub struct UtilityNetconfData { 2028 pub base: UtilityDialogCommon, 2029 pub action: UtilityNetconfAction, 2030 pub adhocparam: *mut UtilityNetconfAdhoc, 2031 pub hotspot: i32, 2032 pub hotspot_connected: i32, 2033 pub wifisp: i32, 2034 } 2035 2036 pub struct UtilitySavedataFileData { 2037 pub buf: *mut c_void, 2038 pub buf_size: usize, 2039 pub size: usize, 2040 pub unknown: i32, 2041 } 2042 2043 pub struct UtilitySavedataListSaveNewData { 2044 pub icon0: UtilitySavedataFileData, 2045 pub title: *mut u8, 2046 } 2047 2048 pub struct UtilityGameSharingParams { 2049 pub base: UtilityDialogCommon, 2050 pub unknown1: i32, 2051 pub unknown2: i32, 2052 pub name: [u8; 8usize], 2053 pub unknown3: i32, 2054 pub unknown4: i32, 2055 pub unknown5: i32, 2056 pub result: i32, 2057 pub filepath: *mut u8, 2058 pub mode: UtilityGameSharingMode, 2059 pub datatype: UtilityGameSharingDataType, 2060 pub data: *mut c_void, 2061 pub datasize: u32, 2062 } 2063 2064 pub struct UtilityHtmlViewerParam { 2065 pub base: UtilityDialogCommon, 2066 pub memaddr: *mut c_void, 2067 pub memsize: u32, 2068 pub unknown1: i32, 2069 pub unknown2: i32, 2070 pub initialurl: *mut u8, 2071 pub numtabs: u32, 2072 pub interfacemode: UtilityHtmlViewerInterfaceMode, 2073 pub options: i32, 2074 pub dldirname: *mut u8, 2075 pub dlfilename: *mut u8, 2076 pub uldirname: *mut u8, 2077 pub ulfilename: *mut u8, 2078 pub cookiemode: UtilityHtmlViewerCookieMode, 2079 pub unknown3: u32, 2080 pub homeurl: *mut u8, 2081 pub textsize: UtilityHtmlViewerTextSize, 2082 pub displaymode: UtilityHtmlViewerDisplayMode, 2083 pub connectmode: UtilityHtmlViewerConnectMode, 2084 pub disconnectmode: UtilityHtmlViewerDisconnectMode, 2085 pub memused: u32, 2086 pub unknown4: [i32; 10usize], 2087 } 2088 2089 pub struct SceUtilityOskData { 2090 pub unk_00: i32, 2091 pub unk_04: i32, 2092 pub language: SceUtilityOskInputLanguage, 2093 pub unk_12: i32, 2094 pub inputtype: SceUtilityOskInputType, 2095 pub lines: i32, 2096 pub unk_24: i32, 2097 pub desc: *mut u16, 2098 pub intext: *mut u16, 2099 pub outtextlength: i32, 2100 pub outtext: *mut u16, 2101 pub result: SceUtilityOskResult, 2102 pub outtextlimit: i32, 2103 } 2104 2105 pub struct SceUtilityOskParams { 2106 pub base: UtilityDialogCommon, 2107 pub datacount: i32, 2108 pub data: *mut SceUtilityOskData, 2109 pub state: SceUtilityOskState, 2110 pub unk_60: i32, 2111 } 2112 2113 pub struct SceNetMallocStat { 2114 pub pool: i32, 2115 pub maximum: i32, 2116 pub free: i32, 2117 } 2118 2119 pub struct SceNetAdhocctlAdhocId { 2120 pub unknown: i32, 2121 pub adhoc_id: [u8; 9usize], 2122 pub unk: [u8; 3usize], 2123 } 2124 2125 pub struct SceNetAdhocctlScanInfo { 2126 pub next: *mut SceNetAdhocctlScanInfo, 2127 pub channel: i32, 2128 pub name: [u8; 8usize], 2129 pub bssid: [u8; 6usize], 2130 pub unknown: [u8; 2usize], 2131 pub unknown2: i32, 2132 } 2133 2134 pub struct SceNetAdhocctlGameModeInfo { 2135 pub count: i32, 2136 pub macs: [[u8; 6usize]; 16usize], 2137 } 2138 2139 pub struct SceNetAdhocPtpStat { 2140 pub next: *mut SceNetAdhocPtpStat, 2141 pub ptp_id: i32, 2142 pub mac: [u8; 6usize], 2143 pub peermac: [u8; 6usize], 2144 pub port: u16, 2145 pub peerport: u16, 2146 pub sent_data: u32, 2147 pub rcvd_data: u32, 2148 pub state: ScePspnetAdhocPtpState, 2149 } 2150 2151 pub struct SceNetAdhocPdpStat { 2152 pub next: *mut SceNetAdhocPdpStat, 2153 pub pdp_id: i32, 2154 pub mac: [u8; 6usize], 2155 pub port: u16, 2156 pub rcvd_data: u32, 2157 } 2158 2159 pub struct AdhocPoolStat { 2160 pub size: i32, 2161 pub maxsize: i32, 2162 pub freesize: i32, 2163 } 2164 } 2165 2166 s_no_extra_traits! { 2167 #[allow(missing_debug_implementations)] 2168 pub struct GeContext { 2169 pub context: [u32; 512], 2170 } 2171 2172 #[allow(missing_debug_implementations)] 2173 pub struct SceKernelUtilsSha1Context { 2174 pub h: [u32; 5usize], 2175 pub us_remains: u16, 2176 pub us_computed: u16, 2177 pub ull_total_len: u64, 2178 pub buf: [u8; 64usize], 2179 } 2180 2181 #[allow(missing_debug_implementations)] 2182 pub struct SceKernelUtilsMt19937Context { 2183 pub count: u32, 2184 pub state: [u32; 624usize], 2185 } 2186 2187 #[allow(missing_debug_implementations)] 2188 pub struct SceKernelUtilsMd5Context { 2189 pub h: [u32; 4usize], 2190 pub pad: u32, 2191 pub us_remains: u16, 2192 pub us_computed: u16, 2193 pub ull_total_len: u64, 2194 pub buf: [u8; 64usize], 2195 } 2196 2197 #[allow(missing_debug_implementations)] 2198 pub struct SceIoDirent { 2199 pub d_stat: SceIoStat, 2200 pub d_name: [u8; 256usize], 2201 pub d_private: *mut c_void, 2202 pub dummy: i32, 2203 } 2204 2205 #[cfg_attr(feature = "extra_traits", derive(Debug))] 2206 pub struct ScePspFRect { 2207 pub x: f32, 2208 pub y: f32, 2209 pub w: f32, 2210 pub h: f32, 2211 } 2212 2213 #[repr(align(16))] 2214 #[cfg_attr(feature = "extra_traits", derive(Debug))] 2215 pub struct ScePspFVector3 { 2216 pub x: f32, 2217 pub y: f32, 2218 pub z: f32, 2219 } 2220 2221 #[repr(align(16))] 2222 #[cfg_attr(feature = "extra_traits", derive(Debug))] 2223 pub struct ScePspFVector4 { 2224 pub x: f32, 2225 pub y: f32, 2226 pub z: f32, 2227 pub w: f32, 2228 } 2229 2230 #[cfg_attr(feature = "extra_traits", derive(Debug))] 2231 pub struct ScePspFVector4Unaligned { 2232 pub x: f32, 2233 pub y: f32, 2234 pub z: f32, 2235 pub w: f32, 2236 } 2237 2238 #[cfg_attr(feature = "extra_traits", derive(Debug))] 2239 pub struct ScePspFVector2 { 2240 pub x: f32, 2241 pub y: f32, 2242 } 2243 2244 #[cfg_attr(feature = "extra_traits", derive(Debug))] 2245 pub struct ScePspFMatrix2 { 2246 pub x: ScePspFVector2, 2247 pub y: ScePspFVector2, 2248 } 2249 2250 #[cfg_attr(feature = "extra_traits", derive(Debug))] 2251 pub struct ScePspFMatrix3 { 2252 pub x: ScePspFVector3, 2253 pub y: ScePspFVector3, 2254 pub z: ScePspFVector3, 2255 } 2256 2257 #[cfg_attr(feature = "extra_traits", derive(Debug))] 2258 #[repr(align(16))] 2259 pub struct ScePspFMatrix4 { 2260 pub x: ScePspFVector4, 2261 pub y: ScePspFVector4, 2262 pub z: ScePspFVector4, 2263 pub w: ScePspFVector4, 2264 } 2265 2266 #[allow(missing_debug_implementations)] 2267 pub struct ScePspFMatrix4Unaligned { 2268 pub x: ScePspFVector4, 2269 pub y: ScePspFVector4, 2270 pub z: ScePspFVector4, 2271 pub w: ScePspFVector4, 2272 } 2273 2274 #[allow(missing_debug_implementations)] 2275 pub union ScePspVector3 { 2276 pub fv: ScePspFVector3, 2277 pub iv: ScePspIVector3, 2278 pub f: [f32; 3usize], 2279 pub i: [i32; 3usize], 2280 } 2281 2282 #[allow(missing_debug_implementations)] 2283 pub union ScePspVector4 { 2284 pub fv: ScePspFVector4, 2285 pub iv: ScePspIVector4, 2286 pub qw: u128, 2287 pub f: [f32; 4usize], 2288 pub i: [i32; 4usize], 2289 } 2290 2291 #[allow(missing_debug_implementations)] 2292 pub union ScePspMatrix2 { 2293 pub fm: ScePspFMatrix2, 2294 pub im: ScePspIMatrix2, 2295 pub fv: [ScePspFVector2; 2usize], 2296 pub iv: [ScePspIVector2; 2usize], 2297 pub v: [ScePspVector2; 2usize], 2298 pub f: [[f32; 2usize]; 2usize], 2299 pub i: [[i32; 2usize]; 2usize], 2300 } 2301 2302 #[allow(missing_debug_implementations)] 2303 pub union ScePspMatrix3 { 2304 pub fm: ScePspFMatrix3, 2305 pub im: ScePspIMatrix3, 2306 pub fv: [ScePspFVector3; 3usize], 2307 pub iv: [ScePspIVector3; 3usize], 2308 pub v: [ScePspVector3; 3usize], 2309 pub f: [[f32; 3usize]; 3usize], 2310 pub i: [[i32; 3usize]; 3usize], 2311 } 2312 2313 #[allow(missing_debug_implementations)] 2314 pub union ScePspVector2 { 2315 pub fv: ScePspFVector2, 2316 pub iv: ScePspIVector2, 2317 pub f: [f32; 2usize], 2318 pub i: [i32; 2usize], 2319 } 2320 2321 #[allow(missing_debug_implementations)] 2322 pub union ScePspMatrix4 { 2323 pub fm: ScePspFMatrix4, 2324 pub im: ScePspIMatrix4, 2325 pub fv: [ScePspFVector4; 4usize], 2326 pub iv: [ScePspIVector4; 4usize], 2327 pub v: [ScePspVector4; 4usize], 2328 pub f: [[f32; 4usize]; 4usize], 2329 pub i: [[i32; 4usize]; 4usize], 2330 } 2331 2332 #[allow(missing_debug_implementations)] 2333 pub struct Key { 2334 pub key_type: KeyType, 2335 pub name: [u8; 256usize], 2336 pub name_len: u32, 2337 pub unk2: u32, 2338 pub unk3: u32, 2339 } 2340 2341 #[allow(missing_debug_implementations)] 2342 pub struct UtilityMsgDialogParams { 2343 pub base: UtilityDialogCommon, 2344 pub unknown: i32, 2345 pub mode: UtilityMsgDialogMode, 2346 pub error_value: u32, 2347 pub message: [u8; 512usize], 2348 pub options: i32, 2349 pub button_pressed: UtilityMsgDialogPressed, 2350 } 2351 2352 #[allow(missing_debug_implementations)] 2353 pub union UtilityNetData { 2354 pub as_uint: u32, 2355 pub as_string: [u8; 128usize], 2356 } 2357 2358 #[allow(missing_debug_implementations)] 2359 pub struct UtilitySavedataSFOParam { 2360 pub title: [u8; 128usize], 2361 pub savedata_title: [u8; 128usize], 2362 pub detail: [u8; 1024usize], 2363 pub parental_level: u8, 2364 pub unknown: [u8; 3usize], 2365 } 2366 2367 #[allow(missing_debug_implementations)] 2368 pub struct SceUtilitySavedataParam { 2369 pub base: UtilityDialogCommon, 2370 pub mode: UtilitySavedataMode, 2371 pub unknown1: i32, 2372 pub overwrite: i32, 2373 pub game_name: [u8; 13usize], 2374 pub reserved: [u8; 3usize], 2375 pub save_name: [u8; 20usize], 2376 pub save_name_list: *mut [u8; 20usize], 2377 pub file_name: [u8; 13usize], 2378 pub reserved1: [u8; 3usize], 2379 pub data_buf: *mut c_void, 2380 pub data_buf_size: usize, 2381 pub data_size: usize, 2382 pub sfo_param: UtilitySavedataSFOParam, 2383 pub icon0_file_data: UtilitySavedataFileData, 2384 pub icon1_file_data: UtilitySavedataFileData, 2385 pub pic1_file_data: UtilitySavedataFileData, 2386 pub snd0_file_data: UtilitySavedataFileData, 2387 pub new_data: *mut UtilitySavedataListSaveNewData, 2388 pub focus: UtilitySavedataFocus, 2389 pub unknown2: [i32; 4usize], 2390 pub key: [u8; 16], 2391 pub unknown3: [u8; 20], 2392 } 2393 2394 #[allow(missing_debug_implementations)] 2395 pub struct SceNetAdhocctlPeerInfo { 2396 pub next: *mut SceNetAdhocctlPeerInfo, 2397 pub nickname: [u8; 128usize], 2398 pub mac: [u8; 6usize], 2399 pub unknown: [u8; 6usize], 2400 pub timestamp: u32, 2401 } 2402 2403 #[allow(missing_debug_implementations)] 2404 pub struct SceNetAdhocctlParams { 2405 pub channel: i32, 2406 pub name: [u8; 8usize], 2407 pub bssid: [u8; 6usize], 2408 pub nickname: [u8; 128usize], 2409 } 2410 2411 #[cfg_attr(feature = "extra_traits", allow(missing_debug_implementations))] 2412 pub union SceNetApctlInfo { 2413 pub name: [u8; 64usize], 2414 pub bssid: [u8; 6usize], 2415 pub ssid: [u8; 32usize], 2416 pub ssid_length: u32, 2417 pub security_type: u32, 2418 pub strength: u8, 2419 pub channel: u8, 2420 pub power_save: u8, 2421 pub ip: [u8; 16usize], 2422 pub sub_net_mask: [u8; 16usize], 2423 pub gateway: [u8; 16usize], 2424 pub primary_dns: [u8; 16usize], 2425 pub secondary_dns: [u8; 16usize], 2426 pub use_proxy: u32, 2427 pub proxy_url: [u8; 128usize], 2428 pub proxy_port: u16, 2429 pub eap_type: u32, 2430 pub start_browser: u32, 2431 pub wifisp: u32, 2432 } 2433 } 2434 2435 pub const INT_MIN: c_int = -2147483648; 2436 pub const INT_MAX: c_int = 2147483647; 2437 2438 pub const AUDIO_VOLUME_MAX: u32 = 0x8000; 2439 pub const AUDIO_CHANNEL_MAX: u32 = 8; 2440 pub const AUDIO_NEXT_CHANNEL: i32 = -1; 2441 pub const AUDIO_SAMPLE_MIN: u32 = 64; 2442 pub const AUDIO_SAMPLE_MAX: u32 = 65472; 2443 2444 pub const PSP_CTRL_SELECT: i32 = 0x000001; 2445 pub const PSP_CTRL_START: i32 = 0x000008; 2446 pub const PSP_CTRL_UP: i32 = 0x000010; 2447 pub const PSP_CTRL_RIGHT: i32 = 0x000020; 2448 pub const PSP_CTRL_DOWN: i32 = 0x000040; 2449 pub const PSP_CTRL_LEFT: i32 = 0x000080; 2450 pub const PSP_CTRL_LTRIGGER: i32 = 0x000100; 2451 pub const PSP_CTRL_RTRIGGER: i32 = 0x000200; 2452 pub const PSP_CTRL_TRIANGLE: i32 = 0x001000; 2453 pub const PSP_CTRL_CIRCLE: i32 = 0x002000; 2454 pub const PSP_CTRL_CROSS: i32 = 0x004000; 2455 pub const PSP_CTRL_SQUARE: i32 = 0x008000; 2456 pub const PSP_CTRL_HOME: i32 = 0x010000; 2457 pub const PSP_CTRL_HOLD: i32 = 0x020000; 2458 pub const PSP_CTRL_NOTE: i32 = 0x800000; 2459 pub const PSP_CTRL_SCREEN: i32 = 0x400000; 2460 pub const PSP_CTRL_VOLUP: i32 = 0x100000; 2461 pub const PSP_CTRL_VOLDOWN: i32 = 0x200000; 2462 pub const PSP_CTRL_WLAN_UP: i32 = 0x040000; 2463 pub const PSP_CTRL_REMOTE: i32 = 0x080000; 2464 pub const PSP_CTRL_DISC: i32 = 0x1000000; 2465 pub const PSP_CTRL_MS: i32 = 0x2000000; 2466 2467 pub const USB_CAM_PID: i32 = 0x282; 2468 pub const USB_BUS_DRIVER_NAME: &str = "USBBusDriver"; 2469 pub const USB_CAM_DRIVER_NAME: &str = "USBCamDriver"; 2470 pub const USB_CAM_MIC_DRIVER_NAME: &str = "USBCamMicDriver"; 2471 pub const USB_STOR_DRIVER_NAME: &str = "USBStor_Driver"; 2472 2473 pub const ACTIVATED: i32 = 0x200; 2474 pub const CONNECTED: i32 = 0x020; 2475 pub const ESTABLISHED: i32 = 0x002; 2476 2477 pub const USB_CAM_FLIP: i32 = 1; 2478 pub const USB_CAM_MIRROR: i32 = 0x100; 2479 2480 pub const THREAD_ATTR_VFPU: i32 = 0x00004000; 2481 pub const THREAD_ATTR_USER: i32 = 0x80000000; 2482 pub const THREAD_ATTR_USBWLAN: i32 = 0xa0000000; 2483 pub const THREAD_ATTR_VSH: i32 = 0xc0000000; 2484 pub const THREAD_ATTR_SCRATCH_SRAM: i32 = 0x00008000; 2485 pub const THREAD_ATTR_NO_FILLSTACK: i32 = 0x00100000; 2486 pub const THREAD_ATTR_CLEAR_STACK: i32 = 0x00200000; 2487 2488 pub const EVENT_WAIT_MULTIPLE: i32 = 0x200; 2489 2490 pub const EVENT_WAIT_AND: i32 = 0; 2491 pub const EVENT_WAIT_OR: i32 = 1; 2492 pub const EVENT_WAIT_CLEAR: i32 = 0x20; 2493 2494 pub const POWER_INFO_POWER_SWITCH: i32 = 0x80000000; 2495 pub const POWER_INFO_HOLD_SWITCH: i32 = 0x40000000; 2496 pub const POWER_INFO_STANDBY: i32 = 0x00080000; 2497 pub const POWER_INFO_RESUME_COMPLETE: i32 = 0x00040000; 2498 pub const POWER_INFO_RESUMING: i32 = 0x00020000; 2499 pub const POWER_INFO_SUSPENDING: i32 = 0x00010000; 2500 pub const POWER_INFO_AC_POWER: i32 = 0x00001000; 2501 pub const POWER_INFO_BATTERY_LOW: i32 = 0x00000100; 2502 pub const POWER_INFO_BATTERY_EXIST: i32 = 0x00000080; 2503 pub const POWER_INFO_BATTERY_POWER: i32 = 0x0000007; 2504 2505 pub const FIO_S_IFLNK: i32 = 0x4000; 2506 pub const FIO_S_IFDIR: i32 = 0x1000; 2507 pub const FIO_S_IFREG: i32 = 0x2000; 2508 pub const FIO_S_ISUID: i32 = 0x0800; 2509 pub const FIO_S_ISGID: i32 = 0x0400; 2510 pub const FIO_S_ISVTX: i32 = 0x0200; 2511 pub const FIO_S_IRUSR: i32 = 0x0100; 2512 pub const FIO_S_IWUSR: i32 = 0x0080; 2513 pub const FIO_S_IXUSR: i32 = 0x0040; 2514 pub const FIO_S_IRGRP: i32 = 0x0020; 2515 pub const FIO_S_IWGRP: i32 = 0x0010; 2516 pub const FIO_S_IXGRP: i32 = 0x0008; 2517 pub const FIO_S_IROTH: i32 = 0x0004; 2518 pub const FIO_S_IWOTH: i32 = 0x0002; 2519 pub const FIO_S_IXOTH: i32 = 0x0001; 2520 2521 pub const FIO_SO_IFLNK: i32 = 0x0008; 2522 pub const FIO_SO_IFDIR: i32 = 0x0010; 2523 pub const FIO_SO_IFREG: i32 = 0x0020; 2524 pub const FIO_SO_IROTH: i32 = 0x0004; 2525 pub const FIO_SO_IWOTH: i32 = 0x0002; 2526 pub const FIO_SO_IXOTH: i32 = 0x0001; 2527 2528 pub const PSP_O_RD_ONLY: i32 = 0x0001; 2529 pub const PSP_O_WR_ONLY: i32 = 0x0002; 2530 pub const PSP_O_RD_WR: i32 = 0x0003; 2531 pub const PSP_O_NBLOCK: i32 = 0x0004; 2532 pub const PSP_O_DIR: i32 = 0x0008; 2533 pub const PSP_O_APPEND: i32 = 0x0100; 2534 pub const PSP_O_CREAT: i32 = 0x0200; 2535 pub const PSP_O_TRUNC: i32 = 0x0400; 2536 pub const PSP_O_EXCL: i32 = 0x0800; 2537 pub const PSP_O_NO_WAIT: i32 = 0x8000; 2538 2539 pub const UMD_NOT_PRESENT: i32 = 0x01; 2540 pub const UMD_PRESENT: i32 = 0x02; 2541 pub const UMD_CHANGED: i32 = 0x04; 2542 pub const UMD_INITING: i32 = 0x08; 2543 pub const UMD_INITED: i32 = 0x10; 2544 pub const UMD_READY: i32 = 0x20; 2545 2546 pub const PLAY_PAUSE: i32 = 0x1; 2547 pub const FORWARD: i32 = 0x4; 2548 pub const BACK: i32 = 0x8; 2549 pub const VOL_UP: i32 = 0x10; 2550 pub const VOL_DOWN: i32 = 0x20; 2551 pub const HOLD: i32 = 0x80; 2552 2553 pub const GU_PI: f32 = 3.141593; 2554 2555 pub const GU_TEXTURE_8BIT: i32 = 1; 2556 pub const GU_TEXTURE_16BIT: i32 = 2; 2557 pub const GU_TEXTURE_32BITF: i32 = 3; 2558 pub const GU_COLOR_5650: i32 = 4 << 2; 2559 pub const GU_COLOR_5551: i32 = 5 << 2; 2560 pub const GU_COLOR_4444: i32 = 6 << 2; 2561 pub const GU_COLOR_8888: i32 = 7 << 2; 2562 pub const GU_NORMAL_8BIT: i32 = 1 << 5; 2563 pub const GU_NORMAL_16BIT: i32 = 2 << 5; 2564 pub const GU_NORMAL_32BITF: i32 = 3 << 5; 2565 pub const GU_VERTEX_8BIT: i32 = 1 << 7; 2566 pub const GU_VERTEX_16BIT: i32 = 2 << 7; 2567 pub const GU_VERTEX_32BITF: i32 = 3 << 7; 2568 pub const GU_WEIGHT_8BIT: i32 = 1 << 9; 2569 pub const GU_WEIGHT_16BIT: i32 = 2 << 9; 2570 pub const GU_WEIGHT_32BITF: i32 = 3 << 9; 2571 pub const GU_INDEX_8BIT: i32 = 1 << 11; 2572 pub const GU_INDEX_16BIT: i32 = 2 << 11; 2573 pub const GU_WEIGHTS1: i32 = (((1 - 1) & 7) << 14) as i32; 2574 pub const GU_WEIGHTS2: i32 = (((2 - 1) & 7) << 14) as i32; 2575 pub const GU_WEIGHTS3: i32 = (((3 - 1) & 7) << 14) as i32; 2576 pub const GU_WEIGHTS4: i32 = (((4 - 1) & 7) << 14) as i32; 2577 pub const GU_WEIGHTS5: i32 = (((5 - 1) & 7) << 14) as i32; 2578 pub const GU_WEIGHTS6: i32 = (((6 - 1) & 7) << 14) as i32; 2579 pub const GU_WEIGHTS7: i32 = (((7 - 1) & 7) << 14) as i32; 2580 pub const GU_WEIGHTS8: i32 = (((8 - 1) & 7) << 14) as i32; 2581 pub const GU_VERTICES1: i32 = (((1 - 1) & 7) << 18) as i32; 2582 pub const GU_VERTICES2: i32 = (((2 - 1) & 7) << 18) as i32; 2583 pub const GU_VERTICES3: i32 = (((3 - 1) & 7) << 18) as i32; 2584 pub const GU_VERTICES4: i32 = (((4 - 1) & 7) << 18) as i32; 2585 pub const GU_VERTICES5: i32 = (((5 - 1) & 7) << 18) as i32; 2586 pub const GU_VERTICES6: i32 = (((6 - 1) & 7) << 18) as i32; 2587 pub const GU_VERTICES7: i32 = (((7 - 1) & 7) << 18) as i32; 2588 pub const GU_VERTICES8: i32 = (((8 - 1) & 7) << 18) as i32; 2589 pub const GU_TRANSFORM_2D: i32 = 1 << 23; 2590 pub const GU_TRANSFORM_3D: i32 = 0; 2591 2592 pub const GU_COLOR_BUFFER_BIT: i32 = 1; 2593 pub const GU_STENCIL_BUFFER_BIT: i32 = 2; 2594 pub const GU_DEPTH_BUFFER_BIT: i32 = 4; 2595 pub const GU_FAST_CLEAR_BIT: i32 = 16; 2596 2597 pub const GU_AMBIENT: i32 = 1; 2598 pub const GU_DIFFUSE: i32 = 2; 2599 pub const GU_SPECULAR: i32 = 4; 2600 pub const GU_UNKNOWN_LIGHT_COMPONENT: i32 = 8; 2601 2602 pub const SYSTEM_REGISTRY: [u8; 7] = *b"/system"; 2603 pub const REG_KEYNAME_SIZE: u32 = 27; 2604 2605 pub const UTILITY_MSGDIALOG_ERROR: i32 = 0; 2606 pub const UTILITY_MSGDIALOG_TEXT: i32 = 1; 2607 pub const UTILITY_MSGDIALOG_YES_NO_BUTTONS: i32 = 0x10; 2608 pub const UTILITY_MSGDIALOG_DEFAULT_NO: i32 = 0x100; 2609 2610 pub const UTILITY_HTMLVIEWER_OPEN_SCE_START_PAGE: i32 = 0x000001; 2611 pub const UTILITY_HTMLVIEWER_DISABLE_STARTUP_LIMITS: i32 = 0x000002; 2612 pub const UTILITY_HTMLVIEWER_DISABLE_EXIT_DIALOG: i32 = 0x000004; 2613 pub const UTILITY_HTMLVIEWER_DISABLE_CURSOR: i32 = 0x000008; 2614 pub const UTILITY_HTMLVIEWER_DISABLE_DOWNLOAD_COMPLETE_DIALOG: i32 = 0x000010; 2615 pub const UTILITY_HTMLVIEWER_DISABLE_DOWNLOAD_START_DIALOG: i32 = 0x000020; 2616 pub const UTILITY_HTMLVIEWER_DISABLE_DOWNLOAD_DESTINATION_DIALOG: i32 = 2617 0x000040; 2618 pub const UTILITY_HTMLVIEWER_LOCK_DOWNLOAD_DESTINATION_DIALOG: i32 = 0x000080; 2619 pub const UTILITY_HTMLVIEWER_DISABLE_TAB_DISPLAY: i32 = 0x000100; 2620 pub const UTILITY_HTMLVIEWER_ENABLE_ANALOG_HOLD: i32 = 0x000200; 2621 pub const UTILITY_HTMLVIEWER_ENABLE_FLASH: i32 = 0x000400; 2622 pub const UTILITY_HTMLVIEWER_DISABLE_LRTRIGGER: i32 = 0x000800; 2623 2624 extern "C" { 2625 pub fn sceAudioChReserve( 2626 channel: i32, 2627 sample_count: i32, 2628 format: AudioFormat, 2629 ) -> i32; 2630 pub fn sceAudioChRelease(channel: i32) -> i32; 2631 pub fn sceAudioOutput(channel: i32, vol: i32, buf: *mut c_void) -> i32; 2632 pub fn sceAudioOutputBlocking( 2633 channel: i32, 2634 vol: i32, 2635 buf: *mut c_void, 2636 ) -> i32; 2637 pub fn sceAudioOutputPanned( 2638 channel: i32, 2639 left_vol: i32, 2640 right_vol: i32, 2641 buf: *mut c_void, 2642 ) -> i32; 2643 pub fn sceAudioOutputPannedBlocking( 2644 channel: i32, 2645 left_vol: i32, 2646 right_vol: i32, 2647 buf: *mut c_void, 2648 ) -> i32; 2649 pub fn sceAudioGetChannelRestLen(channel: i32) -> i32; 2650 pub fn sceAudioGetChannelRestLength(channel: i32) -> i32; 2651 pub fn sceAudioSetChannelDataLen(channel: i32, sample_count: i32) -> i32; 2652 pub fn sceAudioChangeChannelConfig( 2653 channel: i32, 2654 format: AudioFormat, 2655 ) -> i32; 2656 pub fn sceAudioChangeChannelVolume( 2657 channel: i32, 2658 left_vol: i32, 2659 right_vol: i32, 2660 ) -> i32; 2661 pub fn sceAudioOutput2Reserve(sample_count: i32) -> i32; 2662 pub fn sceAudioOutput2Release() -> i32; 2663 pub fn sceAudioOutput2ChangeLength(sample_count: i32) -> i32; 2664 pub fn sceAudioOutput2OutputBlocking(vol: i32, buf: *mut c_void) -> i32; 2665 pub fn sceAudioOutput2GetRestSample() -> i32; 2666 pub fn sceAudioSRCChReserve( 2667 sample_count: i32, 2668 freq: AudioOutputFrequency, 2669 channels: i32, 2670 ) -> i32; 2671 pub fn sceAudioSRCChRelease() -> i32; 2672 pub fn sceAudioSRCOutputBlocking(vol: i32, buf: *mut c_void) -> i32; 2673 pub fn sceAudioInputInit(unknown1: i32, gain: i32, unknown2: i32) -> i32; 2674 pub fn sceAudioInputInitEx(params: *mut AudioInputParams) -> i32; 2675 pub fn sceAudioInputBlocking( 2676 sample_count: i32, 2677 freq: AudioInputFrequency, 2678 buf: *mut c_void, 2679 ); 2680 pub fn sceAudioInput( 2681 sample_count: i32, 2682 freq: AudioInputFrequency, 2683 buf: *mut c_void, 2684 ); 2685 pub fn sceAudioGetInputLength() -> i32; 2686 pub fn sceAudioWaitInputEnd() -> i32; 2687 pub fn sceAudioPollInputEnd() -> i32; 2688 2689 pub fn sceAtracGetAtracID(ui_codec_type: u32) -> i32; 2690 pub fn sceAtracSetDataAndGetID(buf: *mut c_void, bufsize: usize) -> i32; 2691 pub fn sceAtracDecodeData( 2692 atrac_id: i32, 2693 out_samples: *mut u16, 2694 out_n: *mut i32, 2695 out_end: *mut i32, 2696 out_remain_frame: *mut i32, 2697 ) -> i32; 2698 pub fn sceAtracGetRemainFrame( 2699 atrac_id: i32, 2700 out_remain_frame: *mut i32, 2701 ) -> i32; 2702 pub fn sceAtracGetStreamDataInfo( 2703 atrac_id: i32, 2704 write_pointer: *mut *mut u8, 2705 available_bytes: *mut u32, 2706 read_offset: *mut u32, 2707 ) -> i32; 2708 pub fn sceAtracAddStreamData(atrac_id: i32, bytes_to_add: u32) -> i32; 2709 pub fn sceAtracGetBitrate(atrac_id: i32, out_bitrate: *mut i32) -> i32; 2710 pub fn sceAtracSetLoopNum(atrac_id: i32, nloops: i32) -> i32; 2711 pub fn sceAtracReleaseAtracID(atrac_id: i32) -> i32; 2712 pub fn sceAtracGetNextSample(atrac_id: i32, out_n: *mut i32) -> i32; 2713 pub fn sceAtracGetMaxSample(atrac_id: i32, out_max: *mut i32) -> i32; 2714 pub fn sceAtracGetBufferInfoForReseting( 2715 atrac_id: i32, 2716 ui_sample: u32, 2717 pbuffer_info: *mut Atrac3BufferInfo, 2718 ) -> i32; 2719 pub fn sceAtracGetChannel(atrac_id: i32, pui_channel: *mut u32) -> i32; 2720 pub fn sceAtracGetInternalErrorInfo( 2721 atrac_id: i32, 2722 pi_result: *mut i32, 2723 ) -> i32; 2724 pub fn sceAtracGetLoopStatus( 2725 atrac_id: i32, 2726 pi_loop_num: *mut i32, 2727 pui_loop_status: *mut u32, 2728 ) -> i32; 2729 pub fn sceAtracGetNextDecodePosition( 2730 atrac_id: i32, 2731 pui_sample_position: *mut u32, 2732 ) -> i32; 2733 pub fn sceAtracGetSecondBufferInfo( 2734 atrac_id: i32, 2735 pui_position: *mut u32, 2736 pui_data_byte: *mut u32, 2737 ) -> i32; 2738 pub fn sceAtracGetSoundSample( 2739 atrac_id: i32, 2740 pi_end_sample: *mut i32, 2741 pi_loop_start_sample: *mut i32, 2742 pi_loop_end_sample: *mut i32, 2743 ) -> i32; 2744 pub fn sceAtracResetPlayPosition( 2745 atrac_id: i32, 2746 ui_sample: u32, 2747 ui_write_byte_first_buf: u32, 2748 ui_write_byte_second_buf: u32, 2749 ) -> i32; 2750 pub fn sceAtracSetData( 2751 atrac_id: i32, 2752 puc_buffer_addr: *mut u8, 2753 ui_buffer_byte: u32, 2754 ) -> i32; 2755 pub fn sceAtracSetHalfwayBuffer( 2756 atrac_id: i32, 2757 puc_buffer_addr: *mut u8, 2758 ui_read_byte: u32, 2759 ui_buffer_byte: u32, 2760 ) -> i32; 2761 pub fn sceAtracSetHalfwayBufferAndGetID( 2762 puc_buffer_addr: *mut u8, 2763 ui_read_byte: u32, 2764 ui_buffer_byte: u32, 2765 ) -> i32; 2766 pub fn sceAtracSetSecondBuffer( 2767 atrac_id: i32, 2768 puc_second_buffer_addr: *mut u8, 2769 ui_second_buffer_byte: u32, 2770 ) -> i32; 2771 2772 pub fn sceCtrlSetSamplingCycle(cycle: i32) -> i32; 2773 pub fn sceCtrlGetSamplingCycle(pcycle: *mut i32) -> i32; 2774 pub fn sceCtrlSetSamplingMode(mode: CtrlMode) -> i32; 2775 pub fn sceCtrlGetSamplingMode(pmode: *mut i32) -> i32; 2776 pub fn sceCtrlPeekBufferPositive( 2777 pad_data: *mut SceCtrlData, 2778 count: i32, 2779 ) -> i32; 2780 pub fn sceCtrlPeekBufferNegative( 2781 pad_data: *mut SceCtrlData, 2782 count: i32, 2783 ) -> i32; 2784 pub fn sceCtrlReadBufferPositive( 2785 pad_data: *mut SceCtrlData, 2786 count: i32, 2787 ) -> i32; 2788 pub fn sceCtrlReadBufferNegative( 2789 pad_data: *mut SceCtrlData, 2790 count: i32, 2791 ) -> i32; 2792 pub fn sceCtrlPeekLatch(latch_data: *mut SceCtrlLatch) -> i32; 2793 pub fn sceCtrlReadLatch(latch_data: *mut SceCtrlLatch) -> i32; 2794 pub fn sceCtrlSetIdleCancelThreshold(idlereset: i32, idleback: i32) 2795 -> i32; 2796 pub fn sceCtrlGetIdleCancelThreshold( 2797 idlereset: *mut i32, 2798 idleback: *mut i32, 2799 ) -> i32; 2800 2801 pub fn sceDisplaySetMode( 2802 mode: DisplayMode, 2803 width: usize, 2804 height: usize, 2805 ) -> u32; 2806 pub fn sceDisplayGetMode( 2807 pmode: *mut i32, 2808 pwidth: *mut i32, 2809 pheight: *mut i32, 2810 ) -> i32; 2811 pub fn sceDisplaySetFrameBuf( 2812 top_addr: *const u8, 2813 buffer_width: usize, 2814 pixel_format: DisplayPixelFormat, 2815 sync: DisplaySetBufSync, 2816 ) -> u32; 2817 pub fn sceDisplayGetFrameBuf( 2818 top_addr: *mut *mut c_void, 2819 buffer_width: *mut usize, 2820 pixel_format: *mut DisplayPixelFormat, 2821 sync: DisplaySetBufSync, 2822 ) -> i32; 2823 pub fn sceDisplayGetVcount() -> u32; 2824 pub fn sceDisplayWaitVblank() -> i32; 2825 pub fn sceDisplayWaitVblankCB() -> i32; 2826 pub fn sceDisplayWaitVblankStart() -> i32; 2827 pub fn sceDisplayWaitVblankStartCB() -> i32; 2828 pub fn sceDisplayGetAccumulatedHcount() -> i32; 2829 pub fn sceDisplayGetCurrentHcount() -> i32; 2830 pub fn sceDisplayGetFramePerSec() -> f32; 2831 pub fn sceDisplayIsForeground() -> i32; 2832 pub fn sceDisplayIsVblank() -> i32; 2833 2834 pub fn sceGeEdramGetSize() -> u32; 2835 pub fn sceGeEdramGetAddr() -> *mut u8; 2836 pub fn sceGeEdramSetAddrTranslation(width: i32) -> i32; 2837 pub fn sceGeGetCmd(cmd: i32) -> u32; 2838 pub fn sceGeGetMtx(type_: GeMatrixType, matrix: *mut c_void) -> i32; 2839 pub fn sceGeGetStack(stack_id: i32, stack: *mut GeStack) -> i32; 2840 pub fn sceGeSaveContext(context: *mut GeContext) -> i32; 2841 pub fn sceGeRestoreContext(context: *const GeContext) -> i32; 2842 pub fn sceGeListEnQueue( 2843 list: *const c_void, 2844 stall: *mut c_void, 2845 cbid: i32, 2846 arg: *mut GeListArgs, 2847 ) -> i32; 2848 pub fn sceGeListEnQueueHead( 2849 list: *const c_void, 2850 stall: *mut c_void, 2851 cbid: i32, 2852 arg: *mut GeListArgs, 2853 ) -> i32; 2854 pub fn sceGeListDeQueue(qid: i32) -> i32; 2855 pub fn sceGeListUpdateStallAddr(qid: i32, stall: *mut c_void) -> i32; 2856 pub fn sceGeListSync(qid: i32, sync_type: i32) -> GeListState; 2857 pub fn sceGeDrawSync(sync_type: i32) -> GeListState; 2858 pub fn sceGeBreak(mode: i32, p_param: *mut GeBreakParam) -> i32; 2859 pub fn sceGeContinue() -> i32; 2860 pub fn sceGeSetCallback(cb: *mut GeCallbackData) -> i32; 2861 pub fn sceGeUnsetCallback(cbid: i32) -> i32; 2862 2863 pub fn sceKernelExitGame(); 2864 pub fn sceKernelRegisterExitCallback(id: SceUid) -> i32; 2865 pub fn sceKernelLoadExec( 2866 file: *const u8, 2867 param: *mut SceKernelLoadExecParam, 2868 ) -> i32; 2869 2870 pub fn sceKernelAllocPartitionMemory( 2871 partition: SceSysMemPartitionId, 2872 name: *const u8, 2873 type_: SceSysMemBlockTypes, 2874 size: u32, 2875 addr: *mut c_void, 2876 ) -> SceUid; 2877 pub fn sceKernelGetBlockHeadAddr(blockid: SceUid) -> *mut c_void; 2878 pub fn sceKernelFreePartitionMemory(blockid: SceUid) -> i32; 2879 pub fn sceKernelTotalFreeMemSize() -> usize; 2880 pub fn sceKernelMaxFreeMemSize() -> usize; 2881 pub fn sceKernelDevkitVersion() -> u32; 2882 pub fn sceKernelSetCompiledSdkVersion(version: u32) -> i32; 2883 pub fn sceKernelGetCompiledSdkVersion() -> u32; 2884 2885 pub fn sceKernelLibcTime(t: *mut i32) -> i32; 2886 pub fn sceKernelLibcClock() -> u32; 2887 pub fn sceKernelLibcGettimeofday( 2888 tp: *mut timeval, 2889 tzp: *mut timezone, 2890 ) -> i32; 2891 pub fn sceKernelDcacheWritebackAll(); 2892 pub fn sceKernelDcacheWritebackInvalidateAll(); 2893 pub fn sceKernelDcacheWritebackRange(p: *const c_void, size: u32); 2894 pub fn sceKernelDcacheWritebackInvalidateRange( 2895 p: *const c_void, 2896 size: u32, 2897 ); 2898 pub fn sceKernelDcacheInvalidateRange(p: *const c_void, size: u32); 2899 pub fn sceKernelIcacheInvalidateAll(); 2900 pub fn sceKernelIcacheInvalidateRange(p: *const c_void, size: u32); 2901 pub fn sceKernelUtilsMt19937Init( 2902 ctx: *mut SceKernelUtilsMt19937Context, 2903 seed: u32, 2904 ) -> i32; 2905 pub fn sceKernelUtilsMt19937UInt( 2906 ctx: *mut SceKernelUtilsMt19937Context, 2907 ) -> u32; 2908 pub fn sceKernelUtilsMd5Digest( 2909 data: *mut u8, 2910 size: u32, 2911 digest: *mut u8, 2912 ) -> i32; 2913 pub fn sceKernelUtilsMd5BlockInit( 2914 ctx: *mut SceKernelUtilsMd5Context, 2915 ) -> i32; 2916 pub fn sceKernelUtilsMd5BlockUpdate( 2917 ctx: *mut SceKernelUtilsMd5Context, 2918 data: *mut u8, 2919 size: u32, 2920 ) -> i32; 2921 pub fn sceKernelUtilsMd5BlockResult( 2922 ctx: *mut SceKernelUtilsMd5Context, 2923 digest: *mut u8, 2924 ) -> i32; 2925 pub fn sceKernelUtilsSha1Digest( 2926 data: *mut u8, 2927 size: u32, 2928 digest: *mut u8, 2929 ) -> i32; 2930 pub fn sceKernelUtilsSha1BlockInit( 2931 ctx: *mut SceKernelUtilsSha1Context, 2932 ) -> i32; 2933 pub fn sceKernelUtilsSha1BlockUpdate( 2934 ctx: *mut SceKernelUtilsSha1Context, 2935 data: *mut u8, 2936 size: u32, 2937 ) -> i32; 2938 pub fn sceKernelUtilsSha1BlockResult( 2939 ctx: *mut SceKernelUtilsSha1Context, 2940 digest: *mut u8, 2941 ) -> i32; 2942 2943 pub fn sceKernelRegisterSubIntrHandler( 2944 int_no: i32, 2945 no: i32, 2946 handler: *mut c_void, 2947 arg: *mut c_void, 2948 ) -> i32; 2949 pub fn sceKernelReleaseSubIntrHandler(int_no: i32, no: i32) -> i32; 2950 pub fn sceKernelEnableSubIntr(int_no: i32, no: i32) -> i32; 2951 pub fn sceKernelDisableSubIntr(int_no: i32, no: i32) -> i32; 2952 pub fn QueryIntrHandlerInfo( 2953 intr_code: SceUid, 2954 sub_intr_code: SceUid, 2955 data: *mut IntrHandlerOptionParam, 2956 ) -> i32; 2957 2958 pub fn sceKernelCpuSuspendIntr() -> u32; 2959 pub fn sceKernelCpuResumeIntr(flags: u32); 2960 pub fn sceKernelCpuResumeIntrWithSync(flags: u32); 2961 pub fn sceKernelIsCpuIntrSuspended(flags: u32) -> i32; 2962 pub fn sceKernelIsCpuIntrEnable() -> i32; 2963 2964 pub fn sceKernelLoadModule( 2965 path: *const u8, 2966 flags: i32, 2967 option: *mut SceKernelLMOption, 2968 ) -> SceUid; 2969 pub fn sceKernelLoadModuleMs( 2970 path: *const u8, 2971 flags: i32, 2972 option: *mut SceKernelLMOption, 2973 ) -> SceUid; 2974 pub fn sceKernelLoadModuleByID( 2975 fid: SceUid, 2976 flags: i32, 2977 option: *mut SceKernelLMOption, 2978 ) -> SceUid; 2979 pub fn sceKernelLoadModuleBufferUsbWlan( 2980 buf_size: usize, 2981 buf: *mut c_void, 2982 flags: i32, 2983 option: *mut SceKernelLMOption, 2984 ) -> SceUid; 2985 pub fn sceKernelStartModule( 2986 mod_id: SceUid, 2987 arg_size: usize, 2988 argp: *mut c_void, 2989 status: *mut i32, 2990 option: *mut SceKernelSMOption, 2991 ) -> i32; 2992 pub fn sceKernelStopModule( 2993 mod_id: SceUid, 2994 arg_size: usize, 2995 argp: *mut c_void, 2996 status: *mut i32, 2997 option: *mut SceKernelSMOption, 2998 ) -> i32; 2999 pub fn sceKernelUnloadModule(mod_id: SceUid) -> i32; 3000 pub fn sceKernelSelfStopUnloadModule( 3001 unknown: i32, 3002 arg_size: usize, 3003 argp: *mut c_void, 3004 ) -> i32; 3005 pub fn sceKernelStopUnloadSelfModule( 3006 arg_size: usize, 3007 argp: *mut c_void, 3008 status: *mut i32, 3009 option: *mut SceKernelSMOption, 3010 ) -> i32; 3011 pub fn sceKernelQueryModuleInfo( 3012 mod_id: SceUid, 3013 info: *mut SceKernelModuleInfo, 3014 ) -> i32; 3015 pub fn sceKernelGetModuleIdList( 3016 read_buf: *mut SceUid, 3017 read_buf_size: i32, 3018 id_count: *mut i32, 3019 ) -> i32; 3020 3021 pub fn sceKernelVolatileMemLock( 3022 unk: i32, 3023 ptr: *mut *mut c_void, 3024 size: *mut i32, 3025 ) -> i32; 3026 pub fn sceKernelVolatileMemTryLock( 3027 unk: i32, 3028 ptr: *mut *mut c_void, 3029 size: *mut i32, 3030 ) -> i32; 3031 pub fn sceKernelVolatileMemUnlock(unk: i32) -> i32; 3032 3033 pub fn sceKernelStdin() -> SceUid; 3034 pub fn sceKernelStdout() -> SceUid; 3035 pub fn sceKernelStderr() -> SceUid; 3036 3037 pub fn sceKernelGetThreadmanIdType(uid: SceUid) -> SceKernelIdListType; 3038 pub fn sceKernelCreateThread( 3039 name: *const u8, 3040 entry: SceKernelThreadEntry, 3041 init_priority: i32, 3042 stack_size: i32, 3043 attr: i32, 3044 option: *mut SceKernelThreadOptParam, 3045 ) -> SceUid; 3046 pub fn sceKernelDeleteThread(thid: SceUid) -> i32; 3047 pub fn sceKernelStartThread( 3048 id: SceUid, 3049 arg_len: usize, 3050 arg_p: *mut c_void, 3051 ) -> i32; 3052 pub fn sceKernelExitThread(status: i32) -> i32; 3053 pub fn sceKernelExitDeleteThread(status: i32) -> i32; 3054 pub fn sceKernelTerminateThread(thid: SceUid) -> i32; 3055 pub fn sceKernelTerminateDeleteThread(thid: SceUid) -> i32; 3056 pub fn sceKernelSuspendDispatchThread() -> i32; 3057 pub fn sceKernelResumeDispatchThread(state: i32) -> i32; 3058 pub fn sceKernelSleepThread() -> i32; 3059 pub fn sceKernelSleepThreadCB() -> i32; 3060 pub fn sceKernelWakeupThread(thid: SceUid) -> i32; 3061 pub fn sceKernelCancelWakeupThread(thid: SceUid) -> i32; 3062 pub fn sceKernelSuspendThread(thid: SceUid) -> i32; 3063 pub fn sceKernelResumeThread(thid: SceUid) -> i32; 3064 pub fn sceKernelWaitThreadEnd(thid: SceUid, timeout: *mut u32) -> i32; 3065 pub fn sceKernelWaitThreadEndCB(thid: SceUid, timeout: *mut u32) -> i32; 3066 pub fn sceKernelDelayThread(delay: u32) -> i32; 3067 pub fn sceKernelDelayThreadCB(delay: u32) -> i32; 3068 pub fn sceKernelDelaySysClockThread(delay: *mut SceKernelSysClock) -> i32; 3069 pub fn sceKernelDelaySysClockThreadCB( 3070 delay: *mut SceKernelSysClock, 3071 ) -> i32; 3072 pub fn sceKernelChangeCurrentThreadAttr(unknown: i32, attr: i32) -> i32; 3073 pub fn sceKernelChangeThreadPriority(thid: SceUid, priority: i32) -> i32; 3074 pub fn sceKernelRotateThreadReadyQueue(priority: i32) -> i32; 3075 pub fn sceKernelReleaseWaitThread(thid: SceUid) -> i32; 3076 pub fn sceKernelGetThreadId() -> i32; 3077 pub fn sceKernelGetThreadCurrentPriority() -> i32; 3078 pub fn sceKernelGetThreadExitStatus(thid: SceUid) -> i32; 3079 pub fn sceKernelCheckThreadStack() -> i32; 3080 pub fn sceKernelGetThreadStackFreeSize(thid: SceUid) -> i32; 3081 pub fn sceKernelReferThreadStatus( 3082 thid: SceUid, 3083 info: *mut SceKernelThreadInfo, 3084 ) -> i32; 3085 pub fn sceKernelReferThreadRunStatus( 3086 thid: SceUid, 3087 status: *mut SceKernelThreadRunStatus, 3088 ) -> i32; 3089 pub fn sceKernelCreateSema( 3090 name: *const u8, 3091 attr: u32, 3092 init_val: i32, 3093 max_val: i32, 3094 option: *mut SceKernelSemaOptParam, 3095 ) -> SceUid; 3096 pub fn sceKernelDeleteSema(sema_id: SceUid) -> i32; 3097 pub fn sceKernelSignalSema(sema_id: SceUid, signal: i32) -> i32; 3098 pub fn sceKernelWaitSema( 3099 sema_id: SceUid, 3100 signal: i32, 3101 timeout: *mut u32, 3102 ) -> i32; 3103 pub fn sceKernelWaitSemaCB( 3104 sema_id: SceUid, 3105 signal: i32, 3106 timeout: *mut u32, 3107 ) -> i32; 3108 pub fn sceKernelPollSema(sema_id: SceUid, signal: i32) -> i32; 3109 pub fn sceKernelReferSemaStatus( 3110 sema_id: SceUid, 3111 info: *mut SceKernelSemaInfo, 3112 ) -> i32; 3113 pub fn sceKernelCreateEventFlag( 3114 name: *const u8, 3115 attr: i32, 3116 bits: i32, 3117 opt: *mut SceKernelEventFlagOptParam, 3118 ) -> SceUid; 3119 pub fn sceKernelSetEventFlag(ev_id: SceUid, bits: u32) -> i32; 3120 pub fn sceKernelClearEventFlag(ev_id: SceUid, bits: u32) -> i32; 3121 pub fn sceKernelPollEventFlag( 3122 ev_id: SceUid, 3123 bits: u32, 3124 wait: i32, 3125 out_bits: *mut u32, 3126 ) -> i32; 3127 pub fn sceKernelWaitEventFlag( 3128 ev_id: SceUid, 3129 bits: u32, 3130 wait: i32, 3131 out_bits: *mut u32, 3132 timeout: *mut u32, 3133 ) -> i32; 3134 pub fn sceKernelWaitEventFlagCB( 3135 ev_id: SceUid, 3136 bits: u32, 3137 wait: i32, 3138 out_bits: *mut u32, 3139 timeout: *mut u32, 3140 ) -> i32; 3141 pub fn sceKernelDeleteEventFlag(ev_id: SceUid) -> i32; 3142 pub fn sceKernelReferEventFlagStatus( 3143 event: SceUid, 3144 status: *mut SceKernelEventFlagInfo, 3145 ) -> i32; 3146 pub fn sceKernelCreateMbx( 3147 name: *const u8, 3148 attr: u32, 3149 option: *mut SceKernelMbxOptParam, 3150 ) -> SceUid; 3151 pub fn sceKernelDeleteMbx(mbx_id: SceUid) -> i32; 3152 pub fn sceKernelSendMbx(mbx_id: SceUid, message: *mut c_void) -> i32; 3153 pub fn sceKernelReceiveMbx( 3154 mbx_id: SceUid, 3155 message: *mut *mut c_void, 3156 timeout: *mut u32, 3157 ) -> i32; 3158 pub fn sceKernelReceiveMbxCB( 3159 mbx_id: SceUid, 3160 message: *mut *mut c_void, 3161 timeout: *mut u32, 3162 ) -> i32; 3163 pub fn sceKernelPollMbx(mbx_id: SceUid, pmessage: *mut *mut c_void) 3164 -> i32; 3165 pub fn sceKernelCancelReceiveMbx(mbx_id: SceUid, num: *mut i32) -> i32; 3166 pub fn sceKernelReferMbxStatus( 3167 mbx_id: SceUid, 3168 info: *mut SceKernelMbxInfo, 3169 ) -> i32; 3170 pub fn sceKernelSetAlarm( 3171 clock: u32, 3172 handler: SceKernelAlarmHandler, 3173 common: *mut c_void, 3174 ) -> SceUid; 3175 pub fn sceKernelSetSysClockAlarm( 3176 clock: *mut SceKernelSysClock, 3177 handler: *mut SceKernelAlarmHandler, 3178 common: *mut c_void, 3179 ) -> SceUid; 3180 pub fn sceKernelCancelAlarm(alarm_id: SceUid) -> i32; 3181 pub fn sceKernelReferAlarmStatus( 3182 alarm_id: SceUid, 3183 info: *mut SceKernelAlarmInfo, 3184 ) -> i32; 3185 pub fn sceKernelCreateCallback( 3186 name: *const u8, 3187 func: SceKernelCallbackFunction, 3188 arg: *mut c_void, 3189 ) -> SceUid; 3190 pub fn sceKernelReferCallbackStatus( 3191 cb: SceUid, 3192 status: *mut SceKernelCallbackInfo, 3193 ) -> i32; 3194 pub fn sceKernelDeleteCallback(cb: SceUid) -> i32; 3195 pub fn sceKernelNotifyCallback(cb: SceUid, arg2: i32) -> i32; 3196 pub fn sceKernelCancelCallback(cb: SceUid) -> i32; 3197 pub fn sceKernelGetCallbackCount(cb: SceUid) -> i32; 3198 pub fn sceKernelCheckCallback() -> i32; 3199 pub fn sceKernelGetThreadmanIdList( 3200 type_: SceKernelIdListType, 3201 read_buf: *mut SceUid, 3202 read_buf_size: i32, 3203 id_count: *mut i32, 3204 ) -> i32; 3205 pub fn sceKernelReferSystemStatus( 3206 status: *mut SceKernelSystemStatus, 3207 ) -> i32; 3208 pub fn sceKernelCreateMsgPipe( 3209 name: *const u8, 3210 part: i32, 3211 attr: i32, 3212 unk1: *mut c_void, 3213 opt: *mut c_void, 3214 ) -> SceUid; 3215 pub fn sceKernelDeleteMsgPipe(uid: SceUid) -> i32; 3216 pub fn sceKernelSendMsgPipe( 3217 uid: SceUid, 3218 message: *mut c_void, 3219 size: u32, 3220 unk1: i32, 3221 unk2: *mut c_void, 3222 timeout: *mut u32, 3223 ) -> i32; 3224 pub fn sceKernelSendMsgPipeCB( 3225 uid: SceUid, 3226 message: *mut c_void, 3227 size: u32, 3228 unk1: i32, 3229 unk2: *mut c_void, 3230 timeout: *mut u32, 3231 ) -> i32; 3232 pub fn sceKernelTrySendMsgPipe( 3233 uid: SceUid, 3234 message: *mut c_void, 3235 size: u32, 3236 unk1: i32, 3237 unk2: *mut c_void, 3238 ) -> i32; 3239 pub fn sceKernelReceiveMsgPipe( 3240 uid: SceUid, 3241 message: *mut c_void, 3242 size: u32, 3243 unk1: i32, 3244 unk2: *mut c_void, 3245 timeout: *mut u32, 3246 ) -> i32; 3247 pub fn sceKernelReceiveMsgPipeCB( 3248 uid: SceUid, 3249 message: *mut c_void, 3250 size: u32, 3251 unk1: i32, 3252 unk2: *mut c_void, 3253 timeout: *mut u32, 3254 ) -> i32; 3255 pub fn sceKernelTryReceiveMsgPipe( 3256 uid: SceUid, 3257 message: *mut c_void, 3258 size: u32, 3259 unk1: i32, 3260 unk2: *mut c_void, 3261 ) -> i32; 3262 pub fn sceKernelCancelMsgPipe( 3263 uid: SceUid, 3264 send: *mut i32, 3265 recv: *mut i32, 3266 ) -> i32; 3267 pub fn sceKernelReferMsgPipeStatus( 3268 uid: SceUid, 3269 info: *mut SceKernelMppInfo, 3270 ) -> i32; 3271 pub fn sceKernelCreateVpl( 3272 name: *const u8, 3273 part: i32, 3274 attr: i32, 3275 size: u32, 3276 opt: *mut SceKernelVplOptParam, 3277 ) -> SceUid; 3278 pub fn sceKernelDeleteVpl(uid: SceUid) -> i32; 3279 pub fn sceKernelAllocateVpl( 3280 uid: SceUid, 3281 size: u32, 3282 data: *mut *mut c_void, 3283 timeout: *mut u32, 3284 ) -> i32; 3285 pub fn sceKernelAllocateVplCB( 3286 uid: SceUid, 3287 size: u32, 3288 data: *mut *mut c_void, 3289 timeout: *mut u32, 3290 ) -> i32; 3291 pub fn sceKernelTryAllocateVpl( 3292 uid: SceUid, 3293 size: u32, 3294 data: *mut *mut c_void, 3295 ) -> i32; 3296 pub fn sceKernelFreeVpl(uid: SceUid, data: *mut c_void) -> i32; 3297 pub fn sceKernelCancelVpl(uid: SceUid, num: *mut i32) -> i32; 3298 pub fn sceKernelReferVplStatus( 3299 uid: SceUid, 3300 info: *mut SceKernelVplInfo, 3301 ) -> i32; 3302 pub fn sceKernelCreateFpl( 3303 name: *const u8, 3304 part: i32, 3305 attr: i32, 3306 size: u32, 3307 blocks: u32, 3308 opt: *mut SceKernelFplOptParam, 3309 ) -> i32; 3310 pub fn sceKernelDeleteFpl(uid: SceUid) -> i32; 3311 pub fn sceKernelAllocateFpl( 3312 uid: SceUid, 3313 data: *mut *mut c_void, 3314 timeout: *mut u32, 3315 ) -> i32; 3316 pub fn sceKernelAllocateFplCB( 3317 uid: SceUid, 3318 data: *mut *mut c_void, 3319 timeout: *mut u32, 3320 ) -> i32; 3321 pub fn sceKernelTryAllocateFpl(uid: SceUid, data: *mut *mut c_void) 3322 -> i32; 3323 pub fn sceKernelFreeFpl(uid: SceUid, data: *mut c_void) -> i32; 3324 pub fn sceKernelCancelFpl(uid: SceUid, pnum: *mut i32) -> i32; 3325 pub fn sceKernelReferFplStatus( 3326 uid: SceUid, 3327 info: *mut SceKernelFplInfo, 3328 ) -> i32; 3329 pub fn sceKernelUSec2SysClock( 3330 usec: u32, 3331 clock: *mut SceKernelSysClock, 3332 ) -> i32; 3333 pub fn sceKernelUSec2SysClockWide(usec: u32) -> i64; 3334 pub fn sceKernelSysClock2USec( 3335 clock: *mut SceKernelSysClock, 3336 low: *mut u32, 3337 high: *mut u32, 3338 ) -> i32; 3339 pub fn sceKernelSysClock2USecWide( 3340 clock: i64, 3341 low: *mut u32, 3342 high: *mut u32, 3343 ) -> i32; 3344 pub fn sceKernelGetSystemTime(time: *mut SceKernelSysClock) -> i32; 3345 pub fn sceKernelGetSystemTimeWide() -> i64; 3346 pub fn sceKernelGetSystemTimeLow() -> u32; 3347 pub fn sceKernelCreateVTimer( 3348 name: *const u8, 3349 opt: *mut SceKernelVTimerOptParam, 3350 ) -> SceUid; 3351 pub fn sceKernelDeleteVTimer(uid: SceUid) -> i32; 3352 pub fn sceKernelGetVTimerBase( 3353 uid: SceUid, 3354 base: *mut SceKernelSysClock, 3355 ) -> i32; 3356 pub fn sceKernelGetVTimerBaseWide(uid: SceUid) -> i64; 3357 pub fn sceKernelGetVTimerTime( 3358 uid: SceUid, 3359 time: *mut SceKernelSysClock, 3360 ) -> i32; 3361 pub fn sceKernelGetVTimerTimeWide(uid: SceUid) -> i64; 3362 pub fn sceKernelSetVTimerTime( 3363 uid: SceUid, 3364 time: *mut SceKernelSysClock, 3365 ) -> i32; 3366 pub fn sceKernelSetVTimerTimeWide(uid: SceUid, time: i64) -> i64; 3367 pub fn sceKernelStartVTimer(uid: SceUid) -> i32; 3368 pub fn sceKernelStopVTimer(uid: SceUid) -> i32; 3369 pub fn sceKernelSetVTimerHandler( 3370 uid: SceUid, 3371 time: *mut SceKernelSysClock, 3372 handler: SceKernelVTimerHandler, 3373 common: *mut c_void, 3374 ) -> i32; 3375 pub fn sceKernelSetVTimerHandlerWide( 3376 uid: SceUid, 3377 time: i64, 3378 handler: SceKernelVTimerHandlerWide, 3379 common: *mut c_void, 3380 ) -> i32; 3381 pub fn sceKernelCancelVTimerHandler(uid: SceUid) -> i32; 3382 pub fn sceKernelReferVTimerStatus( 3383 uid: SceUid, 3384 info: *mut SceKernelVTimerInfo, 3385 ) -> i32; 3386 pub fn sceKernelRegisterThreadEventHandler( 3387 name: *const u8, 3388 thread_id: SceUid, 3389 mask: i32, 3390 handler: SceKernelThreadEventHandler, 3391 common: *mut c_void, 3392 ) -> SceUid; 3393 pub fn sceKernelReleaseThreadEventHandler(uid: SceUid) -> i32; 3394 pub fn sceKernelReferThreadEventHandlerStatus( 3395 uid: SceUid, 3396 info: *mut SceKernelThreadEventHandlerInfo, 3397 ) -> i32; 3398 pub fn sceKernelReferThreadProfiler() -> *mut DebugProfilerRegs; 3399 pub fn sceKernelReferGlobalProfiler() -> *mut DebugProfilerRegs; 3400 3401 pub fn sceUsbStart( 3402 driver_name: *const u8, 3403 size: i32, 3404 args: *mut c_void, 3405 ) -> i32; 3406 pub fn sceUsbStop( 3407 driver_name: *const u8, 3408 size: i32, 3409 args: *mut c_void, 3410 ) -> i32; 3411 pub fn sceUsbActivate(pid: u32) -> i32; 3412 pub fn sceUsbDeactivate(pid: u32) -> i32; 3413 pub fn sceUsbGetState() -> i32; 3414 pub fn sceUsbGetDrvState(driver_name: *const u8) -> i32; 3415 } 3416 3417 extern "C" { 3418 pub fn sceUsbCamSetupStill(param: *mut UsbCamSetupStillParam) -> i32; 3419 pub fn sceUsbCamSetupStillEx(param: *mut UsbCamSetupStillExParam) -> i32; 3420 pub fn sceUsbCamStillInputBlocking(buf: *mut u8, size: usize) -> i32; 3421 pub fn sceUsbCamStillInput(buf: *mut u8, size: usize) -> i32; 3422 pub fn sceUsbCamStillWaitInputEnd() -> i32; 3423 pub fn sceUsbCamStillPollInputEnd() -> i32; 3424 pub fn sceUsbCamStillCancelInput() -> i32; 3425 pub fn sceUsbCamStillGetInputLength() -> i32; 3426 pub fn sceUsbCamSetupVideo( 3427 param: *mut UsbCamSetupVideoParam, 3428 work_area: *mut c_void, 3429 work_area_size: i32, 3430 ) -> i32; 3431 pub fn sceUsbCamSetupVideoEx( 3432 param: *mut UsbCamSetupVideoExParam, 3433 work_area: *mut c_void, 3434 work_area_size: i32, 3435 ) -> i32; 3436 pub fn sceUsbCamStartVideo() -> i32; 3437 pub fn sceUsbCamStopVideo() -> i32; 3438 pub fn sceUsbCamReadVideoFrameBlocking(buf: *mut u8, size: usize) -> i32; 3439 pub fn sceUsbCamReadVideoFrame(buf: *mut u8, size: usize) -> i32; 3440 pub fn sceUsbCamWaitReadVideoFrameEnd() -> i32; 3441 pub fn sceUsbCamPollReadVideoFrameEnd() -> i32; 3442 pub fn sceUsbCamGetReadVideoFrameSize() -> i32; 3443 pub fn sceUsbCamSetSaturation(saturation: i32) -> i32; 3444 pub fn sceUsbCamSetBrightness(brightness: i32) -> i32; 3445 pub fn sceUsbCamSetContrast(contrast: i32) -> i32; 3446 pub fn sceUsbCamSetSharpness(sharpness: i32) -> i32; 3447 pub fn sceUsbCamSetImageEffectMode(effect_mode: UsbCamEffectMode) -> i32; 3448 pub fn sceUsbCamSetEvLevel(exposure_level: UsbCamEvLevel) -> i32; 3449 pub fn sceUsbCamSetReverseMode(reverse_flags: i32) -> i32; 3450 pub fn sceUsbCamSetZoom(zoom: i32) -> i32; 3451 pub fn sceUsbCamGetSaturation(saturation: *mut i32) -> i32; 3452 pub fn sceUsbCamGetBrightness(brightness: *mut i32) -> i32; 3453 pub fn sceUsbCamGetContrast(contrast: *mut i32) -> i32; 3454 pub fn sceUsbCamGetSharpness(sharpness: *mut i32) -> i32; 3455 pub fn sceUsbCamGetImageEffectMode( 3456 effect_mode: *mut UsbCamEffectMode, 3457 ) -> i32; 3458 pub fn sceUsbCamGetEvLevel(exposure_level: *mut UsbCamEvLevel) -> i32; 3459 pub fn sceUsbCamGetReverseMode(reverse_flags: *mut i32) -> i32; 3460 pub fn sceUsbCamGetZoom(zoom: *mut i32) -> i32; 3461 pub fn sceUsbCamAutoImageReverseSW(on: i32) -> i32; 3462 pub fn sceUsbCamGetAutoImageReverseState() -> i32; 3463 pub fn sceUsbCamGetLensDirection() -> i32; 3464 3465 pub fn sceUsbstorBootRegisterNotify(event_flag: SceUid) -> i32; 3466 pub fn sceUsbstorBootUnregisterNotify(event_flag: u32) -> i32; 3467 pub fn sceUsbstorBootSetCapacity(size: u32) -> i32; 3468 3469 pub fn scePowerRegisterCallback(slot: i32, cbid: SceUid) -> i32; 3470 pub fn scePowerUnregisterCallback(slot: i32) -> i32; 3471 pub fn scePowerIsPowerOnline() -> i32; 3472 pub fn scePowerIsBatteryExist() -> i32; 3473 pub fn scePowerIsBatteryCharging() -> i32; 3474 pub fn scePowerGetBatteryChargingStatus() -> i32; 3475 pub fn scePowerIsLowBattery() -> i32; 3476 pub fn scePowerGetBatteryLifePercent() -> i32; 3477 pub fn scePowerGetBatteryLifeTime() -> i32; 3478 pub fn scePowerGetBatteryTemp() -> i32; 3479 pub fn scePowerGetBatteryElec() -> i32; 3480 pub fn scePowerGetBatteryVolt() -> i32; 3481 pub fn scePowerSetCpuClockFrequency(cpufreq: i32) -> i32; 3482 pub fn scePowerSetBusClockFrequency(busfreq: i32) -> i32; 3483 pub fn scePowerGetCpuClockFrequency() -> i32; 3484 pub fn scePowerGetCpuClockFrequencyInt() -> i32; 3485 pub fn scePowerGetCpuClockFrequencyFloat() -> f32; 3486 pub fn scePowerGetBusClockFrequency() -> i32; 3487 pub fn scePowerGetBusClockFrequencyInt() -> i32; 3488 pub fn scePowerGetBusClockFrequencyFloat() -> f32; 3489 pub fn scePowerSetClockFrequency( 3490 pllfreq: i32, 3491 cpufreq: i32, 3492 busfreq: i32, 3493 ) -> i32; 3494 pub fn scePowerLock(unknown: i32) -> i32; 3495 pub fn scePowerUnlock(unknown: i32) -> i32; 3496 pub fn scePowerTick(t: PowerTick) -> i32; 3497 pub fn scePowerGetIdleTimer() -> i32; 3498 pub fn scePowerIdleTimerEnable(unknown: i32) -> i32; 3499 pub fn scePowerIdleTimerDisable(unknown: i32) -> i32; 3500 pub fn scePowerRequestStandby() -> i32; 3501 pub fn scePowerRequestSuspend() -> i32; 3502 3503 pub fn sceWlanDevIsPowerOn() -> i32; 3504 pub fn sceWlanGetSwitchState() -> i32; 3505 pub fn sceWlanGetEtherAddr(ether_addr: *mut u8) -> i32; 3506 3507 pub fn sceWlanDevAttach() -> i32; 3508 pub fn sceWlanDevDetach() -> i32; 3509 3510 pub fn sceRtcGetTickResolution() -> u32; 3511 pub fn sceRtcGetCurrentTick(tick: *mut u64) -> i32; 3512 pub fn sceRtcGetCurrentClock(tm: *mut ScePspDateTime, tz: i32) -> i32; 3513 pub fn sceRtcGetCurrentClockLocalTime(tm: *mut ScePspDateTime) -> i32; 3514 pub fn sceRtcConvertUtcToLocalTime( 3515 tick_utc: *const u64, 3516 tick_local: *mut u64, 3517 ) -> i32; 3518 pub fn sceRtcConvertLocalTimeToUTC( 3519 tick_local: *const u64, 3520 tick_utc: *mut u64, 3521 ) -> i32; 3522 pub fn sceRtcIsLeapYear(year: i32) -> i32; 3523 pub fn sceRtcGetDaysInMonth(year: i32, month: i32) -> i32; 3524 pub fn sceRtcGetDayOfWeek(year: i32, month: i32, day: i32) -> i32; 3525 pub fn sceRtcCheckValid(date: *const ScePspDateTime) -> i32; 3526 pub fn sceRtcSetTick(date: *mut ScePspDateTime, tick: *const u64) -> i32; 3527 pub fn sceRtcGetTick(date: *const ScePspDateTime, tick: *mut u64) -> i32; 3528 pub fn sceRtcCompareTick(tick1: *const u64, tick2: *const u64) -> i32; 3529 pub fn sceRtcTickAddTicks( 3530 dest_tick: *mut u64, 3531 src_tick: *const u64, 3532 num_ticks: u64, 3533 ) -> i32; 3534 pub fn sceRtcTickAddMicroseconds( 3535 dest_tick: *mut u64, 3536 src_tick: *const u64, 3537 num_ms: u64, 3538 ) -> i32; 3539 pub fn sceRtcTickAddSeconds( 3540 dest_tick: *mut u64, 3541 src_tick: *const u64, 3542 num_seconds: u64, 3543 ) -> i32; 3544 pub fn sceRtcTickAddMinutes( 3545 dest_tick: *mut u64, 3546 src_tick: *const u64, 3547 num_minutes: u64, 3548 ) -> i32; 3549 pub fn sceRtcTickAddHours( 3550 dest_tick: *mut u64, 3551 src_tick: *const u64, 3552 num_hours: u64, 3553 ) -> i32; 3554 pub fn sceRtcTickAddDays( 3555 dest_tick: *mut u64, 3556 src_tick: *const u64, 3557 num_days: u64, 3558 ) -> i32; 3559 pub fn sceRtcTickAddWeeks( 3560 dest_tick: *mut u64, 3561 src_tick: *const u64, 3562 num_weeks: u64, 3563 ) -> i32; 3564 pub fn sceRtcTickAddMonths( 3565 dest_tick: *mut u64, 3566 src_tick: *const u64, 3567 num_months: u64, 3568 ) -> i32; 3569 pub fn sceRtcTickAddYears( 3570 dest_tick: *mut u64, 3571 src_tick: *const u64, 3572 num_years: u64, 3573 ) -> i32; 3574 pub fn sceRtcSetTime_t(date: *mut ScePspDateTime, time: u32) -> i32; 3575 pub fn sceRtcGetTime_t(date: *const ScePspDateTime, time: *mut u32) 3576 -> i32; 3577 pub fn sceRtcSetTime64_t(date: *mut ScePspDateTime, time: u64) -> i32; 3578 pub fn sceRtcGetTime64_t( 3579 date: *const ScePspDateTime, 3580 time: *mut u64, 3581 ) -> i32; 3582 pub fn sceRtcSetDosTime(date: *mut ScePspDateTime, dos_time: u32) -> i32; 3583 pub fn sceRtcGetDosTime(date: *mut ScePspDateTime, dos_time: u32) -> i32; 3584 pub fn sceRtcSetWin32FileTime( 3585 date: *mut ScePspDateTime, 3586 time: *mut u64, 3587 ) -> i32; 3588 pub fn sceRtcGetWin32FileTime( 3589 date: *mut ScePspDateTime, 3590 time: *mut u64, 3591 ) -> i32; 3592 pub fn sceRtcParseDateTime( 3593 dest_tick: *mut u64, 3594 date_string: *const u8, 3595 ) -> i32; 3596 pub fn sceRtcFormatRFC3339( 3597 psz_date_time: *mut char, 3598 p_utc: *const u64, 3599 time_zone_minutes: i32, 3600 ) -> i32; 3601 pub fn sceRtcFormatRFC3339LocalTime( 3602 psz_date_time: *mut char, 3603 p_utc: *const u64, 3604 ) -> i32; 3605 pub fn sceRtcParseRFC3339( 3606 p_utc: *mut u64, 3607 psz_date_time: *const u8, 3608 ) -> i32; 3609 pub fn sceRtcFormatRFC2822( 3610 psz_date_time: *mut char, 3611 p_utc: *const u64, 3612 time_zone_minutes: i32, 3613 ) -> i32; 3614 pub fn sceRtcFormatRFC2822LocalTime( 3615 psz_date_time: *mut char, 3616 p_utc: *const u64, 3617 ) -> i32; 3618 3619 pub fn sceIoOpen( 3620 file: *const u8, 3621 flags: i32, 3622 permissions: IoPermissions, 3623 ) -> SceUid; 3624 pub fn sceIoOpenAsync( 3625 file: *const u8, 3626 flags: i32, 3627 permissions: IoPermissions, 3628 ) -> SceUid; 3629 pub fn sceIoClose(fd: SceUid) -> i32; 3630 pub fn sceIoCloseAsync(fd: SceUid) -> i32; 3631 pub fn sceIoRead(fd: SceUid, data: *mut c_void, size: u32) -> i32; 3632 pub fn sceIoReadAsync(fd: SceUid, data: *mut c_void, size: u32) -> i32; 3633 pub fn sceIoWrite(fd: SceUid, data: *const c_void, size: usize) -> i32; 3634 pub fn sceIoWriteAsync(fd: SceUid, data: *const c_void, size: u32) -> i32; 3635 pub fn sceIoLseek(fd: SceUid, offset: i64, whence: IoWhence) -> i64; 3636 pub fn sceIoLseekAsync(fd: SceUid, offset: i64, whence: IoWhence) -> i32; 3637 pub fn sceIoLseek32(fd: SceUid, offset: i32, whence: IoWhence) -> i32; 3638 pub fn sceIoLseek32Async(fd: SceUid, offset: i32, whence: IoWhence) 3639 -> i32; 3640 pub fn sceIoRemove(file: *const u8) -> i32; 3641 pub fn sceIoMkdir(dir: *const u8, mode: IoPermissions) -> i32; 3642 pub fn sceIoRmdir(path: *const u8) -> i32; 3643 pub fn sceIoChdir(path: *const u8) -> i32; 3644 pub fn sceIoRename(oldname: *const u8, newname: *const u8) -> i32; 3645 pub fn sceIoDopen(dirname: *const u8) -> SceUid; 3646 pub fn sceIoDread(fd: SceUid, dir: *mut SceIoDirent) -> i32; 3647 pub fn sceIoDclose(fd: SceUid) -> i32; 3648 pub fn sceIoDevctl( 3649 dev: *const u8, 3650 cmd: u32, 3651 indata: *mut c_void, 3652 inlen: i32, 3653 outdata: *mut c_void, 3654 outlen: i32, 3655 ) -> i32; 3656 pub fn sceIoAssign( 3657 dev1: *const u8, 3658 dev2: *const u8, 3659 dev3: *const u8, 3660 mode: IoAssignPerms, 3661 unk1: *mut c_void, 3662 unk2: i32, 3663 ) -> i32; 3664 pub fn sceIoUnassign(dev: *const u8) -> i32; 3665 pub fn sceIoGetstat(file: *const u8, stat: *mut SceIoStat) -> i32; 3666 pub fn sceIoChstat( 3667 file: *const u8, 3668 stat: *mut SceIoStat, 3669 bits: i32, 3670 ) -> i32; 3671 pub fn sceIoIoctl( 3672 fd: SceUid, 3673 cmd: u32, 3674 indata: *mut c_void, 3675 inlen: i32, 3676 outdata: *mut c_void, 3677 outlen: i32, 3678 ) -> i32; 3679 pub fn sceIoIoctlAsync( 3680 fd: SceUid, 3681 cmd: u32, 3682 indata: *mut c_void, 3683 inlen: i32, 3684 outdata: *mut c_void, 3685 outlen: i32, 3686 ) -> i32; 3687 pub fn sceIoSync(device: *const u8, unk: u32) -> i32; 3688 pub fn sceIoWaitAsync(fd: SceUid, res: *mut i64) -> i32; 3689 pub fn sceIoWaitAsyncCB(fd: SceUid, res: *mut i64) -> i32; 3690 pub fn sceIoPollAsync(fd: SceUid, res: *mut i64) -> i32; 3691 pub fn sceIoGetAsyncStat(fd: SceUid, poll: i32, res: *mut i64) -> i32; 3692 pub fn sceIoCancel(fd: SceUid) -> i32; 3693 pub fn sceIoGetDevType(fd: SceUid) -> i32; 3694 pub fn sceIoChangeAsyncPriority(fd: SceUid, pri: i32) -> i32; 3695 pub fn sceIoSetAsyncCallback( 3696 fd: SceUid, 3697 cb: SceUid, 3698 argp: *mut c_void, 3699 ) -> i32; 3700 3701 pub fn sceJpegInitMJpeg() -> i32; 3702 pub fn sceJpegFinishMJpeg() -> i32; 3703 pub fn sceJpegCreateMJpeg(width: i32, height: i32) -> i32; 3704 pub fn sceJpegDeleteMJpeg() -> i32; 3705 pub fn sceJpegDecodeMJpeg( 3706 jpeg_buf: *mut u8, 3707 size: usize, 3708 rgba: *mut c_void, 3709 unk: u32, 3710 ) -> i32; 3711 3712 pub fn sceUmdCheckMedium() -> i32; 3713 pub fn sceUmdGetDiscInfo(info: *mut UmdInfo) -> i32; 3714 pub fn sceUmdActivate(unit: i32, drive: *const u8) -> i32; 3715 pub fn sceUmdDeactivate(unit: i32, drive: *const u8) -> i32; 3716 pub fn sceUmdWaitDriveStat(state: i32) -> i32; 3717 pub fn sceUmdWaitDriveStatWithTimer(state: i32, timeout: u32) -> i32; 3718 pub fn sceUmdWaitDriveStatCB(state: i32, timeout: u32) -> i32; 3719 pub fn sceUmdCancelWaitDriveStat() -> i32; 3720 pub fn sceUmdGetDriveStat() -> i32; 3721 pub fn sceUmdGetErrorStat() -> i32; 3722 pub fn sceUmdRegisterUMDCallBack(cbid: i32) -> i32; 3723 pub fn sceUmdUnRegisterUMDCallBack(cbid: i32) -> i32; 3724 pub fn sceUmdReplacePermit() -> i32; 3725 pub fn sceUmdReplaceProhibit() -> i32; 3726 3727 pub fn sceMpegInit() -> i32; 3728 pub fn sceMpegFinish(); 3729 pub fn sceMpegRingbufferQueryMemSize(packets: i32) -> i32; 3730 pub fn sceMpegRingbufferConstruct( 3731 ringbuffer: *mut SceMpegRingbuffer, 3732 packets: i32, 3733 data: *mut c_void, 3734 size: i32, 3735 callback: SceMpegRingbufferCb, 3736 cb_param: *mut c_void, 3737 ) -> i32; 3738 pub fn sceMpegRingbufferDestruct(ringbuffer: *mut SceMpegRingbuffer); 3739 pub fn sceMpegRingbufferAvailableSize( 3740 ringbuffer: *mut SceMpegRingbuffer, 3741 ) -> i32; 3742 pub fn sceMpegRingbufferPut( 3743 ringbuffer: *mut SceMpegRingbuffer, 3744 num_packets: i32, 3745 available: i32, 3746 ) -> i32; 3747 pub fn sceMpegQueryMemSize(unk: i32) -> i32; 3748 pub fn sceMpegCreate( 3749 handle: SceMpeg, 3750 data: *mut c_void, 3751 size: i32, 3752 ringbuffer: *mut SceMpegRingbuffer, 3753 frame_width: i32, 3754 unk1: i32, 3755 unk2: i32, 3756 ) -> i32; 3757 pub fn sceMpegDelete(handle: SceMpeg); 3758 pub fn sceMpegQueryStreamOffset( 3759 handle: SceMpeg, 3760 buffer: *mut c_void, 3761 offset: *mut i32, 3762 ) -> i32; 3763 pub fn sceMpegQueryStreamSize(buffer: *mut c_void, size: *mut i32) -> i32; 3764 pub fn sceMpegRegistStream( 3765 handle: SceMpeg, 3766 stream_id: i32, 3767 unk: i32, 3768 ) -> SceMpegStream; 3769 pub fn sceMpegUnRegistStream(handle: SceMpeg, stream: SceMpegStream); 3770 pub fn sceMpegFlushAllStream(handle: SceMpeg) -> i32; 3771 pub fn sceMpegMallocAvcEsBuf(handle: SceMpeg) -> *mut c_void; 3772 pub fn sceMpegFreeAvcEsBuf(handle: SceMpeg, buf: *mut c_void); 3773 pub fn sceMpegQueryAtracEsSize( 3774 handle: SceMpeg, 3775 es_size: *mut i32, 3776 out_size: *mut i32, 3777 ) -> i32; 3778 pub fn sceMpegInitAu( 3779 handle: SceMpeg, 3780 es_buffer: *mut c_void, 3781 au: *mut SceMpegAu, 3782 ) -> i32; 3783 pub fn sceMpegGetAvcAu( 3784 handle: SceMpeg, 3785 stream: SceMpegStream, 3786 au: *mut SceMpegAu, 3787 unk: *mut i32, 3788 ) -> i32; 3789 pub fn sceMpegAvcDecodeMode( 3790 handle: SceMpeg, 3791 mode: *mut SceMpegAvcMode, 3792 ) -> i32; 3793 pub fn sceMpegAvcDecode( 3794 handle: SceMpeg, 3795 au: *mut SceMpegAu, 3796 iframe_width: i32, 3797 buffer: *mut c_void, 3798 init: *mut i32, 3799 ) -> i32; 3800 pub fn sceMpegAvcDecodeStop( 3801 handle: SceMpeg, 3802 frame_width: i32, 3803 buffer: *mut c_void, 3804 status: *mut i32, 3805 ) -> i32; 3806 pub fn sceMpegGetAtracAu( 3807 handle: SceMpeg, 3808 stream: SceMpegStream, 3809 au: *mut SceMpegAu, 3810 unk: *mut c_void, 3811 ) -> i32; 3812 pub fn sceMpegAtracDecode( 3813 handle: SceMpeg, 3814 au: *mut SceMpegAu, 3815 buffer: *mut c_void, 3816 init: i32, 3817 ) -> i32; 3818 3819 pub fn sceMpegBaseYCrCbCopyVme( 3820 yuv_buffer: *mut c_void, 3821 buffer: *mut i32, 3822 type_: i32, 3823 ) -> i32; 3824 pub fn sceMpegBaseCscInit(width: i32) -> i32; 3825 pub fn sceMpegBaseCscVme( 3826 rgb_buffer: *mut c_void, 3827 rgb_buffer2: *mut c_void, 3828 width: i32, 3829 y_cr_cb_buffer: *mut SceMpegYCrCbBuffer, 3830 ) -> i32; 3831 pub fn sceMpegbase_BEA18F91(lli: *mut SceMpegLLI) -> i32; 3832 3833 pub fn sceHprmPeekCurrentKey(key: *mut i32) -> i32; 3834 pub fn sceHprmPeekLatch(latch: *mut [u32; 4]) -> i32; 3835 pub fn sceHprmReadLatch(latch: *mut [u32; 4]) -> i32; 3836 pub fn sceHprmIsHeadphoneExist() -> i32; 3837 pub fn sceHprmIsRemoteExist() -> i32; 3838 pub fn sceHprmIsMicrophoneExist() -> i32; 3839 3840 pub fn sceGuDepthBuffer(zbp: *mut c_void, zbw: i32); 3841 pub fn sceGuDispBuffer( 3842 width: i32, 3843 height: i32, 3844 dispbp: *mut c_void, 3845 dispbw: i32, 3846 ); 3847 pub fn sceGuDrawBuffer( 3848 psm: DisplayPixelFormat, 3849 fbp: *mut c_void, 3850 fbw: i32, 3851 ); 3852 pub fn sceGuDrawBufferList( 3853 psm: DisplayPixelFormat, 3854 fbp: *mut c_void, 3855 fbw: i32, 3856 ); 3857 pub fn sceGuDisplay(state: bool) -> bool; 3858 pub fn sceGuDepthFunc(function: DepthFunc); 3859 pub fn sceGuDepthMask(mask: i32); 3860 pub fn sceGuDepthOffset(offset: i32); 3861 pub fn sceGuDepthRange(near: i32, far: i32); 3862 pub fn sceGuFog(near: f32, far: f32, color: u32); 3863 pub fn sceGuInit(); 3864 pub fn sceGuTerm(); 3865 pub fn sceGuBreak(mode: i32); 3866 pub fn sceGuContinue(); 3867 pub fn sceGuSetCallback( 3868 signal: GuCallbackId, 3869 callback: GuCallback, 3870 ) -> GuCallback; 3871 pub fn sceGuSignal(behavior: SignalBehavior, signal: i32); 3872 pub fn sceGuSendCommandf(cmd: GeCommand, argument: f32); 3873 pub fn sceGuSendCommandi(cmd: GeCommand, argument: i32); 3874 pub fn sceGuGetMemory(size: i32) -> *mut c_void; 3875 pub fn sceGuStart(context_type: GuContextType, list: *mut c_void); 3876 pub fn sceGuFinish() -> i32; 3877 pub fn sceGuFinishId(id: u32) -> i32; 3878 pub fn sceGuCallList(list: *const c_void); 3879 pub fn sceGuCallMode(mode: i32); 3880 pub fn sceGuCheckList() -> i32; 3881 pub fn sceGuSendList( 3882 mode: GuQueueMode, 3883 list: *const c_void, 3884 context: *mut GeContext, 3885 ); 3886 pub fn sceGuSwapBuffers() -> *mut c_void; 3887 pub fn sceGuSync( 3888 mode: GuSyncMode, 3889 behavior: GuSyncBehavior, 3890 ) -> GeListState; 3891 pub fn sceGuDrawArray( 3892 prim: GuPrimitive, 3893 vtype: i32, 3894 count: i32, 3895 indices: *const c_void, 3896 vertices: *const c_void, 3897 ); 3898 pub fn sceGuBeginObject( 3899 vtype: i32, 3900 count: i32, 3901 indices: *const c_void, 3902 vertices: *const c_void, 3903 ); 3904 pub fn sceGuEndObject(); 3905 pub fn sceGuSetStatus(state: GuState, status: i32); 3906 pub fn sceGuGetStatus(state: GuState) -> bool; 3907 pub fn sceGuSetAllStatus(status: i32); 3908 pub fn sceGuGetAllStatus() -> i32; 3909 pub fn sceGuEnable(state: GuState); 3910 pub fn sceGuDisable(state: GuState); 3911 pub fn sceGuLight( 3912 light: i32, 3913 type_: LightType, 3914 components: i32, 3915 position: &ScePspFVector3, 3916 ); 3917 pub fn sceGuLightAtt(light: i32, atten0: f32, atten1: f32, atten2: f32); 3918 pub fn sceGuLightColor(light: i32, component: i32, color: u32); 3919 pub fn sceGuLightMode(mode: LightMode); 3920 pub fn sceGuLightSpot( 3921 light: i32, 3922 direction: &ScePspFVector3, 3923 exponent: f32, 3924 cutoff: f32, 3925 ); 3926 pub fn sceGuClear(flags: i32); 3927 pub fn sceGuClearColor(color: u32); 3928 pub fn sceGuClearDepth(depth: u32); 3929 pub fn sceGuClearStencil(stencil: u32); 3930 pub fn sceGuPixelMask(mask: u32); 3931 pub fn sceGuColor(color: u32); 3932 pub fn sceGuColorFunc(func: ColorFunc, color: u32, mask: u32); 3933 pub fn sceGuColorMaterial(components: i32); 3934 pub fn sceGuAlphaFunc(func: AlphaFunc, value: i32, mask: i32); 3935 pub fn sceGuAmbient(color: u32); 3936 pub fn sceGuAmbientColor(color: u32); 3937 pub fn sceGuBlendFunc( 3938 op: BlendOp, 3939 src: BlendSrc, 3940 dest: BlendDst, 3941 src_fix: u32, 3942 dest_fix: u32, 3943 ); 3944 pub fn sceGuMaterial(components: i32, color: u32); 3945 pub fn sceGuModelColor( 3946 emissive: u32, 3947 ambient: u32, 3948 diffuse: u32, 3949 specular: u32, 3950 ); 3951 pub fn sceGuStencilFunc(func: StencilFunc, ref_: i32, mask: i32); 3952 pub fn sceGuStencilOp( 3953 fail: StencilOperation, 3954 zfail: StencilOperation, 3955 zpass: StencilOperation, 3956 ); 3957 pub fn sceGuSpecular(power: f32); 3958 pub fn sceGuFrontFace(order: FrontFaceDirection); 3959 pub fn sceGuLogicalOp(op: LogicalOperation); 3960 pub fn sceGuSetDither(matrix: &ScePspIMatrix4); 3961 pub fn sceGuShadeModel(mode: ShadingModel); 3962 pub fn sceGuCopyImage( 3963 psm: DisplayPixelFormat, 3964 sx: i32, 3965 sy: i32, 3966 width: i32, 3967 height: i32, 3968 srcw: i32, 3969 src: *mut c_void, 3970 dx: i32, 3971 dy: i32, 3972 destw: i32, 3973 dest: *mut c_void, 3974 ); 3975 pub fn sceGuTexEnvColor(color: u32); 3976 pub fn sceGuTexFilter(min: TextureFilter, mag: TextureFilter); 3977 pub fn sceGuTexFlush(); 3978 pub fn sceGuTexFunc(tfx: TextureEffect, tcc: TextureColorComponent); 3979 pub fn sceGuTexImage( 3980 mipmap: MipmapLevel, 3981 width: i32, 3982 height: i32, 3983 tbw: i32, 3984 tbp: *const c_void, 3985 ); 3986 pub fn sceGuTexLevelMode(mode: TextureLevelMode, bias: f32); 3987 pub fn sceGuTexMapMode(mode: TextureMapMode, a1: u32, a2: u32); 3988 pub fn sceGuTexMode( 3989 tpsm: TexturePixelFormat, 3990 maxmips: i32, 3991 a2: i32, 3992 swizzle: i32, 3993 ); 3994 pub fn sceGuTexOffset(u: f32, v: f32); 3995 pub fn sceGuTexProjMapMode(mode: TextureProjectionMapMode); 3996 pub fn sceGuTexScale(u: f32, v: f32); 3997 pub fn sceGuTexSlope(slope: f32); 3998 pub fn sceGuTexSync(); 3999 pub fn sceGuTexWrap(u: GuTexWrapMode, v: GuTexWrapMode); 4000 pub fn sceGuClutLoad(num_blocks: i32, cbp: *const c_void); 4001 pub fn sceGuClutMode( 4002 cpsm: ClutPixelFormat, 4003 shift: u32, 4004 mask: u32, 4005 a3: u32, 4006 ); 4007 pub fn sceGuOffset(x: u32, y: u32); 4008 pub fn sceGuScissor(x: i32, y: i32, w: i32, h: i32); 4009 pub fn sceGuViewport(cx: i32, cy: i32, width: i32, height: i32); 4010 pub fn sceGuDrawBezier( 4011 v_type: i32, 4012 u_count: i32, 4013 v_count: i32, 4014 indices: *const c_void, 4015 vertices: *const c_void, 4016 ); 4017 pub fn sceGuPatchDivide(ulevel: u32, vlevel: u32); 4018 pub fn sceGuPatchFrontFace(a0: u32); 4019 pub fn sceGuPatchPrim(prim: PatchPrimitive); 4020 pub fn sceGuDrawSpline( 4021 v_type: i32, 4022 u_count: i32, 4023 v_count: i32, 4024 u_edge: i32, 4025 v_edge: i32, 4026 indices: *const c_void, 4027 vertices: *const c_void, 4028 ); 4029 pub fn sceGuSetMatrix(type_: MatrixMode, matrix: &ScePspFMatrix4); 4030 pub fn sceGuBoneMatrix(index: u32, matrix: &ScePspFMatrix4); 4031 pub fn sceGuMorphWeight(index: i32, weight: f32); 4032 pub fn sceGuDrawArrayN( 4033 primitive_type: GuPrimitive, 4034 v_type: i32, 4035 count: i32, 4036 a3: i32, 4037 indices: *const c_void, 4038 vertices: *const c_void, 4039 ); 4040 4041 pub fn sceGumDrawArray( 4042 prim: GuPrimitive, 4043 v_type: i32, 4044 count: i32, 4045 indices: *const c_void, 4046 vertices: *const c_void, 4047 ); 4048 pub fn sceGumDrawArrayN( 4049 prim: GuPrimitive, 4050 v_type: i32, 4051 count: i32, 4052 a3: i32, 4053 indices: *const c_void, 4054 vertices: *const c_void, 4055 ); 4056 pub fn sceGumDrawBezier( 4057 v_type: i32, 4058 u_count: i32, 4059 v_count: i32, 4060 indices: *const c_void, 4061 vertices: *const c_void, 4062 ); 4063 pub fn sceGumDrawSpline( 4064 v_type: i32, 4065 u_count: i32, 4066 v_count: i32, 4067 u_edge: i32, 4068 v_edge: i32, 4069 indices: *const c_void, 4070 vertices: *const c_void, 4071 ); 4072 pub fn sceGumFastInverse(); 4073 pub fn sceGumFullInverse(); 4074 pub fn sceGumLoadIdentity(); 4075 pub fn sceGumLoadMatrix(m: &ScePspFMatrix4); 4076 pub fn sceGumLookAt( 4077 eye: &ScePspFVector3, 4078 center: &ScePspFVector3, 4079 up: &ScePspFVector3, 4080 ); 4081 pub fn sceGumMatrixMode(mode: MatrixMode); 4082 pub fn sceGumMultMatrix(m: &ScePspFMatrix4); 4083 pub fn sceGumOrtho( 4084 left: f32, 4085 right: f32, 4086 bottom: f32, 4087 top: f32, 4088 near: f32, 4089 far: f32, 4090 ); 4091 pub fn sceGumPerspective(fovy: f32, aspect: f32, near: f32, far: f32); 4092 pub fn sceGumPopMatrix(); 4093 pub fn sceGumPushMatrix(); 4094 pub fn sceGumRotateX(angle: f32); 4095 pub fn sceGumRotateY(angle: f32); 4096 pub fn sceGumRotateZ(angle: f32); 4097 pub fn sceGumRotateXYZ(v: &ScePspFVector3); 4098 pub fn sceGumRotateZYX(v: &ScePspFVector3); 4099 pub fn sceGumScale(v: &ScePspFVector3); 4100 pub fn sceGumStoreMatrix(m: &mut ScePspFMatrix4); 4101 pub fn sceGumTranslate(v: &ScePspFVector3); 4102 pub fn sceGumUpdateMatrix(); 4103 4104 pub fn sceMp3ReserveMp3Handle(args: *mut SceMp3InitArg) -> i32; 4105 pub fn sceMp3ReleaseMp3Handle(handle: Mp3Handle) -> i32; 4106 pub fn sceMp3InitResource() -> i32; 4107 pub fn sceMp3TermResource() -> i32; 4108 pub fn sceMp3Init(handle: Mp3Handle) -> i32; 4109 pub fn sceMp3Decode(handle: Mp3Handle, dst: *mut *mut i16) -> i32; 4110 pub fn sceMp3GetInfoToAddStreamData( 4111 handle: Mp3Handle, 4112 dst: *mut *mut u8, 4113 to_write: *mut i32, 4114 src_pos: *mut i32, 4115 ) -> i32; 4116 pub fn sceMp3NotifyAddStreamData(handle: Mp3Handle, size: i32) -> i32; 4117 pub fn sceMp3CheckStreamDataNeeded(handle: Mp3Handle) -> i32; 4118 pub fn sceMp3SetLoopNum(handle: Mp3Handle, loop_: i32) -> i32; 4119 pub fn sceMp3GetLoopNum(handle: Mp3Handle) -> i32; 4120 pub fn sceMp3GetSumDecodedSample(handle: Mp3Handle) -> i32; 4121 pub fn sceMp3GetMaxOutputSample(handle: Mp3Handle) -> i32; 4122 pub fn sceMp3GetSamplingRate(handle: Mp3Handle) -> i32; 4123 pub fn sceMp3GetBitRate(handle: Mp3Handle) -> i32; 4124 pub fn sceMp3GetMp3ChannelNum(handle: Mp3Handle) -> i32; 4125 pub fn sceMp3ResetPlayPosition(handle: Mp3Handle) -> i32; 4126 4127 pub fn sceRegOpenRegistry( 4128 reg: *mut Key, 4129 mode: i32, 4130 handle: *mut RegHandle, 4131 ) -> i32; 4132 pub fn sceRegFlushRegistry(handle: RegHandle) -> i32; 4133 pub fn sceRegCloseRegistry(handle: RegHandle) -> i32; 4134 pub fn sceRegOpenCategory( 4135 handle: RegHandle, 4136 name: *const u8, 4137 mode: i32, 4138 dir_handle: *mut RegHandle, 4139 ) -> i32; 4140 pub fn sceRegRemoveCategory(handle: RegHandle, name: *const u8) -> i32; 4141 pub fn sceRegCloseCategory(dir_handle: RegHandle) -> i32; 4142 pub fn sceRegFlushCategory(dir_handle: RegHandle) -> i32; 4143 pub fn sceRegGetKeyInfo( 4144 dir_handle: RegHandle, 4145 name: *const u8, 4146 key_handle: *mut RegHandle, 4147 type_: *mut KeyType, 4148 size: *mut usize, 4149 ) -> i32; 4150 pub fn sceRegGetKeyInfoByName( 4151 dir_handle: RegHandle, 4152 name: *const u8, 4153 type_: *mut KeyType, 4154 size: *mut usize, 4155 ) -> i32; 4156 pub fn sceRegGetKeyValue( 4157 dir_handle: RegHandle, 4158 key_handle: RegHandle, 4159 buf: *mut c_void, 4160 size: usize, 4161 ) -> i32; 4162 pub fn sceRegGetKeyValueByName( 4163 dir_handle: RegHandle, 4164 name: *const u8, 4165 buf: *mut c_void, 4166 size: usize, 4167 ) -> i32; 4168 pub fn sceRegSetKeyValue( 4169 dir_handle: RegHandle, 4170 name: *const u8, 4171 buf: *const c_void, 4172 size: usize, 4173 ) -> i32; 4174 pub fn sceRegGetKeysNum(dir_handle: RegHandle, num: *mut i32) -> i32; 4175 pub fn sceRegGetKeys(dir_handle: RegHandle, buf: *mut u8, num: i32) 4176 -> i32; 4177 pub fn sceRegCreateKey( 4178 dir_handle: RegHandle, 4179 name: *const u8, 4180 type_: i32, 4181 size: usize, 4182 ) -> i32; 4183 pub fn sceRegRemoveRegistry(key: *mut Key) -> i32; 4184 4185 pub fn sceOpenPSIDGetOpenPSID(openpsid: *mut OpenPSID) -> i32; 4186 4187 pub fn sceUtilityMsgDialogInitStart( 4188 params: *mut UtilityMsgDialogParams, 4189 ) -> i32; 4190 pub fn sceUtilityMsgDialogShutdownStart(); 4191 pub fn sceUtilityMsgDialogGetStatus() -> i32; 4192 pub fn sceUtilityMsgDialogUpdate(n: i32); 4193 pub fn sceUtilityMsgDialogAbort() -> i32; 4194 pub fn sceUtilityNetconfInitStart(data: *mut UtilityNetconfData) -> i32; 4195 pub fn sceUtilityNetconfShutdownStart() -> i32; 4196 pub fn sceUtilityNetconfUpdate(unknown: i32) -> i32; 4197 pub fn sceUtilityNetconfGetStatus() -> i32; 4198 pub fn sceUtilityCheckNetParam(id: i32) -> i32; 4199 pub fn sceUtilityGetNetParam( 4200 conf: i32, 4201 param: NetParam, 4202 data: *mut UtilityNetData, 4203 ) -> i32; 4204 pub fn sceUtilitySavedataInitStart( 4205 params: *mut SceUtilitySavedataParam, 4206 ) -> i32; 4207 pub fn sceUtilitySavedataGetStatus() -> i32; 4208 pub fn sceUtilitySavedataShutdownStart() -> i32; 4209 pub fn sceUtilitySavedataUpdate(unknown: i32); 4210 pub fn sceUtilityGameSharingInitStart( 4211 params: *mut UtilityGameSharingParams, 4212 ) -> i32; 4213 pub fn sceUtilityGameSharingShutdownStart(); 4214 pub fn sceUtilityGameSharingGetStatus() -> i32; 4215 pub fn sceUtilityGameSharingUpdate(n: i32); 4216 pub fn sceUtilityHtmlViewerInitStart( 4217 params: *mut UtilityHtmlViewerParam, 4218 ) -> i32; 4219 pub fn sceUtilityHtmlViewerShutdownStart() -> i32; 4220 pub fn sceUtilityHtmlViewerUpdate(n: i32) -> i32; 4221 pub fn sceUtilityHtmlViewerGetStatus() -> i32; 4222 pub fn sceUtilitySetSystemParamInt(id: SystemParamId, value: i32) -> i32; 4223 pub fn sceUtilitySetSystemParamString( 4224 id: SystemParamId, 4225 str: *const u8, 4226 ) -> i32; 4227 pub fn sceUtilityGetSystemParamInt( 4228 id: SystemParamId, 4229 value: *mut i32, 4230 ) -> i32; 4231 pub fn sceUtilityGetSystemParamString( 4232 id: SystemParamId, 4233 str: *mut u8, 4234 len: i32, 4235 ) -> i32; 4236 pub fn sceUtilityOskInitStart(params: *mut SceUtilityOskParams) -> i32; 4237 pub fn sceUtilityOskShutdownStart() -> i32; 4238 pub fn sceUtilityOskUpdate(n: i32) -> i32; 4239 pub fn sceUtilityOskGetStatus() -> i32; 4240 pub fn sceUtilityLoadNetModule(module: NetModule) -> i32; 4241 pub fn sceUtilityUnloadNetModule(module: NetModule) -> i32; 4242 pub fn sceUtilityLoadAvModule(module: AvModule) -> i32; 4243 pub fn sceUtilityUnloadAvModule(module: AvModule) -> i32; 4244 pub fn sceUtilityLoadUsbModule(module: UsbModule) -> i32; 4245 pub fn sceUtilityUnloadUsbModule(module: UsbModule) -> i32; 4246 pub fn sceUtilityLoadModule(module: Module) -> i32; 4247 pub fn sceUtilityUnloadModule(module: Module) -> i32; 4248 pub fn sceUtilityCreateNetParam(conf: i32) -> i32; 4249 pub fn sceUtilitySetNetParam(param: NetParam, val: *const c_void) -> i32; 4250 pub fn sceUtilityCopyNetParam(src: i32, dest: i32) -> i32; 4251 pub fn sceUtilityDeleteNetParam(conf: i32) -> i32; 4252 4253 pub fn sceNetInit( 4254 poolsize: i32, 4255 calloutprio: i32, 4256 calloutstack: i32, 4257 netintrprio: i32, 4258 netintrstack: i32, 4259 ) -> i32; 4260 pub fn sceNetTerm() -> i32; 4261 pub fn sceNetFreeThreadinfo(thid: i32) -> i32; 4262 pub fn sceNetThreadAbort(thid: i32) -> i32; 4263 pub fn sceNetEtherStrton(name: *mut u8, mac: *mut u8); 4264 pub fn sceNetEtherNtostr(mac: *mut u8, name: *mut u8); 4265 pub fn sceNetGetLocalEtherAddr(mac: *mut u8) -> i32; 4266 pub fn sceNetGetMallocStat(stat: *mut SceNetMallocStat) -> i32; 4267 4268 pub fn sceNetAdhocctlInit( 4269 stacksize: i32, 4270 priority: i32, 4271 adhoc_id: *mut SceNetAdhocctlAdhocId, 4272 ) -> i32; 4273 pub fn sceNetAdhocctlTerm() -> i32; 4274 pub fn sceNetAdhocctlConnect(name: *const u8) -> i32; 4275 pub fn sceNetAdhocctlDisconnect() -> i32; 4276 pub fn sceNetAdhocctlGetState(event: *mut i32) -> i32; 4277 pub fn sceNetAdhocctlCreate(name: *const u8) -> i32; 4278 pub fn sceNetAdhocctlJoin(scaninfo: *mut SceNetAdhocctlScanInfo) -> i32; 4279 pub fn sceNetAdhocctlGetAdhocId(id: *mut SceNetAdhocctlAdhocId) -> i32; 4280 pub fn sceNetAdhocctlCreateEnterGameMode( 4281 name: *const u8, 4282 unknown: i32, 4283 num: i32, 4284 macs: *mut u8, 4285 timeout: u32, 4286 unknown2: i32, 4287 ) -> i32; 4288 pub fn sceNetAdhocctlJoinEnterGameMode( 4289 name: *const u8, 4290 hostmac: *mut u8, 4291 timeout: u32, 4292 unknown: i32, 4293 ) -> i32; 4294 pub fn sceNetAdhocctlGetGameModeInfo( 4295 gamemodeinfo: *mut SceNetAdhocctlGameModeInfo, 4296 ) -> i32; 4297 pub fn sceNetAdhocctlExitGameMode() -> i32; 4298 pub fn sceNetAdhocctlGetPeerList( 4299 length: *mut i32, 4300 buf: *mut c_void, 4301 ) -> i32; 4302 pub fn sceNetAdhocctlGetPeerInfo( 4303 mac: *mut u8, 4304 size: i32, 4305 peerinfo: *mut SceNetAdhocctlPeerInfo, 4306 ) -> i32; 4307 pub fn sceNetAdhocctlScan() -> i32; 4308 pub fn sceNetAdhocctlGetScanInfo( 4309 length: *mut i32, 4310 buf: *mut c_void, 4311 ) -> i32; 4312 pub fn sceNetAdhocctlAddHandler( 4313 handler: SceNetAdhocctlHandler, 4314 unknown: *mut c_void, 4315 ) -> i32; 4316 pub fn sceNetAdhocctlDelHandler(id: i32) -> i32; 4317 pub fn sceNetAdhocctlGetNameByAddr(mac: *mut u8, nickname: *mut u8) 4318 -> i32; 4319 pub fn sceNetAdhocctlGetAddrByName( 4320 nickname: *mut u8, 4321 length: *mut i32, 4322 buf: *mut c_void, 4323 ) -> i32; 4324 pub fn sceNetAdhocctlGetParameter( 4325 params: *mut SceNetAdhocctlParams, 4326 ) -> i32; 4327 4328 pub fn sceNetAdhocInit() -> i32; 4329 pub fn sceNetAdhocTerm() -> i32; 4330 pub fn sceNetAdhocPdpCreate( 4331 mac: *mut u8, 4332 port: u16, 4333 buf_size: u32, 4334 unk1: i32, 4335 ) -> i32; 4336 pub fn sceNetAdhocPdpDelete(id: i32, unk1: i32) -> i32; 4337 pub fn sceNetAdhocPdpSend( 4338 id: i32, 4339 dest_mac_addr: *mut u8, 4340 port: u16, 4341 data: *mut c_void, 4342 len: u32, 4343 timeout: u32, 4344 nonblock: i32, 4345 ) -> i32; 4346 pub fn sceNetAdhocPdpRecv( 4347 id: i32, 4348 src_mac_addr: *mut u8, 4349 port: *mut u16, 4350 data: *mut c_void, 4351 data_length: *mut c_void, 4352 timeout: u32, 4353 nonblock: i32, 4354 ) -> i32; 4355 pub fn sceNetAdhocGetPdpStat( 4356 size: *mut i32, 4357 stat: *mut SceNetAdhocPdpStat, 4358 ) -> i32; 4359 pub fn sceNetAdhocGameModeCreateMaster( 4360 data: *mut c_void, 4361 size: i32, 4362 ) -> i32; 4363 pub fn sceNetAdhocGameModeCreateReplica( 4364 mac: *mut u8, 4365 data: *mut c_void, 4366 size: i32, 4367 ) -> i32; 4368 pub fn sceNetAdhocGameModeUpdateMaster() -> i32; 4369 pub fn sceNetAdhocGameModeUpdateReplica(id: i32, unk1: i32) -> i32; 4370 pub fn sceNetAdhocGameModeDeleteMaster() -> i32; 4371 pub fn sceNetAdhocGameModeDeleteReplica(id: i32) -> i32; 4372 pub fn sceNetAdhocPtpOpen( 4373 srcmac: *mut u8, 4374 srcport: u16, 4375 destmac: *mut u8, 4376 destport: u16, 4377 buf_size: u32, 4378 delay: u32, 4379 count: i32, 4380 unk1: i32, 4381 ) -> i32; 4382 pub fn sceNetAdhocPtpConnect(id: i32, timeout: u32, nonblock: i32) -> i32; 4383 pub fn sceNetAdhocPtpListen( 4384 srcmac: *mut u8, 4385 srcport: u16, 4386 buf_size: u32, 4387 delay: u32, 4388 count: i32, 4389 queue: i32, 4390 unk1: i32, 4391 ) -> i32; 4392 pub fn sceNetAdhocPtpAccept( 4393 id: i32, 4394 mac: *mut u8, 4395 port: *mut u16, 4396 timeout: u32, 4397 nonblock: i32, 4398 ) -> i32; 4399 pub fn sceNetAdhocPtpSend( 4400 id: i32, 4401 data: *mut c_void, 4402 data_size: *mut i32, 4403 timeout: u32, 4404 nonblock: i32, 4405 ) -> i32; 4406 pub fn sceNetAdhocPtpRecv( 4407 id: i32, 4408 data: *mut c_void, 4409 data_size: *mut i32, 4410 timeout: u32, 4411 nonblock: i32, 4412 ) -> i32; 4413 pub fn sceNetAdhocPtpFlush(id: i32, timeout: u32, nonblock: i32) -> i32; 4414 pub fn sceNetAdhocPtpClose(id: i32, unk1: i32) -> i32; 4415 pub fn sceNetAdhocGetPtpStat( 4416 size: *mut i32, 4417 stat: *mut SceNetAdhocPtpStat, 4418 ) -> i32; 4419 } 4420 4421 extern "C" { 4422 pub fn sceNetAdhocMatchingInit(memsize: i32) -> i32; 4423 pub fn sceNetAdhocMatchingTerm() -> i32; 4424 pub fn sceNetAdhocMatchingCreate( 4425 mode: AdhocMatchingMode, 4426 max_peers: i32, 4427 port: u16, 4428 buf_size: i32, 4429 hello_delay: u32, 4430 ping_delay: u32, 4431 init_count: i32, 4432 msg_delay: u32, 4433 callback: AdhocMatchingCallback, 4434 ) -> i32; 4435 pub fn sceNetAdhocMatchingDelete(matching_id: i32) -> i32; 4436 pub fn sceNetAdhocMatchingStart( 4437 matching_id: i32, 4438 evth_pri: i32, 4439 evth_stack: i32, 4440 inth_pri: i32, 4441 inth_stack: i32, 4442 opt_len: i32, 4443 opt_data: *mut c_void, 4444 ) -> i32; 4445 pub fn sceNetAdhocMatchingStop(matching_id: i32) -> i32; 4446 pub fn sceNetAdhocMatchingSelectTarget( 4447 matching_id: i32, 4448 mac: *mut u8, 4449 opt_len: i32, 4450 opt_data: *mut c_void, 4451 ) -> i32; 4452 pub fn sceNetAdhocMatchingCancelTarget( 4453 matching_id: i32, 4454 mac: *mut u8, 4455 ) -> i32; 4456 pub fn sceNetAdhocMatchingCancelTargetWithOpt( 4457 matching_id: i32, 4458 mac: *mut u8, 4459 opt_len: i32, 4460 opt_data: *mut c_void, 4461 ) -> i32; 4462 pub fn sceNetAdhocMatchingSendData( 4463 matching_id: i32, 4464 mac: *mut u8, 4465 data_len: i32, 4466 data: *mut c_void, 4467 ) -> i32; 4468 pub fn sceNetAdhocMatchingAbortSendData( 4469 matching_id: i32, 4470 mac: *mut u8, 4471 ) -> i32; 4472 pub fn sceNetAdhocMatchingSetHelloOpt( 4473 matching_id: i32, 4474 opt_len: i32, 4475 opt_data: *mut c_void, 4476 ) -> i32; 4477 pub fn sceNetAdhocMatchingGetHelloOpt( 4478 matching_id: i32, 4479 opt_len: *mut i32, 4480 opt_data: *mut c_void, 4481 ) -> i32; 4482 pub fn sceNetAdhocMatchingGetMembers( 4483 matching_id: i32, 4484 length: *mut i32, 4485 buf: *mut c_void, 4486 ) -> i32; 4487 pub fn sceNetAdhocMatchingGetPoolMaxAlloc() -> i32; 4488 pub fn sceNetAdhocMatchingGetPoolStat(poolstat: *mut AdhocPoolStat) 4489 -> i32; 4490 } 4491 4492 extern "C" { 4493 pub fn sceNetApctlInit(stack_size: i32, init_priority: i32) -> i32; 4494 pub fn sceNetApctlTerm() -> i32; 4495 pub fn sceNetApctlGetInfo( 4496 code: ApctlInfo, 4497 pinfo: *mut SceNetApctlInfo, 4498 ) -> i32; 4499 pub fn sceNetApctlAddHandler( 4500 handler: SceNetApctlHandler, 4501 parg: *mut c_void, 4502 ) -> i32; 4503 pub fn sceNetApctlDelHandler(handler_id: i32) -> i32; 4504 pub fn sceNetApctlConnect(conn_index: i32) -> i32; 4505 pub fn sceNetApctlDisconnect() -> i32; 4506 pub fn sceNetApctlGetState(pstate: *mut ApctlState) -> i32; 4507 4508 pub fn sceNetInetInit() -> i32; 4509 pub fn sceNetInetTerm() -> i32; 4510 pub fn sceNetInetAccept( 4511 s: i32, 4512 addr: *mut sockaddr, 4513 addr_len: *mut socklen_t, 4514 ) -> i32; 4515 pub fn sceNetInetBind( 4516 s: i32, 4517 my_addr: *const sockaddr, 4518 addr_len: socklen_t, 4519 ) -> i32; 4520 pub fn sceNetInetConnect( 4521 s: i32, 4522 serv_addr: *const sockaddr, 4523 addr_len: socklen_t, 4524 ) -> i32; 4525 pub fn sceNetInetGetsockopt( 4526 s: i32, 4527 level: i32, 4528 opt_name: i32, 4529 opt_val: *mut c_void, 4530 optl_en: *mut socklen_t, 4531 ) -> i32; 4532 pub fn sceNetInetListen(s: i32, backlog: i32) -> i32; 4533 pub fn sceNetInetRecv( 4534 s: i32, 4535 buf: *mut c_void, 4536 len: usize, 4537 flags: i32, 4538 ) -> usize; 4539 pub fn sceNetInetRecvfrom( 4540 s: i32, 4541 buf: *mut c_void, 4542 flags: usize, 4543 arg1: i32, 4544 from: *mut sockaddr, 4545 from_len: *mut socklen_t, 4546 ) -> usize; 4547 pub fn sceNetInetSend( 4548 s: i32, 4549 buf: *const c_void, 4550 len: usize, 4551 flags: i32, 4552 ) -> usize; 4553 pub fn sceNetInetSendto( 4554 s: i32, 4555 buf: *const c_void, 4556 len: usize, 4557 flags: i32, 4558 to: *const sockaddr, 4559 to_len: socklen_t, 4560 ) -> usize; 4561 pub fn sceNetInetSetsockopt( 4562 s: i32, 4563 level: i32, 4564 opt_name: i32, 4565 opt_val: *const c_void, 4566 opt_len: socklen_t, 4567 ) -> i32; 4568 pub fn sceNetInetShutdown(s: i32, how: i32) -> i32; 4569 pub fn sceNetInetSocket(domain: i32, type_: i32, protocol: i32) -> i32; 4570 pub fn sceNetInetClose(s: i32) -> i32; 4571 pub fn sceNetInetGetErrno() -> i32; 4572 4573 pub fn sceSslInit(unknown1: i32) -> i32; 4574 pub fn sceSslEnd() -> i32; 4575 pub fn sceSslGetUsedMemoryMax(memory: *mut u32) -> i32; 4576 pub fn sceSslGetUsedMemoryCurrent(memory: *mut u32) -> i32; 4577 4578 pub fn sceHttpInit(unknown1: u32) -> i32; 4579 pub fn sceHttpEnd() -> i32; 4580 pub fn sceHttpCreateTemplate( 4581 agent: *mut u8, 4582 unknown1: i32, 4583 unknown2: i32, 4584 ) -> i32; 4585 pub fn sceHttpDeleteTemplate(templateid: i32) -> i32; 4586 pub fn sceHttpCreateConnection( 4587 templateid: i32, 4588 host: *mut u8, 4589 unknown1: *mut u8, 4590 port: u16, 4591 unknown2: i32, 4592 ) -> i32; 4593 pub fn sceHttpCreateConnectionWithURL( 4594 templateid: i32, 4595 url: *const u8, 4596 unknown1: i32, 4597 ) -> i32; 4598 pub fn sceHttpDeleteConnection(connection_id: i32) -> i32; 4599 pub fn sceHttpCreateRequest( 4600 connection_id: i32, 4601 method: HttpMethod, 4602 path: *mut u8, 4603 content_length: u64, 4604 ) -> i32; 4605 pub fn sceHttpCreateRequestWithURL( 4606 connection_id: i32, 4607 method: HttpMethod, 4608 url: *mut u8, 4609 content_length: u64, 4610 ) -> i32; 4611 pub fn sceHttpDeleteRequest(request_id: i32) -> i32; 4612 pub fn sceHttpSendRequest( 4613 request_id: i32, 4614 data: *mut c_void, 4615 data_size: u32, 4616 ) -> i32; 4617 pub fn sceHttpAbortRequest(request_id: i32) -> i32; 4618 pub fn sceHttpReadData( 4619 request_id: i32, 4620 data: *mut c_void, 4621 data_size: u32, 4622 ) -> i32; 4623 pub fn sceHttpGetContentLength( 4624 request_id: i32, 4625 content_length: *mut u64, 4626 ) -> i32; 4627 pub fn sceHttpGetStatusCode(request_id: i32, status_code: *mut i32) 4628 -> i32; 4629 pub fn sceHttpSetResolveTimeOut(id: i32, timeout: u32) -> i32; 4630 pub fn sceHttpSetResolveRetry(id: i32, count: i32) -> i32; 4631 pub fn sceHttpSetConnectTimeOut(id: i32, timeout: u32) -> i32; 4632 pub fn sceHttpSetSendTimeOut(id: i32, timeout: u32) -> i32; 4633 pub fn sceHttpSetRecvTimeOut(id: i32, timeout: u32) -> i32; 4634 pub fn sceHttpEnableKeepAlive(id: i32) -> i32; 4635 pub fn sceHttpDisableKeepAlive(id: i32) -> i32; 4636 pub fn sceHttpEnableRedirect(id: i32) -> i32; 4637 pub fn sceHttpDisableRedirect(id: i32) -> i32; 4638 pub fn sceHttpEnableCookie(id: i32) -> i32; 4639 pub fn sceHttpDisableCookie(id: i32) -> i32; 4640 pub fn sceHttpSaveSystemCookie() -> i32; 4641 pub fn sceHttpLoadSystemCookie() -> i32; 4642 pub fn sceHttpAddExtraHeader( 4643 id: i32, 4644 name: *mut u8, 4645 value: *mut u8, 4646 unknown1: i32, 4647 ) -> i32; 4648 pub fn sceHttpDeleteHeader(id: i32, name: *const u8) -> i32; 4649 pub fn sceHttpsInit( 4650 unknown1: i32, 4651 unknown2: i32, 4652 unknown3: i32, 4653 unknown4: i32, 4654 ) -> i32; 4655 pub fn sceHttpsEnd() -> i32; 4656 pub fn sceHttpsLoadDefaultCert(unknown1: i32, unknown2: i32) -> i32; 4657 pub fn sceHttpDisableAuth(id: i32) -> i32; 4658 pub fn sceHttpDisableCache(id: i32) -> i32; 4659 pub fn sceHttpEnableAuth(id: i32) -> i32; 4660 pub fn sceHttpEnableCache(id: i32) -> i32; 4661 pub fn sceHttpEndCache() -> i32; 4662 pub fn sceHttpGetAllHeader( 4663 request: i32, 4664 header: *mut *mut u8, 4665 header_size: *mut u32, 4666 ) -> i32; 4667 pub fn sceHttpGetNetworkErrno(request: i32, err_num: *mut i32) -> i32; 4668 pub fn sceHttpGetProxy( 4669 id: i32, 4670 activate_flag: *mut i32, 4671 mode: *mut i32, 4672 proxy_host: *mut u8, 4673 len: usize, 4674 proxy_port: *mut u16, 4675 ) -> i32; 4676 pub fn sceHttpInitCache(max_size: usize) -> i32; 4677 pub fn sceHttpSetAuthInfoCB(id: i32, cbfunc: HttpPasswordCB) -> i32; 4678 pub fn sceHttpSetProxy( 4679 id: i32, 4680 activate_flag: i32, 4681 mode: i32, 4682 new_proxy_host: *const u8, 4683 new_proxy_port: u16, 4684 ) -> i32; 4685 pub fn sceHttpSetResHeaderMaxSize(id: i32, header_size: u32) -> i32; 4686 pub fn sceHttpSetMallocFunction( 4687 malloc_func: HttpMallocFunction, 4688 free_func: HttpFreeFunction, 4689 realloc_func: HttpReallocFunction, 4690 ) -> i32; 4691 4692 pub fn sceNetResolverInit() -> i32; 4693 pub fn sceNetResolverCreate( 4694 rid: *mut i32, 4695 buf: *mut c_void, 4696 buf_length: u32, 4697 ) -> i32; 4698 pub fn sceNetResolverDelete(rid: i32) -> i32; 4699 pub fn sceNetResolverStartNtoA( 4700 rid: i32, 4701 hostname: *const u8, 4702 addr: *mut in_addr, 4703 timeout: u32, 4704 retry: i32, 4705 ) -> i32; 4706 pub fn sceNetResolverStartAtoN( 4707 rid: i32, 4708 addr: *const in_addr, 4709 hostname: *mut u8, 4710 hostname_len: u32, 4711 timeout: u32, 4712 retry: i32, 4713 ) -> i32; 4714 pub fn sceNetResolverStop(rid: i32) -> i32; 4715 pub fn sceNetResolverTerm() -> i32; 4716 } 4717