aboutsummaryrefslogtreecommitdiff
path: root/src/notify.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/notify.c')
-rw-r--r--src/notify.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/notify.c b/src/notify.c
index 04c416e..0505159 100644
--- a/src/notify.c
+++ b/src/notify.c
@@ -15,13 +15,13 @@ void notify(const char *subtitle, const char *format, ...)
CFStringRef subtitle_ref = CFStringCreateWithCString(NULL, subtitle, kCFStringEncodingUTF8);
CFStringRef message_ref = CFStringCreateWithFormatAndArguments(NULL, NULL, format_ref, args);
- void *center = objc_msgSend((void *) objc_getClass("NSUserNotificationCenter"), sel_registerName("defaultUserNotificationCenter"));
- void *notification = objc_msgSend((void *) objc_getClass("NSUserNotification"), sel_registerName("alloc"), sel_registerName("init"));
+ void *center = ((void * (*)(void *, SEL))objc_msgSend)((void *) objc_getClass("NSUserNotificationCenter"), sel_registerName("defaultUserNotificationCenter"));
+ void *notification = ((void * (*)(void *, SEL, SEL))objc_msgSend)((void *) objc_getClass("NSUserNotification"), sel_registerName("alloc"), sel_registerName("init"));
- objc_msgSend(notification, sel_registerName("setTitle:"), CFSTR("skhd"));
- objc_msgSend(notification, sel_registerName("setSubtitle:"), subtitle_ref);
- objc_msgSend(notification, sel_registerName("setInformativeText:"), message_ref);
- objc_msgSend(center, sel_registerName("deliverNotification:"), notification);
+ ((void (*)(void *, SEL, CFStringRef))objc_msgSend)(notification, sel_registerName("setTitle:"), CFSTR("skhd"));
+ ((void (*)(void *, SEL, CFStringRef))objc_msgSend)(notification, sel_registerName("setSubtitle:"), subtitle_ref);
+ ((void (*)(void *, SEL, CFStringRef))objc_msgSend)(notification, sel_registerName("setInformativeText:"), message_ref);
+ ((void (*)(void *, SEL, void *))objc_msgSend)(center, sel_registerName("deliverNotification:"), notification);
CFRelease(message_ref);
CFRelease(subtitle_ref);