From 8d5e5320ce43db8a907a8579872573039ce13272 Mon Sep 17 00:00:00 2001 From: michaelwright235 Date: Tue, 6 Jun 2023 13:33:59 +0300 Subject: [PATCH 1/2] sys: Uncomment CFNotificationName constants because this is implemented now. --- core-foundation-sys/src/locale.rs | 3 ++- core-foundation-sys/src/timezone.rs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/core-foundation-sys/src/locale.rs b/core-foundation-sys/src/locale.rs index b394714..a1fd764 100644 --- a/core-foundation-sys/src/locale.rs +++ b/core-foundation-sys/src/locale.rs @@ -12,6 +12,7 @@ use base::{CFIndex, CFAllocatorRef, CFTypeRef, LangCode, RegionCode, CFTypeID}; use array::CFArrayRef; use string::CFStringRef; use dictionary::CFDictionaryRef; +use notification_center::CFNotificationName; #[repr(C)] pub struct __CFLocale(c_void); @@ -34,7 +35,7 @@ extern { */ /* Locale Change Notification */ - //pub static kCFLocaleCurrentLocaleDidChangeNotification: CFNotificationName; + pub static kCFLocaleCurrentLocaleDidChangeNotification: CFNotificationName; /* Locale Property Keys */ pub static kCFLocaleIdentifier: CFLocaleKey; diff --git a/core-foundation-sys/src/timezone.rs b/core-foundation-sys/src/timezone.rs index 8e73ba2..91e7ed0 100644 --- a/core-foundation-sys/src/timezone.rs +++ b/core-foundation-sys/src/timezone.rs @@ -16,6 +16,7 @@ use array::CFArrayRef; use dictionary::CFDictionaryRef; use data::CFDataRef; use locale::CFLocaleRef; +use notification_center::CFNotificationName; #[repr(C)] pub struct __CFTimeZone(c_void); @@ -36,7 +37,7 @@ extern { * CFTimeZone.h */ - //pub static kCFTimeZoneSystemTimeZoneDidChangeNotification: CFNotificationName; // todo + pub static kCFTimeZoneSystemTimeZoneDidChangeNotification: CFNotificationName; /* Creating a Time Zone */ pub fn CFTimeZoneCreate(allocator: CFAllocatorRef, name: CFStringRef, data: CFDataRef) -> CFTimeZoneRef; From fab893278daa38fb537a329aeb7f308f85ddb210 Mon Sep 17 00:00:00 2001 From: michaelwright235 Date: Tue, 6 Jun 2023 13:35:40 +0300 Subject: [PATCH 2/2] sys: attributed_string: Uncomment CFAttributedStringGetMutableString because CFMutableStringRef has been implemented. --- core-foundation-sys/src/attributed_string.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core-foundation-sys/src/attributed_string.rs b/core-foundation-sys/src/attributed_string.rs index 780ff5d..36c0d69 100644 --- a/core-foundation-sys/src/attributed_string.rs +++ b/core-foundation-sys/src/attributed_string.rs @@ -11,6 +11,7 @@ use std::os::raw::c_void; use base::{CFAllocatorRef, CFTypeRef, CFIndex, CFRange, CFTypeID, Boolean}; use string::CFStringRef; use dictionary::CFDictionaryRef; +use string::CFMutableStringRef; #[repr(C)] pub struct __CFAttributedString(c_void); @@ -48,7 +49,7 @@ extern { /* Modifying a CFMutableAttributedString */ pub fn CFAttributedStringBeginEditing(aStr: CFMutableAttributedStringRef); pub fn CFAttributedStringEndEditing(aStr: CFMutableAttributedStringRef); - // pub fn CFAttributedStringGetMutableString(aStr: CFMutableAttributedStringRef) -> CFMutableStringRef; //todo + pub fn CFAttributedStringGetMutableString(aStr: CFMutableAttributedStringRef) -> CFMutableStringRef; pub fn CFAttributedStringRemoveAttribute(aStr: CFMutableAttributedStringRef, range: CFRange, attrName: CFStringRef); pub fn CFAttributedStringReplaceString(aStr: CFMutableAttributedStringRef, range: CFRange, replacement: CFStringRef); pub fn CFAttributedStringReplaceAttributedString(aStr: CFMutableAttributedStringRef, range: CFRange, replacement: CFAttributedStringRef);