Commit Graph

47 Commits

Author SHA1 Message Date
Michael Natterer 392f00baf5 app, libgimp: get rid of all ID GTypes and ID param specs
Turn all ID param specs into object param specs (e.g. GimpParamImageID
becomes GimpParamImage) and convert between IDs and objects in
gimpgpparams.c directly above the the wire protocol, so all of app/,
libgimp/ and plug-ins/ can deal directly with objects down to the
lowest level and not care about IDs.

Use the actual object param specs for procedure arguments and return
values again instead of a plain g_param_spec_object() and bring back
the none_ok parameter.

This implies changing the PDB type checking functions to work on pure
integers instead of IDs (one can't check whether object creation is
possible if performing that check requires the object to already
exist).

For example gimp_foo_is_valid() becomes gimp_foo_id_is_valid() and is
not involved in automatic object creation magic at the protocol
level. Added wrappers which still say gimp_foo_is_valid() and take the
respective objects.

Adapted all code, and it all becomes nicer and less convoluted, even
the generated PDB wrappers in app/ and libgimp/.
2019-08-29 11:39:34 +02:00
Jehan 9f0dbb5759 plug-ins: port screenshot to GimpImage/GimpDrawable. 2019-08-22 15:54:36 +02:00
Jehan ee8b467e9f libgimp: GimpSaveProcedure() now uses GimpImage/GimpDrawable object...
... as parameters.
And GimpLoadProcedure() now expects the run() function to return a
GimpImage object.
2019-08-22 15:54:36 +02:00
Michael Natterer 4cb4b3ef3a plug-ins: port all plug-ins to the new macros 2019-08-20 01:03:38 +02:00
Michael Natterer 9cabc8c8d0 libgimp, plug-ins: use the new macros everwhere
Except for gimp_param_spec_string() which is on its way back to the
core.
2019-08-19 10:02:07 +02:00
Michael Natterer 5c4fa2de51 plug-ins: port screenshot to GimpPlugIn 2019-08-15 11:48:05 +02:00
Michael Natterer 155bc75a75 libimp*, app: get rid of inline pixbufs in the API and in pluginrc
because they are deprecated.

Change GIMP_ICON_TYPE_INLINE_PIXBUF to GIMP_ICON_TYPE_PIXBUF and the
libgimp API to (icon-name, GdkPixbuf, GFile). Use the file's uri and a
PNG blob of the pixbuf to pass around on the wire and for storage in
pluginrc.
2019-08-09 00:16:35 +02:00
Jehan 3604e8e7ad Issue #3560: "Screenshot delay: __ seconds" item lacks mnemonic. 2019-06-24 12:00:51 +02:00
Ell 8954d1f386 libgimpwidgets, app, plug-ins: use GimpSpinButton everywhere
Replace all direct uses of GtkSpinButton with GimpSpinButton, so
that its modified behavior extends to all our spin buttons.
2019-03-09 07:28:52 -05: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 80997a8646 Remove most GTK_ADJUSTMENT() and (GtkAdjutment *) casts
they are obsolete in GTK+ 3.x because GtkAdjustment cannot be passed
around as GtkObject any longer, GtkObject is gone.
2018-06-24 18:15:16 +02:00
Jehan 3a0c03a61c plug-ins: clearer plug-in-screenshot parameter description.
Our plug-ins have no "optional" parameters per-se. Clarify the
description to make explicit that the last 4 parameters are simply only
taken into account when the shoot type is SHOOT-REGION.
2018-06-17 22:16:03 +02:00
Michael Natterer d94b954c2a Issue #1611 - plug-in-screenshot does not work in non-interactive run mode
Turn the boolean "root" argument into enum ShootType and reorder that
enum to { WINDOW, ROOT, REGION } so that the "0", and "1" values match
the former boolean. Adapt parameter checking accordingly so that
callers without optional arguments (e.g. script-fu) can call all the
plug-ins's features.
2018-06-17 20:55:09 +02:00
Michael Natterer bdbec7941c Use the new macros from the last commit in all files
...and gone are the annoying warnings.
2018-05-20 21:06:34 +02:00
Simon Budig dd257bef90 screenshot: kill GtkTable 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 5ece7a8d1f Port a lot of stuff from GdkScreen/monitor_number to GdkMonitor
including some fixes for getting pointer coords, and needed
API changes in libgimpwidgets.
2018-05-20 21:06:30 +02:00
Michael Natterer 1b3135ca95 Get rid of using GtkMisc API globally 2018-05-20 21:06:30 +02:00
Jehan 80490a2c07 plug-ins: add a SCREENSHOT_CAN_SHOOT_WINDOW capability.
And add the relevant option for when such capability is absent. Right
now it is absent only from the new Freedesktop API.
2017-12-16 21:54:49 +01:00
Jehan 53a03b38e5 plug-ins: implementation of the Freedesktop portal for screenshot.
I am told by the GNOME/Flatpak people that this is what we will
ultimately need to implement. Basically this portal is supposed to work
everywhere, in sandboxes (Flatpak, hopefully Snap too?), but also out
of sandboxes, i.e. in GNOME and KDE, whether Wayland or X11. So that
should be the unique API we will have to implement in the end, and every
desktop environment/sandbox will need to implement this API (which is
good!).
Apparently it is not part of default GNOME yet, but has to be installed
separately (on Fedora, package is xdg-desktop-portal-gtk for GNOME and
xdg-desktop-portal-kde for KDE).

Now there are currently many shortcomings, and in particular, the
screenshot API has apparently no advanced features (at all!). No window
snap, no rectangular selection, no delaying, no choice on including
cursor or decoration, nothing! Apparently this is normal that the API
presents no feature, because "the API itself is not meant to specify the
details how the screenshot is obtained. Instead the portal will present
the user a dialog to take a screenshot, and that screenshot will be
given back to the sandboxed app".
This is acceptable behavior, except that currently, the dialog has none
of the basic features so this is a very bad regression. This is why I
test the freedesktop API last, which basically means it will likely
never be actually used. That's on purpose. At least, the code is in and
will be easy to improve later. Of course, when the Freedesktop portal
for screenshot will finally be featureful, it is meant to be tested
first.

See: https://github.com/flatpak/xdg-desktop-portal/blob/master/data/org.freedesktop.portal.Screenshot.xml
2017-12-16 02:36:15 +01:00
Jehan f9076ae294 plug-ins: add SCREENSHOT_CAN_DELAY_WINDOW_SHOT capability to screenshot.
This indicates if a delay can be inserted in-between the window pick and
the actual shot. This is indeed not always possible, for instance using
KWin API. Obviously this feature is only meaningful if
SCREENSHOT_CAN_PICK_WINDOW feature is enabled as well. For instance X11
screenshot has the feature, but GNOME won't need it since there is no
window selection (it simply snaps whatever is the active window).
2017-12-10 01:33:44 +01:00
Jehan b57c89dd5d plug-ins: differentiate a delay before the area/window selection...
... and a delay before the screenshot.
Until now, there was only delay before selection, which I changed in
commits d9cd4b61bc and 614bcf6d0a. Actually a delay before selection may
also be useful, for instance when you use a tablet without keyboard (no
alt-tab possible) and the window/area you wish to capture is behind GIMP
window. Then you'd want to interact with the desktop with the pointer
before the cursor changes for selection interaction.
I add some logics so that the selection delay doesn't show when it is
unecessary (for instance for full-screen screenshot, or when the window
screenshot is based on the active window, not click selection, like with
GNOME shell API).
2017-12-10 01:07:15 +01:00
Jehan b9034e26a9 Bug 791360 - Add Screenshot implementation for KDE/Wayland.
Only thing I could not properly figure out yet is how to select an area.
The "screenshotArea" method is there in KDE API, but it needs
coordinates and I can't find the API to grab coordinates in Wayland (as
in GNOME shell API).
2017-12-08 19:20:17 +01:00
Jehan 24c2bdf61c Bug 784890 - Being able to take a screenshot of a single window and...
... include mouse pointer.
This is working find and tested under GNOME which already had the code
for it (was only missing the GUI). I added the feature in OSX and X11,
though it is untested. Windows does not seem to have the capability (at
least according to screenshot_win32_get_capabilities() in our code).
2017-07-18 15:04:09 +02:00
Michael Natterer 894845fe43 plug-ins: actually use the remembered profile_policy in screenshot
Copy and paste coding made the default value the selected one in the
"Color Profile" frame, not the value from ScreenshotValues.
2017-05-30 22:22:40 +02:00
Jehan bc344a9991 Bug 750180 - Fix different ways of writing Plug-in Plug-In Plugin.
It was agreed that we should write "plug-in" consistently. Only possibly
user-visible strings were updated.
Thanks to scootergrisen for a first patch which could not make it
after changing decision on the canonical writing.
2017-03-21 17:52:22 +01:00
Michael Natterer 801bd8fb3f plug-ins: get rid of icons in dialog buttons (use labels not stock IDs) 2017-02-12 16:18:54 +01:00
Michael Natterer e518b9753d Bug 723498 - Gimp changes contrast and color of images
Add color management options to the screenshot plug-in:

By default, it tries to tag the image with the monitor profile;
alternatively, there is an option to convert the image to sRGB.

