本文整理汇总了C++中GIMP_IS_DISPLAY函数的典型用法代码示例。如果您正苦于以下问题:C++ GIMP_IS_DISPLAY函数的具体用法?C++ GIMP_IS_DISPLAY怎么用?C++ GIMP_IS_DISPLAY使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GIMP_IS_DISPLAY函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: gimp_display_flush_now
void
gimp_display_flush_now (GimpDisplay *display)
{
g_return_if_fail (GIMP_IS_DISPLAY (display));
gimp_display_flush_whenever (display, TRUE);
}
开发者ID:Amerekanets,项目名称:gimp,代码行数:7,代码来源:gimpdisplay.c
示例2: gimp_foreground_select_tool_drop_masks
static void
gimp_foreground_select_tool_drop_masks (GimpForegroundSelectTool *fg_select,
GimpDisplay *display)
{
GimpTool *tool = GIMP_TOOL (fg_select);
if (fg_select->trimap)
{
g_object_unref (fg_select->trimap);
fg_select->trimap = NULL;
}
if (fg_select->mask)
{
g_object_unref (fg_select->mask);
fg_select->mask = NULL;
}
if (GIMP_IS_DISPLAY (display))
{
gimp_display_shell_set_mask (gimp_display_get_shell (display),
NULL, NULL);
}
gimp_tool_control_set_tool_cursor (tool->control,
GIMP_TOOL_CURSOR_FREE_SELECT);
gimp_tool_control_set_toggle_tool_cursor (tool->control,
GIMP_TOOL_CURSOR_FREE_SELECT);
gimp_tool_control_set_toggled (tool->control, FALSE);
fg_select->state = MATTING_STATE_FREE_SELECT;
}
开发者ID:ChristianBusch,项目名称:gimp,代码行数:32,代码来源:gimpforegroundselecttool.c
示例3: gimp_color_tool_start_sample_point
void
gimp_color_tool_start_sample_point (GimpTool *tool,
GimpDisplay *display)
{
GimpColorTool *color_tool;
g_return_if_fail (GIMP_IS_COLOR_TOOL (tool));
g_return_if_fail (GIMP_IS_DISPLAY (display));
color_tool = GIMP_COLOR_TOOL (tool);
gimp_display_shell_selection_pause (gimp_display_get_shell (display));
tool->display = display;
gimp_tool_control_activate (tool->control);
gimp_tool_control_set_scroll_lock (tool->control, TRUE);
if (gimp_draw_tool_is_active (GIMP_DRAW_TOOL (tool)))
gimp_draw_tool_stop (GIMP_DRAW_TOOL (tool));
color_tool->sample_point = NULL;
color_tool->moving_sample_point = TRUE;
color_tool->sample_point_x = SAMPLE_POINT_POSITION_INVALID;
color_tool->sample_point_y = SAMPLE_POINT_POSITION_INVALID;
gimp_tool_set_cursor (tool, display,
GIMP_CURSOR_MOUSE,
GIMP_TOOL_CURSOR_COLOR_PICKER,
GIMP_CURSOR_MODIFIER_MOVE);
gimp_draw_tool_start (GIMP_DRAW_TOOL (tool), display);
}
开发者ID:AjayRamanathan,项目名称:gimp,代码行数:32,代码来源:gimpcolortool.c
示例4: gimp_tool_button_press
void
gimp_tool_button_press (GimpTool *tool,
GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpDisplay *display)
{
g_return_if_fail (GIMP_IS_TOOL (tool));
g_return_if_fail (coords != NULL);
g_return_if_fail (GIMP_IS_DISPLAY (display));
GIMP_TOOL_GET_CLASS (tool)->button_press (tool, coords, time, state,
display);
if (gimp_tool_control_is_active (tool->control))
{
tool->button_press_state = state;
tool->active_modifier_state = state;
if (gimp_tool_control_get_wants_click (tool->control))
{
tool->in_click_distance = TRUE;
tool->got_motion_event = FALSE;
tool->button_press_coords = *coords;
tool->button_press_time = time;
}
else
{
tool->in_click_distance = FALSE;
}
}
}
开发者ID:Amerekanets,项目名称:gimp,代码行数:32,代码来源:gimptool.c
示例5: gimp_color_tool_start_sample_point
void
gimp_color_tool_start_sample_point (GimpTool *tool,
GimpDisplay *display)
{
GimpColorTool *color_tool;
g_return_if_fail (GIMP_IS_COLOR_TOOL (tool));
g_return_if_fail (GIMP_IS_DISPLAY (display));
color_tool = GIMP_COLOR_TOOL (tool);
gimp_display_shell_selection_control (GIMP_DISPLAY_SHELL (display->shell),
GIMP_SELECTION_PAUSE);
tool->display = display;
gimp_tool_control_activate (tool->control);
if (color_tool->sample_point)
gimp_display_shell_draw_sample_point (GIMP_DISPLAY_SHELL (display->shell),
color_tool->sample_point, FALSE);
color_tool->sample_point = NULL;
color_tool->moving_sample_point = TRUE;
color_tool->sample_point_x = -1;
color_tool->sample_point_y = -1;
gimp_tool_set_cursor (tool, display,
GIMP_CURSOR_MOUSE,
GIMP_TOOL_CURSOR_COLOR_PICKER,
GIMP_CURSOR_MODIFIER_MOVE);
gimp_draw_tool_start (GIMP_DRAW_TOOL (tool), display);
}
开发者ID:Amerekanets,项目名称:gimp,代码行数:33,代码来源:gimpcolortool.c
示例6: gimp_display_update_area
void
gimp_display_update_area (GimpDisplay *display,
gboolean now,
gint x,
gint y,
gint w,
gint h)
{
g_return_if_fail (GIMP_IS_DISPLAY (display));
if (now)
{
gimp_display_paint_area (display, x, y, w, h);
}
else
{
GimpArea *area = gimp_area_new (CLAMP (x, 0, display->image->width),
CLAMP (y, 0, display->image->height),
CLAMP (x + w, 0, display->image->width),
CLAMP (y + h, 0, display->image->height));
display->update_areas = gimp_area_list_process (display->update_areas,
area);
}
}
开发者ID:Amerekanets,项目名称:gimp,代码行数:25,代码来源:gimpdisplay.c
示例7: gimp_tool_push_status_length
void
gimp_tool_push_status_length (GimpTool *tool,
GimpDisplay *display,
const gchar *title,
GimpOrientationType axis,
gdouble value,
const gchar *help)
{
GimpDisplayShell *shell;
const gchar *stock_id;
g_return_if_fail (GIMP_IS_TOOL (tool));
g_return_if_fail (GIMP_IS_DISPLAY (display));
shell = GIMP_DISPLAY_SHELL (display->shell);
stock_id = gimp_viewable_get_stock_id (GIMP_VIEWABLE (tool->tool_info));
gimp_statusbar_push_length (GIMP_STATUSBAR (shell->statusbar),
G_OBJECT_TYPE_NAME (tool), stock_id,
title, axis, value, help);
tool->status_displays = g_list_remove (tool->status_displays, display);
tool->status_displays = g_list_prepend (tool->status_displays, display);
}
开发者ID:jdburton,项目名称:gimp-osx,代码行数:25,代码来源:gimptool.c
示例8: gimp_tool_set_focus_display
void
gimp_tool_set_focus_display (GimpTool *tool,
GimpDisplay *display)
{
g_return_if_fail (GIMP_IS_TOOL (tool));
g_return_if_fail (display == NULL || GIMP_IS_DISPLAY (display));
#ifdef DEBUG_FOCUS
g_printerr ("%s: tool: %p display: %p focus_display: %p\n",
G_STRFUNC, tool, display, tool->focus_display);
#endif
if (display != tool->focus_display)
{
if (tool->focus_display)
{
if (tool->active_modifier_state != 0)
gimp_tool_set_active_modifier_state (tool, 0, tool->focus_display);
if (tool->modifier_state != 0)
gimp_tool_set_modifier_state (tool, 0, tool->focus_display);
}
tool->focus_display = display;
}
}
开发者ID:Amerekanets,项目名称:gimp,代码行数:26,代码来源:gimptool.c
示例9: gimp_tool_push_status
void
gimp_tool_push_status (GimpTool *tool,
GimpDisplay *display,
const gchar *format,
...)
{
GimpDisplayShell *shell;
const gchar *stock_id;
va_list args;
g_return_if_fail (GIMP_IS_TOOL (tool));
g_return_if_fail (GIMP_IS_DISPLAY (display));
g_return_if_fail (format != NULL);
shell = GIMP_DISPLAY_SHELL (display->shell);
stock_id = gimp_viewable_get_stock_id (GIMP_VIEWABLE (tool->tool_info));
va_start (args, format);
gimp_statusbar_push_valist (GIMP_STATUSBAR (shell->statusbar),
G_OBJECT_TYPE_NAME (tool), stock_id,
format, args);
va_end (args);
tool->status_displays = g_list_remove (tool->status_displays, display);
tool->status_displays = g_list_prepend (tool->status_displays, display);
}
开发者ID:jdburton,项目名称:gimp-osx,代码行数:29,代码来源:gimptool.c
示例10: gimp_tool_push_status_coords
void
gimp_tool_push_status_coords (GimpTool *tool,
GimpDisplay *display,
GimpCursorPrecision precision,
const gchar *title,
gdouble x,
const gchar *separator,
gdouble y,
const gchar *help)
{
GimpDisplayShell *shell;
const gchar *stock_id;
g_return_if_fail (GIMP_IS_TOOL (tool));
g_return_if_fail (GIMP_IS_DISPLAY (display));
shell = GIMP_DISPLAY_SHELL (display->shell);
stock_id = gimp_viewable_get_stock_id (GIMP_VIEWABLE (tool->tool_info));
gimp_statusbar_push_coords (GIMP_STATUSBAR (shell->statusbar),
G_OBJECT_TYPE_NAME (tool), stock_id,
precision, title, x, separator, y,
help);
tool->status_displays = g_list_remove (tool->status_displays, display);
tool->status_displays = g_list_prepend (tool->status_displays, display);
}
开发者ID:jdburton,项目名称:gimp-osx,代码行数:28,代码来源:gimptool.c
示例11: gimp_tool_set_focus_display
void
gimp_tool_set_focus_display (GimpTool *tool,
GimpDisplay *display)
{
g_return_if_fail (GIMP_IS_TOOL (tool));
g_return_if_fail (display == NULL || GIMP_IS_DISPLAY (display));
g_return_if_fail (gimp_tool_control_is_active (tool->control) == FALSE);
GIMP_LOG (TOOL_FOCUS, "tool: %p focus_display: %p tool->focus_display: %p",
tool, display, tool->focus_display);
if (display != tool->focus_display)
{
if (tool->focus_display)
{
if (tool->active_modifier_state != 0)
{
gimp_tool_control_activate (tool->control);
gimp_tool_set_active_modifier_state (tool, 0, tool->focus_display);
gimp_tool_control_halt (tool->control);
}
if (tool->modifier_state != 0)
gimp_tool_set_modifier_state (tool, 0, tool->focus_display);
}
tool->focus_display = display;
}
}
开发者ID:AjayRamanathan,项目名称:gimp,代码行数:31,代码来源:gimptool.c
示例12: gimp_tool_progress_start
static GimpProgress *
gimp_tool_progress_start (GimpProgress *progress,
const gchar *message,
gboolean cancelable)
{
GimpTool *tool = GIMP_TOOL (progress);
GimpDisplayShell *shell;
gint x, y, w, h;
g_return_val_if_fail (GIMP_IS_DISPLAY (tool->display), NULL);
g_return_val_if_fail (tool->progress == NULL, NULL);
shell = gimp_display_get_shell (tool->display);
gimp_display_shell_untransform_viewport (shell, &x, &y, &w, &h);
tool->progress = gimp_canvas_progress_new (shell,
GIMP_HANDLE_ANCHOR_CENTER,
x + w / 2, y + h / 2);
gimp_display_shell_add_item (shell, tool->progress);
g_object_unref (tool->progress);
gimp_progress_start (GIMP_PROGRESS (tool->progress),
message, FALSE);
gimp_widget_flush_expose (shell->canvas);
tool->progress_display = tool->display;
return progress;
}
开发者ID:MichaelMure,项目名称:Gimp-Cage-Tool,代码行数:30,代码来源:gimptool-progress.c
示例13: gimp_tool_replace_status
void
gimp_tool_replace_status (GimpTool *tool,
GimpDisplay *display,
const gchar *format,
...)
{
GimpDisplayShell *shell;
va_list args;
g_return_if_fail (GIMP_IS_TOOL (tool));
g_return_if_fail (GIMP_IS_DISPLAY (display));
g_return_if_fail (format != NULL);
shell = GIMP_DISPLAY_SHELL (display->shell);
va_start (args, format);
gimp_statusbar_replace_valist (GIMP_STATUSBAR (shell->statusbar),
G_OBJECT_TYPE_NAME (tool),
format, args);
va_end (args);
tool->status_displays = g_list_remove (tool->status_displays, display);
tool->status_displays = g_list_prepend (tool->status_displays, display);
}
开发者ID:Amerekanets,项目名称:gimp,代码行数:26,代码来源:gimptool.c
示例14: tool_manager_initialize_active
gboolean
tool_manager_initialize_active (Gimp *gimp,
GimpDisplay *display)
{
GimpToolManager *tool_manager;
g_return_val_if_fail (GIMP_IS_GIMP (gimp), FALSE);
g_return_val_if_fail (GIMP_IS_DISPLAY (display), FALSE);
tool_manager = tool_manager_get (gimp);
if (tool_manager->active_tool)
{
GimpTool *tool = tool_manager->active_tool;
if (gimp_tool_initialize (tool, display))
{
GimpImage *image = gimp_display_get_image (display);
tool->drawable = gimp_image_get_active_drawable (image);
return TRUE;
}
}
return FALSE;
}
开发者ID:MichaelMure,项目名称:Gimp-Cage-Tool,代码行数:27,代码来源:tool_manager.c
示例15: action_data_get_display
GimpDisplay *
action_data_get_display (gpointer data)
{
GimpDisplay *result = NULL;
static gboolean recursion = FALSE;
if (! data || recursion)
return NULL;
recursion = TRUE;
if (GIMP_IS_DISPLAY (data))
result = data;
else if (GIMP_IS_IMAGE_WINDOW (data))
{
GimpDisplayShell *shell = gimp_image_window_get_active_shell (data);
result = shell ? shell->display : NULL;
}
if (! result)
{
GimpContext *context = action_data_get_context (data);
if (context)
result = gimp_context_get_display (context);
}
recursion = FALSE;
return result;
}
开发者ID:jiapei100,项目名称:gimp,代码行数:31,代码来源:actions.c
示例16: procedure_commands_run_procedure
gboolean
procedure_commands_run_procedure (GimpProcedure *procedure,
Gimp *gimp,
GimpProgress *progress,
GimpRunMode run_mode,
GimpValueArray *args,
GimpDisplay *display)
{
GError *error = NULL;
g_return_val_if_fail (GIMP_IS_PROCEDURE (procedure), FALSE);
g_return_val_if_fail (GIMP_IS_GIMP (gimp), FALSE);
g_return_val_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress), FALSE);
g_return_val_if_fail (display == NULL || GIMP_IS_DISPLAY (display), FALSE);
g_return_val_if_fail (args != NULL, FALSE);
g_value_set_int (gimp_value_array_index (args, 0), run_mode);
gimp_procedure_execute_async (procedure, gimp,
gimp_get_user_context (gimp),
progress, args,
GIMP_OBJECT (display), &error);
if (error)
{
gimp_message_literal (gimp,
G_OBJECT (progress), GIMP_MESSAGE_ERROR,
error->message);
g_clear_error (&error);
return FALSE;
}
return TRUE;
}
开发者ID:AdamGrzonkowski,项目名称:gimp-1,代码行数:35,代码来源:procedure-commands.c
示例17: gimp_display_get_ID
gint
gimp_display_get_ID (GimpDisplay *display)
{
g_return_val_if_fail (GIMP_IS_DISPLAY (display), -1);
return display->ID;
}
开发者ID:Amerekanets,项目名称:gimp,代码行数:7,代码来源:gimpdisplay.c
示例18: gimp_sample_point_tool_start_new
void
gimp_sample_point_tool_start_new (GimpTool *parent_tool,
GimpDisplay *display)
{
g_return_if_fail (GIMP_IS_TOOL (parent_tool));
g_return_if_fail (GIMP_IS_DISPLAY (display));
gimp_sample_point_tool_start (parent_tool, display, NULL);
}
开发者ID:jiapei100,项目名称:gimp,代码行数:9,代码来源:gimpsamplepointtool.c
示例19: gimp_tool_has_display
gboolean
gimp_tool_has_display (GimpTool *tool,
GimpDisplay *display)
{
g_return_val_if_fail (GIMP_IS_TOOL (tool), FALSE);
g_return_val_if_fail (GIMP_IS_DISPLAY (display), FALSE);
return GIMP_TOOL_GET_CLASS (tool)->has_display (tool, display);
}
开发者ID:Amerekanets,项目名称:gimp,代码行数:9,代码来源:gimptool.c
示例20: gimp_move_tool_start_vguide
void
gimp_move_tool_start_vguide (GimpTool *tool,
GimpDisplay *display)
{
g_return_if_fail (GIMP_IS_MOVE_TOOL (tool));
g_return_if_fail (GIMP_IS_DISPLAY (display));
gimp_move_tool_start_guide (GIMP_MOVE_TOOL (tool), display,
GIMP_ORIENTATION_VERTICAL);
}
开发者ID:MichaelMure,项目名称:Gimp-Cage-Tool,代码行数:10,代码来源:gimpmovetool.c
注:本文中的GIMP_IS_DISPLAY函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论