| 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 |
|
| 11 |
#include "config.h" |
| 12 |
|
| 13 |
#include <glcomp/glcompmouse.h> |
| 14 |
#include <glcomp/glcompfont.h> |
| 15 |
#include <glcomp/glcompset.h> |
| 16 |
#include <glcomp/glutils.h> |
| 17 |
#include <stdbool.h> |
| 18 |
|
| 19 |
void glCompMouseInit(glCompMouse * m) |
| 20 |
{ |
| 21 |
m->functions.click = NULL; |
| 22 |
m->functions.draw = NULL; |
| 23 |
m->functions.mousedown = glCompMouseDown; |
| 24 |
m->functions.mouseover = glCompMouseOver; |
| 25 |
m->functions.mouseup = glCompMouseUp; |
| 26 |
|
| 27 |
m->callbacks.click = NULL; |
| 28 |
m->callbacks.mouseover = NULL; |
| 29 |
m->callbacks.mouseup = NULL; |
| 30 |
m->dragX = 0; |
| 31 |
m->dragY = 0; |
| 32 |
m->down = false; |
| 33 |
} |
| 34 |
|
| 35 |
void glCompMouseDown(glCompObj *obj, float x, float y, glMouseButtonType t) { |
| 36 |
(void)obj; |
| 37 |
(void)x; |
| 38 |
(void)y; |
| 39 |
(void)t; |
| 40 |
} |
| 41 |
|
| 42 |
void glCompMouseOver(glCompObj *obj, float x, float y) { |
| 43 |
(void)obj; |
| 44 |
(void)x; |
| 45 |
(void)y; |
| 46 |
} |
| 47 |
|
| 48 |
void glCompMouseUp(glCompObj *obj, float x, float y, glMouseButtonType t) { |
| 49 |
(void)obj; |
| 50 |
(void)x; |
| 51 |
(void)y; |
| 52 |
(void)t; |
| 53 |
} |