objc2-app-kit 0.2.2

Bindings to the AppKit framework
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
framework = "AppKit"
crate = "objc2-app-kit"
required-dependencies = ["objc2-foundation"]
custom-lib-rs = true
macos = "10.0"
maccatalyst = "13.0"
gnustep = true

# `objc_ownership` in .apinotes
class.NSBundle.methods."loadNibNamed:owner:topLevelObjects:".skipped = true
class.NSNib.methods."instantiateWithOwner:topLevelObjects:".skipped = true

# Return type `oneway void`
class.NSPasteboard.methods.releaseGlobally.skipped = true
class.NSView.methods.releaseGState.skipped = true
# + some more in IMServicePlugIn.framework

# Uses `NS_SWIFT_UI_ACTOR` on a static, which is hard to support.
#
# Will have to be a method that takes `MainThreadMarker`.
static.NSApp.skipped = true

# These protocol impls would return the wrong types
class.NSTextStorage.skipped-protocols = ["NSCopying", "NSMutableCopying"]

# Typedef that uses a generic from a class
typedef.NSCollectionViewDiffableDataSourceItemProvider.skipped = true
class.NSCollectionViewDiffableDataSource.methods."initWithCollectionView:itemProvider:".skipped = true

# Requires `MainThreadOnly`, which I'm not sure is a good idea here?
class.NSCollectionViewDiffableDataSource.skipped-protocols = ["NSCollectionViewDataSource"]
class.NSManagedObjectContext.skipped-protocols = ["NSEditor", "NSEditorRegistration"]

# Both protocols and classes
protocol.NSTextAttachmentCell.renamed = "NSTextAttachmentCellProtocol"
protocol.NSAccessibilityElement.renamed = "NSAccessibilityElementProtocol"

# Both property and method
class.NSDocument.methods."setDisplayName:".skipped = true

# Wrong type for enum
enum.anonymous.constants.NSOKButton.skipped = true
enum.anonymous.constants.NSCancelButton.skipped = true
enum.anonymous.constants.NSFileHandlingPanelCancelButton.skipped = true
enum.anonymous.constants.NSFileHandlingPanelOKButton.skipped = true

# These subclass a generic struct, and hence the type parameter defaults to
# `AnyObject`, which is not PartialEq, Eq nor Hash.
class.NSLayoutXAxisAnchor.derives = "Debug"
class.NSLayoutYAxisAnchor.derives = "Debug"
class.NSLayoutDimension.derives = "Debug"

# Different definitions depending on target
enum.NSImageResizingMode.skipped = true
enum.NSTextAlignment.skipped = true

# I'm unsure of the ABI of the array this takes
fn.NSDrawBitmap.skipped = true
class.NSView.methods."getRectsExposedDuringLiveResize:count:".skipped = true

# Uses a pointer to SEL, which doesn't implement Encode yet
protocol.NSMenuDelegate.methods."menuHasKeyEquivalent:forEvent:target:action:".skipped = true

# Uses `CADisplayLink`, which is only available in CoreAnimation
class.NSView.methods."displayLinkWithTarget:selector:".skipped = true
class.NSWindow.methods."displayLinkWithTarget:selector:".skipped = true
class.NSScreen.methods."displayLinkWithTarget:selector:".skipped = true

# Duplicated method
class.NSSlider.methods.isVertical.skipped = true
class.NSSliderCell.methods.isVertical.skipped = true
class.NSGestureRecognizer.methods.state.skipped = true

# Needs `Symbols` framework
class.NSImageView.categories.NSSymbolEffect.skipped = true

