mirror of
https://github.com/kanjitalk755/macemu.git
synced 2025-01-11 10:30:09 +00:00
Blocking sheet presentation routines, simpler interfaces
This commit is contained in:
parent
72129b9348
commit
d5995f053a
@ -36,28 +36,58 @@
|
|||||||
/* particular window, instead of as a separate window (Panel or Dialog) */
|
/* particular window, instead of as a separate window (Panel or Dialog) */
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
|
|
||||||
|
void ErrorSheet (NSString * message, NSWindow * window)
|
||||||
|
{
|
||||||
|
NSLog(message);
|
||||||
|
NSBeginCriticalAlertSheet(message, nil, nil, nil, window,
|
||||||
|
nil, nil, nil, NULL, @"");
|
||||||
|
while ( [window attachedSheet] )
|
||||||
|
[NSThread sleepUntilDate:[NSDate dateWithTimeIntervalSinceNow: 1.0]];
|
||||||
|
}
|
||||||
|
|
||||||
void ErrorSheet (NSString * message1, NSString * message2,
|
void ErrorSheet (NSString * message1, NSString * message2,
|
||||||
NSString * button, NSWindow * win)
|
NSString * button, NSWindow * window)
|
||||||
{
|
{
|
||||||
NSBeginCriticalAlertSheet(message1, button, nil, nil, win,
|
NSLog(message1);
|
||||||
nil, NULL, NULL, NULL, message2);
|
NSLog(message2);
|
||||||
|
NSBeginCriticalAlertSheet(message1, button, nil, nil, window,
|
||||||
|
nil, nil, nil, NULL, message2);
|
||||||
|
while ( [window attachedSheet] )
|
||||||
|
[NSThread sleepUntilDate:[NSDate dateWithTimeIntervalSinceNow: 1.0]];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void WarningSheet (NSString * message, NSWindow * window)
|
||||||
|
{
|
||||||
|
NSLog(message);
|
||||||
|
NSBeginAlertSheet(message, nil, nil, nil, window,
|
||||||
|
nil, nil, nil, NULL, @"");
|
||||||
|
}
|
||||||
|
|
||||||
void WarningSheet (NSString * message1, NSString * message2,
|
void WarningSheet (NSString * message1, NSString * message2,
|
||||||
NSString * button, NSWindow * win)
|
NSString * button, NSWindow * window)
|
||||||
{
|
{
|
||||||
NSBeginAlertSheet(message1, button, nil, nil, win,
|
NSLog(message1);
|
||||||
nil, NULL, NULL, NULL, message2);
|
NSLog(message2);
|
||||||
|
NSBeginAlertSheet(message1, button, nil, nil, window,
|
||||||
|
nil, nil, nil, NULL, message2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void InfoSheet (NSString * message1, NSString * message2,
|
void InfoSheet (NSString * message, NSWindow * window)
|
||||||
NSString * button, NSWindow * win)
|
|
||||||
{
|
{
|
||||||
NSBeginInformationalAlertSheet(message1, button, nil, nil, win,
|
NSLog(message);
|
||||||
nil, NULL, NULL, NULL, message2);
|
NSBeginInformationalAlertSheet(message, nil, nil, nil, window,
|
||||||
|
nil, nil, nil, NULL, @"");
|
||||||
|
}
|
||||||
|
|
||||||
|
void InfoSheet (NSString * message1, NSString * message2,
|
||||||
|
NSString * button, NSWindow * window)
|
||||||
|
{
|
||||||
|
NSLog(message1);
|
||||||
|
NSLog(message2);
|
||||||
|
NSBeginInformationalAlertSheet(message1, nil, nil, nil, window,
|
||||||
|
nil, nil, nil, NULL, message2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user