├── .clang-format ├── .codespellrc ├── .editorconfig ├── .git-blame-ignore-revs ├── .gitignore ├── .vscode ├── c_cpp_properties.json ├── launch.json └── tasks.json ├── CHANGELOG.md ├── LICENCE.txt ├── README.md ├── TODO ├── images ├── drag.mp4 ├── shot1.png └── shot2.png ├── meson.build ├── meson_post_install.py ├── org.libvips.nip4.desktop ├── org.libvips.nip4.gschema.xml ├── org.libvips.nip4.json ├── org.libvips.nip4.metainfo.xml ├── org.libvips.nip4.png ├── patches ├── cairo-1-fixes.patch ├── gdk-pixbuf-libjpeg-turbo.patch ├── glib-2-fixes.patch ├── ilmbase-2-fixes.patch ├── libgsf-1-fixes.patch ├── libheif-1-fixes.patch ├── libjpeg-turbo-compatibility.patch ├── librsvg-2-fixes.patch ├── openexr-2-fixes.patch ├── openslide-3-fixes.patch ├── orc-0.4-fixes.patch ├── proxy-libintl-1-fixes.patch ├── transform.patch └── zlib-name.patch ├── share ├── meson.build └── nip4 │ ├── compat │ ├── 7.10 │ │ ├── Colour.def │ │ ├── Filter.def │ │ ├── Format.def │ │ ├── Histogram.def │ │ ├── Image.def │ │ ├── Math.def │ │ ├── Matrix.def │ │ ├── Tasks.def │ │ ├── Widgets.def │ │ ├── _convert.def │ │ ├── _generate.def │ │ ├── _joe_extra.def │ │ ├── _joe_utilities.def │ │ ├── _list.def │ │ ├── _predicate.def │ │ ├── _stdenv.def │ │ └── _types.def │ ├── 7.12 │ │ ├── Colour.def │ │ ├── Filter.def │ │ ├── Format.def │ │ ├── Histogram.def │ │ ├── Image.def │ │ ├── Math.def │ │ ├── Matrix.def │ │ ├── Preferences.ws │ │ ├── Tasks.def │ │ ├── Widgets.def │ │ ├── _convert.def │ │ ├── _generate.def │ │ ├── _joe_extra.def │ │ ├── _joe_utilities.def │ │ ├── _list.def │ │ ├── _predicate.def │ │ ├── _stdenv.def │ │ └── _types.def │ ├── 7.14 │ │ ├── Colour.def │ │ ├── Filter.def │ │ ├── Histogram.def │ │ ├── Image.def │ │ ├── Math.def │ │ ├── Matrix.def │ │ ├── Object.def │ │ ├── Preferences.ws │ │ ├── Tasks.def │ │ ├── Widgets.def │ │ ├── _Object.def │ │ ├── _convert.def │ │ ├── _generate.def │ │ ├── _joe_extra.def │ │ ├── _joe_utilities.def │ │ ├── _list.def │ │ ├── _predicate.def │ │ ├── _stdenv.def │ │ └── _types.def │ ├── 7.16 │ │ ├── Colour.def │ │ ├── Filter.def │ │ ├── Histogram.def │ │ ├── Image.def │ │ ├── Math.def │ │ ├── Matrix.def │ │ ├── Object.def │ │ ├── Preferences.ws │ │ ├── Tasks.def │ │ ├── Widgets.def │ │ ├── _Object.def │ │ ├── _convert.def │ │ ├── _generate.def │ │ ├── _joe_extra.def │ │ ├── _joe_utilities.def │ │ ├── _list.def │ │ ├── _predicate.def │ │ ├── _stdenv.def │ │ └── _types.def │ ├── 7.24 │ │ ├── Colour.def │ │ ├── Filter.def │ │ ├── Histogram.def │ │ ├── Image.def │ │ ├── Math.def │ │ ├── Matrix.def │ │ ├── Object.def │ │ ├── Tasks.def │ │ ├── Widgets.def │ │ ├── _Object.def │ │ ├── _convert.def │ │ ├── _generate.def │ │ ├── _joe_extra.def │ │ ├── _joe_utilities.def │ │ ├── _list.def │ │ ├── _predicate.def │ │ ├── _stdenv.def │ │ └── _types.def │ ├── 7.26 │ │ ├── Colour.def │ │ ├── Filter.def │ │ ├── Histogram.def │ │ ├── Image.def │ │ ├── Math.def │ │ ├── Matrix.def │ │ ├── Object.def │ │ ├── Tasks.def │ │ ├── Widgets.def │ │ ├── _Object.def │ │ ├── _convert.def │ │ ├── _generate.def │ │ ├── _joe_extra.def │ │ ├── _joe_utilities.def │ │ ├── _list.def │ │ ├── _predicate.def │ │ ├── _stdenv.def │ │ └── _types.def │ ├── 7.28 │ │ ├── Colour.def │ │ ├── Filter.def │ │ ├── Histogram.def │ │ ├── Image.def │ │ ├── Math.def │ │ ├── Matrix.def │ │ ├── Object.def │ │ ├── Tasks.def │ │ ├── Widgets.def │ │ ├── _Object.def │ │ ├── _convert.def │ │ ├── _generate.def │ │ ├── _joe_extra.def │ │ ├── _joe_utilities.def │ │ ├── _list.def │ │ ├── _predicate.def │ │ ├── _stdenv.def │ │ └── _types.def │ ├── 7.38 │ │ ├── Colour.def │ │ ├── Filter.def │ │ ├── Histogram.def │ │ ├── Image.def │ │ ├── Math.def │ │ ├── Matrix.def │ │ ├── Object.def │ │ ├── Tasks.def │ │ ├── Widgets.def │ │ ├── _Object.def │ │ ├── _convert.def │ │ ├── _generate.def │ │ ├── _joe_extra.def │ │ ├── _joe_utilities.def │ │ ├── _list.def │ │ ├── _predicate.def │ │ ├── _stdenv.def │ │ └── _types.def │ ├── 7.40 │ │ ├── Colour.def │ │ ├── Filter.def │ │ ├── Histogram.def │ │ ├── Image.def │ │ ├── Magick.def │ │ ├── Math.def │ │ ├── Matrix.def │ │ ├── Object.def │ │ ├── Preferences.ws │ │ ├── Tasks.def │ │ ├── Widgets.def │ │ ├── _Object.def │ │ ├── _convert.def │ │ ├── _generate.def │ │ ├── _joe_extra.def │ │ ├── _joe_utilities.def │ │ ├── _list.def │ │ ├── _magick.def │ │ ├── _predicate.def │ │ ├── _stdenv.def │ │ └── _types.def │ ├── 7.8 │ │ ├── Capture.def │ │ ├── Colour.def │ │ ├── Filter.def │ │ ├── Format.def │ │ ├── Histogram.def │ │ ├── Image.def │ │ ├── Math.def │ │ ├── Morphology.def │ │ ├── Mosaic.def │ │ ├── New.def │ │ ├── Print.def │ │ ├── Resize.def │ │ ├── Rotate.def │ │ ├── Statistics.def │ │ ├── X_ray.def │ │ ├── _convert.def │ │ ├── _errors.def │ │ ├── _generate.def │ │ ├── _list.def │ │ ├── _predicate.def │ │ ├── _stdenv.def │ │ └── _types.def │ ├── 7.9 │ │ ├── Capture.def │ │ ├── Colour.def │ │ ├── Filter.def │ │ ├── Format.def │ │ ├── Histogram.def │ │ ├── Image.def │ │ ├── Math.def │ │ ├── Morphology.def │ │ ├── Mosaic.def │ │ ├── New.def │ │ ├── Print.def │ │ ├── Resize.def │ │ ├── Rotate.def │ │ ├── Statistics.def │ │ ├── X_ray.def │ │ ├── _convert.def │ │ ├── _errors.def │ │ ├── _generate.def │ │ ├── _list.def │ │ ├── _predicate.def │ │ ├── _stdenv.def │ │ └── _types.def │ ├── 8.2 │ │ ├── Colour.def │ │ ├── Filter.def │ │ ├── Histogram.def │ │ ├── Image.def │ │ ├── Magick.def │ │ ├── Math.def │ │ ├── Matrix.def │ │ ├── Object.def │ │ ├── Preferences.ws │ │ ├── Tasks.def │ │ ├── Widgets.def │ │ ├── _Object.def │ │ ├── _convert.def │ │ ├── _generate.def │ │ ├── _joe_extra.def │ │ ├── _joe_utilities.def │ │ ├── _list.def │ │ ├── _magick.def │ │ ├── _predicate.def │ │ ├── _stdenv.def │ │ └── _types.def │ ├── 8.3 │ │ ├── Colour.def │ │ ├── Filter.def │ │ ├── Histogram.def │ │ ├── Image.def │ │ ├── Magick.def │ │ ├── Math.def │ │ ├── Matrix.def │ │ ├── Object.def │ │ ├── Preferences.ws │ │ ├── Tasks.def │ │ ├── Widgets.def │ │ ├── _Object.def │ │ ├── _convert.def │ │ ├── _generate.def │ │ ├── _joe_extra.def │ │ ├── _joe_utilities.def │ │ ├── _list.def │ │ ├── _magick.def │ │ ├── _predicate.def │ │ ├── _stdenv.def │ │ └── _types.def │ ├── 8.4 │ │ ├── Colour.def │ │ ├── Filter.def │ │ ├── Histogram.def │ │ ├── Image.def │ │ ├── Magick.def │ │ ├── Math.def │ │ ├── Matrix.def │ │ ├── Object.def │ │ ├── Preferences.ws │ │ ├── Tasks.def │ │ ├── Widgets.def │ │ ├── _Object.def │ │ ├── _convert.def │ │ ├── _generate.def │ │ ├── _joe_extra.def │ │ ├── _joe_utilities.def │ │ ├── _list.def │ │ ├── _magick.def │ │ ├── _predicate.def │ │ ├── _stdenv.def │ │ └── _types.def │ ├── 8.5 │ │ ├── Colour.def │ │ ├── Filter.def │ │ ├── Histogram.def │ │ ├── Image.def │ │ ├── Magick.def │ │ ├── Math.def │ │ ├── Matrix.def │ │ ├── Object.def │ │ ├── Preferences.ws │ │ ├── Tasks.def │ │ ├── Widgets.def │ │ ├── _Object.def │ │ ├── _convert.def │ │ ├── _generate.def │ │ ├── _joe_extra.def │ │ ├── _joe_utilities.def │ │ ├── _list.def │ │ ├── _magick.def │ │ ├── _predicate.def │ │ ├── _stdenv.def │ │ └── _types.def │ ├── 8.6 │ │ ├── Colour.def │ │ ├── Filter.def │ │ ├── Histogram.def │ │ ├── Image.def │ │ ├── Magick.def │ │ ├── Math.def │ │ ├── Matrix.def │ │ ├── Object.def │ │ ├── Preferences.ws │ │ ├── Tasks.def │ │ ├── Widgets.def │ │ ├── _Object.def │ │ ├── _convert.def │ │ ├── _generate.def │ │ ├── _joe_extra.def │ │ ├── _joe_utilities.def │ │ ├── _list.def │ │ ├── _magick.def │ │ ├── _predicate.def │ │ ├── _stdenv.def │ │ └── _types.def │ ├── 8.9 │ │ ├── Colour.def │ │ ├── Filter.def │ │ ├── Histogram.def │ │ ├── Image.def │ │ ├── Magick.def │ │ ├── Math.def │ │ ├── Matrix.def │ │ ├── Object.def │ │ ├── Tasks.def │ │ ├── Widgets.def │ │ ├── _Object.def │ │ ├── _convert.def │ │ ├── _generate.def │ │ ├── _joe_extra.def │ │ ├── _joe_utilities.def │ │ ├── _list.def │ │ ├── _magick.def │ │ ├── _predicate.def │ │ ├── _stdenv.def │ │ └── _types.def │ └── _compat.def │ ├── data │ ├── AdobeRGB1998.icc │ ├── cmyk.icm │ ├── examples │ │ ├── 1_point_mosaic │ │ │ ├── 1pt_mosaic.ws │ │ │ ├── cd1.1.jpg │ │ │ ├── cd1.2.jpg │ │ │ ├── cd2.1.jpg │ │ │ ├── cd2.2.jpg │ │ │ ├── cd3.1.jpg │ │ │ ├── cd3.2.jpg │ │ │ ├── cd4.1.jpg │ │ │ └── cd4.2.jpg │ │ ├── 2_point_mosaic │ │ │ ├── 2pts_mosaic.ws │ │ │ ├── example_im_01.jpg │ │ │ ├── example_im_02.jpg │ │ │ ├── example_im_03.jpg │ │ │ ├── example_im_04.jpg │ │ │ ├── example_im_05.jpg │ │ │ ├── example_im_06.jpg │ │ │ └── full_image.jpg │ │ ├── businesscard │ │ │ ├── businesscard.ws │ │ │ └── slanted_oval_vase2.jpg │ │ ├── clone │ │ │ ├── clone.ws │ │ │ ├── example_im_01.png │ │ │ └── example_im_02.png │ │ ├── framing │ │ │ ├── framing.ws │ │ │ ├── framing_complex.png │ │ │ ├── framing_corner.png │ │ │ ├── framing_distorted_frame.png │ │ │ └── framing_picture.jpg │ │ ├── logo │ │ │ └── logo2.ws │ │ ├── manual_balance │ │ │ ├── manual_balance.ws │ │ │ ├── mask_01.png │ │ │ ├── mask_02.png │ │ │ ├── mask_03.png │ │ │ ├── mask_control.png │ │ │ └── simp_base.png │ │ ├── overlays_and_blending │ │ │ ├── blend_example_ir.jpg │ │ │ ├── blend_example_vis.jpg │ │ │ ├── blend_example_xray.jpg │ │ │ └── overlay_blend.ws │ │ ├── print_test_image.v │ │ └── registering │ │ │ ├── example_im_1.jpg │ │ │ ├── example_im_2.jpg │ │ │ ├── example_im_3.jpg │ │ │ ├── example_im_4.jpg │ │ │ └── registering.ws │ ├── macbeth_lab_d50.mat │ ├── macbeth_lab_d65.mat │ ├── nip2-icon.ico │ ├── rachel.con │ └── sRGB.icm │ └── start │ ├── Colour.def │ ├── Filter.def │ ├── Histogram.def │ ├── Image.def │ ├── Magick.def │ ├── Math.def │ ├── Matrix.def │ ├── Object.def │ ├── Preferences.ws │ ├── Tasks.def │ ├── Widgets.def │ ├── _Object.def │ ├── _convert.def │ ├── _generate.def │ ├── _joe_extra.def │ ├── _joe_utilities.def │ ├── _list.def │ ├── _magick.def │ ├── _predicate.def │ ├── _stdenv.def │ ├── _types.def │ └── _vips7compat.def ├── src ├── action.c ├── action.h ├── app.c ├── app.h ├── builtin.c ├── builtin.h ├── class.c ├── class.h ├── classmodel.c ├── classmodel.h ├── colour.c ├── colour.h ├── colourview.c ├── colourview.h ├── column.c ├── column.h ├── columnview.c ├── columnview.h ├── compile.c ├── compile.h ├── displaybar.c ├── displaybar.h ├── dump.c ├── dump.h ├── editview.c ├── editview.h ├── enumtypes.c.in ├── enumtypes.h.in ├── expr.c ├── expr.h ├── expression.c ├── expression.h ├── expressionview.c ├── expressionview.h ├── filemodel.c ├── filemodel.h ├── fontname.c ├── fontname.h ├── fontnameview.c ├── fontnameview.h ├── formula.c ├── formula.h ├── fuzzy.c ├── fuzzy.h ├── graphicview.c ├── graphicview.h ├── gtk │ ├── colourview.ui │ ├── columnview.ui │ ├── displaybar.ui │ ├── editview.ui │ ├── expressionview.ui │ ├── fontnameview.ui │ ├── formula.ui │ ├── ientry.ui │ ├── iimageview.css │ ├── iimageview.ui │ ├── imageui.ui │ ├── imagewindow.ui │ ├── infobar.ui │ ├── itextview.ui │ ├── mainwindow.ui │ ├── matrixview.ui │ ├── nip4.css │ ├── nip4.gresources.xml │ ├── optionview.ui │ ├── pathnameview.ui │ ├── plotview.ui │ ├── plotwindow.ui │ ├── program.ui │ ├── properties.css │ ├── properties.ui │ ├── recover.ui │ ├── rhsview.ui │ ├── rowview.ui │ ├── saveoptions.css │ ├── saveoptions.ui │ ├── sliderview.ui │ ├── spin.ui │ ├── subcolumnview.ui │ ├── toggleview.ui │ ├── toolkitgroupview.ui │ ├── tslider.ui │ ├── valueview.ui │ ├── workspacedefs.ui │ ├── workspacegroupview.ui │ ├── workspaceview.ui │ └── workspaceviewlabel.ui ├── gtkutil.c ├── gtkutil.h ├── heap.c ├── heap.h ├── heapmodel.c ├── heapmodel.h ├── iarrow.c ├── iarrow.h ├── icontainer.c ├── icontainer.h ├── ientry.c ├── ientry.h ├── iimage.c ├── iimage.h ├── iimageview.c ├── iimageview.h ├── imagedisplay.c ├── imagedisplay.h ├── imageinfo.c ├── imageinfo.h ├── imageui.c ├── imageui.h ├── imagewindow.c ├── imagewindow.h ├── infobar.c ├── infobar.h ├── iobject.c ├── iobject.h ├── iregion.c ├── iregion.h ├── iregiongroup.c ├── iregiongroup.h ├── iregiongroupview.c ├── iregiongroupview.h ├── iregionview.c ├── iregionview.h ├── itext.c ├── itext.h ├── itextview.c ├── itextview.h ├── kplot │ ├── LICENSE.md │ ├── README.md │ ├── array.c │ ├── border.c │ ├── bucket.c │ ├── buffer.c │ ├── colours.c │ ├── compat.h │ ├── draw.c │ ├── extern.h │ ├── grid.c │ ├── hist.c │ ├── kdata.c │ ├── kplot.c │ ├── kplot.h │ ├── label.c │ ├── margin.c │ ├── mean.c │ ├── plotctx.c │ ├── reallocarray.c │ ├── stddev.c │ ├── tic.c │ └── vector.c ├── lex.l ├── link.c ├── link.h ├── log.c ├── log.h ├── main-batch.c ├── main-gui.c ├── main.c ├── main.h ├── mainwindow.c ├── mainwindow.h ├── managed.c ├── managed.h ├── managedfile.c ├── managedfile.h ├── managedgobject.c ├── managedgobject.h ├── managedgvalue.c ├── managedgvalue.h ├── managedstring.c ├── managedstring.h ├── matrix.c ├── matrix.h ├── matrixview.c ├── matrixview.h ├── meson.build ├── model.c ├── model.h ├── nip4.h ├── nip4marshal.list ├── number.c ├── number.h ├── numberview.c ├── numberview.h ├── option.c ├── option.h ├── optionview.c ├── optionview.h ├── parse.h ├── parse.y ├── parser.h ├── path.c ├── path.h ├── pathname.c ├── pathname.h ├── pathnameview.c ├── pathnameview.h ├── plot.c ├── plot.h ├── plotdisplay.c ├── plotdisplay.h ├── plotview.c ├── plotview.h ├── plotwindow.c ├── plotwindow.h ├── predicate.c ├── predicate.h ├── prefcolumnview.c ├── prefcolumnview.h ├── prefs.c ├── prefs.h ├── prefworkspaceview.c ├── prefworkspaceview.h ├── program.c ├── program.h ├── progress.c ├── progress.h ├── properties.c ├── properties.h ├── recover.c ├── recover.h ├── reduce.c ├── reduce.h ├── regionview.c ├── regionview.h ├── rhs.c ├── rhs.h ├── rhsview.c ├── rhsview.h ├── row.c ├── row.h ├── rowview.c ├── rowview.h ├── saveoptions.c ├── saveoptions.h ├── secret.c ├── secret.h ├── slider.c ├── slider.h ├── sliderview.c ├── sliderview.h ├── spin.c ├── spin.h ├── string.c ├── stringi.h ├── stringview.c ├── stringview.h ├── subcolumn.c ├── subcolumn.h ├── subcolumnview.c ├── subcolumnview.h ├── symbol.c ├── symbol.h ├── tile.c ├── tile.h ├── tilecache.c ├── tilecache.h ├── tilesource.c ├── tilesource.h ├── toggle.c ├── toggle.h ├── toggleview.c ├── toggleview.h ├── tool.c ├── tool.h ├── toolkit.c ├── toolkit.h ├── toolkitgroup.c ├── toolkitgroup.h ├── toolkitgroupview.c ├── toolkitgroupview.h ├── toolkitview.c ├── toolkitview.h ├── toolview.c ├── toolview.h ├── trace.c ├── trace.h ├── tree.c ├── tree.h ├── tslider.c ├── tslider.h ├── util.c ├── util.h ├── valueview.c ├── valueview.h ├── view.c ├── view.h ├── vipsobject.c ├── vipsobject.h ├── vobject.c ├── vobject.h ├── watch.h ├── workspace.c ├── workspace.h ├── workspacedefs.c ├── workspacedefs.h ├── workspacegroup.c ├── workspacegroup.h ├── workspacegroupview.c ├── workspacegroupview.h ├── workspaceroot.c ├── workspaceroot.h ├── workspaceview.c ├── workspaceview.h ├── workspaceviewlabel.c └── workspaceviewlabel.h ├── suppressions └── valgrind.supp └── test ├── extras ├── test-5x5.v ├── test_magick2.ws ├── test_recomp_order.ws └── test_transform.ws ├── images └── slanted_oval_vase2.jpg ├── meson.build └── workspaces ├── big_and_small_disks.ws ├── gold_sample.v ├── test_colour.ws ├── test_conv.ws ├── test_fail.ws ├── test_filter.ws ├── test_fourier.ws ├── test_histogram.ws ├── test_image.ws ├── test_math.ws ├── test_matrix.ws ├── test_snip.def ├── test_stats.ws ├── test_tasks.ws └── test_widgets.ws /.clang-format: -------------------------------------------------------------------------------- 1 | BasedOnStyle: GNU 2 | AccessModifierOffset: -4 3 | AlignAfterOpenBracket: DontAlign 4 | AlignEscapedNewlines: DontAlign 5 | AlignOperands: DontAlign 6 | AllowAllArgumentsOnNextLine: false 7 | AllowAllParametersOfDeclarationOnNextLine: false 8 | BreakBeforeBinaryOperators: None 9 | BreakBeforeBraces: Stroustrup 10 | IndentWidth: 4 11 | SortIncludes: Never 12 | SpaceAfterCStyleCast: true 13 | SpaceBeforeParens: ControlStatements 14 | TabWidth: 4 15 | UseTab: Always 16 | # Our column limit is actually 80, but setting that results in clang-format 17 | # making a lot of dubious hanging-indent choices; disable it and assume the 18 | # developer will line wrap appropriately. clang-format will still check 19 | # existing hanging indents. 20 | ColumnLimit: 0 21 | -------------------------------------------------------------------------------- /.codespellrc: -------------------------------------------------------------------------------- 1 | [codespell] 2 | skip = .git,*.pdf,*.svg,./test/test-suite/images,./fuzz/common_fuzzer_corpus,./build/meson-private,./build,*.gir,*.po,./cplusplus/html,./libvips/deprecated,*.xml 3 | ignore-words-list = gir,ody,te,tre,mmaped,openin,dout,inout,co-ordinate 4 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | 3 | [*] 4 | end_of_line = lf 5 | charset = utf-8 6 | trim_trailing_whitespace = true 7 | insert_final_newline = true 8 | 9 | [*.{cpp,c,h}] 10 | indent_style = tab 11 | indent_size = 4 12 | 13 | [*.py] 14 | indent_style = space 15 | indent_size = 4 16 | -------------------------------------------------------------------------------- /.git-blame-ignore-revs: -------------------------------------------------------------------------------- 1 | # Since version 2.23 (released in August 2019), git-blame has a feature 2 | # to ignore or bypass certain commits. 3 | # 4 | # This file contains a list of commits that are not likely what you 5 | # are looking for in a blame, such as mass reformatting or renaming. 6 | # You can set this file as a default ignore file for blame by running 7 | # the following command. 8 | # 9 | # $ git config blame.ignoreRevsFile .git-blame-ignore-revs 10 | 11 | # Enforce code consistency with clang-format (#3125) 12 | 873ae7305f07a3a1493249148c1d0f0a0407f797 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | tags 2 | build-dir 3 | .flatpak-builder 4 | vipsdisp 5 | vipsdisp-*.tar.gz 6 | disp-gresources.c 7 | .deps 8 | */.deps 9 | */.libs 10 | *.o 11 | .*.swp 12 | TAGS 13 | Makefile 14 | Makefile.in 15 | scan 16 | config.* 17 | configure 18 | configure~ 19 | autom4te.cache 20 | aclocal.m4 21 | m4/ 22 | libtool 23 | ltmain.sh 24 | mkinstalldirs 25 | po/POTFILES 26 | fred 27 | stamp-h1 28 | vipsdisp-gresources.c 29 | -------------------------------------------------------------------------------- /.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "compilerPath": "/usr/bin/gcc", 10 | "cStandard": "c11", 11 | "cppStandard": "c++14", 12 | "intelliSenseMode": "${default}", 13 | "compileCommands": "${workspaceFolder}/compile_commands.json" 14 | } 15 | ], 16 | "version": 4 17 | } -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": "gdb launch", 9 | "type": "cppdbg", 10 | "request": "launch", 11 | "program": "${workspaceFolder}/vipsdisp", 12 | "args": ["/home/john/pics/k2.jpg"], 13 | "stopAtEntry": false, 14 | "cwd": "${workspaceFolder}", 15 | "environment": [], 16 | "externalConsole": false, 17 | "MIMode": "gdb", 18 | "setupCommands": [ 19 | { 20 | "description": "Enable pretty-printing for gdb", 21 | "text": "-enable-pretty-printing", 22 | "ignoreFailures": true 23 | } 24 | ], 25 | "preLaunchTask": "make", 26 | "miDebuggerPath": "/usr/bin/gdb" 27 | } 28 | ] 29 | } -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "tasks": [ 3 | { 4 | "type": "shell", 5 | "label": "make", 6 | "command": "intercept-build make", 7 | "options": { 8 | "cwd": "${workspaceFolder}" 9 | }, 10 | "problemMatcher": [ 11 | "$gcc" 12 | ], 13 | "group": { 14 | "kind": "build", 15 | "isDefault": true 16 | } 17 | } 18 | ], 19 | "version": "2.0.0" 20 | } -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## master 2 | 3 | ## 9.0.9 2025/05/28 4 | 5 | - fix select modifier handling 6 | - add region resize and drag snap 7 | - add hguide and vguide, plus a gesture for creation 8 | - improve menu homing 9 | - improve antialias on zoom out 10 | - add region context menu 11 | 12 | ## 9.0.8 2025/04/23 13 | 14 | - fix ctrl/shift detect on windows 15 | - add menu pin button 16 | - improve scRGBA display 17 | - fix "gtk_window_get_application: assertion 'GTK_IS_WINDOW (window)' failed" 18 | 19 | ## 9.0.6 2025/04/16 20 | 21 | - fix perspective distort 22 | - fix "save" in save-n-quit 23 | - fix a crash when running with libvips 8.16 24 | 25 | ## 9.0.5 2025/03/26 26 | 27 | - better change handling in ientry improves matrixview behaviour 28 | - better subrow finding fixes replace from file in nested columns 29 | - fix a crash on row access after row drag between columns 30 | 31 | ## 9.0.4 2025/03/20 32 | 33 | - revise image repaint 34 | - more robust workspace load 35 | 36 | ## 9.0.3 2025/03/13 37 | 38 | - fix save-as 39 | - revise image repaint (again) 40 | - fix a crash in graph export 41 | 42 | ## 9.0.2 2025/03/10 43 | 44 | - improve image repaint 45 | - improve file chooser 46 | - better windows build 47 | 48 | ## 9.0.1-5 2025/02/27 49 | 50 | - fix kplot on win 51 | - fix macOS startup 52 | - build polishing 53 | 54 | ## 9.0.1 2025/02/24 55 | 56 | - fix Colour display 57 | - fix 16-bit alpha scaling 58 | - use `VIPS_PATH_MAX` everywhere (not `FILENAME_MAX`) [kleisauke] 59 | - fix `ninja test` 60 | - fix bands -> height image to matrix conversion 61 | - fix `to_colour` 62 | - add `nip4-batch` batch mode interface 63 | - remove ^C/^V in mainwindow 64 | - show parent/child row relationships on hover 65 | 66 | ## 9.0.0-10 2025/02/18 67 | 68 | - first test release 69 | -------------------------------------------------------------------------------- /images/drag.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcupitt/nip4/9f5a623318dcb0537994108ffe7708400f115c5d/images/drag.mp4 -------------------------------------------------------------------------------- /images/shot1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcupitt/nip4/9f5a623318dcb0537994108ffe7708400f115c5d/images/shot1.png -------------------------------------------------------------------------------- /images/shot2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcupitt/nip4/9f5a623318dcb0537994108ffe7708400f115c5d/images/shot2.png -------------------------------------------------------------------------------- /meson_post_install.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import subprocess 5 | 6 | schemadir = os.path.join(os.environ['MESON_INSTALL_PREFIX'], 7 | 'share', 'glib-2.0', 'schemas') 8 | 9 | if not os.environ.get('DESTDIR'): 10 | print('Compiling gsettings schemas...') 11 | subprocess.call(['glib-compile-schemas', schemadir]) 12 | 13 | 14 | -------------------------------------------------------------------------------- /org.libvips.nip4.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=Application 3 | Version=1.4 4 | Name=nip4 5 | GenericName=Image Processing Spreadsheet 6 | Comment=Rapid prototyping of image processing systems 7 | Icon=org.libvips.nip4 8 | # Translators: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon! 9 | Keywords=nip4;nip2;graphic;view;image; 10 | Categories=Graphics;2DGraphics;RasterGraphics; 11 | StartupNotify=true 12 | Exec="nip4" %U 13 | MimeType=image/gif;image/x-fits;image/x-pcx;image/x-portable-anymap;image/x-portable-bitmap;image/x-portable-graymap;image/x-portable-pixmap;image/tiff;image/jpeg;image/png;image/x-exr;image/webp;image/x-webp;image/heif;image/heic;image/svg+xml;application/pdf;image/jp2;image/jxl;image/mrxs;image/svs;image/ndpi;image/avf;text/x-matlab;text/csv; 14 | 15 | -------------------------------------------------------------------------------- /org.libvips.nip4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcupitt/nip4/9f5a623318dcb0537994108ffe7708400f115c5d/org.libvips.nip4.png -------------------------------------------------------------------------------- /patches/cairo-1-fixes.patch: -------------------------------------------------------------------------------- 1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 2 | From: Kleis Auke Wolthuizen 3 | Date: Mon, 25 Nov 2019 15:30:00 +0100 4 | Subject: [PATCH 1/1] Remove -D_FORTIFY_SOURCE=2 flag 5 | 6 | See: 7 | https://github.com/msys2/MINGW-packages/issues/5803 8 | https://sourceforge.net/p/mingw-w64/bugs/818/ 9 | 10 | diff --git a/build/configure.ac.warnings b/build/configure.ac.warnings 11 | index 1111111..2222222 100644 12 | --- a/build/configure.ac.warnings 13 | +++ b/build/configure.ac.warnings 14 | @@ -38,9 +38,6 @@ dnl We also abuse the warning-flag facility to enable other compiler 15 | dnl options. Namely, the following: 16 | MAYBE_WARN="$MAYBE_WARN -fno-strict-aliasing -fno-common" 17 | 18 | -dnl Also to turn various gcc/glibc-specific preprocessor checks 19 | -MAYBE_WARN="$MAYBE_WARN -Wp,-D_FORTIFY_SOURCE=2" 20 | - 21 | # invalidate cached value if MAYBE_WARN has changed 22 | if test "x$cairo_cv_warn_maybe" != "x$MAYBE_WARN"; then 23 | unset cairo_cv_warn_cflags 24 | -------------------------------------------------------------------------------- /patches/gdk-pixbuf-libjpeg-turbo.patch: -------------------------------------------------------------------------------- 1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 2 | From: Lovell Fuller 3 | Date: Wed, 5 Jun 2019 20:49:17 +0100 4 | Subject: [PATCH 1/1] Ensure gdk-pixbuf can find libjpeg-turbo when cross-compiling 5 | 6 | 7 | diff --git a/meson.build b/meson.build 8 | index 1111111..2222222 100644 9 | --- a/meson.build 10 | +++ b/meson.build 11 | @@ -308,7 +308,7 @@ endif 12 | # Don't check and build the jpeg loader if native_windows_loaders is true 13 | if get_option('jpeg') and not native_windows_loaders 14 | if cc.has_header('jpeglib.h') 15 | - jpeg_dep = cc.find_library('jpeg', required: false) 16 | + jpeg_dep = dependency('libjpeg', required: false) 17 | if cc.get_id() == 'msvc' and not jpeg_dep.found() 18 | # The IJG JPEG library builds the .lib file as libjpeg.lib in its MSVC build system, 19 | # so look for it as well when jpeg.lib cannot be found 20 | -------------------------------------------------------------------------------- /patches/ilmbase-2-fixes.patch: -------------------------------------------------------------------------------- 1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 2 | From: Kleis Auke Wolthuizen 3 | Date: Tue, 1 Oct 2019 13:00:00 +0200 4 | Subject: [PATCH 1/1] Make libraries private within the pkg-config file 5 | 6 | Assuming that IlmBase is built statically, this ensures that the 7 | libraries are not exposed during linking. 8 | 9 | diff --git a/IlmBase/IlmBase.pc.in b/IlmBase/IlmBase.pc.in 10 | index 1111111..2222222 100644 11 | --- a/IlmBase/IlmBase.pc.in 12 | +++ b/IlmBase/IlmBase.pc.in 13 | @@ -13,5 +13,5 @@ Description: Base math and exception libraries 14 | Version: @ILMBASE_VERSION@ 15 | Requires: 16 | Conflicts: 17 | -Libs: -L${libdir} -lImath${libsuffix} -lHalf${libsuffix} -lIex${libsuffix} -lIexMath${libsuffix} -lIlmThread${libsuffix} @PTHREAD_LIBS@ 18 | +Libs.private: -L${libdir} -lImath${libsuffix} -lHalf${libsuffix} -lIex${libsuffix} -lIexMath${libsuffix} -lIlmThread${libsuffix} @PTHREAD_LIBS@ 19 | Cflags: @PTHREAD_CFLAGS@ -I${includedir} -I${includedir}/OpenEXR 20 | -------------------------------------------------------------------------------- /patches/libgsf-1-fixes.patch: -------------------------------------------------------------------------------- 1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 2 | From: Morten Welinder 3 | Date: Sat, 2 May 2020 21:24:12 -0400 4 | Subject: [PATCH 1/1] Compilation: fix win32 build 5 | 6 | 7 | diff --git a/gsf/Makefile.am b/gsf/Makefile.am 8 | index 1111111..2222222 100644 9 | --- a/gsf/Makefile.am 10 | +++ b/gsf/Makefile.am 11 | @@ -18,8 +18,7 @@ EXTRA_DIST = libgsf.syms 12 | libgsf_1_la_LIBADD = $(LIBGSF_LIBS) $(Z_LIBS) $(BZ2_LIBS) 13 | libgsf_1_la_LDFLAGS = -version-info $(VERSION_INFO) -export-symbols $(srcdir)/libgsf.syms 14 | if WITH_WIN32 15 | - libgsf_1_la_DEPENDENCIES = lib.def 16 | - libgsf_1_la_LDFLAGS += -no-undefined -export-symbols lib.def 17 | + libgsf_1_la_LDFLAGS += -no-undefined 18 | endif 19 | 20 | libgsf_1_la_SOURCES = \ 21 | -------------------------------------------------------------------------------- /patches/libjpeg-turbo-compatibility.patch: -------------------------------------------------------------------------------- 1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 2 | From: Alexpux 3 | Date: Sun, 18 Jan 2015 16:49:05 +0300 4 | Subject: [PATCH 1/1] Fix compatibility with "basestd.h" header 5 | 6 | Taken from: 7 | https://github.com/Alexpux/MINGW-packages/blob/master/mingw-w64-libjpeg-turbo/0001-header-compat.mingw.patch 8 | 9 | diff --git a/jmorecfg.h b/jmorecfg.h 10 | index 1111111..2222222 100644 11 | --- a/jmorecfg.h 12 | +++ b/jmorecfg.h 13 | @@ -14,6 +14,12 @@ 14 | * optimizations. Most users will not need to touch this file. 15 | */ 16 | 17 | +/* prevents conflicts */ 18 | +#if defined(__MINGW32__) 19 | +#include /* typedefs INT16 and INT32 */ 20 | + 21 | +#define HAVE_BOOLEAN 22 | +#endif 23 | 24 | /* 25 | * Maximum number of components (color channels) allowed in JPEG image. 26 | @@ -114,6 +120,7 @@ typedef char JOCTET; 27 | #endif /* HAVE_UNSIGNED_CHAR */ 28 | 29 | 30 | +#ifndef _BASETSD_H_ /* basestd.h from mingw-w64 defines UINT8, UINT16, INT16, INT32 */ 31 | /* These typedefs are used for various table entries and so forth. 32 | * They must be at least as wide as specified; but making them too big 33 | * won't cost a huge amount of memory, so we don't provide special 34 | @@ -173,14 +180,11 @@ typedef short INT16; 35 | */ 36 | 37 | #ifndef XMD_H /* X11/xmd.h correctly defines INT32 */ 38 | -#ifndef _BASETSD_H_ /* Microsoft defines it in basetsd.h */ 39 | -#ifndef _BASETSD_H /* MinGW is slightly different */ 40 | #ifndef QGLOBAL_H /* Qt defines it in qglobal.h */ 41 | typedef long INT32; 42 | #endif 43 | #endif 44 | #endif 45 | -#endif 46 | 47 | /* Datatype used for image dimensions. The JPEG standard only supports 48 | * images up to 64K*64K due to 16-bit fields in SOF markers. Therefore 49 | -------------------------------------------------------------------------------- /patches/librsvg-2-fixes.patch: -------------------------------------------------------------------------------- 1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 2 | From: "fix@me" 3 | Date: Mon, 27 Sep 2010 12:00:52 +0200 4 | Subject: [PATCH 1/3] fix .pc requirements 5 | 6 | 7 | diff --git a/librsvg.pc.in b/librsvg.pc.in 8 | index 1111111..2222222 100644 9 | --- a/librsvg.pc.in 10 | +++ b/librsvg.pc.in 11 | @@ -9,7 +9,7 @@ css_supported=true 12 | Name: librsvg 13 | Description: library that renders svg files 14 | Version: @VERSION@ 15 | -Requires: glib-2.0 gio-2.0 gdk-pixbuf-2.0 cairo 16 | +Requires: glib-2.0 gio-2.0 gdk-pixbuf-2.0 cairo cairo-gobject pangocairo 17 | Requires.private: 18 | Libs: -L${libdir} -lrsvg-@RSVG_API_MAJOR_VERSION@ -lm 19 | Cflags: -I${includedir}/librsvg-@RSVG_API_VERSION@ 20 | 21 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 22 | From: Kleis Auke Wolthuizen 23 | Date: Sun, 27 Jan 2019 15:00:00 +0200 24 | Subject: [PATCH 2/3] Revert "Include Rust debuginfo in release builds" 25 | 26 | This reverts commit 8215d7f1f581f0aaa317cccc3e974c61d1a6ad84. 27 | 28 | diff --git a/Cargo.toml b/Cargo.toml 29 | index 1111111..2222222 100644 30 | --- a/Cargo.toml 31 | +++ b/Cargo.toml 32 | @@ -7,4 +7,4 @@ members = [ 33 | ] 34 | 35 | [profile.release] 36 | -debug = true 37 | +debug = false 38 | 39 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 40 | From: Kleis Auke Wolthuizen 41 | Date: Tue, 9 Jun 2020 18:50:00 +0200 42 | Subject: [PATCH 3/3] Remove rlib from the C API crate type 43 | 44 | Since LTO optimization does not work for staticlib+rlib compilation. 45 | 46 | diff --git a/librsvg/Cargo.toml b/librsvg/Cargo.toml 47 | index 1111111..2222222 100644 48 | --- a/librsvg/Cargo.toml 49 | +++ b/librsvg/Cargo.toml 50 | @@ -8,7 +8,7 @@ edition = "2018" 51 | [lib] 52 | name = "rsvg_c_api" 53 | path = "lib.rs" 54 | -crate-type = [ "staticlib", "rlib" ] 55 | +crate-type = [ "staticlib" ] 56 | 57 | [dependencies] 58 | bitflags = "1.0" 59 | -------------------------------------------------------------------------------- /patches/proxy-libintl-1-fixes.patch: -------------------------------------------------------------------------------- 1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 2 | From: Kleis Auke Wolthuizen 3 | Date: Sun, 5 Jul 2020 23:00:00 +0200 4 | Subject: [PATCH 1/1] Only use the dllimport attribute for MSVC 5 | 6 | 7 | diff --git a/libintl.h b/libintl.h 8 | index 1111111..2222222 100644 9 | --- a/libintl.h 10 | +++ b/libintl.h 11 | @@ -54,8 +54,10 @@ 12 | /* Export when producing library, import when linking against library */ 13 | # ifdef G_INTL_COMPILATION 14 | # define G_INTL_EXPORT __declspec(dllexport) 15 | -# else 16 | +# elif defined(_MSC_VER) 17 | # define G_INTL_EXPORT __declspec(dllimport) 18 | +# else 19 | +# define G_INTL_EXPORT extern 20 | # endif 21 | #else 22 | # define G_INTL_EXPORT extern 23 | -------------------------------------------------------------------------------- /patches/zlib-name.patch: -------------------------------------------------------------------------------- 1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 2 | From: "fix@me" 3 | Date: Sunday, 25 Feb 2018 21:37:44 +0200 4 | Subject: [PATCH 1/1] Fix DLL naming (libzlib.dll -> libz.dll) 5 | 6 | diff --git a/CMakeLists.txt b/CMakeLists.txt 7 | index 1111111..2222222 100644 8 | --- a/CMakeLists.txt 9 | +++ b/CMakeLists.txt 10 | @@ -199,6 +199,11 @@ if(NOT CYGWIN) 11 | set_target_properties(zlib PROPERTIES VERSION ${ZLIB_FULL_VERSION}) 12 | endif() 13 | 14 | +if(MINGW) 15 | + # when cross-compiling with mingw, we want to make libz, not libzlib 16 | + set_target_properties(zlib zlibstatic PROPERTIES OUTPUT_NAME z) 17 | +endif(MINGW) 18 | + 19 | if(UNIX) 20 | # On unix-like platforms the library is almost always called libz 21 | set_target_properties(zlib zlibstatic PROPERTIES OUTPUT_NAME z) 22 | -------------------------------------------------------------------------------- /share/meson.build: -------------------------------------------------------------------------------- 1 | install_subdir('nip4', 2 | install_dir: get_option('datadir'), 3 | ) 4 | -------------------------------------------------------------------------------- /share/nip4/compat/7.10/Format.def: -------------------------------------------------------------------------------- 1 | Format_duplicate_item = class 2 | Menuaction "_Duplicate" "take a copy of an object" { 3 | action x = map_unary copy x; 4 | } 5 | 6 | #separator 7 | 8 | Format_list_to_group_item = class 9 | Menuaction "_List to Group" "turn a list of objects into a group" { 10 | action x = Group x; 11 | } 12 | 13 | Format_group_to_list_item = class 14 | Menuaction "_Group to List" "turn a group into a list of objects" { 15 | action x = x.value; 16 | } 17 | 18 | #separator 19 | 20 | Format_break_item = class 21 | Menuaction "_Break Up Object" 22 | "break an object into a list of components" { 23 | action x 24 | = map_unary break x 25 | { 26 | break x 27 | = bandsplit x, is_Image x 28 | = map Vector x.value, is_Matrix x 29 | = x.value, is_Vector x || is_Real x 30 | = error "Breakup: not Image/Matrix/Vector/Real"; 31 | } 32 | } 33 | 34 | Format_assemble_item = class 35 | Menuaction "_Assemble Objects" 36 | "assemble a list (or group) of objects into a single object" { 37 | action x 38 | = ass x.value, is_Group x 39 | = ass x 40 | { 41 | ass x 42 | = Vector x, is_real_list x 43 | = Matrix x, is_matrix x 44 | = bandjoin x, is_listof is_Image x 45 | = Vector (map get_value x), is_listof is_Real x 46 | = Matrix (map get_value x), is_listof is_Vector x 47 | = map_unary ass x, is_list x 48 | = error "Assemble: not list of Image/Vector/Real/image/real"; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /share/nip4/compat/7.10/Widgets.def: -------------------------------------------------------------------------------- 1 | Widget_slider_item = class 2 | Menuaction "_Slider" "make a new slider widget" { 3 | icon = "nip-slider-16.png"; 4 | action = Slider 0 255 128; 5 | } 6 | 7 | Widget_toggle_item = class 8 | Menuaction "_Toggle" "make a new toggle widget" { 9 | action = Toggle "untitled" false; 10 | } 11 | 12 | Widget_option_item = class 13 | Menuaction "_Option" "make a new option widget" { 14 | action = Option "untitled" ["option0", "option1"] 0; 15 | } 16 | 17 | Widget_string_item = class 18 | Menuaction "St_ring" "make a new string widget" { 19 | action = String "Enter a string" "sample text"; 20 | } 21 | 22 | Widget_number_item = class 23 | Menuaction "_Number" "make a new number widget" { 24 | action = Number "Enter a number" 42; 25 | } 26 | 27 | Widget_expression_item = class 28 | Menuaction "_Expression" "make a new expression widget" { 29 | action = Expression "Enter an expression" 42; 30 | } 31 | 32 | Widget_pathname_item = class 33 | Menuaction "_File Chooser" "make a new file chooser widget" { 34 | action = Pathname "Pick a file" 35 | "$VIPSHOME/share/$PACKAGE/data/print_test_image.v"; 36 | } 37 | 38 | Widget_font_item = class 39 | Menuaction "F_ont Chooser" "make a new font chooser widget" { 40 | action = Fontname "Pick a font" Workspaces.Preferences.PAINTBOX_FONT; 41 | } 42 | -------------------------------------------------------------------------------- /share/nip4/compat/7.12/Widgets.def: -------------------------------------------------------------------------------- 1 | Widget_slider_item = class 2 | Menuaction "_Scale" "make a new scale widget" { 3 | icon = "nip-slider-16.png"; 4 | action = Scale "untitled scale" 0 255 128; 5 | } 6 | 7 | Widget_toggle_item = class 8 | Menuaction "_Toggle" "make a new toggle widget" { 9 | action = Toggle "untitled toggle" false; 10 | } 11 | 12 | Widget_option_item = class 13 | Menuaction "_Option" "make a new option widget" { 14 | action = Option "untitled option" ["option0", "option1"] 0; 15 | } 16 | 17 | Widget_string_item = class 18 | Menuaction "St_ring" "make a new string widget" { 19 | action = String "Enter a string" "sample text"; 20 | } 21 | 22 | Widget_number_item = class 23 | Menuaction "_Number" "make a new number widget" { 24 | action = Number "Enter a number" 42; 25 | } 26 | 27 | Widget_expression_item = class 28 | Menuaction "_Expression" "make a new expression widget" { 29 | action = Expression "Enter an expression" 42; 30 | } 31 | 32 | Widget_pathname_item = class 33 | Menuaction "_File Chooser" "make a new file chooser widget" { 34 | action = Pathname "Pick a file" 35 | "$VIPSHOME/share/$PACKAGE/data/print_test_image.v"; 36 | } 37 | 38 | Widget_font_item = class 39 | Menuaction "F_ont Chooser" "make a new font chooser widget" { 40 | action = Fontname "Pick a font" Workspaces.Preferences.PAINTBOX_FONT; 41 | } 42 | 43 | Widget_clock_item = class 44 | Menuaction "_Clock" "make a new clock widget" { 45 | action = Clock 1 1; 46 | } 47 | -------------------------------------------------------------------------------- /share/nip4/compat/7.14/Object.def: -------------------------------------------------------------------------------- 1 | Object_duplicate_item = class 2 | Menuaction "_Duplicate" "take a copy of an object" { 3 | action x = map_unary copy x; 4 | } 5 | 6 | #separator 7 | 8 | Object_list_to_group_item = class 9 | Menuaction "_List to Group" "turn a list of objects into a group" { 10 | action x = to_group x; 11 | } 12 | 13 | Object_group_to_list_item = class 14 | Menuaction "_Group to List" "turn a group into a list of objects" { 15 | action x = to_list x; 16 | } 17 | 18 | #separator 19 | 20 | Object_break_item = class 21 | Menuaction "_Break Up Object" 22 | "break an object into a list of components" { 23 | action x 24 | = map_unary break x 25 | { 26 | break x 27 | = bandsplit x, is_Image x 28 | = map Vector x.value, is_Matrix x 29 | = x.value, is_Vector x || is_Real x 30 | = error "Breakup: not Image/Matrix/Vector/Real"; 31 | } 32 | } 33 | 34 | Object_assemble_item = class 35 | Menuaction "_Assemble Objects" 36 | "assemble a list (or group) of objects into a single object" { 37 | action x 38 | = map_unary ass x 39 | { 40 | ass x 41 | = [], x == [] 42 | = Vector x, is_real_list x 43 | = Matrix x, is_matrix x 44 | = bandjoin x, is_listof is_Image x 45 | = Vector (map get_value x), is_listof is_Real x 46 | = Matrix (map get_value x), is_listof is_Vector x 47 | = error "Assemble: not list of Image/Vector/Real/image/real"; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /share/nip4/compat/7.14/Widgets.def: -------------------------------------------------------------------------------- 1 | Widget_slider_item = class 2 | Menuaction "_Scale" "make a new scale widget" { 3 | icon = "nip-slider-16.png"; 4 | action = Scale "untitled scale" 0 255 128; 5 | } 6 | 7 | Widget_toggle_item = class 8 | Menuaction "_Toggle" "make a new toggle widget" { 9 | action = Toggle "untitled toggle" false; 10 | } 11 | 12 | Widget_option_item = class 13 | Menuaction "_Option" "make a new option widget" { 14 | action = Option "untitled option" ["option0", "option1"] 0; 15 | } 16 | 17 | Widget_string_item = class 18 | Menuaction "St_ring" "make a new string widget" { 19 | action = String "Enter a string" "sample text"; 20 | } 21 | 22 | Widget_number_item = class 23 | Menuaction "_Number" "make a new number widget" { 24 | action = Number "Enter a number" 42; 25 | } 26 | 27 | Widget_expression_item = class 28 | Menuaction "_Expression" "make a new expression widget" { 29 | action = Expression "Enter an expression" 42; 30 | } 31 | 32 | Widget_pathname_item = class 33 | Menuaction "_File Chooser" "make a new file chooser widget" { 34 | action = Pathname "Pick a file" 35 | "$VIPSHOME/share/$PACKAGE/data/print_test_image.v"; 36 | } 37 | 38 | Widget_font_item = class 39 | Menuaction "F_ont Chooser" "make a new font chooser widget" { 40 | action = Fontname "Pick a font" Workspaces.Preferences.PAINTBOX_FONT; 41 | } 42 | 43 | Widget_clock_item = class 44 | Menuaction "_Clock" "make a new clock widget" { 45 | action = Clock 1 1; 46 | } 47 | -------------------------------------------------------------------------------- /share/nip4/compat/7.16/Object.def: -------------------------------------------------------------------------------- 1 | Object_duplicate_item = class 2 | Menuaction "_Duplicate" "take a copy of an object" { 3 | action x = map_unary copy x; 4 | } 5 | 6 | #separator 7 | 8 | Object_list_to_group_item = class 9 | Menuaction "_List to Group" "turn a list of objects into a group" { 10 | action x = to_group x; 11 | } 12 | 13 | Object_group_to_list_item = class 14 | Menuaction "_Group to List" "turn a group into a list of objects" { 15 | action x = to_list x; 16 | } 17 | 18 | #separator 19 | 20 | Object_break_item = class 21 | Menuaction "_Break Up Object" 22 | "break an object into a list of components" { 23 | action x 24 | = map_unary break x 25 | { 26 | break x 27 | = bandsplit x, is_Image x 28 | = map Vector x.value, is_Matrix x 29 | = x.value, is_Vector x || is_Real x 30 | = error "Breakup: not Image/Matrix/Vector/Real"; 31 | } 32 | } 33 | 34 | Object_assemble_item = class 35 | Menuaction "_Assemble Objects" 36 | "assemble a list (or group) of objects into a single object" { 37 | action x 38 | = map_unary ass x 39 | { 40 | ass x 41 | = [], x == [] 42 | = Vector x, is_real_list x 43 | = Matrix x, is_matrix x 44 | = bandjoin x, is_listof is_Image x 45 | = Vector (map get_value x), is_listof is_Real x 46 | = Matrix (map get_value x), is_listof is_Vector x 47 | = error "Assemble: not list of Image/Vector/Real/image/real"; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /share/nip4/compat/7.16/Widgets.def: -------------------------------------------------------------------------------- 1 | Widget_slider_item = class 2 | Menuaction "_Scale" "make a new scale widget" { 3 | icon = "nip-slider-16.png"; 4 | action = Scale "untitled scale" 0 255 128; 5 | } 6 | 7 | Widget_toggle_item = class 8 | Menuaction "_Toggle" "make a new toggle widget" { 9 | action = Toggle "untitled toggle" false; 10 | } 11 | 12 | Widget_option_item = class 13 | Menuaction "_Option" "make a new option widget" { 14 | action = Option "untitled option" ["option0", "option1"] 0; 15 | } 16 | 17 | Widget_string_item = class 18 | Menuaction "St_ring" "make a new string widget" { 19 | action = String "Enter a string" "sample text"; 20 | } 21 | 22 | Widget_number_item = class 23 | Menuaction "_Number" "make a new number widget" { 24 | action = Number "Enter a number" 42; 25 | } 26 | 27 | Widget_expression_item = class 28 | Menuaction "_Expression" "make a new expression widget" { 29 | action = Expression "Enter an expression" 42; 30 | } 31 | 32 | Widget_pathname_item = class 33 | Menuaction "_File Chooser" "make a new file chooser widget" { 34 | action = Pathname "Pick a file" 35 | "$VIPSHOME/share/$PACKAGE/data/print_test_image.v"; 36 | } 37 | 38 | Widget_font_item = class 39 | Menuaction "F_ont Chooser" "make a new font chooser widget" { 40 | action = Fontname "Pick a font" Workspaces.Preferences.PAINTBOX_FONT; 41 | } 42 | 43 | Widget_clock_item = class 44 | Menuaction "_Clock" "make a new clock widget" { 45 | action = Clock 1 1; 46 | } 47 | -------------------------------------------------------------------------------- /share/nip4/compat/7.24/Object.def: -------------------------------------------------------------------------------- 1 | Object_duplicate_item = class 2 | Menuaction "_Duplicate" "take a copy of an object" { 3 | action x = map_unary copy x; 4 | } 5 | 6 | #separator 7 | 8 | Object_list_to_group_item = class 9 | Menuaction "_List to Group" "turn a list of objects into a group" { 10 | action x = to_group x; 11 | } 12 | 13 | Object_group_to_list_item = class 14 | Menuaction "_Group to List" "turn a group into a list of objects" { 15 | action x = to_list x; 16 | } 17 | 18 | #separator 19 | 20 | Object_break_item = class 21 | Menuaction "_Break Up Object" 22 | "break an object into a list of components" { 23 | action x 24 | = map_unary break x 25 | { 26 | break x 27 | = bandsplit x, is_Image x 28 | = map Vector x.value, is_Matrix x 29 | = x.value, is_Vector x || is_Real x 30 | = error "Breakup: not Image/Matrix/Vector/Real"; 31 | } 32 | } 33 | 34 | Object_assemble_item = class 35 | Menuaction "_Assemble Objects" 36 | "assemble a list (or group) of objects into a single object" { 37 | action x 38 | = map_unary ass x 39 | { 40 | ass x 41 | = [], x == [] 42 | = Vector x, is_real_list x 43 | = Matrix x, is_matrix x 44 | = bandjoin x, is_listof is_Image x 45 | = Vector (map get_value x), is_listof is_Real x 46 | = Matrix (map get_value x), is_listof is_Vector x 47 | = error "Assemble: not list of Image/Vector/Real/image/real"; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /share/nip4/compat/7.24/Widgets.def: -------------------------------------------------------------------------------- 1 | Widget_slider_item = class 2 | Menuaction "_Scale" "make a new scale widget" { 3 | icon = "nip-slider-16.png"; 4 | action = Scale "untitled scale" 0 255 128; 5 | } 6 | 7 | Widget_toggle_item = class 8 | Menuaction "_Toggle" "make a new toggle widget" { 9 | action = Toggle "untitled toggle" false; 10 | } 11 | 12 | Widget_option_item = class 13 | Menuaction "_Option" "make a new option widget" { 14 | action = Option "untitled option" ["option0", "option1"] 0; 15 | } 16 | 17 | Widget_string_item = class 18 | Menuaction "St_ring" "make a new string widget" { 19 | action = String "Enter a string" "sample text"; 20 | } 21 | 22 | Widget_number_item = class 23 | Menuaction "_Number" "make a new number widget" { 24 | action = Number "Enter a number" 42; 25 | } 26 | 27 | Widget_expression_item = class 28 | Menuaction "_Expression" "make a new expression widget" { 29 | action = Expression "Enter an expression" 42; 30 | } 31 | 32 | Widget_pathname_item = class 33 | Menuaction "_File Chooser" "make a new file chooser widget" { 34 | action = Pathname "Pick a file" 35 | "$VIPSHOME/share/$PACKAGE/data/print_test_image.v"; 36 | } 37 | 38 | Widget_font_item = class 39 | Menuaction "F_ont Chooser" "make a new font chooser widget" { 40 | action = Fontname "Pick a font" Workspaces.Preferences.PAINTBOX_FONT; 41 | } 42 | 43 | Widget_clock_item = class 44 | Menuaction "_Clock" "make a new clock widget" { 45 | action = Clock 1 1; 46 | } 47 | -------------------------------------------------------------------------------- /share/nip4/compat/7.26/Object.def: -------------------------------------------------------------------------------- 1 | Object_duplicate_item = class 2 | Menuaction "_Duplicate" "take a copy of an object" { 3 | action x = map_unary copy x; 4 | } 5 | 6 | #separator 7 | 8 | Object_list_to_group_item = class 9 | Menuaction "_List to Group" "turn a list of objects into a group" { 10 | action x = to_group x; 11 | } 12 | 13 | Object_group_to_list_item = class 14 | Menuaction "_Group to List" "turn a group into a list of objects" { 15 | action x = to_list x; 16 | } 17 | 18 | #separator 19 | 20 | Object_break_item = class 21 | Menuaction "_Break Up Object" 22 | "break an object into a list of components" { 23 | action x 24 | = map_unary break x 25 | { 26 | break x 27 | = bandsplit x, is_Image x 28 | = map Vector x.value, is_Matrix x 29 | = x.value, is_Vector x || is_Real x 30 | = error "Breakup: not Image/Matrix/Vector/Real"; 31 | } 32 | } 33 | 34 | Object_assemble_item = class 35 | Menuaction "_Assemble Objects" 36 | "assemble a list (or group) of objects into a single object" { 37 | action x 38 | = map_unary ass x 39 | { 40 | ass x 41 | = [], x == [] 42 | = Vector x, is_real_list x 43 | = Matrix x, is_matrix x 44 | = bandjoin x, is_listof is_Image x 45 | = Vector (map get_value x), is_listof is_Real x 46 | = Matrix (map get_value x), is_listof is_Vector x 47 | = error "Assemble: not list of Image/Vector/Real/image/real"; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /share/nip4/compat/7.26/Widgets.def: -------------------------------------------------------------------------------- 1 | Widget_slider_item = class 2 | Menuaction "_Scale" "make a new scale widget" { 3 | icon = "nip-slider-16.png"; 4 | action = Scale "untitled scale" 0 255 128; 5 | } 6 | 7 | Widget_toggle_item = class 8 | Menuaction "_Toggle" "make a new toggle widget" { 9 | action = Toggle "untitled toggle" false; 10 | } 11 | 12 | Widget_option_item = class 13 | Menuaction "_Option" "make a new option widget" { 14 | action = Option "untitled option" ["option0", "option1"] 0; 15 | } 16 | 17 | Widget_string_item = class 18 | Menuaction "St_ring" "make a new string widget" { 19 | action = String "Enter a string" "sample text"; 20 | } 21 | 22 | Widget_number_item = class 23 | Menuaction "_Number" "make a new number widget" { 24 | action = Number "Enter a number" 42; 25 | } 26 | 27 | Widget_expression_item = class 28 | Menuaction "_Expression" "make a new expression widget" { 29 | action = Expression "Enter an expression" 42; 30 | } 31 | 32 | Widget_pathname_item = class 33 | Menuaction "_File Chooser" "make a new file chooser widget" { 34 | action = Pathname "Pick a file" 35 | "$VIPSHOME/share/$PACKAGE/data/print_test_image.v"; 36 | } 37 | 38 | Widget_font_item = class 39 | Menuaction "F_ont Chooser" "make a new font chooser widget" { 40 | action = Fontname "Pick a font" Workspaces.Preferences.PAINTBOX_FONT; 41 | } 42 | 43 | Widget_clock_item = class 44 | Menuaction "_Clock" "make a new clock widget" { 45 | action = Clock 1 1; 46 | } 47 | -------------------------------------------------------------------------------- /share/nip4/compat/7.28/Object.def: -------------------------------------------------------------------------------- 1 | Object_duplicate_item = class 2 | Menuaction "_Duplicate" "take a copy of an object" { 3 | action x = map_unary copy x; 4 | } 5 | 6 | #separator 7 | 8 | Object_list_to_group_item = class 9 | Menuaction "_List to Group" "turn a list of objects into a group" { 10 | action x = to_group x; 11 | } 12 | 13 | Object_group_to_list_item = class 14 | Menuaction "_Group to List" "turn a group into a list of objects" { 15 | action x = to_list x; 16 | } 17 | 18 | #separator 19 | 20 | Object_break_item = class 21 | Menuaction "_Break Up Object" 22 | "break an object into a list of components" { 23 | action x 24 | = map_unary break x 25 | { 26 | break x 27 | = bandsplit x, is_Image x 28 | = map Vector x.value, is_Matrix x 29 | = x.value, is_Vector x || is_Real x 30 | = error "Breakup: not Image/Matrix/Vector/Real"; 31 | } 32 | } 33 | 34 | Object_assemble_item = class 35 | Menuaction "_Assemble Objects" 36 | "assemble a list (or group) of objects into a single object" { 37 | action x 38 | = map_unary ass x 39 | { 40 | ass x 41 | = [], x == [] 42 | = Vector x, is_real_list x 43 | = Matrix x, is_matrix x 44 | = bandjoin x, is_listof is_Image x 45 | = Vector (map get_value x), is_listof is_Real x 46 | = Matrix (map get_value x), is_listof is_Vector x 47 | = error "Assemble: not list of Image/Vector/Real/image/real"; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /share/nip4/compat/7.28/Widgets.def: -------------------------------------------------------------------------------- 1 | Widget_slider_item = class 2 | Menuaction "_Scale" "make a new scale widget" { 3 | icon = "nip-slider-16.png"; 4 | action = Scale "untitled scale" 0 255 128; 5 | } 6 | 7 | Widget_toggle_item = class 8 | Menuaction "_Toggle" "make a new toggle widget" { 9 | action = Toggle "untitled toggle" false; 10 | } 11 | 12 | Widget_option_item = class 13 | Menuaction "_Option" "make a new option widget" { 14 | action = Option "untitled option" ["option0", "option1"] 0; 15 | } 16 | 17 | Widget_string_item = class 18 | Menuaction "St_ring" "make a new string widget" { 19 | action = String "Enter a string" "sample text"; 20 | } 21 | 22 | Widget_number_item = class 23 | Menuaction "_Number" "make a new number widget" { 24 | action = Number "Enter a number" 42; 25 | } 26 | 27 | Widget_expression_item = class 28 | Menuaction "_Expression" "make a new expression widget" { 29 | action = Expression "Enter an expression" 42; 30 | } 31 | 32 | Widget_pathname_item = class 33 | Menuaction "_File Chooser" "make a new file chooser widget" { 34 | action = Pathname "Pick a file" 35 | "$VIPSHOME/share/$PACKAGE/data/print_test_image.v"; 36 | } 37 | 38 | Widget_font_item = class 39 | Menuaction "F_ont Chooser" "make a new font chooser widget" { 40 | action = Fontname "Pick a font" Workspaces.Preferences.PAINTBOX_FONT; 41 | } 42 | 43 | Widget_clock_item = class 44 | Menuaction "_Clock" "make a new clock widget" { 45 | action = Clock 1 1; 46 | } 47 | -------------------------------------------------------------------------------- /share/nip4/compat/7.38/Object.def: -------------------------------------------------------------------------------- 1 | Object_duplicate_item = class 2 | Menuaction "_Duplicate" "take a copy of an object" { 3 | action x = map_unary copy x; 4 | } 5 | 6 | #separator 7 | 8 | Object_list_to_group_item = class 9 | Menuaction "_List to Group" "turn a list of objects into a group" { 10 | action x = to_group x; 11 | } 12 | 13 | Object_group_to_list_item = class 14 | Menuaction "_Group to List" "turn a group into a list of objects" { 15 | action x = to_list x; 16 | } 17 | 18 | #separator 19 | 20 | Object_break_item = class 21 | Menuaction "_Break Up Object" 22 | "break an object into a list of components" { 23 | action x 24 | = map_unary break x 25 | { 26 | break x 27 | = bandsplit x, is_Image x 28 | = map Vector x.value, is_Matrix x 29 | = x.value, is_Vector x || is_Real x 30 | = error "Breakup: not Image/Matrix/Vector/Real"; 31 | } 32 | } 33 | 34 | Object_assemble_item = class 35 | Menuaction "_Assemble Objects" 36 | "assemble a list of objects into a single object" { 37 | action x 38 | = map_unary ass x 39 | { 40 | ass x 41 | = [], x == [] 42 | = Vector x, is_real_list x 43 | = Matrix x, is_matrix x 44 | = bandjoin x, is_listof is_Image x 45 | = Vector (map get_value x), is_listof is_Real x 46 | = Matrix (map get_value x), is_listof is_Vector x 47 | = error "Assemble: not list of Image/Vector/Real/image/real"; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /share/nip4/compat/7.38/Widgets.def: -------------------------------------------------------------------------------- 1 | Widget_slider_item = class 2 | Menuaction "_Scale" "make a new scale widget" { 3 | icon = "nip-slider-16.png"; 4 | action = Scale "untitled scale" 0 255 128; 5 | } 6 | 7 | Widget_toggle_item = class 8 | Menuaction "_Toggle" "make a new toggle widget" { 9 | action = Toggle "untitled toggle" false; 10 | } 11 | 12 | Widget_option_item = class 13 | Menuaction "_Option" "make a new option widget" { 14 | action = Option "untitled option" ["option0", "option1"] 0; 15 | } 16 | 17 | Widget_string_item = class 18 | Menuaction "St_ring" "make a new string widget" { 19 | action = String "Enter a string" "sample text"; 20 | } 21 | 22 | Widget_number_item = class 23 | Menuaction "_Number" "make a new number widget" { 24 | action = Number "Enter a number" 42; 25 | } 26 | 27 | Widget_expression_item = class 28 | Menuaction "_Expression" "make a new expression widget" { 29 | action = Expression "Enter an expression" 42; 30 | } 31 | 32 | Widget_pathname_item = class 33 | Menuaction "_File Chooser" "make a new file chooser widget" { 34 | action = Pathname "Pick a file" 35 | "$VIPSHOME/share/$PACKAGE/data/print_test_image.v"; 36 | } 37 | 38 | Widget_font_item = class 39 | Menuaction "F_ont Chooser" "make a new font chooser widget" { 40 | action = Fontname "Pick a font" Workspaces.Preferences.PAINTBOX_FONT; 41 | } 42 | 43 | Widget_clock_item = class 44 | Menuaction "_Clock" "make a new clock widget" { 45 | action = Clock 1 1; 46 | } 47 | -------------------------------------------------------------------------------- /share/nip4/compat/7.40/Object.def: -------------------------------------------------------------------------------- 1 | Object_duplicate_item = class 2 | Menuaction "_Duplicate" "take a copy of an object" { 3 | action x = map_unary copy x; 4 | } 5 | 6 | #separator 7 | 8 | Object_list_to_group_item = class 9 | Menuaction "_List to Group" "turn a list of objects into a group" { 10 | action x = to_group x; 11 | } 12 | 13 | Object_group_to_list_item = class 14 | Menuaction "_Group to List" "turn a group into a list of objects" { 15 | action x = to_list x; 16 | } 17 | 18 | #separator 19 | 20 | Object_break_item = class 21 | Menuaction "_Break Up Object" 22 | "break an object into a list of components" { 23 | action x 24 | = map_unary break x 25 | { 26 | break x 27 | = bandsplit x, is_Image x 28 | = map Vector x.value, is_Matrix x 29 | = x.value, is_Vector x || is_Real x 30 | = error "Breakup: not Image/Matrix/Vector/Real"; 31 | } 32 | } 33 | 34 | Object_assemble_item = class 35 | Menuaction "_Assemble Objects" 36 | "assemble a list of objects into a single object" { 37 | action x 38 | = map_unary ass x 39 | { 40 | ass x 41 | = [], x == [] 42 | = Vector x, is_real_list x 43 | = Matrix x, is_matrix x 44 | = bandjoin x, is_listof is_Image x 45 | = Vector (map get_value x), is_listof is_Real x 46 | = Matrix (map get_value x), is_listof is_Vector x 47 | = error "Assemble: not list of Image/Vector/Real/image/real"; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /share/nip4/compat/7.40/Widgets.def: -------------------------------------------------------------------------------- 1 | Widget_slider_item = class 2 | Menuaction "_Scale" "make a new scale widget" { 3 | icon = "nip-slider-16.png"; 4 | action = Scale "untitled scale" 0 255 128; 5 | } 6 | 7 | Widget_toggle_item = class 8 | Menuaction "_Toggle" "make a new toggle widget" { 9 | action = Toggle "untitled toggle" false; 10 | } 11 | 12 | Widget_option_item = class 13 | Menuaction "_Option" "make a new option widget" { 14 | action = Option "untitled option" ["option0", "option1"] 0; 15 | } 16 | 17 | Widget_string_item = class 18 | Menuaction "St_ring" "make a new string widget" { 19 | action = String "Enter a string" "sample text"; 20 | } 21 | 22 | Widget_number_item = class 23 | Menuaction "_Number" "make a new number widget" { 24 | action = Number "Enter a number" 42; 25 | } 26 | 27 | Widget_expression_item = class 28 | Menuaction "_Expression" "make a new expression widget" { 29 | action = Expression "Enter an expression" 42; 30 | } 31 | 32 | Widget_pathname_item = class 33 | Menuaction "_File Chooser" "make a new file chooser widget" { 34 | action = Pathname "Pick a file" 35 | "$VIPSHOME/share/$PACKAGE/data/print_test_image.v"; 36 | } 37 | 38 | Widget_font_item = class 39 | Menuaction "F_ont Chooser" "make a new font chooser widget" { 40 | action = Fontname "Pick a font" Workspaces.Preferences.PAINTBOX_FONT; 41 | } 42 | 43 | Widget_clock_item = class 44 | Menuaction "_Clock" "make a new clock widget" { 45 | action = Clock 1 1; 46 | } 47 | -------------------------------------------------------------------------------- /share/nip4/compat/7.8/Histogram.def: -------------------------------------------------------------------------------- 1 | /* find histogram of x 2 | */ 3 | Hist_find x = map_unary hist_find x; 4 | 5 | /* find n-dimensional histogram from n-band image 6 | */ 7 | Hist_find_nD in 8 | = map_unary widget in 9 | { 10 | widget image = class 11 | Image value { 12 | _check_args = [ 13 | [image, "Image", check_Image] 14 | ] ++ super._check_args; 15 | _vislevel = 3; 16 | 17 | // default to something small-ish 18 | bins = 8; 19 | 20 | value = hist_find_nD bins image.value; 21 | } 22 | } 23 | 24 | /* map image x through histogram hist 25 | */ 26 | Hist_map hist x = map_binary hist_map hist x; 27 | 28 | /* find cumulative histogram of hist 29 | */ 30 | Hist_cumulative x = map_unary hist_cum x; 31 | 32 | /* find normalised histogram of hist 33 | */ 34 | Hist_normalise x = map_unary hist_norm x; 35 | 36 | /* find LUT which matches hist in to hist ref 37 | */ 38 | Hist_match in ref = map_binary hist_match in ref; 39 | 40 | #separator 41 | 42 | /* histogram equalisation 43 | */ 44 | Hist_equalise = class { 45 | /* histogram equalise x globally 46 | */ 47 | Global x = map_unary hist_equalize x; 48 | 49 | /* local histogram equalisation using region r as window 50 | */ 51 | Local r = map_unary (hist_equalize_local r.width r.height) r.image; 52 | } 53 | 54 | /* slice a line of pixels along a guide line and display as a histogram 55 | */ 56 | Guide_slice in 57 | = map_unary widget in 58 | { 59 | widget guide = class 60 | Image value { 61 | _check_args = [ 62 | [guide, "Guide", check_Guide] 63 | ] ++ super._check_args; 64 | 65 | value 66 | = image_set_type Image_type.HISTOGRAM slice 67 | { 68 | slice 69 | = guide.image.extract_area 70 | guide.image.rect.left guide.top 71 | guide.width 1, 72 | is_instanceof "HGuide" guide 73 | = guide.image.extract_area 74 | guide.left guide.image.rect.top 75 | 1 guide.height; 76 | } 77 | } 78 | } 79 | 80 | -------------------------------------------------------------------------------- /share/nip4/compat/7.8/_errors.def: -------------------------------------------------------------------------------- 1 | 2 | /* Lots of error messages. 3 | */ 4 | 5 | errors = class { 6 | not1band = "not 1 band image"; 7 | not1band8bit = "not 1 band 8-bit image"; 8 | not1band3band = "not 1 band image, or 3 band 1 column image"; 9 | notodd = "not odd width|height"; 10 | notmask = "not mask"; 11 | notmaskim = "not image|mask, mask"; 12 | badcoding = "not NOCODING or LABPACK"; 13 | badlab = "unable to convert to LAB"; 14 | allreal = "not all real numbers"; 15 | allreg = "not all regions"; 16 | badargs = "bad arguments to "; 17 | badbands = "images have differing numbers of bands"; 18 | badcolour = "bad arg to colourspace function"; 19 | badmatrixmatch = "matrix arguments do not match"; 20 | badnum = "wrong number of real number arguments"; 21 | bandFmt = "bad BandFmt"; 22 | internal = "menu macro sanity failure!"; 23 | lengthdiff = "list arguments differ in length"; 24 | noimage = "no image argument"; 25 | noregion = "no region argument"; 26 | notim = "not image"; 27 | notimcmplx = "not image|complex"; 28 | notimnotreal = "non image arguments not all real numbers"; 29 | notimreg = "not image|region"; 30 | notregimreg = "not region, image|region"; 31 | notimregnum = "not image|region|number"; 32 | notimregstr = "not image|region|string"; 33 | notmatnum = "not real|matrix|mask"; 34 | notmatrix = "not matrix|mask"; 35 | notodd_square_matrix = "not odd-sided square matrix|mask"; 36 | notreal = "not real number"; 37 | notreglist = "not region|[region]"; 38 | notsquare_matrix = "not square matrix|mask"; 39 | regwrong = "regions not on two images"; 40 | sfacgt1 = "shrink factors should be >= 1"; 41 | unknownType = "unknown type"; 42 | usage = "usage: "; 43 | }; 44 | -------------------------------------------------------------------------------- /share/nip4/compat/7.9/Histogram.def: -------------------------------------------------------------------------------- 1 | /* find histogram of x 2 | */ 3 | Hist_find x = map_unary hist_find x; 4 | 5 | /* find n-dimensional histogram from n-band image 6 | */ 7 | Hist_find_nD in 8 | = map_unary widget in 9 | { 10 | widget image = class 11 | Image value { 12 | _check_args = [ 13 | [image, "Image", check_Image] 14 | ] ++ super._check_args; 15 | _vislevel = 3; 16 | 17 | // default to something small-ish 18 | bins = 8; 19 | 20 | value = hist_find_nD bins image.value; 21 | } 22 | } 23 | 24 | /* map image x through histogram hist 25 | */ 26 | Hist_map hist x = map_binary hist_map hist x; 27 | 28 | /* find cumulative histogram of hist 29 | */ 30 | Hist_cumulative x = map_unary hist_cum x; 31 | 32 | /* find normalised histogram of hist 33 | */ 34 | Hist_normalise x = map_unary hist_norm x; 35 | 36 | /* find LUT which matches hist in to hist ref 37 | */ 38 | Hist_match in ref = map_binary hist_match in ref; 39 | 40 | #separator 41 | 42 | /* histogram equalisation 43 | */ 44 | Hist_equalise = class { 45 | /* histogram equalise x globally 46 | */ 47 | Global x = map_unary hist_equalize x; 48 | 49 | /* local histogram equalisation using region r as window 50 | */ 51 | Local r = map_unary (hist_equalize_local r.width r.height) r.image; 52 | } 53 | 54 | /* slice a line of pixels along a guide line and display as a histogram 55 | */ 56 | Guide_slice in 57 | = map_unary widget in 58 | { 59 | widget guide = class 60 | Image value { 61 | _check_args = [ 62 | [guide, "Guide", check_Guide] 63 | ] ++ super._check_args; 64 | 65 | value 66 | = image_set_type Image_type.HISTOGRAM slice 67 | { 68 | slice 69 | = guide.image.extract_area 70 | guide.image.rect.left guide.top 71 | guide.width 1, 72 | is_instanceof "HGuide" guide 73 | = guide.image.extract_area 74 | guide.left guide.image.rect.top 75 | 1 guide.height; 76 | } 77 | } 78 | } 79 | 80 | -------------------------------------------------------------------------------- /share/nip4/compat/7.9/_errors.def: -------------------------------------------------------------------------------- 1 | 2 | /* Lots of error messages. 3 | */ 4 | 5 | errors = class { 6 | not1band = "not 1 band image"; 7 | not1band8bit = "not 1 band 8-bit image"; 8 | not1band3band = "not 1 band image, or 3 band 1 column image"; 9 | notodd = "not odd width|height"; 10 | notmask = "not mask"; 11 | notmaskim = "not image|mask, mask"; 12 | badcoding = "not NOCODING or LABPACK"; 13 | badlab = "unable to convert to LAB"; 14 | allreal = "not all real numbers"; 15 | allreg = "not all regions"; 16 | badargs = "bad arguments to "; 17 | badbands = "images have differing numbers of bands"; 18 | badcolour = "bad arg to colourspace function"; 19 | badmatrixmatch = "matrix arguments do not match"; 20 | badnum = "wrong number of real number arguments"; 21 | bandFmt = "bad BandFmt"; 22 | internal = "menu macro sanity failure!"; 23 | lengthdiff = "list arguments differ in length"; 24 | noimage = "no image argument"; 25 | noregion = "no region argument"; 26 | notim = "not image"; 27 | notimcmplx = "not image|complex"; 28 | notimnotreal = "non image arguments not all real numbers"; 29 | notimreg = "not image|region"; 30 | notregimreg = "not region, image|region"; 31 | notimregnum = "not image|region|number"; 32 | notimregstr = "not image|region|string"; 33 | notmatnum = "not real|matrix|mask"; 34 | notmatrix = "not matrix|mask"; 35 | notodd_square_matrix = "not odd-sided square matrix|mask"; 36 | notreal = "not real number"; 37 | notreglist = "not region|[region]"; 38 | notsquare_matrix = "not square matrix|mask"; 39 | regwrong = "regions not on two images"; 40 | sfacgt1 = "shrink factors should be >= 1"; 41 | unknownType = "unknown type"; 42 | usage = "usage: "; 43 | }; 44 | -------------------------------------------------------------------------------- /share/nip4/compat/8.2/Object.def: -------------------------------------------------------------------------------- 1 | Object_duplicate_item = class 2 | Menuaction "_Duplicate" "take a copy of an object" { 3 | action x = map_unary copy x; 4 | } 5 | 6 | #separator 7 | 8 | Object_list_to_group_item = class 9 | Menuaction "_List to Group" "turn a list of objects into a group" { 10 | action x = to_group x; 11 | } 12 | 13 | Object_group_to_list_item = class 14 | Menuaction "_Group to List" "turn a group into a list of objects" { 15 | action x = to_list x; 16 | } 17 | 18 | #separator 19 | 20 | Object_break_item = class 21 | Menuaction "_Break Up Object" 22 | "break an object into a list of components" { 23 | action x 24 | = map_unary break x 25 | { 26 | break x 27 | = bandsplit x, is_Image x 28 | = map Vector x.value, is_Matrix x 29 | = x.value, is_Vector x || is_Real x 30 | = error "Breakup: not Image/Matrix/Vector/Real"; 31 | } 32 | } 33 | 34 | Object_assemble_item = class 35 | Menuaction "_Assemble Objects" 36 | "assemble a list of objects into a single object" { 37 | action x 38 | = map_unary ass x 39 | { 40 | ass x 41 | = [], x == [] 42 | = Vector x, is_real_list x 43 | = Matrix x, is_matrix x 44 | = bandjoin x, is_listof is_Image x 45 | = Vector (map get_value x), is_listof is_Real x 46 | = Matrix (map get_value x), is_listof is_Vector x 47 | = error "Assemble: not list of Image/Vector/Real/image/real"; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /share/nip4/compat/8.2/Widgets.def: -------------------------------------------------------------------------------- 1 | Widget_slider_item = class 2 | Menuaction "_Scale" "make a new scale widget" { 3 | icon = "nip-slider-16.png"; 4 | action = Scale "untitled scale" 0 255 128; 5 | } 6 | 7 | Widget_toggle_item = class 8 | Menuaction "_Toggle" "make a new toggle widget" { 9 | action = Toggle "untitled toggle" false; 10 | } 11 | 12 | Widget_option_item = class 13 | Menuaction "_Option" "make a new option widget" { 14 | action = Option "untitled option" ["option0", "option1"] 0; 15 | } 16 | 17 | Widget_string_item = class 18 | Menuaction "St_ring" "make a new string widget" { 19 | action = String "Enter a string" "sample text"; 20 | } 21 | 22 | Widget_number_item = class 23 | Menuaction "_Number" "make a new number widget" { 24 | action = Number "Enter a number" 42; 25 | } 26 | 27 | Widget_expression_item = class 28 | Menuaction "_Expression" "make a new expression widget" { 29 | action = Expression "Enter an expression" 42; 30 | } 31 | 32 | Widget_pathname_item = class 33 | Menuaction "_File Chooser" "make a new file chooser widget" { 34 | action = Pathname "Pick a file" 35 | "$VIPSHOME/share/$PACKAGE/data/print_test_image.v"; 36 | } 37 | 38 | Widget_font_item = class 39 | Menuaction "F_ont Chooser" "make a new font chooser widget" { 40 | action = Fontname "Pick a font" Workspaces.Preferences.PAINTBOX_FONT; 41 | } 42 | 43 | Widget_clock_item = class 44 | Menuaction "_Clock" "make a new clock widget" { 45 | action = Clock 1 1; 46 | } 47 | -------------------------------------------------------------------------------- /share/nip4/compat/8.3/Object.def: -------------------------------------------------------------------------------- 1 | Object_duplicate_item = class 2 | Menuaction "_Duplicate" "take a copy of an object" { 3 | action x = map_unary copy x; 4 | } 5 | 6 | #separator 7 | 8 | Object_list_to_group_item = class 9 | Menuaction "_List to Group" "turn a list of objects into a group" { 10 | action x = to_group x; 11 | } 12 | 13 | Object_group_to_list_item = class 14 | Menuaction "_Group to List" "turn a group into a list of objects" { 15 | action x = to_list x; 16 | } 17 | 18 | #separator 19 | 20 | Object_break_item = class 21 | Menuaction "_Break Up Object" 22 | "break an object into a list of components" { 23 | action x 24 | = map_unary break x 25 | { 26 | break x 27 | = bandsplit x, is_Image x 28 | = map Vector x.value, is_Matrix x 29 | = x.value, is_Vector x || is_Real x 30 | = error "Breakup: not Image/Matrix/Vector/Real"; 31 | } 32 | } 33 | 34 | Object_assemble_item = class 35 | Menuaction "_Assemble Objects" 36 | "assemble a list of objects into a single object" { 37 | action x 38 | = map_unary ass x 39 | { 40 | ass x 41 | = [], x == [] 42 | = Vector x, is_real_list x 43 | = Matrix x, is_matrix x 44 | = bandjoin x, is_listof is_Image x 45 | = Vector (map get_value x), is_listof is_Real x 46 | = Matrix (map get_value x), is_listof is_Vector x 47 | = error "Assemble: not list of Image/Vector/Real/image/real"; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /share/nip4/compat/8.3/Widgets.def: -------------------------------------------------------------------------------- 1 | Widget_slider_item = class 2 | Menuaction "_Scale" "make a new scale widget" { 3 | icon = "nip-slider-16.png"; 4 | action = Scale "untitled scale" 0 255 128; 5 | } 6 | 7 | Widget_toggle_item = class 8 | Menuaction "_Toggle" "make a new toggle widget" { 9 | action = Toggle "untitled toggle" false; 10 | } 11 | 12 | Widget_option_item = class 13 | Menuaction "_Option" "make a new option widget" { 14 | action = Option "untitled option" ["option0", "option1"] 0; 15 | } 16 | 17 | Widget_string_item = class 18 | Menuaction "St_ring" "make a new string widget" { 19 | action = String "Enter a string" "sample text"; 20 | } 21 | 22 | Widget_number_item = class 23 | Menuaction "_Number" "make a new number widget" { 24 | action = Number "Enter a number" 42; 25 | } 26 | 27 | Widget_expression_item = class 28 | Menuaction "_Expression" "make a new expression widget" { 29 | action = Expression "Enter an expression" 42; 30 | } 31 | 32 | Widget_pathname_item = class 33 | Menuaction "_File Chooser" "make a new file chooser widget" { 34 | action = Pathname "Pick a file" 35 | "$VIPSHOME/share/$PACKAGE/data/print_test_image.v"; 36 | } 37 | 38 | Widget_font_item = class 39 | Menuaction "F_ont Chooser" "make a new font chooser widget" { 40 | action = Fontname "Pick a font" Workspaces.Preferences.PAINTBOX_FONT; 41 | } 42 | 43 | Widget_clock_item = class 44 | Menuaction "_Clock" "make a new clock widget" { 45 | action = Clock 1 1; 46 | } 47 | -------------------------------------------------------------------------------- /share/nip4/compat/8.4/Object.def: -------------------------------------------------------------------------------- 1 | Object_duplicate_item = class 2 | Menuaction "_Duplicate" "take a copy of an object" { 3 | action x = map_unary copy x; 4 | } 5 | 6 | #separator 7 | 8 | Object_list_to_group_item = class 9 | Menuaction "_List to Group" "turn a list of objects into a group" { 10 | action x = to_group x; 11 | } 12 | 13 | Object_group_to_list_item = class 14 | Menuaction "_Group to List" "turn a group into a list of objects" { 15 | action x = to_list x; 16 | } 17 | 18 | #separator 19 | 20 | Object_break_item = class 21 | Menuaction "_Break Up Object" 22 | "break an object into a list of components" { 23 | action x 24 | = map_unary break x 25 | { 26 | break x 27 | = bandsplit x, is_Image x 28 | = map Vector x.value, is_Matrix x 29 | = x.value, is_Vector x || is_Real x 30 | = error "Breakup: not Image/Matrix/Vector/Real"; 31 | } 32 | } 33 | 34 | Object_assemble_item = class 35 | Menuaction "_Assemble Objects" 36 | "assemble a list of objects into a single object" { 37 | action x 38 | = map_unary ass x 39 | { 40 | ass x 41 | = [], x == [] 42 | = Vector x, is_real_list x 43 | = Matrix x, is_matrix x 44 | = bandjoin x, is_listof is_Image x 45 | = Vector (map get_value x), is_listof is_Real x 46 | = Matrix (map get_value x), is_listof is_Vector x 47 | = error "Assemble: not list of Image/Vector/Real/image/real"; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /share/nip4/compat/8.4/Widgets.def: -------------------------------------------------------------------------------- 1 | Widget_slider_item = class 2 | Menuaction "_Scale" "make a new scale widget" { 3 | icon = "nip-slider-16.png"; 4 | action = Scale "untitled scale" 0 255 128; 5 | } 6 | 7 | Widget_toggle_item = class 8 | Menuaction "_Toggle" "make a new toggle widget" { 9 | action = Toggle "untitled toggle" false; 10 | } 11 | 12 | Widget_option_item = class 13 | Menuaction "_Option" "make a new option widget" { 14 | action = Option "untitled option" ["option0", "option1"] 0; 15 | } 16 | 17 | Widget_string_item = class 18 | Menuaction "St_ring" "make a new string widget" { 19 | action = String "Enter a string" "sample text"; 20 | } 21 | 22 | Widget_number_item = class 23 | Menuaction "_Number" "make a new number widget" { 24 | action = Number "Enter a number" 42; 25 | } 26 | 27 | Widget_expression_item = class 28 | Menuaction "_Expression" "make a new expression widget" { 29 | action = Expression "Enter an expression" 42; 30 | } 31 | 32 | Widget_pathname_item = class 33 | Menuaction "_File Chooser" "make a new file chooser widget" { 34 | action = Pathname "Pick a file" 35 | "$VIPSHOME/share/$PACKAGE/data/print_test_image.v"; 36 | } 37 | 38 | Widget_font_item = class 39 | Menuaction "F_ont Chooser" "make a new font chooser widget" { 40 | action = Fontname "Pick a font" Workspaces.Preferences.PAINTBOX_FONT; 41 | } 42 | 43 | Widget_clock_item = class 44 | Menuaction "_Clock" "make a new clock widget" { 45 | action = Clock 1 1; 46 | } 47 | -------------------------------------------------------------------------------- /share/nip4/compat/8.5/Object.def: -------------------------------------------------------------------------------- 1 | Object_duplicate_item = class 2 | Menuaction "_Duplicate" "take a copy of an object" { 3 | action x = map_unary copy x; 4 | } 5 | 6 | #separator 7 | 8 | Object_list_to_group_item = class 9 | Menuaction "_List to Group" "turn a list of objects into a group" { 10 | action x = to_group x; 11 | } 12 | 13 | Object_group_to_list_item = class 14 | Menuaction "_Group to List" "turn a group into a list of objects" { 15 | action x = to_list x; 16 | } 17 | 18 | #separator 19 | 20 | Object_break_item = class 21 | Menuaction "_Break Up Object" 22 | "break an object into a list of components" { 23 | action x 24 | = map_unary break x 25 | { 26 | break x 27 | = bandsplit x, is_Image x 28 | = map Vector x.value, is_Matrix x 29 | = x.value, is_Vector x || is_Real x 30 | = error "Breakup: not Image/Matrix/Vector/Real"; 31 | } 32 | } 33 | 34 | Object_assemble_item = class 35 | Menuaction "_Assemble Objects" 36 | "assemble a list of objects into a single object" { 37 | action x 38 | = map_unary ass x 39 | { 40 | ass x 41 | = [], x == [] 42 | = Vector x, is_real_list x 43 | = Matrix x, is_matrix x 44 | = bandjoin x, is_listof is_Image x 45 | = Vector (map get_value x), is_listof is_Real x 46 | = Matrix (map get_value x), is_listof is_Vector x 47 | = error "Assemble: not list of Image/Vector/Real/image/real"; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /share/nip4/compat/8.5/Widgets.def: -------------------------------------------------------------------------------- 1 | Widget_slider_item = class 2 | Menuaction "_Scale" "make a new scale widget" { 3 | icon = "nip-slider-16.png"; 4 | action = Scale "untitled scale" 0 255 128; 5 | } 6 | 7 | Widget_toggle_item = class 8 | Menuaction "_Toggle" "make a new toggle widget" { 9 | action = Toggle "untitled toggle" false; 10 | } 11 | 12 | Widget_option_item = class 13 | Menuaction "_Option" "make a new option widget" { 14 | action = Option "untitled option" ["option0", "option1"] 0; 15 | } 16 | 17 | Widget_string_item = class 18 | Menuaction "St_ring" "make a new string widget" { 19 | action = String "Enter a string" "sample text"; 20 | } 21 | 22 | Widget_number_item = class 23 | Menuaction "_Number" "make a new number widget" { 24 | action = Number "Enter a number" 42; 25 | } 26 | 27 | Widget_expression_item = class 28 | Menuaction "_Expression" "make a new expression widget" { 29 | action = Expression "Enter an expression" 42; 30 | } 31 | 32 | Widget_pathname_item = class 33 | Menuaction "_File Chooser" "make a new file chooser widget" { 34 | action = Pathname "Pick a file" 35 | "$VIPSHOME/share/$PACKAGE/data/print_test_image.v"; 36 | } 37 | 38 | Widget_font_item = class 39 | Menuaction "F_ont Chooser" "make a new font chooser widget" { 40 | action = Fontname "Pick a font" Workspaces.Preferences.PAINTBOX_FONT; 41 | } 42 | 43 | Widget_clock_item = class 44 | Menuaction "_Clock" "make a new clock widget" { 45 | action = Clock 1 1; 46 | } 47 | -------------------------------------------------------------------------------- /share/nip4/compat/8.6/Object.def: -------------------------------------------------------------------------------- 1 | Object_duplicate_item = class 2 | Menuaction "_Duplicate" "take a copy of an object" { 3 | action x = map_unary copy x; 4 | } 5 | 6 | #separator 7 | 8 | Object_list_to_group_item = class 9 | Menuaction "_List to Group" "turn a list of objects into a group" { 10 | action x = to_group x; 11 | } 12 | 13 | Object_group_to_list_item = class 14 | Menuaction "_Group to List" "turn a group into a list of objects" { 15 | action x = to_list x; 16 | } 17 | 18 | #separator 19 | 20 | Object_break_item = class 21 | Menuaction "_Break Up Object" 22 | "break an object into a list of components" { 23 | action x 24 | = map_unary break x 25 | { 26 | break x 27 | = bandsplit x, is_Image x 28 | = map Vector x.value, is_Matrix x 29 | = x.value, is_Vector x || is_Real x 30 | = error "Breakup: not Image/Matrix/Vector/Real"; 31 | } 32 | } 33 | 34 | Object_assemble_item = class 35 | Menuaction "_Assemble Objects" 36 | "assemble a list of objects into a single object" { 37 | action x 38 | = map_unary ass x 39 | { 40 | ass x 41 | = [], x == [] 42 | = Vector x, is_real_list x 43 | = Matrix x, is_matrix x 44 | = bandjoin x, is_listof is_Image x 45 | = Vector (map get_value x), is_listof is_Real x 46 | = Matrix (map get_value x), is_listof is_Vector x 47 | = error "Assemble: not list of Image/Vector/Real/image/real"; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /share/nip4/compat/8.6/Widgets.def: -------------------------------------------------------------------------------- 1 | Widget_slider_item = class 2 | Menuaction "_Scale" "make a new scale widget" { 3 | icon = "nip-slider-16.png"; 4 | action = Scale "untitled scale" 0 255 128; 5 | } 6 | 7 | Widget_toggle_item = class 8 | Menuaction "_Toggle" "make a new toggle widget" { 9 | action = Toggle "untitled toggle" false; 10 | } 11 | 12 | Widget_option_item = class 13 | Menuaction "_Option" "make a new option widget" { 14 | action = Option "untitled option" ["option0", "option1"] 0; 15 | } 16 | 17 | Widget_string_item = class 18 | Menuaction "St_ring" "make a new string widget" { 19 | action = String "Enter a string" "sample text"; 20 | } 21 | 22 | Widget_number_item = class 23 | Menuaction "_Number" "make a new number widget" { 24 | action = Number "Enter a number" 42; 25 | } 26 | 27 | Widget_expression_item = class 28 | Menuaction "_Expression" "make a new expression widget" { 29 | action = Expression "Enter an expression" 42; 30 | } 31 | 32 | Widget_pathname_item = class 33 | Menuaction "_File Chooser" "make a new file chooser widget" { 34 | action = Pathname "Pick a file" 35 | "$VIPSHOME/share/$PACKAGE/data/print_test_image.v"; 36 | } 37 | 38 | Widget_font_item = class 39 | Menuaction "F_ont Chooser" "make a new font chooser widget" { 40 | action = Fontname "Pick a font" Workspaces.Preferences.PAINTBOX_FONT; 41 | } 42 | 43 | Widget_clock_item = class 44 | Menuaction "_Clock" "make a new clock widget" { 45 | action = Clock 1 1; 46 | } 47 | -------------------------------------------------------------------------------- /share/nip4/compat/8.9/Object.def: -------------------------------------------------------------------------------- 1 | Object_duplicate_item = class 2 | Menuaction "_Duplicate" "take a copy of an object" { 3 | action x = map_unary copy x; 4 | } 5 | 6 | #separator 7 | 8 | Object_list_to_group_item = class 9 | Menuaction "_List to Group" "turn a list of objects into a group" { 10 | action x = to_group x; 11 | } 12 | 13 | Object_group_to_list_item = class 14 | Menuaction "_Group to List" "turn a group into a list of objects" { 15 | action x = to_list x; 16 | } 17 | 18 | #separator 19 | 20 | Object_break_item = class 21 | Menuaction "_Break Up Object" 22 | "break an object into a list of components" { 23 | action x 24 | = map_unary break x 25 | { 26 | break x 27 | = bandsplit x, is_Image x 28 | = map Vector x.value, is_Matrix x 29 | = x.value, is_Vector x || is_Real x 30 | = error "Breakup: not Image/Matrix/Vector/Real"; 31 | } 32 | } 33 | 34 | Object_assemble_item = class 35 | Menuaction "_Assemble Objects" 36 | "assemble a list of objects into a single object" { 37 | action x 38 | = map_unary ass x 39 | { 40 | ass x 41 | = [], x == [] 42 | = Vector x, is_real_list x 43 | = Matrix x, is_matrix x 44 | = bandjoin x, is_listof is_Image x 45 | = Vector (map get_value x), is_listof is_Real x 46 | = Matrix (map get_value x), is_listof is_Vector x 47 | = error "Assemble: not list of Image/Vector/Real/image/real"; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /share/nip4/compat/8.9/Widgets.def: -------------------------------------------------------------------------------- 1 | Widget_slider_item = class 2 | Menuaction "_Scale" "make a new scale widget" { 3 | icon = "nip-slider-16.png"; 4 | action = Scale "untitled scale" 0 255 128; 5 | } 6 | 7 | Widget_toggle_item = class 8 | Menuaction "_Toggle" "make a new toggle widget" { 9 | action = Toggle "untitled toggle" false; 10 | } 11 | 12 | Widget_option_item = class 13 | Menuaction "_Option" "make a new option widget" { 14 | action = Option "untitled option" ["option0", "option1"] 0; 15 | } 16 | 17 | Widget_string_item = class 18 | Menuaction "St_ring" "make a new string widget" { 19 | action = String "Enter a string" "sample text"; 20 | } 21 | 22 | Widget_number_item = class 23 | Menuaction "_Number" "make a new number widget" { 24 | action = Number "Enter a number" 42; 25 | } 26 | 27 | Widget_expression_item = class 28 | Menuaction "_Expression" "make a new expression widget" { 29 | action = Expression "Enter an expression" 42; 30 | } 31 | 32 | Widget_pathname_item = class 33 | Menuaction "_File Chooser" "make a new file chooser widget" { 34 | action = Pathname "Pick a file" 35 | "$VIPSHOME/share/$PACKAGE/data/print_test_image.v"; 36 | } 37 | 38 | Widget_font_item = class 39 | Menuaction "F_ont Chooser" "make a new font chooser widget" { 40 | action = Fontname "Pick a font" Workspaces.Preferences.PAINTBOX_FONT; 41 | } 42 | 43 | Widget_clock_item = class 44 | Menuaction "_Clock" "make a new clock widget" { 45 | action = Clock 1 1; 46 | } 47 | -------------------------------------------------------------------------------- /share/nip4/data/AdobeRGB1998.icc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcupitt/nip4/9f5a623318dcb0537994108ffe7708400f115c5d/share/nip4/data/AdobeRGB1998.icc -------------------------------------------------------------------------------- /share/nip4/data/cmyk.icm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcupitt/nip4/9f5a623318dcb0537994108ffe7708400f115c5d/share/nip4/data/cmyk.icm -------------------------------------------------------------------------------- /share/nip4/data/examples/1_point_mosaic/cd1.1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcupitt/nip4/9f5a623318dcb0537994108ffe7708400f115c5d/share/nip4/data/examples/1_point_mosaic/cd1.1.jpg -------------------------------------------------------------------------------- /share/nip4/data/examples/1_point_mosaic/cd1.2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcupitt/nip4/9f5a623318dcb0537994108ffe7708400f115c5d/share/nip4/data/examples/1_point_mosaic/cd1.2.jpg -------------------------------------------------------------------------------- /share/nip4/data/examples/1_point_mosaic/cd2.1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcupitt/nip4/9f5a623318dcb0537994108ffe7708400f115c5d/share/nip4/data/examples/1_point_mosaic/cd2.1.jpg -------------------------------------------------------------------------------- /share/nip4/data/examples/1_point_mosaic/cd2.2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcupitt/nip4/9f5a623318dcb0537994108ffe7708400f115c5d/share/nip4/data/examples/1_point_mosaic/cd2.2.jpg -------------------------------------------------------------------------------- /share/nip4/data/examples/1_point_mosaic/cd3.1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcupitt/nip4/9f5a623318dcb0537994108ffe7708400f115c5d/share/nip4/data/examples/1_point_mosaic/cd3.1.jpg -------------------------------------------------------------------------------- /share/nip4/data/examples/1_point_mosaic/cd3.2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcupitt/nip4/9f5a623318dcb0537994108ffe7708400f115c5d/share/nip4/data/examples/1_point_mosaic/cd3.2.jpg -------------------------------------------------------------------------------- /share/nip4/data/examples/1_point_mosaic/cd4.1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcupitt/nip4/9f5a623318dcb0537994108ffe7708400f115c5d/share/nip4/data/examples/1_point_mosaic/cd4.1.jpg -------------------------------------------------------------------------------- /share/nip4/data/examples/1_point_mosaic/cd4.2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcupitt/nip4/9f5a623318dcb0537994108ffe7708400f115c5d/share/nip4/data/examples/1_point_mosaic/cd4.2.jpg -------------------------------------------------------------------------------- /share/nip4/data/examples/2_point_mosaic/example_im_01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcupitt/nip4/9f5a623318dcb0537994108ffe7708400f115c5d/share/nip4/data/examples/2_point_mosaic/example_im_01.jpg -------------------------------------------------------------------------------- /share/nip4/data/examples/2_point_mosaic/example_im_02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcupitt/nip4/9f5a623318dcb0537994108ffe7708400f115c5d/share/nip4/data/examples/2_point_mosaic/example_im_02.jpg -------------------------------------------------------------------------------- /share/nip4/data/examples/2_point_mosaic/example_im_03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcupitt/nip4/9f5a623318dcb0537994108ffe7708400f115c5d/share/nip4/data/examples/2_point_mosaic/example_im_03.jpg -------------------------------------------------------------------------------- /share/nip4/data/examples/2_point_mosaic/example_im_04.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcupitt/nip4/9f5a623318dcb0537994108ffe7708400f115c5d/share/nip4/data/examples/2_point_mosaic/example_im_04.jpg -------------------------------------------------------------------------------- /share/nip4/data/examples/2_point_mosaic/example_im_05.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcupitt/nip4/9f5a623318dcb0537994108ffe7708400f115c5d/share/nip4/data/examples/2_point_mosaic/example_im_05.jpg -------------------------------------------------------------------------------- /share/nip4/data/examples/2_point_mosaic/example_im_06.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcupitt/nip4/9f5a623318dcb0537994108ffe7708400f115c5d/share/nip4/data/examples/2_point_mosaic/example_im_06.jpg -------------------------------------------------------------------------------- /share/nip4/data/examples/2_point_mosaic/full_image.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcupitt/nip4/9f5a623318dcb0537994108ffe7708400f115c5d/share/nip4/data/examples/2_point_mosaic/full_image.jpg -------------------------------------------------------------------------------- /share/nip4/data/examples/businesscard/slanted_oval_vase2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcupitt/nip4/9f5a623318dcb0537994108ffe7708400f115c5d/share/nip4/data/examples/businesscard/slanted_oval_vase2.jpg -------------------------------------------------------------------------------- /share/nip4/data/examples/clone/example_im_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcupitt/nip4/9f5a623318dcb0537994108ffe7708400f115c5d/share/nip4/data/examples/clone/example_im_01.png -------------------------------------------------------------------------------- /share/nip4/data/examples/clone/example_im_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcupitt/nip4/9f5a623318dcb0537994108ffe7708400f115c5d/share/nip4/data/examples/clone/example_im_02.png -------------------------------------------------------------------------------- /share/nip4/data/examples/framing/framing_complex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcupitt/nip4/9f5a623318dcb0537994108ffe7708400f115c5d/share/nip4/data/examples/framing/framing_complex.png -------------------------------------------------------------------------------- /share/nip4/data/examples/framing/framing_corner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcupitt/nip4/9f5a623318dcb0537994108ffe7708400f115c5d/share/nip4/data/examples/framing/framing_corner.png -------------------------------------------------------------------------------- /share/nip4/data/examples/framing/framing_distorted_frame.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcupitt/nip4/9f5a623318dcb0537994108ffe7708400f115c5d/share/nip4/data/examples/framing/framing_distorted_frame.png -------------------------------------------------------------------------------- /share/nip4/data/examples/framing/framing_picture.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcupitt/nip4/9f5a623318dcb0537994108ffe7708400f115c5d/share/nip4/data/examples/framing/framing_picture.jpg -------------------------------------------------------------------------------- /share/nip4/data/examples/manual_balance/mask_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcupitt/nip4/9f5a623318dcb0537994108ffe7708400f115c5d/share/nip4/data/examples/manual_balance/mask_01.png -------------------------------------------------------------------------------- /share/nip4/data/examples/manual_balance/mask_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcupitt/nip4/9f5a623318dcb0537994108ffe7708400f115c5d/share/nip4/data/examples/manual_balance/mask_02.png -------------------------------------------------------------------------------- /share/nip4/data/examples/manual_balance/mask_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcupitt/nip4/9f5a623318dcb0537994108ffe7708400f115c5d/share/nip4/data/examples/manual_balance/mask_03.png -------------------------------------------------------------------------------- /share/nip4/data/examples/manual_balance/mask_control.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcupitt/nip4/9f5a623318dcb0537994108ffe7708400f115c5d/share/nip4/data/examples/manual_balance/mask_control.png -------------------------------------------------------------------------------- /share/nip4/data/examples/manual_balance/simp_base.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcupitt/nip4/9f5a623318dcb0537994108ffe7708400f115c5d/share/nip4/data/examples/manual_balance/simp_base.png -------------------------------------------------------------------------------- /share/nip4/data/examples/overlays_and_blending/blend_example_ir.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcupitt/nip4/9f5a623318dcb0537994108ffe7708400f115c5d/share/nip4/data/examples/overlays_and_blending/blend_example_ir.jpg -------------------------------------------------------------------------------- /share/nip4/data/examples/overlays_and_blending/blend_example_vis.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcupitt/nip4/9f5a623318dcb0537994108ffe7708400f115c5d/share/nip4/data/examples/overlays_and_blending/blend_example_vis.jpg -------------------------------------------------------------------------------- /share/nip4/data/examples/overlays_and_blending/blend_example_xray.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcupitt/nip4/9f5a623318dcb0537994108ffe7708400f115c5d/share/nip4/data/examples/overlays_and_blending/blend_example_xray.jpg -------------------------------------------------------------------------------- /share/nip4/data/examples/print_test_image.v: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcupitt/nip4/9f5a623318dcb0537994108ffe7708400f115c5d/share/nip4/data/examples/print_test_image.v -------------------------------------------------------------------------------- /share/nip4/data/examples/registering/example_im_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcupitt/nip4/9f5a623318dcb0537994108ffe7708400f115c5d/share/nip4/data/examples/registering/example_im_1.jpg -------------------------------------------------------------------------------- /share/nip4/data/examples/registering/example_im_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcupitt/nip4/9f5a623318dcb0537994108ffe7708400f115c5d/share/nip4/data/examples/registering/example_im_2.jpg -------------------------------------------------------------------------------- /share/nip4/data/examples/registering/example_im_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcupitt/nip4/9f5a623318dcb0537994108ffe7708400f115c5d/share/nip4/data/examples/registering/example_im_3.jpg -------------------------------------------------------------------------------- /share/nip4/data/examples/registering/example_im_4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcupitt/nip4/9f5a623318dcb0537994108ffe7708400f115c5d/share/nip4/data/examples/registering/example_im_4.jpg -------------------------------------------------------------------------------- /share/nip4/data/macbeth_lab_d50.mat: -------------------------------------------------------------------------------- 1 | 3 24 2 | 38.82 14.52 14.86 3 | 65.97 16.84 16.71 4 | 50.25 -4.56 -21.94 5 | 43.69 -14.21 19.17 6 | 55.13 9.02 -24.66 7 | 70.1 -31.71 -0.78 8 | 64.17 34.77 62.36 9 | 40.28 10.55 -44.65 10 | 51.82 47.11 15.64 11 | 31 22.5 -21.72 12 | 72.3 -23.44 57.12 13 | 72.4 20.15 68.15 14 | 29.15 20.65 -55.37 15 | 54.78 -38.84 31.54 16 | 42.5 55.62 27.17 17 | 82.4 3.54 79.73 18 | 51.61 48.8 -14 19 | 50.03 -27.58 -29.2 20 | 94.27 -0.25 0.35 21 | 80.3 0.05 -0.38 22 | 65.41 0.09 -0.44 23 | 50.82 -0.37 -0.59 24 | 36.1 0.09 -0.49 25 | 23.8 0.54 -0.18 26 | 27 | -------------------------------------------------------------------------------- /share/nip4/data/macbeth_lab_d65.mat: -------------------------------------------------------------------------------- 1 | 3 24 1 0 2 | 37.7758 13.122 13.2705 3 | 65.0651 13.6974 16.1079 4 | 51.125 -3.3471 -20.6654 5 | 42.9236 -12.4326 19.1425 6 | 56.0801 7.2918 -23.6413 7 | 70.8371 -30.663 2.5131 8 | 61.0209 34.1118 57.0494 9 | 42.4442 9.1559 -40.9195 10 | 50.2147 41.9414 12.8438 11 | 31.1403 21.5385 -23.1365 12 | 70.9067 -20.5043 57.9149 13 | 69.6498 20.8271 64.4978 14 | 32.4864 15.9125 -48.5415 15 | 54.1624 -34.1277 32.8876 16 | 40.4646 48.7723 24.0303 17 | 80.0696 4.3066 79.2876 18 | 50.847 42.549 -16.3102 19 | 52.5361 -28.7633 -23.2291 20 | 94.8303 -0.536 0.3512 21 | 80.3002 0.0736 -0.3646 22 | 65.3137 0.2192 -0.4743 23 | 50.7737 -0.2655 -0.546 24 | 36.005 0.2655 -0.5395 25 | 22.1402 0.6357 -0.219 26 | -------------------------------------------------------------------------------- /share/nip4/data/nip2-icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcupitt/nip4/9f5a623318dcb0537994108ffe7708400f115c5d/share/nip4/data/nip2-icon.ico -------------------------------------------------------------------------------- /share/nip4/data/rachel.con: -------------------------------------------------------------------------------- 1 | 5 5 21 0 2 | 1 -4 -4 -4 1 3 | -4 6 8 6 -4 4 | -4 8 9 8 -4 5 | -4 6 8 6 -4 6 | 1 -4 -4 -4 1 7 | -------------------------------------------------------------------------------- /share/nip4/data/sRGB.icm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcupitt/nip4/9f5a623318dcb0537994108ffe7708400f115c5d/share/nip4/data/sRGB.icm -------------------------------------------------------------------------------- /share/nip4/start/Object.def: -------------------------------------------------------------------------------- 1 | Object_duplicate_item = class 2 | Menuaction "_Duplicate" "take a copy of an object" { 3 | action x = map_unary copy x; 4 | } 5 | 6 | #separator 7 | 8 | Object_list_to_group_item = class 9 | Menuaction "_List to Group" "turn a list of objects into a group" { 10 | action x = to_group x; 11 | } 12 | 13 | Object_group_to_list_item = class 14 | Menuaction "_Group to List" "turn a group into a list of objects" { 15 | action x = to_list x; 16 | } 17 | 18 | #separator 19 | 20 | Object_break_item = class 21 | Menuaction "_Break Up Object" 22 | "break an object into a list of components" { 23 | action x 24 | = map_unary break x 25 | { 26 | break x 27 | = bandsplit x, is_Image x 28 | = map Vector x.value, is_Matrix x 29 | = x.value, is_Vector x || is_Real x 30 | = error "Breakup: not Image/Matrix/Vector/Real"; 31 | } 32 | } 33 | 34 | Object_assemble_item = class 35 | Menuaction "_Assemble Objects" 36 | "assemble a list of objects into a single object" { 37 | action x 38 | = map_unary ass x 39 | { 40 | ass x 41 | = [], x == [] 42 | = Vector x, is_real_list x 43 | = Matrix x, is_matrix x 44 | = bandjoin x, is_listof is_Image x 45 | = Vector (map get_value x), is_listof is_Real x 46 | = Matrix (map get_value x), is_listof is_Vector x 47 | = error "Assemble: not list of Image/Vector/Real/image/real"; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /share/nip4/start/Widgets.def: -------------------------------------------------------------------------------- 1 | Widget_slider_item = class 2 | Menuaction "_Scale" "make a new scale widget" { 3 | icon = "nip-slider-16.png"; 4 | action = Scale "untitled scale" 0 255 128; 5 | } 6 | 7 | Widget_toggle_item = class 8 | Menuaction "_Toggle" "make a new toggle widget" { 9 | action = Toggle "untitled toggle" false; 10 | } 11 | 12 | Widget_option_item = class 13 | Menuaction "_Option" "make a new option widget" { 14 | action = Option "untitled option" ["option0", "option1"] 0; 15 | } 16 | 17 | Widget_string_item = class 18 | Menuaction "St_ring" "make a new string widget" { 19 | action = String "Enter a string" "sample text"; 20 | } 21 | 22 | Widget_number_item = class 23 | Menuaction "_Number" "make a new number widget" { 24 | action = Number "Enter a number" 42; 25 | } 26 | 27 | Widget_expression_item = class 28 | Menuaction "_Expression" "make a new expression widget" { 29 | action = Expression "Enter an expression" 42; 30 | } 31 | 32 | Widget_pathname_item = class 33 | Menuaction "_File Chooser" "make a new file chooser widget" { 34 | action = Pathname "Pick a file" 35 | "$VIPSHOME/share/$PACKAGE/data/print_test_image.v"; 36 | } 37 | 38 | Widget_font_item = class 39 | Menuaction "F_ont Chooser" "make a new font chooser widget" { 40 | action = Fontname "Pick a font" Workspaces.Preferences.PAINTBOX_FONT; 41 | } 42 | 43 | Widget_clock_item = class 44 | Menuaction "_Clock" "make a new clock widget" { 45 | action = Clock 1 1; 46 | } 47 | -------------------------------------------------------------------------------- /src/action.h: -------------------------------------------------------------------------------- 1 | /* Graph actions. 2 | */ 3 | 4 | /* A strict action on the graph. 5 | */ 6 | typedef void (*ActionFn)(Reduce *, Compile *, 7 | int, const char *, HeapNode **, PElement *, void *); 8 | 9 | /* A sort of reducer (eg. lazy or strict, or hyperstrict) 10 | */ 11 | typedef void (*ReduceFunction)(Reduce *, PElement *); 12 | 13 | #define OPERATOR_NAME(OP) ( \ 14 | (int) (OP) >= 0 && (int) (OP) < noperator_table ? operator_table[(int) (OP)] : "") 15 | 16 | extern const char *operator_table[]; 17 | extern const int noperator_table; 18 | 19 | void action_proc_uop(Reduce *rc, Compile *compile, 20 | int op, const char *name, HeapNode **arg, PElement *out); 21 | void action_proc_construct(Reduce *rc, Compile *compile, 22 | HeapNode **arg, PElement *out); 23 | 24 | void action_proc_bop(Reduce *rc, Compile *compile, 25 | BinOp bop, HeapNode **arg); 26 | 27 | void action_dispatch(Reduce *rc, Compile *compile, ReduceFunction rfn, 28 | int op, const char *name, gboolean override, 29 | ActionFn afn, int nargs, HeapNode **arg, void *user); 30 | -------------------------------------------------------------------------------- /src/app.h: -------------------------------------------------------------------------------- 1 | // app startup and lifetime management 2 | 3 | /* 4 | 5 | Copyright (C) 1991-2003 The National Gallery 6 | Copyright (C) 2004-2023 libvips.org 7 | 8 | This program is free software; you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation; either version 2 of the License, or 11 | (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License along 19 | with this program; if not, write to the Free Software Foundation, Inc., 20 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | 22 | */ 23 | 24 | #ifndef __APP_H 25 | #define __APP_H 26 | 27 | #define APP_TYPE (app_get_type()) 28 | #define APP NIP4_APP 29 | 30 | G_DECLARE_FINAL_TYPE(App, app, NIP4, APP, GtkApplication) 31 | 32 | App *app_new(gboolean welcome); 33 | GSettings *app_settings(App *app); 34 | 35 | #endif /* __APP_H */ 36 | -------------------------------------------------------------------------------- /src/builtin.h: -------------------------------------------------------------------------------- 1 | /* Execute builtin functions. 2 | */ 3 | 4 | /* 5 | 6 | Copyright (C) 1991-2003 The National Gallery 7 | 8 | This program is free software; you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation; either version 2 of the License, or 11 | (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License along 19 | with this program; if not, write to the Free Software Foundation, Inc., 20 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | 22 | */ 23 | 24 | /* 25 | 26 | These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk 27 | 28 | */ 29 | 30 | /* A type spotter ... a type name (used in error messages), plus a predicate. 31 | */ 32 | typedef struct { 33 | const char *name; 34 | gboolean (*pred)(Reduce *, PElement *); 35 | } BuiltinTypeSpot; 36 | 37 | /* A builtin function. 38 | */ 39 | typedef void (*builtin_fn)(Reduce *, const char *, HeapNode **, PElement *); 40 | 41 | /* A function name and a pointer to an implementation. 42 | */ 43 | struct _BuiltinInfo { 44 | const char *name; 45 | const char *desc; 46 | gboolean override; 47 | int nargs; 48 | BuiltinTypeSpot **args; 49 | builtin_fn fn; 50 | }; 51 | 52 | void builtin_init(void); 53 | void builtin_usage(VipsBuf *buf, BuiltinInfo *builtin); 54 | void builtin_run(Reduce *rc, Compile *compile, 55 | int op, const char *name, HeapNode **arg, PElement *out, 56 | BuiltinInfo *builtin); 57 | -------------------------------------------------------------------------------- /src/colour.h: -------------------------------------------------------------------------------- 1 | /* a colour colour in a workspace 2 | */ 3 | 4 | /* 5 | 6 | Copyright (C) 1991-2003 The National Gallery 7 | 8 | This program is free software; you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation; either version 2 of the License, or 11 | (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License along 19 | with this program; if not, write to the Free Software Foundation, Inc., 20 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | 22 | */ 23 | 24 | /* 25 | 26 | These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk 27 | 28 | */ 29 | 30 | #define COLOUR_TYPE (colour_get_type()) 31 | #define COLOUR(obj) \ 32 | (G_TYPE_CHECK_INSTANCE_CAST((obj), COLOUR_TYPE, Colour)) 33 | #define COLOUR_CLASS(klass) \ 34 | (G_TYPE_CHECK_CLASS_CAST((klass), COLOUR_TYPE, ColourClass)) 35 | #define IS_COLOUR(obj) \ 36 | (G_TYPE_CHECK_INSTANCE_TYPE((obj), COLOUR_TYPE)) 37 | #define IS_COLOUR_CLASS(klass) \ 38 | (G_TYPE_CHECK_CLASS_TYPE((klass), COLOUR_TYPE)) 39 | #define COLOUR_GET_CLASS(obj) \ 40 | (G_TYPE_INSTANCE_GET_CLASS((obj), COLOUR_TYPE, ColourClass)) 41 | 42 | struct _Colour { 43 | Classmodel parent_class; 44 | 45 | /* Class fields. 46 | */ 47 | double value[3]; 48 | char *colour_space; 49 | 50 | /* Build view caption here. 51 | */ 52 | VipsBuf caption; 53 | }; 54 | 55 | typedef struct _ColourClass { 56 | ClassmodelClass parent_class; 57 | 58 | /* My methods. 59 | */ 60 | } ColourClass; 61 | 62 | Imageinfo *colour_ii_new(Colour *colour); 63 | void colour_set_rgb(Colour *colour, double rgb[3]); 64 | 65 | GType colour_get_type(void); 66 | -------------------------------------------------------------------------------- /src/colourview.h: -------------------------------------------------------------------------------- 1 | /* a colourview in a workspace 2 | */ 3 | 4 | /* 5 | 6 | Copyright (C) 1991-2003 The National Gallery 7 | 8 | This program is free software; you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation; either version 2 of the License, or 11 | (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License along 19 | with this program; if not, write to the Free Software Foundation, Inc., 20 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | 22 | */ 23 | 24 | /* 25 | 26 | These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk 27 | 28 | */ 29 | 30 | #define COLOURVIEW_TYPE (colourview_get_type()) 31 | #define COLOURVIEW(obj) \ 32 | (G_TYPE_CHECK_INSTANCE_CAST((obj), COLOURVIEW_TYPE, Colourview)) 33 | #define COLOURVIEW_CLASS(klass) \ 34 | (G_TYPE_CHECK_CLASS_CAST((klass), COLOURVIEW_TYPE, ColourviewClass)) 35 | #define IS_COLOURVIEW(obj) \ 36 | (G_TYPE_CHECK_INSTANCE_TYPE((obj), COLOURVIEW_TYPE)) 37 | #define IS_COLOURVIEW_CLASS(klass) \ 38 | (G_TYPE_CHECK_CLASS_TYPE((klass), COLOURVIEW_TYPE)) 39 | #define COLOURVIEW_GET_CLASS(obj) \ 40 | (G_TYPE_INSTANCE_GET_CLASS((obj), COLOURVIEW_TYPE, ColourviewClass)) 41 | 42 | typedef struct _Colourview { 43 | Graphicview parent_object; 44 | 45 | GtkWidget *top; 46 | Imagedisplay *imagedisplay; 47 | GtkWidget *label; 48 | } Colourview; 49 | 50 | typedef struct _ColourviewClass { 51 | GraphicviewClass parent_class; 52 | 53 | /* My methods. 54 | */ 55 | } ColourviewClass; 56 | 57 | GType colourview_get_type(void); 58 | View *colourview_new(void); 59 | -------------------------------------------------------------------------------- /src/displaybar.h: -------------------------------------------------------------------------------- 1 | /* the display control widgets 2 | */ 3 | 4 | /* 5 | 6 | Copyright (C) 1991-2003 The National Gallery 7 | 8 | This program is free software; you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation; either version 2 of the License, or 11 | (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License along 19 | with this program; if not, write to the Free Software Foundation, Inc., 20 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | 22 | */ 23 | 24 | /* 25 | 26 | These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk 27 | 28 | */ 29 | 30 | #ifndef __DISPLAYBAR_H 31 | #define __DISPLAYBAR_H 32 | 33 | #define DISPLAYBAR_TYPE (displaybar_get_type()) 34 | 35 | G_DECLARE_FINAL_TYPE(Displaybar, displaybar, NIP4, DISPLAYBAR, GtkWidget) 36 | 37 | #define DISPLAYBAR(obj) \ 38 | (G_TYPE_CHECK_INSTANCE_CAST((obj), DISPLAYBAR_TYPE, Displaybar)) 39 | 40 | Displaybar *displaybar_new(Imagewindow *win); 41 | 42 | #endif /* __DISPLAYBAR_H */ 43 | -------------------------------------------------------------------------------- /src/dump.h: -------------------------------------------------------------------------------- 1 | /* Decls for dump.c 2 | */ 3 | 4 | /* 5 | 6 | Copyright (C) 1991-2003 The National Gallery 7 | 8 | This program is free software; you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation; either version 2 of the License, or 11 | (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License along 19 | with this program; if not, write to the Free Software Foundation, Inc., 20 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | 22 | */ 23 | 24 | /* 25 | 26 | These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk 27 | 28 | */ 29 | 30 | char *decode_BinOp(BinOp op); 31 | char *decode_UnOp(UnOp op); 32 | char *decode_NodeType(NodeType tag); 33 | char *decode_CombinatorType(CombinatorType comb); 34 | char *decode_SymbolType(SymbolType t); 35 | char *decode_SymbolType_user(SymbolType t); 36 | 37 | void *dump_tiny(Symbol *sym); 38 | void *dump_symbol(Symbol *sym); 39 | void dump_expr(Expr *expr); 40 | void dump_compile(Compile *compile); 41 | void dump_symbol_table(void); 42 | void *dump_kit(Toolkit *kit); 43 | Symbol *sym(char *name); 44 | void psym(char *name); 45 | void psymv(char *name); 46 | void pgraph(PElement *graph); 47 | 48 | void graph_heap(int nsp, HeapNode *hn); 49 | void graph_test(Heap *heap); 50 | 51 | void *dump_tree(ParseNode *n); 52 | 53 | void dump_links(Symbol *sym); 54 | void *dump_link(Link *link); 55 | 56 | void dump_symbol_heap(Symbol *sym); 57 | -------------------------------------------------------------------------------- /src/editview.h: -------------------------------------------------------------------------------- 1 | /* abstract base class for text editable view widgets 2 | */ 3 | 4 | /* 5 | 6 | Copyright (C) 1991-2003 The National Gallery 7 | 8 | This program is free software; you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation; either version 2 of the License, or 11 | (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License along 19 | with this program; if not, write to the Free Software Foundation, Inc., 20 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | 22 | */ 23 | 24 | /* 25 | 26 | These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk 27 | 28 | */ 29 | 30 | #define EDITVIEW_TYPE (editview_get_type()) 31 | #define EDITVIEW(obj) \ 32 | (G_TYPE_CHECK_INSTANCE_CAST((obj), EDITVIEW_TYPE, Editview)) 33 | #define EDITVIEW_CLASS(klass) \ 34 | (G_TYPE_CHECK_CLASS_CAST((klass), EDITVIEW_TYPE, EditviewClass)) 35 | #define IS_EDITVIEW(obj) \ 36 | (G_TYPE_CHECK_INSTANCE_TYPE((obj), EDITVIEW_TYPE)) 37 | #define IS_EDITVIEW_CLASS(klass) \ 38 | (G_TYPE_CHECK_CLASS_TYPE((klass), EDITVIEW_TYPE)) 39 | #define EDITVIEW_GET_CLASS(obj) \ 40 | (G_TYPE_INSTANCE_GET_CLASS((obj), EDITVIEW_TYPE, EditviewClass)) 41 | 42 | typedef struct _Editview { 43 | Graphicview parent_object; 44 | 45 | /* Widgets. 46 | */ 47 | GtkWidget *top; 48 | GtkWidget *label; /* Display caption here */ 49 | GtkWidget *ientry; /* Edit value here */ 50 | } Editview; 51 | 52 | typedef struct _EditviewClass { 53 | GraphicviewClass parent_class; 54 | 55 | /* My methods. 56 | */ 57 | } EditviewClass; 58 | 59 | GType editview_get_type(void); 60 | void editview_set_entry(Editview *editview, const char *fmt, ...) 61 | __attribute__((format(printf, 2, 3))); 62 | -------------------------------------------------------------------------------- /src/enumtypes.c.in: -------------------------------------------------------------------------------- 1 | /*** BEGIN file-header ***/ 2 | /* auto-generated enums */ 3 | 4 | #include "nip4.h" 5 | 6 | /*** END file-header ***/ 7 | 8 | /*** BEGIN file-production ***/ 9 | /* enumerations from "@basename@" */ 10 | /*** END file-production ***/ 11 | 12 | /*** BEGIN value-header ***/ 13 | GType 14 | @enum_name@_get_type(void) 15 | { 16 | static gsize gtype_id = 0; 17 | 18 | if (g_once_init_enter(>ype_id)) { 19 | static const G@Type@Value values[] = { 20 | /*** END value-header ***/ 21 | 22 | /*** BEGIN value-production ***/ 23 | { @VALUENAME@, "@VALUENAME@", "@valuenick@" }, 24 | /*** END value-production ***/ 25 | 26 | /*** BEGIN value-tail ***/ 27 | { 0, NULL, NULL } 28 | }; 29 | 30 | GType new_type = 31 | g_@type@_register_static(g_intern_static_string("@EnumName@"), values); 32 | g_once_init_leave(>ype_id, new_type); 33 | } 34 | 35 | return (GType) gtype_id; 36 | } 37 | /*** END value-tail ***/ 38 | 39 | -------------------------------------------------------------------------------- /src/enumtypes.h.in: -------------------------------------------------------------------------------- 1 | /*** BEGIN file-header ***/ 2 | #ifndef ENUM_TYPES_H 3 | #define ENUM_TYPES_H 4 | 5 | G_BEGIN_DECLS 6 | 7 | /*** END file-header ***/ 8 | 9 | /*** BEGIN file-production ***/ 10 | /* enumerations from "@basename@" */ 11 | /*** END file-production ***/ 12 | 13 | /*** BEGIN value-header ***/ 14 | GType @enum_name@_get_type(void) G_GNUC_CONST; 15 | #define @ENUMNAME@_TYPE (@enum_name@_get_type()) 16 | /*** END value-header ***/ 17 | 18 | /*** BEGIN file-tail ***/ 19 | G_END_DECLS 20 | 21 | #endif /*ENUM_TYPES_H*/ 22 | /*** END file-tail ***/ 23 | -------------------------------------------------------------------------------- /src/expression.h: -------------------------------------------------------------------------------- 1 | /* an editable expression in a workspace 2 | */ 3 | 4 | /* 5 | 6 | Copyright (C) 1991-2003 The National Gallery 7 | 8 | This program is free software; you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation; either version 2 of the License, or 11 | (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License along 19 | with this program; if not, write to the Free Software Foundation, Inc., 20 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | 22 | */ 23 | 24 | /* 25 | 26 | These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk 27 | 28 | */ 29 | 30 | #define EXPRESSION_TYPE (expression_get_type()) 31 | #define EXPRESSION(obj) \ 32 | (G_TYPE_CHECK_INSTANCE_CAST((obj), EXPRESSION_TYPE, Expression)) 33 | #define EXPRESSION_CLASS(klass) \ 34 | (G_TYPE_CHECK_CLASS_CAST((klass), EXPRESSION_TYPE, ExpressionClass)) 35 | #define IS_EXPRESSION(obj) \ 36 | (G_TYPE_CHECK_INSTANCE_TYPE((obj), EXPRESSION_TYPE)) 37 | #define IS_EXPRESSION_CLASS(klass) \ 38 | (G_TYPE_CHECK_CLASS_TYPE((klass), EXPRESSION_TYPE)) 39 | #define EXPRESSION_GET_CLASS(obj) \ 40 | (G_TYPE_INSTANCE_GET_CLASS((obj), EXPRESSION_TYPE, ExpressionClass)) 41 | 42 | struct _Expression { 43 | Classmodel parent_class; 44 | 45 | /* We don't have a model for the expression: instead we just grab the 46 | * value/formula from our MEMBER_VALUE itext. Much simpler. 47 | */ 48 | }; 49 | 50 | typedef struct _ExpressionClass { 51 | ClassmodelClass parent_class; 52 | 53 | /* My methods. 54 | */ 55 | } ExpressionClass; 56 | 57 | GType expression_get_type(void); 58 | 59 | iText *expression_get_itext(Expression *expression); 60 | -------------------------------------------------------------------------------- /src/expressionview.h: -------------------------------------------------------------------------------- 1 | /* a textview button in a workspace 2 | */ 3 | 4 | /* 5 | 6 | Copyright (C) 1991-2003 The National Gallery 7 | 8 | This program is free software; you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation; either version 2 of the License, or 11 | (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License along 19 | with this program; if not, write to the Free Software Foundation, Inc., 20 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | 22 | */ 23 | 24 | /* 25 | 26 | These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk 27 | 28 | */ 29 | 30 | #define EXPRESSIONVIEW_TYPE (expressionview_get_type()) 31 | #define EXPRESSIONVIEW(obj) \ 32 | (G_TYPE_CHECK_INSTANCE_CAST((obj), EXPRESSIONVIEW_TYPE, Expressionview)) 33 | #define EXPRESSIONVIEW_CLASS(klass) \ 34 | (G_TYPE_CHECK_CLASS_CAST((klass), EXPRESSIONVIEW_TYPE, ExpressionviewClass)) 35 | #define IS_EXPRESSIONVIEW(obj) \ 36 | (G_TYPE_CHECK_INSTANCE_TYPE((obj), EXPRESSIONVIEW_TYPE)) 37 | #define IS_EXPRESSIONVIEW_CLASS(klass) \ 38 | (G_TYPE_CHECK_CLASS_TYPE((klass), EXPRESSIONVIEW_TYPE)) 39 | #define EXPRESSIONVIEW_GET_CLASS(obj) \ 40 | (G_TYPE_INSTANCE_GET_CLASS((obj), EXPRESSIONVIEW_TYPE, ExpressionviewClass)) 41 | 42 | typedef struct _Expressionview { 43 | Graphicview parent_object; 44 | 45 | GtkWidget *top; 46 | Formula *formula; 47 | } Expressionview; 48 | 49 | typedef struct _ExpressionviewClass { 50 | GraphicviewClass parent_class; 51 | 52 | /* My methods. 53 | */ 54 | } ExpressionviewClass; 55 | 56 | GType expressionview_get_type(void); 57 | View *expressionview_new(void); 58 | -------------------------------------------------------------------------------- /src/fontname.h: -------------------------------------------------------------------------------- 1 | /* a fontname in a workspace 2 | */ 3 | 4 | /* 5 | 6 | Copyright (C) 1991-2003 The National Gallery 7 | 8 | This program is free software; you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation; either version 2 of the License, or 11 | (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License along 19 | with this program; if not, write to the Free Software Foundation, Inc., 20 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | 22 | */ 23 | 24 | /* 25 | 26 | These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk 27 | 28 | */ 29 | 30 | #define FONTNAME_TYPE (fontname_get_type()) 31 | #define FONTNAME(obj) \ 32 | (G_TYPE_CHECK_INSTANCE_CAST((obj), FONTNAME_TYPE, Fontname)) 33 | #define FONTNAME_CLASS(klass) \ 34 | (G_TYPE_CHECK_CLASS_CAST((klass), FONTNAME_TYPE, FontnameClass)) 35 | #define IS_FONTNAME(obj) \ 36 | (G_TYPE_CHECK_INSTANCE_TYPE((obj), FONTNAME_TYPE)) 37 | #define IS_FONTNAME_CLASS(klass) \ 38 | (G_TYPE_CHECK_CLASS_TYPE((klass), FONTNAME_TYPE)) 39 | #define FONTNAME_GET_CLASS(obj) \ 40 | (G_TYPE_INSTANCE_GET_CLASS((obj), FONTNAME_TYPE, FontnameClass)) 41 | 42 | typedef struct _Fontname { 43 | Classmodel model; 44 | 45 | char *value; 46 | } Fontname; 47 | 48 | typedef struct _FontnameClass { 49 | ClassmodelClass parent_class; 50 | 51 | /* My methods. 52 | */ 53 | } FontnameClass; 54 | 55 | GType fontname_get_type(void); 56 | -------------------------------------------------------------------------------- /src/fontnameview.h: -------------------------------------------------------------------------------- 1 | /* a fontname view in a workspace 2 | */ 3 | 4 | /* 5 | 6 | Copyright (C) 1991-2003 The National Gallery 7 | 8 | This program is free software; you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation; either version 2 of the License, or 11 | (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License along 19 | with this program; if not, write to the Free Software Foundation, Inc., 20 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | 22 | */ 23 | 24 | /* 25 | 26 | These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk 27 | 28 | */ 29 | 30 | #define FONTNAMEVIEW_TYPE (fontnameview_get_type()) 31 | #define FONTNAMEVIEW(obj) \ 32 | (G_TYPE_CHECK_INSTANCE_CAST((obj), FONTNAMEVIEW_TYPE, Fontnameview)) 33 | #define FONTNAMEVIEW_CLASS(klass) \ 34 | (G_TYPE_CHECK_CLASS_CAST((klass), FONTNAMEVIEW_TYPE, FontnameviewClass)) 35 | #define IS_FONTNAMEVIEW(obj) \ 36 | (G_TYPE_CHECK_INSTANCE_TYPE((obj), FONTNAMEVIEW_TYPE)) 37 | #define IS_FONTNAMEVIEW_CLASS(klass) \ 38 | (G_TYPE_CHECK_CLASS_TYPE((klass), FONTNAMEVIEW_TYPE)) 39 | #define FONTNAMEVIEW_GET_CLASS(obj) \ 40 | (G_TYPE_INSTANCE_GET_CLASS((obj), FONTNAMEVIEW_TYPE, FontnameviewClass)) 41 | 42 | typedef struct _Fontnameview { 43 | Graphicview parent_object; 44 | 45 | GtkWidget *top; 46 | GtkWidget *label; 47 | GtkWidget *button; 48 | } Fontnameview; 49 | 50 | typedef struct _FontnameviewClass { 51 | GraphicviewClass parent_class; 52 | 53 | /* My methods. 54 | */ 55 | } FontnameviewClass; 56 | 57 | GType fontnameview_get_type(void); 58 | View *fontnameview_new(void); 59 | -------------------------------------------------------------------------------- /src/fuzzy.h: -------------------------------------------------------------------------------- 1 | #ifndef __FUZZY_H 2 | #define __FUZZY_H 3 | 4 | typedef struct _Fuzzy { 5 | const char *field; 6 | guint distance; 7 | } Fuzzy; 8 | 9 | GSList *fuzzy_match(char **fields, const char *pattern); 10 | 11 | #endif /* __FUZZY_H */ 12 | -------------------------------------------------------------------------------- /src/gtk/colourview.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /src/gtk/editview.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 33 | 34 | -------------------------------------------------------------------------------- /src/gtk/expressionview.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 23 | 24 | -------------------------------------------------------------------------------- /src/gtk/fontnameview.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 37 | 38 | -------------------------------------------------------------------------------- /src/gtk/formula.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /src/gtk/ientry.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 18 | 19 | -------------------------------------------------------------------------------- /src/gtk/iimageview.css: -------------------------------------------------------------------------------- 1 | .caption { 2 | background-color: #eed680; 3 | color: black; 4 | font-size: x-small; 5 | } 6 | -------------------------------------------------------------------------------- /src/gtk/iimageview.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /src/gtk/imageui.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 49 | 50 | -------------------------------------------------------------------------------- /src/gtk/itextview.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | 17 | -------------------------------------------------------------------------------- /src/gtk/nip4.css: -------------------------------------------------------------------------------- 1 | .shadow_widget { 2 | background-color: #5D7555; 3 | } 4 | 5 | .parent_widget { 6 | background-color: #1F4151; 7 | } 8 | 9 | .child_widget { 10 | background-color: #421F51; 11 | } 12 | 13 | .selected_widget { 14 | background-color: #83A67F; 15 | } 16 | 17 | .error_widget { 18 | background-color: #802020; 19 | } 20 | 21 | .dirty_widget { 22 | background-color: #4f3e22; 23 | } 24 | 25 | .centre_widget label { 26 | font-weight: bold; 27 | font-size: large; 28 | } 29 | 30 | .widget { 31 | background-color: #454545; 32 | color: white; 33 | } 34 | 35 | .error_top { 36 | font-size: large; 37 | font-weight: bold; 38 | } 39 | 40 | .error_sub { 41 | font-size: small; 42 | } 43 | 44 | .column_name { 45 | font-weight: bold; 46 | } 47 | 48 | .column_caption { 49 | font-size: small; 50 | font-style: italic; 51 | } 52 | 53 | .column_body { 54 | background-color: #353535; 55 | } 56 | 57 | .info { 58 | font-family: mono; 59 | } 60 | 61 | #rowview-frame { 62 | border-radius: 0px; 63 | } 64 | 65 | #rowview-frame.top { 66 | border-top-left-radius: 8px; 67 | border-top-right-radius: 8px; 68 | } 69 | 70 | #rowview-frame.bottom { 71 | border-bottom-left-radius: 8px; 72 | border-bottom-right-radius: 8px; 73 | } 74 | 75 | .left { 76 | border-top-right-radius: 0px; 77 | border-bottom-right-radius: 0px; 78 | } 79 | 80 | .right { 81 | border-top-left-radius: 0px; 82 | border-bottom-left-radius: 0px; 83 | } 84 | 85 | .tool-name { 86 | margin-top: 1px; 87 | margin-bottom: 1px; 88 | margin-left: 4px; 89 | margin-right: 4px; 90 | } 91 | -------------------------------------------------------------------------------- /src/gtk/optionview.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 27 | 28 | -------------------------------------------------------------------------------- /src/gtk/pathnameview.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 29 | 30 | -------------------------------------------------------------------------------- /src/gtk/plotview.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /src/gtk/properties.css: -------------------------------------------------------------------------------- 1 | .properties-label { 2 | } 3 | 4 | .properties-value { 5 | } 6 | 7 | .properties-label-box, .properties-input-box { 8 | padding: 2px 2px 2px 8px; 9 | } 10 | 11 | .even { 12 | background-color: rgba(0, 0, 0, .1); 13 | } 14 | 15 | .properties-label { 16 | color: gray; 17 | } 18 | 19 | .properties-label.matching-substring { 20 | color: white; 21 | font-weight: bold; 22 | } 23 | 24 | .properties-input-box { 25 | } 26 | -------------------------------------------------------------------------------- /src/gtk/properties.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 47 | 48 | -------------------------------------------------------------------------------- /src/gtk/rhsview.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 20 | 21 | -------------------------------------------------------------------------------- /src/gtk/rowview.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /src/gtk/saveoptions.css: -------------------------------------------------------------------------------- 1 | 2 | #saveoptions-label { 3 | color: gray; 4 | margin-top: 5px; 5 | } 6 | -------------------------------------------------------------------------------- /src/gtk/sliderview.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 29 | 30 | -------------------------------------------------------------------------------- /src/gtk/spin.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /src/gtk/subcolumnview.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/gtk/toggleview.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 14 | 15 | -------------------------------------------------------------------------------- /src/gtk/tslider.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 34 | 35 | -------------------------------------------------------------------------------- /src/gtk/valueview.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/iarrow.h: -------------------------------------------------------------------------------- 1 | /* a ip region class in a workspace 2 | */ 3 | 4 | /* 5 | 6 | Copyright (C) 1991-2003 The National Gallery 7 | 8 | This program is free software; you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation; either version 2 of the License, or 11 | (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License along 19 | with this program; if not, write to the Free Software Foundation, Inc., 20 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | 22 | */ 23 | 24 | /* 25 | 26 | These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk 27 | 28 | */ 29 | 30 | #define IARROW_TYPE (iarrow_get_type()) 31 | #define IARROW(obj) \ 32 | (G_TYPE_CHECK_INSTANCE_CAST((obj), IARROW_TYPE, iArrow)) 33 | #define IARROW_CLASS(klass) \ 34 | (G_TYPE_CHECK_CLASS_CAST((klass), IARROW_TYPE, iArrowClass)) 35 | #define IS_IARROW(obj) \ 36 | (G_TYPE_CHECK_INSTANCE_TYPE((obj), IARROW_TYPE)) 37 | #define IS_IARROW_CLASS(klass) \ 38 | (G_TYPE_CHECK_CLASS_TYPE((klass), IARROW_TYPE)) 39 | #define IARROW_GET_CLASS(obj) \ 40 | (G_TYPE_INSTANCE_GET_CLASS((obj), IARROW_TYPE, iArrowClass)) 41 | 42 | struct _iArrow { 43 | Classmodel parent_class; 44 | 45 | /* Class fields. 46 | */ 47 | iRegionInstance instance; 48 | 49 | /* Private ... build iobject caption here. 50 | */ 51 | VipsBuf caption_buffer; 52 | }; 53 | 54 | typedef struct _iArrowClass { 55 | ClassmodelClass parent_class; 56 | 57 | /* My methods. 58 | */ 59 | } iArrowClass; 60 | 61 | GType iarrow_get_type(void); 62 | -------------------------------------------------------------------------------- /src/imagedisplay.h: -------------------------------------------------------------------------------- 1 | /* a drawing area that draws an image 2 | */ 3 | 4 | /* 5 | 6 | Copyright (C) 1991-2003 The National Gallery 7 | 8 | This program is free software; you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation; either version 2 of the License, or 11 | (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License along 19 | with this program; if not, write to the Free Software Foundation, Inc., 20 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | 22 | */ 23 | 24 | /* 25 | 26 | These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk 27 | 28 | */ 29 | 30 | #ifndef __IMAGEDISPLAY_H 31 | #define __IMAGEDISPLAY_H 32 | 33 | #define IMAGEDISPLAY_TYPE (imagedisplay_get_type()) 34 | #define IMAGEDISPLAY NIP4_IMAGEDISPLAY 35 | 36 | G_DECLARE_FINAL_TYPE(Imagedisplay, imagedisplay, 37 | NIP4, IMAGEDISPLAY, GtkDrawingArea) 38 | 39 | void imagedisplay_image_to_gtk(Imagedisplay *imagedisplay, 40 | double x_image, double y_image, double *x_gtk, double *y_gtk); 41 | void imagedisplay_gtk_to_image(Imagedisplay *imagedisplay, 42 | double x_gtk, double y_gtk, double *x_image, double *y_image); 43 | 44 | Imagedisplay *imagedisplay_new(Tilesource *tilesource); 45 | 46 | #endif /* __IMAGEDISPLAY_H */ 47 | -------------------------------------------------------------------------------- /src/infobar.h: -------------------------------------------------------------------------------- 1 | /* a status bar for the iamge display window 2 | */ 3 | 4 | /* 5 | 6 | Copyright (C) 1991-2003 The National Gallery 7 | 8 | This program is free software; you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation; either version 2 of the License, or 11 | (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License along 19 | with this program; if not, write to the Free Software Foundation, Inc., 20 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | 22 | */ 23 | 24 | /* 25 | 26 | These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk 27 | 28 | */ 29 | 30 | #ifndef __INFOBAR_H 31 | #define __INFOBAR_H 32 | 33 | #define INFOBAR_TYPE (infobar_get_type()) 34 | 35 | G_DECLARE_FINAL_TYPE(Infobar, infobar, NIP4, INFOBAR, GtkWidget) 36 | 37 | #define INFOBAR(obj) \ 38 | (G_TYPE_CHECK_INSTANCE_CAST((obj), INFOBAR_TYPE, Infobar)) 39 | 40 | Infobar *infobar_new(Imagewindow *win); 41 | 42 | #endif /* __INFOBAR_H */ 43 | -------------------------------------------------------------------------------- /src/iregiongroup.h: -------------------------------------------------------------------------------- 1 | /* base model for a client regions on an imageview 2 | */ 3 | 4 | /* 5 | 6 | Copyright (C) 1991-2003 The National Gallery 7 | 8 | This program is free software; you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation; either version 2 of the License, or 11 | (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License along 19 | with this program; if not, write to the Free Software Foundation, Inc., 20 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | 22 | */ 23 | 24 | /* 25 | 26 | These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk 27 | 28 | */ 29 | 30 | #define IREGIONGROUP_TYPE (iregiongroup_get_type()) 31 | #define IREGIONGROUP(obj) \ 32 | (G_TYPE_CHECK_INSTANCE_CAST((obj), IREGIONGROUP_TYPE, iRegiongroup)) 33 | #define IREGIONGROUP_CLASS(klass) \ 34 | (G_TYPE_CHECK_CLASS_CAST((klass), IREGIONGROUP_TYPE, iRegiongroupClass)) 35 | #define IS_IREGIONGROUP(obj) \ 36 | (G_TYPE_CHECK_INSTANCE_TYPE((obj), IREGIONGROUP_TYPE)) 37 | #define IS_IREGIONGROUP_CLASS(klass) \ 38 | (G_TYPE_CHECK_CLASS_TYPE((klass), IREGIONGROUP_TYPE)) 39 | #define IREGIONGROUP_GET_CLASS(obj) \ 40 | (G_TYPE_INSTANCE_GET_CLASS((obj), IREGIONGROUP_TYPE, iRegiongroupClass)) 41 | 42 | struct _iRegiongroup { 43 | Classmodel parent_class; 44 | }; 45 | 46 | typedef struct _iRegiongroupClass { 47 | ClassmodelClass parent_class; 48 | 49 | /* My methods. 50 | */ 51 | } iRegiongroupClass; 52 | 53 | GType iregiongroup_get_type(void); 54 | iRegiongroup *iregiongroup_new(Classmodel *classmodel); 55 | -------------------------------------------------------------------------------- /src/iregionview.c: -------------------------------------------------------------------------------- 1 | /* display a region in a workspace 2 | */ 3 | 4 | /* 5 | 6 | Copyright (C) 1991-2003 The National Gallery 7 | 8 | This program is free software; you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation; either version 2 of the License, or 11 | (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License along 19 | with this program; if not, write to the Free Software Foundation, Inc., 20 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | 22 | */ 23 | 24 | /* 25 | 26 | These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk 27 | 28 | */ 29 | 30 | /* 31 | #define DEBUG 32 | */ 33 | 34 | #include "nip4.h" 35 | 36 | G_DEFINE_TYPE(iRegionview, iregionview, IIMAGEVIEW_TYPE) 37 | 38 | static void 39 | iregionview_class_init(iRegionviewClass *class) 40 | { 41 | /* Create signals. 42 | */ 43 | 44 | /* Init methods. 45 | */ 46 | } 47 | 48 | static void 49 | iregionview_init(iRegionview *iregionview) 50 | { 51 | #ifdef DEBUG 52 | printf("iregionview_init\n"); 53 | #endif /*DEBUG*/ 54 | } 55 | 56 | View * 57 | iregionview_new(void) 58 | { 59 | iRegionview *iregionview = g_object_new(IREGIONVIEW_TYPE, NULL); 60 | 61 | #ifdef DEBUG 62 | printf("iregionview_new\n"); 63 | #endif /*DEBUG*/ 64 | 65 | return VIEW(iregionview); 66 | } 67 | -------------------------------------------------------------------------------- /src/iregionview.h: -------------------------------------------------------------------------------- 1 | /* display a region in a workspace 2 | */ 3 | 4 | /* 5 | 6 | Copyright (C) 1991-2003 The National Gallery 7 | 8 | This program is free software; you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation; either version 2 of the License, or 11 | (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License along 19 | with this program; if not, write to the Free Software Foundation, Inc., 20 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | 22 | */ 23 | 24 | /* 25 | 26 | These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk 27 | 28 | */ 29 | 30 | #define IREGIONVIEW_TYPE (iregionview_get_type()) 31 | #define IREGIONVIEW(obj) \ 32 | (G_TYPE_CHECK_INSTANCE_CAST((obj), IREGIONVIEW_TYPE, iRegionview)) 33 | #define IREGIONVIEW_CLASS(klass) \ 34 | (G_TYPE_CHECK_CLASS_CAST((klass), IREGIONVIEW_TYPE, iRegionviewClass)) 35 | #define IS_IREGIONVIEW(obj) \ 36 | (G_TYPE_CHECK_INSTANCE_TYPE((obj), IREGIONVIEW_TYPE)) 37 | #define IS_IREGIONVIEW_CLASS(klass) \ 38 | (G_TYPE_CHECK_CLASS_TYPE((klass), IREGIONVIEW_TYPE)) 39 | #define IREGIONVIEW_GET_CLASS(obj) \ 40 | (G_TYPE_INSTANCE_GET_CLASS((obj), IREGIONVIEW_TYPE, iRegionviewClass)) 41 | 42 | typedef struct _iRegionview { 43 | iImageview parent_class; 44 | 45 | } iRegionview; 46 | 47 | typedef struct _iRegionviewClass { 48 | iImageviewClass parent_class; 49 | 50 | /* My methods. 51 | */ 52 | } iRegionviewClass; 53 | 54 | GType iregionview_get_type(void); 55 | View *iregionview_new(void); 56 | -------------------------------------------------------------------------------- /src/itextview.h: -------------------------------------------------------------------------------- 1 | /* a textview button in a workspace 2 | */ 3 | 4 | /* 5 | 6 | Copyright (C) 1991-2003 The National Gallery 7 | 8 | This program is free software; you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation; either version 2 of the License, or 11 | (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License along 19 | with this program; if not, write to the Free Software Foundation, Inc., 20 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | 22 | */ 23 | 24 | /* 25 | 26 | These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk 27 | 28 | */ 29 | 30 | #define ITEXTVIEW_TYPE (itextview_get_type()) 31 | #define ITEXTVIEW(obj) \ 32 | (G_TYPE_CHECK_INSTANCE_CAST((obj), ITEXTVIEW_TYPE, iTextview)) 33 | #define ITEXTVIEW_CLASS(klass) \ 34 | (G_TYPE_CHECK_CLASS_CAST((klass), ITEXTVIEW_TYPE, iTextviewClass)) 35 | #define IS_ITEXTVIEW(obj) \ 36 | (G_TYPE_CHECK_INSTANCE_TYPE((obj), ITEXTVIEW_TYPE)) 37 | #define IS_ITEXTVIEW_CLASS(klass) \ 38 | (G_TYPE_CHECK_CLASS_TYPE((klass), ITEXTVIEW_TYPE)) 39 | #define ITEXTVIEW_GET_CLASS(obj) \ 40 | (G_TYPE_INSTANCE_GET_CLASS((obj), ITEXTVIEW_TYPE, iTextviewClass)) 41 | 42 | typedef struct _iTextview { 43 | View view; 44 | 45 | /* Widgets. 46 | */ 47 | Formula *formula; 48 | } iTextview; 49 | 50 | typedef struct _iTextviewClass { 51 | ViewClass parent_class; 52 | 53 | /* My methods. 54 | */ 55 | } iTextviewClass; 56 | 57 | GType itextview_get_type(void); 58 | View *itextview_new(void); 59 | -------------------------------------------------------------------------------- /src/kplot/LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014--2016, Kristaps Dzonsons 2 | 3 | Permission to use, copy, modify, and/or distribute this software for any purpose 4 | with or without fee is hereby granted, provided that the above copyright notice 5 | and this permission notice appear in all copies. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 8 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 9 | FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 10 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 11 | OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 12 | TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF 13 | THIS SOFTWARE. 14 | 15 | -------------------------------------------------------------------------------- /src/kplot/border.c: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* 3 | * Copyright (c) 2014 Kristaps Dzonsons 4 | * 5 | * Permission to use, copy, modify, and distribute this software for any 6 | * purpose with or without fee is hereby granted, provided that the above 7 | * copyright notice and this permission notice appear in all copies. 8 | * 9 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | */ 17 | 18 | #include "kplot.h" 19 | 20 | void 21 | kplotctx_border_init(struct kplotctx *ctx) 22 | { 23 | double v; 24 | 25 | kplotctx_line_init(ctx, &ctx->cfg.borderline); 26 | 27 | if (BORDER_LEFT & ctx->cfg.border) { 28 | v = kplotctx_line_fix(ctx, 29 | ctx->cfg.borderline.sz, ctx->offs.x); 30 | cairo_move_to(ctx->cr, v, ctx->offs.y); 31 | cairo_rel_line_to(ctx->cr, 0.0, ctx->dims.y); 32 | } 33 | 34 | if (BORDER_RIGHT & ctx->cfg.border) { 35 | v = kplotctx_line_fix(ctx, 36 | ctx->cfg.borderline.sz, 37 | ctx->offs.x + ctx->dims.x); 38 | cairo_move_to(ctx->cr, v, ctx->offs.y); 39 | cairo_rel_line_to(ctx->cr, 0.0, ctx->dims.y); 40 | } 41 | 42 | if (BORDER_TOP & ctx->cfg.border) { 43 | v = kplotctx_line_fix(ctx, 44 | ctx->cfg.borderline.sz, ctx->offs.y); 45 | cairo_move_to(ctx->cr, ctx->offs.x, v); 46 | cairo_rel_line_to(ctx->cr, ctx->dims.x, 0.0); 47 | } 48 | 49 | if (BORDER_BOTTOM & ctx->cfg.border) { 50 | v = kplotctx_line_fix(ctx, 51 | ctx->cfg.borderline.sz, 52 | ctx->offs.y + ctx->dims.y); 53 | cairo_move_to(ctx->cr, ctx->offs.x, v); 54 | cairo_rel_line_to(ctx->cr, ctx->dims.x, 0.0); 55 | } 56 | 57 | cairo_stroke(ctx->cr); 58 | } 59 | -------------------------------------------------------------------------------- /src/kplot/colours.c: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* 3 | * Copyright (c) 2015 Kristaps Dzonsons 4 | * 5 | * Permission to use, copy, modify, and distribute this software for any 6 | * purpose with or without fee is hereby granted, provided that the above 7 | * copyright notice and this permission notice appear in all copies. 8 | * 9 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | */ 17 | 18 | #include "kplot.h" 19 | 20 | void 21 | kplotccfg_init_palette(struct kplotccfg *c, size_t palette) 22 | { 23 | 24 | switch (c->type) { 25 | case (KPLOTCTYPE_DEFAULT): 26 | c->type = KPLOTCTYPE_PALETTE; 27 | c->palette = palette; 28 | break; 29 | case (KPLOTCTYPE_PATTERN): 30 | assert(NULL != c->pattern); 31 | cairo_pattern_reference(c->pattern); 32 | break; 33 | default: 34 | break; 35 | } 36 | } 37 | 38 | -------------------------------------------------------------------------------- /src/kplot/compat.h: -------------------------------------------------------------------------------- 1 | // empty 2 | 3 | -------------------------------------------------------------------------------- /src/kplot/grid.c: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* 3 | * Copyright (c) 2014 Kristaps Dzonsons 4 | * 5 | * Permission to use, copy, modify, and distribute this software for any 6 | * purpose with or without fee is hereby granted, provided that the above 7 | * copyright notice and this permission notice appear in all copies. 8 | * 9 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | */ 17 | 18 | #include "kplot.h" 19 | 20 | static void 21 | kplotctx_grid_init_x(struct kplotctx *ctx, double offs, void *user_data) 22 | { 23 | double v = kplotctx_line_fix(ctx, 24 | ctx->cfg.gridline.sz, 25 | ctx->offs.x + offs * ctx->dims.x); 26 | 27 | cairo_move_to(ctx->cr, v, ctx->offs.y); 28 | cairo_rel_line_to(ctx->cr, 0.0, ctx->dims.y); 29 | } 30 | 31 | static void 32 | kplotctx_grid_init_y(struct kplotctx *ctx, double offs, void *user_data) 33 | { 34 | double v = kplotctx_line_fix(ctx, 35 | ctx->cfg.gridline.sz, 36 | ctx->offs.y + ctx->dims.y - offs * ctx->dims.y); 37 | 38 | cairo_move_to(ctx->cr, ctx->offs.x, v); 39 | cairo_rel_line_to(ctx->cr, ctx->dims.x, 0.0); 40 | } 41 | 42 | void 43 | kplotctx_grid_init(struct kplotctx *ctx) 44 | { 45 | kplotctx_line_init(ctx, &ctx->cfg.gridline); 46 | 47 | if (GRID_X & ctx->cfg.grid) 48 | kplot_loop_xtics(ctx, kplotctx_grid_init_x, NULL); 49 | 50 | if (GRID_Y & ctx->cfg.grid) 51 | kplot_loop_ytics(ctx, kplotctx_grid_init_y, NULL); 52 | 53 | cairo_stroke(ctx->cr); 54 | } 55 | -------------------------------------------------------------------------------- /src/kplot/margin.c: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* 3 | * Copyright (c) 2014 Kristaps Dzonsons 4 | * 5 | * Permission to use, copy, modify, and distribute this software for any 6 | * purpose with or without fee is hereby granted, provided that the above 7 | * copyright notice and this permission notice appear in all copies. 8 | * 9 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | */ 17 | 18 | #include "kplot.h" 19 | 20 | void 21 | kplotctx_margin_init(struct kplotctx *ctx) 22 | { 23 | 24 | ctx->dims.x = ctx->w; 25 | ctx->dims.y = ctx->h; 26 | 27 | if (MARGIN_LEFT & ctx->cfg.margin) { 28 | ctx->dims.x -= ctx->cfg.marginsz; 29 | ctx->offs.x = ctx->cfg.marginsz; 30 | } 31 | if (MARGIN_RIGHT & ctx->cfg.margin) 32 | ctx->dims.x -= ctx->cfg.marginsz; 33 | 34 | if (MARGIN_TOP & ctx->cfg.margin) { 35 | ctx->dims.y -= ctx->cfg.marginsz; 36 | ctx->offs.y = ctx->cfg.marginsz; 37 | } 38 | if (MARGIN_BOTTOM & ctx->cfg.margin) 39 | ctx->dims.y -= ctx->cfg.marginsz; 40 | } 41 | 42 | -------------------------------------------------------------------------------- /src/kplot/reallocarray.c: -------------------------------------------------------------------------------- 1 | /* From: https://git.musl-libc.org/cgit/musl/commit/?id=821083ac7b54eaa040d5a8ddc67c6206a175e0ca */ 2 | /* 3 | * Copyright (c) 2005-2020 Rich Felker, et al. 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining 6 | * a copy of this software and associated documentation files (the 7 | * "Software"), to deal in the Software without restriction, including 8 | * without limitation the rights to use, copy, modify, merge, publish, 9 | * distribute, sublicense, and/or sell copies of the Software, and to 10 | * permit persons to whom the Software is furnished to do so, subject to 11 | * the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be 14 | * included in all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | */ 24 | 25 | #ifdef HAVE_CONFIG_H 26 | #include 27 | #endif /*HAVE_CONFIG_H*/ 28 | 29 | #include 30 | #include 31 | 32 | #ifndef HAVE_REALLOCARRAY 33 | 34 | void * 35 | reallocarray(void *optr, size_t nmemb, size_t size) 36 | { 37 | if (size && nmemb > -1 / size) { 38 | errno = ENOMEM; 39 | return NULL; 40 | } 41 | 42 | return realloc(optr, size * nmemb); 43 | } 44 | 45 | #endif /* !HAVE_REALLOCARRAY */ 46 | -------------------------------------------------------------------------------- /src/kplot/vector.c: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /* 3 | * Copyright (c) 2014, 2015 Kristaps Dzonsons 4 | * 5 | * Permission to use, copy, modify, and distribute this software for any 6 | * purpose with or without fee is hereby granted, provided that the above 7 | * copyright notice and this permission notice appear in all copies. 8 | * 9 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | */ 17 | 18 | #include "kplot.h" 19 | 20 | struct kdata * 21 | kdata_vector_alloc(size_t step) 22 | { 23 | struct kdata *d; 24 | 25 | if (NULL == (d = calloc(1, sizeof(struct kdata)))) 26 | return(NULL); 27 | 28 | d->refs = 1; 29 | d->type = KDATA_VECTOR; 30 | d->d.vector.stepsz = step; 31 | return(d); 32 | } 33 | 34 | int 35 | kdata_vector_append(struct kdata *d, double x, double y) 36 | { 37 | void *p; 38 | 39 | if (KDATA_VECTOR != d->type) 40 | return(0); 41 | 42 | if (d->pairsz + 1 >= d->d.vector.pairbufsz) { 43 | while (d->pairsz + 1 >= d->d.vector.pairbufsz) 44 | d->d.vector.pairbufsz += d->d.vector.stepsz; 45 | assert(d->d.vector.pairbufsz > d->pairsz + 1); 46 | p = reallocarray(d->pairs, 47 | d->d.vector.pairbufsz, sizeof(struct kpair)); 48 | if (NULL == p) 49 | return(0); 50 | d->pairs = p; 51 | } 52 | 53 | d->pairsz++; 54 | return(kdata_set(d, d->pairsz - 1, x, y)); 55 | } 56 | 57 | int 58 | kdata_vector_set(struct kdata *d, size_t v, double x, double y) 59 | { 60 | 61 | if (KDATA_VECTOR != d->type || v >= d->pairsz) 62 | return(0); 63 | return(kdata_set(d, v, x, y)); 64 | } 65 | -------------------------------------------------------------------------------- /src/main.h: -------------------------------------------------------------------------------- 1 | // startup stuff 2 | 3 | /* 4 | 5 | Copyright (C) 1991-2003 The National Gallery 6 | 7 | This program is free software; you can redistribute it and/or modify 8 | it under the terms of the GNU General Public License as published by 9 | the Free Software Foundation; either version 2 of the License, or 10 | (at your option) any later version. 11 | 12 | This program is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | GNU General Public License for more details. 16 | 17 | You should have received a copy of the GNU General Public License along 18 | with this program; if not, write to the Free Software Foundation, Inc., 19 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | 21 | */ 22 | 23 | extern Workspaceroot *main_workspaceroot; 24 | extern Toolkitgroup *main_toolkitgroup; 25 | extern Symbol *main_symbol_root; 26 | extern Watchgroup *main_watchgroup; 27 | extern Imageinfogroup *main_imageinfogroup; 28 | 29 | extern void *main_c_stack_base; 30 | extern const char *main_argv0; 31 | 32 | extern gboolean main_option_time_save; 33 | extern gboolean main_option_profile; 34 | extern gboolean main_option_i18n; 35 | extern gboolean main_option_batch; 36 | extern gboolean main_option_no_load_menus; 37 | 38 | void set_prefix(const char *prefix); 39 | const char *get_prefix(void); 40 | 41 | void main_startup(int argc, char **argv); 42 | void main_shutdown(void); 43 | -------------------------------------------------------------------------------- /src/managedfile.h: -------------------------------------------------------------------------------- 1 | /* a managed FILE* ... for lazy file read 2 | */ 3 | 4 | /* 5 | 6 | Copyright (C) 1991-2003 The National Gallery 7 | 8 | This program is free software; you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation; either version 2 of the License, or 11 | (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License along 19 | with this program; if not, write to the Free Software Foundation, Inc., 20 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | 22 | */ 23 | 24 | /* 25 | 26 | These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk 27 | 28 | */ 29 | 30 | #define MANAGEDFILE_TYPE (managedfile_get_type()) 31 | #define MANAGEDFILE(obj) \ 32 | (G_TYPE_CHECK_INSTANCE_CAST((obj), MANAGEDFILE_TYPE, Managedfile)) 33 | #define MANAGEDFILE_CLASS(klass) \ 34 | (G_TYPE_CHECK_CLASS_CAST((klass), MANAGEDFILE_TYPE, ManagedfileClass)) 35 | #define IS_MANAGEDFILE(obj) \ 36 | (G_TYPE_CHECK_INSTANCE_TYPE((obj), MANAGEDFILE_TYPE)) 37 | #define IS_MANAGEDFILE_CLASS(klass) \ 38 | (G_TYPE_CHECK_CLASS_TYPE((klass), MANAGEDFILE_TYPE)) 39 | #define MANAGEDFILE_GET_CLASS(obj) \ 40 | (G_TYPE_INSTANCE_GET_CLASS((obj), MANAGEDFILE_TYPE, ManagedfileClass)) 41 | 42 | struct _Managedfile { 43 | Managed parent_object; 44 | 45 | iOpenFile *file; 46 | }; 47 | 48 | typedef struct _ManagedfileClass { 49 | ManagedClass parent_class; 50 | 51 | } ManagedfileClass; 52 | 53 | GType managedfile_get_type(void); 54 | 55 | Managedfile *managedfile_new(Heap *heap, const char *filename); 56 | int managedfile_getc(Managedfile *managedfile); 57 | -------------------------------------------------------------------------------- /src/managedgobject.h: -------------------------------------------------------------------------------- 1 | /* a managed gobject 2 | */ 3 | 4 | /* 5 | 6 | Copyright (C) 1991-2003 The National Gallery 7 | 8 | This program is free software; you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation; either version 2 of the License, or 11 | (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License along 19 | with this program; if not, write to the Free Software Foundation, Inc., 20 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | 22 | */ 23 | 24 | /* 25 | 26 | These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk 27 | 28 | */ 29 | 30 | #define MANAGEDGOBJECT_TYPE (managedgobject_get_type()) 31 | #define MANAGEDGOBJECT(obj) \ 32 | (G_TYPE_CHECK_INSTANCE_CAST((obj), MANAGEDGOBJECT_TYPE, Managedgobject)) 33 | #define MANAGEDGOBJECT_CLASS(klass) \ 34 | (G_TYPE_CHECK_CLASS_CAST((klass), \ 35 | MANAGEDGOBJECT_TYPE, ManagedgobjectClass)) 36 | #define IS_MANAGEDGOBJECT(obj) \ 37 | (G_TYPE_CHECK_INSTANCE_TYPE((obj), MANAGEDGOBJECT_TYPE)) 38 | #define IS_MANAGEDGOBJECT_CLASS(klass) \ 39 | (G_TYPE_CHECK_CLASS_TYPE((klass), MANAGEDGOBJECT_TYPE)) 40 | #define MANAGEDGOBJECT_GET_CLASS(obj) \ 41 | (G_TYPE_INSTANCE_GET_CLASS((obj), \ 42 | MANAGEDGOBJECT_TYPE, ManagedgobjectClass)) 43 | 44 | struct _Managedgobject { 45 | Managed parent_object; 46 | 47 | GObject *object; 48 | }; 49 | 50 | typedef struct _ManagedgobjectClass { 51 | ManagedClass parent_class; 52 | 53 | } ManagedgobjectClass; 54 | 55 | GType managedgobject_get_type(void); 56 | 57 | Managedgobject *managedgobject_new(Heap *heap, GObject *value); 58 | -------------------------------------------------------------------------------- /src/managedgvalue.h: -------------------------------------------------------------------------------- 1 | /* a managed gvalue 2 | */ 3 | 4 | /* 5 | 6 | Copyright (C) 1991-2003 The National Gallery 7 | 8 | This program is free software; you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation; either version 2 of the License, or 11 | (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License along 19 | with this program; if not, write to the Free Software Foundation, Inc., 20 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | 22 | */ 23 | 24 | /* 25 | 26 | These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk 27 | 28 | */ 29 | 30 | #define MANAGEDGVALUE_TYPE (managedgvalue_get_type()) 31 | #define MANAGEDGVALUE(obj) \ 32 | (G_TYPE_CHECK_INSTANCE_CAST((obj), MANAGEDGVALUE_TYPE, Managedgvalue)) 33 | #define MANAGEDGVALUE_CLASS(klass) \ 34 | (G_TYPE_CHECK_CLASS_CAST((klass), MANAGEDGVALUE_TYPE, ManagedgvalueClass)) 35 | #define IS_MANAGEDGVALUE(obj) \ 36 | (G_TYPE_CHECK_INSTANCE_TYPE((obj), MANAGEDGVALUE_TYPE)) 37 | #define IS_MANAGEDGVALUE_CLASS(klass) \ 38 | (G_TYPE_CHECK_CLASS_TYPE((klass), MANAGEDGVALUE_TYPE)) 39 | #define MANAGEDGVALUE_GET_CLASS(obj) \ 40 | (G_TYPE_INSTANCE_GET_CLASS((obj), MANAGEDGVALUE_TYPE, ManagedgvalueClass)) 41 | 42 | struct _Managedgvalue { 43 | Managed parent_object; 44 | 45 | GValue value; 46 | }; 47 | 48 | typedef struct _ManagedgvalueClass { 49 | ManagedClass parent_class; 50 | 51 | } ManagedgvalueClass; 52 | 53 | GType managedgvalue_get_type(void); 54 | 55 | void managedgvalue_set_value(Managedgvalue *managedgvalue, GValue *value); 56 | Managedgvalue *managedgvalue_new(Heap *heap, GValue *value); 57 | -------------------------------------------------------------------------------- /src/nip4marshal.list: -------------------------------------------------------------------------------- 1 | # see glib-genmarshal(1) for a detailed description of the file format, 2 | # possible parameter types are: 3 | # VOID indicates no return type, or no extra 4 | # parameters. if VOID is used as the parameter 5 | # list, no additional parameters may be present. 6 | # BOOLEAN for boolean types (gboolean) 7 | # CHAR for signed char types (gchar) 8 | # UCHAR for unsigned char types (guchar) 9 | # INT for signed integer types (gint) 10 | # UINT for unsigned integer types (guint) 11 | # LONG for signed long integer types (glong) 12 | # ULONG for unsigned long integer types (gulong) 13 | # ENUM for enumeration types (gint) 14 | # FLAGS for flag enumeration types (guint) 15 | # FLOAT for single-precision float types (gfloat) 16 | # DOUBLE for double-precision float types (gdouble) 17 | # STRING for string types (gchar*) 18 | # BOXED for boxed (anonymous but reference counted) types (GBoxed*) 19 | # POINTER for anonymous pointer types (gpointer) 20 | # PARAM for GParamSpec or derived types (GParamSpec*) 21 | # OBJECT for GObject or derived types (GObject*) 22 | # NONE deprecated alias for VOID 23 | # BOOL deprecated alias for BOOLEAN 24 | 25 | VOID: POINTER, INT 26 | VOID: POINTER, POINTER 27 | VOID: OBJECT, INT 28 | 29 | -------------------------------------------------------------------------------- /src/number.h: -------------------------------------------------------------------------------- 1 | /* a colour number in a workspace 2 | */ 3 | 4 | /* 5 | 6 | Copyright (C) 1991-2003 The National Gallery 7 | 8 | This program is free software; you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation; either version 2 of the License, or 11 | (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License along 19 | with this program; if not, write to the Free Software Foundation, Inc., 20 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | 22 | */ 23 | 24 | /* 25 | 26 | These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk 27 | 28 | */ 29 | 30 | #define NUMBER_TYPE (number_get_type()) 31 | #define NUMBER(obj) \ 32 | (G_TYPE_CHECK_INSTANCE_CAST((obj), NUMBER_TYPE, Number)) 33 | #define NUMBER_CLASS(klass) \ 34 | (G_TYPE_CHECK_CLASS_CAST((klass), NUMBER_TYPE, NumberClass)) 35 | #define IS_NUMBER(obj) \ 36 | (G_TYPE_CHECK_INSTANCE_TYPE((obj), NUMBER_TYPE)) 37 | #define IS_NUMBER_CLASS(klass) \ 38 | (G_TYPE_CHECK_CLASS_TYPE((klass), NUMBER_TYPE)) 39 | #define NUMBER_GET_CLASS(obj) \ 40 | (G_TYPE_INSTANCE_GET_CLASS((obj), NUMBER_TYPE, NumberClass)) 41 | 42 | struct _Number { 43 | Classmodel parent_class; 44 | 45 | /* Class fields. 46 | */ 47 | double value; 48 | }; 49 | 50 | typedef struct _NumberClass { 51 | ClassmodelClass parent_class; 52 | 53 | /* My methods. 54 | */ 55 | } NumberClass; 56 | 57 | GType number_get_type(void); 58 | -------------------------------------------------------------------------------- /src/numberview.h: -------------------------------------------------------------------------------- 1 | /* edit a number 2 | */ 3 | 4 | /* 5 | 6 | Copyright (C) 1991-2003 The National Gallery 7 | 8 | This program is free software; you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation; either version 2 of the License, or 11 | (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License along 19 | with this program; if not, write to the Free Software Foundation, Inc., 20 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | 22 | */ 23 | 24 | /* 25 | 26 | These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk 27 | 28 | */ 29 | 30 | #define NUMBERVIEW_TYPE (numberview_get_type()) 31 | #define NUMBERVIEW(obj) \ 32 | (G_TYPE_CHECK_INSTANCE_CAST((obj), NUMBERVIEW_TYPE, Numberview)) 33 | #define NUMBERVIEW_CLASS(klass) \ 34 | (G_TYPE_CHECK_CLASS_CAST((klass), NUMBERVIEW_TYPE, NumberviewClass)) 35 | #define IS_NUMBERVIEW(obj) \ 36 | (G_TYPE_CHECK_INSTANCE_TYPE((obj), NUMBERVIEW_TYPE)) 37 | #define IS_NUMBERVIEW_CLASS(klass) \ 38 | (G_TYPE_CHECK_CLASS_TYPE((klass), NUMBERVIEW_TYPE)) 39 | #define NUMBERVIEW_GET_CLASS(obj) \ 40 | (G_TYPE_INSTANCE_GET_CLASS((obj), NUMBERVIEW_TYPE, NumberviewClass)) 41 | 42 | typedef struct _Numberview { 43 | Editview parent_object; 44 | 45 | } Numberview; 46 | 47 | typedef struct _NumberviewClass { 48 | EditviewClass parent_class; 49 | 50 | /* My methods. 51 | */ 52 | } NumberviewClass; 53 | 54 | View *numberview_new(void); 55 | -------------------------------------------------------------------------------- /src/option.h: -------------------------------------------------------------------------------- 1 | /* a option menu in a workspace 2 | */ 3 | 4 | /* 5 | 6 | Copyright (C) 1991-2003 The National Gallery 7 | 8 | This program is free software; you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation; either version 2 of the License, or 11 | (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License along 19 | with this program; if not, write to the Free Software Foundation, Inc., 20 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | 22 | */ 23 | 24 | /* 25 | 26 | These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk 27 | 28 | */ 29 | 30 | #define OPTION_TYPE (option_get_type()) 31 | #define OPTION(obj) \ 32 | (G_TYPE_CHECK_INSTANCE_CAST((obj), OPTION_TYPE, Option)) 33 | #define OPTION_CLASS(klass) \ 34 | (G_TYPE_CHECK_CLASS_CAST((klass), OPTION_TYPE, OptionClass)) 35 | #define IS_OPTION(obj) \ 36 | (G_TYPE_CHECK_INSTANCE_TYPE((obj), OPTION_TYPE)) 37 | #define IS_OPTION_CLASS(klass) \ 38 | (G_TYPE_CHECK_CLASS_TYPE((klass), OPTION_TYPE)) 39 | #define OPTION_GET_CLASS(obj) \ 40 | (G_TYPE_INSTANCE_GET_CLASS((obj), OPTION_TYPE, OptionClass)) 41 | 42 | typedef struct _Option { 43 | Classmodel parent_class; 44 | 45 | /* Base class fields. 46 | */ 47 | GSList *labels; /* [[char]] for option fields */ 48 | int value; /* Index of current option */ 49 | } Option; 50 | 51 | typedef struct _OptionClass { 52 | ClassmodelClass parent_class; 53 | 54 | /* My methods. 55 | */ 56 | } OptionClass; 57 | 58 | GType option_get_type(void); 59 | -------------------------------------------------------------------------------- /src/path.h: -------------------------------------------------------------------------------- 1 | // Declarations supporting path.c 2 | 3 | /* 4 | 5 | Copyright (C) 1991-2003 The National Gallery 6 | 7 | This program is free software; you can redistribute it and/or modify 8 | it under the terms of the GNU General Public License as published by 9 | the Free Software Foundation; either version 2 of the License, or 10 | (at your option) any later version. 11 | 12 | This program is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | GNU General Public License for more details. 16 | 17 | You should have received a copy of the GNU General Public License along 18 | with this program; if not, write to the Free Software Foundation, Inc., 19 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | 21 | */ 22 | 23 | extern GSList *path_search_default; 24 | extern GSList *path_start_default; 25 | extern const char *path_tmp_default; 26 | 27 | /* Type of path_map functions. 28 | */ 29 | typedef void *(*path_map_fn)(const char *, void *, void *, void *); 30 | 31 | void path_rewrite_free_all(void); 32 | void path_rewrite_add(const char *old, const char *new, gboolean lock); 33 | void path_rewrite(char *buf); 34 | void path_compact(char *path); 35 | void path_expand(char *path); 36 | char *path_rewrite_file(const char *patt); 37 | 38 | GSList *path_parse(const char *path); 39 | char *path_unparse(GSList *path); 40 | void path_print(GSList *path); 41 | void path_free2(GSList *path); 42 | 43 | void *path_map(GSList *path, const char *patt, path_map_fn fn, void *a); 44 | void *path_map_dir(const char *dir, const char *patt, 45 | path_map_fn fn, void *a); 46 | char *path_find_file(const char *patt); 47 | 48 | void path_init(void); 49 | -------------------------------------------------------------------------------- /src/pathname.h: -------------------------------------------------------------------------------- 1 | /* a pathname in a workspace 2 | */ 3 | 4 | /* 5 | 6 | Copyright (C) 1991-2003 The National Gallery 7 | 8 | This program is free software; you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation; either version 2 of the License, or 11 | (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License along 19 | with this program; if not, write to the Free Software Foundation, Inc., 20 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | 22 | */ 23 | 24 | /* 25 | 26 | These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk 27 | 28 | */ 29 | 30 | #define PATHNAME_TYPE (pathname_get_type()) 31 | #define PATHNAME(obj) \ 32 | (G_TYPE_CHECK_INSTANCE_CAST((obj), PATHNAME_TYPE, Pathname)) 33 | #define PATHNAME_CLASS(klass) \ 34 | (G_TYPE_CHECK_CLASS_CAST((klass), PATHNAME_TYPE, PathnameClass)) 35 | #define IS_PATHNAME(obj) \ 36 | (G_TYPE_CHECK_INSTANCE_TYPE((obj), PATHNAME_TYPE)) 37 | #define IS_PATHNAME_CLASS(klass) \ 38 | (G_TYPE_CHECK_CLASS_TYPE((klass), PATHNAME_TYPE)) 39 | #define PATHNAME_GET_CLASS(obj) \ 40 | (G_TYPE_INSTANCE_GET_CLASS((obj), PATHNAME_TYPE, PathnameClass)) 41 | 42 | typedef struct _Pathname { 43 | Classmodel model; 44 | 45 | char *value; 46 | } Pathname; 47 | 48 | typedef struct _PathnameClass { 49 | ClassmodelClass parent_class; 50 | 51 | /* My methods. 52 | */ 53 | } PathnameClass; 54 | 55 | GType pathname_get_type(void); 56 | -------------------------------------------------------------------------------- /src/pathnameview.h: -------------------------------------------------------------------------------- 1 | /* a pathname view in a workspace 2 | */ 3 | 4 | /* 5 | 6 | Copyright (C) 1991-2003 The National Gallery 7 | 8 | This program is free software; you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation; either version 2 of the License, or 11 | (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License along 19 | with this program; if not, write to the Free Software Foundation, Inc., 20 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | 22 | */ 23 | 24 | /* 25 | 26 | These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk 27 | 28 | */ 29 | 30 | #define PATHNAMEVIEW_TYPE (pathnameview_get_type()) 31 | #define PATHNAMEVIEW(obj) \ 32 | (G_TYPE_CHECK_INSTANCE_CAST((obj), PATHNAMEVIEW_TYPE, Pathnameview)) 33 | #define PATHNAMEVIEW_CLASS(klass) \ 34 | (G_TYPE_CHECK_CLASS_CAST((klass), PATHNAMEVIEW_TYPE, PathnameviewClass)) 35 | #define IS_PATHNAMEVIEW(obj) \ 36 | (G_TYPE_CHECK_INSTANCE_TYPE((obj), PATHNAMEVIEW_TYPE)) 37 | #define IS_PATHNAMEVIEW_CLASS(klass) \ 38 | (G_TYPE_CHECK_CLASS_TYPE((klass), PATHNAMEVIEW_TYPE)) 39 | #define PATHNAMEVIEW_GET_CLASS(obj) \ 40 | (G_TYPE_INSTANCE_GET_CLASS((obj), PATHNAMEVIEW_TYPE, PathnameviewClass)) 41 | 42 | typedef struct _Pathnameview { 43 | Graphicview parent_object; 44 | 45 | GtkWidget *top; 46 | GtkWidget *label; 47 | GtkWidget *button; 48 | } Pathnameview; 49 | 50 | typedef struct _PathnameviewClass { 51 | GraphicviewClass parent_class; 52 | 53 | /* My methods. 54 | */ 55 | } PathnameviewClass; 56 | 57 | GType pathnameview_get_type(void); 58 | View *pathnameview_new(void); 59 | -------------------------------------------------------------------------------- /src/plotdisplay.h: -------------------------------------------------------------------------------- 1 | /* a drawing area that draws an plot 2 | */ 3 | 4 | /* 5 | 6 | Copyright (C) 1991-2003 The National Gallery 7 | 8 | This program is free software; you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation; either version 2 of the License, or 11 | (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License along 19 | with this program; if not, write to the Free Software Foundation, Inc., 20 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | 22 | */ 23 | 24 | /* 25 | 26 | These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk 27 | 28 | */ 29 | 30 | #ifndef __PLOTDISPLAY_H 31 | #define __PLOTDISPLAY_H 32 | 33 | #define PLOTDISPLAY_TYPE (plotdisplay_get_type()) 34 | #define PLOTDISPLAY NIP4_PLOTDISPLAY 35 | 36 | G_DECLARE_FINAL_TYPE(Plotdisplay, plotdisplay, 37 | NIP4, PLOTDISPLAY, GtkDrawingArea) 38 | 39 | Plotdisplay *plotdisplay_new(Plot *plot); 40 | gboolean plotdisplay_gtk_to_data(Plotdisplay *plotdisplay, 41 | double gtk_x, double gtk_y, 42 | double *data_x, double *data_y); 43 | Imageinfo *plotdisplay_to_image(Plot *plot, Reduce *rc, int width, int height); 44 | 45 | #endif /* __PLOTDISPLAY_H */ 46 | -------------------------------------------------------------------------------- /src/plotview.h: -------------------------------------------------------------------------------- 1 | /* a plotview in a workspace 2 | */ 3 | 4 | /* 5 | 6 | Copyright (C) 1991-2003 The National Gallery 7 | 8 | This program is free software; you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation; either version 2 of the License, or 11 | (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License along 19 | with this program; if not, write to the Free Software Foundation, Inc., 20 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | 22 | */ 23 | 24 | /* 25 | 26 | These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk 27 | 28 | */ 29 | 30 | #define PLOTVIEW_TYPE (plotview_get_type()) 31 | #define PLOTVIEW(obj) \ 32 | (G_TYPE_CHECK_INSTANCE_CAST((obj), PLOTVIEW_TYPE, Plotview)) 33 | #define PLOTVIEW_CLASS(klass) \ 34 | (G_TYPE_CHECK_CLASS_CAST((klass), PLOTVIEW_TYPE, PlotviewClass)) 35 | #define IS_PLOTVIEW(obj) \ 36 | (G_TYPE_CHECK_INSTANCE_TYPE((obj), PLOTVIEW_TYPE)) 37 | #define IS_PLOTVIEW_CLASS(klass) \ 38 | (G_TYPE_CHECK_CLASS_TYPE((klass), PLOTVIEW_TYPE)) 39 | #define PLOTVIEW_GET_CLASS(obj) \ 40 | (G_TYPE_INSTANCE_GET_CLASS((obj), PLOTVIEW_TYPE, PlotviewClass)) 41 | 42 | typedef struct _Plotview { 43 | Graphicview parent_object; 44 | 45 | GtkWidget *top; 46 | GtkWidget *label; 47 | GtkWidget *plotdisplay; 48 | 49 | } Plotview; 50 | 51 | typedef struct _PlotviewClass { 52 | GraphicviewClass parent_class; 53 | 54 | /* My methods. 55 | */ 56 | } PlotviewClass; 57 | 58 | GType plotview_get_type(void); 59 | View *plotview_new(void); 60 | -------------------------------------------------------------------------------- /src/plotwindow.h: -------------------------------------------------------------------------------- 1 | /* a plot display window 2 | */ 3 | 4 | /* 5 | 6 | Copyright (C) 1991-2003 The National Gallery 7 | 8 | This program is free software; you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation; either version 2 of the License, or 11 | (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License along 19 | with this program; if not, write to the Free Software Foundation, Inc., 20 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | 22 | */ 23 | 24 | /* 25 | 26 | These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk 27 | 28 | */ 29 | 30 | #ifndef __PLOTWINDOW_H 31 | #define __PLOTWINDOW_H 32 | 33 | #define PLOTWINDOW_TYPE (plotwindow_get_type()) 34 | #define PLOTWINDOW(obj) \ 35 | (G_TYPE_CHECK_INSTANCE_CAST((obj), PLOTWINDOW_TYPE, Plotwindow)) 36 | #define PLOTWINDOW_CLASS(klass) \ 37 | (G_TYPE_CHECK_CLASS_CAST((klass), PLOTWINDOW_TYPE, PlotwindowClass)) 38 | #define IS_PLOTWINDOW(obj) \ 39 | (G_TYPE_CHECK_INSTANCE_TYPE((obj), PLOTWINDOW_TYPE)) 40 | #define IS_PLOTWINDOW_CLASS(klass) \ 41 | (G_TYPE_CHECK_CLASS_TYPE((klass), PLOTWINDOW_TYPE)) 42 | #define PLOTWINDOW_GET_CLASS(obj) \ 43 | (G_TYPE_INSTANCE_GET_CLASS((obj), PLOTWINDOW_TYPE, PlotwindowClass)) 44 | 45 | G_DECLARE_FINAL_TYPE(Plotwindow, plotwindow, 46 | NIP4, PLOTWINDOW, GtkApplicationWindow) 47 | 48 | Plotwindow *plotwindow_new(App *app); 49 | 50 | #endif /* __PLOTWINDOW_H */ 51 | -------------------------------------------------------------------------------- /src/predicate.h: -------------------------------------------------------------------------------- 1 | /* Declarations for predicate.c 2 | */ 3 | 4 | /* 5 | 6 | Copyright (C) 1991-2003 The National Gallery 7 | 8 | This program is free software; you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation; either version 2 of the License, or 11 | (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License along 19 | with this program; if not, write to the Free Software Foundation, Inc., 20 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | 22 | */ 23 | 24 | /* 25 | 26 | These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk 27 | 28 | */ 29 | 30 | gboolean is_system(Symbol *sym); 31 | gboolean is_separator(Symbol *sym); 32 | gboolean is_member(Symbol *sym); 33 | gboolean is_class(Compile *compile); 34 | gboolean is_super(Symbol *sym); 35 | gboolean is_this(Symbol *sym); 36 | gboolean is_member_enclosing(Compile *compile, Symbol *sym); 37 | gboolean is_top(Symbol *sym); 38 | gboolean is_scope(Symbol *sym); 39 | gboolean is_memberfunc(Compile *compile); 40 | gboolean is_value(Symbol *sym); 41 | gboolean is_ancestor(Symbol *context, Symbol *sym); 42 | gboolean is_menuable(Symbol *sym); 43 | -------------------------------------------------------------------------------- /src/prefcolumnview.c: -------------------------------------------------------------------------------- 1 | // shim for prefcolumnview 2 | 3 | #include "nip4.h" 4 | 5 | View * 6 | prefcolumnview_new(void) 7 | { 8 | return NULL; 9 | } 10 | -------------------------------------------------------------------------------- /src/prefcolumnview.h: -------------------------------------------------------------------------------- 1 | // shim for prefcolumnview 2 | 3 | #define IS_PREFCOLUMNVIEW(X) (FALSE) 4 | 5 | View *prefcolumnview_new(void); 6 | -------------------------------------------------------------------------------- /src/prefs.c: -------------------------------------------------------------------------------- 1 | #include "nip4.h" 2 | 3 | void 4 | prefs_set(const char *name, const char *fmt, ...) 5 | { 6 | } 7 | -------------------------------------------------------------------------------- /src/prefs.h: -------------------------------------------------------------------------------- 1 | void prefs_set(const char *name, const char *fmt, ...); 2 | -------------------------------------------------------------------------------- /src/prefworkspaceview.c: -------------------------------------------------------------------------------- 1 | // shim for prefworkspaceview 2 | 3 | #include "nip4.h" 4 | 5 | View * 6 | prefworkspaceview_new(void) 7 | { 8 | return NULL; 9 | } 10 | -------------------------------------------------------------------------------- /src/prefworkspaceview.h: -------------------------------------------------------------------------------- 1 | // shim for prefcolumnview 2 | 3 | #define IS_PREFWORKSPACEVIEW(X) (FALSE) 4 | 5 | View *prefworkspaceview_new(void); 6 | -------------------------------------------------------------------------------- /src/program.h: -------------------------------------------------------------------------------- 1 | // programming window 2 | 3 | /* 4 | 5 | Copyright (C) 1991-2003 The National Gallery 6 | Copyright (C) 2004-2023 libvips.org 7 | 8 | This program is free software; you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation; either version 2 of the License, or 11 | (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License along 19 | with this program; if not, write to the Free Software Foundation, Inc., 20 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | 22 | */ 23 | 24 | #ifndef __PROGRAM_H 25 | #define __PROGRAM_H 26 | 27 | #define PROGRAM_TYPE (program_get_type()) 28 | 29 | #define PROGRAM NIP4_PROGRAM 30 | #define IS_PROGRAM NIP4_IS_PROGRAM 31 | 32 | G_DECLARE_FINAL_TYPE(Program, program, NIP4, PROGRAM, GtkApplicationWindow) 33 | 34 | Program *program_new(App *app, Toolkitgroup *kitg); 35 | 36 | #endif /* __PROGRAM_H */ 37 | -------------------------------------------------------------------------------- /src/properties.h: -------------------------------------------------------------------------------- 1 | /* show image properties 2 | */ 3 | 4 | /* 5 | 6 | Copyright (C) 1991-2003 The National Gallery 7 | 8 | This program is free software; you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation; either version 2 of the License, or 11 | (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License along 19 | with this program; if not, write to the Free Software Foundation, Inc., 20 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | 22 | */ 23 | 24 | /* 25 | 26 | These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk 27 | 28 | */ 29 | 30 | #ifndef __PROPERTIES_H 31 | #define __PROPERTIES_H 32 | 33 | #define PROPERTIES_TYPE (properties_get_type()) 34 | 35 | G_DECLARE_FINAL_TYPE(Properties, properties, NIP4, PROPERTIES, GtkWidget); 36 | 37 | #define PROPERTIES NIP4_PROPERTIES 38 | 39 | #endif /* __PROPERTIES_H */ 40 | -------------------------------------------------------------------------------- /src/recover.h: -------------------------------------------------------------------------------- 1 | /* recover workspace backup 2 | */ 3 | 4 | /* 5 | 6 | Copyright (C) 1991-2003 The National Gallery 7 | 8 | This program is free software; you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation; either version 2 of the License, or 11 | (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License along 19 | with this program; if not, write to the Free Software Foundation, Inc., 20 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | 22 | */ 23 | 24 | /* 25 | 26 | These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk 27 | 28 | */ 29 | 30 | #ifndef __RECOVER_H 31 | #define __RECOVER_H 32 | 33 | #define RECOVER_TYPE (recover_get_type()) 34 | 35 | #define RECOVER NIP4_RECOVER 36 | 37 | G_DECLARE_FINAL_TYPE(Recover, recover, NIP4, RECOVER, GtkApplicationWindow); 38 | 39 | Recover *recover_new(GtkWindow *parent_window, Workspaceroot *wsr); 40 | 41 | #endif /* __RECOVER_H */ 42 | -------------------------------------------------------------------------------- /src/rhsview.h: -------------------------------------------------------------------------------- 1 | /* the rhs of a tallyrow ... group together everything to the right of the 2 | * button 3 | */ 4 | 5 | /* 6 | 7 | Copyright (C) 1991-2003 The National Gallery 8 | 9 | This program is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation; either version 2 of the License, or 12 | (at your option) any later version. 13 | 14 | This program is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License along 20 | with this program; if not, write to the Free Software Foundation, Inc., 21 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 22 | 23 | */ 24 | 25 | /* 26 | 27 | These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk 28 | 29 | */ 30 | 31 | #define RHSVIEW_TYPE (rhsview_get_type()) 32 | #define RHSVIEW(obj) \ 33 | (G_TYPE_CHECK_INSTANCE_CAST((obj), RHSVIEW_TYPE, Rhsview)) 34 | #define RHSVIEW_CLASS(klass) \ 35 | (G_TYPE_CHECK_CLASS_CAST((klass), RHSVIEW_TYPE, RhsviewClass)) 36 | #define IS_RHSVIEW(obj) \ 37 | (G_TYPE_CHECK_INSTANCE_TYPE((obj), RHSVIEW_TYPE)) 38 | #define IS_RHSVIEW_CLASS(klass) \ 39 | (G_TYPE_CHECK_CLASS_TYPE((klass), RHSVIEW_TYPE)) 40 | #define RHSVIEW_GET_CLASS(obj) \ 41 | (G_TYPE_INSTANCE_GET_CLASS((obj), RHSVIEW_TYPE, RhsviewClass)) 42 | 43 | struct _Rhsview { 44 | View item; 45 | 46 | Rowview *rview; 47 | 48 | View *graphic; /* Our three elements */ 49 | View *scol; 50 | View *itext; 51 | 52 | GtkWidget *grid; /* Lay out elements in this */ 53 | RhsFlags flags; /* Last vis set we set */ 54 | }; 55 | 56 | typedef struct _RhsviewClass { 57 | ViewClass parent_class; 58 | 59 | /* My methods. 60 | */ 61 | } RhsviewClass; 62 | 63 | GType rhsview_get_type(void); 64 | View *rhsview_new(void); 65 | -------------------------------------------------------------------------------- /src/saveoptions.h: -------------------------------------------------------------------------------- 1 | /* show image save options 2 | */ 3 | 4 | /* 5 | 6 | Copyright (C) 1991-2003 The National Gallery 7 | 8 | This program is free software; you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation; either version 2 of the License, or 11 | (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License along 19 | with this program; if not, write to the Free Software Foundation, Inc., 20 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | 22 | */ 23 | 24 | /* 25 | 26 | These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk 27 | 28 | */ 29 | 30 | #ifndef __SAVE_OPTIONS_H 31 | #define __SAVE_OPTIONS_H 32 | 33 | #define SAVE_OPTIONS_TYPE (save_options_get_type()) 34 | 35 | #define SAVE_OPTIONS NIP4_SAVE_OPTIONS 36 | 37 | G_DECLARE_FINAL_TYPE(SaveOptions, save_options, NIP4, SAVE_OPTIONS, GtkDialog); 38 | 39 | SaveOptions *save_options_new(GtkWindow *parent_window, 40 | VipsImage *in, const char *filename); 41 | 42 | #endif /* __SAVE_OPTIONS_H */ 43 | -------------------------------------------------------------------------------- /src/secret.h: -------------------------------------------------------------------------------- 1 | /* Decls for secret.c 2 | */ 3 | 4 | /* 5 | 6 | Copyright (C) 1991-2003 The National Gallery 7 | 8 | This program is free software; you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation; either version 2 of the License, or 11 | (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License along 19 | with this program; if not, write to the Free Software Foundation, Inc., 20 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | 22 | */ 23 | 24 | /* 25 | 26 | These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk 27 | 28 | */ 29 | 30 | void secret_build(Compile *compile); 31 | -------------------------------------------------------------------------------- /src/slider.h: -------------------------------------------------------------------------------- 1 | /* a slider in a workspace 2 | */ 3 | 4 | /* 5 | 6 | Copyright (C) 1991-2003 The National Gallery 7 | 8 | This program is free software; you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation; either version 2 of the License, or 11 | (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License along 19 | with this program; if not, write to the Free Software Foundation, Inc., 20 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | 22 | */ 23 | 24 | /* 25 | 26 | These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk 27 | 28 | */ 29 | 30 | #define SLIDER_TYPE (slider_get_type()) 31 | #define SLIDER(obj) \ 32 | (G_TYPE_CHECK_INSTANCE_CAST((obj), SLIDER_TYPE, Slider)) 33 | #define SLIDER_CLASS(klass) \ 34 | (G_TYPE_CHECK_CLASS_CAST((klass), SLIDER_TYPE, SliderClass)) 35 | #define IS_SLIDER(obj) \ 36 | (G_TYPE_CHECK_INSTANCE_TYPE((obj), SLIDER_TYPE)) 37 | #define IS_SLIDER_CLASS(klass) \ 38 | (G_TYPE_CHECK_CLASS_TYPE((klass), SLIDER_TYPE)) 39 | #define SLIDER_GET_CLASS(obj) \ 40 | (G_TYPE_INSTANCE_GET_CLASS((obj), SLIDER_TYPE, SliderClass)) 41 | 42 | typedef struct _Slider { 43 | Classmodel parent_object; 44 | 45 | double from; 46 | double to; 47 | double value; 48 | } Slider; 49 | 50 | typedef struct _SliderClass { 51 | ClassmodelClass parent_class; 52 | 53 | /* My methods. 54 | */ 55 | } SliderClass; 56 | 57 | GType slider_get_type(void); 58 | -------------------------------------------------------------------------------- /src/sliderview.h: -------------------------------------------------------------------------------- 1 | /* a sliderview in a workspace 2 | */ 3 | 4 | /* 5 | 6 | Copyright (C) 1991-2003 The National Gallery 7 | 8 | This program is free software; you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation; either version 2 of the License, or 11 | (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License along 19 | with this program; if not, write to the Free Software Foundation, Inc., 20 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | 22 | */ 23 | 24 | /* 25 | 26 | These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk 27 | 28 | */ 29 | 30 | #define SLIDERVIEW_TYPE (sliderview_get_type()) 31 | #define SLIDERVIEW(obj) \ 32 | (G_TYPE_CHECK_INSTANCE_CAST((obj), SLIDERVIEW_TYPE, Sliderview)) 33 | #define SLIDERVIEW_CLASS(klass) \ 34 | (G_TYPE_CHECK_CLASS_CAST((klass), SLIDERVIEW_TYPE, SliderviewClass)) 35 | #define IS_SLIDERVIEW(obj) \ 36 | (G_TYPE_CHECK_INSTANCE_TYPE((obj), SLIDERVIEW_TYPE)) 37 | #define IS_SLIDERVIEW_CLASS(klass) \ 38 | (G_TYPE_CHECK_CLASS_TYPE((klass), SLIDERVIEW_TYPE)) 39 | #define SLIDERVIEW_GET_CLASS(obj) \ 40 | (G_TYPE_INSTANCE_GET_CLASS((obj), SLIDERVIEW_TYPE, SliderviewClass)) 41 | 42 | typedef struct _Sliderview { 43 | Graphicview parent_object; 44 | 45 | /* My instance vars. 46 | */ 47 | GtkWidget *top; 48 | GtkWidget *label; 49 | Tslider *tslider; 50 | } Sliderview; 51 | 52 | typedef struct _SliderviewClass { 53 | GraphicviewClass parent_class; 54 | 55 | /* My methods. 56 | */ 57 | } SliderviewClass; 58 | 59 | GType sliderview_get_type(void); 60 | View *sliderview_new(void); 61 | -------------------------------------------------------------------------------- /src/spin.h: -------------------------------------------------------------------------------- 1 | /* a pair of spin buttons 2 | */ 3 | 4 | /* 5 | 6 | Copyright (C) 1991-2003 The National Gallery 7 | 8 | This program is free software; you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation; either version 2 of the License, or 11 | (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License along 19 | with this program; if not, write to the Free Software Foundation, Inc., 20 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | 22 | */ 23 | 24 | /* 25 | 26 | These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk 27 | 28 | */ 29 | 30 | #define SPIN_TYPE (spin_get_type()) 31 | #define SPIN(obj) \ 32 | (G_TYPE_CHECK_INSTANCE_CAST((obj), SPIN_TYPE, Spin)) 33 | #define SPIN_CLASS(klass) \ 34 | (G_TYPE_CHECK_CLASS_CAST((klass), SPIN_TYPE, SpinClass)) 35 | #define IS_SPIN(obj) \ 36 | (G_TYPE_CHECK_INSTANCE_TYPE((obj), SPIN_TYPE)) 37 | #define IS_SPIN_CLASS(klass) \ 38 | (G_TYPE_CHECK_CLASS_TYPE((klass), SPIN_TYPE)) 39 | #define SPIN_GET_CLASS(obj) \ 40 | (G_TYPE_INSTANCE_GET_CLASS((obj), SPIN_TYPE, SpinClass)) 41 | 42 | typedef struct _Spin { 43 | GtkWidget parent_object; 44 | 45 | GtkWidget *top; 46 | } Spin; 47 | 48 | typedef struct _SpinClass { 49 | GtkWidgetClass parent_class; 50 | 51 | void (*up_click)(Spin *); 52 | void (*down_click)(Spin *); 53 | } SpinClass; 54 | 55 | GType spin_get_type(void); 56 | GtkWidget *spin_new(void); 57 | -------------------------------------------------------------------------------- /src/stringi.h: -------------------------------------------------------------------------------- 1 | /* an editable string in a workspace 2 | */ 3 | 4 | /* 5 | 6 | Copyright (C) 1991-2003 The National Gallery 7 | 8 | This program is free software; you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation; either version 2 of the License, or 11 | (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License along 19 | with this program; if not, write to the Free Software Foundation, Inc., 20 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | 22 | */ 23 | 24 | /* 25 | 26 | These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk 27 | 28 | */ 29 | 30 | #define STRING_TYPE (string_get_type()) 31 | #define STRING(obj) \ 32 | (G_TYPE_CHECK_INSTANCE_CAST((obj), STRING_TYPE, String)) 33 | #define STRING_CLASS(klass) \ 34 | (G_TYPE_CHECK_CLASS_CAST((klass), STRING_TYPE, StringClass)) 35 | #define IS_STRING(obj) \ 36 | (G_TYPE_CHECK_INSTANCE_TYPE((obj), STRING_TYPE)) 37 | #define IS_STRING_CLASS(klass) \ 38 | (G_TYPE_CHECK_CLASS_TYPE((klass), STRING_TYPE)) 39 | #define STRING_GET_CLASS(obj) \ 40 | (G_TYPE_INSTANCE_GET_CLASS((obj), STRING_TYPE, StringClass)) 41 | 42 | struct _String { 43 | Classmodel parent_class; 44 | 45 | /* Class fields. 46 | */ 47 | char *value; 48 | }; 49 | 50 | typedef struct _StringClass { 51 | ClassmodelClass parent_class; 52 | 53 | /* My methods. 54 | */ 55 | } StringClass; 56 | 57 | GType string_get_type(void); 58 | -------------------------------------------------------------------------------- /src/stringview.h: -------------------------------------------------------------------------------- 1 | /* edit a string 2 | */ 3 | 4 | /* 5 | 6 | Copyright (C) 1991-2003 The National Gallery 7 | 8 | This program is free software; you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation; either version 2 of the License, or 11 | (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License along 19 | with this program; if not, write to the Free Software Foundation, Inc., 20 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | 22 | */ 23 | 24 | /* 25 | 26 | These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk 27 | 28 | */ 29 | 30 | #define STRINGVIEW_TYPE (stringview_get_type()) 31 | #define STRINGVIEW(obj) \ 32 | (G_TYPE_CHECK_INSTANCE_CAST((obj), STRINGVIEW_TYPE, Stringview)) 33 | #define STRINGVIEW_CLASS(klass) \ 34 | (G_TYPE_CHECK_CLASS_CAST((klass), STRINGVIEW_TYPE, StringviewClass)) 35 | #define IS_STRINGVIEW(obj) \ 36 | (G_TYPE_CHECK_INSTANCE_TYPE((obj), STRINGVIEW_TYPE)) 37 | #define IS_STRINGVIEW_CLASS(klass) \ 38 | (G_TYPE_CHECK_CLASS_TYPE((klass), STRINGVIEW_TYPE)) 39 | #define STRINGVIEW_GET_CLASS(obj) \ 40 | (G_TYPE_INSTANCE_GET_CLASS((obj), STRINGVIEW_TYPE, StringviewClass)) 41 | 42 | typedef struct _Stringview { 43 | Editview parent_object; 44 | 45 | } Stringview; 46 | 47 | typedef struct _StringviewClass { 48 | EditviewClass parent_class; 49 | 50 | /* My methods. 51 | */ 52 | } StringviewClass; 53 | 54 | GType stringview_get_type(void); 55 | View *stringview_new(void); 56 | -------------------------------------------------------------------------------- /src/toggle.h: -------------------------------------------------------------------------------- 1 | /* a toggle button in a workspace 2 | */ 3 | 4 | /* 5 | 6 | Copyright (C) 1991-2003 The National Gallery 7 | 8 | This program is free software; you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation; either version 2 of the License, or 11 | (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License along 19 | with this program; if not, write to the Free Software Foundation, Inc., 20 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | 22 | */ 23 | 24 | /* 25 | 26 | These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk 27 | 28 | */ 29 | 30 | #define TOGGLE_TYPE (toggle_get_type()) 31 | #define TOGGLE(obj) \ 32 | (G_TYPE_CHECK_INSTANCE_CAST((obj), TOGGLE_TYPE, Toggle)) 33 | #define TOGGLE_CLASS(klass) \ 34 | (G_TYPE_CHECK_CLASS_CAST((klass), TOGGLE_TYPE, ToggleClass)) 35 | #define IS_TOGGLE(obj) \ 36 | (G_TYPE_CHECK_INSTANCE_TYPE((obj), TOGGLE_TYPE)) 37 | #define IS_TOGGLE_CLASS(klass) \ 38 | (G_TYPE_CHECK_CLASS_TYPE((klass), TOGGLE_TYPE)) 39 | #define TOGGLE_GET_CLASS(obj) \ 40 | (G_TYPE_INSTANCE_GET_CLASS((obj), TOGGLE_TYPE, ToggleClass)) 41 | 42 | typedef struct _Toggle { 43 | Classmodel parent_class; 44 | 45 | /* My instance vars. 46 | */ 47 | gboolean value; 48 | } Toggle; 49 | 50 | typedef struct _ToggleClass { 51 | ClassmodelClass parent_class; 52 | 53 | /* My methods. 54 | */ 55 | } ToggleClass; 56 | 57 | GType toggle_get_type(void); 58 | -------------------------------------------------------------------------------- /src/toggleview.h: -------------------------------------------------------------------------------- 1 | /* a toggleview button in a workspace 2 | */ 3 | 4 | /* 5 | 6 | Copyright (C) 1991-2003 The National Gallery 7 | 8 | This program is free software; you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation; either version 2 of the License, or 11 | (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License along 19 | with this program; if not, write to the Free Software Foundation, Inc., 20 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | 22 | */ 23 | 24 | /* 25 | 26 | These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk 27 | 28 | */ 29 | 30 | #define TOGGLEVIEW_TYPE (toggleview_get_type()) 31 | #define TOGGLEVIEW(obj) \ 32 | (G_TYPE_CHECK_INSTANCE_CAST((obj), TOGGLEVIEW_TYPE, Toggleview)) 33 | #define TOGGLEVIEW_CLASS(klass) \ 34 | (G_TYPE_CHECK_CLASS_CAST((klass), TOGGLEVIEW_TYPE, ToggleviewClass)) 35 | #define IS_TOGGLEVIEW(obj) \ 36 | (G_TYPE_CHECK_INSTANCE_TYPE((obj), TOGGLEVIEW_TYPE)) 37 | #define IS_TOGGLEVIEW_CLASS(klass) \ 38 | (G_TYPE_CHECK_CLASS_TYPE((klass), TOGGLEVIEW_TYPE)) 39 | #define TOGGLEVIEW_GET_CLASS(obj) \ 40 | (G_TYPE_INSTANCE_GET_CLASS((obj), TOGGLEVIEW_TYPE, ToggleviewClass)) 41 | 42 | typedef struct _Toggleview { 43 | Graphicview parent_object; 44 | 45 | /* My instance vars. 46 | */ 47 | GtkWidget *toggle; 48 | } Toggleview; 49 | 50 | typedef struct _ToggleviewClass { 51 | GraphicviewClass parent_class; 52 | 53 | /* My methods. 54 | */ 55 | } ToggleviewClass; 56 | 57 | GType toggleview_get_type(void); 58 | View *toggleview_new(void); 59 | -------------------------------------------------------------------------------- /src/toolkitview.c: -------------------------------------------------------------------------------- 1 | #include "nip4.h" 2 | 3 | View * 4 | toolkitview_new(void) 5 | { 6 | return NULL; 7 | } 8 | -------------------------------------------------------------------------------- /src/toolkitview.h: -------------------------------------------------------------------------------- 1 | View *toolkitview_new(void); 2 | -------------------------------------------------------------------------------- /src/toolview.c: -------------------------------------------------------------------------------- 1 | #include "nip4.h" 2 | 3 | View * 4 | toolview_new(void) 5 | { 6 | return NULL; 7 | } 8 | -------------------------------------------------------------------------------- /src/toolview.h: -------------------------------------------------------------------------------- 1 | 2 | View *toolview_new(void); 3 | -------------------------------------------------------------------------------- /src/valueview.h: -------------------------------------------------------------------------------- 1 | /* a basic view of a model ... just show the caption 2 | */ 3 | 4 | /* 5 | 6 | Copyright (C) 1991-2003 The National Gallery 7 | 8 | This program is free software; you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation; either version 2 of the License, or 11 | (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License along 19 | with this program; if not, write to the Free Software Foundation, Inc., 20 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | 22 | */ 23 | 24 | /* 25 | 26 | These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk 27 | 28 | */ 29 | 30 | #define VALUEVIEW_TYPE (valueview_get_type()) 31 | #define VALUEVIEW(obj) \ 32 | (G_TYPE_CHECK_INSTANCE_CAST((obj), VALUEVIEW_TYPE, Valueview)) 33 | #define VALUEVIEW_CLASS(klass) \ 34 | (G_TYPE_CHECK_CLASS_CAST((klass), VALUEVIEW_TYPE, ValueviewClass)) 35 | #define IS_VALUEVIEW(obj) \ 36 | (G_TYPE_CHECK_INSTANCE_TYPE((obj), VALUEVIEW_TYPE)) 37 | #define IS_VALUEVIEW_CLASS(klass) \ 38 | (G_TYPE_CHECK_CLASS_TYPE((klass), VALUEVIEW_TYPE)) 39 | #define VALUEVIEW_GET_CLASS(obj) \ 40 | (G_TYPE_INSTANCE_GET_CLASS((obj), VALUEVIEW_TYPE, ValueviewClass)) 41 | 42 | typedef struct _Valueview { 43 | Graphicview parent_object; 44 | 45 | GtkWidget *label; 46 | } Valueview; 47 | 48 | typedef struct _ValueviewClass { 49 | GraphicviewClass parent_class; 50 | 51 | /* My methods. 52 | */ 53 | } ValueviewClass; 54 | 55 | GType valueview_get_type(void); 56 | View *valueview_new(void); 57 | -------------------------------------------------------------------------------- /src/vipsobject.h: -------------------------------------------------------------------------------- 1 | /* Links to VipsObject. 2 | */ 3 | 4 | /* 5 | 6 | Copyright (C) 1991-2003 The National Gallery 7 | 8 | This program is free software; you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation; either version 2 of the License, or 11 | (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License along 19 | with this program; if not, write to the Free Software Foundation, Inc., 20 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | 22 | */ 23 | 24 | /* 25 | 26 | These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk 27 | 28 | */ 29 | 30 | void vo_object_new(Reduce *rc, PElement *out, const char *name, 31 | PElement *required, PElement *optional); 32 | void vo_call(Reduce *rc, PElement *out, const char *name, 33 | PElement *required, PElement *optional); 34 | void vo_call9(Reduce *rc, PElement *out, const char *name, 35 | PElement *required, PElement *optional); 36 | void vo_callva(Reduce *rc, PElement *out, const char *name, ...); 37 | -------------------------------------------------------------------------------- /src/watch.h: -------------------------------------------------------------------------------- 1 | // shims for watch.h, until we get it in 2 | 3 | #define NIP4_PATH "$HOME/.nip4-0.1.0" 4 | #define AUTO_WS_SAVE (TRUE) 5 | #define PRINT_CARTESIAN (FALSE) 6 | #define TRACE_FUNCTIONS (FALSE) 7 | #define LINELENGTH (80) 8 | #define MAX_HEAPSIZE (10000000) 9 | #define WORKSPACE_LPANE_OPEN (FALSE) 10 | #define WORKSPACE_LPANE_POSITION (200) 11 | #define WORKSPACE_RPANE_OPEN (FALSE) 12 | #define WORKSPACE_RPANE_POSITION (400) 13 | #define PAINTBOX_MAX_UNDO (10) 14 | #define POPUP_NEW_ROWS (FALSE) 15 | #define CALC_RECOMP_REGION (TRUE) 16 | #define CALC_RELOAD (FALSE) 17 | #define PATH_SEARCH path_search_default 18 | #define PATH_START path_start_default 19 | #define PATH_TMP path_tmp_default 20 | #define DISPLAY_CONVERSION (TRUE) 21 | -------------------------------------------------------------------------------- /src/workspaceviewlabel.h: -------------------------------------------------------------------------------- 1 | #ifndef __WORKSPACEVIEWLABEL_H 2 | #define __WORKSPACEVIEWLABEL_H 3 | 4 | #define WORKSPACEVIEWLABEL_TYPE (workspaceviewlabel_get_type()) 5 | 6 | G_DECLARE_FINAL_TYPE(Workspaceviewlabel, workspaceviewlabel, 7 | NIP4, WORKSPACEVIEWLABEL, GtkWidget) 8 | 9 | #define WORKSPACEVIEWLABEL(obj) \ 10 | (G_TYPE_CHECK_INSTANCE_CAST((obj), \ 11 | WORKSPACEVIEWLABEL_TYPE, Workspaceviewlabel)) 12 | 13 | Workspaceviewlabel *workspaceviewlabel_new(Workspaceview *wview); 14 | void workspaceviewlabel_refresh(Workspaceviewlabel *wviewlabel); 15 | 16 | #endif /* __WORKSPACEVIEWLABEL_H */ 17 | -------------------------------------------------------------------------------- /suppressions/valgrind.supp: -------------------------------------------------------------------------------- 1 | # various nvidia wtfs 2 | 3 | { 4 | nv1 5 | Memcheck:ReallocZero 6 | fun:realloc 7 | ... 8 | fun:NvGlEglApiInit 9 | } 10 | 11 | { 12 | nv2 13 | Memcheck:BadSize 14 | fun:posix_memalign 15 | ... 16 | fun:NvGlEglApiInit 17 | } 18 | 19 | { 20 | nv3 21 | Memcheck:Param 22 | write(buf) 23 | fun:__libc_write 24 | fun:write 25 | obj:/usr/lib/x86_64-linux-gnu/libnvidia-egl-wayland.so.1.1.15 26 | ... 27 | fun:gdk_surface_ensure_egl_surface 28 | } 29 | 30 | { 31 | nv4 32 | Memcheck:Param 33 | write(buf) 34 | fun:__libc_write 35 | fun:write 36 | ... 37 | fun:gdk_gl_context_real_end_frame 38 | } 39 | 40 | { 41 | nv5 42 | Memcheck:Param 43 | write(buf) 44 | fun:__libc_write 45 | fun:write 46 | ... 47 | fun:gdk_surface_set_egl_native_window 48 | } 49 | 50 | # gtk accessibility seems to leak? 51 | { 52 | gtk1 53 | Memcheck:Leak 54 | match-leak-kinds: possible 55 | fun:malloc 56 | ... 57 | fun:gtk_string_accessible_value_new 58 | } 59 | 60 | # gsk surfaces and stuff 61 | { 62 | gsk1 63 | Memcheck:Leak 64 | match-leak-kinds: possible 65 | fun:malloc 66 | ... 67 | fun:gsk_gl_driver_for_display 68 | } 69 | 70 | { 71 | gsk2 72 | Memcheck:Leak 73 | match-leak-kinds: possible 74 | fun:calloc 75 | fun:g_malloc0 76 | fun:g_atomic_rc_box_alloc0 77 | fun:gsk_transform_alloc 78 | fun:gsk_transform_translate_3d 79 | fun:gsk_transform_translate 80 | fun:gtk_widget_allocate 81 | } 82 | 83 | { 84 | gsk3 85 | Memcheck:Leak 86 | match-leak-kinds: possible 87 | fun:realloc 88 | fun:g_realloc 89 | ... 90 | fun:gsk_gl_driver_load_programs 91 | } 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /test/extras/test-5x5.v: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcupitt/nip4/9f5a623318dcb0537994108ffe7708400f115c5d/test/extras/test-5x5.v -------------------------------------------------------------------------------- /test/images/slanted_oval_vase2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcupitt/nip4/9f5a623318dcb0537994108ffe7708400f115c5d/test/images/slanted_oval_vase2.jpg -------------------------------------------------------------------------------- /test/meson.build: -------------------------------------------------------------------------------- 1 | should_pass_tests = [ 2 | # test workspaces 3 | 'big_and_small_disks.ws', 4 | 'test_colour.ws', 5 | 'test_conv.ws', 6 | 'test_filter.ws', 7 | 'test_fourier.ws', 8 | 'test_histogram.ws', 9 | 'test_image.ws', 10 | 'test_math.ws', 11 | 'test_matrix.ws', 12 | 'test_stats.ws', 13 | 'test_tasks.ws', 14 | 'test_widgets.ws', 15 | 16 | # test the scripting language 17 | 'test_snip.def', 18 | ] 19 | 20 | should_fail_tests = [ 21 | 'test_fail.ws', 22 | ] 23 | 24 | # all the demo workspaces, except frame and register, since they ise a 25 | # non-free plugin 26 | demos = [ 27 | '1_point_mosaic/1pt_mosaic.ws', 28 | '2_point_mosaic/2pts_mosaic.ws', 29 | 'businesscard/businesscard.ws', 30 | 'clone/clone.ws', 31 | 'logo/logo2.ws', 32 | 'manual_balance/manual_balance.ws', 33 | 'overlays_and_blending/overlay_blend.ws', 34 | ] 35 | 36 | foreach name : should_pass_tests 37 | file = files('workspaces/' + name) 38 | test(name, nip4_batch, args: ['--test', file]) 39 | test(name, nip4_batch, args: ['--test', file], env: ['VIPS_NOVECTOR=1']) 40 | endforeach 41 | 42 | foreach name : should_fail_tests 43 | file = files('workspaces/' + name) 44 | test(name, nip4_batch, should_fail: true, args: ['--test', file]) 45 | test(name, nip4_batch, should_fail: true, 46 | args: ['--test', file], 47 | env: ['VIPS_NOVECTOR=1'], 48 | ) 49 | endforeach 50 | 51 | foreach name : demos 52 | file = files(project_source_root + '/share/nip4/data/examples/' + name) 53 | test(name, nip4_batch, args: ['--test', file]) 54 | # repeat, with the vector system disabled 55 | test(name, nip4_batch, args: ['--test', file], env: ['VIPS_NOVECTOR=1']) 56 | endforeach 57 | 58 | -------------------------------------------------------------------------------- /test/workspaces/gold_sample.v: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcupitt/nip4/9f5a623318dcb0537994108ffe7708400f115c5d/test/workspaces/gold_sample.v -------------------------------------------------------------------------------- /test/workspaces/test_fail.ws: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | --------------------------------------------------------------------------------