mirror of https://github.com/deadw00d/AROS.git
Volume and Parent buttons of ASL File Requester work
This commit is contained in:
parent
753b0d36da
commit
502ce2c5e5
|
@ -31,6 +31,12 @@ struct FileHandleProxy
|
|||
BPTR native;
|
||||
};
|
||||
|
||||
struct DosListProxy
|
||||
{
|
||||
struct DosListV0 base;
|
||||
struct DosList *native;
|
||||
};
|
||||
|
||||
struct FileHandleProxy *makeFileHandleProxy(BPTR native)
|
||||
{
|
||||
struct FileHandleProxy *proxy = abiv0_AllocMem(sizeof(struct FileHandleProxy), MEMF_ANY, DOS_SysBaseV0);
|
||||
|
@ -388,6 +394,56 @@ bug("abiv0_ExAll: STUB\n");
|
|||
}
|
||||
MAKE_PROXY_ARG_6(ExAll)
|
||||
|
||||
struct DosListV0 *abiv0_LockDosList(ULONG flags, struct DosLibraryV0 *DOSBaseV0)
|
||||
{
|
||||
struct DosList *native = LockDosList(flags);
|
||||
|
||||
if (native)
|
||||
{
|
||||
struct DosListProxy *proxy = abiv0_AllocMem(sizeof(struct DosListProxy), MEMF_CLEAR, DOS_SysBaseV0);
|
||||
proxy->base.dol_Type = native->dol_Type;
|
||||
proxy->native = native;
|
||||
bug("abiv0_LockDosList: STUB\n");
|
||||
return (struct DosListV0 *)proxy;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
MAKE_PROXY_ARG_2(LockDosList)
|
||||
|
||||
struct DosListV0 *abiv0_NextDosEntry(struct DosListV0 *dlist, ULONG flags, struct DosLibraryV0 *DOSBaseV0)
|
||||
{
|
||||
struct DosListProxy *proxy = (struct DosListProxy *)dlist;
|
||||
struct DosList *native = NextDosEntry(proxy->native, 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_NextDosEntry: STUB\n");
|
||||
|
||||
return (struct DosListV0 *)proxy;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
MAKE_PROXY_ARG_3(NextDosEntry)
|
||||
|
||||
void abiv0_UnLockDosList(ULONG flags, struct DosLibraryV0 *DOSBaseV0)
|
||||
{
|
||||
UnLockDosList(flags);
|
||||
}
|
||||
MAKE_PROXY_ARG_2(UnLockDosList);
|
||||
|
||||
SIPTR abiv0_IoErr(struct DosLibraryV0 *DOSBaseV0)
|
||||
{
|
||||
// possibly copy Result2 to task proxy as well
|
||||
|
@ -489,4 +545,7 @@ void init_dos(struct ExecBaseV0 *SysBaseV0)
|
|||
__AROS_SETVECADDRV0(abiv0DOSBase, 118, (APTR32)(IPTR)proxy_IsFileSystem);
|
||||
__AROS_SETVECADDRV0(abiv0DOSBase, 67, (APTR32)(IPTR)proxy_NameFromLock);
|
||||
__AROS_SETVECADDRV0(abiv0DOSBase, 161, dosfunctable[160]); // ParsePatternNoCase
|
||||
__AROS_SETVECADDRV0(abiv0DOSBase, 109, (APTR32)(IPTR)proxy_LockDosList);
|
||||
__AROS_SETVECADDRV0(abiv0DOSBase, 115, (APTR32)(IPTR)proxy_NextDosEntry);
|
||||
__AROS_SETVECADDRV0(abiv0DOSBase, 110, (APTR32)(IPTR)proxy_UnLockDosList);
|
||||
}
|
||||
|
|
|
@ -196,6 +196,53 @@ struct ExAllDataV0
|
|||
UWORD ed_OwnerGID; /* The group-owner ID. */
|
||||
};
|
||||
|
||||
/* This structure is returned by LockDosList() and similar calls. This
|
||||
* structure is identical to the AmigaOS one, but this structure is PRIVATE
|
||||
* anyway. Use system-calls for dos list-handling.
|
||||
*/
|
||||
struct DosListV0
|
||||
{
|
||||
/* PRIVATE pointer to next entry. */
|
||||
BPTR32 dol_Next;
|
||||
/* Type of the current node (see below). */
|
||||
LONG dol_Type;
|
||||
/* Filesystem task handling this entry (for old-style filesystems) */
|
||||
APTR32 dol_Task;
|
||||
/* The lock passed to AssignLock(). Only set if the type is
|
||||
DLT_DIRECTORY. */
|
||||
BPTR32 dol_Lock;
|
||||
|
||||
/* This union combines all the different types. */
|
||||
union {
|
||||
/* See struct DevInfo below. */
|
||||
struct {
|
||||
BSTR32 dol_Handler;
|
||||
LONG dol_StackSize;
|
||||
LONG dol_Priority;
|
||||
BPTR32 dol_Startup;
|
||||
BPTR32 dol_SegList;
|
||||
BPTR32 dol_GlobVec;
|
||||
} dol_handler;
|
||||
/* See struct DeviceList below. */
|
||||
struct {
|
||||
struct DateStamp dol_VolumeDate;
|
||||
BPTR32 dol_LockList;
|
||||
LONG dol_DiskType;
|
||||
BPTR32 dol_unused;
|
||||
} dol_volume;
|
||||
/* Structure used for assigns. */
|
||||
struct {
|
||||
/* The name for the late or nonbinding assign. */
|
||||
APTR32 dol_AssignName;
|
||||
/* A list of locks, used by AssignAdd(). */
|
||||
APTR32 dol_List;
|
||||
} dol_assign;
|
||||
} dol_misc;
|
||||
|
||||
/* Name as a BCPL string */
|
||||
BSTR32 dol_Name;
|
||||
};
|
||||
|
||||
struct DosLibraryV0
|
||||
{
|
||||
/* A normal library-base as defined in <exec/libraries.h>. */
|
||||
|
|
Loading…
Reference in New Issue