1use super::*;
9
10pub enum MTLCommandQueue {}
12
13foreign_obj_type! {
14 type CType = MTLCommandQueue;
15 pub struct CommandQueue;
16}
17
18impl CommandQueueRef {
19 pub fn label(&self) -> &str {
20 unsafe {
21 let label = msg_send![self, label];
22 crate::nsstring_as_str(label)
23 }
24 }
25
26 pub fn set_label(&self, label: &str) {
27 unsafe {
28 let nslabel = crate::nsstring_from_str(label);
29 let () = msg_send![self, setLabel: nslabel];
30 }
31 }
32
33 pub fn new_command_buffer(&self) -> &CommandBufferRef {
34 unsafe { msg_send![self, commandBuffer] }
35 }
36
37 pub fn new_command_buffer_with_unretained_references(&self) -> &CommandBufferRef {
38 unsafe { msg_send![self, commandBufferWithUnretainedReferences] }
39 }
40
41 pub fn device(&self) -> &DeviceRef {
42 unsafe { msg_send![self, device] }
43 }
44}