Пример #1
0
    if isObjCInstanceOf(ns, NSApplication):
        pass
    elif isObjCInstanceOf(ns, NSConcreteNotification, NSNotification, ns='ns'):
        ns = ns.object()
    if ns == _Globals.App.NS:
        return _Globals.App
    raise RuntimeError('%r vs %r' % (ns, _Globals.App.NS))


NSApplication._Type = _Types.App = App

if __name__ == '__main__':

    from utils import _allisting

    _allisting(__all__, locals(), __version__, __file__)

# MIT License <http://OpenSource.org/licenses/MIT>
#
# Copyright (C) 2017-2019 -- mrJean1 at Gmail dot com
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
Пример #2
0
# ObjCClass.get_instance_method = ObjCClass.get_method       # PYCHOK expected
# parse_type_encoding           = split_encoding             # PYCHOK expected
# set_instance_variable         = set_ivar                   # PYCHOK expected
# unichar                       = unichar_t                  # PYCHOK expected
# UniChar                       = UniChar_t                  # PYCHOK expected

# if needed, previous NS...WindowMask names, deprecated ones are marked with D?
# NSBorderlessWindowMask             = NSWindowStyleMaskBorderless              # PYCHOK D?
# NSClosableWindowMask               = NSWindowStyleMaskClosable                # PYCHOK expected
# NSFullScreenWindowMask             = NSWindowStyleMaskFullScreen              # PYCHOK D?
# NSFullSizeContentViewWindowMask    = NSWindowStyleMaskFullSizeContentView     # PYCHOK D?
# NSHUDWindowMask?                   = NSWindowStyleMaskHUDWindow               # PYCHOK D?
# NSMiniaturizableWindowMask         = NSWindowStyleMaskMiniaturizable          # PYCHOK expected
# NSMiniWindowMask                   = NSWindowStyleMaskNonactivatingPanel      # PYCHOK D?
# NSResizableWindowMask              = NSWindowStyleMaskResizable               # PYCHOK expected
# NSTexturedBackgroundWindowMask     = NSWindowStyleMaskTexturedBackground      # PYCHOK D?
# NSTitledWindowMask                 = NSWindowStyleMaskTitled                  # PYCHOK D?
# NSUtilityWindowMask                = NSWindowStyleMaskUtilityWindow           # PYCHOK D?
# NSUnifiedTitleAndToolbarWindowMask = NSWindowStyleMaskUnifiedTitleAndToolbar  # PYCHOK D?
# NSUnscaledWindowMask               = NSWindowStyleMaskUnscaled                # PYCHOK D? XXX

# filter locals() for .__init__.py
from utils import _exports  # PYCHOK expected
__all__ = _exports(locals(), not_starts=('_', 'CFUNCTION', 'c_', 'kC'))

if __name__ == '__main__':

    from utils import _allisting  # PYCHOK expected

    _allisting(__all__, locals(), __version__, 'pycocoa')