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

Module oslibs

Various ObjC and macOS libraries, signatures, constants, etc.


Version: 18.04.26

Classes
  CFIndex_t
  CFRange_t
ObjC struct with fields loc[ation] and len[gth] (both CFIndex_t).
  CGBitmapInfo_t
  CGDirectDisplayID_t
  CGError_t
  CGFloat_t
  CGGlyph_t
  CGPoint_t
ObjC struct with fields x and y (both CGFloat_t).
  CGRect_t
ObjC struct with fields origin and size (NSPoint_t, NSSize_t).
  CGSize_t
ObjC struct with fields width and height (both CGFloat_t).
  CTFontOrientation_t
  CTFontSymbolicTraits_t
  NSInteger_t
  NSRect_t
ObjC struct with fields origin and size (NSPoint_t, NSSize_t).
  CFStringEncoding_t
Functions
 
get_lib(name)
Find and load a .dylib library.
 
leaked2()
Return the number of memory leaks.
Variables
  NO = False
  YES = True
  libCF = <CDLL '/System/Library/Frameworks/CoreFoundation.frame...
  kCFAllocatorDefault = c_void_p(None)
  kCFRunLoopDefaultMode = c_void_p(140735551644024)
  kCFStringEncodingISOLatin1 = 513
  kCFStringEncodingMacRoman = 0
  kCFStringEncodingASCII = 1536
  kCFStringEncodingNonLossyASCII = 3071
  kCFStringEncodingUnicode = 256
  kCFStringEncodingUTF8 = 134217984
  kCFStringEncodingUTF16 = 256
  kCFStringEncodingUTF16BE = 268435712
  kCFStringEncodingUTF16LE = 335544576
  kCFStringEncodingUTF32 = 201326848
  kCFStringEncodingUTF32BE = 402653440
  kCFStringEncodingUTF32LE = 469762304
  kCFStringEncodingWindowsLatin1 = 1280
  CFStringEncoding = 134217984
  kCFNumberSInt8Type = 1
  kCFNumberSInt16Type = 2
  kCFNumberSInt32Type = 3
  kCFNumberSInt64Type = 4
  kCFNumberFloat32Type = 5
  kCFNumberFloat64Type = 6
  kCFNumberCharType = 7
  kCFNumberShortType = 8
  kCFNumberIntType = 9
  kCFNumberLongType = 10
  kCFNumberLongLongType = 11
  kCFNumberFloatType = 12
  kCFNumberDoubleType = 13
  kCFNumberCFIndexType = 14
  kCFNumberNSIntegerType = 15
  kCFNumberCGFloatType = 16
  kCFNumberMaxType = 16
  libAppKit = <CDLL '/System/Library/Frameworks/AppKit.framework...
  NSApplicationDidHideNotification = c_void_p(140735542464448)
  NSApplicationDidUnhideNotification = c_void_p(140735542464544)
  NSDefaultRunLoopMode = c_void_p(140735551644024)
  NSEventTrackingRunLoopMode = c_void_p(140735542459136)
  NSCancelButton = 0
  NSFileHandlingPanelCancelButton = 0
  NSOKButton = 1
  NSFileHandlingPanelOKButton = 1
  NSAnyEventMask = 4294967295
  NSKeyDown = 10
  NSKeyUp = 11
  NSFlagsChanged = 12
  NSApplicationDefined = 15
  NSAlphaShiftKeyMask = 65536
  NSShiftKeyMask = 131072
  NSControlKeyMask = 262144
  NSAlternateKeyMask = 524288
  NSCommandKeyMask = 1048576
  NSNumericPadKeyMask = 2097152
  NSHelpKeyMask = 4194304
  NSFunctionKeyMask = 8388608
  NSInsertFunctionKey = 63271
  NSDeleteFunctionKey = 63272
  NSHomeFunctionKey = 63273
  NSBeginFunctionKey = 63274
  NSEndFunctionKey = 63275
  NSPageUpFunctionKey = 63276
  NSPageDownFunctionKey = 63277
  NSWindowStyleMaskTitled = 1
  NSWindowStyleMaskClosable = 2
  NSWindowStyleMaskMiniaturizable = 4
  NSWindowStyleMaskResizable = 8
  NSWindowStyleMaskUtilityWindow = 16
  NSWindowStyleMaskUsual = 15
  NSWindowCloseButton = 0
  NSWindowMiniaturizeButton = 1
  NSWindowZoomButton = 2
  NSWindowToolbarButton = 3
  NSWindowDocumentIconButton = 4
  NSBackingStoreRetained = 0
  NSBackingStoreNonretained = 1
  NSBackingStoreBuffered = 2
  NSTableViewGridNone = 0
  NSTableViewSolidVerticalGridLineMask = 1
  NSTableViewSolidHorizontalGridLineMask = 2
  NSTableViewDashedHorizontalGridLineMask = 8
  NSLeftTextAlignment = 0
  NSTextAlignmentLeft = 0
  NSRightTextAlignment = 1
  NSTextAlignmentRight = 1
  NSCenterTextAlignment = 2
  NSTextAlignmentCenter = 2
  NSJustifiedTextAlignment = 3
  NSTextAlignmentJustified = 3
  NSNaturalTextAlignment = 4
  NSTextAlignmentNatural = 4
  NSTextWritingDirectionEmbedding = 0
  NSTextWritingDirectionOverride = 2
  NSTrackingMouseEnteredAndExited = 1
  NSTrackingMouseMoved = 2
  NSTrackingCursorUpdate = 4
  NSTrackingActiveInActiveApp = 64
  kCGImageAlphaNone = 0
  kCGImageAlphaPremultipliedFirst = 2
  kCGImageAlphaLast = 3
  kCGImageAlphaFirst = 4
  kCGImageAlphaNoneSkipLast = 5
  kCGImageAlphaNoneSkipFirst = 6
  kCGImageAlphaOnly = 7
  kCGImageAlphaPremultipliedLast = 1
  kCGBitmapAlphaInfoMask = 31
  kCGBitmapFloatComponents = 256
  kCGBitmapByteOrderDefault = 0
  kCGBitmapByteOrder16Little = 4096
  kCGBitmapByteOrder32Little = 8192
  kCGBitmapByteOrder16Big = 12288
  kCGBitmapByteOrder32Big = 16384
  kCGBitmapByteOrderMask = 28672
  NSApplicationPresentationDefault = 0
  NSApplicationPresentationHideDock = 2
  NSApplicationPresentationHideMenuBar = 8
  NSApplicationPresentationDisableProcessSwitching = 32
  NSApplicationPresentationDisableHideApplication = 256
  NSApplicationActivationPolicyRegular = 0
  NSApplicationActivationPolicyAccessory = 1
  NSApplicationActivationPolicyProhibited = 2
  NSSquareStatusItemLength = -2
  NSVariableStatusItemLength = -1
  libquartz = <CDLL '/System/Library/Frameworks/quartz.framework...
  kCGImagePropertyGIFDictionary = c_void_p(140735558505448)
  kCGImagePropertyGIFDelayTime = c_void_p(140735558508936)
  kCGRenderingIntentDefault = 0
  libCT = <CDLL '/System/Library/Frameworks/CoreText.framework/C...
  kCTFontAttributeName = c_void_p(140735555059520)
  kCTFontFamilyNameAttribute = c_void_p(140735555104512)
  kCTFontSymbolicTrait = c_void_p(140735555044448)
  kCTFontWeightTrait = c_void_p(140735555044480)
  kCTFontTraitsAttribute = c_void_p(140735555104640)
  kCTFontItalicTrait = 1
  kCTFontBoldTrait = 2
  libFoundation = <CDLL '/System/Library/Frameworks/Foundation.f...
  libobjc = <CDLL '/usr/lib/libobjc.dylib', handle 10a509680 at ...
Function Details

get_lib(name)

 

Find and load a .dylib library.

Parameters:
  • name - The library name (str).
Returns:
The library (ctypes.CDLL).

Note: Private attribute ._name shows the library file name.

leaked2()

 

Return the number of memory leaks.

Returns:
2-Tuple (number, size) with the number of memory leaks and total size leaked, in bytes.

Variables Details

libCF

Value:
<CDLL '/System/Library/Frameworks/CoreFoundation.framework/CoreFoundat\
ion', handle 10a507800 at 102efc890>

libAppKit

Value:
<CDLL '/System/Library/Frameworks/AppKit.framework/AppKit', handle 102\
8047f0 at 102f4fd50>

libquartz

Value:
<CDLL '/System/Library/Frameworks/quartz.framework/quartz', handle 100\
54a260 at 102f4fdd0>

libCT

Value:
<CDLL '/System/Library/Frameworks/CoreText.framework/CoreText', handle\
 10068a8e0 at 102f60d90>

libFoundation

Value:
<CDLL '/System/Library/Frameworks/Foundation.framework/Foundation', ha\
ndle 10050dc20 at 102f6c410>

libobjc

Value:
<CDLL '/usr/lib/libobjc.dylib', handle 10a509680 at 102f6c250>