mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-02 00:17:02 +00:00
58 lines
1.5 KiB
C++
58 lines
1.5 KiB
C++
#ifndef EVASAPP_H
|
|
#define EVASAPP_H
|
|
|
|
#ifndef EFL_BETA_API_SUPPORT
|
|
#define EFL_BETA_API_SUPPORT
|
|
#endif
|
|
|
|
#ifndef EFL_EO_API_SUPPORT
|
|
#define EFL_EO_API_SUPPORT
|
|
#endif
|
|
|
|
#include <Eo.h>
|
|
#include <Efl.h>
|
|
#include <Evas.h>
|
|
#include <Ecore.h>
|
|
#include <Ecore_Evas.h>
|
|
#include <Ecore_Input.h>
|
|
#include<vector>
|
|
#include<string>
|
|
|
|
|
|
typedef void (*appCb)(void *userData, void *extra);
|
|
class EvasApp
|
|
{
|
|
public:
|
|
EvasApp(int w, int h);
|
|
void setup();
|
|
void resize(int w, int h);
|
|
int width() const{ return mw;}
|
|
int height() const{ return mh;}
|
|
void run();
|
|
Ecore_Evas * ee() const{return mEcoreEvas;}
|
|
Evas * evas() const {return mEvas;}
|
|
Efl_VG * root() const {return mRoot;}
|
|
void addExitCb(appCb exitcb, void *data) {mExitCb = exitcb; mExitData = data;}
|
|
void addResizeCb(appCb resizecb, void *data) {mResizeCb = resizecb; mResizeData = data;}
|
|
void addKeyCb(appCb keycb, void *data) {mKeyCb = keycb; mKeyData = data;}
|
|
void addRenderPreCb(appCb renderPrecb, void *data) {mRenderPreCb = renderPrecb; mRenderPreData = data;}
|
|
static std::vector<std::string> jsonFiles(const std::string &dir, bool recurse=false);
|
|
public:
|
|
int mw;
|
|
int mh;
|
|
Ecore_Evas *mEcoreEvas;
|
|
Evas *mEvas;
|
|
Efl_VG *mRoot;
|
|
Evas_Object *mVg;
|
|
Evas_Object *mBackground;
|
|
appCb mResizeCb;
|
|
void *mResizeData;
|
|
appCb mExitCb;
|
|
void *mExitData;
|
|
appCb mKeyCb;
|
|
void *mKeyData;
|
|
appCb mRenderPreCb;
|
|
void *mRenderPreData;
|
|
};
|
|
#endif //EVASAPP_H
|