Skip to content

Commit

Permalink
macos: minor fixes and missing types
Browse files Browse the repository at this point in the history
  • Loading branch information
progrium committed Nov 14, 2023
1 parent 9b9a7da commit e468a64
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 15 deletions.
4 changes: 4 additions & 0 deletions macos/corefoundation/corefoundation_custom.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package corefoundation

type NotificationName StringRef
type TypeRef uintptr
12 changes: 12 additions & 0 deletions macos/coregraphics/coregraphics_custom.go
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
package coregraphics

// An affine transformation matrix for use in drawing 2D graphics. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cgaffinetransform?language=objc
type AffineTransform struct {
M11 float64
M12 float64
M21 float64
M22 float64
TX float64
TY float64
}
8 changes: 8 additions & 0 deletions macos/coremedia/coremedia_custom.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package coremedia

import "github.com/progrium/macdriver/macos/corefoundation"

type BufferRef corefoundation.TypeRef
type MetadataFormatDescriptionRef FormatDescriptionRef
type VideoFormatDescriptionRef FormatDescriptionRef
type AudioFormatDescriptionRef FormatDescriptionRef
4 changes: 4 additions & 0 deletions macos/corevideo/corevideo_custom.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package corevideo

type PixelBufferRef ImageBufferRef
type ImageBufferRef BufferRef
8 changes: 0 additions & 8 deletions macos/fileprovider/fileprovider_structs.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,3 @@ type FileProviderTypeAndCreator struct {
Type uint32
Creator uint32
}

// A structure that contains the file type and file creator codes for an item. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/fileprovider/nsfileprovidertypeandcreator?language=objc
type FileProviderTypeAndCreator struct {
Type uint32
Creator uint32
}
4 changes: 4 additions & 0 deletions macos/foundation/foundation_custom.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ type Point = coregraphics.Point
type Size = coregraphics.Size
type Rect = coregraphics.Rect

type FastEnumerationState struct {
// TODO
}

func (N *String) String() string {
return objc.ToGoString(N.Ptr())
}
Expand Down
7 changes: 0 additions & 7 deletions macos/sysconfig/sysconfig_custom.go
Original file line number Diff line number Diff line change
@@ -1,8 +1 @@
package sysconfig

import "unsafe"

type PreferencesRef unsafe.Pointer
type EtworkConnectionRef unsafe.Pointer
type EtworkReachabilityRef unsafe.Pointer
type DynamicStoreRef unsafe.Pointer

0 comments on commit e468a64

Please sign in to comment.