2020-03-16 17:10:43 +11:00
|
|
|
//! Represents settings for printing items. Backed by an `NSDictionary` in Objective-C, this struct
|
|
|
|
//! aims to make it easier to query/process printing operations.
|
|
|
|
|
|
|
|
use objc::runtime::Object;
|
|
|
|
use objc_id::ShareId;
|
|
|
|
|
2020-03-18 10:55:09 +11:00
|
|
|
use crate::foundation::id;
|
|
|
|
|
2020-03-16 17:10:43 +11:00
|
|
|
/// `PrintSettings` represents options used in printing, typically passed to you by the
|
|
|
|
/// application/user.
|
|
|
|
#[derive(Clone, Debug)]
|
|
|
|
pub struct PrintSettings {
|
|
|
|
pub inner: ShareId<Object>
|
|
|
|
}
|
|
|
|
|
|
|
|
impl PrintSettings {
|
|
|
|
/// Internal method, constructs a wrapper around the backing `NSDictionary` print settings.
|
|
|
|
pub(crate) fn with_inner(inner: id) -> Self {
|
|
|
|
PrintSettings {
|
|
|
|
inner: unsafe { ShareId::from_ptr(inner) }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|