pycocoa.windows

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

# Module windows

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

Version: 23.02.02

Classes
| AutoResizeError `AutoResize` option error.
| 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<`...`` AutoResize options (`mask`, wrapping `NSAutoresizingMaskOptions`).
| BezelStyle = `BezelStyle.Disclosure`...`` Bezel style constants (`int`).
| Border = `Border.Bezel`...`` Border type constants (`int`).
| WindowStyle = `WindowStyle.Closable`...`` Window style constants (`mask`).
| NSWindowDelegate = `<pycocoa.utils.module_property_RO object at`...``
| AutoResize.HeightSizable 0x10.
| AutoResize.MaxXMargin 0x4.
| AutoResize.MaxYMargin 0x20.
| AutoResize.MinXMargin 0x1.
| AutoResize.MinYMargin 0x8.
| AutoResize.NotSizable 0x0.
| AutoResize.Sizable 0x12.
| AutoResize.WidthSizable 0x2.
| BezelStyle.Disclosure 0x5.
| BezelStyle.HelpButton 0x9.
| BezelStyle.Inline 0xf.
| BezelStyle.NCircular 0x7.
| BezelStyle.Recessed 0xd.
| BezelStyle.RegularSquare 0x2.
| BezelStyle.RoundRect 0xc.
| BezelStyle.Rounded 0x1.
| BezelStyle.RoundedDisclosure 0xe.
| BezelStyle.ShadowlessSquare 0x6.
| BezelStyle.SmallSquare 0xa.
| BezelStyle.TexturedRounded 0xb.
| BezelStyle.TexturedSquare 0x8.
| Border.Bezel 0x2.
| Border.Groove 0x3.
| Border.Line 0x1.
| Border.No 0x0.
| WindowStyle.Closable 0x2.
| WindowStyle.Miniaturizable 0x4.
| WindowStyle.Resizable 0x8.
| WindowStyle.Titled 0x1.
| WindowStyle.Typical 0xf.
| WindowStyle.Utility 0x10.

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: `AutoResizeError` - One or more options are invalid.

### 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: `WindowStyleError` - One or more styles are invalid.

### 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 AutoResize options (`mask`, wrapping `NSAutoresizingMaskOptions`). Value:
      AutoResize.HeightSizable=1<<4,
                .MaxXMargin=1<<2,
                .MaxYMargin=1<<5,
                .MinXMargin=1,
                .MinYMargin=1<<3,
                .NotSizable=0,
                .Sizable=18,
                .WidthSizable=2

  ### BezelStyle Bezel style constants (`int`). Value:
      BezelStyle.Disclosure=5,
                .HelpButton=9,
                .Inline=15,
                .NCircular=7,
                .Recessed=13,
                .RegularSquare=2,
                .Rounded=1,
                .RoundedDisclosure=14,
      ...

  ### Border Border type constants (`int`). Value:
      Border.Bezel=2,
            .Groove=3,
            .Line=1,
            .No=0

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

  ### NSWindowDelegate Value:
      <pycocoa.utils.module_property_RO object at 0x7fd6183fbed0>