本文整理匯總了C++中GIMP_IS_GIMP函數的典型用法代碼示例。如果您正苦於以下問題:C++ GIMP_IS_GIMP函數的具體用法?C++ GIMP_IS_GIMP怎麽用?C++ GIMP_IS_GIMP使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了GIMP_IS_GIMP函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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);
}
}
示例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;
}
示例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;
}
示例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);
}
}
示例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);
}
}
示例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;
}
示例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);
}
}
示例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);
}
示例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;
}
示例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;
}
}
示例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);
}
示例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);
}
}
示例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);
}
示例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;
}
示例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);
}