Package pycocoa :: Module windows
[frames] | no frames]

Module windows

Types AutoResize, Window, MediaWindow, Screen, WindowStyle, wrapping ObjC NSWindow, etc.


Version: 20.11.16

Classes
  AutoResizeError
AutoResize option error.
  Screen
Screen Python Type, wrapping ObjC NSRect_t.
  Window
Basic window Python Type, wrapping ObjC NSWindow.
  WindowError
Window error.
  WindowStyleError
Window style error.
  MediaWindow
Media window Python Type, wrapping ObjC NSWindow/NSView.
  TextWindow
Scrollable text window Python Type, wrapping ObjC NSWindow/NSView.
Functions
 
autoResizes(*options)
Return a combination of auto resize options, specified by name.
 
windowStyles(*styles)
Return a combination of window styles, specified by name.
 
ns2Window(ns)
Get the Window instance for an ObjC NSWindow or NSNotification instance.
Variables
  __all__ = _ALL_LAZY.windows
  AutoResize = AutoResize.HeightSizable=1<...
Window resize options (mask).
  BezelStyle = BezelStyle.Disclosure...
Bezel kinds (enum).
  Border = Border.Bezel=1<...
Border kinds (enum).
  WindowStyle = WindowStyle.Closable=1<...
Window styles (mask).
  NSWindowDelegate = <pycocoa.utils.module_property_RO object at...
Function Details

autoResizes(*options)

 

Return a combination of auto resize options, specified by name.

Parameters:
  • options - Option names (all positional), case-insensitive.
Returns:
Combined options (AutoResizes mask).
Raises:

windowStyles(*styles)

 

Return a combination of window styles, specified by name.

Parameters:
  • styles - Style names (all positional), case-insensitive.
Returns:
Combined styles (WindowStyles mask).
Raises:

ns2Window(ns)

 

Get the Window instance for an ObjC NSWindow or NSNotification instance.

Parameters:
  • ns - The ObjC instance (NS...).
Returns:
The window instance (Window).
Raises:
  • AttributeError - Unexpected ns type.
  • RuntimeError - Window mismatch.
  • TypeError - Invalid ns type.

Variables Details

AutoResize

Window resize options (mask).
Value:
AutoResize.HeightSizable=1<<4,
          .MaxXMargin=1<<2,
          .MaxYMargin=1<<5,
          .MinXMargin=1,
          .MinYMargin=1<<3,
          .NotSizable=0,
          .Sizable=9<<1,
          .WidthSizable=1<<1

BezelStyle

Bezel kinds (enum).
Value:
BezelStyle.Disclosure=5,
          .HelpButton=9,
          .Inline=15,
          .NCircular=7,
          .Recessed=13,
          .RegularSquare=1<<1,
          .Rounded=1,
          .RoundedDisclosure=7<<1,
...

Border

Border kinds (enum).
Value:
Border.Bezel=1<<1,
      .Groove=3,
      .Line=1,
      .No=0

WindowStyle

Window styles (mask).
Value:
WindowStyle.Closable=1<<1,
           .Miniaturizable=1<<2,
           .Resizable=1<<3,
           .Titled=1,
           .Typical=15,
           .Utility=1<<4

NSWindowDelegate

Value:
<pycocoa.utils.module_property_RO object at 0x7fb4e5e5aa50>