当前位置: 首页>>代码示例>>C++>>正文


C++ GIMP_IS_PROGRESS函数代码示例

本文整理汇总了C++中GIMP_IS_PROGRESS函数的典型用法代码示例。如果您正苦于以下问题:C++ GIMP_IS_PROGRESS函数的具体用法?C++ GIMP_IS_PROGRESS怎么用?C++ GIMP_IS_PROGRESS使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了GIMP_IS_PROGRESS函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: gimp_progress_pulse

void
gimp_progress_pulse (GimpProgress *progress)
{
  GimpProgressInterface *progress_iface;

  g_return_if_fail (GIMP_IS_PROGRESS (progress));

  progress_iface = GIMP_PROGRESS_GET_INTERFACE (progress);

  if (progress_iface->pulse)
    progress_iface->pulse (progress);
}
开发者ID:AjayRamanathan,项目名称:gimp,代码行数:12,代码来源:gimpprogress.c

示例2: gimp_get_mount_operation

GMountOperation *
gimp_get_mount_operation (Gimp         *gimp,
                          GimpProgress *progress)
{
  g_return_val_if_fail (GIMP_IS_GIMP (gimp), FALSE);
  g_return_val_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress), FALSE);

  if (gimp->gui.get_mount_operation)
    return gimp->gui.get_mount_operation (gimp, progress);

  return g_mount_operation_new ();
}
开发者ID:ellelstone,项目名称:gimp,代码行数:12,代码来源:gimp-gui.c

示例3: gimp_help

void
gimp_help (Gimp         *gimp,
           GimpProgress *progress,
           const gchar  *help_domain,
           const gchar  *help_id)
{
  g_return_if_fail (GIMP_IS_GIMP (gimp));
  g_return_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress));

  if (gimp->gui.help)
    gimp->gui.help (gimp, progress, help_domain, help_id);
}
开发者ID:ellelstone,项目名称:gimp,代码行数:12,代码来源:gimp-gui.c

示例4: gimp_sub_progress_new

/**
 * gimp_sub_progress_new:
 * @progress: parent progress or %NULL
 *
 * GimpSubProgress implements the GimpProgress interface and can be
 * used wherever a GimpProgress is needed. It maps progress
 * information to a sub-range of its parent @progress. This is useful
 * when an action breaks down into multiple sub-actions that itself
 * need a #GimpProgress pointer. See gimp_image_scale() for an example.
 *
 * Return value: a new #GimpProgress object
 */
GimpProgress *
gimp_sub_progress_new (GimpProgress *progress)
{
  GimpSubProgress *sub;

  g_return_val_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress), NULL);

  sub = g_object_new (GIMP_TYPE_SUB_PROGRESS,
                      "progress", progress,
                      NULL);

  return GIMP_PROGRESS (sub);
}
开发者ID:jiapei100,项目名称:gimp,代码行数:25,代码来源:gimpsubprogress.c

示例5: gimp_progress_get_value

gdouble
gimp_progress_get_value (GimpProgress *progress)
{
  GimpProgressInterface *progress_iface;

  g_return_val_if_fail (GIMP_IS_PROGRESS (progress), 0.0);

  progress_iface = GIMP_PROGRESS_GET_INTERFACE (progress);

  if (progress_iface->get_value)
    return progress_iface->get_value (progress);

  return 0.0;
}
开发者ID:AdamGrzonkowski,项目名称:gimp-1,代码行数:14,代码来源:gimpprogress.c

示例6: gimp_progress_is_active

gboolean
gimp_progress_is_active (GimpProgress *progress)
{
  GimpProgressInterface *progress_iface;

  g_return_val_if_fail (GIMP_IS_PROGRESS (progress), FALSE);

  progress_iface = GIMP_PROGRESS_GET_INTERFACE (progress);

  if (progress_iface->is_active)
    return progress_iface->is_active (progress);

  return FALSE;
}
开发者ID:AdamGrzonkowski,项目名称:gimp-1,代码行数:14,代码来源:gimpprogress.c

示例7: gimp_progress_set_text_literal

void
gimp_progress_set_text_literal (GimpProgress *progress,
                                const gchar  *message)
{
  GimpProgressInterface *progress_iface;

  g_return_if_fail (GIMP_IS_PROGRESS (progress));
  g_return_if_fail (message != NULL);

  progress_iface = GIMP_PROGRESS_GET_INTERFACE (progress);

  if (progress_iface->set_text)
    progress_iface->set_text (progress, message);
}
开发者ID:AdamGrzonkowski,项目名称:gimp-1,代码行数:14,代码来源:gimpprogress.c

示例8: gimp_progress_get_window_id

guint32
gimp_progress_get_window_id (GimpProgress *progress)
{
  GimpProgressInterface *progress_iface;

  g_return_val_if_fail (GIMP_IS_PROGRESS (progress), 0);

  progress_iface = GIMP_PROGRESS_GET_INTERFACE (progress);

  if (progress_iface->get_window_id)
    return progress_iface->get_window_id (progress);

  return 0;
}
开发者ID:AdamGrzonkowski,项目名称:gimp-1,代码行数:14,代码来源:gimpprogress.c

示例9: gimp_drawable_foreground_extract_siox

