mirror of https://github.com/GNOME/gimp.git
Removed any remaining GUI dependency from the PDB wrappers:
2004-07-10 Michael Natterer <mitch@gimp.org> Removed any remaining GUI dependency from the PDB wrappers: * app/core/gimp.[ch]: added vtable entries for the display and help stuff. * app/widgets/gimphelp.[ch]: renamed gimp_help() to gimp_help_show(). * app/gui/gui-vtable.c: implement the new display and help vtable entries. * tools/pdbgen/pdb.pl * tools/pdbgen/pdb/display.pdb * tools/pdbgen/pdb/help.pdb: use the new functions of the Gimp object instead of using stuff from display/ and widgets/. * tools/pdbgen/app.pl: removed bad hacks which enabled including stuff from gui/, display/ and widgets/. * app/Makefile.am: link widgets-enums.o, display-enums.o and gimpdisplayoptions.o into the gimp-console binary because they are needed for the config system and don't depend on any GUI stuff. * app/pdb/Makefile.am: s/GTK_CFLAGS/GDK_PIXBUF_CFLAGS/ * app/pdb/display_cmds.c * app/pdb/help_cmds.c: regenerated.
This commit is contained in:
parent
3a5ed7075c
commit
2176afbbbb
30
ChangeLog
30
ChangeLog
|
@ -1,3 +1,33 @@
|
|||
2004-07-10 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
Removed any remaining GUI dependency from the PDB wrappers:
|
||||
|
||||
* app/core/gimp.[ch]: added vtable entries for the display and
|
||||
help stuff.
|
||||
|
||||
* app/widgets/gimphelp.[ch]: renamed gimp_help() to
|
||||
gimp_help_show().
|
||||
|
||||
* app/gui/gui-vtable.c: implement the new display and help vtable
|
||||
entries.
|
||||
|
||||
* tools/pdbgen/pdb.pl
|
||||
* tools/pdbgen/pdb/display.pdb
|
||||
* tools/pdbgen/pdb/help.pdb: use the new functions of the Gimp
|
||||
object instead of using stuff from display/ and widgets/.
|
||||
|
||||
* tools/pdbgen/app.pl: removed bad hacks which enabled including
|
||||
stuff from gui/, display/ and widgets/.
|
||||
|
||||
* app/Makefile.am: link widgets-enums.o, display-enums.o and
|
||||
gimpdisplayoptions.o into the gimp-console binary because they are
|
||||
needed for the config system and don't depend on any GUI stuff.
|
||||
|
||||
* app/pdb/Makefile.am: s/GTK_CFLAGS/GDK_PIXBUF_CFLAGS/
|
||||
|
||||
* app/pdb/display_cmds.c
|
||||
* app/pdb/help_cmds.c: regenerated.
|
||||
|
||||
2004-07-10 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/gui/quit-dialog.c (quit_dialog_new): let the labels line-wrap.
|
||||
|
|
|
@ -138,6 +138,9 @@ gimp_console_2_1_LDFLAGS = $(gimp_2_1_LDFLAGS)
|
|||
|
||||
gimp_console_2_1_LDADD = \
|
||||
config/libappconfig.a \
|
||||
widgets/widgets-enums.o \
|
||||
display/display-enums.o \
|
||||
display/gimpdisplayoptions.o \
|
||||
pdb/libapppdb.a \
|
||||
core/libappcore.a \
|
||||
paint/libapppaint.a \
|
||||
|
|
145
app/core/gimp.c
145
app/core/gimp.c
|
@ -210,25 +210,30 @@ gimp_init (Gimp *gimp)
|
|||
gimp->stack_trace_mode = GIMP_STACK_TRACE_NEVER;
|
||||
gimp->pdb_compat_mode = GIMP_PDB_COMPAT_OFF;
|
||||
|
||||
gimp->gui_threads_enter_func = NULL;
|
||||
gimp->gui_threads_leave_func = NULL;
|
||||
gimp->gui_create_display_func = NULL;
|
||||
gimp->gui_set_busy_func = NULL;
|
||||
gimp->gui_unset_busy_func = NULL;
|
||||
gimp->gui_message_func = NULL;
|
||||
gimp->gui_menus_init_func = NULL;
|
||||
gimp->gui_menus_create_func = NULL;
|
||||
gimp->gui_menus_delete_func = NULL;
|
||||
gimp->gui_progress_start_func = NULL;
|
||||
gimp->gui_progress_restart_func = NULL;
|
||||
gimp->gui_progress_update_func = NULL;
|
||||
gimp->gui_progress_end_func = NULL;
|
||||
gimp->gui_get_program_class_func = NULL;
|
||||
gimp->gui_get_display_name_func = NULL;
|
||||
gimp->gui_get_theme_dir_func = NULL;
|
||||
gimp->gui_pdb_dialog_set_func = NULL;
|
||||
gimp->gui_pdb_dialog_close_func = NULL;
|
||||
gimp->gui_pdb_dialogs_check_func = NULL;
|
||||
gimp->gui_threads_enter_func = NULL;
|
||||
gimp->gui_threads_leave_func = NULL;
|
||||
gimp->gui_get_display_by_id_func = NULL;
|
||||
gimp->gui_get_display_id_func = NULL;
|
||||
gimp->gui_create_display_func = NULL;
|
||||
gimp->gui_delete_display_func = NULL;
|
||||
gimp->gui_reconnect_displays_func = NULL;
|
||||
gimp->gui_set_busy_func = NULL;
|
||||
gimp->gui_unset_busy_func = NULL;
|
||||
gimp->gui_message_func = NULL;
|
||||
gimp->gui_help_func = NULL;
|
||||
gimp->gui_menus_init_func = NULL;
|
||||
gimp->gui_menus_create_func = NULL;
|
||||
gimp->gui_menus_delete_func = NULL;
|
||||
gimp->gui_progress_start_func = NULL;
|
||||
gimp->gui_progress_restart_func = NULL;
|
||||
gimp->gui_progress_update_func = NULL;
|
||||
gimp->gui_progress_end_func = NULL;
|
||||
gimp->gui_get_program_class_func = NULL;
|
||||
gimp->gui_get_display_name_func = NULL;
|
||||
gimp->gui_get_theme_dir_func = NULL;
|
||||
gimp->gui_pdb_dialog_set_func = NULL;
|
||||
gimp->gui_pdb_dialog_close_func = NULL;
|
||||
gimp->gui_pdb_dialogs_check_func = NULL;
|
||||
|
||||
gimp->busy = 0;
|
||||
gimp->busy_idle_id = 0;
|
||||
|
@ -957,6 +962,76 @@ gimp_threads_leave (Gimp *gimp)
|
|||
gimp->gui_threads_leave_func (gimp);
|
||||
}
|
||||
|
||||
GimpObject *
|
||||
gimp_get_display_by_ID (Gimp *gimp,
|
||||
gint ID)
|
||||
{
|
||||
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
|
||||
|
||||
if (gimp->gui_get_display_by_id_func)
|
||||
return gimp->gui_get_display_by_id_func (gimp, ID);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
gint
|
||||
gimp_get_display_ID (Gimp *gimp,
|
||||
GimpObject *display)
|
||||
{
|
||||
g_return_val_if_fail (GIMP_IS_GIMP (gimp), -1);
|
||||
g_return_val_if_fail (GIMP_IS_OBJECT (display), -1);
|
||||
|
||||
if (gimp->gui_get_display_id_func)
|
||||
return gimp->gui_get_display_id_func (display);
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
GimpObject *
|
||||
gimp_create_display (Gimp *gimp,
|
||||
GimpImage *gimage,
|
||||
GimpUnit unit,
|
||||
gdouble scale)
|
||||
{
|
||||
GimpObject *display = NULL;
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
|
||||
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), NULL);
|
||||
|
||||
if (gimp->gui_create_display_func)
|
||||
{
|
||||
display = gimp->gui_create_display_func (gimage, unit, scale);
|
||||
|
||||
gimp_container_add (gimp->displays, display);
|
||||
}
|
||||
|
||||
return display;
|
||||
}
|
||||
|
||||
void
|
||||
gimp_delete_display (Gimp *gimp,
|
||||
GimpObject *display)
|
||||
{
|
||||
g_return_if_fail (GIMP_IS_GIMP (gimp));
|
||||
g_return_if_fail (GIMP_IS_OBJECT (display));
|
||||
|
||||
if (gimp->gui_delete_display_func)
|
||||
gimp->gui_delete_display_func (display);
|
||||
}
|
||||
|
||||
void
|
||||
gimp_reconnect_displays (Gimp *gimp,
|
||||
GimpImage *old_image,
|
||||
GimpImage *new_image)
|
||||
{
|
||||
g_return_if_fail (GIMP_IS_GIMP (gimp));
|
||||
g_return_if_fail (GIMP_IS_IMAGE (old_image));
|
||||
g_return_if_fail (GIMP_IS_IMAGE (new_image));
|
||||
|
||||
if (gimp->gui_reconnect_displays_func)
|
||||
gimp->gui_reconnect_displays_func (gimp, old_image, new_image);
|
||||
}
|
||||
|
||||
void
|
||||
gimp_set_busy (Gimp *gimp)
|
||||
{
|
||||
|
@ -1043,6 +1118,17 @@ gimp_message (Gimp *gimp,
|
|||
g_printerr ("%s: %s\n\n", domain ? domain : _("GIMP"), message);
|
||||
}
|
||||
|
||||
void
|
||||
gimp_help (Gimp *gimp,
|
||||
const gchar *help_domain,
|
||||
const gchar *help_id)
|
||||
{
|
||||
g_return_if_fail (GIMP_IS_GIMP (gimp));
|
||||
|
||||
if (gimp->gui_help_func)
|
||||
gimp->gui_help_func (gimp, help_domain, help_id);
|
||||
}
|
||||
|
||||
void
|
||||
gimp_menus_init (Gimp *gimp,
|
||||
GSList *plug_in_defs,
|
||||
|
@ -1290,27 +1376,6 @@ gimp_create_image (Gimp *gimp,
|
|||
return gimage;
|
||||
}
|
||||
|
||||
GimpObject *
|
||||
gimp_create_display (Gimp *gimp,
|
||||
GimpImage *gimage,
|
||||
GimpUnit unit,
|
||||
gdouble scale)
|
||||
{
|
||||
GimpObject *display = NULL;
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
|
||||
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), NULL);
|
||||
|
||||
if (gimp->gui_create_display_func)
|
||||
{
|
||||
display = gimp->gui_create_display_func (gimage, unit, scale);
|
||||
|
||||
gimp_container_add (gimp->displays, display);
|
||||
}
|
||||
|
||||
return display;
|
||||
}
|
||||
|
||||
void
|
||||
gimp_set_default_context (Gimp *gimp,
|
||||
GimpContext *context)
|
||||
|
|
|
@ -25,14 +25,24 @@
|
|||
|
||||
typedef void (* GimpThreadEnterFunc) (Gimp *gimp);
|
||||
typedef void (* GimpThreadLeaveFunc) (Gimp *gimp);
|
||||
typedef GimpObject * (* GimpGetDisplayByIDFunc) (Gimp *gimp,
|
||||
gint ID);
|
||||
typedef gint (* GimpGetDisplayIDFunc) (GimpObject *display);
|
||||
typedef GimpObject * (* GimpCreateDisplayFunc) (GimpImage *gimage,
|
||||
GimpUnit unit,
|
||||
gdouble scale);
|
||||
typedef void (* GimpDeleteDisplayFunc) (GimpObject *display);
|
||||
typedef void (* GimpReconnDisplaysFunc) (Gimp *gimp,
|
||||
GimpImage *old_image,
|
||||
GimpImage *new_image);
|
||||
typedef void (* GimpSetBusyFunc) (Gimp *gimp);
|
||||
typedef void (* GimpUnsetBusyFunc) (Gimp *gimp);
|
||||
typedef void (* GimpMessageFunc) (Gimp *gimp,
|
||||
const gchar *domain,
|
||||
const gchar *message);
|
||||
typedef void (* GimpCoreHelpFunc) (Gimp *gimp,
|
||||
const gchar *help_domain,
|
||||
const gchar *help_id);
|
||||
typedef void (* GimpMenusInitFunc) (Gimp *gimp,
|
||||
GSList *plug_in_defs,
|
||||
const gchar *std_domain);
|
||||
|
@ -109,10 +119,15 @@ struct _Gimp
|
|||
|
||||
GimpThreadEnterFunc gui_threads_enter_func;
|
||||
GimpThreadLeaveFunc gui_threads_leave_func;
|
||||
GimpGetDisplayByIDFunc gui_get_display_by_id_func;
|
||||
GimpGetDisplayIDFunc gui_get_display_id_func;
|
||||
GimpCreateDisplayFunc gui_create_display_func;
|
||||
GimpDeleteDisplayFunc gui_delete_display_func;
|
||||
GimpReconnDisplaysFunc gui_reconnect_displays_func;
|
||||
GimpSetBusyFunc gui_set_busy_func;
|
||||
GimpUnsetBusyFunc gui_unset_busy_func;
|
||||
GimpMessageFunc gui_message_func;
|
||||
GimpCoreHelpFunc gui_help_func;
|
||||
GimpMenusInitFunc gui_menus_init_func;
|
||||
GimpMenusCreateFunc gui_menus_create_func;
|
||||
GimpMenusDeleteFunc gui_menus_delete_func;
|
||||
|
@ -251,6 +266,20 @@ void gimp_set_global_buffer (Gimp *gimp,
|
|||
void gimp_threads_enter (Gimp *gimp);
|
||||
void gimp_threads_leave (Gimp *gimp);
|
||||
|
||||
GimpObject * gimp_get_display_by_ID (Gimp *gimp,
|
||||
gint ID);
|
||||
gint gimp_get_display_ID (Gimp *gimp,
|
||||
GimpObject *display);
|
||||
GimpObject * gimp_create_display (Gimp *gimp,
|
||||
GimpImage *gimage,
|
||||
GimpUnit unit,
|
||||
gdouble scale);
|
||||
void gimp_delete_display (Gimp *gimp,
|
||||
GimpObject *display);
|
||||
void gimp_reconnect_displays (Gimp *gimp,
|
||||
GimpImage *old_image,
|
||||
GimpImage *new_image);
|
||||
|
||||
void gimp_set_busy (Gimp *gimp);
|
||||
void gimp_set_busy_until_idle (Gimp *gimp);
|
||||
void gimp_unset_busy (Gimp *gimp);
|
||||
|
@ -258,6 +287,9 @@ void gimp_unset_busy (Gimp *gimp);
|
|||
void gimp_message (Gimp *gimp,
|
||||
const gchar *domain,
|
||||
const gchar *message);
|
||||
void gimp_help (Gimp *gimp,
|
||||
const gchar *help_domain,
|
||||
const gchar *help_id);
|
||||
void gimp_menus_init (Gimp *gimp,
|
||||
GSList *plug_in_defs,
|
||||
const gchar *std_plugins_domain);
|
||||
|
@ -308,11 +340,6 @@ GimpImage * gimp_create_image (Gimp *gimp,
|
|||
GimpImageBaseType type,
|
||||
gboolean attach_comment);
|
||||
|
||||
GimpObject * gimp_create_display (Gimp *gimp,
|
||||
GimpImage *gimage,
|
||||
GimpUnit unit,
|
||||
gdouble scale);
|
||||
|
||||
void gimp_set_default_context (Gimp *gimp,
|
||||
GimpContext *context);
|
||||
GimpContext * gimp_get_default_context (Gimp *gimp);
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
#include "widgets/gimperrorconsole.h"
|
||||
#include "widgets/gimpfontselect.h"
|
||||
#include "widgets/gimpgradientselect.h"
|
||||
#include "widgets/gimphelp.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpmenufactory.h"
|
||||
#include "widgets/gimppaletteselect.h"
|
||||
|
@ -75,14 +76,24 @@
|
|||
|
||||
static void gui_threads_enter (Gimp *gimp);
|
||||
static void gui_threads_leave (Gimp *gimp);
|
||||
static GimpObject * gui_get_display_by_ID (Gimp *gimp,
|
||||
gint ID);
|
||||
static gint gui_get_display_ID (GimpObject *display);
|
||||
static GimpObject * gui_create_display (GimpImage *gimage,
|
||||
GimpUnit unit,
|
||||
gdouble scale);
|
||||
static void gui_delete_display (GimpObject *display);
|
||||
static void gui_reconnect_displays (Gimp *gimp,
|
||||
GimpImage *old_image,
|
||||
GimpImage *new_image);
|
||||
static void gui_set_busy (Gimp *gimp);
|
||||
static void gui_unset_busy (Gimp *gimp);
|
||||
static void gui_message (Gimp *gimp,
|
||||
const gchar *domain,
|
||||
const gchar *message);
|
||||
static GimpObject * gui_create_display (GimpImage *gimage,
|
||||
GimpUnit unit,
|
||||
gdouble scale);
|
||||
static void gui_help (Gimp *gimp,
|
||||
const gchar *help_domain,
|
||||
const gchar *help_id);
|
||||
static void gui_menus_init (Gimp *gimp,
|
||||
GSList *plug_in_defs,
|
||||
const gchar *plugins_domain);
|
||||
|
@ -135,26 +146,31 @@ gui_vtable_init (Gimp *gimp)
|
|||
{
|
||||
g_return_if_fail (GIMP_IS_GIMP (gimp));
|
||||
|
||||
gimp->gui_threads_enter_func = gui_threads_enter;
|
||||
gimp->gui_threads_leave_func = gui_threads_leave;
|
||||
gimp->gui_set_busy_func = gui_set_busy;
|
||||
gimp->gui_unset_busy_func = gui_unset_busy;
|
||||
gimp->gui_message_func = gui_message;
|
||||
gimp->gui_create_display_func = gui_create_display;
|
||||
gimp->gui_menus_init_func = gui_menus_init;
|
||||
gimp->gui_menus_create_func = gui_menus_create_entry;
|
||||
gimp->gui_menus_delete_func = gui_menus_delete_entry;
|
||||
gimp->gui_progress_start_func = gui_start_progress;
|
||||
gimp->gui_progress_restart_func = gui_restart_progress;
|
||||
gimp->gui_progress_update_func = gui_update_progress;
|
||||
gimp->gui_progress_end_func = gui_end_progress;
|
||||
gimp->gui_get_program_class_func = gui_get_program_class;
|
||||
gimp->gui_get_display_name_func = gui_get_display_name;
|
||||
gimp->gui_get_theme_dir_func = gui_get_theme_dir;
|
||||
gimp->gui_pdb_dialog_new_func = gui_pdb_dialog_new;
|
||||
gimp->gui_pdb_dialog_set_func = gui_pdb_dialog_set;
|
||||
gimp->gui_pdb_dialog_close_func = gui_pdb_dialog_close;
|
||||
gimp->gui_pdb_dialogs_check_func = gui_pdb_dialogs_check;
|
||||
gimp->gui_threads_enter_func = gui_threads_enter;
|
||||
gimp->gui_threads_leave_func = gui_threads_leave;
|
||||
gimp->gui_get_display_by_id_func = gui_get_display_by_ID;
|
||||
gimp->gui_get_display_id_func = gui_get_display_ID;
|
||||
gimp->gui_create_display_func = gui_create_display;
|
||||
gimp->gui_delete_display_func = gui_delete_display;
|
||||
gimp->gui_reconnect_displays_func = gui_reconnect_displays;
|
||||
gimp->gui_set_busy_func = gui_set_busy;
|
||||
gimp->gui_unset_busy_func = gui_unset_busy;
|
||||
gimp->gui_message_func = gui_message;
|
||||
gimp->gui_help_func = gui_help;
|
||||
gimp->gui_menus_init_func = gui_menus_init;
|
||||
gimp->gui_menus_create_func = gui_menus_create_entry;
|
||||
gimp->gui_menus_delete_func = gui_menus_delete_entry;
|
||||
gimp->gui_progress_start_func = gui_start_progress;
|
||||
gimp->gui_progress_restart_func = gui_restart_progress;
|
||||
gimp->gui_progress_update_func = gui_update_progress;
|
||||
gimp->gui_progress_end_func = gui_end_progress;
|
||||
gimp->gui_get_program_class_func = gui_get_program_class;
|
||||
gimp->gui_get_display_name_func = gui_get_display_name;
|
||||
gimp->gui_get_theme_dir_func = gui_get_theme_dir;
|
||||
gimp->gui_pdb_dialog_new_func = gui_pdb_dialog_new;
|
||||
gimp->gui_pdb_dialog_set_func = gui_pdb_dialog_set;
|
||||
gimp->gui_pdb_dialog_close_func = gui_pdb_dialog_close;
|
||||
gimp->gui_pdb_dialogs_check_func = gui_pdb_dialogs_check;
|
||||
}
|
||||
|
||||
|
||||
|
@ -172,6 +188,58 @@ gui_threads_leave (Gimp *gimp)
|
|||
GDK_THREADS_LEAVE ();
|
||||
}
|
||||
|
||||
static GimpObject *
|
||||
gui_get_display_by_ID (Gimp *gimp,
|
||||
gint ID)
|
||||
{
|
||||
return (GimpObject *) gimp_display_get_by_ID (gimp, ID);
|
||||
}
|
||||
|
||||
static gint
|
||||
gui_get_display_ID (GimpObject *display)
|
||||
{
|
||||
return gimp_display_get_ID (GIMP_DISPLAY (display));
|
||||
}
|
||||
|
||||
static GimpObject *
|
||||
gui_create_display (GimpImage *gimage,
|
||||
GimpUnit unit,
|
||||
gdouble scale)
|
||||
{
|
||||
GimpDisplayShell *shell;
|
||||
GimpDisplay *gdisp;
|
||||
GList *image_managers;
|
||||
|
||||
image_managers = gimp_ui_managers_from_name ("<Image>");
|
||||
|
||||
gdisp = gimp_display_new (gimage, unit, scale,
|
||||
global_menu_factory,
|
||||
|
||||
image_managers->data);
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (gdisp->shell);
|
||||
|
||||
gimp_context_set_display (gimp_get_user_context (gimage->gimp), gdisp);
|
||||
|
||||
gimp_ui_manager_update (shell->menubar_manager, shell);
|
||||
|
||||
return GIMP_OBJECT (gdisp);
|
||||
}
|
||||
|
||||
static void
|
||||
gui_delete_display (GimpObject *display)
|
||||
{
|
||||
gimp_display_delete (GIMP_DISPLAY (display));
|
||||
}
|
||||
|
||||
static void
|
||||
gui_reconnect_displays (Gimp *gimp,
|
||||
GimpImage *old_image,
|
||||
GimpImage *new_image)
|
||||
{
|
||||
gimp_displays_reconnect (gimp, old_image, new_image);
|
||||
}
|
||||
|
||||
static void
|
||||
gui_set_busy (Gimp *gimp)
|
||||
{
|
||||
|
@ -220,29 +288,12 @@ gui_message (Gimp *gimp,
|
|||
gimp_message_box (GIMP_STOCK_WARNING, domain, message, NULL, NULL);
|
||||
}
|
||||
|
||||
static GimpObject *
|
||||
gui_create_display (GimpImage *gimage,
|
||||
GimpUnit unit,
|
||||
gdouble scale)
|
||||
void
|
||||
gui_help (Gimp *gimp,
|
||||
const gchar *help_domain,
|
||||
const gchar *help_id)
|
||||
{
|
||||
GimpDisplayShell *shell;
|
||||
GimpDisplay *gdisp;
|
||||
GList *image_managers;
|
||||
|
||||
image_managers = gimp_ui_managers_from_name ("<Image>");
|
||||
|
||||
gdisp = gimp_display_new (gimage, unit, scale,
|
||||
global_menu_factory,
|
||||
|
||||
image_managers->data);
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (gdisp->shell);
|
||||
|
||||
gimp_context_set_display (gimp_get_user_context (gimage->gimp), gdisp);
|
||||
|
||||
gimp_ui_manager_update (shell->menubar_manager, shell);
|
||||
|
||||
return GIMP_OBJECT (gdisp);
|
||||
gimp_help_show (gimp, help_domain, help_id);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -56,7 +56,7 @@ AM_CPPFLAGS = \
|
|||
INCLUDES = \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_srcdir)/app \
|
||||
$(GTK_CFLAGS) \
|
||||
$(GDK_PIXBUF_CFLAGS) \
|
||||
-I$(includedir)
|
||||
|
||||
EXTRA_DIST = makefile.msc
|
||||
|
|
|
@ -21,19 +21,16 @@
|
|||
#include "config.h"
|
||||
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <glib-object.h>
|
||||
|
||||
#include "libgimpbase/gimpbasetypes.h"
|
||||
|
||||
#include "pdb-types.h"
|
||||
#include "display/display-types.h"
|
||||
#include "procedural_db.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimpcontainer.h"
|
||||
#include "core/gimpimage.h"
|
||||
#include "display/gimpdisplay-foreach.h"
|
||||
#include "display/gimpdisplay.h"
|
||||
|
||||
static ProcRecord display_new_proc;
|
||||
static ProcRecord display_delete_proc;
|
||||
|
@ -57,7 +54,7 @@ display_new_invoker (Gimp *gimp,
|
|||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
GimpImage *gimage;
|
||||
GimpDisplay *display = NULL;
|
||||
GimpObject *display = NULL;
|
||||
|
||||
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
|
||||
if (! GIMP_IS_IMAGE (gimage))
|
||||
|
@ -65,8 +62,7 @@ display_new_invoker (Gimp *gimp,
|
|||
|
||||
if (success)
|
||||
{
|
||||
display = (GimpDisplay *) gimp_create_display (gimp,
|
||||
gimage, GIMP_UNIT_PIXEL, 1.0);
|
||||
display = gimp_create_display (gimp, gimage, GIMP_UNIT_PIXEL, 1.0);
|
||||
|
||||
success = (display != NULL);
|
||||
|
||||
|
@ -78,7 +74,7 @@ display_new_invoker (Gimp *gimp,
|
|||
return_args = procedural_db_return_args (&display_new_proc, success);
|
||||
|
||||
if (success)
|
||||
return_args[1].value.pdb_int = gimp_display_get_ID (display);
|
||||
return_args[1].value.pdb_int = gimp_get_display_ID (gimp, display);
|
||||
|
||||
return return_args;
|
||||
}
|
||||
|
@ -123,14 +119,14 @@ display_delete_invoker (Gimp *gimp,
|
|||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpDisplay *display;
|
||||
GimpObject *display;
|
||||
|
||||
display = gimp_display_get_by_ID (gimp, args[0].value.pdb_int);
|
||||
if (! GIMP_IS_DISPLAY (display))
|
||||
display = gimp_get_display_by_ID (gimp, args[0].value.pdb_int);
|
||||
if (! GIMP_IS_OBJECT (display))
|
||||
success = FALSE;
|
||||
|
||||
if (success)
|
||||
gimp_display_delete (display);
|
||||
gimp_delete_display (gimp, display);
|
||||
|
||||
return procedural_db_return_args (&display_delete_proc, success);
|
||||
}
|
||||
|
@ -203,7 +199,7 @@ displays_reconnect_invoker (Gimp *gimp,
|
|||
success = FALSE;
|
||||
|
||||
if (success)
|
||||
gimp_displays_reconnect (gimp, old_image, new_image);
|
||||
gimp_reconnect_displays (gimp, old_image, new_image);
|
||||
|
||||
return procedural_db_return_args (&displays_reconnect_proc, success);
|
||||
}
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
#include "core/gimp.h"
|
||||
#include "plug-in/plug-in.h"
|
||||
#include "plug-in/plug-ins.h"
|
||||
#include "widgets/gimphelp.h"
|
||||
|
||||
static ProcRecord help_proc;
|
||||
|
||||
|
|
|
@ -75,9 +75,9 @@ static void gimp_help_call (Gimp *gimp,
|
|||
/* public functions */
|
||||
|
||||
void
|
||||
gimp_help (Gimp *gimp,
|
||||
const gchar *help_domain,
|
||||
const gchar *help_id)
|
||||
gimp_help_show (Gimp *gimp,
|
||||
const gchar *help_domain,
|
||||
const gchar *help_id)
|
||||
{
|
||||
GimpGuiConfig *config;
|
||||
|
||||
|
|
|
@ -27,9 +27,9 @@
|
|||
*
|
||||
* there should be no need to use it in the common case
|
||||
*/
|
||||
void gimp_help (Gimp *gimp,
|
||||
const gchar *help_domain,
|
||||
const gchar *help_id);
|
||||
void gimp_help_show (Gimp *gimp,
|
||||
const gchar *help_domain,
|
||||
const gchar *help_id);
|
||||
|
||||
|
||||
#endif /* __GIMP_HELP_H__ */
|
||||
|
|
|
@ -703,29 +703,11 @@ GPL
|
|||
|
||||
foreach $group (@main::groups) {
|
||||
my $out = $out{$group};
|
||||
my $widgets_eek = 0;
|
||||
my $display_eek = 0;
|
||||
my $gui_eek = 0;
|
||||
|
||||
foreach (@{$main::grp{$group}->{headers}}) { $out->{headers}->{$_}++ }
|
||||
delete $out->{headers}->{q/"procedural_db.h"/};
|
||||
delete $out->{headers}->{q/"config.h"/};
|
||||
|
||||
if (exists $out->{headers}->{q|"widgets/widgets-types.h"|}) {
|
||||
$widgets_eek = 1;
|
||||
delete $out->{headers}->{q|"widgets/widgets-types.h"|};
|
||||
}
|
||||
|
||||
if (exists $out->{headers}->{q|"display/display-types.h"|}) {
|
||||
$display_eek = 1;
|
||||
delete $out->{headers}->{q|"display/display-types.h"|};
|
||||
}
|
||||
|
||||
if (exists $out->{headers}->{q|"gui/gui-types.h"|}) {
|
||||
$gui_eek = 1;
|
||||
delete $out->{headers}->{q|"gui/gui-types.h"|};
|
||||
}
|
||||
|
||||
my @headers = sort {
|
||||
my ($x, $y) = ($a, $b);
|
||||
foreach ($x, $y) {
|
||||
|
@ -760,13 +742,7 @@ GPL
|
|||
if ($sys == 0 && !/^</) {
|
||||
$sys = 1;
|
||||
$headers .= "\n";
|
||||
|
||||
if ($widgets_eek == 1 || $display_eek == 1 || $gui_eek == 1) {
|
||||
$headers .= '#include <gtk/gtk.h>';
|
||||
} else {
|
||||
$headers .= '#include <glib-object.h>';
|
||||
}
|
||||
|
||||
$headers .= '#include <glib-object.h>';
|
||||
$headers .= "\n\n";
|
||||
$headers .= '#include "libgimpbase/gimpbasetypes.h"';
|
||||
$headers .= "\n\n";
|
||||
|
@ -786,22 +762,6 @@ GPL
|
|||
|
||||
$headers .= '#include "pdb-types.h"';
|
||||
$headers .= "\n";
|
||||
|
||||
if ($widgets_eek == 1) {
|
||||
$headers .= '#include "widgets/widgets-types.h"';
|
||||
$headers .= "\n";
|
||||
}
|
||||
|
||||
if ($display_eek == 1) {
|
||||
$headers .= '#include "display/display-types.h"';
|
||||
$headers .= "\n";
|
||||
}
|
||||
|
||||
if ($gui_eek == 1) {
|
||||
$headers .= '#include "gui/gui-types.h"';
|
||||
$headers .= "\n";
|
||||
}
|
||||
|
||||
$headers .= '#include "procedural_db.h"';
|
||||
$headers .= "\n\n";
|
||||
}
|
||||
|
|
|
@ -36,11 +36,10 @@ package Gimp::CodeGen::pdb;
|
|||
headers => [ qw("libgimpcolor/gimpcolor.h") ],
|
||||
struct => 1 },
|
||||
display => { name => 'DISPLAY',
|
||||
type => 'GimpDisplay *',
|
||||
headers => [ qw("display/gimpdisplay.h") ],
|
||||
id_func => 'gimp_display_get_by_ID',
|
||||
id_ret_func => 'gimp_display_get_ID ($var)',
|
||||
check_func => 'GIMP_IS_DISPLAY ($var)' },
|
||||
type => 'GimpObject *',
|
||||
id_func => 'gimp_get_display_by_ID',
|
||||
id_ret_func => 'gimp_get_display_ID (gimp, $var)',
|
||||
check_func => 'GIMP_IS_OBJECT ($var)' },
|
||||
image => { name => 'IMAGE',
|
||||
type => 'GimpImage *',
|
||||
headers => [ qw("core/gimpimage.h") ],
|
||||
|
|
|
@ -42,8 +42,7 @@ HELP
|
|||
%invoke = (
|
||||
code => <<'CODE'
|
||||
{
|
||||
display = (GimpDisplay *) gimp_create_display (gimp,
|
||||
gimage, GIMP_UNIT_PIXEL, 1.0);
|
||||
display = gimp_create_display (gimp, gimage, GIMP_UNIT_PIXEL, 1.0);
|
||||
|
||||
success = (display != NULL);
|
||||
|
||||
|
@ -70,7 +69,7 @@ HELP
|
|||
desc => 'The display to delete' }
|
||||
);
|
||||
|
||||
%invoke = ( code => 'gimp_display_delete (display);' );
|
||||
%invoke = ( code => 'gimp_delete_display (gimp, display);' );
|
||||
}
|
||||
|
||||
sub displays_flush {
|
||||
|
@ -110,11 +109,10 @@ HELP
|
|||
desc => 'The new image (must not have a display)' }
|
||||
);
|
||||
|
||||
%invoke = ( code => 'gimp_displays_reconnect (gimp, old_image, new_image);' );
|
||||
%invoke = ( code => 'gimp_reconnect_displays (gimp, old_image, new_image);' );
|
||||
}
|
||||
|
||||
@headers = qw("core/gimp.h" "display/display-types.h" "display/gimpdisplay.h"
|
||||
"display/gimpdisplay-foreach.h");
|
||||
@headers = qw("core/gimp.h");
|
||||
|
||||
@procs = qw(display_new display_delete displays_flush displays_reconnect);
|
||||
%exports = (app => [@procs], lib => [@procs]);
|
||||
|
|
|
@ -52,8 +52,7 @@ CODE
|
|||
);
|
||||
}
|
||||
|
||||
@headers = qw("core/gimp.h" "plug-in/plug-in.h" "plug-in/plug-ins.h"
|
||||
"widgets/gimphelp.h");
|
||||
@headers = qw("core/gimp.h" "plug-in/plug-in.h" "plug-in/plug-ins.h");
|
||||
|
||||
@procs = qw(help);
|
||||
%exports = (app => [@procs], lib => [@procs]);
|
||||
|
|
Loading…
Reference in New Issue