Skip to content

Commit dd42c27

Browse files
committed
cocoa: Add NSRunningApplication.processIdentifier
Signed-off-by: Ethan Uppal <[email protected]>
1 parent d7202b3 commit dd42c27

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cocoa/src/appkit.rs

+6
Original file line numberDiff line numberDiff line change
@@ -679,12 +679,18 @@ pub trait NSRunningApplication: Sized {
679679
runningApplicationWithProcessIdentifier: pid
680680
]
681681
}
682+
683+
unsafe fn processIdentifier(self) -> libc::pid_t;
682684
}
683685

684686
impl NSRunningApplication for id {
685687
unsafe fn activateWithOptions_(self, options: NSApplicationActivationOptions) -> BOOL {
686688
msg_send![self, activateWithOptions: options as NSUInteger]
687689
}
690+
691+
unsafe fn processIdentifier(self) -> libc::pid_t {
692+
msg_send![self, processIdentifier]
693+
}
688694
}
689695

690696
pub trait NSPasteboard: Sized {

0 commit comments

Comments
 (0)