#include #include typedef struct { double m; double x; double y; double vx; double vy; } Particle; int n_particles = 100; Particle particles[100]; int main (int argc, char *argv[]) { GdkWindow *window; GdkVisual *visual = NULL; GdkColormap *colormap = NULL; GdkCursor *cursor = NULL; GdkGC *gc; GdkColor white = { 0, 0xFFFF, 0xFFFF, 0xFFFF // pixel, red, green, blue }; GdkWindowAttr window_attr = { "window", // title 0, // event mask 10, 10, // x, y 100, 100, // width, height GDK_INPUT_OUTPUT, // GdkWindowClass visual, // GdkVisual* colormap, // GdkColormap* GDK_WINDOW_TOPLEVEL, // GdkWindowType cursor, // GdkCursor* "wmclass_name", // window manager class : name "wmclass_class", // window manager class : class FALSE // override redirect ? }; int cx = 200, cy = 200; int a; unsigned int i; for (i=0; i