mirror of https://github.com/GNOME/gimp.git
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.
This commit is contained in:
parent
5d79541e11
commit
55aa4776f7
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
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
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue