summaryrefslogtreecommitdiff
path: root/Userland/Utilities/shot.cpp
AgeCommit message (Collapse)Author
2022-04-18Userland: Always construct Application with try_create()Sam Atkins
2022-02-25Userland: Rename WindowServerConnection=>ConnectionToWindowServerItamar
This was done with CLion's automatic rename feature.
2022-02-01shot: Port to LibMainalexmajor
2021-11-05shot: Fix hanging due to zero sized RectAziz Berkay Yesilyurt
shot was refactored to retrive crop_region, but it is empty when -r is not used.
2021-11-02Services: Fix visibility of Object-derivative constructorsBen Wiederhake
Derivatives of Core::Object should be constructed through ClassName::construct(), to avoid handling ref-counted objects with refcount zero. Fixing the visibility means that misuses like this are more difficult.
2021-10-27Everywhere: Rename left/right-click to primary/secondaryFiliph Sandström
This resolves #10641.
2021-08-28shot: Get only cropped region from WindowServerMustafa Quraish
Previously, we were always getting the full screen(s) bitmap from the WindowServer and cropping it manually. The `get_screen_bitmap` function already took in a `crop_region`, so we are now utilizing that.
2021-08-01shot: Make output filename a hyperlink when applicableRyan Liptak
The hyperlink only gets printed when stdout is a TTY, so e.g. something like `shot | cat` will not get the hyperlink escapes.
2021-07-10Utilities: Use alpha channel instead of opacity in shotAziz Berkay Yesilyurt
The way overlay was drawn is not the correct way to achieve window transparency in selection mode. With this change, shot window becomes truely transparent.
2021-07-09Userland: Add ability to capture rectangular region in shotAziz Berkay Yesilyurt
A click and drag selectable, transparent, fullscreen window is displayed with the command line argument -r for screenshots.
2021-07-09Revert "Userland: Add ability to screenshot rectangular region in `shot` ↵Ali Mohammad Pur
(#8515)" This reverts commit 1c06d772628a0191289fe30edcc143e29ba2ca32. This was squashed by mistake, the rebased version will follow.
2021-07-09Userland: Add ability to screenshot rectangular region in `shot` (#8515)Aziz Berkay Yesilyurt
* LibGUI: Verify m_window_id is not-zero in set_maximized Window::set_maximized requires non-zero window id to be a valid call, i.e. calling Window::show beforehand. A verify statement before the server call can help developers by hinting correct usage. * LibGUI: Paint background when the fullscreen window is transparent The windows in the background are ignored when the window is fullscreen. However, we still would like to see the background if that window is transparent. * Userland: Add ability to capture rectangular region in shot A click and drag selectable, transparent, fullscreen window is displayed with the command line argument -r for screenshots.
2021-07-07Userland: Convert delay option to unsigned for shotAziz Berkay Yesilyurt
A negative delay option for shot was used to underflow when passed to sleep. Now, it returns an error for a negative delay value.
2021-06-20WindowServer: Enable screen capture to span multiple screensTom
This enables the shot utility to capture all screens or just one, and enables the Magnifier application to track the mouse cursor across multiple screens.
2021-05-12LibCore+Everywhere: Move OpenMode out of IODeviceAli Mohammad Pur
...and make it an enum class so people don't omit "OpenMode".
2021-05-11WindowServer: Add Optional<Gfx::IntRect> argument to get_screen_bitmap()Valtteri Koskivuori
This way, we can optionally specify a region of the display to capture. Defaults to entire screen if no rectangle is given.
2021-05-03Userland: Make IPC results with one return value available directlyGunnar Beutner
This changes client methods so that they return the IPC response's return value directly - instead of the response struct - for IPC methods which only have a single return value.
2021-05-03Userland: Update IPC calls to use proxiesGunnar Beutner
This updates all existing code to use the auto-generated client methods instead of post_message/send_sync.
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-19LibGfx: Improve PNG encoder API somewhatAndreas Kling
This is still far from ideal, but let's at least make it take a Gfx::Bitmap const&.
2021-03-27Utilities: Add a delay option to the "shot" utilitycheb
This option allows for the user to set a delay before a screenshot taken. The user could minimize the window, for example.
2021-03-27shot: Added option to output to clipboard instead of filenetworkException
This allows screenshots to be easily used in PixelPaint for example :^)
2021-03-26Utilities: Add a simple "shot" utility for grabbing screenshots :^)Andreas Kling
This little CLI program grabs the current screen image from WindowServer and saves it as a PNG file.