# Needs CoreGraphics
class.NSColor.methods.CGColor.skipped = true
class.NSColor.methods."colorWithCGColor:".skipped = true
class.NSColorSpace.methods."initWithCGColorSpace:".skipped = true
class.NSColorSpace.methods.CGColorSpace.skipped = true
class.NSLayoutManager.methods."CGGlyphAtIndex:isValidIndex:".skipped = true
class.NSLayoutManager.methods."CGGlyphAtIndex:".skipped = true
class.NSLayoutManager.methods."showCGGlyphs:positions:count:font:textMatrix:attributes:inContext:".skipped = true
class.NSLayoutManager.methods."showCGGlyphs:positions:count:font:matrix:attributes:inContext:".skipped = true
class.NSImage.methods."initWithCGImage:size:".skipped = true
class.NSImage.methods."CGImageForProposedRect:context:hints:".skipped = true
class.NSImage.methods."initWithIconRef:".skipped = true
class.NSImageRep.methods."CGImageForProposedRect:context:hints:".skipped = true
class.NSBitmapImageRep.methods."initWithCGImage:".skipped = true
class.NSBitmapImageRep.methods.CGImage.skipped = true
class.NSEvent.methods.CGEvent.skipped = true
class.NSEvent.methods."eventWithCGEvent:".skipped = true
class.NSBezierPath.methods."appendBezierPathWithCGGlyph:inFont:".skipped = true
class.NSBezierPath.methods."appendBezierPathWithCGGlyphs:count:inFont:".skipped = true
class.NSBezierPath.methods."bezierPathWithCGPath:".skipped = true
class.NSBezierPath.methods.CGPath.skipped = true
class.NSBezierPath.methods."setCGPath:".skipped = true
class.NSFont.methods."boundingRectForCGGlyph:".skipped = true
class.NSFont.methods."advancementForCGGlyph:".skipped = true
class.NSFont.methods."getBoundingRects:forCGGlyphs:count:".skipped = true
class.NSFont.methods."getAdvancements:forCGGlyphs:count:".skipped = true
class.NSGlyphInfo.methods."glyphInfoWithCGGlyph:forFont:baseString:".skipped = true
class.NSGraphicsContext.methods."graphicsContextWithCGContext:flipped:".skipped = true
class.NSGraphicsContext.methods.CGContext.skipped = true

# OpenGL
class.NSOpenGLContext.skipped = true
class.NSOpenGLLayer.skipped = true
class.NSOpenGLPixelFormat.skipped = true
class.NSOpenGLPixelBuffer.skipped = true
class.NSOpenGLView.skipped = true
fn.NSOpenGLSetOption.skipped = true
fn.NSOpenGLGetOption.skipped = true
fn.NSOpenGLGetVersion.skipped = true

# Uses `CKShare` from CloudKit
protocol.NSCloudSharingValidation.skipped = true
protocol.NSCloudSharingServiceDelegate.methods."sharingService:didSaveShare:".skipped = true
protocol.NSCloudSharingServiceDelegate.methods."sharingService:didStopSharing:".skipped = true

# Uses stuff from different frameworks / system libraries
class.NSAnimationContext.methods.timingFunction.skipped = true
class.NSAnimationContext.methods."setTimingFunction:".skipped = true
class.NSLayoutManager.methods."setGlyphs:properties:characterIndexes:font:forGlyphRange:".skipped = true
class.NSLayoutManager.methods."getGlyphsInRange:glyphs:properties:characterIndexes:bidiLevels:".skipped = true
class.NSLayoutManager.methods."glyphIndexForPoint:inTextContainer:fractionOfDistanceThroughGlyph:".skipped = true
class.NSLayoutManagerDelegate.methods."layoutManager:shouldGenerateGlyphs:properties:characterIndexes:font:forGlyphRange:".skipped = true
class.NSMovie.methods."initWithMovie:".skipped = true
class.NSMovie.methods.QTMovie.skipped = true
class.NSTextLayoutFragment.methods."drawAtPoint:inContext:".skipped = true
class.NSTextLineFragment.methods."drawAtPoint:inContext:".skipped = true
class.NSTextView.methods."quickLookPreviewableItemsInRanges:".skipped = true
class.NSSavePanel.methods.allowedContentTypes.skipped = true
class.NSSavePanel.methods."setAllowedContentTypes:".skipped = true
class.NSView.methods.backgroundFilters.skipped = true
class.NSView.methods."setBackgroundFilters:".skipped = true
class.NSView.methods.compositingFilter.skipped = true
class.NSView.methods."setCompositingFilter:".skipped = true
class.NSView.methods.contentFilters.skipped = true
class.NSView.methods."setContentFilters:".skipped = true
class.NSWorkspace.methods."iconForContentType:".skipped = true
class.NSWorkspace.methods."URLForApplicationToOpenContentType:".skipped = true
class.NSWorkspace.methods."URLsForApplicationsToOpenContentType:".skipped = true
class.NSWorkspace.methods."setDefaultApplicationAtURL:toOpenContentType:completionHandler:".skipped = true
class.NSWorkspaceOpenConfiguration.methods.architecture.skipped = true
class.NSWorkspaceOpenConfiguration.methods."setArchitecture:".skipped = true
protocol.NSApplicationDelegate.methods."application:handlerForIntent:".skipped = true
protocol.NSApplicationDelegate.methods."application:userDidAcceptCloudKitShareWithMetadata:".skipped = true
protocol.NSLayoutManagerDelegate.methods."layoutManager:shouldGenerateGlyphs:properties:characterIndexes:font:forGlyphRange:".skipped = true
class.NSItemProvider.methods."registerCloudKitShareWithPreparationHandler:".skipped = true
class.NSItemProvider.methods."registerCloudKitShare:container:".skipped = true
class.NSGlyphInfo.methods.glyphID.skipped = true

