initial commit
This commit is contained in:
29
include/type.h
Normal file
29
include/type.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <string>
|
||||
#include <switch.h>
|
||||
|
||||
//Misc stuff for new menu code
|
||||
typedef void (*funcPtr)(void *);
|
||||
|
||||
class threadStatus
|
||||
{
|
||||
public:
|
||||
void setStatus(const char *fmt, ...);
|
||||
void getStatus(std::string& statusOut);
|
||||
|
||||
private:
|
||||
Mutex statusLock = 0;
|
||||
std::string status;
|
||||
};
|
||||
|
||||
typedef struct
|
||||
{
|
||||
bool running = false, finished = false;
|
||||
Thread thrd;
|
||||
ThreadFunc thrdFunc;
|
||||
void *argPtr = NULL;
|
||||
funcPtr drawFunc = NULL;//Draw func is passed threadInfo pointer too
|
||||
threadStatus *status;
|
||||
} threadInfo;
|
||||
Reference in New Issue
Block a user