use flecs_ecs_derive::Component;
use crate::sys;
pub type BoolT = sys::ecs_bool_t;
pub type CharT = sys::ecs_char_t;
pub type U8T = sys::ecs_u8_t;
pub type U16T = sys::ecs_u16_t;
pub type U32T = sys::ecs_u32_t;
pub type U64T = sys::ecs_u64_t;
pub type UptrT = sys::ecs_uptr_t;
pub type I8T = sys::ecs_i8_t;
pub type I16T = sys::ecs_i16_t;
pub type I32T = sys::ecs_i32_t;
pub type I64T = sys::ecs_i64_t;
pub type IptrT = sys::ecs_iptr_t;
pub type F32T = sys::ecs_f32_t;
pub type F64T = sys::ecs_f64_t;
pub type EcsMember = sys::ecs_member_t;
pub type EcsEnumConstant = sys::ecs_enum_constant_t;
pub type EcsBitmaskConstant = sys::ecs_bitmask_constant_t;
#[allow(clippy::unnecessary_cast)]
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Component)]
pub enum EcsTypeKind {
PrimitiveType = sys::ecs_type_kind_t_EcsPrimitiveType as u32,
BitmaskType = sys::ecs_type_kind_t_EcsBitmaskType as u32,
EnumType = sys::ecs_type_kind_t_EcsEnumType as u32,
StructType = sys::ecs_type_kind_t_EcsStructType as u32,
ArrayType = sys::ecs_type_kind_t_EcsArrayType as u32,
VectorType = sys::ecs_type_kind_t_EcsVectorType as u32,
OpaqueType = sys::ecs_type_kind_t_EcsOpaqueType as u32,
}
impl EcsTypeKind {
pub fn last_type_kind() -> EcsTypeKind {
EcsTypeKind::OpaqueType
}
}
#[derive(Debug, Copy, Clone, Component)]
#[repr(C)]
pub struct EcsMetaType {
kind: EcsTypeKind,
existing: bool, partial: bool, }
#[derive(Debug, PartialEq, Eq, Component)]
#[repr(C)]
pub enum EcsPrimitiveKind {
Bool = 1,
Char,
Byte,
U8,
U16,
U32,
U64,
I8,
I16,
I32,
I64,
F32,
F64,
UPtr,
IPtr,
String,
Entity,
Id,
}
impl EcsPrimitiveKind {
pub fn last_primitive_kind() -> EcsPrimitiveKind {
EcsPrimitiveKind::Id
}
}