Commit 55aa4776 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

added tool_manager_button_press_active() and friends functions.

2001-11-14  Michael Natterer  <mitch@gimp.org>

	* app/tools/tool_manager.[ch]: added
	tool_manager_button_press_active() and friends functions.

	* app/display/gimpdisplayshell-callbacks.c:
	gimp_display_shell_canvas_events(): use the functions instead of
	re-fetching the active_tool whenever it may have changed
	(which requires knowledge about the tools' implementation).
	Also moved lots of variables around.
parent 5d79541e
2001-11-14 Michael Natterer <mitch@gimp.org>
* app/tools/tool_manager.[ch]: added
tool_manager_button_press_active() and friends functions.
* app/display/gimpdisplayshell-callbacks.c:
gimp_display_shell_canvas_events(): use the functions instead of
re-fetching the active_tool whenever it may have changed
(which requires knowledge about the tools' implementation).
Also moved lots of variables around.
2001-11-14 Michael Natterer <mitch@gimp.org>
* Makefile.am: changed build order of toplevel directories so that
......
This diff is collapsed.
......@@ -389,6 +389,149 @@ tool_manager_control_active (Gimp *gimp,
}
}
void
tool_manager_button_press_active (Gimp *gimp,
GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpDisplay *gdisp)
{
GimpToolManager *tool_manager;
g_return_if_fail (GIMP_IS_GIMP (gimp));
tool_manager = tool_manager_get (gimp);
if (tool_manager->active_tool)
{
gimp_tool_button_press (tool_manager->active_tool,
coords, time, state,
gdisp);
}
}
void
tool_manager_button_release_active (Gimp *gimp,
GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpDisplay *gdisp)
{
GimpToolManager *tool_manager;
g_return_if_fail (GIMP_IS_GIMP (gimp));
tool_manager = tool_manager_get (gimp);
if (tool_manager->active_tool)
{
gimp_tool_button_release (tool_manager->active_tool,
coords, time, state,
gdisp);
}
}
void
tool_manager_motion_active (Gimp *gimp,
GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpDisplay *gdisp)
{
GimpToolManager *tool_manager;
g_return_if_fail (GIMP_IS_GIMP (gimp));
tool_manager = tool_manager_get (gimp);
if (tool_manager->active_tool)
{
gimp_tool_motion (tool_manager->active_tool,
coords, time, state,
gdisp);
}
}
void
tool_manager_arrow_key_active (Gimp *gimp,
GdkEventKey *kevent,
GimpDisplay *gdisp)
{
GimpToolManager *tool_manager;
g_return_if_fail (GIMP_IS_GIMP (gimp));
tool_manager = tool_manager_get (gimp);
if (tool_manager->active_tool)
{
gimp_tool_arrow_key (tool_manager->active_tool,
kevent,
gdisp);
}
}
void
tool_manager_modifier_key_active (Gimp *gimp,
GdkModifierType key,
gboolean press,
GdkModifierType state,
GimpDisplay *gdisp)
{
GimpToolManager *tool_manager;
g_return_if_fail (GIMP_IS_GIMP (gimp));
tool_manager = tool_manager_get (gimp);
if (tool_manager->active_tool)
{
gimp_tool_modifier_key (tool_manager->active_tool,
key, press, state,
gdisp);
}
}
void
tool_manager_oper_update_active (Gimp *gimp,
GimpCoords *coords,
GdkModifierType state,
GimpDisplay *gdisp)
{
GimpToolManager *tool_manager;
g_return_if_fail (GIMP_IS_GIMP (gimp));
tool_manager = tool_manager_get (gimp);
if (tool_manager->active_tool)
{
gimp_tool_oper_update (tool_manager->active_tool,
coords, state,
gdisp);
}
}
void
tool_manager_cursor_update_active (Gimp *gimp,
GimpCoords *coords,
GdkModifierType state,
GimpDisplay *gdisp)
{
GimpToolManager *tool_manager;
g_return_if_fail (GIMP_IS_GIMP (gimp));
tool_manager = tool_manager_get (gimp);
if (tool_manager->active_tool)
{
gimp_tool_cursor_update (tool_manager->active_tool,
coords, state,
gdisp);
}
}
void
tool_manager_register_tool (Gimp *gimp,
GType tool_type,
......
......@@ -41,6 +41,38 @@ void tool_manager_initialize_active (Gimp *gimp,
void tool_manager_control_active (Gimp *gimp,
ToolAction action,
GimpDisplay *gdisp);
void tool_manager_button_press_active (Gimp *gimp,
GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpDisplay *gdisp);
void tool_manager_button_release_active (Gimp *gimp,
GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpDisplay *gdisp);
void tool_manager_motion_active (Gimp *gimp,
GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpDisplay *gdisp);
void tool_manager_arrow_key_active (Gimp *gimp,
GdkEventKey *kevent,
GimpDisplay *gdisp);
void tool_manager_modifier_key_active (Gimp *gimp,
GdkModifierType key,
gboolean press,
GdkModifierType state,
GimpDisplay *gdisp);
void tool_manager_oper_update_active (Gimp *gimp,
GimpCoords *coords,
GdkModifierType state,
GimpDisplay *gdisp);
void tool_manager_cursor_update_active (Gimp *gimp,
GimpCoords *coords,
GdkModifierType state,
GimpDisplay *gdisp);
const gchar * tool_manager_active_get_help_data (Gimp *gimp);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment