Make WindowAttributes private (#2134)
* Make `WindowAttributes` private, and move its documentation * Reorder WindowAttributes title and fullscreen to match method order
This commit is contained in:
parent
eec84ade86
commit
44288f6280
14 changed files with 74 additions and 98 deletions
|
|
@ -641,7 +641,7 @@ pub struct PlatformSpecificWindowBuilderAttributes;
|
|||
pub struct Window;
|
||||
|
||||
impl Window {
|
||||
pub fn new<T: 'static>(
|
||||
pub(crate) fn new<T: 'static>(
|
||||
_el: &EventLoopWindowTarget<T>,
|
||||
_window_attrs: window::WindowAttributes,
|
||||
_: PlatformSpecificWindowBuilderAttributes,
|
||||
|
|
|
|||
|
|
@ -429,7 +429,7 @@ unsafe fn get_window_class() -> &'static Class {
|
|||
}
|
||||
|
||||
// requires main thread
|
||||
pub unsafe fn create_view(
|
||||
pub(crate) unsafe fn create_view(
|
||||
_window_attributes: &WindowAttributes,
|
||||
platform_attributes: &PlatformSpecificWindowBuilderAttributes,
|
||||
frame: CGRect,
|
||||
|
|
@ -449,7 +449,7 @@ pub unsafe fn create_view(
|
|||
}
|
||||
|
||||
// requires main thread
|
||||
pub unsafe fn create_view_controller(
|
||||
pub(crate) unsafe fn create_view_controller(
|
||||
_window_attributes: &WindowAttributes,
|
||||
platform_attributes: &PlatformSpecificWindowBuilderAttributes,
|
||||
view: id,
|
||||
|
|
@ -505,7 +505,7 @@ pub unsafe fn create_view_controller(
|
|||
}
|
||||
|
||||
// requires main thread
|
||||
pub unsafe fn create_window(
|
||||
pub(crate) unsafe fn create_window(
|
||||
window_attributes: &WindowAttributes,
|
||||
_platform_attributes: &PlatformSpecificWindowBuilderAttributes,
|
||||
frame: CGRect,
|
||||
|
|
|
|||
|
|
@ -375,7 +375,7 @@ impl DerefMut for Window {
|
|||
}
|
||||
|
||||
impl Window {
|
||||
pub fn new<T>(
|
||||
pub(crate) fn new<T>(
|
||||
_event_loop: &EventLoopWindowTarget<T>,
|
||||
window_attributes: WindowAttributes,
|
||||
platform_attributes: PlatformSpecificWindowBuilderAttributes,
|
||||
|
|
|
|||
|
|
@ -295,7 +295,7 @@ impl VideoMode {
|
|||
|
||||
impl Window {
|
||||
#[inline]
|
||||
pub fn new<T>(
|
||||
pub(crate) fn new<T>(
|
||||
window_target: &EventLoopWindowTarget<T>,
|
||||
attribs: WindowAttributes,
|
||||
pl_attribs: PlatformSpecificWindowBuilderAttributes,
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ pub struct Window {
|
|||
}
|
||||
|
||||
impl Window {
|
||||
pub fn new<T>(
|
||||
pub(crate) fn new<T>(
|
||||
event_loop_window_target: &EventLoopWindowTarget<T>,
|
||||
attributes: WindowAttributes,
|
||||
platform_attributes: PlatformAttributes,
|
||||
|
|
|
|||
|
|
@ -638,7 +638,7 @@ impl Deref for Window {
|
|||
}
|
||||
|
||||
impl Window {
|
||||
pub fn new<T>(
|
||||
pub(crate) fn new<T>(
|
||||
event_loop: &EventLoopWindowTarget<T>,
|
||||
attribs: WindowAttributes,
|
||||
pl_attribs: PlatformSpecificWindowBuilderAttributes,
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ pub struct UnownedWindow {
|
|||
}
|
||||
|
||||
impl UnownedWindow {
|
||||
pub fn new<T>(
|
||||
pub(crate) fn new<T>(
|
||||
event_loop: &EventLoopWindowTarget<T>,
|
||||
window_attrs: WindowAttributes,
|
||||
pl_attribs: PlatformSpecificWindowBuilderAttributes,
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ impl Deref for Window {
|
|||
}
|
||||
|
||||
impl Window {
|
||||
pub fn new<T: 'static>(
|
||||
pub(crate) fn new<T: 'static>(
|
||||
_window_target: &EventLoopWindowTarget<T>,
|
||||
attributes: WindowAttributes,
|
||||
pl_attribs: PlatformSpecificWindowBuilderAttributes,
|
||||
|
|
|
|||
|
|
@ -371,7 +371,7 @@ unsafe impl Send for UnownedWindow {}
|
|||
unsafe impl Sync for UnownedWindow {}
|
||||
|
||||
impl UnownedWindow {
|
||||
pub fn new(
|
||||
pub(crate) fn new(
|
||||
mut win_attribs: WindowAttributes,
|
||||
pl_attribs: PlatformSpecificWindowBuilderAttributes,
|
||||
) -> Result<(Arc<Self>, IdRef), RootOsError> {
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ pub struct Window {
|
|||
}
|
||||
|
||||
impl Window {
|
||||
pub fn new<T>(
|
||||
pub(crate) fn new<T>(
|
||||
target: &EventLoopWindowTarget<T>,
|
||||
attr: WindowAttributes,
|
||||
platform_attr: PlatformSpecificWindowBuilderAttributes,
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ pub struct Window {
|
|||
}
|
||||
|
||||
impl Window {
|
||||
pub fn new<T: 'static>(
|
||||
pub(crate) fn new<T: 'static>(
|
||||
event_loop: &EventLoopWindowTarget<T>,
|
||||
w_attr: WindowAttributes,
|
||||
pl_attr: PlatformSpecificWindowBuilderAttributes,
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ pub enum ImeState {
|
|||
}
|
||||
|
||||
impl WindowState {
|
||||
pub fn new(
|
||||
pub(crate) fn new(
|
||||
attributes: &WindowAttributes,
|
||||
taskbar_icon: Option<Icon>,
|
||||
scale_factor: f64,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue