Skip to content

Commit

Permalink
Add more autocomplete methods
Browse files Browse the repository at this point in the history
  • Loading branch information
SerafimArts committed Apr 11, 2020
1 parent 6d43aad commit 4b58971
Showing 1 changed file with 71 additions and 0 deletions.
71 changes: 71 additions & 0 deletions .phpstorm.meta.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
}

0 comments on commit 4b58971

Please sign in to comment.