这篇教程C++ GIMP_PROGRESS函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中GIMP_PROGRESS函数的典型用法代码示例。如果您正苦于以下问题:C++ GIMP_PROGRESS函数的具体用法?C++ GIMP_PROGRESS怎么用?C++ GIMP_PROGRESS使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了GIMP_PROGRESS函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: gimp_display_progress_get_windowstatic guint32gimp_display_progress_get_window (GimpProgress *progress){ GimpDisplay *display = GIMP_DISPLAY (progress); if (display->shell) return gimp_progress_get_window (GIMP_PROGRESS (display->shell)); return 0;}
开发者ID:Amerekanets,项目名称:gimp,代码行数:10,
示例2: gimp_tool_progress_get_valuestatic gdoublegimp_tool_progress_get_value (GimpProgress *progress){ GimpTool *tool = GIMP_TOOL (progress); if (tool->progress) return gimp_progress_get_value (GIMP_PROGRESS (tool->progress)); return 0.0;}
开发者ID:frne,项目名称:gimp,代码行数:10,
示例3: gimp_display_progress_get_valuestatic gdoublegimp_display_progress_get_value (GimpProgress *progress){ GimpDisplay *display = GIMP_DISPLAY (progress); if (display->shell) return gimp_progress_get_value (GIMP_PROGRESS (display->shell)); return 0.0;}
开发者ID:Amerekanets,项目名称:gimp,代码行数:10,
示例4: gimp_display_progress_is_activestatic gbooleangimp_display_progress_is_active (GimpProgress *progress){ GimpDisplay *display = GIMP_DISPLAY (progress); if (display->shell) return gimp_progress_is_active (GIMP_PROGRESS (display->shell)); return FALSE;}
开发者ID:Amerekanets,项目名称:gimp,代码行数:10,
示例5: file_open_from_command_line/* This function is called for filenames passed on the command-line * or from the D-Bus service. */gbooleanfile_open_from_command_line (Gimp *gimp, GFile *file, gboolean as_new, GObject *screen, gint monitor){ GimpImage *image; GimpObject *display; GimpPDBStatusType status; gboolean success = FALSE; GError *error = NULL; g_return_val_if_fail (GIMP_IS_GIMP (gimp), FALSE); g_return_val_if_fail (G_IS_FILE (file), FALSE); g_return_val_if_fail (screen == NULL || G_IS_OBJECT (screen), FALSE); display = gimp_get_empty_display (gimp); /* show the progress in the last opened display, see bug #704896 */ if (! display) display = gimp_context_get_display (gimp_get_user_context (gimp)); if (display) g_object_add_weak_pointer (G_OBJECT (display), (gpointer) &display); image = file_open_with_display (gimp, gimp_get_user_context (gimp), GIMP_PROGRESS (display), file, as_new, screen, monitor, &status, &error); if (image) { success = TRUE; g_object_set_data_full (G_OBJECT (gimp), GIMP_FILE_OPEN_LAST_FILE_KEY, g_object_ref (file), (GDestroyNotify) g_object_unref); } else if (status != GIMP_PDB_CANCEL && display) { gimp_message (gimp, G_OBJECT (display), GIMP_MESSAGE_ERROR, _("Opening '%s' failed: %s"), gimp_file_get_utf8_name (file), error->message); g_clear_error (&error); } if (display) g_object_remove_weak_pointer (G_OBJECT (display), (gpointer) &display); return success;}
开发者ID:Distrotech,项目名称:gimp,代码行数:58,
示例6: file_open_recent_cmd_callbackvoidfile_open_recent_cmd_callback (GtkAction *action, gint value, gpointer data){ Gimp *gimp; GimpImagefile *imagefile; gint num_entries; return_if_no_gimp (gimp, data); num_entries = gimp_container_get_n_children (gimp->documents); if (value >= num_entries) return; imagefile = (GimpImagefile *) gimp_container_get_child_by_index (gimp->documents, value); if (imagefile) { GimpDisplay *display; GimpProgress *progress; GimpImage *image; GimpPDBStatusType status; GError *error = NULL; return_if_no_display (display, data); g_object_ref (display); g_object_ref (imagefile); progress = gimp_display_get_image (display) ? NULL : GIMP_PROGRESS (display); image = file_open_with_display (gimp, action_data_get_context (data), progress, gimp_object_get_name (imagefile), FALSE, &status, &error); if (! image && status != GIMP_PDB_CANCEL) { gchar *filename = file_utils_uri_display_name (gimp_object_get_name (imagefile)); gimp_message (gimp, G_OBJECT (display), GIMP_MESSAGE_ERROR, _("Opening '%s' failed:/n/n%s"), filename, error->message); g_clear_error (&error); g_free (filename); } g_object_unref (imagefile); g_object_unref (display); }}
开发者ID:1ynx,项目名称:gimp,代码行数:55,
示例7: gimp_thumb_box_auto_thumbnailstatic gbooleangimp_thumb_box_auto_thumbnail (GimpThumbBox *box){ Gimp *gimp = box->imagefile->gimp; GimpThumbnail *thumb = box->imagefile->thumbnail; const gchar *uri = gimp_object_get_name (GIMP_OBJECT (box->imagefile)); box->idle_id = 0; if (thumb->image_state == GIMP_THUMB_STATE_NOT_FOUND) return FALSE; switch (thumb->thumb_state) { case GIMP_THUMB_STATE_NOT_FOUND: case GIMP_THUMB_STATE_OLD: if (thumb->image_filesize < gimp->config->thumbnail_filesize_limit && ! gimp_thumbnail_has_failed (thumb) && file_procedure_find_by_extension (gimp->plug_in_manager->load_procs, uri)) { if (thumb->image_filesize > 0) { gchar *size; gchar *text; size = gimp_memsize_to_string (thumb->image_filesize); text = g_strdup_printf ("%s/n%s", size, _("Creating preview...")); gtk_label_set_text (GTK_LABEL (box->info), text); g_free (text); g_free (size); } else { gtk_label_set_text (GTK_LABEL (box->info), _("Creating preview...")); } gimp_imagefile_create_thumbnail_weak (box->imagefile, box->context, GIMP_PROGRESS (box), gimp->config->thumbnail_size, TRUE); } break; default: break; } return FALSE;}
开发者ID:Amerekanets,项目名称:gimp,代码行数:54,
示例8: help_help_cmd_callbackvoidhelp_help_cmd_callback (GtkAction *action, gpointer data){ Gimp *gimp; GimpDisplay *display; return_if_no_gimp (gimp, data); return_if_no_display (display, data); gimp_help_show (gimp, GIMP_PROGRESS (display), NULL, NULL);}
开发者ID:AdamGrzonkowski,项目名称:gimp-1,代码行数:11,
示例9: gimp_progress_dialog_progress_set_textstatic voidgimp_progress_dialog_progress_set_text (GimpProgress *progress, const gchar *message){ GimpProgressDialog *dialog = GIMP_PROGRESS_DIALOG (progress); if (! dialog->box) return; gimp_progress_set_text (GIMP_PROGRESS (dialog->box), message);}
开发者ID:Amerekanets,项目名称:gimp,代码行数:11,
示例10: gimp_progress_dialog_progress_set_valuestatic voidgimp_progress_dialog_progress_set_value (GimpProgress *progress, gdouble percentage){ GimpProgressDialog *dialog = GIMP_PROGRESS_DIALOG (progress); if (! dialog->box) return; gimp_progress_set_value (GIMP_PROGRESS (dialog->box), percentage);}
开发者ID:Amerekanets,项目名称:gimp,代码行数:11,
示例11: vectors_selection_to_vectors_cmd_callbackvoidvectors_selection_to_vectors_cmd_callback (GtkAction *action, gint value, gpointer data){ GimpImage *image; GtkWidget *widget; GimpProcedure *procedure; GimpValueArray *args; GimpDisplay *display; GError *error = NULL; return_if_no_image (image, data); return_if_no_widget (widget, data); if (value) procedure = gimp_pdb_lookup_procedure (image->gimp->pdb, "plug-in-sel2path-advanced"); else procedure = gimp_pdb_lookup_procedure (image->gimp->pdb, "plug-in-sel2path"); if (! procedure) { gimp_message_literal (image->gimp, G_OBJECT (widget), GIMP_MESSAGE_ERROR, "Selection to path procedure lookup failed."); return; } display = gimp_context_get_display (action_data_get_context (data)); args = gimp_procedure_get_arguments (procedure); gimp_value_array_truncate (args, 2); g_value_set_int (gimp_value_array_index (args, 0), GIMP_RUN_INTERACTIVE); gimp_value_set_image (gimp_value_array_index (args, 1), image); gimp_procedure_execute_async (procedure, image->gimp, action_data_get_context (data), GIMP_PROGRESS (display), args, GIMP_OBJECT (display), &error); gimp_value_array_unref (args); if (error) { gimp_message_literal (image->gimp, G_OBJECT (widget), GIMP_MESSAGE_ERROR, error->message); g_error_free (error); }}
开发者ID:ellelstone,项目名称:gimp,代码行数:54,
示例12: gimp_tool_progress_key_pressstatic gbooleangimp_tool_progress_key_press (GtkWidget *widget, const GdkEventKey *kevent, GimpTool *tool){ if (kevent->keyval == GDK_KEY_Escape) { gimp_progress_cancel (GIMP_PROGRESS (tool)); } return TRUE;}
开发者ID:frne,项目名称:gimp,代码行数:12,
示例13: gimp_progress_update_and_flushvoidgimp_progress_update_and_flush (gint min, gint max, gint current, gpointer data){ gimp_progress_set_value (GIMP_PROGRESS (data), (gdouble) (current - min) / (gdouble) (max - min)); while (g_main_context_pending (NULL)) g_main_context_iteration (NULL, TRUE);}
开发者ID:AdamGrzonkowski,项目名称:gimp-1,代码行数:12,
示例14: gimp_cage_tool_create_render_nodestatic voidgimp_cage_tool_create_render_node (GimpCageTool *ct){ GimpCageOptions *options = GIMP_CAGE_TOOL_GET_OPTIONS (ct); GeglNode *coef, *cage, *render; /* Render nodes */ GeglNode *input, *output; /* Proxy nodes*/ GeglNode *node; /* wraper to be returned */ g_return_if_fail (ct->render_node == NULL); /* render_node is not supposed to be recreated */ node = gegl_node_new (); input = gegl_node_get_input_proxy (node, "input"); output = gegl_node_get_output_proxy (node, "output"); coef = gegl_node_new_child (node, "operation", "gegl:buffer-source", "buffer", ct->coef, NULL); cage = gegl_node_new_child (node, "operation", "gimp:cage-transform", "config", ct->config, "fill_plain_color", options->fill_plain_color, NULL); render = gegl_node_new_child (node, "operation", "gegl:map-absolute", NULL); gegl_node_connect_to (input, "output", cage, "input"); gegl_node_connect_to (coef, "output", cage, "aux"); gegl_node_connect_to (input, "output", render, "input"); gegl_node_connect_to (cage, "output", render, "aux"); gegl_node_connect_to (render, "output", output, "input"); ct->render_node = node; ct->cage_node = cage; ct->coef_node = coef; gimp_gegl_progress_connect (cage, GIMP_PROGRESS (ct), _("Cage Transform"));}
开发者ID:STRNG,项目名称:gimp,代码行数:52,
示例15: 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,
示例16: gimp_display_progress_startstatic GimpProgress *gimp_display_progress_start (GimpProgress *progress, const gchar *message, gboolean cancelable){ GimpDisplay *display = GIMP_DISPLAY (progress); if (display->shell) return gimp_progress_start (GIMP_PROGRESS (display->shell), message, cancelable); return NULL;}
开发者ID:Amerekanets,项目名称:gimp,代码行数:13,
示例17: gimp_tool_progress_set_textstatic voidgimp_tool_progress_set_text (GimpProgress *progress, const gchar *message){ GimpTool *tool = GIMP_TOOL (progress); if (tool->progress) { GimpDisplayShell *shell = gimp_display_get_shell (tool->progress_display); gimp_progress_set_text (GIMP_PROGRESS (tool->progress), message); gimp_widget_flush_expose (shell->canvas); }}
开发者ID:frne,项目名称:gimp,代码行数:14,
示例18: gimp_tool_progress_set_valuestatic voidgimp_tool_progress_set_value (GimpProgress *progress, gdouble percentage){ GimpTool *tool = GIMP_TOOL (progress); if (tool->progress) { GimpDisplayShell *shell = gimp_display_get_shell (tool->progress_display); gimp_progress_set_value (GIMP_PROGRESS (tool->progress), percentage); gimp_widget_flush_expose (shell->canvas); }}
开发者ID:frne,项目名称:gimp,代码行数:14,
示例19: gimp_display_progress_messagestatic gbooleangimp_display_progress_message (GimpProgress *progress, Gimp *gimp, GimpMessageSeverity severity, const gchar *domain, const gchar *message){ GimpDisplay *display = GIMP_DISPLAY (progress); if (display->shell) return gimp_progress_message (GIMP_PROGRESS (display->shell), gimp, severity, domain, message); return FALSE;}
开发者ID:Amerekanets,项目名称:gimp,代码行数:15,
示例20: gimp_blend_tool_commitstatic voidgimp_blend_tool_commit (GimpBlendTool *blend_tool){ GimpTool *tool = GIMP_TOOL (blend_tool); if (blend_tool->filter) { gimp_drawable_filter_commit (blend_tool->filter, GIMP_PROGRESS (tool), FALSE); g_object_unref (blend_tool->filter); blend_tool->filter = NULL; gimp_image_flush (gimp_display_get_image (tool->display)); }}
开发者ID:Anstep,项目名称:gimp,代码行数:15,
示例21: drawable_value_invert_cmd_callbackvoiddrawable_value_invert_cmd_callback (GtkAction *action, gpointer data){ GimpImage *image; GimpDrawable *drawable; GimpDisplay *display; return_if_no_drawable (image, drawable, data); return_if_no_display (display, data); gimp_drawable_apply_operation_by_name (drawable, GIMP_PROGRESS (display), _("Invert"), "gegl:value-invert", NULL); gimp_image_flush (image);}
开发者ID:AdamGrzonkowski,项目名称:gimp-1,代码行数:15,
示例22: gimp_seamless_clone_tool_key_pressstatic gbooleangimp_seamless_clone_tool_key_press (GimpTool *tool, GdkEventKey *kevent, GimpDisplay *display){ GimpSeamlessCloneTool *sct = GIMP_SEAMLESS_CLONE_TOOL (tool); if (sct->tool_state == SC_STATE_RENDER_MOTION || sct->tool_state == SC_STATE_RENDER_WAIT) { switch (kevent->keyval) { case GDK_KEY_Return: case GDK_KEY_KP_Enter: case GDK_KEY_ISO_Enter: gimp_tool_control_set_preserve (tool->control, TRUE); /* TODO: there may be issues with committing the image map * result after some changes were made and the preview * was scrolled. We can fix these by either invalidating * the area which is a union of the previous paste * rectangle each time (in the update function) or by * invalidating and re-rendering all now (expensive and * perhaps useless */ gimp_image_map_commit (sct->image_map, GIMP_PROGRESS (tool)); g_object_unref (sct->image_map); sct->image_map = NULL; gimp_tool_control_set_preserve (tool->control, FALSE); gimp_image_flush (gimp_display_get_image (display)); gimp_seamless_clone_tool_control (tool, GIMP_TOOL_ACTION_HALT, display); return TRUE; case GDK_KEY_Escape: gimp_seamless_clone_tool_control (tool, GIMP_TOOL_ACTION_HALT, display); return TRUE; default: break; } } return FALSE;}
开发者ID:alfanak,项目名称:gimp,代码行数:48,
示例23: image_resize_callbackstatic voidimage_resize_callback (GtkWidget *dialog, GimpViewable *viewable, gint width, gint height, GimpUnit unit, gint offset_x, gint offset_y, GimpItemSet layer_set, gpointer data){ ImageResizeOptions *options = data; image_resize_unit = unit; if (width > 0 && height > 0) { GimpImage *image = GIMP_IMAGE (viewable); GimpDisplay *display = options->display; GimpContext *context = options->context; GimpProgress *progress; gtk_widget_destroy (dialog); if (width == gimp_image_get_width (image) && height == gimp_image_get_height (image)) return; progress = gimp_progress_start (GIMP_PROGRESS (display), _("Resizing"), FALSE); gimp_image_resize_with_layers (image, context, width, height, offset_x, offset_y, layer_set, progress); if (progress) gimp_progress_end (progress); gimp_image_flush (image); } else { g_warning ("Resize Error: " "Both width and height must be greater than zero."); }}
开发者ID:jdburton,项目名称:gimp-osx,代码行数:48,
示例24: gimp_cage_tool_commitstatic voidgimp_cage_tool_commit (GimpCageTool *ct){ GimpTool *tool = GIMP_TOOL (ct); gimp_tool_control_push_preserve (tool->control, TRUE); gimp_image_map_commit (ct->image_map, GIMP_PROGRESS (tool)); g_object_unref (ct->image_map); ct->image_map = NULL; gimp_tool_control_pop_preserve (tool->control); gimp_image_flush (gimp_display_get_image (tool->display));}
开发者ID:STRNG,项目名称:gimp,代码行数:16,
示例25: gimp_tool_progress_endstatic voidgimp_tool_progress_end (GimpProgress *progress){ GimpTool *tool = GIMP_TOOL (progress); if (tool->progress) { GimpDisplayShell *shell = gimp_display_get_shell (tool->progress_display); gimp_progress_end (GIMP_PROGRESS (tool->progress)); gimp_display_shell_remove_item (shell, tool->progress); tool->progress = NULL; tool->progress_display = NULL; }}
开发者ID:MichaelMure,项目名称:Gimp-Cage-Tool,代码行数:16,
示例26: gimp_tool_progress_startstatic GimpProgress *gimp_tool_progress_start (GimpProgress *progress, const gchar *message, gboolean cancelable){ GimpTool *tool = GIMP_TOOL (progress); GimpDisplayShell *shell; gint x, y; 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); x = shell->disp_width / 2; y = shell->disp_height / 2; gimp_display_shell_unzoom_xy (shell, x, y, &x, &y, FALSE); tool->progress = gimp_canvas_progress_new (shell, GIMP_HANDLE_ANCHOR_CENTER, x, y); gimp_display_shell_add_unrotated_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; if (cancelable) { tool->progress_grab_widget = gtk_invisible_new (); gtk_widget_show (tool->progress_grab_widget); gtk_grab_add (tool->progress_grab_widget); g_signal_connect (tool->progress_grab_widget, "button-press-event", G_CALLBACK (gimp_tool_progress_button_press), tool); g_signal_connect (tool->progress_grab_widget, "key-press-event", G_CALLBACK (gimp_tool_progress_key_press), tool); } return progress;}
开发者ID:frne,项目名称:gimp,代码行数:47,
示例27: gimp_file_dialog_responsestatic voidgimp_file_dialog_response (GtkDialog *dialog, gint response_id){ GimpFileDialog *file_dialog = GIMP_FILE_DIALOG (dialog); if (response_id != GTK_RESPONSE_OK && file_dialog->busy) { file_dialog->canceled = TRUE; if (GIMP_PROGRESS_BOX (file_dialog->progress)->active && GIMP_PROGRESS_BOX (file_dialog->progress)->cancelable) { gimp_progress_cancel (GIMP_PROGRESS (dialog)); } }}
开发者ID:Amerekanets,项目名称:gimp,代码行数:17,
示例28: gimp_file_dialog_progress_startstatic GimpProgress *gimp_file_dialog_progress_start (GimpProgress *progress, const gchar *message, gboolean cancelable){ GimpFileDialog *dialog = GIMP_FILE_DIALOG (progress); GimpProgress *retval; retval = gimp_progress_start (GIMP_PROGRESS (dialog->progress), message, cancelable); gtk_widget_show (dialog->progress); gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog), GTK_RESPONSE_CANCEL, cancelable); return retval;}
开发者ID:Amerekanets,项目名称:gimp,代码行数:17,
示例29: gimp_seamless_clone_tool_commitstatic voidgimp_seamless_clone_tool_commit (GimpSeamlessCloneTool *sc){ GimpTool *tool = GIMP_TOOL (sc); if (sc->filter) { gimp_tool_control_push_preserve (tool->control, TRUE); gimp_drawable_filter_commit (sc->filter, GIMP_PROGRESS (tool), FALSE); g_clear_object (&sc->filter); gimp_tool_control_pop_preserve (tool->control); gimp_image_flush (gimp_display_get_image (tool->display)); }}
开发者ID:jiapei100,项目名称:gimp,代码行数:17,
示例30: gimp_progress_dialog_progress_endstatic voidgimp_progress_dialog_progress_end (GimpProgress *progress){ GimpProgressDialog *dialog = GIMP_PROGRESS_DIALOG (progress); if (! dialog->box) return; if (GIMP_PROGRESS_BOX (dialog->box)->active) { gimp_progress_end (GIMP_PROGRESS (dialog->box)); gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog), GTK_RESPONSE_CANCEL, FALSE); gtk_widget_hide (GTK_WIDGET (dialog)); }}
开发者ID:Amerekanets,项目名称:gimp,代码行数:18,
注:本文中的GIMP_PROGRESS函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ GIMP_RULER_GET_PRIVATE函数代码示例 C++ GIMP_PAINT_TOOL函数代码示例 |