-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathOGGraph.h
More file actions
109 lines (80 loc) · 3.2 KB
/
OGGraph.h
File metadata and controls
109 lines (80 loc) · 3.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
//
// OGGraph.h
//
//
// Created by Kyle on 2024/2/5.
//
#ifndef OGGraph_h
#define OGGraph_h
#include "OGBase.h"
#include "../Private/CFRuntime.h"
#include "OGCounterQueryType.h"
// Note: Place all structure declaration in a single place to avoid header cycle dependency
typedef struct OG_BRIDGED_TYPE(id) OGGraphStorage * OGGraphRef;
typedef struct OG_BRIDGED_TYPE(id) OGGraphContextStorage * OGGraphContextRef;
typedef struct OG_BRIDGED_TYPE(id) OGSubgraphStorage * OGSubgraphRef;
struct OGGraphStorage;
struct OGGraphContextStorage;
struct OGSubgraphStorage;
typedef uint32_t OGAttribute OG_SWIFT_STRUCT OG_SWIFT_NAME(AnyAttribute);
OG_ASSUME_NONNULL_BEGIN
// MARK: - Exported C functions
OG_EXTERN_C_BEGIN
OG_EXPORT
OG_REFINED_FOR_SWIFT
OGGraphRef OGGraphCreate(void) OG_SWIFT_NAME(OGGraphRef.init());
OG_EXPORT
OG_REFINED_FOR_SWIFT
OGGraphRef OGGraphCreateShared(_Nullable OGGraphRef graph) OG_SWIFT_NAME(OGGraphRef.init(shared:));
OG_EXPORT
OG_REFINED_FOR_SWIFT
void OGGraphArchiveJSON(char const * _Nullable name) OG_SWIFT_NAME(OGGraphRef.archiveJSON(name:));
OG_EXPORT
OG_REFINED_FOR_SWIFT
_Nullable CFTypeRef OGGraphDescription(_Nullable OGGraphRef graph, CFDictionaryRef options) OG_SWIFT_NAME(OGGraphRef.description(_:options:));
OG_EXPORT
OG_REFINED_FOR_SWIFT
CFTypeID OGGraphGetTypeID(void) OG_SWIFT_NAME(getter:OGGraphRef.typeID());
OG_EXPORT
OG_REFINED_FOR_SWIFT
void OGGraphStartProfiling(_Nullable OGGraphRef graph);
OG_EXPORT
OG_REFINED_FOR_SWIFT
void OGGraphStopProfiling(_Nullable OGGraphRef graph);
OG_EXPORT
OG_REFINED_FOR_SWIFT
const void * _Nullable OGGraphGetContext(OGGraphRef graph) OG_SWIFT_NAME(getter:OGGraphRef.context(self:));
OG_EXPORT
OG_REFINED_FOR_SWIFT
void OGGraphSetContext(OGGraphRef graph, const void * _Nullable context) OG_SWIFT_NAME(setter:OGGraphRef.context(self:_:));
OG_EXPORT
OG_REFINED_FOR_SWIFT
OGGraphContextRef OGGraphGetGraphContext(OGGraphRef graph) OG_SWIFT_NAME(getter:OGGraphRef.graphContext(self:));
OG_EXPORT
OG_REFINED_FOR_SWIFT
void OGGraphInvalidate(OGGraphRef graph) OG_SWIFT_NAME(OGGraphRef.invalidate(self:));
OG_EXPORT
OG_REFINED_FOR_SWIFT
void OGGraphInvalidateAllValues(OGGraphRef graph) OG_SWIFT_NAME(OGGraphRef.invalidateAllValues(self:));
OG_EXPORT
OG_REFINED_FOR_SWIFT
void OGGraphSetInvalidationCallback(OGGraphRef graph,
const void (*_Nullable function)(const void * _Nullable context OG_SWIFT_CONTEXT, OGAttribute) OG_SWIFT_CC(swift),
const void * _Nullable context);
OG_EXPORT
OG_REFINED_FOR_SWIFT
void OGGraphSetUpdateCallback(OGGraphRef graph,
const void (*_Nullable function)(const void * _Nullable context OG_SWIFT_CONTEXT) OG_SWIFT_CC(swift),
const void * _Nullable context);
OG_EXPORT
OG_REFINED_FOR_SWIFT
uint64_t OGGraphGetCounter(OGGraphRef graph, OGCounterQueryType query) OG_SWIFT_NAME(OGGraphRef.counter(self:for:));
OG_EXPORT
OG_REFINED_FOR_SWIFT
void OGGraphSetUpdate(const void * _Nullable value) OG_SWIFT_NAME(OGGraphRef.setUpdate(_:));
OG_EXPORT
OG_REFINED_FOR_SWIFT
const void * _Nullable OGGraphClearUpdate(void) OG_SWIFT_NAME(OGGraphRef.clearUpdate());
OG_EXTERN_C_END
OG_ASSUME_NONNULL_END
#endif /* OGGraph_h */