awesome/objects
Brian Sobulefsky f6eef228e2 Updated API in the same interface as the client.content property to support
screenshots at the root window and screen levels. A call to the
root.content() method will return a screenshot as a Cairo surface of the
entire root window (generally all physical screens). Getting the
screen.content property will return a screenshot as a Cairo surface of the
screen object (generally a physical screen) just as client.content will for
a client object.

Sample usage - the traditional API supported focused client screenshot as:

  c = client.focus
  if c then
    gears.surface(c.content):write_to_png("/path/to/screenshot.png")
  end

Similarly, this API extension adds:

  s = awful.screen.focused()
  if s then
    gears.surface(s.content):write_to_png("/path/to/screenshot.png")
  end

for the screen class and:

  gears.surface(root.content()):write_to_png("/path/to/screenshot.png")

for the root window. Note that the example shows how to get a screenshot
of the focused screen, but this is not a limitation. A lua script could
call it on any screen object.

Signed off by Brian Sobulefsky <brian.sobulefsky@protonmail.com>
2021-10-04 19:49:21 -07:00
..
button.c Move variable declarations from header to C file to fix build with GCC 10 2020-04-17 19:25:40 +02:00
button.h Move variable declarations from header to C file to fix build with GCC 10 2020-04-17 19:25:40 +02:00
client.c doc(client): Improve signal wording 2021-06-20 13:49:23 +02:00
client.h Move variable declarations from header to C file to fix build with GCC 10 2020-04-17 19:25:40 +02:00
drawable.c Fix ldoc modules summaries missing the final `.`. 2019-11-28 13:53:59 +01:00
drawable.h drawable/drawin: Pass both lua_State and stack index around 2014-12-06 10:46:45 +01:00
drawin.c Move variable declarations from header to C file to fix build with GCC 10 2020-04-17 19:25:40 +02:00
drawin.h Move variable declarations from header to C file to fix build with GCC 10 2020-04-17 19:25:40 +02:00
key.c Move variable declarations from header to C file to fix build with GCC 10 2020-04-17 19:25:40 +02:00
key.h Move variable declarations from header to C file to fix build with GCC 10 2020-04-17 19:25:40 +02:00
screen.c Updated API in the same interface as the client.content property to support 2021-10-04 19:49:21 -07:00
screen.h screen: Add a `name` property to the C API. 2019-09-30 00:49:40 -04:00
selection_acquire.c selection_acquire: Change the API to a table 2019-02-17 08:00:57 +01:00
selection_acquire.h Begin implementing selection transfers 2019-02-11 09:01:37 +01:00
selection_getter.c property: Remove unused int return 2019-02-11 10:13:13 +01:00
selection_getter.h property: Remove unused int return 2019-02-11 10:13:13 +01:00
selection_transfer.c Reduce scope of data variable 2019-02-17 18:43:02 +01:00
selection_transfer.h Selection transfer: Support INCR transfers 2019-02-11 09:21:50 +01:00
selection_watcher.c selection watcher: Actually watch selections 2019-02-06 10:27:59 +01:00
selection_watcher.h Prepare a selection watcher interface 2019-02-06 09:30:16 +01:00
tag.c doc: Move inline usage to example files 2021-06-20 13:47:27 +02:00
tag.h Move variable declarations from header to C file to fix build with GCC 10 2020-04-17 19:25:40 +02:00
window.c Move variable declarations from header to C file to fix build with GCC 10 2020-04-17 19:25:40 +02:00
window.h Move variable declarations from header to C file to fix build with GCC 10 2020-04-17 19:25:40 +02:00