Annotation of hatari/src/gui-osx/AlertHooks.m, revision 1.1

1.1     ! root        1: /*
        !             2:   Hatari - AlertHooks.c
        !             3: 
        !             4:   This file is distributed under the GNU Public License, version 2 or at
        !             5:   your option any later version. Read the file gpl.txt for details.
        !             6: 
        !             7:   Hooked alerts, to be used instead of SDL alert windows
        !             8: 
        !             9:   June 2006, Sébastien Molines - Created
        !            10: */
        !            11: 
        !            12: #import <Cocoa/Cocoa.h>
        !            13: #import "AlertHooks.h"
        !            14: 
        !            15: #ifdef ALERT_HOOKS 
        !            16: 
        !            17: /*-----------------------------------------------------------------------*/
        !            18: /*
        !            19:   Displays a Cocoa alert
        !            20: */
        !            21: int HookedAlertNotice(const char* szMessage)
        !            22: {
        !            23:        return (NSAlertDefaultReturn == NSRunInformationalAlertPanel(@"Hatari", [NSString stringWithCString:szMessage], nil, nil, nil));
        !            24: }
        !            25: 
        !            26: /*-----------------------------------------------------------------------*/
        !            27: /*
        !            28:   Displays a Cocoa alert with a choice (OK and Cancel buttons)
        !            29: */
        !            30: int HookedAlertQuery(const char* szMessage)
        !            31: {
        !            32:        return (NSAlertDefaultReturn == NSRunAlertPanel(@"Hatari", [NSString stringWithCString:szMessage], @"OK", @"Cancel", nil));
        !            33: }
        !            34: 
        !            35: #endif

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.