Change 18194: Implement InitCursorCtl wrappers (Matthias, MacPerl Bug #526707)
[email protected] (Chris Nandor) Thu, 28 Nov 2002 16:33:31 -0500
| Newsgroups | perl.perl5.changes.mac |
|---|---|
| Message-ID | <p05200f15ba0c3c15d460@[10.0.1.104]> |
Change 18194 by pudge@pudge-mobile on 2002/11/28 03:35:41
Implement InitCursorCtl wrappers (Matthias, MacPerl Bug #526707)
Affected files ...
.... //depot/maint-5.6/macperl/macos/SubLaunch.c#3 edit
.... //depot/maint-5.6/macperl/macos/macish.c#12 edit
.... //depot/maint-5.6/macperl/macos/macish.h#11 edit
Differences ...
==== //depot/maint-5.6/macperl/macos/SubLaunch.c#3 (text) ====
Index: macperl/macos/SubLaunch.c
--- macperl/macos/SubLaunch.c#2~14070~ Fri Jan 4 12:32:57 2002
+++ macperl/macos/SubLaunch.c Wed Nov 27 19:35:41 2002
@@ -9,6 +9,9 @@
as specified in the README file.
$Log: SubLaunch.c,v $
+Revision 1.3 2002/10/28 08:29:40 neeri
+Implement InitCursorCtl wrappers [MacPerl Bug #526707]
+
Revision 1.2 2002/01/04 03:40:35 pudge
Modifications for universal headers 3.4
@@ -328,7 +331,6 @@
AppleEvent cmd;
AppleEvent reply;
AEAddressDesc addr;
- acurHandle acur;
Handle text;
const char * segment;
FSSpec vol;
@@ -387,9 +389,8 @@
DisposeHandle(text);
/* Send it */
- acur = (acurHandle) GetResource('acur', 128);
- DetachResource((Handle) acur);
- InitCursorCtl(acur);
+
+ MacPerl_InitCursorCtl(128);
err =
AESend(
&cmd, &reply, kAEWaitReply+kAENeverInteract,
@@ -402,10 +403,8 @@
AEDisposeDesc(&cmd);
AEDisposeDesc(&addr);
AEDisposeDesc(&reply);
-
- DisposeHandle((Handle) acur);
-
- InitCursorCtl(NULL);
+
+ MacPerl_InitCursorCtl(0);
return err;
}
==== //depot/maint-5.6/macperl/macos/macish.c#12 (text) ====
Index: macperl/macos/macish.c
--- macperl/macos/macish.c#11~16473~ Tue May 7 20:52:28 2002
+++ macperl/macos/macish.c Wed Nov 27 19:35:41 2002
@@ -14,6 +14,7 @@
#include <Resources.h>
#include <Folders.h>
+#include <CursorCtl.h>
#include <GUSIFileSpec.h>
#undef modff
#include <fp.h>
@@ -914,6 +915,21 @@
sAsyncExit.fProc = AsyncExit;
MacPerl_QueueAsyncTask(&sSpinControl.fTask);
+ MacPerl_InitCursorCtl(0);
+}
+
+void MacPerl_InitCursorCtl(short acur)
+{
+ static Handle sCurrentCursors = NULL;
+
+ Handle cursors = GetResource('acur', acur);
+
+ if (cursors) {
+ DetachResource(cursors);
+ if (sCurrentCursors)
+ DisposeHandle(sCurrentCursors);
+ InitCursorCtl((acurHandle)(sCurrentCursors = cursors));
+ }
}
void
==== //depot/maint-5.6/macperl/macos/macish.h#11 (text) ====
Index: macperl/macos/macish.h
--- macperl/macos/macish.h#10~16473~ Tue May 7 20:52:28 2002
+++ macperl/macos/macish.h Wed Nov 27 19:35:41 2002
@@ -77,6 +77,7 @@
const char * MacPerl_CanonDir(const char * dir, char * buf, Boolean is_file);
void MacPerl_WriteMsg(void * io, const char * msg, size_t len);
void MacPerl_Exit(int status);
+void MacPerl_InitCursorCtl(short acur);
#undef PerlProc_exit
#define PerlProc_exit(s) my_exit((s))
End of Patch.