classkit

package
v0.8.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 19, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Rendered for darwin/amd64

Overview

Package classkit provides purego-based Go bindings for the macOS ClassKit framework.

Apple documentation: https://developer.apple.com/documentation/classkit

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CLSContextTopicArtsAndMusic

func CLSContextTopicArtsAndMusic() *foundation.NSString

func CLSContextTopicComputerScienceAndEngineering

func CLSContextTopicComputerScienceAndEngineering() *foundation.NSString

func CLSContextTopicHealthAndFitness

func CLSContextTopicHealthAndFitness() *foundation.NSString

func CLSContextTopicLiteracyAndWriting

func CLSContextTopicLiteracyAndWriting() *foundation.NSString

func CLSContextTopicMath

func CLSContextTopicMath() *foundation.NSString

func CLSContextTopicScience

func CLSContextTopicScience() *foundation.NSString

func CLSContextTopicSocialScience

func CLSContextTopicSocialScience() *foundation.NSString

func CLSContextTopicWorldLanguage

func CLSContextTopicWorldLanguage() *foundation.NSString

func CLSErrorCodeDomain

func CLSErrorCodeDomain() uintptr

func CLSErrorObjectKey

func CLSErrorObjectKey() *foundation.NSString

@abstract Any object that caused a failure will be available in - [NSError userInfo]; under this key.

func CLSErrorSuccessfulObjectsKey

func CLSErrorSuccessfulObjectsKey() *foundation.NSString

@abstract Errors with the code `CLSErrorCodePartialFailure` may contain an array of successful entities in - [NSError userInfo]; under this key.

func CLSErrorUnderlyingErrorsKey

func CLSErrorUnderlyingErrorsKey() *foundation.NSString

@abstract If multiple objects cause errors we return an error with code `CLSErrorCodePartialFailure` which will contain an array of errors in - [NSError userInfo]; under this key.

func CLSPredicateKeyPathDateCreated

func CLSPredicateKeyPathDateCreated() *foundation.NSString

func CLSPredicateKeyPathIdentifier

func CLSPredicateKeyPathIdentifier() *foundation.NSString

func CLSPredicateKeyPathParent

func CLSPredicateKeyPathParent() *foundation.NSString

func CLSPredicateKeyPathTitle

func CLSPredicateKeyPathTitle() *foundation.NSString

func CLSPredicateKeyPathTopic

func CLSPredicateKeyPathTopic() *foundation.NSString

func CLSPredicateKeyPathUniversalLinkURL

func CLSPredicateKeyPathUniversalLinkURL() *foundation.NSString

Types

type Acl_entry_id_t

type Acl_entry_id_t int64
const (
	ACL_FIRST_ENTRY Acl_entry_id_t = 0
	ACL_NEXT_ENTRY  Acl_entry_id_t = -1
	ACL_LAST_ENTRY  Acl_entry_id_t = -2
)

func (Acl_entry_id_t) String

func (e Acl_entry_id_t) String() string

type Acl_flag_t

type Acl_flag_t int64
const (
	ACL_FLAG_DEFER_INHERIT      Acl_flag_t = 1
	ACL_FLAG_NO_INHERIT         Acl_flag_t = 131072
	ACL_ENTRY_INHERITED         Acl_flag_t = 16
	ACL_ENTRY_FILE_INHERIT      Acl_flag_t = 32
	ACL_ENTRY_DIRECTORY_INHERIT Acl_flag_t = 64
	ACL_ENTRY_LIMIT_INHERIT     Acl_flag_t = 128
	ACL_ENTRY_ONLY_INHERIT      Acl_flag_t = 256
)

func (Acl_flag_t) String

func (e Acl_flag_t) String() string

type Acl_perm_t

type Acl_perm_t int64
const (
	ACL_READ_DATA           Acl_perm_t = 2
	ACL_LIST_DIRECTORY      Acl_perm_t = 2
	ACL_WRITE_DATA          Acl_perm_t = 4
	ACL_ADD_FILE            Acl_perm_t = 4
	ACL_EXECUTE             Acl_perm_t = 8
	ACL_SEARCH              Acl_perm_t = 8
	ACL_DELETE              Acl_perm_t = 16
	ACL_APPEND_DATA         Acl_perm_t = 32
	ACL_ADD_SUBDIRECTORY    Acl_perm_t = 32
	ACL_DELETE_CHILD        Acl_perm_t = 64
	ACL_READ_ATTRIBUTES     Acl_perm_t = 128
	ACL_WRITE_ATTRIBUTES    Acl_perm_t = 256
	ACL_READ_EXTATTRIBUTES  Acl_perm_t = 512
	ACL_WRITE_EXTATTRIBUTES Acl_perm_t = 1024
	ACL_READ_SECURITY       Acl_perm_t = 2048
	ACL_WRITE_SECURITY      Acl_perm_t = 4096
	ACL_CHANGE_OWNER        Acl_perm_t = 8192
	ACL_SYNCHRONIZE         Acl_perm_t = 1048576
)

func (Acl_perm_t) String

func (e Acl_perm_t) String() string

type Acl_tag_t

type Acl_tag_t int64
const (
	ACL_UNDEFINED_TAG  Acl_tag_t = 0
	ACL_EXTENDED_ALLOW Acl_tag_t = 1
	ACL_EXTENDED_DENY  Acl_tag_t = 2
)

func (Acl_tag_t) String

func (e Acl_tag_t) String() string

type Acl_type_t

type Acl_type_t int64
const (
	ACL_TYPE_EXTENDED Acl_type_t = 256
	ACL_TYPE_ACCESS   Acl_type_t = 0
	ACL_TYPE_DEFAULT  Acl_type_t = 1
	ACL_TYPE_AFS      Acl_type_t = 2
	ACL_TYPE_CODA     Acl_type_t = 3
	ACL_TYPE_NTFS     Acl_type_t = 4
	ACL_TYPE_NWFS     Acl_type_t = 5
)

func (Acl_type_t) String

func (e Acl_type_t) String() string

type CLSActivity

type CLSActivity struct {
	CLSObject
}

A representation of user interaction with a context.

Apple documentation: https://developer.apple.com/documentation/classkit/clsactivity

func CLSActivityFromID

func CLSActivityFromID(id objc.ID) *CLSActivity

func (*CLSActivity) AddAdditionalActivityItem

