CinnamonDesktop.BG¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Fields¶
- Inherited:
Class Details¶
- class CinnamonDesktop.BG(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod get_surface_from_root(screen)¶
- Parameters:
screen (
Gdk.Screen
) – aGdk.Screen
- Returns:
a
cairo.Surface
if successful orNone
- Return type:
This function queries the _XROOTPMAP_ID property from the root window associated with screen to determine the current root window background pixmap and returns a copy of it. If the _XROOTPMAP_ID is not set, then a black surface is returned.
- classmethod new()¶
- Return type:
- classmethod set_surface_as_root(screen, surface)¶
- Parameters:
screen (
Gdk.Screen
) – theGdk.Screen
to change root background onsurface (
cairo.Surface
) – thecairo.Surface
to set root background from. Must be an xlib surface backing a pixmap.
Set the root pixmap, and properties pointing to it. We do this atomically with a server grab to make sure that we won’t leak the pixmap if somebody else it setting it at the same time. (This assumes that they follow the same conventions we do). surface should come from a call to
CinnamonDesktop.BG.create_surface
().
- classmethod set_surface_as_root_with_crossfade(screen, surface)¶
- Parameters:
screen (
Gdk.Screen
) – theGdk.Screen
to change root background onsurface (
cairo.Surface
) – the cairo xlib surface to set root background from
- Returns:
a
CinnamonDesktop.BGCrossfade
object- Return type:
Set the root pixmap, and properties pointing to it. This function differs from
CinnamonDesktop.BG.set_surface_as_root
() in that it adds a subtle crossfade animation from the current root pixmap to the new one.
- create_and_set_gtk_image(image, width, height)¶
- create_and_set_surface_as_root(root_window, screen)¶
- Parameters:
root_window (
Gdk.Window
) – theGdk.Window
screen (
Gdk.Screen
) – theGdk.Screen
- create_frame_thumbnail(factory, screen, dest_width, dest_height, frame_num)¶
- Parameters:
factory (
CinnamonDesktop.DesktopThumbnailFactory
) –screen (
Gdk.Screen
) –dest_width (
int
) –dest_height (
int
) –frame_num (
int
) –
- Returns:
the newly created thumbnail or or
None
if frame_num is out of bounds.- Return type:
Creates a thumbnail for a certain frame, where ‘frame’ is somewhat vaguely defined as ‘suitable point to show while single-stepping through the slideshow’.
- create_surface(window, width, height, root)¶
- Parameters:
window (
Gdk.Window
) –width (
int
) –height (
int
) –root (
bool
) –
- Returns:
None
on error (e.g. out of X connections)- Return type:
Create a surface that can be set as background for window. If is_root is
True
, the surface created will be created by a temporary X server connection so that if someone calls XKillClient on it, it won’t affect the application who created it.
- create_thumbnail(factory, screen, dest_width, dest_height)¶
- Parameters:
factory (
CinnamonDesktop.DesktopThumbnailFactory
) –screen (
Gdk.Screen
) –dest_width (
int
) –dest_height (
int
) –
- Returns:
a
GdkPixbuf.Pixbuf
showing the background as a thumbnail- Return type:
- draw(dest, screen, is_root)¶
- Parameters:
dest (
GdkPixbuf.Pixbuf
) –screen (
Gdk.Screen
) –is_root (
bool
) –
- get_color(type, primary, secondary)¶
- Parameters:
type (
CDesktopEnums.BackgroundShading
) –primary (
Gdk.Color
) –secondary (
Gdk.Color
) –
- get_image_size(factory, best_width, best_height, width, height)¶
- get_placement()¶
- Return type:
- is_dark(dest_width, dest_height)¶
- load_from_preferences(settings)¶
- Parameters:
settings (
Gio.Settings
) –
- save_to_preferences(settings)¶
- Parameters:
settings (
Gio.Settings
) –
- set_color(type, primary, secondary)¶
- Parameters:
type (
CDesktopEnums.BackgroundShading
) –primary (
Gdk.Color
) –secondary (
Gdk.Color
) –
- set_placement(placement)¶
- Parameters:
placement (
CDesktopEnums.BackgroundStyle
) –
Signal Details¶
- CinnamonDesktop.BG.signals.changed(b_g)¶
- Signal Name:
changed
- Flags:
- Parameters:
b_g (
CinnamonDesktop.BG
) – The object which received the signal
- CinnamonDesktop.BG.signals.transitioned(b_g)¶
- Signal Name:
transitioned
- Flags:
- Parameters:
b_g (
CinnamonDesktop.BG
) – The object which received the signal