###
### Mutability
###

# Most things in AppKit is marked as MainThreadOnly automatically, but there are a few things we have to tweak
class.NSColorPicker.mutability = "MainThreadOnly"
class.NSController.mutability = "MainThreadOnly"
class.NSObjectController.mutability = "MainThreadOnly"
class.NSArrayController.mutability = "MainThreadOnly"
class.NSDictionaryController.mutability = "MainThreadOnly"
class.NSTreeController.mutability = "MainThreadOnly"
class.NSUserDefaultsController.mutability = "MainThreadOnly"
class.NSFontManager.mutability = "MainThreadOnly"
class.NSMenu.mutability = "MainThreadOnly"
class.NSMenuItem.mutability = "MainThreadOnly"
class.NSWindowTabGroup.mutability = "MainThreadOnly"
class.NSTextInputContext.mutability = "MainThreadOnly"

# Most methods on these require MainThreadMarker anyhow
protocol.NSDraggingInfo.requires-mainthreadonly = true
protocol.NSBrowserDelegate.requires-mainthreadonly = true
protocol.NSSplitViewDelegate.requires-mainthreadonly = true

# Accesses the shared application, and hence is main thread only (even though not marked so in Swift).
class.NSScreen.mutability = "MainThreadOnly"

# Documented as "Main Thread Only".
# > generally thread safe, although operations on views such as creating,
# > resizing, and moving should happen on the main thread.
# <https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/CocoaFundamentals/AddingBehaviortoaCocoaProgram/AddingBehaviorCocoa.html#//apple_ref/doc/uid/TP40002974-CH5-SW47>
#
# > If you want to use a thread to draw to a view, bracket all drawing code
# > between the lockFocusIfCanDraw and unlockFocus methods of NSView.
# <https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/Multithreading/ThreadSafetySummary/ThreadSafetySummary.html#//apple_ref/doc/uid/10000057i-CH12-123351-BBCFIIEB>
class.NSView.mutability = "MainThreadOnly"

# Documented as "Main Thread Only", but:
# > Thread safe in that you can create and manage them on a secondary
# > thread.
# <https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/CocoaFundamentals/AddingBehaviortoaCocoaProgram/AddingBehaviorCocoa.html#//apple_ref/doc/uid/TP40002974-CH5-SW47>
# <https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/Multithreading/ThreadSafetySummary/ThreadSafetySummary.html#//apple_ref/doc/uid/10000057i-CH12-123364>
#
# So could in theory be `Send`, and perhaps also `Sync` - but we would
# like interior mutability on windows, since that's just much easier, and
# in that case, they can't be!
class.NSWindow.mutability = "MainThreadOnly"

# TODO: This should be one of MainThreadOnly or Immutable (+Send/Sync)
# class.NSAppearance.mutability = "MainThreadOnly"

