-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathobjectivec.mm
41 lines (28 loc) · 1006 Bytes
/
objectivec.mm
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
#include "objectivec.h"
#include <QObject>
#import <Foundation/Foundation.h>
#import <AppKit/AppKit.h>
#import <CoreData/CoreData.h>
#import <Foundation/NSUserNotification.h>
#import <Foundation/NSString.h>
#include <QDebug>
#include <QToolButton>
void ObjectiveC::Display(WId id)
{
NSView* parentNSView = reinterpret_cast<NSView*>(id);
NSWindow *mainWindow = [parentNSView window];
mainWindow.titlebarAppearsTransparent = true;
mainWindow.backgroundColor = NSColor.whiteColor;
/*
NSButton *closeButton = [mainWindow standardWindowButton:NSWindowCloseButton];
[closeButton setHidden:YES];
NSUserNotification* userNotification = [[[NSUserNotification alloc] init] autorelease];
userNotification.title = @"Cancion Actual";
userNotification.informativeText = @"Strawberry Fields Forever";
[[NSUserNotificationCenter defaultUserNotificationCenter] deliverNotification:userNotification];
*/
}
void ObjectiveC::HideWindow()
{
[NSApp hide:nil];
}