# Module: `gears.wallpaper`

Functions for setting the wallpaper.

This module is deprecated, please use awful.wallpaper.

### Info:

- Copyright: 2012 Uli Schlachter
- Originally authored by: Uli Schlachter
  (Full contributors list available on our github project)

## Deprecated functions

gears.wallpaper.prepare_context (s) | Prepare the needed state for setting a wallpaper. | Deprecated
gears.wallpaper.set (pattern) | Set the current wallpaper. | Deprecated
gears.wallpaper.centered (surf, s, background, scale) | Set a centered wallpaper. | Deprecated
gears.wallpaper.tiled (surf, s, offset) | Set a tiled wallpaper. | Deprecated
gears.wallpaper.maximized (surf, s, ignore_aspect, offset) | Set a maximized wallpaper. | Deprecated
gears.wallpaper.fit (surf, s, background) | Set a fitting wallpaper. | Deprecated

## Deprecated functions

🔗 gears.wallpaper.prepare_context (s)
  Prepare the needed state for setting a wallpaper. This function returns a cairo context through which a wallpaper can be drawn. The context is only valid for a short time and should not be saved in a global variable.

  ### Parameters:

  Name |  | Type(s) | Description
  --- | --- | --- | ---
  s |  |  | The screen to set the wallpaper on or nil for all screens

  ### Returns:

  1. The available geometry (table with entries width and height)
  2. A cairo context that the wallpaper should be drawn to.
🔗 gears.wallpaper.set (pattern)
  Set the current wallpaper.

  ### Parameters:

  Name |  | Type(s) | Description
  --- | --- | --- | ---
  pattern |  |  | The wallpaper that should be set. This can be a cairo surface, a description for gears.color or a cairo pattern.

  ### See also:

  gears.color | This module simplifies the creation of cairo pattern objects. | module

🔗 gears.wallpaper.centered (surf, s, background, scale)
  Set a centered wallpaper.

  ### Parameters:

  Name |  | Type(s) | Description
  --- | --- | --- | ---
  surf |  |  | The wallpaper to center. Either a cairo surface or a file name.
  s |  |  | The screen whose wallpaper should be set. Can be nil, in which case all screens are set.
  background |  |  | The background color that should be used. Gets handled via gears.color. The default is black.
  scale |  |  | The scale factor for the wallpaper. Default is 1 (original size).

  ### See also:

  gears.color | This module simplifies the creation of cairo pattern objects. | module

🔗 gears.wallpaper.tiled (surf, s, offset)
  Set a tiled wallpaper.

  ### Parameters:

  Name |  | Type(s) | Description
  --- | --- | --- | ---
  surf |  |  | The wallpaper to tile. Either a cairo surface or a file name.
  s |  |  | The screen whose wallpaper should be set. Can be nil, in which case all screens are set.
  offset |  |  | This can be set to a table with entries x and y.

🔗 gears.wallpaper.maximized (surf, s, ignore_aspect, offset)
  Set a maximized wallpaper.

  ### Parameters:

  Name |  | Type(s) | Description
  --- | --- | --- | ---
  surf |  |  | The wallpaper to set. Either a cairo surface or a file name.
  s |  |  | The screen whose wallpaper should be set. Can be nil, in which case all screens are set.
  ignore_aspect |  |  | If this is true, the image's aspect ratio is ignored. The default is to honor the aspect ratio.
  offset |  |  | This can be set to a table with entries x and y.

🔗 gears.wallpaper.fit (surf, s, background)
  Set a fitting wallpaper.

  ### Parameters:

  Name |  | Type(s) | Description
  --- | --- | --- | ---
  surf |  |  | The wallpaper to set. Either a cairo surface or a file name.
  s |  |  | The screen whose wallpaper should be set. Can be nil, in which case all screens are set.
  background |  |  | The background color that should be used. Gets handled via gears.color. The default is black.

  ### See also:

  gears.color | This module simplifies the creation of cairo pattern objects. | module

generated by LDoc 1.5.0