#include <Events.h>
+#ifdef TARGET_API_MAC_CARBON
+/* Unfortunately this call is probably slower... */
+#define LMGetTicks() TickCount()
+#endif
+
#ifdef __CFM68K__
#undef GetEventQueue
#endif /* __CFM68K__ */
int selectcur_hit; /* Set to true when "select current" selected */
char *prompt; /* The prompt */
};
+#ifdef TARGET_API_MAC_CARBON
+/* The StandardFile hooks don't exist in Carbon. This breaks GetDirectory,
+** but the macfsn code will replace it by a NavServices version anyway.
+*/
+#define myhook_upp NULL
+#else
static DlgHookYDUPP myhook_upp;
static int upp_inited = 0;
+#endif
/*
** The python-code event handler
scan_event_queue(flush)
int flush;
{
+#ifdef TARGET_API_MAC_CARBON
+ /* CARBONXXXX To be implemented */
+ return;
+#else
register EvQElPtr q;
q = (EvQElPtr) LMGetEventQueue()->qHead;
break;
}
}
+#endif
}
int
PyMac_HandleEventIntern(evp)
EventRecord *evp;
{
+#ifndef TARGET_API_MAC_CARBON
if ( evp->what == mouseDown ) {
WindowPtr wp;
return;
}
}
+#endif
#ifdef __MWERKS__
{
int siouxdidit;
*/
if( in_here > 1 || !schedparams.process_events ||
(python_event_handler && !maycallpython) ) {
+#ifndef TARGET_API_MAC_CARBON
if ( maxsleep >= 0 ) {
SystemTask();
}
+#endif
} else {
latest_time_ready = LMGetTicks() + maxsleep;
do {
StandardFileReply reply;
struct hook_args hook_args;
+#ifndef TARGET_API_MAC_CARBON
if ( !upp_inited ) {
myhook_upp = NewDlgHookYDProc(myhook_proc);
upp_inited = 1;
}
+#endif
if ( prompt && *prompt )
hook_args.prompt = (char *)Pstring(prompt);
else
static Point where = {-1, -1};
struct hook_args hook_args;
+#ifndef TARGET_API_MAC_CARBON
if ( !upp_inited ) {
myhook_upp = NewDlgHookYDProc(myhook_proc);
upp_inited = 1;
}
+#endif
if ( prompt && *prompt )
hook_args.prompt = (char *)Pstring(prompt);
else