func (o *CLSActivity) AddAdditionalActivityItem(activityItem *CLSActivityItem)

Adds an activity item to an activity.

func (*CLSActivity) AddProgressRangeFromStartToEnd

func (o *CLSActivity) AddProgressRangeFromStartToEnd(start float64, end float64)

Adds a progress range to a given activity.

func (*CLSActivity) AdditionalActivityItems

func (o *CLSActivity) AdditionalActivityItems() *foundation.NSArray[*CLSActivityItem]

@abstract Array of all additional activity items on this CLSActivity.

func (*CLSActivity) Duration

func (o *CLSActivity) Duration() float64

@abstract Returns the total time tracked in this activity (excluding any previous activities). @discussion The time between calling @c -start and @c -stop.

func (*CLSActivity) IsStarted

func (o *CLSActivity) IsStarted() bool

@abstract Returns whether this Activity has been started or not.

func (*CLSActivity) PrimaryActivityItem

func (o *CLSActivity) PrimaryActivityItem() *CLSActivityItem

@abstract The primary activityItem to be reported on. @discussion This can be nil indicating @c progress property is the primary data instead of any activityItems.

func (*CLSActivity) Progress

func (o *CLSActivity) Progress() float64

@abstract Current progress as a decimal representation of a percentage. @discussion Should be [0.0, 1.0].

func (*CLSActivity) RemoveAllActivityItems

func (o *CLSActivity) RemoveAllActivityItems()

Deletes all activity items associated with the current activity.

func (*CLSActivity) SetPrimaryActivityItem

func (o *CLSActivity) SetPrimaryActivityItem(primaryActivityItem *CLSActivityItem)

func (*CLSActivity) SetProgress

func (o *CLSActivity) SetProgress(progress float64)

func (*CLSActivity) Start

func (o *CLSActivity) Start()

Tells an activity to start recording duration and progress for a task.

func (*CLSActivity) Stop

func (o *CLSActivity) Stop()

Tells an activity to stop or pause recording duration and progress for a task.

type CLSActivityItem

type CLSActivityItem struct {
	CLSObject
}

An abstract base class for gathering information about an activity.

Apple documentation: https://developer.apple.com/documentation/classkit/clsactivityitem

func CLSActivityItemFromID

func CLSActivityItemFromID(id objc.ID) *CLSActivityItem

func (*CLSActivityItem) Identifier

func (o *CLSActivityItem) Identifier() *foundation.NSString

@abstract An identifier that is unique within its owning activity @discussion The identifier can be used to look up existing activityItems in a given activity.

func (*CLSActivityItem) SetTitle

func (o *CLSActivityItem) SetTitle(title *foundation.NSString)

func (*CLSActivityItem) Title

func (o *CLSActivityItem) Title() *foundation.NSString

@abstract Title of what this ActivityItem represents. @discussion This will be the title associated with the activity item in the generated progress report.

type CLSBinaryItem

type CLSBinaryItem struct {
	CLSActivityItem
}

Activity information that is true or false, pass or fail, yes or no.

Apple documentation: https://developer.apple.com/documentation/classkit/clsbinaryitem

func CLSBinaryItemFromID

func CLSBinaryItemFromID(id objc.ID) *CLSBinaryItem

func (*CLSBinaryItem) InitWithIdentifierTitleType

func (o *CLSBinaryItem) InitWithIdentifierTitleType(identifier *foundation.NSString, title *foundation.NSString, valueType CLSBinaryValueType) *CLSBinaryItem

Initializes a new binary activity item of the given type.

func (*CLSBinaryItem) SetValue

func (o *CLSBinaryItem) SetValue(value bool)

func (*CLSBinaryItem) Value

func (o *CLSBinaryItem) Value() bool

@abstract True or false value.

func (*CLSBinaryItem) ValueType

func (o *CLSBinaryItem) ValueType() CLSBinaryValueType

@abstract Value type of this CLSBinaryItem. @discussion The type that best describes this CLSBinaryItem value.

type CLSBinaryValueType

type CLSBinaryValueType int64

The kinds of outcomes that a binary activity item can represent.

const (
	// True or false.
	CLSBinaryValueTypeTrueFalse CLSBinaryValueType = 0
	// Pass or fail.
	CLSBinaryValueTypePassFail CLSBinaryValueType = 1
	// Yes or no.
	CLSBinaryValueTypeYesNo CLSBinaryValueType = 2
	// Correct or incorrect.
	CLSBinaryValueTypeCorrectIncorrect CLSBinaryValueType = 3
)

func (CLSBinaryValueType) String

func (e CLSBinaryValueType) String() string

type CLSContext

type CLSContext struct {
	CLSObject
}

An area of your app that represents an assignable task, like a quiz or a chapter.

Apple documentation: https://developer.apple.com/documentation/classkit/clscontext

func CLSContextFromID

func CLSContextFromID(id objc.ID) *CLSContext

func (*CLSContext) AddChildContext

func (o *CLSContext) AddChildContext(child *CLSContext)

Adds the specifed context as a child of the context receiving the method call.

func (*CLSContext) AddNavigationChildContext

func (o *CLSContext) AddNavigationChildContext(child *CLSContext)

Adds a child context that users can navigate to from this context.

func (*CLSContext) AddProgressReportingCapabilities

func (o *CLSContext) AddProgressReportingCapabilities(capabilities *foundation.NSSet[*CLSProgressReportingCapability])

Adds a progress reporting capability to the set of capabilities for the context.

func (*CLSContext) BecomeActive

func (o *CLSContext) BecomeActive()

Tells a context to become the active context.

func (*CLSContext) CreateNewActivity

func (o *CLSContext) CreateNewActivity() *CLSActivity

Creates and returns a new activity instance for the context.

func (*CLSContext) CurrentActivity

func (o *CLSContext) CurrentActivity() *CLSActivity

@abstract Returns the current activity. @discussion Activity associated with a context. If no activity was ever created this is nil. See: @c -[CLSContext createNewActivity]; for more details.

func (*CLSContext) CustomTypeName

func (o *CLSContext) CustomTypeName() *foundation.NSString

@abstract An optional user-visible name for the context if its type is CLSContextTypeCustom. @discussion This property is relevant only if the type is CLSContextTypeCustom. This string should be localized. If this property is not set for a context of type CLSContextTypeCustom, Schoolwork app will use a default localized string ‘Custom’ as the name of the activity representing this context.

