#include "all.h" void handle_mouse_event(int button, int state, int x, int y) { switch (button) { case GLUT_LEFT_BUTTON: if (state == GLUT_DOWN) printf("Left button clicked (x: %d, y: %d)\n", x, y); break; case GLUT_MIDDLE_BUTTON: if (state == GLUT_DOWN) printf("Middle button clicked (x: %d, y: %d)\n", x, y); break; case GLUT_RIGHT_BUTTON: if (state == GLUT_DOWN) printf("Right button clicked (x: %d, y: %d)\n", x, y); break; default: break; } }