mirror of https://github.com/deadw00d/AROS.git
Support clicking on entry in ASL File Requester
This commit is contained in:
parent
528b0f83b4
commit
c0d544ae7a
|
@ -156,7 +156,7 @@ BPTR LoadSeg32 (CONST_STRPTR name, struct DosLibrary *DOSBase);
|
|||
struct ResidentV0 * findResident(BPTR seg, CONST_STRPTR name);
|
||||
|
||||
void init_graphics(struct ExecBaseV0 *);
|
||||
void init_intuition(struct ExecBaseV0 *);
|
||||
void init_intuition(struct ExecBaseV0 *, struct LibraryV0 *);
|
||||
void init_dos(struct ExecBaseV0 *);
|
||||
struct ExecBaseV0 *init_exec();
|
||||
|
||||
|
@ -200,7 +200,7 @@ LONG_FUNC run_emulation()
|
|||
__AROS_SETVECADDRV0(abiv0CyberGfxBase, 36, (APTR32)(IPTR)proxy_WritePixelArrayAlpha);
|
||||
__AROS_SETVECADDRV0(abiv0CyberGfxBase, 33, (APTR32)(IPTR)proxy_WriteLUTPixelArray);
|
||||
|
||||
init_intuition(SysBaseV0);
|
||||
init_intuition(SysBaseV0, abiv0TimerBase);
|
||||
|
||||
|
||||
/* Start Program */
|
||||
|
|
|
@ -457,6 +457,33 @@ bug("abiv0_NextDosEntry: STUB\n");
|
|||
}
|
||||
MAKE_PROXY_ARG_3(NextDosEntry)
|
||||
|
||||
struct DosListV0 *abiv0_FindDosEntry(struct DosListV0 *dlist, CONST_STRPTR name, ULONG flags, struct DosLibraryV0 *DOSBaseV0)
|
||||
{
|
||||
struct DosListProxy *proxy = (struct DosListProxy *)dlist;
|
||||
struct DosList *native = FindDosEntry(proxy->native, name, flags);
|
||||
|
||||
if (native)
|
||||
{
|
||||
struct DosListProxy *proxy = abiv0_AllocMem(sizeof(struct DosListProxy), MEMF_CLEAR, DOS_SysBaseV0);
|
||||
proxy->base.dol_Type = native->dol_Type;
|
||||
proxy->base.dol_Task = (APTR32)(IPTR)native->dol_Task; /* treat this as just a "marker" for now */
|
||||
|
||||
LONG nlen = AROS_BSTR_strlen(native->dol_Name);
|
||||
char *v0name = abiv0_AllocMem(nlen + 1, MEMF_CLEAR, DOS_SysBaseV0);
|
||||
CopyMem(native->dol_Name, v0name, nlen + 1);
|
||||
proxy->base.dol_Name = (APTR32)(IPTR)v0name;
|
||||
|
||||
proxy->native = native;
|
||||
|
||||
bug("abiv0_FindDosEntry: STUB\n");
|
||||
|
||||
return (struct DosListV0 *)proxy;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
MAKE_PROXY_ARG_4(FindDosEntry)
|
||||
|
||||
void abiv0_UnLockDosList(ULONG flags, struct DosLibraryV0 *DOSBaseV0)
|
||||
{
|
||||
UnLockDosList(flags);
|
||||
|
@ -567,4 +594,8 @@ void init_dos(struct ExecBaseV0 *SysBaseV0)
|
|||
__AROS_SETVECADDRV0(abiv0DOSBase, 109, (APTR32)(IPTR)proxy_LockDosList);
|
||||
__AROS_SETVECADDRV0(abiv0DOSBase, 115, (APTR32)(IPTR)proxy_NextDosEntry);
|
||||
__AROS_SETVECADDRV0(abiv0DOSBase, 110, (APTR32)(IPTR)proxy_UnLockDosList);
|
||||
__AROS_SETVECADDRV0(abiv0DOSBase, 69, dosfunctable[68]); // SplitName
|
||||
__AROS_SETVECADDRV0(abiv0DOSBase, 114, (APTR32)(IPTR)proxy_FindDosEntry);
|
||||
__AROS_SETVECADDRV0(abiv0DOSBase, 18, (APTR32)(IPTR)proxy_ExNext);
|
||||
__AROS_SETVECADDRV0(abiv0DOSBase, 162, dosfunctable[161]); // MatchPatternNoCase
|
||||
}
|
||||
|
|
|
@ -754,6 +754,13 @@ static struct GadgetInfoV0 *composeGadgetInfoV0Int(struct GadgetInfo *nativegi,
|
|||
v0gi->gi_Window = (APTR32)(IPTR)wmGetByWindow(nativegi->gi_Window);
|
||||
if (nativegi->gi_RastPort)
|
||||
v0gi->gi_RastPort = (APTR32)(IPTR)makeRastPortV0(nativegi->gi_RastPort);
|
||||
if (nativegi->gi_Layer)
|
||||
{
|
||||
struct LayerProxy *lproxy = abiv0_AllocMem(sizeof(struct LayerProxy), MEMF_CLEAR, Intuition_SysBaseV0);
|
||||
lproxy->native = nativegi->gi_Layer;
|
||||
syncLayerV0(lproxy);
|
||||
v0gi->gi_Layer = (APTR32)(IPTR)lproxy;
|
||||
}
|
||||
|
||||
if (nativegi->gi_Screen && nativegi->gi_Screen == g_nativescreen)
|
||||
{
|
||||
|
@ -773,6 +780,8 @@ void freeComposedGadgetInfoV0(struct GadgetInfoV0 *v0gi)
|
|||
{
|
||||
if (v0gi->gi_RastPort)
|
||||
abiv0_FreeMem((APTR)(IPTR)v0gi->gi_RastPort, sizeof(struct RastPortV0), Intuition_SysBaseV0);
|
||||
if (v0gi->gi_Layer)
|
||||
abiv0_FreeMem((APTR)(IPTR)v0gi->gi_Layer, sizeof(struct LayerProxy), Intuition_SysBaseV0);
|
||||
|
||||
abiv0_FreeMem(v0gi, sizeof(struct GadgetInfoV0), Intuition_SysBaseV0);
|
||||
}
|
||||
|
@ -913,14 +922,10 @@ static IPTR process_message_on_31bit_stack(struct IClass *CLASS, Object *self, M
|
|||
struct gpRenderV0 *v0msg = abiv0_AllocMem(sizeof(struct gpRenderV0), MEMF_CLEAR, Intuition_SysBaseV0);
|
||||
struct GadgetInfoV0 *v0gi = composeGadgetInfoV0(nativemsg->gpr_GInfo);
|
||||
|
||||
struct LayerProxy *lproxy = abiv0_AllocMem(sizeof(struct LayerProxy), MEMF_CLEAR, Intuition_SysBaseV0);
|
||||
struct DrawInfoV0 *v0dri = abiv0_AllocMem(sizeof(struct DrawInfoV0), MEMF_CLEAR, Intuition_SysBaseV0);
|
||||
v0dri->dri_Pens = (APTR32)(IPTR)abiv0_AllocMem(NUMDRIPENS * sizeof(UWORD), MEMF_CLEAR, Intuition_SysBaseV0);
|
||||
CopyMem(nativemsg->gpr_GInfo->gi_DrInfo->dri_Pens, (APTR)(IPTR)v0dri->dri_Pens, NUMDRIPENS * sizeof(UWORD));
|
||||
|
||||
lproxy->native = nativemsg->gpr_GInfo->gi_Layer;
|
||||
syncLayerV0(lproxy);
|
||||
v0gi->gi_Layer = (APTR32)(IPTR)lproxy;
|
||||
v0gi->gi_DrInfo = (APTR32)(IPTR)v0dri;
|
||||
|
||||
v0msg->MethodID = nativemsg->MethodID;
|
||||
|
@ -933,7 +938,6 @@ static IPTR process_message_on_31bit_stack(struct IClass *CLASS, Object *self, M
|
|||
abiv0_FreeMem((APTR)(IPTR)v0msg->gpr_RPort, sizeof(struct RastPortV0), Intuition_SysBaseV0);
|
||||
abiv0_FreeMem((APTR)(IPTR)v0dri->dri_Pens, NUMDRIPENS * sizeof(UWORD), Intuition_SysBaseV0);
|
||||
abiv0_FreeMem(v0dri, sizeof(struct DrawInfoV0), Intuition_SysBaseV0);
|
||||
abiv0_FreeMem(lproxy, sizeof(struct LayerProxy), Intuition_SysBaseV0);
|
||||
freeComposedGadgetInfoV0(v0gi);
|
||||
abiv0_FreeMem(v0msg, sizeof(struct gpRenderV0), Intuition_SysBaseV0);
|
||||
|
||||
|
@ -974,7 +978,7 @@ static void init_gadget_wrapper_class()
|
|||
gadgetwrappercl->cl_Dispatcher.h_SubEntry = NULL;
|
||||
}
|
||||
|
||||
void init_intuition(struct ExecBaseV0 *SysBaseV0)
|
||||
void init_intuition(struct ExecBaseV0 *SysBaseV0, struct LibraryV0 *timerBase)
|
||||
{
|
||||
TEXT path[64];
|
||||
NewRawDoFmt("%s:Libs32/partial/intuition.library", RAWFMTFUNC_STRING, path, SYSNAME);
|
||||
|
@ -1044,6 +1048,7 @@ void init_intuition(struct ExecBaseV0 *SysBaseV0)
|
|||
__AROS_SETVECADDRV0(abiv0IntuitionBase, 74, (APTR32)(IPTR)proxy_RemoveGList);
|
||||
__AROS_SETVECADDRV0(abiv0IntuitionBase, 146, intuitionjmp[165 - 146]); // FreeICData
|
||||
__AROS_SETVECADDRV0(abiv0IntuitionBase, 41, intuitionjmp[165 - 41]); // ScreenToBack
|
||||
__AROS_SETVECADDRV0(abiv0IntuitionBase, 14, intuitionjmp[165 - 14]); // CurrentTime
|
||||
|
||||
/* Call CLASSESINIT_LIST */
|
||||
ULONG pos = 1;
|
||||
|
@ -1064,9 +1069,10 @@ void init_intuition(struct ExecBaseV0 *SysBaseV0)
|
|||
func = segclassesinitlist[pos];
|
||||
}
|
||||
|
||||
/* Set internal Intuition pointer of utility */
|
||||
/* Set internal Intuition pointer of utility, graphics and timer */
|
||||
*(ULONG *)((IPTR)abiv0IntuitionBase + 0x60) = (APTR32)(IPTR)abiv0_DOS_OpenLibrary("utility.library", 0L, SysBaseV0);
|
||||
*(ULONG *)((IPTR)abiv0IntuitionBase + 0x64) = (APTR32)(IPTR)abiv0_DOS_OpenLibrary("graphics.library", 0L, SysBaseV0);
|
||||
*(ULONG *)((IPTR)abiv0IntuitionBase + 0x74) = (APTR32)(IPTR)timerBase;
|
||||
|
||||
init_gadget_wrapper_class();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue