Commit Graph

76 Commits

Author SHA1 Message Date
Jacob Boerema 18408ce966 app, libgimp, libgimpwidgets, plug-ins, etc: rename behaviour to behavior
We use US English which uses behavior. So we replace all occurrences of
behaviour.

Most notable is File Open behavior in preferences. Besides that several
mentions in function documentation and a few in comments.
2023-07-21 15:35:23 -04:00
Ben Rogalski d90b84ba9d Custom transparency checkerboard colors
Reviewer (Jehan) note: cherry picked from MR !274. Still deciding
whether this will be pushed to gimp-2-10 branch too.

Fixed Conflicts from !274:
	app/dialogs/preferences-dialog.c
	app/display/gimpdisplayshell-draw.c
	app/plug-in/gimppluginmanager-call.c
	libgimp/gimp.c
	libgimp/gimp.h
	libgimpwidgets/gimppreviewarea.c
	libgimpwidgets/gimppreviewarea.h
	libgimpwidgets/gimpscrolledpreview.c
2022-05-14 16:27:15 +02:00
Niels De Graef df28349c17 GIR: Try to return more specific GtkWidget subclass
In GTK, a common scheme is to let a function creating a specific widget
to return a `GtkWidget *`, rather than the specific subtype, since you
often need to call API of GtkWidget, avoiding some useless casts.

For bindings however (and especially bindings to compiled languages),
this is a bit annoying, as you have to explicitly change the type of the
return value (downcast), which is not trivial (or at least desirable) in
each language.

Luckily, we can use `(type ...)` annotation for this use case, leaving
the C API unchanged, while improving the experience for bindings.
2020-12-25 15:05:16 +01:00
Niels De Graef 4b6362c0bd gir: Mark more (out) annotations 2020-05-08 17:11:14 +02:00
Niels De Graef db0493aa0d gir: Add more (out) annotations
This will change the API for some bindings, so we probably want to do it
before a release.
2020-05-03 17:57:23 +02:00
Niels De Graef 878804fb01 Cleanup GObject signal marshallers
* Don't generate our own marshallers if they are available in GLib
  already
* Don't set the c_marshaller parameter in `g_signal_new()` if it's a
  default marshaller provided by GLib. See commit message of commit
  39e4aa3c57 on why this is the case.
2020-04-01 21:20:01 +00:00
Michael Natterer ebddecd696 libgimpwidgets: more docs and annotations 2019-08-09 12:59:41 +02:00
Niels De Graef 1dda60154c Use "Returns:" to annotate return values
To be able to annotate return values through GObject-introspection, you
need to make sure it is tagged with `Returns:` and not something else.
2019-08-03 07:53:47 +00:00
Jehan f7fbdc89b1 libgimpwidgets: add a bunch of (transfer) values. 2019-07-31 23:48:32 +02:00
Michael Natterer 63695b4b21 libgimbase: merge gimpparam.h into gimpparamspecs.h
which means that it's now included normally via gimpbase.h
and not any longer via gimpbasetypes.h which we only did out
of lazyness. A *lot* of files in libgimp* and app/ now need to
2019-07-31 10:16:21 +02:00
Ell 3b0040c043 app, libgimp*, modules: don't use g_type_class_add_private() ...
... and G_TYPE_INSTANCE_GET_PRIVATE()

g_type_class_add_private() and G_TYPE_INSTANCE_GET_PRIVATE() were
deprecated in GLib 2.58.  Instead, use
G_DEFINE_[ABSTRACT_]TYPE_WITH_PRIVATE(), and
G_ADD_PRIVATE[_DYNAMIC](), and the implictly-defined
foo_get_instance_private() functions, all of which are available in
the GLib versions we depend on.

This commit only covers types registered using one of the
G_DEFINE_FOO() macros (i.e., most types), but not types with a
custom registration function, of which we still have a few -- GLib
currently only provides a (non-deprecated) public API for adding a
private struct using the G_DEFINE_FOO() macros.

Note that this commit was 99% auto-generated (because I'm not
*that* crazy :), so if there are any style mismatches... we'll have
to live with them for now.
2018-09-18 14:39:56 -04:00
Michael Natterer 5f700549e7 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
Michael Natterer 1b7d63cce9 Use g_set_object() in a lot of places, and splrinkle some g_clear_object() 2018-06-01 12:59:52 +02:00
Michael Natterer 7fab74f431 libgimpwidgets: use G_DEFINE_ABSTRACT_CLASS for preview classes 2018-05-28 17:24:58 +02:00
Michael Natterer 2dd2f1509b Enable and fix smooth scrolling and zooming
- Fix gimp_scroll_adjustment_values() for smooth scroll events
- Set GDK_SMOOTH_SCROLL_MASK on all widgets where we set GDK_SCROLL_MASK
- Add GIMP_ZOOM_SMOOTH to enum GimpZoomType
- Add "gdouble delta" to gimp_zoom_model_step()
- Change the meaning of the "scale" parameter to "scale or delta" in
  all functions that take GimpZoomType and a scale factor.
2018-05-20 21:06:34 +02:00
Michael Natterer 97e19eb385 libgimpwidgets: set GDK_EVENT_SCROLL on GimpPreview's preview area 2018-05-20 21:06:34 +02:00
Michael Natterer 08458dcdf6 libgimpwidgets: port GimpPreview to GtkGrid 2018-05-20 21:06:34 +02:00
Michael Natterer 1d8696cd80 Get rid of gdk_flush() globally, use gdk_display_flush() 2018-05-20 21:06:34 +02:00
Michael Natterer d87eddb1c4 libgimpwidgets: move all GimpPreview members to private
and add tons of API so subclasses can still do their thing, probably
subject to change/fix.
2018-05-20 21:06:33 +02:00
Michael Natterer f4f106ad26 libimp*: add private pointers to all instance structs
even if we don't have private members (yet). Also make class padding 8
pointers in all headers. This commit moves nothing to private, it just
makes all headers consistent and adjusts .c files accordigly.
2018-05-20 21:06:33 +02:00
Michael Natterer 6e982cd0a4 libgimpwidgets: use g_object_ref()/unref() for GdkCursors
The are GObjects now.
2018-05-20 21:06:28 +02:00
luz.paz 147c09f19e Bug 795161 - Misc. typo fixes in source comments and doxygen
Found via `codespell`
Follow-up to  commit 7fdb963e01
2018-04-18 21:06:57 +02:00
Michael Natterer f9ee38ea33 libgimp: add blurbs to all object properties for the docs
and some minor doc fixes.
2017-06-06 21:19:17 +02:00
Michael Natterer 8005eea835 Remove the "GIMP" from all "Since: GIMP 2.x" API doc comments
because it confuses gtk-doc and breaks some links. Also change the
"Index of new symbols in GIMP 2.x" sections to be what seems to be the
modern standard (looked at the GLib and GTK+ docs), and update some
other stuff.
2015-05-31 21:18:09 +02:00
Michael Natterer 5fd46384a5 libgimpwidgets: include <gegl.h> in all files that include gimpcolordisplay.h 2013-11-01 22:32:31 +01:00
Michael Natterer 83eb6fdc9e libgimpwidgets: use gtk_box_new() 2011-09-30 10:50:50 +02:00
Michael Natterer 9c6338900e libgimp*: don't derive from GtkHBox and GtkVBox in libgimp either
I know this is not 100% compatible, but is in fact absolutely safe to
change unless somebody is using the headers in ways that are totally
wrong.
2011-07-27 19:53:34 +02:00
Michael Natterer b3ee51794d libgimpwidgets: fix most gtk-doc warnings 2010-07-05 19:04:15 +02:00
Michael Natterer 1f7ff98c45 libgimpwidgets: move docs from template files to inline comments
but leave the template file for gimpstock there because its contents
would be too much for gimpstock.h.
2010-07-05 18:01:28 +02:00
Michael Natterer a2c70822d4 Use accessors from GTK+ 2.20 instead of using sealed members directly 2010-04-19 19:21:07 +02:00
Michael Natterer 1aeb315ecf undef GTK_DISABLE_DEPRECATED in many places which undef GSEAL_ENABLE
because the widget flag access macros (e.g. GTK_WIDGET_REALIZED) are
now deprecated in GTK+ master.
2010-03-06 23:14:29 +01:00
Michael Natterer fcd346a227 Build with GSEAL_ENABLE with a few exceptions
Use the new accessors in GTK+ 2.18 and #undef GSEAL_ENABLE where
accessors are missing or where I'm not quite sure how to fix the
stuff yet.
2009-10-17 18:51:48 +02:00
Michael Natterer 3795f9b9c5 libgimpwidgets/gimpchainbutton.c libgimpwidgets/gimpcolorarea.c
2009-03-22  Michael Natterer  <mitch@gimp.org>

	* libgimpwidgets/gimpchainbutton.c
	* libgimpwidgets/gimpcolorarea.c
	* libgimpwidgets/gimpcolorbutton.c
	* libgimpwidgets/gimpcolorscale.c
	* libgimpwidgets/gimpcolorselect.c
	* libgimpwidgets/gimpdialog.c
	* libgimpwidgets/gimphelpui.c
	* libgimpwidgets/gimpmemsizeentry.c
	* libgimpwidgets/gimpoffsetarea.c
	* libgimpwidgets/gimppickbutton.c
	* libgimpwidgets/gimppixmap.c
	* libgimpwidgets/gimppreview.c
	* libgimpwidgets/gimppreviewarea.c
	* libgimpwidgets/gimpruler.c
	* libgimpwidgets/gimpscrolledpreview.c
	* libgimpwidgets/gimpwidgets.c: use accessors for various members
	of GTK+ structures that don't exist any longer when GSEAL_ENABLE
	is defined.


svn path=/trunk/; revision=28190
2009-03-22 15:42:42 +00:00
Michael Natterer d9b5207aa2 Change licence to GPLv3 (and to LGPLv3 for libgimp).
2009-01-17  Michael Natterer  <mitch@gimp.org>

	* all files with a GPL header and all COPYING files:

	Change licence to GPLv3 (and to LGPLv3 for libgimp).

	Cleaned up some copyright headers and regenerated the parsers in
	the ImageMap plugin.


svn path=/trunk/; revision=27913
2009-01-17 22:28:01 +00:00
Sven Neumann 24c7fc1e8d formatting.
2007-09-21  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimppreview.c: formatting.

	* libgimpwidgets/gimpscrolledpreview.c: make use of freeze/thaw to
	reduce the number of updates during initialization.

svn path=/trunk/; revision=23602
2007-09-21 12:19:00 +00:00
Sven Neumann 511a488aa2 added transform and untransform methods.
2007-01-11  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimppreview.[ch]: added transform and 
untransform
	methods.

	* libgimp/gimpzoompreview.c: more cleanups. Override the new
	GimpPreview methods.

	* plug-ins/common/nova.c: use the new transform functions.

	* libgimpwidgets/gimpwidgets.def: updated.


svn path=/trunk/; revision=21689
2007-01-11 23:41:45 +00:00
Sven Neumann 64e893e62f there's no need to make GTypeInfo and GInterfaceInfo structs static.
2006-10-18  Sven Neumann  <sven@gimp.org>

        * [lots of files]: there's no need to make GTypeInfo and
        GInterfaceInfo structs static.
2006-10-18 13:17:50 +00:00
Sven Neumann 539ff359a4 connect-after to "realize" and "size-allocate" signals of the preview area
2006-02-06  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimppreview.c: connect-after to "realize" and
	"size-allocate" signals of the preview area and call the
	set-cursor method from the callback.

	* libgimpwidgets/gimpscrolledpreview.c: no need to explicitely set
	the cursor now that the virtual method is used correctly.

	* libgimp/gimpzoompreview.c: implement set-cursor and set the move
	cursor in accordance with the zoom factor.
2006-02-06 11:07:48 +00:00
Sven Neumann 7b24dd8e36 moved GIMP_PARAM defines from here ...
2006-01-30  Sven Neumann  <sven@gimp.org>

	* app/config/config-types.h: moved GIMP_PARAM defines from here ...

	* libgimpbase/gimpparam.h: ... to this new files.

	* libgimpbase/Makefile.am
	* libgimpbase/gimpbasetypes.h: include the new header file.

	* libgimp/gimpfontselectbutton.c
	* libgimpconfig/gimpcolorconfig.c
	* libgimpthumb/gimpthumbnail.c
	* libgimpwidgets/gimpcellrenderercolor.c
	* libgimpwidgets/gimpcellrenderertoggle.c
	* libgimpwidgets/gimpcolorarea.c
	* libgimpwidgets/gimpcolorbutton.c
	* libgimpwidgets/gimpcolordisplay.c
	* libgimpwidgets/gimpcontroller.c
	* libgimpwidgets/gimpdialog.c
	* libgimpwidgets/gimpenumcombobox.c
	* libgimpwidgets/gimpintcombobox.c
	* libgimpwidgets/gimppageselector.c
	* libgimpwidgets/gimppreview.c
	* libgimpwidgets/gimppreviewarea.c
	* libgimpwidgets/gimpzoommodel.c
	* modules/cdisplay_colorblind.c
	* modules/cdisplay_gamma.c
	* modules/cdisplay_highcontrast.c
	* modules/cdisplay_lcms.c
	* modules/cdisplay_proof.c
	* modules/controller_linux_input.c
	* modules/controller_midi.c: use the GIMP_PARAM defines to avoid
	unnecessary string allocations.
2006-01-30 16:10:56 +00:00
Sven Neumann e7acde6676 moved the controls closer to the preview.
2005-11-22  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimppreview.c: moved the controls closer to the
	preview.
2005-11-22 12:16:44 +00:00
Sven Neumann 3670d4c3ae renamed newly added function to gimp_preview_get_controls(). Increased row
2005-09-28  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimppreview.[ch]: renamed newly added function to
	gimp_preview_get_controls(). Increased row padding for controls.

	* libgimpwidgets/gimpwidgets.def
	* libgimp/gimpzoompreview.c: changed accordingly.

	* libgimpbase/gimputils.c (gimp_enum_get_value): ref the enum
	class instead of only peeking at it.

	* libgimpwidgets/gimpzoommodel.c (gimp_zoom_button_new): set a
	tooltip on zoom buttons that only show an icon.
2005-09-28 11:02:02 +00:00
Sven Neumann 9ab6ffa950 added a hbox to the table and the "Update Preview" checkbutton there.
2005-09-28  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimppreview.[ch]: added a hbox to the table and
	the "Update Preview" checkbutton there. Added a function to access
	this control box. Increased default size to 200.

	* libgimpwidgets/gimpscrolledpreview.[ch]: added function
	gimp_scrolled_preview_set_policy() to control when the scrollbars
	should be shown.

	* libgimpwidgets/gimpwidgets.def: updated.

	* libgimp/gimpzoompreview.c: pack the zoom buttons into the
	preview's control box. Commented out the label, it shows a bogus
	zoom factor. Set scrollbar policy to ALWAYS to avoid resizing.
2005-09-28 02:46:06 +00:00
David Odin 5b538db8e4 New object to handle zoom factor, and create widgets to control or view
* libgimpwidgets/gimpzoommodel.[ch]: New object to handle zoom
  factor, and create widgets to control or view this value.

* libgimpwidgets/Makefile.am
* libgimpwidgets/gimpwidgets.h: Added gimpzoommodel.[ch].

* libgimpwidgets/gimpwidgetsenums.h: new enum: GimpZoomWidgetType.
  This enumerate which knid of widget you can created from the zoom
  model.

* libgimpwidgets/gimpwidgetsenums.c
* libgimpwidgets/gimpwidgetstypes.h: regenerated.

* libgimpwidgets/gimppreview.c: move the update toggle to the bottom
  of the vbox.

* libgimp/Makefile.am
* libgimp/gimpui.h
* libgimp/gimpuitypes.h
* libgimp/gimpzoompreview.[ch]: New widget, derivated from
  GimpScrolledPreview, which offer the same functionnalities as the
  GimpAspectPreview widget plus zoom facilities.

* plug-ins/common/AlienMap2.c
* plug-ins/common/apply_lens.c
* plug-ins/common/blinds.c
* plug-ins/common/channel_mixer.c
* plug-ins/common/colorify.c
* plug-ins/common/flarefx.c
* plug-ins/common/illusion.c
* plug-ins/common/jigsaw.c
* plug-ins/common/mapcolor.c
* plug-ins/common/max_rgb.c
* plug-ins/common/nova.c
* plug-ins/common/polar.c
* plug-ins/common/retinex.c
* plug-ins/common/waves.c
* plug-ins/common/whirlpinch.c: use a GimpZoomPreview instead of a
  GimpAspectPreview.
