File: QuickDraw.pxi

package info (click to toggle)
python-enable 4.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 7,220 kB
  • sloc: cpp: 57,417; python: 28,437; makefile: 314; sh: 43
file content (20 lines) | stat: -rw-r--r-- 632 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# :Author:    Robert Kern
# :Copyright: 2004, Enthought, Inc.
# :License:   BSD Style


cdef extern from "Quickdraw.h":
    ctypedef void* CGrafPtr

    ctypedef struct QDRect "Rect":
        short    top
        short    left
        short    bottom
        short    right

    OSStatus CreateCGContextForPort(CGrafPtr inPort, CGContextRef* outContext)
    OSStatus QDBeginCGContext(CGrafPtr inPort, CGContextRef* outContext)
    OSStatus QDEndCGContext(CGrafPtr inPort, CGContextRef* outContext)
    QDRect* GetPortBounds(CGrafPtr port, QDRect* rect)
    OSStatus SyncCGContextOriginWithPort(CGContextRef context, CGrafPtr port)