This works mostly fine on *one* monitor given its profile is
configured correctly. With more than one monitor, funny things happen
depending on the platform and on what we are shooting (window, screen,
area). There are some FIXMEs left in the code.
2017-01-31 21:26:44 +01:00
Michael Natterer f67100f554 plug-ins: attach the default comment to all screenshots
not only to screenshots made with the X11 backend.
2016-05-31 22:29:49 +02:00
Hartmut Kuhse 4a7d1e59f9 plug-ins: convert screenshot-win32 to gegl
and do some repairs.
2016-05-28 17:56:14 +02:00
Michael Natterer d64120340b plug-ins: more cleanup in screenhot, move the icon to its own file 2016-04-02 21:44:09 +02:00
Michael Natterer d164850484 plug-ins: add an (empty) Win32 backend to screenshot
and buld it unconditionally. Somebody please move the code from
win-snap to the new file.
2016-04-02 15:02:00 +02:00
Michael Natterer cb76253c67 Bug 764450 - Crash in screenshot's gnome-shell backend
Add error reporting to all screenshot backends, but only really use it
in the gnome-shell backend: check all DBus calls for errors instead of
crashing.

Also fix detection if gnome-shell is running: just creating the
GDBusProxy always succeeds, so call org.freedesktop.DBus.Peer.Ping
on the newly created proxy.
2016-04-02 01:28:34 +02:00
Michael Natterer 7a98b9e043 plug-ins: move screenshot delay function to the main screenshot.[ch]
so it can be used from all backends.
2016-03-29 23:34:51 +02:00
Michael Natterer a1785e9823 Bug 757687 - Screenshot functionality broken under Wayland
Some more abstraction in the screenshot plug-in, now allows for
runtime backend selection. Add stubs for the gnome-shell backend,
registers itself as unavailable because it's still unimplemented.
2016-03-29 22:08:27 +02:00
Michael Natterer e4ff6b40da Bug 757687 - Screenshot functionality broken under Wayland
Move OS X and X11 specific code to its own files, to prepare for more
shooting backends being added. Also remove unimplemented G_OS_WIN32
stubs, if anyone feels like implementing a Windows backend, by all
means go ahead.
2015-11-07 22:39:32 +01:00
Michael Natterer e1c4314a8e Bug 757687 - Screenshot functionality broken under Wayland
Move the screenshot plug-in to its own directory, it's about to be
split up into multiple files.
2015-11-07 15:52:44 +01:00
Manish Singh 780b221fcc Moved.
-Yosh
1999-06-23 06:08:23 +00:00
Sven Neumann 022333d337 Changed the layout so the last change (that was done w/o asking me) doesn't
suck so much...


--Sven
1999-06-05 00:29:05 +00:00
Martin Baulig 3e744074e9 Make the "after ... seconds" option global since it is also useful if you
1999-05-13  Martin Baulig  <martin@home-of-linux.org>

	* plug-ins/screenshot/screenshot.c: Make the "after ... seconds"
	option global since it is also useful if you want to take a shot
	of a very large window.
1999-05-13 01:14:29 +00:00
Asbjørn Pettersen acf57bcb42 Use spawnlp() instead of fork 1999-05-01 16:11:35 +00:00
Federico Mena Quintero 10bc5237a7 Updated gtk_toggle_button_set_state() to gtk_toggle_button_set_active() in
1999-01-15  Federico Mena Quintero  <federico@nuclecu.unam.mx>

	* Updated gtk_toggle_button_set_state() to
	gtk_toggle_button_set_active() in all the files.
1999-01-15 17:35:04 +00:00
Manish Singh 9fa974dd15 changed it back, things work now
* app/interface.c: changed it back, things work now

* plug-ins/gfli/gfli.c: fixed gccism

* plug-ins/MapObject/mapobject_main.c: update display when we're done
(from seth)

-Yosh
1998-06-06 21:25:10 +00:00
Sven Neumann f7d77d8b45 Added new delay time function to the screenshot plug-in.
--Sven
1998-06-04 16:17:59 +00:00
Sven Neumann e0a819f62a Use g_message instead of g_warning.
Use gimp_message instead of self-defined ErrorMessage function.


--Sven
1998-05-28 17:09:17 +00:00
Manish Singh 8137f724ef Added sharpen to stable dist
* Added sharpen to stable dist

* updated sgi and despeckle plugins

* plug-ins/xd/xd.c: works with xdelta 0.18. The use of xdelta versions prior
to this is not-supported.

* plug-in/gfig/gfig.c: spelling corrections :)

* app/fileops.c: applied gimp-gord-980420-0, fixes stale save procs in the
file dialog

* app/text_tool.c: applied gimp-egger-980420-0, text tool optimization

-Yosh
1998-04-24 02:18:52 +00:00
Manish Singh 3f2f4b5c3f added new plug-in
plug-ins/animationplay/animationplay.c: fix sigsegv on close

-Yosh
1998-04-20 03:21:31 +00:00