Commit Graph

147 Commits

Author SHA1 Message Date
michaelwright235 b2b2eb7222 sys: timezone: Add missing funcs, consts & sorting
Adds missing functions of CFTimeZone, implements CFTimeZoneNameStyle
type and consts related to it. Sorts all stuff in Apple docs order.
2023-05-31 13:19:12 +03:00
bors-servo 94d9037928 Auto merge of #569 - michaelwright235:messageport, r=jdm
sys: messageport: Sort functions, add error codes

Sorts all functions of CFMessagePort in Apple docs order, adds constants of CFMessagePortSendRequest Error Codes.
2023-05-30 13:47:57 +02:00
bors-servo 4a2b7ece8d Auto merge of #568 - michaelwright235:number, r=jdm
sys: number: Add missing funcs and consts, sorting

Adds missing functions and constants of CFNumber. Sorts them in Apple docs order.
2023-05-30 13:45:13 +02:00
michaelwright235 cc092be763 sys: number: Add missing funcs and consts, sorting
Adds missing functions and consts of CFNumber.
Sorts them in Apple docs order.
2023-05-29 23:08:15 +03:00
michaelwright235 db3f5de309 sys: messageport: Sort functions, add error codes 2023-05-29 22:56:49 +03:00
michaelwright235 13ea548fac sys: mach_port: Add missing structures, funcs, etc 2023-05-29 22:37:41 +03:00
michaelwright235 6d00383baf mach_port: Removed redundant pub use 2023-05-29 22:31:11 +03:00
bors-servo ac95280017 Auto merge of #566 - michaelwright235:error, r=jdm
CFError (sys): Add missing functions & consts

Adds missing functions and consts of CFError and sorts them in Apple docs order.
2023-05-29 18:29:12 +02:00
bors-servo 79321e23c2 Auto merge of #564 - michaelwright235:characterset, r=jdm
CFCharacterSet (sys): Add missing functions & sorting

Adds missing functions and sorts them in Apple docs order. CFMutableCharacterSetRef is a mutable pointer now as it should be, according to CFCharacterSet.h.
2023-05-29 18:26:19 +02:00
bors-servo 2bb215b600 Auto merge of #563 - michaelwright235:bundle, r=jdm
CFBundle (sys): Add funcs & consts, sorting

Adds missing functions, types and constants from CFBundle.h. Several inline functions are also rewritten as unsafe Rust functions. All of them are sorted in Apple docs order.
2023-05-29 18:22:03 +02:00
michaelwright235 f26a11873a sys: data: Introduce CFMutableData & its functions 2023-05-29 19:02:51 +03:00
michaelwright235 a3f944fbd8 sys: error: Add commented const
Adds commented out kCFErrorLocalizedFailureKey
const to not forget to implement it in the future.
2023-05-29 15:18:50 +03:00
michaelwright235 5f1ee87146 sys: error: Add missing functions & consts, sorting
Adds missing functions and consts of CFError
and sorts them in Apple docs order.
2023-05-29 15:08:52 +03:00
michaelwright235 0c8bef46d5 sys: data: Add missing functions & sorting
Adds missing functions of CFData and sorts them in Apple docs order.
Also missing CFDataSearchFlags type and related consts are added.
2023-05-29 13:46:59 +03:00
michaelwright235 33d5fb7791 sys: characterset: Add missing functions & sorting
Adds missing functions and sorts them in Apple docs order.
CFMutableCharacterSetRef is a mutable pointer now as it should be,
according to CFCharacterSet.h.
2023-05-29 13:35:55 +03:00
michaelwright235 8be8ef8b0c sys: bundle: Add funcs & consts, sorting
Adds missing functions, types and constants from CFBundle.h.
Several inline functions are also rewritten as unsafe Rust functions.
All of them are sorted in Apple docs order.
2023-05-29 13:16:10 +03:00
bors-servo 46e8deafc2 Auto merge of #559 - michaelwright235:dict, r=jdm
CFDictionary (sys): add new funcs, sorting

