2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
5 Desc: Display an alert, iOS-hosted version
9 #include <aros/atomic.h>
10 #include <aros/libcall.h>
11 #include <proto/exec.h>
16 #include "hostinterface.h"
17 #include "kernel_base.h"
18 #include "kernel_debug.h"
19 #include "kernel_intern.h"
20 #include "kernel_unix.h"
22 static void (*displayAlert
)(const char *text
) = NULL
;
24 void krnDisplayAlert(const char *text
, struct KernelBase
*KernelBase
)
29 * Early alert. call hook is not initialized yet.
30 * Fail back to debug output.
36 /* Display the alert via our UIKit helper */
41 static int Alert_Init(void *libc
)
47 * We use local variable for the handle because we never expunge
48 * so we will never close it
50 libHandle
= HostIFace
->hostlib_Open("Libs/Host/uikit_hidd.dylib", &err
);
53 bug("Failed to load uikit_hidd.dylib: %s\n", err
);
57 displayAlert
= HostIFace
->hostlib_GetPointer(libHandle
, "DisplayAlert", &err
);
61 HostIFace
->hostlib_Close(libHandle
, NULL
);
63 bug("Failed to load DisplayAlert helper: %s\n", err
);
67 ADD2SET(Alert_Init
, STARTUP
, 0);