1 /* Dia -- an diagram creation/manipulation program
2 * Copyright (C) 1998 Alexander Larsson
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23 typedef struct _Tool Tool
;
24 typedef struct _ToolInfo ToolInfo
;
25 typedef struct _ToolState ToolState
;
27 typedef enum _ToolType ToolType
;
31 typedef void (* ButtonPressFunc
) (Tool
*, GdkEventButton
*, DDisplay
*ddisp
);
32 typedef void (* DoubleClickFunc
) (Tool
*, GdkEventButton
*, DDisplay
*ddisp
);
33 typedef void (* ButtonReleaseFunc
) (Tool
*, GdkEventButton
*, DDisplay
*ddisp
);
34 typedef void (* MotionFunc
) (Tool
*, GdkEventMotion
*, DDisplay
*ddisp
);
46 /* Action functions */
47 ButtonPressFunc button_press_func
;
48 ButtonReleaseFunc button_release_func
;
49 MotionFunc motion_func
;
50 DoubleClickFunc double_click_func
;
63 int invert_persistence
;
66 extern Tool
*active_tool
, *transient_tool
;
68 void tool_get(ToolState
*state
);
69 void tool_restore(const ToolState
*state
);
70 void tool_free(Tool
*tool
);
71 void tool_select(ToolType type
, gpointer extra_data
, gpointer user_date
,
72 GtkWidget
*button
, int invert_persistence
);
73 void tool_select_former(void);
74 void tool_reset(void);
75 void tool_options_dialog_show(ToolType type
, gpointer extra_data
,
76 gpointer user_data
,GtkWidget
*button
,
77 int invert_persistence
);