# Documented Thread-Unsafe, but:
# > One thread can create an NSImage object, draw to the image buffer,
# > and pass it off to the main thread for drawing. The underlying image
# > cache is shared among all threads.
# <https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/Multithreading/ThreadSafetySummary/ThreadSafetySummary.html#//apple_ref/doc/uid/10000057i-CH12-126728>
#
# So really only unsafe to mutate on several threads.
#
# Unsure yet if it would be beneficial to mark this as `Mutable`, or if
# we should just keep it as interiormutable?
# class.NSImage.mutability = "?"

# Documented as "Thread-Unsafe"
# class.NSResponder.mutability = "InteriorMutable"

# Documentation says:
# > Color objects are immutable and thread-safe
#
# TODO: Send + Sync
class.NSColor.mutability = "Immutable"

# NSCursor is immutable, stated here:
# https://developer.apple.com/documentation/appkit/nscursor/1527062-image?language=objc
#
# TODO: Send + Sync
class.NSCursor.mutability = "Immutable"

# Since this is immutable, it _may_ be possible to make Send+Sync, but
# let's refrain from doing so, because of:
# > Safely handled only on the same thread, whether that be the main
# > thread or a secondary thread; otherwise you run the risk of having
# > events get out of sequence.
# <https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/CocoaFundamentals/AddingBehaviortoaCocoaProgram/AddingBehaviorCocoa.html#//apple_ref/doc/uid/TP40002974-CH5-SW47>
# <https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/Multithreading/ThreadSafetySummary/ThreadSafetySummary.html#//apple_ref/doc/uid/10000057i-CH12-123383>
class.NSEvent.mutability = "Immutable"

class.NSTouch.mutability = "Immutable"
class.NSUserInterfaceCompressionOptions.mutability = "Immutable"

# Subclasses `NSMutableAttributedString`, though I think this should
# actually be `InteriorMutable`?
class.NSTextStorage.mutability = "Mutable"

###
### Safety
###

class.NSAppearance.methods."appearanceNamed:".unsafe = false
class.NSAppearance.methods."bestMatchFromAppearancesWithNames:".unsafe = false

class.NSApplication.methods.sharedApplication.unsafe = false
class.NSApplication.methods.currentEvent.unsafe = false
class.NSApplication.methods."postEvent:atStart:".unsafe = false
class.NSApplication.methods.presentationOptions.unsafe = false
class.NSApplication.methods.windows.unsafe = false
class.NSApplication.methods.keyWindow.unsafe = false
class.NSApplication.methods."setDelegate:".unsafe = false
class.NSApplication.methods."setPresentationOptions:".unsafe = false
class.NSApplication.methods."hide:".unsafe = false
class.NSApplication.methods."orderFrontCharacterPalette:".unsafe = false
class.NSApplication.methods."hideOtherApplications:".unsafe = false
class.NSApplication.methods."stop:".unsafe = false
class.NSApplication.methods."activateIgnoringOtherApps:".unsafe = false
class.NSApplication.methods."requestUserAttention:".unsafe = false
class.NSApplication.methods."setActivationPolicy:".unsafe = false
class.NSApplication.methods."setMainMenu:".unsafe = false
class.NSApplication.methods.effectiveAppearance.unsafe = false
class.NSApplication.methods."setAppearance:".unsafe = false
# Cannot be safe, the user must ensure there is no re-entrancy.
class.NSApplication.methods.run.unsafe = true

class.NSColor.methods.clear.unsafe = false

class.NSControl.methods.isEnabled.unsafe = false
class.NSControl.methods."setEnabled:".unsafe = false

