boxes, attractors and everything
This commit is contained in:
26
initcairo.h
26
initcairo.h
@@ -13,27 +13,37 @@
|
||||
#include <cairo-xlib.h>
|
||||
|
||||
typedef struct {
|
||||
cairo_t *cairo;
|
||||
cairo_matrix_t matrix;
|
||||
unsigned int width;
|
||||
unsigned int height;
|
||||
|
||||
// these things will be written by updateDimensions()
|
||||
double scalefactor;
|
||||
double center_x;
|
||||
double center_y;
|
||||
double radius;
|
||||
} DrawingContext;
|
||||
|
||||
typedef struct {
|
||||
DrawingContext *context;
|
||||
Display *display;
|
||||
Window win;
|
||||
Colormap cmap;
|
||||
Atom wm_protocols;
|
||||
Atom wm_delete_window;
|
||||
cairo_surface_t *sfc;
|
||||
cairo_t *ctx;
|
||||
cairo_surface_t *surface;
|
||||
struct timeval start_time;
|
||||
unsigned long frames;
|
||||
double elapsed, frametime;
|
||||
unsigned int width;
|
||||
unsigned int height;
|
||||
cairo_matrix_t matrix;
|
||||
double scalefactor;
|
||||
} GraphicsInfo;
|
||||
|
||||
int initCairo(int screen, int mask, int width, int height, const char *name, GraphicsInfo *info);
|
||||
GraphicsInfo *initCairo(int screen, int mask, int width, int height, const char *name);
|
||||
void destroyCairo(GraphicsInfo *info);
|
||||
|
||||
void startTimer(GraphicsInfo *info);
|
||||
void waitUpdateTimer(GraphicsInfo *info);
|
||||
int checkEvents(GraphicsInfo *info, int (*process)(GraphicsInfo*, XEvent*, void*), void (*draw)(cairo_t *, void*), void *data);
|
||||
int checkEvents(GraphicsInfo *info, int (*process)(GraphicsInfo*, XEvent*), void (*draw)(DrawingContext *));
|
||||
void updateDimensions(DrawingContext *ctx);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user