import type { NobjcObject } from "objc-js";
import type { _MTLAccelerationStructureCommandEncoder } from "./MTLAccelerationStructureCommandEncoder.js";
import type { _MTLAccelerationStructurePassDescriptor } from "./MTLAccelerationStructurePassDescriptor.js";
import type { _MTLBlitCommandEncoder } from "./MTLBlitCommandEncoder.js";
import type { _MTLBlitPassDescriptor } from "./MTLBlitPassDescriptor.js";
import type { _MTLCommandQueue } from "./MTLCommandQueue.js";
import type { _MTLComputeCommandEncoder } from "./MTLComputeCommandEncoder.js";
import type { _MTLComputePassDescriptor } from "./MTLComputePassDescriptor.js";
import type { _MTLDevice } from "./MTLDevice.js";
import type { _MTLDrawable } from "./MTLDrawable.js";
import type { _MTLEvent } from "./MTLEvent.js";
import type { _MTLLogContainer } from "./MTLLogContainer.js";
import type { _MTLParallelRenderCommandEncoder } from "./MTLParallelRenderCommandEncoder.js";
import type { _MTLRenderCommandEncoder } from "./MTLRenderCommandEncoder.js";
import type { _MTLRenderPassDescriptor } from "./MTLRenderPassDescriptor.js";
import type { _MTLResidencySet } from "./MTLResidencySet.js";
import type { _MTLResourceStateCommandEncoder } from "./MTLResourceStateCommandEncoder.js";
import type { _MTLResourceStatePassDescriptor } from "./MTLResourceStatePassDescriptor.js";
import type { _NSError } from "../Foundation/NSError.js";
import type { _NSString } from "../Foundation/NSString.js";
import type { MTLCommandBufferErrorOption } from "./MTLCommandBufferErrorOption.js";
import type { MTLCommandBufferStatus } from "./MTLCommandBufferStatus.js";
import type { MTLDispatchType } from "./MTLDispatchType.js";
export interface _MTLCommandBuffer {
    /**
     * @method enqueue @abstract Append this command buffer to the end of its MTLCommandQueue.
     */
    enqueue?(): void;
    /**
     * @method commit @abstract Commit a command buffer so it can be executed as soon as possible.
     */
    commit?(): void;
    /**
     * @method addScheduledHandler:block: @abstract Adds a block to be called when this command buffer has been scheduled for execution.
     */
    addScheduledHandler$?(block: (arg0: _MTLCommandBuffer) => void): void;
    /**
     * @method presentDrawable: @abstract Add a drawable present that will be invoked when this command buffer has been scheduled for execution. @discussion The submission thread will be lock stepped with present call been serviced by window server
     */
    presentDrawable$?(drawable: _MTLDrawable): void;
    /**
     * @method presentDrawable:atTime: @abstract Add a drawable present for a specific host time that will be invoked when this command buffer has been scheduled for execution. @discussion The submission thread will be lock stepped with present call been serviced by window server
     */
    presentDrawable$atTime$?(drawable: _MTLDrawable, presentationTime: number): void;
    /**
     * @method presentDrawable:afterMinimumDuration: @abstract Add a drawable present for a specific host time that allows previous frame to be on screen for at least duration time. @param drawable The drawable to be presented @param duration The minimum time that previous frame should be displayed. The time is double preceision floating point in the unit of seconds. @discussion The difference of this API versus presentDrawable:atTime is that this API defers calculation of the presentation time until the previous frame's actual presentation time is known, thus to be able to maintain a more consistent and stable frame time. This also provides an easy way to set frame rate. The submission thread will be lock stepped with present call been serviced by window server
     */
    presentDrawable$afterMinimumDuration$?(drawable: _MTLDrawable, duration: number): void;
    /**
     * @method waitUntilScheduled @abstract Synchronously wait for this command buffer to be scheduled.
     */
    waitUntilScheduled?(): void;
    /**
     * @method addCompletedHandler:block: @abstract Add a block to be called when this command buffer has completed execution.
     */
    addCompletedHandler$?(block: (arg0: _MTLCommandBuffer) => void): void;
    /**
     * @method waitUntilCompleted @abstract Synchronously wait for this command buffer to complete.
     */
    waitUntilCompleted?(): void;
    /**
     * @method blitCommandEncoder @abstract returns a blit command encoder to encode into this command buffer.
     */
    blitCommandEncoder?(): _MTLBlitCommandEncoder | null;
    /**
     * @method renderCommandEncoderWithDescriptor: @abstract returns a render command endcoder to encode into this command buffer.
     */
    renderCommandEncoderWithDescriptor$?(renderPassDescriptor: _MTLRenderPassDescriptor): _MTLRenderCommandEncoder | null;
    /**
     * @method computeCommandEncoderWithDescriptor: @abstract returns a compute command endcoder to encode into this command buffer.
     */
    computeCommandEncoderWithDescriptor$?(computePassDescriptor: _MTLComputePassDescriptor): _MTLComputeCommandEncoder | null;
    /**
     * @method blitCommandEncoderWithDescriptor: @abstract returns a blit command endcoder to encode into this command buffer.
     */
    blitCommandEncoderWithDescriptor$?(blitPassDescriptor: _MTLBlitPassDescriptor): _MTLBlitCommandEncoder | null;
    /**
     * @method computeCommandEncoder @abstract returns a compute command encoder to encode into this command buffer.
     */
    computeCommandEncoder?(): _MTLComputeCommandEncoder | null;
    /**
     * @method computeCommandEncoderWithDispatchType @abstract returns a compute command encoder to encode into this command buffer. Optionally allow this command encoder to execute dispatches concurrently. @discussion On devices that do not support concurrent command encoders, this call is equivalent to computeCommandEncoder
     */
    computeCommandEncoderWithDispatchType$?(dispatchType: MTLDispatchType): _MTLComputeCommandEncoder | null;
    /**
     * @method encodeWaitForEvent:value: @abstract Encodes a command that pauses execution of this command buffer until the specified event reaches a given value. @discussion This method may only be called if there is no current command encoder on the receiver.
     */
    encodeWaitForEvent$value$?(event: _MTLEvent, value: number): void;
    /**
     * @method encodeSignalEvent:value: @abstract Encodes a command that signals an event with a given value. @discussion This method may only be called if there is no current command encoder on the receiver.
     */
    encodeSignalEvent$value$?(event: _MTLEvent, value: number): void;
    /**
     * @method parallelRenderCommandEncoderWithDescriptor: @abstract returns a parallel render pass encoder to encode into this command buffer.
     */
    parallelRenderCommandEncoderWithDescriptor$?(renderPassDescriptor: _MTLRenderPassDescriptor): _MTLParallelRenderCommandEncoder | null;
    resourceStateCommandEncoder?(): _MTLResourceStateCommandEncoder | null;
    resourceStateCommandEncoderWithDescriptor$?(resourceStatePassDescriptor: _MTLResourceStatePassDescriptor): _MTLResourceStateCommandEncoder | null;
    accelerationStructureCommandEncoder?(): _MTLAccelerationStructureCommandEncoder | null;
    accelerationStructureCommandEncoderWithDescriptor$?(descriptor: _MTLAccelerationStructurePassDescriptor): _MTLAccelerationStructureCommandEncoder;
    /**
     * @method pushDebugGroup: @abstract Push a new named string onto a stack of string labels.
     */
    pushDebugGroup$?(string_: _NSString): void;
    /** @method popDebugGroup @abstract Pop the latest named string off of the stack. */
    popDebugGroup?(): void;
    /**
     * @method useResidencySet @abstract Marks the residency set as part of the current command buffer execution. This ensures that the residency set is resident during execution of the command buffer.
     */
    useResidencySet$?(residencySet: _MTLResidencySet): void;
    /**
     * @method useResidencySets @abstract Marks the residency sets as part of the current command buffer execution. This ensures that the residency sets are resident during execution of the command buffer.
     */
    useResidencySets$count$?(residencySets: NobjcObject, count: number): void;
    /** @property device @abstract The device this resource was created against. */
    device?(): _MTLDevice;
    /**
     * @property commandQueue @abstract The command queue this command buffer was created from.
     */
    commandQueue?(): _MTLCommandQueue;
    /**
     * @property retainedReferences @abstract If YES, this command buffer holds strong references to objects needed to execute this command buffer.
     */
    retainedReferences?(): boolean;
    /**
     * @abstract The set of options configuring the error reporting of the created command buffer.
     */
    errorOptions?(): MTLCommandBufferErrorOption;
    /** @property label @abstract A string to help identify this object. */
    label?(): _NSString | null;
    setLabel$?(value: _NSString | null): void;
    kernelStartTime?(): number;
    kernelEndTime?(): number;
    /**
     * @property logs @abstract Logs generated by the command buffer during execution of the GPU commands. Valid after GPU execution is completed
     */
    logs?(): _MTLLogContainer;
    /**
     * @property GPUStartTime @abstract The host time in seconds that GPU starts executing this command buffer. Returns zero if it has not started. This usually can be called in command buffer completion handler.
     */
    GPUStartTime?(): number;
    /**
     * @property GPUEndTime @abstract The host time in seconds that GPU finishes executing this command buffer. Returns zero if CPU has not received completion notification. This usually can be called in command buffer completion handler.
     */
    GPUEndTime?(): number;
    /**
     * @property status @abstract status reports the current stage in the lifetime of MTLCommandBuffer, as it proceeds to enqueued, committed, scheduled, and completed.
     */
    status?(): MTLCommandBufferStatus;
    /**
     * @property error @abstract If an error occurred during execution, the NSError may contain more details about the problem.
     */
    error?(): _NSError | null;
}