class.NSCursor.methods."initWithImage:hotSpot:".unsafe = false
class.NSCursor.methods.arrowCursor.unsafe = false
class.NSCursor.methods.IBeamCursor.unsafe = false
class.NSCursor.methods.pointingHandCursor.unsafe = false
class.NSCursor.methods.closedHandCursor.unsafe = false
class.NSCursor.methods.openHandCursor.unsafe = false
class.NSCursor.methods.resizeLeftCursor.unsafe = false
class.NSCursor.methods.resizeRightCursor.unsafe = false
class.NSCursor.methods.resizeLeftRightCursor.unsafe = false
class.NSCursor.methods.resizeUpCursor.unsafe = false
class.NSCursor.methods.resizeDownCursor.unsafe = false
class.NSCursor.methods.resizeUpDownCursor.unsafe = false
class.NSCursor.methods.crosshairCursor.unsafe = false
class.NSCursor.methods.disappearingItemCursor.unsafe = false
class.NSCursor.methods.operationNotAllowedCursor.unsafe = false
class.NSCursor.methods.dragLinkCursor.unsafe = false
class.NSCursor.methods.dragCopyCursor.unsafe = false
class.NSCursor.methods.contextualMenuCursor.unsafe = false
class.NSCursor.methods.IBeamCursorForVerticalLayout.unsafe = false

class.NSImage.methods."initWithData:".unsafe = false
class.NSImage.methods."initByReferencingFile:".unsafe = false

class.NSMenu.methods.init.unsafe = false
class.NSMenu.methods.new.unsafe = false
class.NSMenu.methods."addItem:".unsafe = false

# Any modification of the target or the action has to remain `unsafe`
class.NSMenuItem.methods.init.unsafe = false
class.NSMenuItem.methods.new.unsafe = false
class.NSMenuItem.methods.separatorItem.unsafe = false
class.NSMenuItem.methods."setKeyEquivalentModifierMask:".unsafe = false
class.NSMenuItem.methods."setSubmenu:".unsafe = false

class.NSPasteboard.methods."propertyListForType:".unsafe = false

class.NSScreen.methods.mainScreen.unsafe = false
class.NSScreen.methods.screens.unsafe = false
class.NSScreen.methods.frame.unsafe = false
class.NSScreen.methods.visibleFrame.unsafe = false
class.NSScreen.methods.deviceDescription.unsafe = false
class.NSScreen.methods.backingScaleFactor.unsafe = false

class.NSWindowTabGroup.methods.windows.unsafe = false
class.NSWindowTabGroup.methods."setSelectedWindow:".unsafe = false

class.NSTextInputContext.methods.invalidateCharacterCoordinates.unsafe = false
class.NSTextInputContext.methods.discardMarkedText.unsafe = false
class.NSTextInputContext.methods.selectedKeyboardInputSource.unsafe = false

class.NSView.methods.frame.unsafe = false
class.NSView.methods.bounds.unsafe = false
class.NSView.methods.inputContext.unsafe = false
class.NSView.methods.visibleRect.unsafe = false
class.NSView.methods.hasMarkedText.unsafe = false
class.NSView.methods."convertPoint:fromView:".unsafe = false
class.NSView.methods.window.unsafe = false
class.NSView.methods."setWantsBestResolutionOpenGLSurface:".unsafe = false
class.NSView.methods."setWantsLayer:".unsafe = false
class.NSView.methods."setPostsFrameChangedNotifications:".unsafe = false
class.NSView.methods."removeTrackingRect:".unsafe = false
class.NSView.methods."addCursorRect:cursor:".unsafe = false
class.NSView.methods."setHidden:".unsafe = false
class.NSView.methods."convertRect:toView:".unsafe = false
class.NSView.methods.isFlipped.unsafe = false

