diff --git a/ChangeLog b/ChangeLog index fdc135b446..dff620a346 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +Sat Dec 25 23:15:46 PST 1999 Manish Singh + + * Makefile.am: added spec file to EXTRA_DIST + + * docs/Makefile.am: added undo.txt to EXTRA_DIST + + * app/interface.c: removed the DODGY warning, doesn't look dodgy to me + + * libgimp/*.h: missed an s/Library/Lesser/ + + * tools/pdbgen/*: lots of work on the libgimp portion + 1999-12-26 Shirasaki Yasuhiro * plug-ins/common/gbr.c diff --git a/Makefile.am b/Makefile.am index 4d854f4ddf..ba0e706b13 100644 --- a/Makefile.am +++ b/Makefile.am @@ -84,7 +84,8 @@ EXTRA_DIST = \ gtkrc.forest2 \ gimp.m4 \ gimprc.win32 \ - config.h.win32 + config.h.win32 \ + gimp.spec gimpdata_DATA = \ gimprc \ diff --git a/app/convert_cmds.c b/app/convert_cmds.c index 568efd6eea..15a907f080 100644 --- a/app/convert_cmds.c +++ b/app/convert_cmds.c @@ -163,16 +163,16 @@ convert_indexed_invoker (Argument *args) GSList *list; switch (dither_type) - { - case NO_DITHER: - case FS_DITHER: - case FSLOWBLEED_DITHER: - case FIXED_DITHER: + { + case NO_DITHER: + case FS_DITHER: + case FSLOWBLEED_DITHER: + case FIXED_DITHER: break; default: success = FALSE; break; - } + } switch (palette_type) { diff --git a/app/display/gimpdisplayshell-draw.c b/app/display/gimpdisplayshell-draw.c index f9100dba89..df8f1519c7 100644 --- a/app/display/gimpdisplayshell-draw.c +++ b/app/display/gimpdisplayshell-draw.c @@ -1010,9 +1010,7 @@ create_display_shell (GDisplay* gdisp, gtk_widget_show (vbox); gtk_widget_show (gdisp->shell); -#ifdef __GNUC__ -#warning DODGY? -#endif /*__GNUC__ */ + gtk_widget_realize (gdisp->canvas); gdk_window_set_back_pixmap (gdisp->canvas->window, NULL, 0); diff --git a/app/display/gimpdisplayshell.c b/app/display/gimpdisplayshell.c index f9100dba89..df8f1519c7 100644 --- a/app/display/gimpdisplayshell.c +++ b/app/display/gimpdisplayshell.c @@ -1010,9 +1010,7 @@ create_display_shell (GDisplay* gdisp, gtk_widget_show (vbox); gtk_widget_show (gdisp->shell); -#ifdef __GNUC__ -#warning DODGY? -#endif /*__GNUC__ */ + gtk_widget_realize (gdisp->canvas); gdk_window_set_back_pixmap (gdisp->canvas->window, NULL, 0); diff --git a/app/interface.c b/app/interface.c index f9100dba89..df8f1519c7 100644 --- a/app/interface.c +++ b/app/interface.c @@ -1010,9 +1010,7 @@ create_display_shell (GDisplay* gdisp, gtk_widget_show (vbox); gtk_widget_show (gdisp->shell); -#ifdef __GNUC__ -#warning DODGY? -#endif /*__GNUC__ */ + gtk_widget_realize (gdisp->canvas); gdk_window_set_back_pixmap (gdisp->canvas->window, NULL, 0); diff --git a/docs/Makefile.am b/docs/Makefile.am index e8ed72ad0f..f07869201b 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -6,7 +6,7 @@ EXTRA_DIST = \ architecture.eps logo.eps \ net-fu.eps timeline.eps \ pdb_dump.texi gimp_quick_reference.ps \ - gimp_quick_reference.tar.gz + gimp_quick_reference.tar.gz undo.txt BUILT_SOURCES = pdb_dump.texi diff --git a/libgimp/gimp.h b/libgimp/gimp.h index 87dec3fad7..e4c1936ad4 100644 --- a/libgimp/gimp.h +++ b/libgimp/gimp.h @@ -9,7 +9,7 @@ * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the diff --git a/libgimp/gimpchainbutton.h b/libgimp/gimpchainbutton.h index 16ef397658..b6f26559dc 100644 --- a/libgimp/gimpchainbutton.h +++ b/libgimp/gimpchainbutton.h @@ -9,7 +9,7 @@ * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the diff --git a/libgimp/gimpcolorbutton.h b/libgimp/gimpcolorbutton.h index b81f188ef6..1789b1fd0b 100644 --- a/libgimp/gimpcolorbutton.h +++ b/libgimp/gimpcolorbutton.h @@ -12,7 +12,7 @@ * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the diff --git a/libgimp/gimpcompat.h b/libgimp/gimpcompat.h index e8911162cf..f7b44c0e2d 100644 --- a/libgimp/gimpcompat.h +++ b/libgimp/gimpcompat.h @@ -9,7 +9,7 @@ * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the @@ -27,24 +27,34 @@ extern "C" { #ifndef GIMP_DISABLE_COMPAT_H -#define gimp_attach_parasite gimp_parasite_attach -#define gimp_detach_parasite gimp_parasite_detach -#define gimp_find_parasite gimp_parasite_find +#define gimp_attach_parasite gimp_parasite_attach +#define gimp_detach_parasite gimp_parasite_detach +#define gimp_find_parasite gimp_parasite_find #define gimp_image_attach_parasite gimp_image_parasite_attach #define gimp_image_detach_parasite gimp_image_parasite_detach #define gimp_image_parasite_find gimp_image_parasite_find #define gimp_drawable_attach_parasite gimp_drawable_parasite_attach #define gimp_drawable_detach_parasite gimp_drawable_parasite_detach -#define gimp_drawable_channel gimp_drawable_is_channel -#define gimp_drawable_gray gimp_drawable_is_gray -#define gimp_drawable_color gimp_drawable_is_rgb -#define gimp_drawable_indexed gimp_drawable_is_indexed -#define gimp_drawable_layer gimp_drawable_is_layer +#define gimp_drawable_channel gimp_drawable_is_channel +#define gimp_drawable_gray gimp_drawable_is_gray +#define gimp_drawable_color gimp_drawable_is_rgb +#define gimp_drawable_indexed gimp_drawable_is_indexed +#define gimp_drawable_layer gimp_drawable_is_layer #define gimp_drawable_layer_mask gimp_drawable_is_layer_mask -#define gimp_image_disable_undo gimp_image_undo_disable -#define gimp_image_enable_undo gimp_image_undo_enable -#define gimp_image_freeze_undo gimp_image_undo_freeze -#define gimp_image_thaw_undo gimp_image_undo_thaw +#define gimp_image_disable_undo gimp_image_undo_disable +#define gimp_image_enable_undo gimp_image_undo_enable +#define gimp_image_freeze_undo gimp_image_undo_freeze +#define gimp_image_thaw_undo gimp_image_undo_thaw + +/* +#define gimp_get_data gimp_procedural_db_get_data +#define gimp_get_data_size gimp_procedural_db_get_data_size + +#define gimp_set_data(id, data, bytes) \ + (gimp_procedural_db_set_data (id, bytes, data)) + +#define gimp_query_images gimp_image_list +*/ #endif /* GIMP_DISABLE_COMPAT_H */ diff --git a/libgimp/gimpenums.h b/libgimp/gimpenums.h index bf59371376..7ccbbd1431 100644 --- a/libgimp/gimpenums.h +++ b/libgimp/gimpenums.h @@ -9,7 +9,7 @@ * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the diff --git a/libgimp/gimpenv.h b/libgimp/gimpenv.h index 0acf75f94e..5137193575 100644 --- a/libgimp/gimpenv.h +++ b/libgimp/gimpenv.h @@ -10,7 +10,7 @@ * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the diff --git a/libgimp/gimpexport.h b/libgimp/gimpexport.h index 040da938b4..3e5305203a 100644 --- a/libgimp/gimpexport.h +++ b/libgimp/gimpexport.h @@ -9,7 +9,7 @@ * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the diff --git a/libgimp/gimpfileselection.h b/libgimp/gimpfileselection.h index c40dd95e78..f7615a6d6c 100644 --- a/libgimp/gimpfileselection.h +++ b/libgimp/gimpfileselection.h @@ -12,7 +12,7 @@ * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the diff --git a/libgimp/gimplimits.h b/libgimp/gimplimits.h index bdb4054108..26f71d9572 100644 --- a/libgimp/gimplimits.h +++ b/libgimp/gimplimits.h @@ -12,7 +12,7 @@ * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the diff --git a/libgimp/gimpmath.h b/libgimp/gimpmath.h index 87e55c8c42..52b5d9a347 100644 --- a/libgimp/gimpmath.h +++ b/libgimp/gimpmath.h @@ -10,7 +10,7 @@ * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the diff --git a/libgimp/gimpmatrix.h b/libgimp/gimpmatrix.h index 19ba21269a..8612f05941 100644 --- a/libgimp/gimpmatrix.h +++ b/libgimp/gimpmatrix.h @@ -9,7 +9,7 @@ * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the diff --git a/libgimp/gimpmenu.h b/libgimp/gimpmenu.h index b9d9169599..611b66ca81 100644 --- a/libgimp/gimpmenu.h +++ b/libgimp/gimpmenu.h @@ -9,7 +9,7 @@ * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the diff --git a/libgimp/gimpparasite.h b/libgimp/gimpparasite.h index f5a6104fe9..93c23f96fe 100644 --- a/libgimp/gimpparasite.h +++ b/libgimp/gimpparasite.h @@ -9,7 +9,7 @@ * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the diff --git a/libgimp/gimpparasiteF.h b/libgimp/gimpparasiteF.h index 6dade7548a..8caaa05b8f 100644 --- a/libgimp/gimpparasiteF.h +++ b/libgimp/gimpparasiteF.h @@ -9,7 +9,7 @@ * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the diff --git a/libgimp/gimpparasiteP.h b/libgimp/gimpparasiteP.h index f0db9c0e36..d2f90519b0 100644 --- a/libgimp/gimpparasiteP.h +++ b/libgimp/gimpparasiteP.h @@ -9,7 +9,7 @@ * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the diff --git a/libgimp/gimpparasiteio.h b/libgimp/gimpparasiteio.h index 981d11be24..a7ef1c8526 100644 --- a/libgimp/gimpparasiteio.h +++ b/libgimp/gimpparasiteio.h @@ -9,7 +9,7 @@ * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the diff --git a/libgimp/gimppatheditor.h b/libgimp/gimppatheditor.h index a81628dfed..66cc77179d 100644 --- a/libgimp/gimppatheditor.h +++ b/libgimp/gimppatheditor.h @@ -12,7 +12,7 @@ * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the diff --git a/libgimp/gimpprotocol.h b/libgimp/gimpprotocol.h index b9fabb800b..b2ed222a12 100644 --- a/libgimp/gimpprotocol.h +++ b/libgimp/gimpprotocol.h @@ -9,7 +9,7 @@ * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the diff --git a/libgimp/gimpsizeentry.h b/libgimp/gimpsizeentry.h index ff867e8b30..a0a9d180ef 100644 --- a/libgimp/gimpsizeentry.h +++ b/libgimp/gimpsizeentry.h @@ -9,7 +9,7 @@ * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the diff --git a/libgimp/gimpui.h b/libgimp/gimpui.h index 8145d302a4..c66e6487a9 100644 --- a/libgimp/gimpui.h +++ b/libgimp/gimpui.h @@ -9,7 +9,7 @@ * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the diff --git a/libgimp/gimpunit.h b/libgimp/gimpunit.h index 53c2d34df0..92e11aac3e 100644 --- a/libgimp/gimpunit.h +++ b/libgimp/gimpunit.h @@ -12,7 +12,7 @@ * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the diff --git a/libgimp/gimpunitmenu.h b/libgimp/gimpunitmenu.h index 7b0b377c8c..8587290c18 100644 --- a/libgimp/gimpunitmenu.h +++ b/libgimp/gimpunitmenu.h @@ -12,7 +12,7 @@ * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the diff --git a/libgimp/gimpwire.h b/libgimp/gimpwire.h index 008cbf28cc..3d8d68a6f1 100644 --- a/libgimp/gimpwire.h +++ b/libgimp/gimpwire.h @@ -9,7 +9,7 @@ * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the diff --git a/libgimp/gserialize.h b/libgimp/gserialize.h index ee28662121..5ffea993e9 100644 --- a/libgimp/gserialize.h +++ b/libgimp/gserialize.h @@ -9,7 +9,7 @@ * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the diff --git a/libgimp/parasite.h b/libgimp/parasite.h index f5a6104fe9..93c23f96fe 100644 --- a/libgimp/parasite.h +++ b/libgimp/parasite.h @@ -9,7 +9,7 @@ * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the diff --git a/libgimp/parasiteF.h b/libgimp/parasiteF.h index 6dade7548a..8caaa05b8f 100644 --- a/libgimp/parasiteF.h +++ b/libgimp/parasiteF.h @@ -9,7 +9,7 @@ * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the diff --git a/libgimp/parasiteP.h b/libgimp/parasiteP.h index f0db9c0e36..d2f90519b0 100644 --- a/libgimp/parasiteP.h +++ b/libgimp/parasiteP.h @@ -9,7 +9,7 @@ * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the diff --git a/libgimp/parasiteio.h b/libgimp/parasiteio.h index 981d11be24..a7ef1c8526 100644 --- a/libgimp/parasiteio.h +++ b/libgimp/parasiteio.h @@ -9,7 +9,7 @@ * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the diff --git a/libgimpbase/gimpenv.h b/libgimpbase/gimpenv.h index 0acf75f94e..5137193575 100644 --- a/libgimpbase/gimpenv.h +++ b/libgimpbase/gimpenv.h @@ -10,7 +10,7 @@ * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the diff --git a/libgimpbase/gimplimits.h b/libgimpbase/gimplimits.h index bdb4054108..26f71d9572 100644 --- a/libgimpbase/gimplimits.h +++ b/libgimpbase/gimplimits.h @@ -12,7 +12,7 @@ * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the diff --git a/libgimpbase/gimpparasite.h b/libgimpbase/gimpparasite.h index f5a6104fe9..93c23f96fe 100644 --- a/libgimpbase/gimpparasite.h +++ b/libgimpbase/gimpparasite.h @@ -9,7 +9,7 @@ * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the diff --git a/libgimpbase/gimpparasiteio.h b/libgimpbase/gimpparasiteio.h index 981d11be24..a7ef1c8526 100644 --- a/libgimpbase/gimpparasiteio.h +++ b/libgimpbase/gimpparasiteio.h @@ -9,7 +9,7 @@ * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the diff --git a/libgimpbase/gimpprotocol.h b/libgimpbase/gimpprotocol.h index b9fabb800b..b2ed222a12 100644 --- a/libgimpbase/gimpprotocol.h +++ b/libgimpbase/gimpprotocol.h @@ -9,7 +9,7 @@ * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the diff --git a/libgimpbase/gimpunit.h b/libgimpbase/gimpunit.h index 53c2d34df0..92e11aac3e 100644 --- a/libgimpbase/gimpunit.h +++ b/libgimpbase/gimpunit.h @@ -12,7 +12,7 @@ * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the diff --git a/libgimpbase/gimpwire.h b/libgimpbase/gimpwire.h index 008cbf28cc..3d8d68a6f1 100644 --- a/libgimpbase/gimpwire.h +++ b/libgimpbase/gimpwire.h @@ -9,7 +9,7 @@ * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the diff --git a/libgimpwidgets/gimpchainbutton.h b/libgimpwidgets/gimpchainbutton.h index 16ef397658..b6f26559dc 100644 --- a/libgimpwidgets/gimpchainbutton.h +++ b/libgimpwidgets/gimpchainbutton.h @@ -9,7 +9,7 @@ * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the diff --git a/libgimpwidgets/gimpcolorbutton.h b/libgimpwidgets/gimpcolorbutton.h index b81f188ef6..1789b1fd0b 100644 --- a/libgimpwidgets/gimpcolorbutton.h +++ b/libgimpwidgets/gimpcolorbutton.h @@ -12,7 +12,7 @@ * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the diff --git a/libgimpwidgets/gimpfileentry.h b/libgimpwidgets/gimpfileentry.h index c40dd95e78..f7615a6d6c 100644 --- a/libgimpwidgets/gimpfileentry.h +++ b/libgimpwidgets/gimpfileentry.h @@ -12,7 +12,7 @@ * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the diff --git a/libgimpwidgets/gimpfileselection.h b/libgimpwidgets/gimpfileselection.h index c40dd95e78..f7615a6d6c 100644 --- a/libgimpwidgets/gimpfileselection.h +++ b/libgimpwidgets/gimpfileselection.h @@ -12,7 +12,7 @@ * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the diff --git a/libgimpwidgets/gimppatheditor.h b/libgimpwidgets/gimppatheditor.h index a81628dfed..66cc77179d 100644 --- a/libgimpwidgets/gimppatheditor.h +++ b/libgimpwidgets/gimppatheditor.h @@ -12,7 +12,7 @@ * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the diff --git a/libgimpwidgets/gimpsizeentry.h b/libgimpwidgets/gimpsizeentry.h index ff867e8b30..a0a9d180ef 100644 --- a/libgimpwidgets/gimpsizeentry.h +++ b/libgimpwidgets/gimpsizeentry.h @@ -9,7 +9,7 @@ * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the diff --git a/libgimpwidgets/gimpunitmenu.h b/libgimpwidgets/gimpunitmenu.h index 7b0b377c8c..8587290c18 100644 --- a/libgimpwidgets/gimpunitmenu.h +++ b/libgimpwidgets/gimpunitmenu.h @@ -12,7 +12,7 @@ * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the diff --git a/tools/pdbgen/enumcode.pl b/tools/pdbgen/enumcode.pl index fd2a33b60e..b161bda3b6 100755 --- a/tools/pdbgen/enumcode.pl +++ b/tools/pdbgen/enumcode.pl @@ -93,16 +93,16 @@ print ENUMFILE <<'LGPL'; * Copyright (C) 1995-1999 Peter Mattis and Spencer Kimball * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. diff --git a/tools/pdbgen/lib.pl b/tools/pdbgen/lib.pl index 0a35fbe824..38f03717a7 100644 --- a/tools/pdbgen/lib.pl +++ b/tools/pdbgen/lib.pl @@ -34,7 +34,7 @@ sub generate { sub libtype { my ($arg, $type) = @_; - $type =~ s/\d+// unless exists $arg->{keep_size}; + $type =~ s/int32/int/ unless exists $arg->{keep_size}; $type; } @@ -52,11 +52,17 @@ sub generate { # Find the return argument (defaults to the first arg if not # explicity set - my $retarg; + my $retarg = undef; $retvoid = 0; foreach (@outargs) { $retarg = $_, last if exists $_->{retval} } unless ($retarg) { if (scalar @outargs) { - $retarg = exists $outargs[0]->{num} ? $outargs[1] : $outargs[0]; + if (exists $outargs[0]->{void_ret}) { + $retvoid = 1; + } + else { + $retarg = exists $outargs[0]->{num} ? $outargs[1] + : $outargs[0]; + } } } @@ -84,13 +90,16 @@ sub generate { } # The parameters to the function - my $arglist = ""; my $argpass = ""; my $color = ""; + my $arglist = ""; my $argpass = ""; my $color = ""; my $privatevars = 0; foreach (@inargs) { my ($type) = &arg_parse($_->{type}); my $arg = $arg_types{$type}; my $id = exists $arg->{id_func}; - if ($type ne 'color') { + if (exists $_->{implicit_fill}) { + $privatevars++; + } + elsif ($type ne 'color') { $arglist .= do { if ($id) { 'gint32 ' } else { &libtype($_, $arg->{type}) } @@ -116,8 +125,16 @@ CODE # This is what's passed into gimp_run_procedure $argpass .= "\n\t\t\t\t" . ' ' x 4; - $argpass .= "PARAM_$arg->{name}, $_->{name}"; - $argpass .= '_ID' if $id; + $argpass .= "PARAM_$arg->{name}, "; + + if (exists $_->{implicit_fill}) { + $argpass .= $_->{implicit_fill}; + } + else { + $argpass .= "$_->{name}"; + $argpass .= '_ID' if $id; + } + $argpass .= ','; } @@ -126,7 +143,7 @@ CODE my $return_marshal = "gimp_destroy_params (return_vals, nreturn_vals);"; # We only need to bother with this if we have to return a value - if ($rettype ne 'void' || $retcol) { + if ($rettype ne 'void' || $retcol || $retvoid) { my $once = 0; my $firstvar; my @arraynums; @@ -145,10 +162,10 @@ CODE push @arraynums, $_; } } - elsif ($type ne 'color') { + elsif (exists $_->{retval} && $type ne 'color') { $return_args .= "\n" . ' ' x 2; $return_args .= do { - if ($id) { 'gint32 ' } + if ($id) { 'gint32 ' } else { &libtype($_, $arg->{type}) } }; @@ -195,6 +212,13 @@ CODE $head = 'g_strdup ('; $foot = ')'; } + elsif ($type =~ /parasite/) { + $head = 'parasite_copy (&'; + $foot = ')'; + } + elsif ($type =~ /boolean|enum/) { + $type = 'int32'; + } if (exists $_->{num}) { $numpos = $argc; @@ -219,7 +243,23 @@ CODE } elsif ($type ne 'color') { # The return value variable - $var = $_->{name}; + $var = ""; + + unless (exists $_->{retval}) { + $var .= '*'; + + $arglist .= do { + if ($id) { 'gint32 ' } + else { &libtype($_, $arg->{type}) } + }; + + $arglist .= "*$_->{name}"; + $arglist .= '_ID' if $id; + $arglist .= ', '; + } + + $var = exists $_->{retval} ? "" : '*'; + $var .= $_->{name}; $var .= '_ID' if $id; $return_marshal .= ' ' x 2 if $#outargs; @@ -249,8 +289,12 @@ CODE gimp_destroy_params (return_vals, nreturn_vals); CODE - $return_marshal .= ' ' x 2 . "return $firstvar;" unless $retcol; - $return_marshal =~ s/\n\n$//s if $retcol; + unless ($retcol || $retvoid) { + $return_marshal .= ' ' x 2 . "return $firstvar;"; + } + else { + $return_marshal =~ s/\n\n$//s; + } } if ($arglist) { @@ -317,16 +361,16 @@ CODE * Copyright (C) 1995-1999 Peter Mattis and Spencer Kimball * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. @@ -342,6 +386,9 @@ LGPL my $hfile = "$destdir/gimp${group}.h$FILE_EXT"; my $cfile = "$destdir/gimp${group}.c$FILE_EXT"; + $hfile =~ s/_//g; + $cfile =~ s/_//g; + my $extra = {}; if (exists $main::grp{$group}->{extra}->{lib}) { $extra = $main::grp{$group}->{extra}->{lib} @@ -394,10 +441,9 @@ LGPL my $body; $body = $extra->{decls} if exists $extra->{decls}; foreach (@{$out->{proto}}) { $body .= $_ } - $body .= $extra->{protos} if exists $extra->{protos}; chomp $body; - open HFILE, "> $hfile" or die "Can't open $cfile: $!\n"; + open HFILE, "> $hfile" or die "Can't open $hfile: $!\n"; print HFILE $lgpl; my $guard = "__GIMP_\U$group\E_H__"; print HFILE < $cfile" or die "Can't open $cfile: $!\n"; print CFILE $lgpl; print CFILE qq/#include "gimp${group}.h"\n/; + print CFILE qq/#include "gimpprivate.h"\n/ if $privatevars; print CFILE "\n", $extra->{code} if exists $extra->{code}; print CFILE $out->{code}; close CFILE; diff --git a/tools/pdbgen/pdb/brush_select.pdb b/tools/pdbgen/pdb/brush_select.pdb index ad33c2e540..88bfcc59e2 100644 --- a/tools/pdbgen/pdb/brush_select.pdb +++ b/tools/pdbgen/pdb/brush_select.pdb @@ -176,7 +176,7 @@ brush_get_brushselect (gchar *name) CODE @procs = qw(brushes_popup brushes_close_popup brushes_set_popup); -%exports = (app => [@procs]); +%exports = (app => [@procs], lib => [@procs]); $desc = 'Brush UI'; diff --git a/tools/pdbgen/pdb/brushes.pdb b/tools/pdbgen/pdb/brushes.pdb index d2c17db047..140216a063 100644 --- a/tools/pdbgen/pdb/brushes.pdb +++ b/tools/pdbgen/pdb/brushes.pdb @@ -359,7 +359,7 @@ CODE brushes_get_opacity brushes_set_opacity brushes_get_spacing brushes_set_spacing brushes_get_paint_mode brushes_set_paint_mode brushes_list brushes_get_brush_data); -%exports = (app => [@procs]); +%exports = (app => [@procs], lib => [$procs[10]]); $desc = 'Brushes'; diff --git a/tools/pdbgen/pdb/channel.pdb b/tools/pdbgen/pdb/channel.pdb index 4018b63663..4cdf619af8 100644 --- a/tools/pdbgen/pdb/channel.pdb +++ b/tools/pdbgen/pdb/channel.pdb @@ -229,7 +229,7 @@ $#procs--; @headers = qw("channel.h" "channel_pvt.h"); unshift @procs, qw(channel_new channel_copy channel_delete); -%exports = (app => [@procs]); +%exports = (app => [@procs], lib => [@procs]); $desc = 'Channel'; diff --git a/tools/pdbgen/pdb/convert.pdb b/tools/pdbgen/pdb/convert.pdb index 01cc8351a3..278e631f11 100644 --- a/tools/pdbgen/pdb/convert.pdb +++ b/tools/pdbgen/pdb/convert.pdb @@ -106,16 +106,16 @@ HELP GSList *list; switch (dither_type) - { - case NO_DITHER: - case FS_DITHER: - case FSLOWBLEED_DITHER: - case FIXED_DITHER: + { + case NO_DITHER: + case FS_DITHER: + case FSLOWBLEED_DITHER: + case FIXED_DITHER: break; default: success = FALSE; break; - } + } switch (palette_type) { @@ -166,7 +166,7 @@ CODE @headers = qw("gimage.h" "convert.h"); @procs = qw(convert_rgb convert_grayscale convert_indexed); -%exports = (app => [@procs]); +%exports = (app => [@procs], lib => [@procs]); $desc = 'Convert'; diff --git a/tools/pdbgen/pdb/drawable.pdb b/tools/pdbgen/pdb/drawable.pdb index d64b015bc2..fd864ce833 100644 --- a/tools/pdbgen/pdb/drawable.pdb +++ b/tools/pdbgen/pdb/drawable.pdb @@ -307,7 +307,7 @@ HELP foreach (qw(x y)) { push @outargs, { name => "offset_$_", type => 'int32', - desc => "$_ offset of drawable" } + desc => "$_ offset of drawable", void_ret => 1 } } %invoke = ( code => 'drawable_offsets (drawable, &offset_x, &offset_y);' ); @@ -466,7 +466,7 @@ HELP @outargs = ( &dim_args, { name => 'thumbnail_data', type => 'int8array', - desc => 'The thumbnail data', init => 1, + desc => 'The thumbnail data', init => 1, retval => 1, array => { name => 'thumbnail_data_count', desc => 'The number of pixels in thumbnail data', alias => 'num_pixels', init => 1 } } @@ -516,7 +516,7 @@ CODE drawable_height drawable_offsets drawable_is_layer drawable_is_layer_mask drawable_is_channel drawable_get_pixel drawable_set_pixel drawable_set_image drawable_thumbnail); -%exports = (app => [@procs], lib => [@procs]); +%exports = (app => [@procs], lib => [@procs[0..17,21]]); $desc = 'Drawable procedures'; diff --git a/tools/pdbgen/pdb/fileops.pdb b/tools/pdbgen/pdb/fileops.pdb index c802d882fe..7673f2fcfc 100644 --- a/tools/pdbgen/pdb/fileops.pdb +++ b/tools/pdbgen/pdb/fileops.pdb @@ -409,9 +409,10 @@ CODE @headers = qw("fileops.h" "plug_in.h" "config.h" "libgimp/gimpintl.h" ); -@procs = qw(file_load file_save file_load_thumbnail file_save_thumbnail temp_name - register_magic_load_handler register_load_handler register_save_handler); -%exports = (app => [@procs]); +@procs = qw(file_load file_save file_load_thumbnail file_save_thumbnail + temp_name register_magic_load_handler register_load_handler + register_save_handler); +%exports = (app => [@procs], lib => [@procs[5..7]]); $desc = 'File Operations'; diff --git a/tools/pdbgen/pdb/gimage.pdb b/tools/pdbgen/pdb/gimage.pdb index bc1c3dbb7b..fd93d5b978 100644 --- a/tools/pdbgen/pdb/gimage.pdb +++ b/tools/pdbgen/pdb/gimage.pdb @@ -1351,7 +1351,8 @@ unshift @procs, qw(image_list image_new image_resize image_scale image_delete image_undo_disable image_undo_freeze image_undo_thaw image_clean_all image_floating_selection image_floating_sel_attached_to image_thumbnail); -%exports = (app => [@procs]); +%exports = (app => [@procs], + lib => [@procs[0..4,6..11,14,16..24,26..35,37..$#procs]]); $desc = 'Image'; diff --git a/tools/pdbgen/pdb/gimage_mask.pdb b/tools/pdbgen/pdb/gimage_mask.pdb index 9464faba5c..81de67c110 100644 --- a/tools/pdbgen/pdb/gimage_mask.pdb +++ b/tools/pdbgen/pdb/gimage_mask.pdb @@ -364,7 +364,7 @@ HELP selection_invert selection_sharpen selection_all selection_none selection_feather selection_border selection_grow selection_shrink selection_layer_alpha selection_load selection_save); -%exports = (app => [@procs]); +%exports = (app => [@procs], lib => [@procs[2,4]]); $desc = 'Image mask'; diff --git a/tools/pdbgen/pdb/gradient.pdb-21477 b/tools/pdbgen/pdb/gradient.pdb-21477 index 717c8ff872..27dbfa99e2 100644 --- a/tools/pdbgen/pdb/gradient.pdb-21477 +++ b/tools/pdbgen/pdb/gradient.pdb-21477 @@ -73,7 +73,8 @@ HELP @outargs = ( { name => 'name', type => 'string', desc => 'The name of the active gradient', - alias => 'g_strdup (gimp_context_get_gradient (NULL)->name)', no_declare => 1 } + alias => 'g_strdup (gimp_context_get_gradient (NULL)->name)', + no_declare => 1 } ); %invoke = ( code => 'success = gimp_context_get_gradient (NULL) != NULL;' ); diff --git a/tools/pdbgen/pdb/gradient_select.pdb b/tools/pdbgen/pdb/gradient_select.pdb index 422f41a294..7bbcf59302 100644 --- a/tools/pdbgen/pdb/gradient_select.pdb +++ b/tools/pdbgen/pdb/gradient_select.pdb @@ -259,7 +259,7 @@ CODE @procs = qw(gradients_popup gradients_close_popup gradients_set_popup gradients_get_gradient_data); -%exports = (app => [@procs]); +%exports = (app => [@procs], lib => [@procs]); $desc = 'Gradient UI'; diff --git a/tools/pdbgen/pdb/gradients.pdb b/tools/pdbgen/pdb/gradients.pdb index 717c8ff872..27dbfa99e2 100644 --- a/tools/pdbgen/pdb/gradients.pdb +++ b/tools/pdbgen/pdb/gradients.pdb @@ -73,7 +73,8 @@ HELP @outargs = ( { name => 'name', type => 'string', desc => 'The name of the active gradient', - alias => 'g_strdup (gimp_context_get_gradient (NULL)->name)', no_declare => 1 } + alias => 'g_strdup (gimp_context_get_gradient (NULL)->name)', + no_declare => 1 } ); %invoke = ( code => 'success = gimp_context_get_gradient (NULL) != NULL;' ); diff --git a/tools/pdbgen/pdb/guides.pdb b/tools/pdbgen/pdb/guides.pdb index 7998f6d742..b85071ac7b 100644 --- a/tools/pdbgen/pdb/guides.pdb +++ b/tools/pdbgen/pdb/guides.pdb @@ -297,7 +297,7 @@ CODE @procs = qw(image_add_hguide image_add_vguide image_delete_guide image_find_next_guide image_get_guide_orientation image_get_guide_position); -%exports = (app => [@procs]); +%exports = (app => [@procs], lib => [@procs]); $desc = 'Guide procedures'; diff --git a/tools/pdbgen/pdb/image.pdb b/tools/pdbgen/pdb/image.pdb index bc1c3dbb7b..fd93d5b978 100644 --- a/tools/pdbgen/pdb/image.pdb +++ b/tools/pdbgen/pdb/image.pdb @@ -1351,7 +1351,8 @@ unshift @procs, qw(image_list image_new image_resize image_scale image_delete image_undo_disable image_undo_freeze image_undo_thaw image_clean_all image_floating_selection image_floating_sel_attached_to image_thumbnail); -%exports = (app => [@procs]); +%exports = (app => [@procs], + lib => [@procs[0..4,6..11,14,16..24,26..35,37..$#procs]]); $desc = 'Image'; diff --git a/tools/pdbgen/pdb/interface.pdb b/tools/pdbgen/pdb/interface.pdb index eb4c79bb23..aea98002d4 100644 --- a/tools/pdbgen/pdb/interface.pdb +++ b/tools/pdbgen/pdb/interface.pdb @@ -32,7 +32,7 @@ HELP &pdb_misc; @inargs = ( - { name => 'message', type => 'string', + { name => 'message', type => 'string', const => 1, desc => 'Message to display in the dialog' } ); @@ -77,7 +77,7 @@ HELP } @procs = qw(message message_get_handler message_set_handler); -%exports = (app => [@procs]); +%exports = (app => [@procs], lib => [@procs]); $desc = 'Interface'; diff --git a/tools/pdbgen/pdb/layer.pdb b/tools/pdbgen/pdb/layer.pdb index 5b4e06d985..a80b1b39b8 100644 --- a/tools/pdbgen/pdb/layer.pdb +++ b/tools/pdbgen/pdb/layer.pdb @@ -547,7 +547,7 @@ $#procs--; unshift @procs, qw(layer_new layer_copy layer_create_mask layer_scale layer_resize layer_delete layer_translate layer_add_alpha layer_set_offsets layer_mask layer_is_floating_sel); -%exports = (app => [@procs]); +%exports = (app => [@procs], lib => [@procs]); $desc = 'Layer'; diff --git a/tools/pdbgen/pdb/parasite.pdb b/tools/pdbgen/pdb/parasite.pdb index 5113839365..10c11df2ab 100644 --- a/tools/pdbgen/pdb/parasite.pdb +++ b/tools/pdbgen/pdb/parasite.pdb @@ -165,19 +165,24 @@ sub parasite_list { "gimpimage.h"); $extra{lib}->{protos} = <<'CODE'; -void gimp_attach_new_parasite (const char *name, int flags, int size - const void *data); +void gimp_parasite_attach_new (const gchar *name, + guint32 flags, + guint32 size, + gconstpoiner data); CODE $extra{lib}->{code} = <<'CODE'; void -gimp_attach_new_parasite (const char *name, int flags, int size, - const void *data) +gimp_parasite_attach_new (const gchar *name, + guint32 flags, + guint32 size, + gconstpointer data) { Parasite *p = parasite_new (name, flags, size, data); gimp_parasite_attach (p); parasite_free (p); } + CODE @procs = qw(parasite_new parasite_find parasite_attach parasite_detach @@ -188,6 +193,8 @@ CODE ['image' , '&std_image_arg', 'gimage' ] ); +my %code; + foreach $type (@types) { foreach (@procs[1..4]) { my $desc = ($type->[0] =~ /^[aeiou]/ ? 'an ' : 'a ') . $type->[0]; @@ -213,9 +220,26 @@ SUB push @procs, "$type->[0]_$_"; } + + foreach (qw(protos code)) { + my $code = $extra{lib}->{$_}; + $code =~ s/\t/' ' x 8/eg; + $code =~ s/gimp/gimp_$type->[0]/g; + $code =~ s/^ {8}/' ' x (length($type->[0]) + 9)/meg; + while ($code =~ /^\t* {8}/m) { $code =~ s/^(\t*) {8}/$1\t/mg } + + $code{$_} .= $code; + } } -%exports = (app => [@procs], lib => [@procs[1..3]]); + +foreach (qw(protos code)) { + $extra{lib}->{$_} .= $code{$_}; +} + +chop $extra{lib}->{code}; + +%exports = (app => [@procs], lib => [@procs]); $desc = 'Parasite procedures'; diff --git a/tools/pdbgen/pdb/patterns.pdb b/tools/pdbgen/pdb/patterns.pdb index 3ff810bf8b..35c402f2ab 100644 --- a/tools/pdbgen/pdb/patterns.pdb +++ b/tools/pdbgen/pdb/patterns.pdb @@ -215,7 +215,7 @@ CODE @procs = qw(patterns_get_pattern patterns_set_pattern patterns_list patterns_get_pattern_data); -%exports = (app => [@procs]); +%exports = (app => [@procs], lib => [$procs[3]]); $desc = 'Patterns'; diff --git a/tools/pdbgen/pdb/plug_in.pdb b/tools/pdbgen/pdb/plug_in.pdb index db6793561a..0ddc070ff9 100644 --- a/tools/pdbgen/pdb/plug_in.pdb +++ b/tools/pdbgen/pdb/plug_in.pdb @@ -40,7 +40,7 @@ HELP { name => 'gdisplay', type => 'int32', desc => 'GDisplay to update progressbar in, or -1 for a seperate window', - no_id_lookup => 1 } + implicit_fill => '_gdisp_ID', no_id_lookup => 1 } ); %invoke = ( @@ -253,7 +253,7 @@ match_strings (regex_t *preg, CODE @procs = qw(progress_init progress_update temp_PDB_name plugins_query); -%exports = (app => [@procs]); +%exports = (app => [@procs], lib => [@procs[0..2]]); $desc = 'Plug-in'; diff --git a/tools/pdbgen/pdb/procedural_db.pdb b/tools/pdbgen/pdb/procedural_db.pdb index 951b17abb8..772a5235eb 100644 --- a/tools/pdbgen/pdb/procedural_db.pdb +++ b/tools/pdbgen/pdb/procedural_db.pdb @@ -216,7 +216,7 @@ HELP @inargs = ( &proc_name_arg ); @outargs = ( - { name => 'blurb', type => 'string', + { name => 'blurb', type => 'string', void_ret => 1, desc => 'A short blurb' }, { name => 'help', type => 'string', desc => 'Detailed procedure help' }, diff --git a/tools/pdbgen/pdb/selection.pdb b/tools/pdbgen/pdb/selection.pdb index 9464faba5c..81de67c110 100644 --- a/tools/pdbgen/pdb/selection.pdb +++ b/tools/pdbgen/pdb/selection.pdb @@ -364,7 +364,7 @@ HELP selection_invert selection_sharpen selection_all selection_none selection_feather selection_border selection_grow selection_shrink selection_layer_alpha selection_load selection_save); -%exports = (app => [@procs]); +%exports = (app => [@procs], lib => [@procs[2,4]]); $desc = 'Image mask'; diff --git a/tools/pdbgen/pdbgen.pl b/tools/pdbgen/pdbgen.pl index 9f1af10952..f5ba398ea7 100755 --- a/tools/pdbgen/pdbgen.pl +++ b/tools/pdbgen/pdbgen.pl @@ -169,6 +169,8 @@ sub arrayexpand { $arg->{type} = '0 < ' . $arg->{type}; } + $arg->{void_ret} = 1 if exists $_->{void_ret}; + $arg->{num} = 1; push @$newargs, $arg;