use tnl_emit_func, it's safer
[mesa.git] / src / glut / dos / mouse.c
index c67f8093b145a12d516e2e9d16553c316dfcdde5..373ac49ffed41f360cf36604efa5ccf4f99b9d6f 100644 (file)
@@ -1,58 +1,60 @@
-/*\r
- * Mesa 3-D graphics library\r
- * Version:  3.4\r
- * Copyright (C) 1995-1998  Brian Paul\r
- *\r
- * This library is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Library General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 2 of the License, or (at your option) any later version.\r
- *\r
- * This library is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Library General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Library General Public\r
- * License along with this library; if not, write to the Free\r
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\r
- */\r
-\r
-/*\r
- * DOS/DJGPP glut driver v1.3 for Mesa 5.0\r
- *\r
- *  Copyright (C) 2002 - Borca Daniel\r
- *  Email : dborca@yahoo.com\r
- *  Web   : http://www.geocities.com/dborca\r
- */\r
-\r
-\r
-#include "glutint.h"\r
-\r
-\r
-\r
-int g_mouse;\r
-int g_mouse_x = 0, g_mouse_y = 0;\r
-\r
-\r
-\r
-void __glutInitMouse (void)\r
-{\r
- if ((g_mouse = pc_install_mouse())) {\r
-    GLint yorg;\r
-    GLint rect[4];\r
-\r
-    DMesaGetIntegerv(DMESA_Y_ORIGIN, &yorg);\r
-    if (yorg) {\r
-       rect[1] = g_screen_h - g_curwin->height;\r
-    } else {\r
-       rect[1] = g_curwin->ypos;\r
-    }\r
-    rect[0] = g_curwin->xpos;\r
-    rect[2] = rect[0] + g_curwin->width - 1;\r
-    rect[3] = rect[1] + g_curwin->height - 1;\r
-    pc_mouse_area(rect[0], rect[1], rect[2], rect[3]);\r
-\r
-    g_curwin->show_mouse = (g_curwin->mouse || g_curwin->motion || g_curwin->passive);\r
- }\r
-}\r
+/*
+ * Mesa 3-D graphics library
+ * Version:  3.4
+ * Copyright (C) 1995-1998  Brian Paul
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+/*
+ * DOS/DJGPP glut driver v1.3 for Mesa
+ *
+ *  Copyright (C) 2002 - Borca Daniel
+ *  Email : dborca@yahoo.com
+ *  Web   : http://www.geocities.com/dborca
+ */
+
+
+#include "glutint.h"
+
+
+
+int g_mouse;
+int g_mouse_x = 0, g_mouse_y = 0;
+
+
+
+void __glutInitMouse (void)
+{
+ if ((g_mouse = pc_install_mouse())) {
+    pc_mouse_area(g_curwin->xpos, g_curwin->ypos, g_curwin->xpos + g_curwin->width - 1, g_curwin->ypos + g_curwin->height - 1);
+
+    g_curwin->show_mouse = (g_curwin->mouse || g_curwin->motion || g_curwin->passive);
+ }
+}
+
+
+
+void APIENTRY glutSetCursor (int cursor)
+{
+ /* XXX completely futile until full mouse support (maybe never) */
+}
+
+
+
+void APIENTRY glutWarpPointer (int x, int y)
+{
+ pc_warp_mouse(x, y);
+}