-
-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
coregraphics: Clean up overlapping parts
- Loading branch information
Showing
5 changed files
with
153 additions
and
18 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// AUTO-GENERATED CODE, DO NOT MODIFY | ||
|
||
package coregraphics | ||
|
||
// #import <stdlib.h> | ||
// #import <stdint.h> | ||
// #import <stdbool.h> | ||
// #import "CoreGraphics/CoreGraphics.h" | ||
// uint32_t MainDisplayID(); | ||
// void * DisplayCreateImage(uint32_t displayID); | ||
import "C" | ||
|
||
// Returns the display ID of the main display. [Full Topic] | ||
// | ||
// [Full Topic]: https://developer.apple.com/documentation/coregraphics/1455620-cgmaindisplayid?language=objc | ||
func MainDisplayID() DirectDisplayID { | ||
rv := C.MainDisplayID() | ||
return DirectDisplayID(rv) | ||
} | ||
|
||
// Returns an image containing the contents of the specified display. [Full Topic] | ||
// | ||
// [Full Topic]: https://developer.apple.com/documentation/coregraphics/1455691-cgdisplaycreateimage?language=objc | ||
func DisplayCreateImage(displayID DirectDisplayID) ImageRef { | ||
rv := C.DisplayCreateImage(C.uint32_t(displayID)) | ||
return ImageRef(rv) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// AUTO-GENERATED CODE, DO NOT MODIFY | ||
|
||
#import "CoreGraphics/CoreGraphics.h" | ||
uint32_t MainDisplayID() { | ||
return CGMainDisplayID(); | ||
} | ||
void * DisplayCreateImage(uint32_t displayID) { | ||
return CGDisplayCreateImage(displayID); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
// AUTO-GENERATED CODE, DO NOT MODIFY | ||
|
||
package coregraphics | ||
|
||
import ( | ||
"unsafe" | ||
) | ||
|
||
// A reference to frame update’s metadata. [Full Topic] | ||
// | ||
// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cgdisplaystreamupdateref?language=objc | ||
type DisplayStreamUpdateRef unsafe.Pointer | ||
|
||
// A profile that specifies how to interpret a color value for display. [Full Topic] | ||
// | ||
// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cgcolorspaceref?language=objc | ||
type ColorSpaceRef unsafe.Pointer | ||
|
||
// An abstraction for data-reading tasks that eliminates the need to manage a raw memory buffer. [Full Topic] | ||
// | ||
// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cgdataproviderref?language=objc | ||
type DataProviderRef unsafe.Pointer | ||
|
||
// An opaque data type used to convert PostScript data to PDF data. [Full Topic] | ||
// | ||
// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cgpsconverterref?language=objc | ||
type PSConverterRef unsafe.Pointer | ||
|
||
// A document that contains PDF (Portable Document Format) drawing information. [Full Topic] | ||
// | ||
// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cgpdfdocumentref?language=objc | ||
type PDFDocumentRef unsafe.Pointer | ||
|
||
// A general facility for defining and using callback functions. [Full Topic] | ||
// | ||
// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cgfunctionref?language=objc | ||
type FunctionRef unsafe.Pointer | ||
|
||
// An object that describes how to convert between color spaces for use by other system services. [Full Topic] | ||
// | ||
// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cgcolorconversioninforef?language=objc | ||
type ColorConversionInfoRef unsafe.Pointer | ||
|
||
// A Quartz 2D drawing environment. [Full Topic] | ||
// | ||
// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cgcontextref?language=objc | ||
type ContextRef unsafe.Pointer | ||
|
||
// Defines an opaque type that represents a low-level hardware event. [Full Topic] | ||
// | ||
// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cgeventref?language=objc | ||
type EventRef unsafe.Pointer | ||
|
||
// A mutable graphics path: a mathematical description of shapes or lines to be drawn in a graphics context. [Full Topic] | ||
// | ||
// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cgmutablepathref?language=objc | ||
type MutablePathRef unsafe.Pointer | ||
|
||
// A definition for a smooth transition between colors for drawing radial and axial gradient fills. [Full Topic] | ||
// | ||
// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cggradientref?language=objc | ||
type GradientRef unsafe.Pointer | ||
|
||
// A set of character glyphs and layout information for drawing text. [Full Topic] | ||
// | ||
// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cgfontref?language=objc | ||
type FontRef unsafe.Pointer | ||
|
||
// A reference to a display stream object. [Full Topic] | ||
// | ||
// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cgdisplaystreamref?language=objc | ||
type DisplayStreamRef unsafe.Pointer | ||
|
||
// A set of components that define a color, with a color space specifying how to interpret them. [Full Topic] | ||
// | ||
// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cgcolorref?language=objc | ||
type ColorRef unsafe.Pointer | ||
|
||
// A definition for a smooth transition between colors, controlled by a custom function you provide, for drawing radial and axial gradient fills. [Full Topic] | ||
// | ||
// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cgshadingref?language=objc | ||
type ShadingRef unsafe.Pointer | ||
|
||
// A bitmap image or image mask. [Full Topic] | ||
// | ||
// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cgimageref?language=objc | ||
type ImageRef unsafe.Pointer | ||
|
||
// An abstraction for data-writing tasks that eliminates the need to manage a raw memory buffer. [Full Topic] | ||
// | ||
// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cgdataconsumerref?language=objc | ||
type DataConsumerRef unsafe.Pointer | ||
|
||
// A 2D pattern to be used for drawing graphics paths. [Full Topic] | ||
// | ||
// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cgpatternref?language=objc | ||
type PatternRef unsafe.Pointer | ||
|
||
// A reference to a display mode object. [Full Topic] | ||
// | ||
// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cgdisplaymoderef?language=objc | ||
type DisplayModeRef unsafe.Pointer | ||
|
||
// A type that represents a page in a PDF document. [Full Topic] | ||
// | ||
// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cgpdfpageref?language=objc | ||
type PDFPageRef unsafe.Pointer | ||
|
||
// An offscreen context for reusing content drawn with Core Graphics. [Full Topic] | ||
// | ||
// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cglayerref?language=objc | ||
type LayerRef unsafe.Pointer | ||
|
||
// Defines an opaque type that represents the source of a Quartz event. [Full Topic] | ||
// | ||
// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cgeventsourceref?language=objc | ||
type EventSourceRef unsafe.Pointer |