Skip to content

Commit a86f0e1

Browse files
committed
Add IOKit hid and hidsystem submodules
1 parent 2148802 commit a86f0e1

File tree

8 files changed

+71
-8
lines changed

8 files changed

+71
-8
lines changed

Cargo.lock

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/header-translator/src/stmt.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1110,7 +1110,8 @@ impl Stmt {
11101110
| EntityKind::EnumDecl
11111111
| EntityKind::IntegerLiteral
11121112
| EntityKind::BinaryOperator
1113-
| EntityKind::DeclRefExpr => {}
1113+
| EntityKind::DeclRefExpr
1114+
| EntityKind::ParenExpr => {}
11141115
EntityKind::ObjCIndependentClass => {
11151116
// TODO: Might be interesting?
11161117
}

crates/header-translator/src/unexposed_attr.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,7 @@ impl UnexposedAttr {
281281
"AS_API_AVAILABLE" | "AS_HEADER_AUDIT_BEGIN" => None,
282282
"__CG_DEPRECATED_ENUMERATOR"
283283
| "__CG_DEPRECATED"
284+
| "__deprecated"
284285
| "__IOS_PROHIBITED"
285286
| "__IOS_UNAVAILABLE"
286287
| "__OSX_UNAVAILABLE"

crates/objc2/src/topics/about_generated/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
4848
- `IntentsUI` / `objc2-intents-ui`.
4949
- `IOBluetooth` / `objc2-io-bluetooth`.
5050
- `IOBluetoothUI` / `objc2-io-bluetooth-ui`.
51-
- `IOKit` / `objc2-io-kit` (currently only `usb` and `graphics` submodules).
51+
- `IOKit` / `objc2-io-kit` (currently only `usb`, `graphics`, `hid` and `hidsystem` submodules).
5252
- `IOUSBHost` / `objc2-io-usb-host`.
5353
- `iTunesLibrary` / `objc2-itunes-library`.
5454
- `JavaScriptCore` / `objc2-java-script-core`.

framework-crates/objc2-io-kit/Cargo.toml

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

framework-crates/objc2-io-kit/src/macros.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,13 @@ macro_rules! iokit_usb_msg {
5151
};
5252
}
5353

54+
macro_rules! iokit_vendor_specific_msg {
55+
($message:expr) => {
56+
// (sys_iokit | sub_iokit_vendor_specific | message)
57+
(err_system!(0x38) | err_sub!(-2) | $message) as u32
58+
};
59+
}
60+
5461
macro_rules! IO_FOUR_CHAR_CODE {
5562
($code:expr) => {
5663
$code
@@ -63,6 +70,7 @@ pub(crate) use iokit_common_msg;
6370
pub(crate) use iokit_common_msg as iokit_common_err;
6471
pub(crate) use iokit_usb_msg as iokit_usb_err;
6572
pub(crate) use iokit_usb_msg;
73+
pub(crate) use iokit_vendor_specific_msg;
6674
pub(crate) use EncodeRequest;
6775
pub(crate) use IOUSBBit;
6876
pub(crate) use IOUSBBit as IOUSBHostFamilyBit;

framework-crates/objc2-io-kit/translation-config.toml

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ visionos = "1.0"
1111
module.audio.skipped = true
1212
module.avc.skipped = true
1313
module.firewire.skipped = true
14-
module.hid.skipped = true
15-
module.hidsystem.skipped = true
1614
module.i2c.skipped = true
1715
module.iokitmig.skipped = true
1816
module.kext.skipped = true
@@ -62,9 +60,21 @@ struct.IORPCMessageMach.skipped = true
6260
struct.IORPCMessageErrorReturn.skipped = true
6361
struct.IORPC.skipped = true
6462
fn.IORPCMessageFromMach.skipped = true
63+
struct.evioSpecialKeyMsg.skipped = true
64+
typedef.evioSpecialKeyMsg_t.skipped = true
6565

66-
# Needs libdispatch
66+
# Needs dispatch_queue_t from libdispatch
6767
fn.IONotificationPortSetDispatchQueue.skipped = true
68+
fn.IOHIDQueueSetDispatchQueue.skipped = true
69+
fn.IOHIDDeviceSetDispatchQueue.skipped = true
70+
fn.IOHIDManagerSetDispatchQueue.skipped = true
71+
fn.IOHIDUserDeviceSetDispatchQueue.skipped = true
72+
73+
# Needs dispatch_block_t from libdispatch
74+
fn.IOHIDQueueSetCancelHandler.skipped = true
75+
fn.IOHIDDeviceSetCancelHandler.skipped = true
76+
fn.IOHIDManagerSetCancelHandler.skipped = true
77+
fn.IOHIDUserDeviceSetCancelHandler.skipped = true
6878

6979
# Recursive
7080
typedef.LowLatencyUserBufferInfo.skipped = true
@@ -100,6 +110,7 @@ const.kIOUSB30Bitrate10Gbps.skipped = true
100110
const.kIOUSB32Bitrate20Gbps.skipped = true
101111
const.kIODisplayModeIDBootProgrammable.skipped = true
102112
const.kIODisplayModeIDReservedBase.skipped = true
113+
const.kAppleOnboardGUID.skipped = true
103114

104115
# Emit these.
105116
const.IO1BitIndexedPixels.skipped = false
@@ -128,9 +139,9 @@ typedef.IOGraphicsEngineContext.skipped = true
128139
const.kIOGraphicsEngineContext.skipped = true
129140
const.kIOGraphicsEngineContextVersion.skipped = true
130141
struct._NXEQElStruct.skipped = true
131-
typedef._NXEQElStruct.skipped = true
142+
typedef.NXEQElement.skipped = true
132143
struct._evGlobals.skipped = true
133-
typedef._evGlobals.skipped = true
144+
typedef.EvGlobals.skipped = true
134145
const.IOSharedLockData.skipped = true
135146
const.ev_lock_data_t.skipped = true
136147

@@ -142,3 +153,19 @@ struct.bm12Cursor.skipped = true
142153
struct.bm18Cursor.skipped = true
143154
struct.bm34Cursor.skipped = true
144155
struct.bm38Cursor.skipped = true
156+
typedef.NXEventSystemInfoData.skipped = true
157+
158+
# Double typedefs
159+
typedef.NXTabletPointDataPtr.skipped = true
160+
typedef.NXTabletProximityDataPtr.skipped = true
161+
typedef.NXEventPtr.skipped = true
162+
163+
# Needs libc::audit_token_t
164+
struct._NXEventExtension.skipped = true
165+
typedef.NXEventExtension.skipped = true
166+
struct._NXEventExt.skipped = true
167+
typedef.NXEventExt.skipped = true
168+
fn.IOHIDAccessCheckAuditToken.skipped = true
169+
170+
# Private
171+
typedef._NXLLEvent.skipped = true

0 commit comments

Comments
 (0)