本文整理汇总了C++中GIMP_IS_GIMP函数的典型用法代码示例。如果您正苦于以下问题:C++ GIMP_IS_GIMP函数的具体用法?C++ GIMP_IS_GIMP怎么用?C++ GIMP_IS_GIMP使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GIMP_IS_GIMP函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: tool_manager_oper_update_active
void
tool_manager_oper_update_active (Gimp *gimp,
const GimpCoords *coords,
GdkModifierType state,
gboolean proximity,
GimpDisplay *display)
{
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, proximity,
display);
}
}
开发者ID:LebedevRI,项目名称:gimp,代码行数:20,代码来源:tool_manager.c
示例2: gimp_edit_paste_as_new_image
GimpImage *
gimp_edit_paste_as_new_image (Gimp *gimp,
GimpObject *paste)
{
GimpImage *image = NULL;
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
g_return_val_if_fail (GIMP_IS_IMAGE (paste) || GIMP_IS_BUFFER (paste), NULL);
if (GIMP_IS_IMAGE (paste))
{
image = gimp_image_duplicate (GIMP_IMAGE (paste));
}
else if (GIMP_IS_BUFFER (paste))
{
image = gimp_image_new_from_buffer (gimp, GIMP_BUFFER (paste));
}
return image;
}
开发者ID:ellelstone,项目名称:gimp,代码行数:20,代码来源:gimp-edit.c
示例3: tool_manager_key_release_active
gboolean
tool_manager_key_release_active (Gimp *gimp,
GdkEventKey *kevent,
GimpDisplay *display)
{
GimpToolManager *tool_manager;
g_return_val_if_fail (GIMP_IS_GIMP (gimp), FALSE);
tool_manager = tool_manager_get (gimp);
if (tool_manager->active_tool)
{
return gimp_tool_key_release (tool_manager->active_tool,
kevent,
display);
}
return FALSE;
}
开发者ID:jiapei100,项目名称:gimp,代码行数:20,代码来源:tool_manager.c
示例4: gimp_filter_history_remove
void
gimp_filter_history_remove (Gimp *gimp,
GimpProcedure *procedure)
{
GList *link;
g_return_if_fail (GIMP_IS_GIMP (gimp));
g_return_if_fail (GIMP_IS_PROCEDURE (procedure));
link = g_list_find_custom (gimp->filter_history, procedure,
(GCompareFunc) gimp_filter_history_compare);
if (link)
{
g_object_unref (link->data);
gimp->filter_history = g_list_delete_link (gimp->filter_history, link);
gimp_filter_history_changed (gimp);
}
}
开发者ID:ellelstone,项目名称:gimp,代码行数:20,代码来源:gimp-filter-history.c
示例5: tool_manager_cursor_update_active
void
tool_manager_cursor_update_active (Gimp *gimp,
const GimpCoords *coords,
GdkModifierType state,
GimpDisplay *display)
{
GimpToolManager *tool_manager;
g_return_if_fail (GIMP_IS_GIMP (gimp));
tool_manager = tool_manager_get (gimp);
if (tool_manager->active_tool &&
! gimp_tool_control_is_active (tool_manager->active_tool->control))
{
gimp_tool_cursor_update (tool_manager->active_tool,
coords, state,
display);
}
}
开发者ID:jiapei100,项目名称:gimp,代码行数:20,代码来源:tool_manager.c
示例6: file_open_dialog_new
GtkWidget *
file_open_dialog_new (Gimp *gimp)
{
GtkWidget *dialog;
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
dialog = gimp_open_dialog_new (gimp);
gtk_file_chooser_set_select_multiple (GTK_FILE_CHOOSER (dialog), TRUE);
gimp_file_dialog_load_state (GIMP_FILE_DIALOG (dialog),
"gimp-file-open-dialog-state");
g_signal_connect (dialog, "response",
G_CALLBACK (file_open_dialog_response),
gimp);
return dialog;
}
开发者ID:ni1son,项目名称:gimp,代码行数:20,代码来源:file-open-dialog.c
示例7: tool_manager_button_release_active
void
tool_manager_button_release_active (Gimp *gimp,
const GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpDisplay *display)
{
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,
display);
}
}
开发者ID:davidyang5405,项目名称:gimp,代码行数:20,代码来源:tool_manager.c
示例8: gimp_set_global_buffer
void
gimp_set_global_buffer (Gimp *gimp,
GimpBuffer *buffer)
{
g_return_if_fail (GIMP_IS_GIMP (gimp));
g_return_if_fail (buffer == NULL || GIMP_IS_BUFFER (buffer));
if (buffer == gimp->global_buffer)
return;
if (gimp->global_buffer)
g_object_unref (gimp->global_buffer);
gimp->global_buffer = buffer;
if (gimp->global_buffer)
g_object_ref (gimp->global_buffer);
g_signal_emit (gimp, gimp_signals[BUFFER_CHANGED], 0);
}
开发者ID:davidyang5405,项目名称:gimp,代码行数:20,代码来源:gimp.c
示例9: gimp_display_get_by_ID
GimpDisplay *
gimp_display_get_by_ID (Gimp *gimp,
gint ID)
{
GList *list;
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
for (list = GIMP_LIST (gimp->displays)->list;
list;
list = g_list_next (list))
{
GimpDisplay *display = list->data;
if (display->ID == ID)
return display;
}
return NULL;
}
开发者ID:Amerekanets,项目名称:gimp,代码行数:20,代码来源:gimpdisplay.c
示例10: dialogs_exit
void
dialogs_exit (Gimp *gimp)
{
g_return_if_fail (GIMP_IS_GIMP (gimp));
if (global_dialog_factory)
{
g_object_unref (global_dialog_factory);
global_dialog_factory = NULL;
}
/* destroy the "global_toolbox_factory" _before_ destroying the
* "global_dock_factory" because the "global_toolbox_factory" owns
* dockables which were created by the "global_dock_factory". This
* way they are properly removed from the "global_dock_factory", which
* would complain about stale entries otherwise.
*/
if (global_toolbox_factory)
{
g_object_unref (global_toolbox_factory);
global_toolbox_factory = NULL;
}
if (global_dock_factory)
{
g_object_unref (global_dock_factory);
global_dock_factory = NULL;
}
if (global_display_factory)
{
g_object_unref (global_display_factory);
global_display_factory = NULL;
}
if (global_recent_docks)
{
g_object_unref (global_recent_docks);
global_recent_docks = NULL;
}
}
开发者ID:jdburton,项目名称:gimp-osx,代码行数:41,代码来源:dialogs.c
示例11: tool_manager_init
void
tool_manager_init (Gimp *gimp)
{
GimpToolManager *tool_manager;
GimpContext *user_context;
g_return_if_fail (GIMP_IS_GIMP (gimp));
tool_manager = g_slice_new0 (GimpToolManager);
tool_manager->active_tool = NULL;
tool_manager->tool_stack = NULL;
tool_manager->image_clean_handler_id = 0;
tool_manager->image_dirty_handler_id = 0;
tool_manager_set (gimp, tool_manager);
tool_manager->image_clean_handler_id =
gimp_container_add_handler (gimp->images, "clean",
G_CALLBACK (tool_manager_image_clean_dirty),
tool_manager);
tool_manager->image_dirty_handler_id =
gimp_container_add_handler (gimp->images, "dirty",
G_CALLBACK (tool_manager_image_clean_dirty),
tool_manager);
user_context = gimp_get_user_context (gimp);
tool_manager->shared_paint_options = g_object_new (GIMP_TYPE_PAINT_OPTIONS,
"gimp", gimp,
"name", "tmp",
NULL);
g_signal_connect (user_context, "tool-changed",
G_CALLBACK (tool_manager_tool_changed),
tool_manager);
g_signal_connect (user_context, "tool-preset-changed",
G_CALLBACK (tool_manager_preset_changed),
tool_manager);
}
开发者ID:davidyang5405,项目名称:gimp,代码行数:41,代码来源:tool_manager.c
示例12: tool_manager_pop_tool
void
tool_manager_pop_tool (Gimp *gimp)
{
GimpToolManager *tool_manager;
g_return_if_fail (GIMP_IS_GIMP (gimp));
tool_manager = tool_manager_get (gimp);
if (tool_manager->tool_stack)
{
GimpTool *tool = tool_manager->tool_stack->data;
tool_manager->tool_stack = g_slist_remove (tool_manager->tool_stack,
tool);
tool_manager_select_tool (gimp, tool);
g_object_unref (tool);
}
}
开发者ID:davidyang5405,项目名称:gimp,代码行数:21,代码来源:tool_manager.c
示例13: gimp_contexts_init
void
gimp_contexts_init (Gimp *gimp)
{
GimpContext *context;
g_return_if_fail (GIMP_IS_GIMP (gimp));
/* the default context contains the user's saved preferences
*
* TODO: load from disk
*/
context = gimp_context_new (gimp, "Default", NULL);
gimp_set_default_context (gimp, context);
g_object_unref (context);
/* the initial user_context is a straight copy of the default context
*/
context = gimp_context_new (gimp, "User", context);
gimp_set_user_context (gimp, context);
g_object_unref (context);
}
开发者ID:jdburton,项目名称:gimp-osx,代码行数:21,代码来源:gimp-contexts.c
示例14: gimp_progress_message
gboolean
gimp_progress_message (GimpProgress *progress,
Gimp *gimp,
GimpMessageSeverity severity,
const gchar *domain,
const gchar *message)
{
GimpProgressInterface *progress_iface;
g_return_val_if_fail (GIMP_IS_PROGRESS (progress), FALSE);
g_return_val_if_fail (GIMP_IS_GIMP (gimp), FALSE);
g_return_val_if_fail (domain != NULL, FALSE);
g_return_val_if_fail (message != NULL, FALSE);
progress_iface = GIMP_PROGRESS_GET_INTERFACE (progress);
if (progress_iface->message)
return progress_iface->message (progress, gimp, severity, domain, message);
return FALSE;
}
开发者ID:AdamGrzonkowski,项目名称:gimp-1,代码行数:21,代码来源:gimpprogress.c
示例15: gimp_error_console_new
GtkWidget *
gimp_error_console_new (Gimp *gimp,
GimpMenuFactory *menu_factory)
{
GimpErrorConsole *console;
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
g_return_val_if_fail (GIMP_IS_MENU_FACTORY (menu_factory), NULL);
console = g_object_new (GIMP_TYPE_ERROR_CONSOLE,
"menu-factory", menu_factory,
"menu-identifier", "<ErrorConsole>",
"ui-path", "/error-console-popup",
NULL);
console->gimp = gimp;
console->gimp->message_handler = GIMP_ERROR_CONSOLE;
return GTK_WIDGET (console);
}
开发者ID:WilfR,项目名称:Gimp-Matting,代码行数:21,代码来源:gimperrorconsole.c
示例16: menus_save
void
menus_save (Gimp *gimp,
gboolean always_save)
{
gchar *filename;
g_return_if_fail (GIMP_IS_GIMP (gimp));
if (menurc_deleted && ! always_save)
return;
filename = gimp_personal_rc_file ("menurc");
if (gimp->be_verbose)
g_print ("Writing '%s'\n", gimp_filename_to_utf8 (filename));
gtk_accel_map_save (filename);
g_free (filename);
menurc_deleted = FALSE;
}
开发者ID:AjayRamanathan,项目名称:gimp,代码行数:21,代码来源:menus.c
示例17: gimp_clipboard_set_text
/**
* gimp_clipboard_set_text:
* @gimp: pointer to #Gimp
* @text: a %NULL-terminated string in UTF-8 encoding
*
* Offers @text in %GDK_SELECTION_CLIPBOARD and %GDK_SELECTION_PRIMARY.
**/
void
gimp_clipboard_set_text (Gimp *gimp,
const gchar *text)
{
GtkClipboard *clipboard;
g_return_if_fail (GIMP_IS_GIMP (gimp));
g_return_if_fail (text != NULL);
gimp_clipboard_clear (gimp_clipboard_get (gimp));
clipboard = gtk_clipboard_get_for_display (gdk_display_get_default (),
GDK_SELECTION_CLIPBOARD);
if (clipboard)
gtk_clipboard_set_text (clipboard, text, -1);
clipboard = gtk_clipboard_get_for_display (gdk_display_get_default (),
GDK_SELECTION_PRIMARY);
if (clipboard)
gtk_clipboard_set_text (clipboard, text, -1);
}
开发者ID:Amerekanets,项目名称:gimp,代码行数:28,代码来源:gimpclipboard.c
示例18: gimp_export_dialog_new
GtkWidget *
gimp_export_dialog_new (Gimp *gimp)
{
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
return g_object_new (GIMP_TYPE_EXPORT_DIALOG,
"gimp", gimp,
"title", _("Export Image"),
"role", "gimp-file-export",
"help-id", GIMP_HELP_FILE_EXPORT_AS,
"ok-button-label", _("_Export"),
"automatic-label", _("By Extension"),
"automatic-help-id", GIMP_HELP_FILE_SAVE_BY_EXTENSION,
"action", GTK_FILE_CHOOSER_ACTION_SAVE,
"file-procs", GIMP_FILE_PROCEDURE_GROUP_EXPORT,
"file-procs-all-images", GIMP_FILE_PROCEDURE_GROUP_SAVE,
"file-filter-label", _("All export images"),
NULL);
}
开发者ID:jiapei100,项目名称:gimp,代码行数:21,代码来源:gimpexportdialog.c
示例19: dialogs_exit
void
dialogs_exit (Gimp *gimp)
{
g_return_if_fail (GIMP_IS_GIMP (gimp));
if (gimp_dialog_factory_get_singleton ())
{
/* run dispose manually so the factory destroys its dialogs, which
* might in turn directly or indirectly ref the factory
*/
g_object_run_dispose (G_OBJECT (gimp_dialog_factory_get_singleton ()));
g_object_unref (gimp_dialog_factory_get_singleton ());
gimp_dialog_factory_set_singleton (NULL);
}
if (global_recent_docks)
{
g_object_unref (global_recent_docks);
global_recent_docks = NULL;
}
}
开发者ID:alfanak,项目名称:gimp,代码行数:22,代码来源:dialogs.c
示例20: gimp_wait
void
gimp_wait (Gimp *gimp,
GimpWaitable *waitable,
const gchar *format,
...)
{
va_list args;
gchar *message;
g_return_if_fail (GIMP_IS_GIMP (gimp));
g_return_if_fail (GIMP_IS_WAITABLE (waitable));
g_return_if_fail (format != NULL);
if (gimp_waitable_wait_for (waitable, 0.5 * G_TIME_SPAN_SECOND))
return;
va_start (args, format);
message = g_strdup_vprintf (format, args);
va_end (args);
if (! gimp->console_messages &&
gimp->gui.wait &&
gimp->gui.wait (gimp, waitable, message))
{
return;
}
/* Translator: This message is displayed while GIMP is waiting for
* some operation to finish. The %s argument is a message describing
* the operation.
*/
g_printerr (_("Please wait: %s\n"), message);
gimp_waitable_wait (waitable);
g_free (message);
}
开发者ID:jiapei100,项目名称:gimp,代码行数:39,代码来源:gimp-gui.c
注:本文中的GIMP_IS_GIMP函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论