# Interface JCSwapchainManagerType

All Superinterfaces:
  `AutoCloseable`

All Known Implementing Classes:
  `JCSwapchainManager`

public interface JCSwapchainManagerType extends AutoCloseable

A swapchain manager.

The manager is capable of creating swapchains, and transparently recreating them when they become suboptimal or invalid.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `JCSwapchainImageType`
  `acquire()`
  Acquire a swapchain image.
  `void`
  `close()`
  `Flow.Publisher<JCSwapchainEventType>`
  `events()`
  `Set<JCSwapchainImageIndex>`
  `imageIndices()`
  Get a set comprising the indices of the swapchain.

- ## Method Details

  - ### events

    Flow.Publisher<JCSwapchainEventType> events()
    Returns:
      The swapchain events

  - ### acquire

    JCSwapchainImageType acquire() throws VulkanException
    Acquire a swapchain image. The method is guaranteed to return an image that is usable (if not necessarily optimal) on the current device. In the case of an image being suboptimal, the swapchain will automatically be recreated at the earliest possible opportunity.
    Returns:
      A swapchain image
    Throws:
      `VulkanException` - On errors

  - ### imageIndices

    Set<JCSwapchainImageIndex> imageIndices()
    Get a set comprising the indices of the swapchain. This can be used as an index into a map to store per-frame resources externally.
    Returns:
      The set of swapchain image indices

  - ### close

    void close() throws VulkanException
    Specified by:
      `close` in interface `AutoCloseable`
    Throws:
      `VulkanException`