本文整理匯總了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);
}
示例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 ();
}
示例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);
}
示例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);
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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;
}
示例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);
}
示例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;
}