diff --git a/.phpstorm.meta.php b/.phpstorm.meta.php index 13351d4..614dca1 100644 --- a/.phpstorm.meta.php +++ b/.phpstorm.meta.php @@ -142,4 +142,75 @@ ])); expectedArguments(\Serafim\SDL\SDL::new(), 0, argumentsSet('ffiCType')); expectedArguments(\Serafim\SDL\SDL::cast(), 0, argumentsSet('ffiCType')); + + override(\Serafim\SDL\Support\ProxyTrait::new(), map([ + '' => '@', + // mixed + "void *" => \FFI\CScalar::class, + + // floats + "float" => \FFI\CFloat::class, + "float *" => \FFI\CFloatPtr::class, + "float **" => \FFI\CFloatPtrPtr::class, + + "double" => \FFI\CFloat::class, + "double *" => \FFI\CFloatPtr::class, + "double **" => \FFI\CFloatPtrPtr::class, + + "long double" => \FFI\CFloat::class, + "long double *" => \FFI\CFloatPtr::class, + "long double **" => \FFI\CFloatPtrPtr::class, + // integers + "int" => \FFI\CInt::class, + "int *" => \FFI\CIntPtr::class, + "int **" => \FFI\CIntPtrPtr::class, + "uint8_t" => \FFI\CInt::class, + "uint8_t *" => \FFI\CIntPtr::class, + "uint8_t **" => \FFI\CIntPtrPtr::class, + + "int8_t" => \FFI\CInt::class, + "int8_t*" => \FFI\CIntPtr::class, + "int8_t *" => \FFI\CIntPtr::class, + "int8_t**" => \FFI\CIntPtrPtr::class, + "int8_t **" => \FFI\CIntPtrPtr::class, + + "uint16_t" => \FFI\CInt::class, + "uint16_t *" => \FFI\CIntPtr::class, + "uint16_t **" => \FFI\CIntPtrPtr::class, + + "int16_t" => \FFI\CInt::class, + "int16_t *" => \FFI\CIntPtr::class, + "int16_t **" => \FFI\CIntPtrPtr::class, + + "uint32_t" => \FFI\CInt::class, + "uint32_t *" => \FFI\CIntPtr::class, + "uint32_t **" => \FFI\CIntPtrPtr::class, + + "int32_t" => \FFI\CInt::class, + "int32_t *" => \FFI\CIntPtr::class, + "int32_t **" => \FFI\CIntPtrPtr::class, + + "uint64_t" => \FFI\CInt::class, + "uint64_t *" => \FFI\CIntPtr::class, + "uint64_t **" => \FFI\CIntPtrPtr::class, + + "int64_t" => \FFI\CInt::class, + "int64_t *" => \FFI\CIntPtr::class, + "int64_t **" => \FFI\CIntPtrPtr::class, + + // bool + "bool" => \FFI\CBool::class, + "bool *" => \FFI\CBoolPtr::class, + "bool **" => \FFI\CBoolPtrPtr::class, + + // string + "char" => \FFI\CChar::class, + "char *" => \FFI\CStringPtr::class, + "char **" => \FFI\CStringPtrPtr::class, + ])); + override(\Serafim\SDL\Support\ProxyTrait::addr(), map([ + '' => '@Ptr', + ])); + expectedArguments(\Serafim\SDL\Support\ProxyTrait::new(), 0, argumentsSet('ffiCType')); + expectedArguments(\Serafim\SDL\Support\ProxyTrait::cast(), 0, argumentsSet('ffiCType')); }