pxt-ev3/libs/core/pxt.h
Michał Moskal c2d26a8418 Integrate screen APIs from common packages (#343)
* starting screen api intergration

* Further image integration

* Aligning with new screen apis

* Build fixes

* Adjust to common screen state

* Fix unpackPNG

* Add game library

* Optimize screen rendering

* bumping common packages

* updated shims

* moving images into ev3

* upgrading to common packages

* added try/use

* cap

* fixed tryp age
2018-02-26 15:16:17 -08:00

46 lines
675 B
C++

#ifndef __PXT_H
#define __PXT_H
#include "pxtbase.h"
void *xmalloc(size_t sz);
namespace pxt {
void raiseEvent(int id, int event);
int allocateNotifyEvent();
void sleep_core_us(uint64_t us);
void startUser();
void stopUser();
class Button;
typedef Button *Button_;
extern "C" void target_init();
class MMap : public RefObject {
public:
int length;
int fd;
uint8_t *data;
MMap();
void destroy();
void print();
};
extern volatile bool paniced;
// Buffer, Sound, and Image share representation.
typedef Buffer Sound;
}
#define DEVICE_EVT_ANY 0
#define DEVICE_ID_NOTIFY 10000
#define DEVICE_ID_NOTIFY_ONE 10001
#define IMAGE_BITS 1
#endif