glcompmouse.c 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. /*************************************************************************
  2. * Copyright (c) 2011 AT&T Intellectual Property
  3. * All rights reserved. This program and the accompanying materials
  4. * are made available under the terms of the Eclipse Public License v1.0
  5. * which accompanies this distribution, and is available at
  6. * https://www.eclipse.org/legal/epl-v10.html
  7. *
  8. * Contributors: Details at https://graphviz.org
  9. *************************************************************************/
  10. #include <glcomp/glcompmouse.h>
  11. #include <glcomp/glcompfont.h>
  12. #include <glcomp/glcompset.h>
  13. #include <glcomp/glutils.h>
  14. void glCompMouseInit(glCompMouse * m)
  15. {
  16. m->functions.click = glCompClick;
  17. m->functions.doubleclick = glCompDoubleClick;
  18. m->functions.draw = NULL;
  19. m->functions.mousedown = glCompMouseDown;
  20. m->functions.mousedrag = glCompMouseDrag;
  21. m->functions.mousein = glCompMouseIn;
  22. m->functions.mouseout = glCompMouseOut;
  23. m->functions.mouseover = glCompMouseOver;
  24. m->functions.mouseup = glCompMouseUp;
  25. m->callbacks.click = NULL;
  26. m->callbacks.doubleclick = NULL;
  27. m->callbacks.draw = NULL;
  28. m->callbacks.mousedown = NULL;
  29. m->callbacks.mousedrag = NULL;
  30. m->callbacks.mousein = NULL;
  31. m->callbacks.mouseout = NULL;
  32. m->callbacks.mouseover = NULL;
  33. m->callbacks.mouseup = NULL;
  34. m->dragX = 0;
  35. m->dragY = 0;
  36. m->down = 0;
  37. }
  38. void glCompClick(glCompObj *o, float x, float y, glMouseButtonType t) {
  39. (void)o;
  40. (void)x;
  41. (void)y;
  42. (void)t;
  43. }
  44. void glCompDoubleClick(glCompObj *obj, float x, float y, glMouseButtonType t) {
  45. (void)obj;
  46. (void)x;
  47. (void)y;
  48. (void)t;
  49. }
  50. void glCompMouseDown(glCompObj *obj, float x, float y, glMouseButtonType t) {
  51. (void)obj;
  52. (void)x;
  53. (void)y;
  54. (void)t;
  55. }
  56. void glCompMouseIn(glCompObj *obj, float x, float y) {
  57. (void)obj;
  58. (void)x;
  59. (void)y;
  60. }
  61. void glCompMouseOut(glCompObj *obj, float x, float y) {
  62. (void)obj;
  63. (void)x;
  64. (void)y;
  65. }
  66. void glCompMouseOver(glCompObj *obj, float x, float y) {
  67. (void)obj;
  68. (void)x;
  69. (void)y;
  70. }
  71. void glCompMouseUp(glCompObj *obj, float x, float y, glMouseButtonType t) {
  72. (void)obj;
  73. (void)x;
  74. (void)y;
  75. (void)t;
  76. }
  77. void glCompMouseDrag(glCompObj *obj, float dx, float dy,
  78. glMouseButtonType t)
  79. {
  80. (void)obj;
  81. (void)dx;
  82. (void)dy;
  83. (void)t;
  84. }