usbloadergx/source/GUI/gui_image_async.h
dimok321 973d8b2005 *Fixed compile error
*Converted every 4 spaces to a tab to make the source consistent on those
2011-07-25 22:28:22 +00:00

38 lines
952 B
C++

#ifndef _GUIIMAGEASYNC_H_
#define _GUIIMAGEASYNC_H_
#include <vector>
#include "gui.h"
typedef GuiImageData * (*ImageLoaderCallback)(void *arg);
class GuiImageAsync: public GuiImage
{
public:
GuiImageAsync(const char *Filename, GuiImageData * PreloadImg);
GuiImageAsync(ImageLoaderCallback Callback, const void *Arg, int ArgLen, GuiImageData * PreloadImg);
virtual ~GuiImageAsync();
static void ClearQueue();
private:
GuiImageData *imgData;
ImageLoaderCallback callback;
void *arg;
static void * GuiImageAsyncThread(void *arg);
static void ThreadAddImage(GuiImageAsync* Image);
static void ThreadRemoveImage(GuiImageAsync* Image);
static u32 ThreadInit();
static u32 ThreadExit();
static std::vector<GuiImageAsync *> List;
static lwp_t Thread;
static mutex_t ListLock;
static GuiImageAsync * InUse;
static u32 ThreadCount;
static bool ThreadSleep;
static bool CloseThread;
};
#endif /*_GUIIMAGEASYNC_H_*/