Skin.h 733 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #ifndef SPINE_SKIN_H_
  2. #define SPINE_SKIN_H_
  3. #include <spine/Attachment.h>
  4. #ifdef __cplusplus
  5. namespace spine {
  6. extern "C" {
  7. #endif
  8. typedef struct SkinEntry SkinEntry;
  9. struct SkinEntry {
  10. int slotIndex;
  11. const char* name;
  12. Attachment* attachment;
  13. const SkinEntry* next;
  14. };
  15. typedef struct {
  16. const char* const name;
  17. const SkinEntry* const entryList;
  18. } Skin;
  19. Skin* Skin_create (const char* name);
  20. void Skin_dispose (Skin* skin);
  21. /** The Skin owns the attachment. */
  22. void Skin_addAttachment (Skin* skin, int slotIndex, const char* name, Attachment* attachment);
  23. /** May return null. */
  24. Attachment* Skin_getAttachment (const Skin* skin, int slotIndex, const char* name);
  25. #ifdef __cplusplus
  26. }
  27. }
  28. #endif
  29. #endif /* SPINE_SKIN_H_ */