# NSWindow initializers are not safe, since it is critical to memory
# safety that `window.setReleasedWhenClosed(false)` is called.
class.NSWindow.methods.frame.unsafe = false
class.NSWindow.methods.backingScaleFactor.unsafe = false
class.NSWindow.methods.contentView.unsafe = false
class.NSWindow.methods."setContentView:".unsafe = false
class.NSWindow.methods."setInitialFirstResponder:".unsafe = false
class.NSWindow.methods."makeFirstResponder:".unsafe = false
class.NSWindow.methods."contentRectForFrameRect:".unsafe = false
class.NSWindow.methods.screen.unsafe = false
class.NSWindow.methods."setContentSize:".unsafe = false
class.NSWindow.methods."setFrameTopLeftPoint:".unsafe = false
class.NSWindow.methods."setMinSize:".unsafe = false
class.NSWindow.methods."setMaxSize:".unsafe = false
class.NSWindow.methods."setResizeIncrements:".unsafe = false
class.NSWindow.methods.contentResizeIncrements.unsafe = false
class.NSWindow.methods."setContentResizeIncrements:".unsafe = false
class.NSWindow.methods."setFrame:display:".unsafe = false
class.NSWindow.methods."setMovable:".unsafe = false
class.NSWindow.methods."setSharingType:".unsafe = false
class.NSWindow.methods."setTabbingMode:".unsafe = false
class.NSWindow.methods."setOpaque:".unsafe = false
class.NSWindow.methods.hasShadow.unsafe = false
class.NSWindow.methods."setHasShadow:".unsafe = false
class.NSWindow.methods."setIgnoresMouseEvents:".unsafe = false
class.NSWindow.methods."setBackgroundColor:".unsafe = false
class.NSWindow.methods.styleMask.unsafe = false
class.NSWindow.methods."setStyleMask:".unsafe = false
class.NSWindow.methods."registerForDraggedTypes:".unsafe = false
class.NSWindow.methods."makeKeyAndOrderFront:".unsafe = false
class.NSWindow.methods."orderFront:".unsafe = false
class.NSWindow.methods."miniaturize:".unsafe = false
# TODO: class.NSWindow.methods."deminiaturize:".unsafe = false
class.NSWindow.methods."toggleFullScreen:".unsafe = false
class.NSWindow.methods."orderOut:".unsafe = false
class.NSWindow.methods."zoom:".unsafe = false
class.NSWindow.methods."selectNextKeyView:".unsafe = false
class.NSWindow.methods."selectPreviousKeyView:".unsafe = false
class.NSWindow.methods.firstResponder.unsafe = false
class.NSWindow.methods."standardWindowButton:".unsafe = false
class.NSWindow.methods."setTitle:".unsafe = false
class.NSWindow.methods.title.unsafe = false
class.NSWindow.methods."setAcceptsMouseMovedEvents:".unsafe = false
class.NSWindow.methods."setTitlebarAppearsTransparent:".unsafe = false
class.NSWindow.methods."setTitleVisibility:".unsafe = false
class.NSWindow.methods."setMovableByWindowBackground:".unsafe = false
class.NSWindow.methods."setLevel:".unsafe = false
class.NSWindow.methods."setAllowsAutomaticWindowTabbing:".unsafe = false
class.NSWindow.methods."setTabbingIdentifier:".unsafe = false
class.NSWindow.methods."setDocumentEdited:".unsafe = false
class.NSWindow.methods.occlusionState.unsafe = false
class.NSWindow.methods.center.unsafe = false
class.NSWindow.methods.isResizable.unsafe = false
class.NSWindow.methods.isMiniaturizable.unsafe = false
class.NSWindow.methods.hasCloseBox.unsafe = false
class.NSWindow.methods.isMiniaturized.unsafe = false
class.NSWindow.methods.isVisible.unsafe = false
class.NSWindow.methods.isKeyWindow.unsafe = false
class.NSWindow.methods.isZoomed.unsafe = false
class.NSWindow.methods.allowsAutomaticWindowTabbing.unsafe = false
class.NSWindow.methods."selectNextTab:".unsafe = false
class.NSWindow.methods.tabbingIdentifier.unsafe = false
class.NSWindow.methods.tabGroup.unsafe = false
class.NSWindow.methods.isDocumentEdited.unsafe = false
class.NSWindow.methods.close.unsafe = false
class.NSWindow.methods."performWindowDragWithEvent:".unsafe = false
class.NSWindow.methods."invalidateCursorRectsForView:".unsafe = false
class.NSWindow.methods."setDelegate:".unsafe = false
class.NSWindow.methods."sendEvent:".unsafe = false
class.NSWindow.methods."convertPointFromScreen:".unsafe = false
class.NSWindow.methods."convertRectToScreen:".unsafe = false
# Cycles must be prevented
class.NSWindow.methods."addChildWindow:ordered:".unsafe = true