Adds missing functions and one const. All of them are sorted in Apple docs order (https://developer.apple.com/documentation/corefoundation/cfdictionary?language=objc).
2023-05-28 20:54:54 +02:00
bors-servo c849505985 Auto merge of #557 - michaelwright235:attr_str, r=jdm
sys: attributed_string: Adds missing funcs & sorting

Adds missing functions of `CFAttributedString`, sorts them in Apple docs order (https://developer.apple.com/documentation/corefoundation/cfattributedstring?language=objc).
CFMutableAttributedStringRef is converted to a mutable pointer (as it should be) according to CFAttributedString.h.
2023-05-28 20:52:15 +02:00
michaelwright235 47365abca6 sys: dictionary: Add new funcs, sorting
Adds missing functions and one const. All of them are sorted in Apple
docs order.
2023-05-27 16:09:36 +03:00
michaelwright235 1cb863ea97 sys: base: Add new types & funcs
Adds necessary types for upcoming changes. All of them are defined
in MacTypes.h. Several functions were added. Implements new
derive attributes.
2023-05-26 18:50:54 +03:00
michaelwright235 b3397ecc75 sys: attributed_string: Adds missing funcs & sorting
Adds missing functions of CFAttributedString, sorts them in Apple docs
order (https://developer.apple.com/documentation/corefoundation/cfattributedstring?language=objc).
CFMutableAttributedStringRef is converted to a mutable
pointer (as it should be).
2023-05-26 18:26:50 +03:00
michaelwright235 04511e27e4 sys: array: Add missing funcs & sorting
Adds missings functions for CFArray and
sorts them in Apple docs order
(https://developer.apple.com/documentation/corefoundation/cfarray?language=objc
and https://developer.apple.com/documentation/corefoundation/cfmutablearray?language=objc)
2023-05-26 14:25:34 +03:00
michaelwright235 2f5753321a sys: Introduce CFLocale
Adds `locale` module (corresponds to CFLocale)
to core-foundation-sys.
2023-05-25 00:18:29 +03:00
michaelwright235 15066d628c sys: base: Add new types
Adds new types (SInt16, LangCode, RegionCode). All of them are
defined in MacTypes.h
2023-05-24 23:31:41 +03:00
michaelwright235 7d324704cd sys: Introduce CFUserNotification
This API is available only on Mac OS, so an additional cfg flag
was added in lib.rs.
2023-05-23 20:44:41 +03:00
Alex Touchet 1632edee66 Use SPDX license format 2023-04-02 22:43:22 -07:00
Jeff Muizelaar 0b46a8dae4 Bump minor version of core-foundation-sys to 0.8.4 2023-04-02 13:43:46 -04:00
Mads Marquart f855f23902 Remove build script from core-foundation-sys
Should result in faster build times
2022-03-22 01:14:16 +01:00
Liu Dingming 09763eb8bd Add more functions to CFArray 2021-12-27 01:57:52 +08:00
Nabil Elqatib f57966fd36 Publish core-foundation-sys, core-foundation 2021-10-12 13:43:34 +02:00
bors-servo f7e0b97e0b Auto merge of #436 - AsafFisher:master, r=jrmuizel
Add CGEventTap

https://github.com/servo/core-graphics-rs/issues/111
2021-05-26 13:18:34 -04:00
Jeff Muizelaar ce17c9aa59 Add CFData::from_arc
This allows creating a zero-copy CFData wrapping existing data.
2021-02-14 11:52:04 -05:00
Makoto Kato 2fe22f8c98 Add CFStringCreateWithCharactersNoCopy 2021-01-26 13:59:23 +09:00
Asaf Fisher edb187a17c core-foundation: Add basic CFMachPort 2021-01-23 03:24:30 +02:00
Yu Shimura 437be24cdb CFBundleCopyResourcesDirectoryURL 2020-10-14 11:10:39 +09:00
Jeff Muizelaar c55fd48fbe Fix the definition of CFAllocatorContext
The function pointers can be null so should be wrapped in Option.

This struct was basically unusable before so I think we should
be fine making this change while only bumping the patch version.
I was unable to find any uses of it on github.
2020-10-13 17:55:00 -04:00
bors-servo d540fee244 Auto merge of #412 - sassman:feat/number-type-as-const, r=jrmuizel
feat(CFNumber): change `CFNumberType` from static to const, to improve match expression ergonomics

this PR changes the `CFNumberType` values like `kCFNumberSInt64Type` from `static` to `const`.

That way it is possible to simplify match expressions like this:

before:
```rust
let type_id = unsafe { CFNumberGetType(value) };
match type_id {
    si64 if si64 == kCFNumberSInt64Type => {},
    si32 if si32 == kCFNumberSInt32Type => {},
    _ => {},
}
```

after:
```rust
let type_id = unsafe { CFNumberGetType(value) };
match type_id {
    kCFNumberSInt64Type => {},
    kCFNumberSInt32Type => {},
    _ => {},
}
```

Note: function call `CFNumberGetType(value)` is implemented in PR #411
2020-10-07 08:48:55 -04:00
Sven Assmann b078b8754d feat(CFNumber): change CFNumberType from static to const, to improve match expression ergonomics 2020-10-07 09:17:32 +02:00
bors-servo 0be2364850 Auto merge of #411 - sassman:master, r=jrmuizel
add `CFNumberGetType` to determine specific number type

this PR adds support for `CFNumberGetType` that is needed if there is a `CFNumberRef` and it is not clear what sort of number it is.

Now it would be possible to do such a thing:

```rust
let type_id = unsafe { CFNumberGetType(value) };
match type_id {
    si64 if si64 == kCFNumberSInt64Type => {},
    si32 if si32 == kCFNumberSInt32Type => {},
    _ => {},
}
```
2020-10-06 18:14:01 -04:00
Sven Assmann 9007f1348c feat(CFBoolean): add function CFBooleanGetValue to retrieve a value of a CFBooleanRef 2020-10-04 12:26:01 +02:00
Sven Assmann 36d06c85ba feat(CFNumber): add CFNumberGetType to figure out the correct numeric type of a CFNumberRef 2020-10-04 10:42:40 +02:00
Josh Matthews d3336c3a21 Version bumps for cocoa, core-foundation-sys, core-foundation, core-text, core-graphics-types, core-graphics. 2020-09-15 12:19:56 -04:00
Kornel Lesiński 71a0d68abf Fix docs.rs build 2020-08-26 17:28:10 +01:00
Josh Matthews 762a01b90f Major version update for core-foundation-sys and all other dependencies. 2020-06-29 11:45:17 -04:00
Josh Matthews 7487580958 Publish core-foundation-sys 0.7.2. 2020-06-29 11:23:29 -04:00
Bryan Burgers a4e2983219 Add CFTimeZone::name
Add a `name` method to `CFTimeZone` to get the time zone ID (e.g.,
"America/Los_Angeles") of the current time zone.

Core Foundation calls this "name" instead of "id" in its method
signatures, but acknowledges it in the closely-related NSTimeZone
related docs. Since most of the other methods in this library match
closely with CF naming, also use `name` here.

> Time zone database entries such as “America/Los_Angeles” are IDs, not
> names. An example of a time zone name is “Pacific Daylight Time”.
> Although many NSTimeZone symbols include the word “name”, they
> actually refer to IDs.
2020-06-29 07:18:58 -05:00
Adam Perry 9c264d2904 Bump core-foundation(-sys) to 0.7.1 for release. 2020-06-28 09:44:43 -07:00
bors-servo 14ee94aef7 Auto merge of #359 - roblabla:cfset-missing-methods, r=jdm
CFSet: Add missing methods in -sys

Adds a handful of missing methods from the CFSet family.
2020-05-17 12:50:08 -04:00
Kornel 6ded5c360f CFBundleCopyBundleURL 2020-05-08 11:38:31 +01:00
brunohgouveia 1f4c983cee Add missing APIs to CTLine 2020-04-13 21:25:53 +01:00