You've already forked pico-launcher
mirror of
https://github.com/LNH-team/pico-launcher.git
synced 2026-01-09 16:28:48 -08:00
38 lines
1.1 KiB
C++
38 lines
1.1 KiB
C++
#pragma once
|
|
#include "core/task/TaskQueue.h"
|
|
#include "gui/views/RecyclerAdapter.h"
|
|
|
|
class FileInfoManager;
|
|
class IVramManager;
|
|
class InternalFileInfo;
|
|
class IThemeFileIconFactory;
|
|
class VramContext;
|
|
|
|
class FileRecyclerAdapter : public RecyclerAdapter
|
|
{
|
|
public:
|
|
u32 GetItemCount() const override;
|
|
void BindView(View* view, int index) const override;
|
|
|
|
void SetIconFrameCounter(u32 iconFrameCounter)
|
|
{
|
|
_iconFrameCounter = iconFrameCounter;
|
|
}
|
|
|
|
virtual void InitVram(const VramContext& vramContext) { }
|
|
|
|
protected:
|
|
FileInfoManager* _fileInfoManager;
|
|
TaskQueueBase* _taskQueue;
|
|
u32 _iconFrameCounter;
|
|
const IThemeFileIconFactory* _themeFileIconFactory;
|
|
|
|
FileRecyclerAdapter(FileInfoManager* fileInfoManager, TaskQueueBase* taskQueue,
|
|
const IThemeFileIconFactory* themeFileIconFactory)
|
|
: _fileInfoManager(fileInfoManager), _taskQueue(taskQueue)
|
|
, _iconFrameCounter(0), _themeFileIconFactory(themeFileIconFactory) { }
|
|
|
|
virtual TaskResult<void> BindView(View* view, int index,
|
|
const InternalFileInfo* internalFileInfo, const vu8& cancelRequested) const = 0;
|
|
};
|