void
gimp_drawable_foreground_extract_siox (GimpDrawable       *mask,
                                       SioxState          *state,
                                       SioxRefinementType  refinement,
                                       gint                smoothness,
                                       const gdouble       sensitivity[3],
                                       gboolean            multiblob,
                                       GimpProgress       *progress)
{
  GeglBuffer *buffer;
  gint        x1, y1;
  gint        x2, y2;

  g_return_if_fail (GIMP_IS_DRAWABLE (mask));
  g_return_if_fail (babl_format_get_bytes_per_pixel (gimp_drawable_get_format (mask)) == 1);

  g_return_if_fail (state != NULL);

  g_return_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress));

  if (progress)
    gimp_progress_start (progress, _("Foreground Extraction"), FALSE);

  if (GIMP_IS_CHANNEL (mask))
    {
      gimp_channel_bounds (GIMP_CHANNEL (mask), &x1, &y1, &x2, &y2);
    }
  else
    {
      x1 = 0;
      y1 = 0;
      x2 = gimp_item_get_width  (GIMP_ITEM (mask));
      y2 = gimp_item_get_height (GIMP_ITEM (mask));
    }

  buffer = gimp_drawable_get_buffer (mask);

  siox_foreground_extract (state, refinement,
                           gimp_gegl_buffer_get_tiles (buffer),
                           x1, y1, x2, y2,
                           smoothness, sensitivity, multiblob,
                           (SioxProgressFunc) gimp_progress_set_value,
                           progress);

  if (progress)
    gimp_progress_end (progress);

  gimp_drawable_update (mask, x1, y1, x2, y2);
}
开发者ID:AjayRamanathan,项目名称:gimp,代码行数:49,代码来源:gimpdrawable-foreground-extract.c

示例10: gimp_progress_set_value

void
gimp_progress_set_value (GimpProgress *progress,
                         gdouble       percentage)
{
  GimpProgressInterface *progress_iface;

  g_return_if_fail (GIMP_IS_PROGRESS (progress));

  percentage = CLAMP (percentage, 0.0, 1.0);

  progress_iface = GIMP_PROGRESS_GET_INTERFACE (progress);

  if (progress_iface->set_value)
    progress_iface->set_value (progress, percentage);
}
开发者ID:AdamGrzonkowski,项目名称:gimp-1,代码行数:15,代码来源:gimpprogress.c

示例11: gimp_progress_set_text

void
gimp_progress_set_text (GimpProgress *progress,
                        const gchar  *message)
{
  GimpProgressInterface *progress_iface;

  g_return_if_fail (GIMP_IS_PROGRESS (progress));

  if (! message || ! strlen (message))
    message = _("Please wait");

  progress_iface = GIMP_PROGRESS_GET_INTERFACE (progress);

  if (progress_iface->set_text)
    progress_iface->set_text (progress, message);
}
开发者ID:AjayRamanathan,项目名称:gimp,代码行数:16,代码来源:gimpprogress.c

示例12: gimp_image_resize_to_layers

void
gimp_image_resize_to_layers (GimpImage    *image,
                             GimpContext  *context,
                             GimpProgress *progress)
{
  GList    *list;
  GimpItem *item;
  gint      x, y;
  gint      width, height;

  g_return_if_fail (GIMP_IS_IMAGE (image));
  g_return_if_fail (GIMP_IS_CONTEXT (context));
  g_return_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress));

  list = gimp_image_get_layer_iter (image);

  if (! list)
    return;

  /* figure out starting values */
  item = list->data;

  x      = gimp_item_get_offset_x (item);
  y      = gimp_item_get_offset_y (item);
  width  = gimp_item_get_width  (item);
  height = gimp_item_get_height (item);

  /*  Respect all layers  */
  for (list = g_list_next (list); list; list = g_list_next (list))
    {
      item = list->data;

      gimp_rectangle_union (x, y,
                            width, height,
                            gimp_item_get_offset_x (item),
                            gimp_item_get_offset_y (item),
                            gimp_item_get_width  (item),
                            gimp_item_get_height (item),
                            &x, &y,
                            &width, &height);
    }

  gimp_image_resize (image, context,
                     width, height, -x, -y,
                     progress);
}
开发者ID:K-Sonoda,项目名称:gimp,代码行数:46,代码来源:gimpimage-resize.c

示例13: gimp_plug_in_progress_detach

gint
gimp_plug_in_progress_detach (GimpProgress *progress)
{
  gint attach_count;

  g_return_val_if_fail (GIMP_IS_PROGRESS (progress), 0);

  attach_count =
    GPOINTER_TO_INT (g_object_get_data (G_OBJECT (progress),
                                        "plug-in-progress-attach-count"));

  attach_count--;

  g_object_set_data (G_OBJECT (progress), "plug-in-progress-attach-count",
                     GINT_TO_POINTER (attach_count));

  return attach_count;
}
开发者ID:AdamGrzonkowski,项目名称:gimp-1,代码行数:18,代码来源:gimpplugin-progress.c

示例14: gimp_progress_set_text

void
gimp_progress_set_text (GimpProgress *progress,
                        const gchar  *format,
                        ...)
{
  va_list  args;
  gchar   *message;

  g_return_if_fail (GIMP_IS_PROGRESS (progress));
  g_return_if_fail (format != NULL);

  va_start (args, format);
  message = g_strdup_vprintf (format, args);
  va_end (args);

  gimp_progress_set_text_literal (progress, message);

  g_free (message);
}
开发者ID:AdamGrzonkowski,项目名称:gimp-1,代码行数:19,代码来源:gimpprogress.c

示例15: gimp_progress_start

GimpProgress *
gimp_progress_start (GimpProgress *progress,
                     const gchar  *message,
                     gboolean      cancelable)
{
  GimpProgressInterface *progress_iface;

  g_return_val_if_fail (GIMP_IS_PROGRESS (progress), NULL);

  if (! message)
    message = _("Please wait");

  progress_iface = GIMP_PROGRESS_GET_INTERFACE (progress);

  if (progress_iface->start)
    return progress_iface->start (progress, message, cancelable);

  return NULL;
}
开发者ID:AjayRamanathan,项目名称:gimp,代码行数:19,代码来源:gimpprogress.c


注:本文中的GIMP_IS_PROGRESS函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。