Skip to content

Commit df57099

Browse files
committed
Add docs
1 parent e1c3331 commit df57099

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/appkit/app/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ impl App {
224224
});
225225
}
226226

227+
/// Sends an update() message to each onscreen window.
227228
pub fn update_windows() {
228229
shared_application(|app| unsafe {
229230
let _: () = msg_send![app, updateWindows];

src/appkit/window/mod.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -339,13 +339,16 @@ impl<T> Window<T> {
339339
}
340340
}
341341

342-
pub fn set_scale(&self, rect: Rect) {
342+
/// Sets the origin and size of the window’s frame rectangle according to a given frame rectangle,
343+
/// thereby setting its position and size onscreen.
344+
pub fn set_frame(&self, rect: Rect) {
343345
let rect: CGRect = rect.into();
344346
unsafe {
345347
let _: () = msg_send![&*self.objc, setFrame:rect display:YES];
346348
}
347349
}
348350

351+
/// Sets whether the window is transparent to mouse events.
349352
pub fn set_ignores_mouse_events(&self, ignore: bool) {
350353
unsafe {
351354
let _: () = msg_send![&*self.objc, setIgnoresMouseEvents:match ignore {
@@ -355,6 +358,7 @@ impl<T> Window<T> {
355358
}
356359
}
357360

361+
/// Sets whether the window accepts mouse-moved events.
358362
pub fn set_accepts_mouse_moved_events(&self, accept: bool) {
359363
unsafe {
360364
let _: () = msg_send![&*self.objc, setAcceptsMouseMovedEvents:match accept {
@@ -364,6 +368,7 @@ impl<T> Window<T> {
364368
}
365369
}
366370

371+
/// Sets the window’s visible state to the value you specify.
367372
pub fn set_is_visible(&self, visible: bool) {
368373
unsafe {
369374
let _: () = msg_send![&*self.objc, setIsVisible:match visible {
@@ -373,6 +378,7 @@ impl<T> Window<T> {
373378
}
374379
}
375380

381+
/// Sets whether the window has a shadow.
376382
pub fn set_has_shadow(&self, shadow: bool) {
377383
unsafe {
378384
let _: () = msg_send![&*self.objc, setHasShadow:match shadow {

0 commit comments

Comments
 (0)