2005-09-19 22:58:16 +00:00
Sven Neumann 6a4b454431 added gimp_preview_get_area() for the rare case when one needs access to
2005-07-21  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimppreview.[ch]: added gimp_preview_get_area()
	for the rare case when one needs access to the GimpPreviewArea
	used in the preview.

	* libgimpwidgets/gimpwidgets.def: updated.
2005-07-21 14:02:29 +00:00
Sven Neumann 3ca90a182e Use the canonical form for signal names in lots of places (but by far not
2005-05-27  Sven Neumann  <sven@gimp.org>

	* (lots of files): Use the canonical form for signal names in lots
	of places (but by far not all).
2005-05-27 13:05:26 +00:00
David Odin d9e414fd8d new function: gimp_scrolled_preview_set_position () to set the position of
* libgimpwidgets/gimpscrolledpreview.[ch]: new function:
  gimp_scrolled_preview_set_position () to set the position of the
  preview content wrt the drawable.  This function might be moved to a
  virtual function of GimpPreview in a near future.

* libgimp/gimpdrawablepreview.c: use this function, so a preview
  remembers its position from one invocation to the next.  This is done
  using the current executable name as a key for gimp_set/get_data () so
  each plug-in can have its preview on a different place.

  More informations could be saved this way: the update toggle, the checks, etc.

  Addresses bug #162286.

* libgimpwidgets/gimppreview.c: smallish cleanup.
2005-01-05 22:33:44 +00:00
Sven Neumann 37f179aed3 change the "update" property and notify listeners (in particular
2004-11-29  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimppreview.c (gimp_preview_toggle_callback):
	change the "update" property and notify listeners (in particular
	GimpDrawablePreview) before invalidating the preview. Plug-ins
	might (needlessly) look at the property to decide whether they
	need to redraw. Fixes bug #159816.

	* plug-ins/common/unsharp.c (preview_update): no need to look at
	the value of the "Preview" toggle. GimpPreview takes care this.
2004-11-29 12:15:19 +00:00
Sven Neumann 27a39e6c63 removed trailing whitespace.
2004-10-13  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimppreview.c: removed trailing whitespace.

	* libgimpwidgets/gimpwidgets.def: added
	gimp_preview_set_default_cursor.
2004-10-13 19:06:40 +00:00
David Odin 3eb00e0350 added a new function to set the default cursor on preview:
* libgimpwidgets/gimppreview.[ch]: added a new function to set the
  default cursor on preview: gimp_preview_set_default_cursor().

* libgimpwidgets/gimpscrolledpreview.c: changed accordlingly.

* plug-ins/common/flarefx.c:
* plug-ins/common/nova.c: use this function.

This addresses bug #90519.
2004-10-13 18:56:28 +00:00
Sven Neumann de37bbb7f8 libgimpwidgets/gimppreview.[ch] added gimp_preview_draw_buffer().
2004-09-29  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimppreview.[ch]
	* libgimpwidgets/gimpwidgets.def: added gimp_preview_draw_buffer().

	* libgimp/gimpaspectpreview.[ch]
	* libgimp/gimpdrawablepreview.[ch]
	* libgimp/gimpui.def: removed the public draw_buffer API.
	Implement the virtual GimpPreview::draw_buffer method instead.

	* plug-ins/common/cartoon.c
	* plug-ins/common/deinterlace.c
	* plug-ins/common/despeckle.c
	* plug-ins/common/dog.c
	* plug-ins/common/edge.c
	* plug-ins/common/engrave.c
	* plug-ins/common/exchange.c
	* plug-ins/common/gauss.c
	* plug-ins/common/grid.c
	* plug-ins/common/neon.c
	* plug-ins/common/noisify.c
	* plug-ins/common/oilify.c
	* plug-ins/common/photocopy.c
	* plug-ins/common/plasma.c
	* plug-ins/common/sel_gauss.c
	* plug-ins/common/sharpen.c
	* plug-ins/common/shift.c
	* plug-ins/common/snoise.c
	* plug-ins/common/sobel.c
	* plug-ins/common/spread.c
	* plug-ins/common/struc.c: changed accordingly. Don't pass the
	preview around as GimpDrawablePreview or GimpAspectPreview. It
	should whenever possible be accessed as GimpPreview.
2004-09-29 15:33:02 +00:00