func (*CLSContext) DescendantMatchingIdentifierPathCompletion

func (o *CLSContext) DescendantMatchingIdentifierPathCompletion(identifierPath *foundation.NSArray[*foundation.NSString], completion func(*CLSContext, unsafe.Pointer))

Finds the context with the given identifier path relative to this context.

func (*CLSContext) DisplayOrder

func (o *CLSContext) DisplayOrder() int

@abstract The displayOrder is by default sorted ascending. @discussion Set the displayOrder if you want your contexts to be displayed in a particular order. The sort key is used as a way to sort sibling contexts in a particular order.

func (*CLSContext) Identifier

func (o *CLSContext) Identifier() *foundation.NSString

@abstract App-assigned identifier. This identifier should work across users and devices and be unique with regards to its siblings within its parent. @discussion The identifier could be used to embed information later used for deep linking. For example: @em hydrogen-element, or @em chapter-1.

func (*CLSContext) IdentifierPath

func (o *CLSContext) IdentifierPath() *foundation.NSArray[*foundation.NSString]

@abstract Context identifier path of this context. @discussion The identifier path starts with the main app context object and finishes with the identifier of this context. This is the identifier path that one would use in @code -[CLSDataStore contextsMatchingIdintifierPath:completion:] @endcode to find `this' context.

func (*CLSContext) InitWithTypeIdentifierTitle

func (o *CLSContext) InitWithTypeIdentifierTitle(type_ CLSContextType, identifier *foundation.NSString, title *foundation.NSString) *CLSContext

Initializes a new context.

func (*CLSContext) IsActive

func (o *CLSContext) IsActive() bool

@discussion Returns true if self is the active context.

func (*CLSContext) IsAssignable

func (o *CLSContext) IsAssignable() bool

@abstract This property is true if the context can be assigned as an activity. @discussion The default value of this property is true. This should be set to false for a context that is used as a container for other contexts, but by itself, is not an assignable activity.

func (*CLSContext) NavigationChildContexts

func (o *CLSContext) NavigationChildContexts() *foundation.NSArray[*CLSContext]

@abstract Child contexts that can be navigated to from this context. @discussion Returns all the child contexts added via @code -[CLSContext addNavigationChildContext:] @endcode

func (*CLSContext) Parent

func (o *CLSContext) Parent() *CLSContext

@abstract Returns the parent of this context.

func (*CLSContext) ProgressReportingCapabilities

func (o *CLSContext) ProgressReportingCapabilities() *foundation.NSSet[*CLSProgressReportingCapability]

@abstract Specifies progress reporting capablities of the app for this context. @discussion This information is intended to help teachers as they choose activities for their students. By default a CLSContext will have one CLSProgressReportingCapability instance of kind CLSProgressReportingCapabilityKindDuration. More progress reporting capabilities can be specified via '-addProgressReportingCapabilities:' to customize this set.

func (*CLSContext) RemoveFromParent

func (o *CLSContext) RemoveFromParent()

Removes the context from its parent.

func (*CLSContext) RemoveNavigationChildContext

func (o *CLSContext) RemoveNavigationChildContext(child *CLSContext)

Removes the specified context as a presentable child of this context.

func (*CLSContext) ResetProgressReportingCapabilities

func (o *CLSContext) ResetProgressReportingCapabilities()

Resets the set of capabilities for the context.

func (*CLSContext) ResignActive

func (o *CLSContext) ResignActive()

Tells a context to stop being the active context.

func (*CLSContext) SetAssignable

func (o *CLSContext) SetAssignable(assignable bool)

func (*CLSContext) SetCustomTypeName

func (o *CLSContext) SetCustomTypeName(customTypeName *foundation.NSString)

func (*CLSContext) SetDisplayOrder

func (o *CLSContext) SetDisplayOrder(displayOrder int)

func (*CLSContext) SetSuggestedAge

func (o *CLSContext) SetSuggestedAge(suggestedAge foundation.NSRange)

func (*CLSContext) SetSuggestedCompletionTime

func (o *CLSContext) SetSuggestedCompletionTime(suggestedCompletionTime foundation.NSRange)

func (*CLSContext) SetSummary

func (o *CLSContext) SetSummary(summary *foundation.NSString)

func (*CLSContext) SetThumbnail

func (o *CLSContext) SetThumbnail(thumbnail unsafe.Pointer)

func (*CLSContext) SetTitle

func (o *CLSContext) SetTitle(title *foundation.NSString)

func (*CLSContext) SetTopic

func (o *CLSContext) SetTopic(topic *foundation.NSString)

func (*CLSContext) SetType

func (o *CLSContext) SetType(type_ CLSContextType)

Updates the kind of content that a context represents.

func (*CLSContext) SetUniversalLinkURL

func (o *CLSContext) SetUniversalLinkURL(universalLinkURL *foundation.NSURL)

func (*CLSContext) SuggestedAge

func (o *CLSContext) SuggestedAge() foundation.NSRange

@abstract Suggested age range of students, expressed in years, for whom this context is suitable. This information is intended to help teachers to choose age-appropriate activities for their students. @discussion The default value is [0, NSIntegerMax - 1]. This is @em NSRange(0...Int.max-1) in @em Swift or @em NSMakeRange(0,NSIntegerMax) in @em Objective-C. Set the lower bound to 0 to specify no minimum age limit and set the upper bound to NSIntegerMax - 1 to specify no maximum age limit. @example An age range of 4 to 6 years is expressed by @em NSRange(4...6) in @em Swift or by @em NSMakeRange(4,3) in @Objective-C. @example An age range of up 10 years is expressed by @em NSRange(0...10) in @em Swift or by @em NSMakeRange(0,11) in @Objective-C. @example An age range of 18 years or above is expressed by @em NSRange(18...Int.max-1) in @em Swift or by @em NSMakeRange(18,NSIntegerMax-18) in @Objective-C.

func (*CLSContext) SuggestedCompletionTime

func (o *CLSContext) SuggestedCompletionTime() foundation.NSRange

@abstract Suggested time range, expressed in minutes, to complete the activity. This information will help teachers as they choose activities for their students. @discussion The default value is [0, NSIntegerMax - 1]. This is @em NSRange(0...Int.max-1) in @em Swift or @em NSMakeRange(0,NSIntegerMax) in @em Objective-C. Set the lower bound value to 0 to specify no minimum time limit and set the upper bound to NSIntegerMax - 1 to specify no maximum time limit. @example An time range of 10 to 15 minutes is expressed by @em NSRange(10...15) in @em Swift or by @em NSMakeRange(10,6) in @Objective-C. @example An time range of up to 10 minutes is expressed by @em NSRange(0...10) in @em Swift or by @em NSMakeRange(0,11) in @Objective-C. @example An time range of at least 20 minutes is expressed by @em NSRange(20...Int.max-1) in @em Swift or by @em NSMakeRange(20,NSIntegerMax-20) in @Objective-C.

func (*CLSContext) Summary

func (o *CLSContext) Summary() *foundation.NSString

@abstract An optional user-visible summary describing the context limited to 4000 characters in length. @discussion This may be used to provide information about the types of activities available under a given context or the context itself. This string should be localized.

func (*CLSContext) Thumbnail

func (o *CLSContext) Thumbnail() unsafe.Pointer

@abstract An optional thumbnail image associated with the context. @discussion The size of this image should be equal to or larger than 80x80 pixels and equal to or smaller than 330x330 pixels. Images larger than 330x330 pixels will be scaled down. Images with both dimensions smaller than 80x80 pixels will not be accepted.

func (*CLSContext) Title

func (o *CLSContext) Title() *foundation.NSString

@abstract Title of this context. @discussion For example: @em Level 1 @em.

func (*CLSContext) Topic

func (o *CLSContext) Topic() *foundation.NSString

@abstract Topic associated with this context. @discussion See above for valid, predefined topics.

func (*CLSContext) Type

func (o *CLSContext) Type() CLSContextType

@abstract Type of this context @discussion The type that best describes this context.

func (*CLSContext) UniversalLinkURL

func (o *CLSContext) UniversalLinkURL() *foundation.NSURL

@abstract Alternative deep link URL using universal links. @discussion If your app supports universal links, you can supply them here to link the content this context represents.

type CLSContextProvider

type CLSContextProvider interface {
	UpdateDescendantsOfContextCompletion(context_ *CLSContext, completion func(unsafe.Pointer))
}

CLSContextProvider wraps the ObjC protocol CLSContextProvider.

type CLSContextType

type CLSContextType int64

The kinds of assignable content a context can contain.

const (
	// No type is assigned.
	CLSContextTypeNone CLSContextType = 0
	// An app context.
	CLSContextTypeApp CLSContextType = 1
	// A chapter context.
	CLSContextTypeChapter CLSContextType = 2
	// A section context.
	CLSContextTypeSection CLSContextType = 3
	// A level context.
	CLSContextTypeLevel CLSContextType = 4
	// A page context.
	CLSContextTypePage CLSContextType = 5
	// A task context.
	CLSContextTypeTask CLSContextType = 6
	// A challenge context.
	CLSContextTypeChallenge CLSContextType = 7
	// A quiz context.
	CLSContextTypeQuiz CLSContextType = 8
	// An exercise context.
	CLSContextTypeExercise CLSContextType = 9
	// A lesson context.
	CLSContextTypeLesson CLSContextType = 10
	// A book context.
	CLSContextTypeBook CLSContextType = 11
	// A game context.
	CLSContextTypeGame CLSContextType = 12
	// A document context.
	CLSContextTypeDocument CLSContextType = 13
	// An audio context.
	CLSContextTypeAudio CLSContextType = 14
	// A video context.
	CLSContextTypeVideo CLSContextType = 15
	// A context that represents an entire course.
	CLSContextTypeCourse CLSContextType = 16
	// A context for assignable content that isn’t represented by one of the built-in context types.
	CLSContextTypeCustom CLSContextType = 17
)

func (CLSContextType) String

func (e CLSContextType) String() string

type CLSDataStore

type CLSDataStore struct {
	foundation.NSObject
}

A container for all the ClassKit data in your app.

Apple documentation: https://developer.apple.com/documentation/classkit/clsdatastore

func CLSDataStoreFromID

func CLSDataStoreFromID(id objc.ID) *CLSDataStore

func CLSDataStoreShared

func CLSDataStoreShared() *CLSDataStore

@abstract The data store provides read/write access to your app's ClassKit data. @discussion Data written to the data store is automatically synced via iCloud across the user's devices.

func (*CLSDataStore) ActiveContext

func (o *CLSDataStore) ActiveContext() *CLSContext

@abstract Returns the context that is currently active. If no context is active, this will return nil.

func (*CLSDataStore) CheckIsAssignedDocumentCompletion

func (o *CLSDataStore) CheckIsAssignedDocumentCompletion(documentURL *foundation.NSURL, completion func(bool, unsafe.Pointer))

@abstract Determines whether a URL to the document was assigned to the student. @discussion This method checks if the document at the specified URL is assigned to the current student signed into the device. This is particularly useful for implementing student-specific workflows, such as: - Showing submission UI only for assigned documents - Displaying assignment-specific metadata or instructions - Enabling special features or restrictions for assigned work The completion handler's `isAssignedDocument` parameter will be `YES` when: - The document URL corresponds to an active assigned document - The current user is authenticated as a student and assigned to this specific document The completion handler's `isAssignedDocument` parameter will be `NO` when: - The document is not part of any assigned document - The current user is not a student (e.g., teacher) - The document has been unassigned or deleted - The student does not have permission to access this assignment @note This method is designed to be called from ClassKitUI clients and requires proper ClassKit entitlements. The completion handler may be called on a background thread, so dispatch to the main queue if you need to update UI based on the result. @param documentURL The file URL of the document to check. @param completion A block called when the check is complete. The block takes two parameters: - isAssignedDocument: A Boolean indicating whether the document is assigned to the current user. - error: An error object if the check failed, or nil if successful. @code [[CLSDataStore shared] checkIsAssignedDocument:documentURL completion:^(BOOL isAssignedDocument, NSError * _Nullable error) { dispatch_async(dispatch_get_main_queue(), ^{ if (error) { NSLog(@"Error checking assignment status: %@", error); return; } if (isAssignedDocument) { // Show UI with submission options [self showAssignedDocumentSubmissionUI]; } else { // Show standard document UI [self showStandardDocumentUI]; } }); }]; @endcode

func (*CLSDataStore) CompleteAllAssignedActivitiesMatching

func (o *CLSDataStore) CompleteAllAssignedActivitiesMatching(contextPath *foundation.NSArray[*foundation.NSString])

Marks all of the assigned and active activities for the given context path as complete.

func (*CLSDataStore) ContextsMatchingIdentifierPathCompletion

func (o *CLSDataStore) ContextsMatchingIdentifierPathCompletion(identifierPath *foundation.NSArray[*foundation.NSString], completion func(*foundation.NSArray[*CLSContext], unsafe.Pointer))

Fetches all the contexts along a given identifier path.

func (*CLSDataStore) ContextsMatchingPredicateCompletion

func (o *CLSDataStore) ContextsMatchingPredicateCompletion(predicate *foundation.NSPredicate, completion func(*foundation.NSArray[*CLSContext], unsafe.Pointer))

Fetches all the contexts matching a predicate.

func (*CLSDataStore) Delegate

func (o *CLSDataStore) Delegate() CLSDataStoreDelegate

@abstract The data store delegate allows for easy population of the app's context hierarchy.

func (*CLSDataStore) FetchActivityForURLCompletion

func (o *CLSDataStore) FetchActivityForURLCompletion(url *foundation.NSURL, completion func(*CLSActivity, unsafe.Pointer))

Fetches an activity for a given document so you can record progress on the associated task.

func (*CLSDataStore) MainAppContext

func (o *CLSDataStore) MainAppContext() *CLSContext

@abstract Fetch the top level context for the current app. @discussion The main context is automatically created. Add child contexts to this context to persist them in the data store.

func (*CLSDataStore) RemoveContext

func (o *CLSDataStore) RemoveContext(context_ *CLSContext)

Marks a context for removal.

func (*CLSDataStore) RunningActivity

func (o *CLSDataStore) RunningActivity() *CLSActivity

@abstract Returns the most recently started activity that is running.

func (*CLSDataStore) SaveWithCompletion

func (o *CLSDataStore) SaveWithCompletion(completion func(unsafe.Pointer))

Saves any changes you’ve made in the data store.

func (*CLSDataStore) SetDelegate

func (o *CLSDataStore) SetDelegate(delegate CLSDataStoreDelegate)

type CLSDataStoreDelegate

type CLSDataStoreDelegate interface {
	CreateContextForIdentifierParentContextParentIdentifierPath(identifier *foundation.NSString, parentContext *CLSContext, parentIdentifierPath *foundation.NSArray[*foundation.NSString]) *CLSContext
}

CLSDataStoreDelegate wraps the ObjC protocol CLSDataStoreDelegate.

type CLSErrorCode

type CLSErrorCode int64

Error codes that ClassKit issues.

const (
	CLSErrorCodeNone                      CLSErrorCode = 0
	CLSErrorCodeClassKitUnavailable       CLSErrorCode = 1
	CLSErrorCodeInvalidArgument           CLSErrorCode = 2
	CLSErrorCodeInvalidModification       CLSErrorCode = 3
	CLSErrorCodeAuthorizationDenied       CLSErrorCode = 4
	CLSErrorCodeDatabaseInaccessible      CLSErrorCode = 5
	CLSErrorCodeLimits                    CLSErrorCode = 6
	CLSErrorCodeInvalidCreate             CLSErrorCode = 7
	CLSErrorCodeInvalidUpdate             CLSErrorCode = 8
	CLSErrorCodePartialFailure            CLSErrorCode = 9
	CLSErrorCodeInvalidAccountCredentials CLSErrorCode = 10
)

func (CLSErrorCode) String

func (e CLSErrorCode) String() string

type CLSObject

type CLSObject struct {
	foundation.NSObject
}

The abstract base class for objects managed by ClassKit.

Apple documentation: https://developer.apple.com/documentation/classkit/clsobject

func CLSObjectFromID

func CLSObjectFromID(id objc.ID) *CLSObject

func (*CLSObject) DateCreated

func (o *CLSObject) DateCreated() *foundation.NSDate

@abstract The date this object was created.

func (*CLSObject) DateLastModified

func (o *CLSObject) DateLastModified() *foundation.NSDate

@abstract The date this object was last modified.

type CLSProgressReportingCapability

type CLSProgressReportingCapability struct {
	CLSObject
}

A progress reporting capability supported by a context.

Apple documentation: https://developer.apple.com/documentation/classkit/clsprogressreportingcapability

func CLSProgressReportingCapabilityFromID

func CLSProgressReportingCapabilityFromID(id objc.ID) *CLSProgressReportingCapability

func (*CLSProgressReportingCapability) Details

@abstract Returns progress reporting details

func (*CLSProgressReportingCapability) InitWithKindDetails

Creates a new progress reporting capability of the given type with a descriptive string.

func (*CLSProgressReportingCapability) Kind

@abstract Returns the kind of progress reporting capability

type CLSProgressReportingCapabilityKind

type CLSProgressReportingCapabilityKind int64

The available kinds of progress reporting that a context can perform.

const (
	CLSProgressReportingCapabilityKindDuration CLSProgressReportingCapabilityKind = 0
	CLSProgressReportingCapabilityKindPercent  CLSProgressReportingCapabilityKind = 1
	CLSProgressReportingCapabilityKindBinary   CLSProgressReportingCapabilityKind = 2
	CLSProgressReportingCapabilityKindQuantity CLSProgressReportingCapabilityKind = 3
	CLSProgressReportingCapabilityKindScore    CLSProgressReportingCapabilityKind = 4
)

func (CLSProgressReportingCapabilityKind) String

type CLSQuantityItem

type CLSQuantityItem struct {
	CLSActivityItem
}

Activity information that signifies a quantity.

Apple documentation: https://developer.apple.com/documentation/classkit/clsquantityitem

func CLSQuantityItemFromID

func CLSQuantityItemFromID(id objc.ID) *CLSQuantityItem

func (*CLSQuantityItem) InitWithIdentifierTitle

func (o *CLSQuantityItem) InitWithIdentifierTitle(identifier *foundation.NSString, title *foundation.NSString) *CLSQuantityItem

Initializes an activity item that records a discrete quantity.

func (*CLSQuantityItem) Quantity

func (o *CLSQuantityItem) Quantity() float64

@abstract Quantity awarded.

func (*CLSQuantityItem) SetQuantity

func (o *CLSQuantityItem) SetQuantity(quantity float64)

type CLSScoreItem

type CLSScoreItem struct {
	CLSActivityItem
}

Activity information that signifies a score out of a possible maximum.

Apple documentation: https://developer.apple.com/documentation/classkit/clsscoreitem

func CLSScoreItemFromID

func CLSScoreItemFromID(id objc.ID) *CLSScoreItem

func (*CLSScoreItem) InitWithIdentifierTitleScoreMaxScore

func (o *CLSScoreItem) InitWithIdentifierTitleScoreMaxScore(identifier *foundation.NSString, title *foundation.NSString, score float64, maxScore float64) *CLSScoreItem

Initializes an activity item that holds a score value.

func (*CLSScoreItem) MaxScore

func (o *CLSScoreItem) MaxScore() float64

@abstract Total score possible. @discussion Must be greater than zero.

func (*CLSScoreItem) Score

func (o *CLSScoreItem) Score() float64

@abstract Score out of @c maxScore. @discussion Should be between zero and @c maxScore [0.0,maxScore].

func (*CLSScoreItem) SetMaxScore

func (o *CLSScoreItem) SetMaxScore(maxScore float64)

func (*CLSScoreItem) SetScore

func (o *CLSScoreItem) SetScore(score float64)

type Clockid_t

type Clockid_t int64

func (Clockid_t) String

func (e Clockid_t) String() string

type Dispatch_autorelease_frequency_t

type Dispatch_autorelease_frequency_t uint64
const (
	DISPATCH_AUTORELEASE_FREQUENCY_INHERIT   Dispatch_autorelease_frequency_t = 0
	DISPATCH_AUTORELEASE_FREQUENCY_WORK_ITEM Dispatch_autorelease_frequency_t = 1
	DISPATCH_AUTORELEASE_FREQUENCY_NEVER     Dispatch_autorelease_frequency_t = 2
)

func (Dispatch_autorelease_frequency_t) String

type Dispatch_block_flags_t

type Dispatch_block_flags_t uint64
const (
	DISPATCH_BLOCK_BARRIER           Dispatch_block_flags_t = 1
	DISPATCH_BLOCK_DETACHED          Dispatch_block_flags_t = 2
	DISPATCH_BLOCK_ASSIGN_CURRENT    Dispatch_block_flags_t = 4
	DISPATCH_BLOCK_NO_QOS_CLASS      Dispatch_block_flags_t = 8
	DISPATCH_BLOCK_INHERIT_QOS_CLASS Dispatch_block_flags_t = 16
	DISPATCH_BLOCK_ENFORCE_QOS_CLASS Dispatch_block_flags_t = 32
)

func (Dispatch_block_flags_t) String

func (e Dispatch_block_flags_t) String() string

type Filesec_property_t

type Filesec_property_t int64
const (
	FILESEC_OWNER         Filesec_property_t = 1
	FILESEC_GROUP         Filesec_property_t = 2
	FILESEC_UUID          Filesec_property_t = 3
	FILESEC_MODE          Filesec_property_t = 4
	FILESEC_ACL           Filesec_property_t = 5
	FILESEC_GRPUUID       Filesec_property_t = 6
	FILESEC_ACL_RAW       Filesec_property_t = 100
	FILESEC_ACL_ALLOCSIZE Filesec_property_t = 101
)

func (Filesec_property_t) String

func (e Filesec_property_t) String() string

type Idtype_t

type Idtype_t int64
const (
	P_ALL  Idtype_t = 0
	P_PID  Idtype_t = 1
	P_PGID Idtype_t = 2
)

func (Idtype_t) String

func (e Idtype_t) String() string

type Ipc_info_object_type_t

type Ipc_info_object_type_t int64
const (
	IPC_OTYPE_NONE                 Ipc_info_object_type_t = 0
	IPC_OTYPE_THREAD_CONTROL       Ipc_info_object_type_t = 1
	IPC_OTYPE_TASK_CONTROL         Ipc_info_object_type_t = 2
	IPC_OTYPE_HOST                 Ipc_info_object_type_t = 3
	IPC_OTYPE_HOST_PRIV            Ipc_info_object_type_t = 4
	IPC_OTYPE_PROCESSOR            Ipc_info_object_type_t = 5
	IPC_OTYPE_PROCESSOR_SET        Ipc_info_object_type_t = 6
	IPC_OTYPE_PROCESSOR_SET_NAME   Ipc_info_object_type_t = 7
	IPC_OTYPE_TIMER                Ipc_info_object_type_t = 8
	IPC_OTYPE_PORT_SUBST_ONCE      Ipc_info_object_type_t = 9
	IPC_OTYPE_MIG                  Ipc_info_object_type_t = 10
	IPC_OTYPE_MEMORY_OBJECT        Ipc_info_object_type_t = 11
	IPC_OTYPE_XMM_PAGER            Ipc_info_object_type_t = 12
	IPC_OTYPE_XMM_KERNEL           Ipc_info_object_type_t = 13
	IPC_OTYPE_XMM_REPLY            Ipc_info_object_type_t = 14
	IPC_OTYPE_UND_REPLY            Ipc_info_object_type_t = 15
	IPC_OTYPE_HOST_NOTIFY          Ipc_info_object_type_t = 16
	IPC_OTYPE_HOST_SECURITY        Ipc_info_object_type_t = 17
	IPC_OTYPE_LEDGER               Ipc_info_object_type_t = 18
	IPC_OTYPE_MAIN_DEVICE          Ipc_info_object_type_t = 19
	IPC_OTYPE_TASK_NAME            Ipc_info_object_type_t = 20
	IPC_OTYPE_SUBSYSTEM            Ipc_info_object_type_t = 21
	IPC_OTYPE_IO_DONE_QUEUE        Ipc_info_object_type_t = 22
	IPC_OTYPE_SEMAPHORE            Ipc_info_object_type_t = 23
	IPC_OTYPE_LOCK_SET             Ipc_info_object_type_t = 24
	IPC_OTYPE_CLOCK                Ipc_info_object_type_t = 25
	IPC_OTYPE_CLOCK_CTRL           Ipc_info_object_type_t = 26
	IPC_OTYPE_IOKIT_IDENT          Ipc_info_object_type_t = 27
	IPC_OTYPE_NAMED_ENTRY          Ipc_info_object_type_t = 28
	IPC_OTYPE_IOKIT_CONNECT        Ipc_info_object_type_t = 29
	IPC_OTYPE_IOKIT_OBJECT         Ipc_info_object_type_t = 30
	IPC_OTYPE_UPL                  Ipc_info_object_type_t = 31
	IPC_OTYPE_MEM_OBJ_CONTROL      Ipc_info_object_type_t = 32
	IPC_OTYPE_AU_SESSIONPORT       Ipc_info_object_type_t = 33
	IPC_OTYPE_FILEPORT             Ipc_info_object_type_t = 34
	IPC_OTYPE_LABELH               Ipc_info_object_type_t = 35
	IPC_OTYPE_TASK_RESUME          Ipc_info_object_type_t = 36
	IPC_OTYPE_VOUCHER              Ipc_info_object_type_t = 37
	IPC_OTYPE_VOUCHER_ATTR_CONTROL Ipc_info_object_type_t = 38
	IPC_OTYPE_WORK_INTERVAL        Ipc_info_object_type_t = 39
	IPC_OTYPE_UX_HANDLER           Ipc_info_object_type_t = 40
	IPC_OTYPE_UEXT_OBJECT          Ipc_info_object_type_t = 41
	IPC_OTYPE_ARCADE_REG           Ipc_info_object_type_t = 42
	IPC_OTYPE_EVENTLINK            Ipc_info_object_type_t = 43
	IPC_OTYPE_TASK_INSPECT         Ipc_info_object_type_t = 44
	IPC_OTYPE_TASK_READ            Ipc_info_object_type_t = 45
	IPC_OTYPE_THREAD_INSPECT       Ipc_info_object_type_t = 46
	IPC_OTYPE_THREAD_READ          Ipc_info_object_type_t = 47
	IPC_OTYPE_SUID_CRED            Ipc_info_object_type_t = 48
	IPC_OTYPE_HYPERVISOR           Ipc_info_object_type_t = 49
	IPC_OTYPE_TASK_ID_TOKEN        Ipc_info_object_type_t = 50
	IPC_OTYPE_TASK_FATAL           Ipc_info_object_type_t = 51
	IPC_OTYPE_KCDATA               Ipc_info_object_type_t = 52
	IPC_OTYPE_EXCLAVES_RESOURCE    Ipc_info_object_type_t = 53
	IPC_OTYPE_THREAD_RESUME        Ipc_info_object_type_t = 54
	IPC_OTYPE_UNKNOWN              Ipc_info_object_type_t = 4294967295
)

func (Ipc_info_object_type_t) String

func (e Ipc_info_object_type_t) String() string

type Launch_data_type_t

type Launch_data_type_t int64
const (
	LAUNCH_DATA_DICTIONARY Launch_data_type_t = 1
	LAUNCH_DATA_ARRAY      Launch_data_type_t = 2
	LAUNCH_DATA_FD         Launch_data_type_t = 3
	LAUNCH_DATA_INTEGER    Launch_data_type_t = 4
	LAUNCH_DATA_REAL       Launch_data_type_t = 5
	LAUNCH_DATA_BOOL       Launch_data_type_t = 6
	LAUNCH_DATA_STRING     Launch_data_type_t = 7
	LAUNCH_DATA_OPAQUE     Launch_data_type_t = 8
	LAUNCH_DATA_ERRNO      Launch_data_type_t = 9
	LAUNCH_DATA_MACHPORT   Launch_data_type_t = 10
)

func (Launch_data_type_t) String

func (e Launch_data_type_t) String() string

type MDLabelDomain

type MDLabelDomain int64

@typedef MDLabelDomain @abstract These constants are used to specify a domain to MDLabelCreate().

const (
	KMDLabelUserDomain  MDLabelDomain = 0
	KMDLabelLocalDomain MDLabelDomain = 1
)

func (MDLabelDomain) String

func (e MDLabelDomain) String() string

type MDQueryOptionFlags

type MDQueryOptionFlags int64
const (
	KMDQuerySynchronous        MDQueryOptionFlags = 1
	KMDQueryWantsUpdates       MDQueryOptionFlags = 4
	KMDQueryAllowFSTranslation MDQueryOptionFlags = 8
)

func (MDQueryOptionFlags) String

func (e MDQueryOptionFlags) String() string

type MDQuerySortOptionFlags

type MDQuerySortOptionFlags int64

@enum MDQuerySortOptionFlags @constant kMDQueryReverseSortOrderFlag Sort the attribute in reverse order.

const (
	KMDQueryReverseSortOrderFlag MDQuerySortOptionFlags = 1
)

func (MDQuerySortOptionFlags) String

func (e MDQuerySortOptionFlags) String() string

type Mach_vm_range_flags_t

type Mach_vm_range_flags_t int64
const (
	MACH_VM_RANGE_NONE Mach_vm_range_flags_t = 0
)

func (Mach_vm_range_flags_t) String

func (e Mach_vm_range_flags_t) String() string

type Mach_vm_range_flavor_t

type Mach_vm_range_flavor_t int64
const (
	MACH_VM_RANGE_FLAVOR_INVALID Mach_vm_range_flavor_t = 0
	MACH_VM_RANGE_FLAVOR_V1      Mach_vm_range_flavor_t = 1
)

func (Mach_vm_range_flavor_t) String

func (e Mach_vm_range_flavor_t) String() string

type Mach_vm_range_tag_t

type Mach_vm_range_tag_t int64
const (
	MACH_VM_RANGE_DEFAULT Mach_vm_range_tag_t = 0
	MACH_VM_RANGE_DATA    Mach_vm_range_tag_t = 1
	MACH_VM_RANGE_FIXED   Mach_vm_range_tag_t = 2
)

func (Mach_vm_range_tag_t) String

func (e Mach_vm_range_tag_t) String() string

type Mpo_flags_t

type Mpo_flags_t int64
const (
	MPO_PORT                            Mpo_flags_t = 0
	MPO_SERVICE_PORT                    Mpo_flags_t = 1024
	MPO_CONNECTION_PORT                 Mpo_flags_t = 2048
	MPO_REPLY_PORT                      Mpo_flags_t = 4096
	MPO_WEAK_REPLY_PORT                 Mpo_flags_t = 16384
	MPO_NOTIFICATION_PORT               Mpo_flags_t = 17408
	MPO_EXCEPTION_PORT                  Mpo_flags_t = 32768
	MPO_CONNECTION_PORT_WITH_PORT_ARRAY Mpo_flags_t = 65536
)

func (Mpo_flags_t) String

func (e Mpo_flags_t) String() string

type Os_clockid_t

type Os_clockid_t int64
const (
	OS_CLOCK_MACH_ABSOLUTE_TIME Os_clockid_t = 32
)

func (Os_clockid_t) String

func (e Os_clockid_t) String() string

type Ptrauth_key

type Ptrauth_key int64
const (
	Ptrauth_key_none                     Ptrauth_key = -1
	Ptrauth_key_asia                     Ptrauth_key = 0
	Ptrauth_key_asib                     Ptrauth_key = 1
	Ptrauth_key_asda                     Ptrauth_key = 2
	Ptrauth_key_asdb                     Ptrauth_key = 3
	Ptrauth_key_process_independent_code Ptrauth_key = 0
	Ptrauth_key_process_dependent_code   Ptrauth_key = 1
	Ptrauth_key_process_independent_data Ptrauth_key = 2
	Ptrauth_key_process_dependent_data   Ptrauth_key = 3
	Ptrauth_key_return_address           Ptrauth_key = 1
	Ptrauth_key_frame_pointer            Ptrauth_key = 3
	Ptrauth_key_function_pointer         Ptrauth_key = 0
	Ptrauth_key_block_function           Ptrauth_key = 0
	Ptrauth_key_cxx_vtable_pointer       Ptrauth_key = 2
	Ptrauth_key_method_list_pointer      Ptrauth_key = 2
	Ptrauth_key_objc_isa_pointer         Ptrauth_key = 2
	Ptrauth_key_objc_super_pointer       Ptrauth_key = 2
	Ptrauth_key_objc_sel_pointer         Ptrauth_key = 3
	Ptrauth_key_objc_class_ro_pointer    Ptrauth_key = 2
	Ptrauth_key_block_descriptor_pointer Ptrauth_key = 2
	Ptrauth_key_init_fini_pointer        Ptrauth_key = 0
)

func (Ptrauth_key) String

func (e Ptrauth_key) String() string

type Qos_class_t

type Qos_class_t uint32
const (
	QOS_CLASS_USER_INTERACTIVE Qos_class_t = 33
	QOS_CLASS_USER_INITIATED   Qos_class_t = 25
	QOS_CLASS_DEFAULT          Qos_class_t = 21
	QOS_CLASS_UTILITY          Qos_class_t = 17
	QOS_CLASS_BACKGROUND       Qos_class_t = 9
	QOS_CLASS_UNSPECIFIED      Qos_class_t = 0
)

func (Qos_class_t) String

func (e Qos_class_t) String() string

type Virtual_memory_guard_exception_code_t

type Virtual_memory_guard_exception_code_t int64
const (
	KGUARD_EXC_DEALLOC_GAP                   Virtual_memory_guard_exception_code_t = 1
	KGUARD_EXC_RECLAIM_COPYIO_FAILURE        Virtual_memory_guard_exception_code_t = 2
	KGUARD_EXC_RECLAIM_INDEX_FAILURE         Virtual_memory_guard_exception_code_t = 4
	KGUARD_EXC_RECLAIM_DEALLOCATE_FAILURE    Virtual_memory_guard_exception_code_t = 8
	KGUARD_EXC_RECLAIM_ACCOUNTING_FAILURE    Virtual_memory_guard_exception_code_t = 9
	KGUARD_EXC_SEC_IOPL_ON_EXEC_PAGE         Virtual_memory_guard_exception_code_t = 10
	KGUARD_EXC_SEC_EXEC_ON_IOPL_PAGE         Virtual_memory_guard_exception_code_t = 11
	KGUARD_EXC_SEC_UPL_WRITE_ON_EXEC_REGION  Virtual_memory_guard_exception_code_t = 12
	KGUARD_EXC_LARGE_ALLOCATION_TELEMETRY    Virtual_memory_guard_exception_code_t = 13
	KGUARD_EXC_SEC_ACCESS_FAULT              Virtual_memory_guard_exception_code_t = 98
	KGUARD_EXC_SEC_ASYNC_ACCESS_FAULT        Virtual_memory_guard_exception_code_t = 99
	KGUARD_EXC_SEC_COPY_DENIED               Virtual_memory_guard_exception_code_t = 100
	KGUARD_EXC_SEC_SHARING_DENIED            Virtual_memory_guard_exception_code_t = 101
	KGUARD_EXC_MTE_SYNC_FAULT                Virtual_memory_guard_exception_code_t = 200
	KGUARD_EXC_MTE_ASYNC_USER_FAULT          Virtual_memory_guard_exception_code_t = 201
	KGUARD_EXC_MTE_ASYNC_KERN_FAULT          Virtual_memory_guard_exception_code_t = 202
	KGUARD_EXC_GUARD_OBJECT_ASYNC_USER_FAULT Virtual_memory_guard_exception_code_t = 203
	KGUARD_EXC_GUARD_OBJECT_ASYNC_KERN_FAULT Virtual_memory_guard_exception_code_t = 204
)

func (Virtual_memory_guard_exception_code_t) String

type Xpc_listener_create_flags_t

type Xpc_listener_create_flags_t int64
const (
	XPC_LISTENER_CREATE_NONE             Xpc_listener_create_flags_t = 0
	XPC_LISTENER_CREATE_INACTIVE         Xpc_listener_create_flags_t = 1
	XPC_LISTENER_CREATE_FORCE_MACH       Xpc_listener_create_flags_t = 2
	XPC_LISTENER_CREATE_FORCE_XPCSERVICE Xpc_listener_create_flags_t = 4
)

func (Xpc_listener_create_flags_t) String

type Xpc_session_create_flags_t

type Xpc_session_create_flags_t int64
const (
	XPC_SESSION_CREATE_NONE            Xpc_session_create_flags_t = 0
	XPC_SESSION_CREATE_INACTIVE        Xpc_session_create_flags_t = 1
	XPC_SESSION_CREATE_MACH_PRIVILEGED Xpc_session_create_flags_t = 2
)

func (Xpc_session_create_flags_t) String

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL