123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122 |
- #ifndef pointergrid_H_INCLUDED
- #define pointergrid_H_INCLUDED
- #include "mem.h"
- struct PointerGrid_ {
- intptr_t ** data;
- int w;
- int h;
- };
- typedef struct PointerGrid_ PointerGrid;
- PointerGrid * pointergrid_alloc(void);
- PointerGrid * pointergrid_done(PointerGrid * self, MemDestructor * destroy);
- PointerGrid * pointergrid_free(PointerGrid * self);
- int pointergrid_w(PointerGrid * self);
- int pointergrid_h(PointerGrid * self);
- PointerGrid * pointergrid_init(PointerGrid * self, int w, int h);
- PointerGrid * pointergrid_new(int w, int h);
- int pointergrid_outofrange(PointerGrid * self, int w, int h);
- void * pointergrid_getraw(PointerGrid * self, int x, int y);
- void ** pointergrid_rowraw(PointerGrid * self, int y);
- int pointergrid_get(PointerGrid * self, int w, int h, void * * result);
- void pointergrid_setraw(PointerGrid * self, int w, int h, void * el);
- int pointergrid_put(PointerGrid * self, int w, int h, void * el);
- void pointergrid_putraw(PointerGrid * self, int x, int y, void * el);
- int pointergrid_copy(PointerGrid * self, PointerGrid * other);
- int pointergrid_nullall(PointerGrid * self, MemDestructor * destroy);
- void * pointergrid_store(PointerGrid * self, int x, int y, void * el);
- void * pointergrid_fetch(PointerGrid * self, int x, int y);
- intptr_t pointergrid_get_raw_int(PointerGrid * self, int x, int y);
- intptr_t * pointergrid_row_raw_int(PointerGrid * self, int y);
- int pointergrid_get_int(PointerGrid * self, int x, int y, int * result);
- void pointergrid_put_raw_int(PointerGrid * self, int x, int y, int el);
- int pointergrid_put_int(PointerGrid * self, int x, int y, int el);
- int pointergrid_store_int(PointerGrid * self, int x, int y, int el);
- int pointergrid_fetch_int(PointerGrid * self, int x, int y);
- int pointergrid_zero_all(PointerGrid * self);
- #endif
|