introduce MWAPI
Some checks failed
pyrite-dev/milsko/pipeline/head There was a failure building this commit
Some checks failed
pyrite-dev/milsko/pipeline/head There was a failure building this commit
This commit is contained in:
parent
77ca92452e
commit
2dd2c3870f
41 changed files with 189 additions and 166 deletions
|
|
@ -13,7 +13,7 @@ double deg2rad(double deg) {
|
|||
return (360.0 - deg) / 180.0 * M_PI;
|
||||
}
|
||||
|
||||
void tick(MwWidget handle, void* user, void* call) {
|
||||
void MWAPI tick(MwWidget handle, void* user, void* call) {
|
||||
time_t t = time(NULL);
|
||||
int i;
|
||||
double rad;
|
||||
|
|
@ -104,7 +104,7 @@ void tick(MwWidget handle, void* user, void* call) {
|
|||
MwOpenGLSwapBuffer(opengl);
|
||||
}
|
||||
|
||||
void resize(MwWidget handle, void* user, void* call) {
|
||||
void MWAPI resize(MwWidget handle, void* user, void* call) {
|
||||
int w = MwGetInteger(handle, MwNwidth);
|
||||
int h = MwGetInteger(handle, MwNheight);
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ static void reshape(int width, int height);
|
|||
static void init(void);
|
||||
static void key(int k);
|
||||
|
||||
static void tick(MwWidget handle, void* user, void* client) {
|
||||
static void MWAPI tick(MwWidget handle, void* user, void* client) {
|
||||
(void)handle;
|
||||
(void)user;
|
||||
(void)client;
|
||||
|
|
@ -20,7 +20,7 @@ static void tick(MwWidget handle, void* user, void* client) {
|
|||
MwOpenGLSwapBuffer(opengl);
|
||||
}
|
||||
|
||||
static void resize(MwWidget handle, void* user, void* client) {
|
||||
static void MWAPI resize(MwWidget handle, void* user, void* client) {
|
||||
int ww, wh;
|
||||
|
||||
(void)user;
|
||||
|
|
@ -37,7 +37,7 @@ static void resize(MwWidget handle, void* user, void* client) {
|
|||
reshape(ww, wh);
|
||||
}
|
||||
|
||||
static void key_pressed(MwWidget handle, void* user, void* client) {
|
||||
static void MWAPI key_pressed(MwWidget handle, void* user, void* client) {
|
||||
(void)handle;
|
||||
(void)user;
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ int ow, oh;
|
|||
double deg = 0;
|
||||
double dir = 1;
|
||||
|
||||
void resize(MwWidget handle, void* user_data, void* call_data) {
|
||||
void MWAPI resize(MwWidget handle, void* user_data, void* call_data) {
|
||||
unsigned int w, h;
|
||||
|
||||
(void)user_data;
|
||||
|
|
@ -27,7 +27,7 @@ void resize(MwWidget handle, void* user_data, void* call_data) {
|
|||
NULL);
|
||||
}
|
||||
|
||||
void tick(MwWidget handle, void* user_data, void* call_data) {
|
||||
void MWAPI tick(MwWidget handle, void* user_data, void* call_data) {
|
||||
(void)handle;
|
||||
(void)user_data;
|
||||
(void)call_data;
|
||||
|
|
@ -61,7 +61,7 @@ void tick(MwWidget handle, void* user_data, void* call_data) {
|
|||
deg += 120.0 / (1000.0 / MwWaitMS) * dir;
|
||||
}
|
||||
|
||||
void activate(MwWidget handle, void* user_data, void* call_data) {
|
||||
void MWAPI activate(MwWidget handle, void* user_data, void* call_data) {
|
||||
(void)handle;
|
||||
(void)user_data;
|
||||
(void)call_data;
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ int ct = 0;
|
|||
int click = 0;
|
||||
int mx, my;
|
||||
|
||||
static void tick(MwWidget handle, void* user, void* call) {
|
||||
static void MWAPI tick(MwWidget handle, void* user, void* call) {
|
||||
int i;
|
||||
int w = MwGetInteger(opengl, MwNwidth);
|
||||
int h = MwGetInteger(opengl, MwNheight);
|
||||
|
|
@ -50,7 +50,7 @@ static void tick(MwWidget handle, void* user, void* call) {
|
|||
MwOpenGLSwapBuffer(opengl);
|
||||
}
|
||||
|
||||
static void mouse(MwWidget handle, void* user, void* call) {
|
||||
static void MWAPI mouse(MwWidget handle, void* user, void* call) {
|
||||
MwMouse* mouse = call;
|
||||
|
||||
(void)handle;
|
||||
|
|
@ -91,7 +91,7 @@ static void mouse(MwWidget handle, void* user, void* call) {
|
|||
}
|
||||
}
|
||||
|
||||
static void mouse_move(MwWidget handle, void* user, void* call) {
|
||||
static void MWAPI mouse_move(MwWidget handle, void* user, void* call) {
|
||||
MwPoint* point = call;
|
||||
|
||||
(void)handle;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue