Commit 4b917ea2 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

Made an object out of the plug-in struct. Also change refcounting

2006-05-03  Michael Natterer  <mitch@gimp.org>

	Made an object out of the plug-in struct. Also change refcounting
	considerably:

	- gimp_plug_in_open() adds a reference that is only dropped by
	  gimp_plug_in_close().
	- temporarily ref the plug-in while handling messages.
	- remporarily ref the plug-in while a recursive main loop is
	  running.
	- each caller of gimp_plug_in_new() also unrefs the plug-in before
	  returning, the only reference that persists across functions
	  (that keeps the plug-in alive) is the one added by open().

	* app/plug-in/plug-in.[ch]
	* app/plug-in/plug-in-context.[ch]
	* app/plug-in/plug-in-message.[ch]
	* app/plug-in/plug-in-progress.[ch]: removed these files...

	* app/plug-in/gimpplugin.[ch]
	* app/plug-in/gimpplugin-context.[ch]
	* app/plug-in/gimpplugin-message.[ch]
	* app/plug-in/gimpplugin-progress.[ch]: ...and added here as GObject.

	* app/plug-in/plug-in-proc-frame.[ch]: removed...

	* app/plug-in/gimppluginprocframe.[ch]: ...and added with a namespace.

	* app/plug-in/Makefile.am
	* app/plug-in/plug-in-types.h
	* app/plug-in/gimppluginmanager-call.c
	* app/plug-in/gimppluginmanager-file.c
	* app/plug-in/gimppluginmanager.[ch]
	* app/pdb/gimppluginprocedure.c
	* app/pdb/gimptemporaryprocedure.c
	* app/pdb/gimptemporaryprocedure.h
	* tools/pdbgen/pdb/context.pdb
	* tools/pdbgen/pdb/drawable.pdb
	* tools/pdbgen/pdb/help.pdb
	* tools/pdbgen/pdb/message.pdb
	* tools/pdbgen/pdb/plug_in.pdb
	* tools/pdbgen/pdb/progress.pdb
	* tools/pdbgen/pdb/undo.pdb: changed accordingly.

	* app/pdb/context_cmds.c
	* app/pdb/drawable_cmds.c
	* app/pdb/help_cmds.c
	* app/pdb/message_cmds.c
	* app/pdb/plug_in_cmds.c
	* app/pdb/progress_cmds.c
	* app/pdb/undo_cmds.c: regenerated.
parent ce320fdf
2006-05-03 Michael Natterer <mitch@gimp.org>
Made an object out of the plug-in struct. Also change refcounting
considerably:
- gimp_plug_in_open() adds a reference that is only dropped by
gimp_plug_in_close().
- temporarily ref the plug-in while handling messages.
- remporarily ref the plug-in while a recursive main loop is
running.
- each caller of gimp_plug_in_new() also unrefs the plug-in before
returning, the only reference that persists across functions
(that keeps the plug-in alive) is the one added by open().
* app/plug-in/plug-in.[ch]
* app/plug-in/plug-in-context.[ch]
* app/plug-in/plug-in-message.[ch]
* app/plug-in/plug-in-progress.[ch]: removed these files...
* app/plug-in/gimpplugin.[ch]
* app/plug-in/gimpplugin-context.[ch]
* app/plug-in/gimpplugin-message.[ch]
* app/plug-in/gimpplugin-progress.[ch]: ...and added here as GObject.
* app/plug-in/plug-in-proc-frame.[ch]: removed...
* app/plug-in/gimppluginprocframe.[ch]: ...and added with a namespace.
* app/plug-in/Makefile.am
* app/plug-in/plug-in-types.h
* app/plug-in/gimppluginmanager-call.c
* app/plug-in/gimppluginmanager-file.c
* app/plug-in/gimppluginmanager.[ch]
* app/pdb/gimppluginprocedure.c
* app/pdb/gimptemporaryprocedure.c
* app/pdb/gimptemporaryprocedure.h
* tools/pdbgen/pdb/context.pdb
* tools/pdbgen/pdb/drawable.pdb
* tools/pdbgen/pdb/help.pdb
* tools/pdbgen/pdb/message.pdb
* tools/pdbgen/pdb/plug_in.pdb
* tools/pdbgen/pdb/progress.pdb
* tools/pdbgen/pdb/undo.pdb: changed accordingly.
* app/pdb/context_cmds.c
* app/pdb/drawable_cmds.c
* app/pdb/help_cmds.c
* app/pdb/message_cmds.c
* app/pdb/plug_in_cmds.c
* app/pdb/progress_cmds.c
* app/pdb/undo_cmds.c: regenerated.
2006-05-03 Sven Neumann <sven@gimp.org> 2006-05-03 Sven Neumann <sven@gimp.org>
* plug-ins/common/gifload.c: removed some unused code, untabified. * plug-ins/common/gifload.c: removed some unused code, untabified.
......
...@@ -34,9 +34,9 @@ ...@@ -34,9 +34,9 @@
#include "core/gimpcontainer.h" #include "core/gimpcontainer.h"
#include "core/gimpcontext.h" #include "core/gimpcontext.h"
#include "core/gimpdatafactory.h" #include "core/gimpdatafactory.h"
#include "plug-in/gimpplugin-context.h"
#include "plug-in/gimpplugin.h"
#include "plug-in/gimppluginmanager.h" #include "plug-in/gimppluginmanager.h"
#include "plug-in/plug-in-context.h"
#include "plug-in/plug-in.h"
static GValueArray * static GValueArray *
...@@ -47,11 +47,13 @@ context_push_invoker (GimpProcedure *procedure, ...@@ -47,11 +47,13 @@ context_push_invoker (GimpProcedure *procedure,
const GValueArray *args) const GValueArray *args)
{ {
gboolean success = TRUE; gboolean success = TRUE;
if (gimp->plug_in_manager->current_plug_in && GimpPlugIn *plug_in = gimp->plug_in_manager->current_plug_in;
gimp->plug_in_manager->current_plug_in->open)
success = plug_in_context_push (gimp->plug_in_manager->current_plug_in); if (plug_in && plug_in->open)
success = gimp_plug_in_context_push (plug_in);
else else
success = FALSE; success = FALSE;
return gimp_procedure_get_return_values (procedure, success); return gimp_procedure_get_return_values (procedure, success);
} }
...@@ -63,11 +65,13 @@ context_pop_invoker (GimpProcedure *procedure, ...@@ -63,11 +65,13 @@ context_pop_invoker (GimpProcedure *procedure,
const GValueArray *args) const GValueArray *args)
{ {
gboolean success = TRUE; gboolean success = TRUE;
if (gimp->plug_in_manager->current_plug_in && GimpPlugIn *plug_in = gimp->plug_in_manager->current_plug_in;
gimp->plug_in_manager->current_plug_in->open)
success = plug_in_context_pop (gimp->plug_in_manager->current_plug_in); if (plug_in && plug_in->open)
success = gimp_plug_in_context_pop (plug_in);
else else
success = FALSE; success = FALSE;
return gimp_procedure_get_return_values (procedure, success); return gimp_procedure_get_return_values (procedure, success);
} }
......
...@@ -41,8 +41,8 @@ ...@@ -41,8 +41,8 @@
#include "core/gimplayer.h" #include "core/gimplayer.h"
#include "core/gimplayermask.h" #include "core/gimplayermask.h"
#include "gimp-intl.h" #include "gimp-intl.h"
#include "plug-in/gimpplugin.h"
#include "plug-in/gimppluginmanager.h" #include "plug-in/gimppluginmanager.h"
#include "plug-in/plug-in.h"
static GValueArray * static GValueArray *
...@@ -764,7 +764,7 @@ drawable_merge_shadow_invoker (GimpProcedure *procedure, ...@@ -764,7 +764,7 @@ drawable_merge_shadow_invoker (GimpProcedure *procedure,
gchar *undo_desc = NULL; gchar *undo_desc = NULL;
if (gimp->plug_in_manager->current_plug_in) if (gimp->plug_in_manager->current_plug_in)
undo_desc = plug_in_get_undo_desc (gimp->plug_in_manager->current_plug_in); undo_desc = gimp_plug_in_get_undo_desc (gimp->plug_in_manager->current_plug_in);
if (! undo_desc) if (! undo_desc)
undo_desc = g_strdup (_("Plug-In")); undo_desc = g_strdup (_("Plug-In"));
......
/* The GIMP -- an image manipulation program /* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis * Copyright (C) 1995 Spencer Kimball and Peter Mattis
* *
* plug-in-proc-def.c * gimppluginprocedure.c
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
#define __YES_I_NEED_GIMP_PLUG_IN_MANAGER_CALL__ #define __YES_I_NEED_GIMP_PLUG_IN_MANAGER_CALL__
#include "plug-in/gimppluginmanager-call.h" #include "plug-in/gimppluginmanager-call.h"
#include "plug-in/plug-in.h"
#include "gimppluginprocedure.h" #include "gimppluginprocedure.h"
......
...@@ -26,9 +26,9 @@ ...@@ -26,9 +26,9 @@
#include "core/gimp.h" #include "core/gimp.h"
#include "plug-in/gimpplugin.h"
#define __YES_I_NEED_GIMP_PLUG_IN_MANAGER_CALL__ #define __YES_I_NEED_GIMP_PLUG_IN_MANAGER_CALL__
#include "plug-in/gimppluginmanager-call.h" #include "plug-in/gimppluginmanager-call.h"
#include "plug-in/plug-in.h"
#include "gimptemporaryprocedure.h" #include "gimptemporaryprocedure.h"
...@@ -128,11 +128,11 @@ gimp_temporary_procedure_get_progname (const GimpPlugInProcedure *procedure) ...@@ -128,11 +128,11 @@ gimp_temporary_procedure_get_progname (const GimpPlugInProcedure *procedure)
/* public functions */ /* public functions */
GimpProcedure * GimpProcedure *
gimp_temporary_procedure_new (PlugIn *plug_in) gimp_temporary_procedure_new (GimpPlugIn *plug_in)
{ {
GimpTemporaryProcedure *proc; GimpTemporaryProcedure *proc;
g_return_val_if_fail (plug_in != NULL, NULL); g_return_val_if_fail (GIMP_IS_PLUG_IN (plug_in), NULL);
proc = g_object_new (GIMP_TYPE_TEMPORARY_PROCEDURE, NULL); proc = g_object_new (GIMP_TYPE_TEMPORARY_PROCEDURE, NULL);
......
...@@ -39,7 +39,7 @@ struct _GimpTemporaryProcedure ...@@ -39,7 +39,7 @@ struct _GimpTemporaryProcedure
{ {
GimpPlugInProcedure parent_instance; GimpPlugInProcedure parent_instance;
PlugIn *plug_in; GimpPlugIn *plug_in;
}; };
struct _GimpTemporaryProcedureClass struct _GimpTemporaryProcedureClass
...@@ -50,7 +50,7 @@ struct _GimpTemporaryProcedureClass ...@@ -50,7 +50,7 @@ struct _GimpTemporaryProcedureClass
GType gimp_temporary_procedure_get_type (void) G_GNUC_CONST; GType gimp_temporary_procedure_get_type (void) G_GNUC_CONST;
GimpProcedure * gimp_temporary_procedure_new (PlugIn *plug_in); GimpProcedure * gimp_temporary_procedure_new (GimpPlugIn *plug_in);
#endif /* __GIMP_TEMPORARY_PROCEDURE_H__ */ #endif /* __GIMP_TEMPORARY_PROCEDURE_H__ */
...@@ -29,9 +29,9 @@ ...@@ -29,9 +29,9 @@
#include "core/gimpparamspecs.h" #include "core/gimpparamspecs.h"
#include "core/gimp.h" #include "core/gimp.h"
#include "plug-in/gimpplugin.h"
#include "plug-in/gimppluginmanager-help-domain.h" #include "plug-in/gimppluginmanager-help-domain.h"
#include "plug-in/gimppluginmanager.h" #include "plug-in/gimppluginmanager.h"
#include "plug-in/plug-in.h"
static GValueArray * static GValueArray *
......
...@@ -31,9 +31,9 @@ ...@@ -31,9 +31,9 @@
#include "core/gimp.h" #include "core/gimp.h"
#include "gimp-intl.h" #include "gimp-intl.h"
#include "plug-in/gimpplugin-progress.h"
#include "plug-in/gimpplugin.h"
#include "plug-in/gimppluginmanager.h" #include "plug-in/gimppluginmanager.h"
#include "plug-in/plug-in-progress.h"
#include "plug-in/plug-in.h"
static GValueArray * static GValueArray *
...@@ -51,7 +51,8 @@ message_invoker (GimpProcedure *procedure, ...@@ -51,7 +51,8 @@ message_invoker (GimpProcedure *procedure,
if (success) if (success)
{ {
if (gimp->plug_in_manager->current_plug_in) if (gimp->plug_in_manager->current_plug_in)
plug_in_progress_message (gimp->plug_in_manager->current_plug_in, message); gimp_plug_in_progress_message (gimp->plug_in_manager->current_plug_in,
message);
else else
gimp_message (gimp, NULL, message); gimp_message (gimp, NULL, message);
} }
......
...@@ -34,11 +34,11 @@ ...@@ -34,11 +34,11 @@
#include "core/gimp.h" #include "core/gimp.h"
#include "gimppluginprocedure.h" #include "gimppluginprocedure.h"
#include "plug-in/gimpplugin.h"
#include "plug-in/gimppluginmanager-menu-branch.h" #include "plug-in/gimppluginmanager-menu-branch.h"
#include "plug-in/gimppluginmanager-query.h" #include "plug-in/gimppluginmanager-query.h"
#include "plug-in/gimppluginmanager.h" #include "plug-in/gimppluginmanager.h"
#include "plug-in/plug-in-def.h" #include "plug-in/plug-in-def.h"
#include "plug-in/plug-in.h"
static GValueArray * static GValueArray *
...@@ -103,7 +103,7 @@ plugin_domain_register_invoker (GimpProcedure *procedure, ...@@ -103,7 +103,7 @@ plugin_domain_register_invoker (GimpProcedure *procedure,
if (success) if (success)
{ {
PlugIn *plug_in = gimp->plug_in_manager->current_plug_in; GimpPlugIn *plug_in = gimp->plug_in_manager->current_plug_in;
if (plug_in && plug_in->call_mode == GIMP_PLUG_IN_CALL_QUERY) if (plug_in && plug_in->call_mode == GIMP_PLUG_IN_CALL_QUERY)
{ {
...@@ -133,7 +133,7 @@ plugin_help_register_invoker (GimpProcedure *procedure, ...@@ -133,7 +133,7 @@ plugin_help_register_invoker (GimpProcedure *procedure,
if (success) if (success)
{ {
PlugIn *plug_in = gimp->plug_in_manager->current_plug_in; GimpPlugIn *plug_in = gimp->plug_in_manager->current_plug_in;
if (plug_in && plug_in->call_mode == GIMP_PLUG_IN_CALL_QUERY) if (plug_in && plug_in->call_mode == GIMP_PLUG_IN_CALL_QUERY)
{ {
...@@ -163,12 +163,12 @@ plugin_menu_register_invoker (GimpProcedure *procedure, ...@@ -163,12 +163,12 @@ plugin_menu_register_invoker (GimpProcedure *procedure,
if (success) if (success)
{ {
PlugIn *plug_in = gimp->plug_in_manager->current_plug_in; GimpPlugIn *plug_in = gimp->plug_in_manager->current_plug_in;
if (plug_in) if (plug_in)
{ {
gchar *canonical = gimp_canonicalize_identifier (procedure_name); gchar *canonical = gimp_canonicalize_identifier (procedure_name);
success = plug_in_menu_register (plug_in, canonical, menu_path); success = gimp_plug_in_menu_register (plug_in, canonical, menu_path);
g_free (canonical); g_free (canonical);
} }
else else
...@@ -196,7 +196,7 @@ plugin_menu_branch_register_invoker (GimpProcedure *procedure, ...@@ -196,7 +196,7 @@ plugin_menu_branch_register_invoker (GimpProcedure *procedure,
if (success) if (success)
{ {
PlugIn *plug_in = gimp->plug_in_manager->current_plug_in; GimpPlugIn *plug_in = gimp->plug_in_manager->current_plug_in;
if (plug_in) if (plug_in)
{ {
...@@ -230,7 +230,7 @@ plugin_icon_register_invoker (GimpProcedure *procedure, ...@@ -230,7 +230,7 @@ plugin_icon_register_invoker (GimpProcedure *procedure,
if (success) if (success)
{ {
PlugIn *plug_in = gimp->plug_in_manager->current_plug_in; GimpPlugIn *plug_in = gimp->plug_in_manager->current_plug_in;
if (plug_in && plug_in->call_mode == GIMP_PLUG_IN_CALL_QUERY) if (plug_in && plug_in->call_mode == GIMP_PLUG_IN_CALL_QUERY)
{ {
......
...@@ -29,9 +29,9 @@ ...@@ -29,9 +29,9 @@
#include "core/gimpparamspecs.h" #include "core/gimpparamspecs.h"
#include "core/gimp.h" #include "core/gimp.h"
#include "plug-in/gimpplugin-progress.h"
#include "plug-in/gimpplugin.h"
#include "plug-in/gimppluginmanager.h" #include "plug-in/gimppluginmanager.h"
#include "plug-in/plug-in-progress.h"
#include "plug-in/plug-in.h"
static GValueArray * static GValueArray *
...@@ -50,12 +50,12 @@ progress_init_invoker (GimpProcedure *procedure, ...@@ -50,12 +50,12 @@ progress_init_invoker (GimpProcedure *procedure,
if (success) if (success)
{ {
PlugIn *plug_in = gimp->plug_in_manager->current_plug_in; GimpPlugIn *plug_in = gimp->plug_in_manager->current_plug_in;
if (plug_in && plug_in->open) if (plug_in && plug_in->open)
{ {
if (! gimp->no_interface) if (! gimp->no_interface)
plug_in_progress_start (plug_in, message, gdisplay); gimp_plug_in_progress_start (plug_in, message, gdisplay);
} }
else else
success = FALSE; success = FALSE;
...@@ -78,12 +78,12 @@ progress_update_invoker (GimpProcedure *procedure, ...@@ -78,12 +78,12 @@ progress_update_invoker (GimpProcedure *procedure,
if (success) if (success)
{ {
PlugIn *plug_in = gimp->plug_in_manager->current_plug_in; GimpPlugIn *plug_in = gimp->plug_in_manager->current_plug_in;
if (plug_in && plug_in->open) if (plug_in && plug_in->open)
{ {
if (! gimp->no_interface) if (! gimp->no_interface)
plug_in_progress_set_value (plug_in, percentage); gimp_plug_in_progress_set_value (plug_in, percentage);
} }
else else
success = FALSE; success = FALSE;
...@@ -100,12 +100,12 @@ progress_pulse_invoker (GimpProcedure *procedure, ...@@ -100,12 +100,12 @@ progress_pulse_invoker (GimpProcedure *procedure,
const GValueArray *args) const GValueArray *args)
{ {
gboolean success = TRUE; gboolean success = TRUE;
PlugIn *plug_in = gimp->plug_in_manager->current_plug_in; GimpPlugIn *plug_in = gimp->plug_in_manager->current_plug_in;
if (plug_in && plug_in->open) if (plug_in && plug_in->open)
{ {
if (! gimp->no_interface) if (! gimp->no_interface)
plug_in_progress_pulse (plug_in); gimp_plug_in_progress_pulse (plug_in);
} }
else else
success = FALSE; success = FALSE;
...@@ -127,12 +127,12 @@ progress_set_text_invoker (GimpProcedure *procedure, ...@@ -127,12 +127,12 @@ progress_set_text_invoker (GimpProcedure *procedure,
if (success) if (success)
{ {
PlugIn *plug_in = gimp->plug_in_manager->current_plug_in; GimpPlugIn *plug_in = gimp->plug_in_manager->current_plug_in;
if (plug_in && plug_in->open) if (plug_in && plug_in->open)
{ {
if (! gimp->no_interface) if (! gimp->no_interface)
plug_in_progress_set_text (plug_in, message); gimp_plug_in_progress_set_text (plug_in, message);
} }
else else
success = FALSE; success = FALSE;
...@@ -152,12 +152,12 @@ progress_get_window_handle_invoker (GimpProcedure *procedure, ...@@ -152,12 +152,12 @@ progress_get_window_handle_invoker (GimpProcedure *procedure,
GValueArray *return_vals; GValueArray *return_vals;
gint32 window = 0; gint32 window = 0;
PlugIn *plug_in = gimp->plug_in_manager->current_plug_in; GimpPlugIn *plug_in = gimp->plug_in_manager->current_plug_in;
if (plug_in && plug_in->open) if (plug_in && plug_in->open)
{ {
if (! gimp->no_interface) if (! gimp->no_interface)
window = plug_in_progress_get_window (plug_in); window = gimp_plug_in_progress_get_window (plug_in);
} }
else else
success = FALSE; success = FALSE;
...@@ -184,10 +184,10 @@ progress_install_invoker (GimpProcedure *procedure, ...@@ -184,10 +184,10 @@ progress_install_invoker (GimpProcedure *procedure,
if (success) if (success)
{ {
PlugIn *plug_in = gimp->plug_in_manager->current_plug_in; GimpPlugIn *plug_in = gimp->plug_in_manager->current_plug_in;
if (plug_in && plug_in->open) if (plug_in && plug_in->open)
success = plug_in_progress_install (plug_in, progress_callback); success = gimp_plug_in_progress_install (plug_in, progress_callback);
else else
success = FALSE; success = FALSE;
} }
...@@ -209,10 +209,10 @@ progress_uninstall_invoker (GimpProcedure *procedure, ...@@ -209,10 +209,10 @@ progress_uninstall_invoker (GimpProcedure *procedure,
if (success) if (success)
{ {
PlugIn *plug_in = gimp->plug_in_manager->current_plug_in; GimpPlugIn *plug_in = gimp->plug_in_manager->current_plug_in;
if (plug_in && plug_in->open) if (plug_in && plug_in->open)
success = plug_in_progress_uninstall (plug_in, progress_callback); success = gimp_plug_in_progress_uninstall (plug_in, progress_callback);
else else
success = FALSE; success = FALSE;
} }
...@@ -234,10 +234,10 @@ progress_cancel_invoker (GimpProcedure *procedure, ...@@ -234,10 +234,10 @@ progress_cancel_invoker (GimpProcedure *procedure,
if (success) if (success)
{ {
PlugIn *plug_in = gimp->plug_in_manager->current_plug_in; GimpPlugIn *plug_in = gimp->plug_in_manager->current_plug_in;
if (plug_in && plug_in->open) if (plug_in && plug_in->open)
success = plug_in_progress_cancel (plug_in, progress_callback); success = gimp_plug_in_progress_cancel (plug_in, progress_callback);
else else
success = FALSE; success = FALSE;
} }
......
...@@ -31,8 +31,8 @@ ...@@ -31,8 +31,8 @@
#include "core/gimp.h" #include "core/gimp.h"
#include "core/gimpimage-undo.h" #include "core/gimpimage-undo.h"
#include "core/gimpimage.h" #include "core/gimpimage.h"
#include "plug-in/gimpplugin.h"
#include "plug-in/gimppluginmanager.h" #include "plug-in/gimppluginmanager.h"
#include "plug-in/plug-in.h"
static GValueArray * static GValueArray *
...@@ -49,11 +49,11 @@ image_undo_group_start_invoker (GimpProcedure *procedure, ...@@ -49,11 +49,11 @@ image_undo_group_start_invoker (GimpProcedure *procedure,
if (success) if (success)
{ {
PlugIn *plug_in = gimp->plug_in_manager->current_plug_in; GimpPlugIn *plug_in = gimp->plug_in_manager->current_plug_in;
gchar *undo_desc = NULL; gchar *undo_desc = NULL;
if (plug_in) if (plug_in)
undo_desc = plug_in_get_undo_desc (plug_in); undo_desc = gimp_plug_in_get_undo_desc (plug_in);
gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_MISC, undo_desc); gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_MISC, undo_desc);
......
...@@ -25,6 +25,14 @@ libappplug_in_a_SOURCES = \ ...@@ -25,6 +25,14 @@ libappplug_in_a_SOURCES = \
gimpinterpreterdb.h \ gimpinterpreterdb.h \
gimpplugindebug.c \ gimpplugindebug.c \
gimpplugindebug.h \ gimpplugindebug.h \
gimpplugin.c \
gimpplugin.h \
gimpplugin-context.c \
gimpplugin-context.h \
gimpplugin-message.c \
gimpplugin-message.h \
gimpplugin-progress.c \
gimpplugin-progress.h \
gimppluginmanager.c \ gimppluginmanager.c \
gimppluginmanager.h \ gimppluginmanager.h \
gimppluginmanager-call.c \ gimppluginmanager-call.c \
...@@ -41,23 +49,15 @@ libappplug_in_a_SOURCES = \ ...@@ -41,23 +49,15 @@ libappplug_in_a_SOURCES = \
gimppluginmanager-menu-branch.h \ gimppluginmanager-menu-branch.h \
gimppluginmanager-query.c \ gimppluginmanager-query.c \
gimppluginmanager-query.h \ gimppluginmanager-query.h \
gimppluginprocframe.c \
gimppluginprocframe.h \
gimppluginshm.c \ gimppluginshm.c \
gimppluginshm.h \ gimppluginshm.h \
\ \
plug-in.c \
plug-in.h \
plug-in-context.c \
plug-in-context.h \
plug-in-def.c \ plug-in-def.c \
plug-in-def.h \ plug-in-def.h \
plug-in-message.c \
plug-in-message.h \
plug-in-params.c \ plug-in-params.c \
plug-in-params.h \ plug-in-params.h \
plug-in-proc-frame.c \
plug-in-proc-frame.h \
plug-in-progress.c \
plug-in-progress.h \
plug-in-rc.c \ plug-in-rc.c \
plug-in-rc.h plug-in-rc.h
......
/* The GIMP -- an image manipulation program /* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis * Copyright (C) 1995 Spencer Kimball and Peter Mattis
* *
* gimpplugin-context.c
*
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
...@@ -25,21 +27,21 @@ ...@@ -25,21 +27,21 @@
#include "core/gimp.h" #include "core/gimp.h"
#include "core/gimpcontext.h" #include "core/gimpcontext.h"
#include "gimpplugin.h"
#include "gimpplugin-context.h"
#include "gimppluginmanager.h" #include "gimppluginmanager.h"
#include "plug-in.h"
#include "plug-in-context.h"
gboolean gboolean
plug_in_context_push (PlugIn *plug_in) gimp_plug_in_context_push (GimpPlugIn *plug_in)
{ {
PlugInProcFrame *proc_frame; GimpPlugInProcFrame *proc_frame;
GimpContext *parent; GimpContext *parent;
GimpContext *context; GimpContext *context;
g_return_val_if_fail (plug_in != NULL, FALSE); g_return_val_if_fail (GIMP_IS_PLUG_IN (plug_in), FALSE);
proc_frame = plug_in_get_proc_frame (plug_in); proc_frame = gimp_plug_in_get_proc_frame (plug_in);
if (proc_frame->context_stack) if (proc_frame->context_stack)
parent = proc_frame->context_stack->data; parent = proc_frame->context_stack->data;
...@@ -56,13 +58,13 @@ plug_in_context_push (PlugIn *plug_in) ...@@ -56,13 +58,13 @@ plug_in_context_push (PlugIn *plug_in)
} }
gboolean gboolean
plug_in_context_pop (PlugIn *plug_in) gimp_plug_in_context_pop (GimpPlugIn *plug_in)
{ {
PlugInProcFrame *proc_frame; GimpPlugInProcFrame *proc_frame;
g_return_val_if_fail (plug_in != NULL, FALSE); g_return_val_if_fail (GIMP_IS_PLUG_IN (plug_in), FALSE);
proc_frame = plug_in_get_proc_frame (plug_in); proc_frame = gimp_plug_in_get_proc_frame (plug_in);
if (proc_frame->context_stack) if (proc_frame->context_stack)
{ {
......
/* The GIMP -- an image manipulation program /* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis * Copyright (C) 1995 Spencer Kimball and Peter Mattis
* *
* plug-in-context.h