1 /* EXTRAITS DE LA LICENCE 2 Copyright CEA, contributeurs : Luc BILLARD et Damien 3 CALISTE, laboratoire L_Sim, (2001-2005) 4 5 Adresse mèl : 6 BILLARD, non joignable par mèl ; 7 CALISTE, damien P caliste AT cea P fr. 8 9 Ce logiciel est un programme informatique servant à visualiser des 10 structures atomiques dans un rendu pseudo-3D. 11 12 Ce logiciel est régi par la licence CeCILL soumise au droit français et 13 respectant les principes de diffusion des logiciels libres. Vous pouvez 14 utiliser, modifier et/ou redistribuer ce programme sous les conditions 15 de la licence CeCILL telle que diffusée par le CEA, le CNRS et l'INRIA 16 sur le site "http://www.cecill.info". 17 18 Le fait que vous puissiez accéder à cet en-tête signifie que vous avez 19 pris connaissance de la licence CeCILL, et que vous en avez accepté les 20 termes (cf. le fichier Documentation/licence.fr.txt fourni avec ce logiciel). 21 */ 22 23 /* LICENCE SUM UP 24 Copyright CEA, contributors : Luc BILLARD et Damien 25 CALISTE, laboratoire L_Sim, (2001-2005) 26 27 E-mail address: 28 BILLARD, not reachable any more ; 29 CALISTE, damien P caliste AT cea P fr. 30 31 This software is a computer program whose purpose is to visualize atomic 32 configurations in 3D. 33 34 This software is governed by the CeCILL license under French law and 35 abiding by the rules of distribution of free software. You can use, 36 modify and/ or redistribute the software under the terms of the CeCILL 37 license as circulated by CEA, CNRS and INRIA at the following URL 38 "http://www.cecill.info". 39 40 The fact that you are presently reading this means that you have had 41 knowledge of the CeCILL license and that you accept its terms. You can 42 find a copy of this licence shipped with this software at Documentation/licence.en.txt. 43 */ 44 #ifndef VISU_ACTIONINTERFACE_H 45 #define VISU_ACTIONINTERFACE_H 46 47 #include <glib.h> 48 49 /** 50 * SECTION:visu_actionInterface 51 * @short_description: Interface for defining actions and events. 52 * 53 * <para>These definitions are used to give a library and plateform 54 * independent simplified event handlers.</para> 55 */ 56 57 /** 58 * ToolButtonActionId: 59 * @TOOL_BUTTON_TYPE_NONE: not a button event 60 * @TOOL_BUTTON_TYPE_PRESS: a press button event 61 * @TOOL_BUTTON_TYPE_RELEASE: a release button event 62 * 63 * Value that can be put into field buttonType of structure #ToolSimplifiedEvents. 64 */ 65 typedef enum { 66 TOOL_BUTTON_TYPE_NONE, 67 TOOL_BUTTON_TYPE_PRESS, 68 TOOL_BUTTON_TYPE_RELEASE 69 } ToolButtonActionId; 70 71 /** 72 * ToolSpecialKeyStroke: 73 * @Key_None: no key pressed ; 74 * @Key_Page_Up: key up ; 75 * @Key_Page_Down: key down ; 76 * @Key_Arrow_Left: key left ; 77 * @Key_Arrow_Right: key right ; 78 * @Key_Arrow_Up: key up ; 79 * @Key_Arrow_Down: key down ; 80 * @Key_Menu: key menu. 81 * 82 * Possible non ascii keys used in #ToolSimplifiedEvents. 83 */ 84 typedef enum 85 { 86 Key_None, 87 Key_Page_Up, 88 Key_Page_Down, 89 Key_Arrow_Left, 90 Key_Arrow_Right, 91 Key_Arrow_Up, 92 Key_Arrow_Down, 93 Key_Menu 94 } ToolSpecialKeyStroke; 95 96 /** 97 * ToolSimplifiedEvents: 98 * @x: the position x (on parent) for the event ; 99 * @y: the position y (on parent) for the event ; 100 * @root_x: the position x (in root window) for the event ; 101 * @root_y: the position y (in root window) for the event ; 102 * @button: the number of the button, 0 if not a button event ; 103 * @buttonType: #TOOL_BUTTON_TYPE_PRESS or #TOOL_BUTTON_TYPE_RELEASE ; 104 * @shiftMod: TRUE if Shift key is pressed during the event ; 105 * @controlMod: TRUE if Control key is pressed during the event ; 106 * @motion: TRUE if the event is a motion ; 107 * @letter: The value of the letter if the event is a key stroke '\0' if not ; 108 * @specialKey: the value of a special key if the event is a key stroke 109 * but not with an ascii letter. 110 * 111 * This structure is a common interface for events (inspired from X). We don't 112 * use the one introduced by GDK because we don't want this dependency be a 113 * limitation. 114 */ 115 typedef struct _ToolSimplifiedEvents ToolSimplifiedEvents; 116 struct _ToolSimplifiedEvents 117 { 118 int x, y; 119 int root_x, root_y; 120 guint button; 121 ToolButtonActionId buttonType; 122 gboolean shiftMod, controlMod; 123 gboolean motion; 124 char letter; 125 ToolSpecialKeyStroke specialKey; 126 }; 127 128 #ifdef V_SIM_GDK 129 #include <gdk/gdk.h> 130 131 gboolean tool_simplified_events_new_fromGdk(ToolSimplifiedEvents *ev, const GdkEvent *event); 132 #endif 133 134 #endif 135