|
mate-desktop 1.29.2
Library with common API for various MATE modules
|
#include <string.h>#include <math.h>#include <stdarg.h>#include <stdlib.h>#include <glib/gstdio.h>#include <gio/gio.h>#include <gdk/gdkx.h>#include <X11/Xlib.h>#include <X11/Xatom.h>#include <cairo.h>#include <mate-bg.h>#include <mate-bg-crossfade.h>#include <cairo-xlib.h>Data Structures | |
| struct | _Slide |
| struct | _FileSize |
| struct | _MateBG |
| struct | _MateBGClass |
| struct | _SlideShow |
| struct | FileCacheEntry |
Macros | |
| #define | MATE_DESKTOP_USE_UNSTABLE_API |
| #define | MATE_BG_CACHE_DIR "mate/background" |
| #define | KEEP_EXPENSIVE_CACHE_SECS 60 |
| #define | THUMBNAIL_SIZE 256 |
| #define | CACHE_SIZE 4 |
Typedefs | |
| typedef struct _SlideShow | SlideShow |
| typedef struct _Slide | Slide |
| typedef struct _FileSize | FileSize |
| typedef struct FileCacheEntry | FileCacheEntry |
Enumerations | |
| enum | { CHANGED , TRANSITIONED , N_SIGNALS } |
| enum | FileType { PIXBUF , SLIDESHOW , THUMBNAIL } |
Functions | |
| static cairo_surface_t * | make_root_pixmap (GdkWindow *window, gint width, gint height) |
| static void | pixbuf_average_value (GdkPixbuf *pixbuf, GdkRGBA *result) |
| static GdkPixbuf * | pixbuf_scale_to_fit (GdkPixbuf *src, int max_width, int max_height) |
| static GdkPixbuf * | pixbuf_scale_to_min (GdkPixbuf *src, int min_width, int min_height) |
| static void | pixbuf_draw_gradient (GdkPixbuf *pixbuf, gboolean horizontal, GdkRGBA *c1, GdkRGBA *c2, GdkRectangle *rect) |
| static void | pixbuf_tile (GdkPixbuf *src, GdkPixbuf *dest) |
| static void | pixbuf_blend (GdkPixbuf *src, GdkPixbuf *dest, int src_x, int src_y, int width, int height, int dest_x, int dest_y, double alpha) |
| static GdkPixbuf * | create_thumbnail_for_filename (MateDesktopThumbnailFactory *factory, const char *filename) |
| static gboolean | get_thumb_annotations (GdkPixbuf *thumb, int *orig_width, int *orig_height) |
| static GdkPixbuf * | get_pixbuf_for_size (MateBG *bg, gint num_monitor, int width, int height) |
| static void | clear_cache (MateBG *bg) |
| static gboolean | is_different (MateBG *bg, const char *filename) |
| static gint64 | get_mtime (const char *filename) |
| static GdkPixbuf * | create_img_thumbnail (MateBG *bg, MateDesktopThumbnailFactory *factory, GdkScreen *screen, int dest_width, int dest_height, int frame_num) |
| static SlideShow * | get_as_slideshow (MateBG *bg, const char *filename) |
| static Slide * | get_current_slide (SlideShow *show, double *alpha) |
| static gboolean | slideshow_has_multiple_sizes (SlideShow *show) |
| static SlideShow * | read_slideshow_file (const char *filename, GError **err) |
| static SlideShow * | slideshow_ref (SlideShow *show) |
| static void | slideshow_unref (SlideShow *show) |
| static FileSize * | find_best_size (GSList *sizes, gint width, gint height) |
| static void | color_from_string (const char *string, GdkRGBA *colorp) |
| static char * | color_to_string (const GdkRGBA *color) |
| static gboolean | do_changed (MateBG *bg) |
| static void | queue_changed (MateBG *bg) |
| static gboolean | do_transitioned (MateBG *bg) |
| static void | queue_transitioned (MateBG *bg) |
| void | mate_bg_load_from_preferences (MateBG *bg) |
| void | mate_bg_load_from_system_preferences (MateBG *bg) |
| void | mate_bg_load_from_system_gsettings (MateBG *bg, GSettings *settings, gboolean reset_apply) |
| void | mate_bg_load_from_gsettings (MateBG *bg, GSettings *settings) |
| void | mate_bg_save_to_preferences (MateBG *bg) |
| void | mate_bg_save_to_gsettings (MateBG *bg, GSettings *settings) |
| static void | mate_bg_init (MateBG *bg) |
| static void | mate_bg_dispose (GObject *object) |
| static void | mate_bg_finalize (GObject *object) |
| static void | mate_bg_class_init (MateBGClass *klass) |
| MateBG * | mate_bg_new (void) |
| void | mate_bg_set_color (MateBG *bg, MateBGColorType type, GdkRGBA *primary, GdkRGBA *secondary) |
| void | mate_bg_set_placement (MateBG *bg, MateBGPlacement placement) |
| MateBGPlacement | mate_bg_get_placement (MateBG *bg) |
| void | mate_bg_get_color (MateBG *bg, MateBGColorType *type, GdkRGBA *primary, GdkRGBA *secondary) |
| void | mate_bg_set_draw_background (MateBG *bg, gboolean draw_background) |
| gboolean | mate_bg_get_draw_background (MateBG *bg) |
| const gchar * | mate_bg_get_filename (MateBG *bg) |
| static gchar * | get_wallpaper_cache_dir (void) |
| static gchar * | get_wallpaper_cache_prefix_name (gint num_monitor, MateBGPlacement placement, gint width, gint height) |
| static char * | get_wallpaper_cache_filename (const char *filename, gint num_monitor, MateBGPlacement placement, gint width, gint height) |
| static void | cleanup_cache_for_monitor (gchar *cache_dir, gint num_monitor) |
| static gboolean | cache_file_is_valid (const char *filename, const char *cache_filename) |
| static void | refresh_cache_file (MateBG *bg, GdkPixbuf *new_pixbuf, gint num_monitor, gint width, gint height) |
| static void | file_changed (GFileMonitor *file_monitor, GFile *child, GFile *other_file, GFileMonitorEvent event_type, gpointer user_data) |
| void | mate_bg_set_filename (MateBG *bg, const char *filename) |
| static void | draw_color_area (MateBG *bg, GdkPixbuf *dest, GdkRectangle *rect) |
| static void | draw_color (MateBG *bg, GdkPixbuf *dest) |
| static void | draw_color_each_monitor (MateBG *bg, GdkPixbuf *dest, GdkScreen *screen) |
| static GdkPixbuf * | pixbuf_clip_to_fit (GdkPixbuf *src, int max_width, int max_height) |
| static GdkPixbuf * | get_scaled_pixbuf (MateBGPlacement placement, GdkPixbuf *pixbuf, int width, int height, int *x, int *y, int *w, int *h) |
| static void | draw_image_area (MateBG *bg, gint num_monitor, GdkPixbuf *pixbuf, GdkPixbuf *dest, GdkRectangle *area) |
| static void | draw_image_for_thumb (MateBG *bg, GdkPixbuf *pixbuf, GdkPixbuf *dest) |
| static void | draw_once (MateBG *bg, GdkPixbuf *dest, gboolean is_root) |
| static void | draw_each_monitor (MateBG *bg, GdkPixbuf *dest, GdkScreen *screen) |
| void | mate_bg_draw (MateBG *bg, GdkPixbuf *dest, GdkScreen *screen, gboolean is_root) |
| gboolean | mate_bg_has_multiple_sizes (MateBG *bg) |
| static void | mate_bg_get_pixmap_size (MateBG *bg, int width, int height, int *pixmap_width, int *pixmap_height) |
| cairo_surface_t * | mate_bg_create_surface (MateBG *bg, GdkWindow *window, int width, int height, gboolean root) |
| mate_bg_create_surface: @bg: MateBG @window: @width: @height: @root: | |
| cairo_surface_t * | mate_bg_create_surface_scale (MateBG *bg, GdkWindow *window, int width, int height, int scale, gboolean root) |
| mate_bg_create_surface_scale: @bg: MateBG @window: @width: @height: @scale: @root: | |
| gboolean | mate_bg_is_dark (MateBG *bg, int width, int height) |
| static gboolean | get_original_size (const char *filename, int *orig_width, int *orig_height) |
| static const char * | get_filename_for_size (MateBG *bg, gint best_width, gint best_height) |
| gboolean | mate_bg_get_image_size (MateBG *bg, MateDesktopThumbnailFactory *factory, int best_width, int best_height, int *width, int *height) |
| static double | fit_factor (int from_width, int from_height, int to_width, int to_height) |
| GdkPixbuf * | mate_bg_create_thumbnail (MateBG *bg, MateDesktopThumbnailFactory *factory, GdkScreen *screen, int dest_width, int dest_height) |
| mate_bg_create_thumbnail: | |
| cairo_surface_t * | mate_bg_get_surface_from_root (GdkScreen *screen) |
| mate_bg_get_surface_from_root: @screen: a #GdkScreen | |
| static void | mate_bg_set_root_pixmap_id (GdkScreen *screen, Display *display, Pixmap xpixmap) |
| void | mate_bg_set_surface_as_root (GdkScreen *screen, cairo_surface_t *surface) |
| mate_bg_set_surface_as_root: @screen: the #GdkScreen to change root background on @surface: the #cairo_surface_t to set root background from. | |
| MateBGCrossfade * | mate_bg_set_surface_as_root_with_crossfade (GdkScreen *screen, cairo_surface_t *surface) |
| mate_bg_set_surface_as_root_with_crossfade: @screen: the #GdkScreen to change root background on @surface: the cairo xlib surface to set root background from | |
| static double | now (void) |
| static GdkPixbuf * | blend (GdkPixbuf *p1, GdkPixbuf *p2, double alpha) |
| static void | file_cache_entry_delete (FileCacheEntry *ent) |
| static void | bound_cache (MateBG *bg) |
| static const FileCacheEntry * | file_cache_lookup (MateBG *bg, FileType type, const char *filename) |
| static FileCacheEntry * | file_cache_entry_new (MateBG *bg, FileType type, const char *filename) |
| static void | file_cache_add_pixbuf (MateBG *bg, const char *filename, GdkPixbuf *pixbuf) |
| static void | file_cache_add_thumbnail (MateBG *bg, const char *filename, GdkPixbuf *pixbuf) |
| static void | file_cache_add_slide_show (MateBG *bg, const char *filename, SlideShow *show) |
| static GdkPixbuf * | load_from_cache_file (MateBG *bg, const char *filename, gint num_monitor, gint best_width, gint best_height) |
| static GdkPixbuf * | get_as_pixbuf_for_size (MateBG *bg, const char *filename, gint monitor, gint best_width, gint best_height) |
| static GdkPixbuf * | get_as_thumbnail (MateBG *bg, MateDesktopThumbnailFactory *factory, const char *filename) |
| static gboolean | blow_expensive_caches (gpointer data) |
| static void | blow_expensive_caches_in_idle (MateBG *bg) |
| static gboolean | on_timeout (gpointer data) |
| static double | get_slide_timeout (Slide *slide) |
| static void | ensure_timeout (MateBG *bg, Slide *slide) |
| static GdkPixbuf * | scale_thumbnail (MateBGPlacement placement, const char *filename, GdkPixbuf *thumb, GdkScreen *screen, int dest_width, int dest_height) |
| static GdkPixbuf * | get_pixbuf_for_size (MateBG *bg, gint monitor, gint best_width, gint best_height) |
| static guchar * | create_gradient (const GdkRGBA *primary, const GdkRGBA *secondary, int n_pixels) |
| static gboolean | stack_is (SlideShow *parser, const char *s1,...) |
| static void | handle_start_element (GMarkupParseContext *context, const gchar *name, const gchar **attr_names, const gchar **attr_values, gpointer user_data, GError **err) |
| static void | handle_end_element (GMarkupParseContext *context, const gchar *name, gpointer user_data, GError **err) |
| static int | parse_int (const char *text) |
| static void | handle_text (GMarkupParseContext *context, const gchar *text, gsize text_len, gpointer user_data, GError **err) |
| static void | dump_bg (SlideShow *show) |
| static void | threadsafe_localtime (time_t time, struct tm *tm) |
| gboolean | mate_bg_changes_with_time (MateBG *bg) |
| GdkPixbuf * | mate_bg_create_frame_thumbnail (MateBG *bg, MateDesktopThumbnailFactory *factory, GdkScreen *screen, int dest_width, int dest_height, int frame_num) |
| mate_bg_create_frame_thumbnail: | |
Variables | |
| static guint | signals [N_SIGNALS] = {0} |
| #define CACHE_SIZE 4 |
| #define KEEP_EXPENSIVE_CACHE_SECS 60 |
| #define MATE_BG_CACHE_DIR "mate/background" |
| #define MATE_DESKTOP_USE_UNSTABLE_API |
| #define THUMBNAIL_SIZE 256 |
| typedef struct FileCacheEntry FileCacheEntry |
| typedef struct _SlideShow SlideShow |
| enum FileType |
|
static |
References pixbuf_blend().
Referenced by create_img_thumbnail(), and get_pixbuf_for_size().
|
static |
References _MateBG::blow_caches_id, _MateBG::file_cache, file_cache_entry_delete(), PIXBUF, _MateBG::pixbuf_cache, and FileCacheEntry::type.
Referenced by blow_expensive_caches_in_idle().
|
static |
References _MateBG::blow_caches_id, and blow_expensive_caches().
Referenced by get_pixbuf_for_size().
|
static |
References CACHE_SIZE, _MateBG::file_cache, and file_cache_entry_delete().
Referenced by file_cache_entry_new().
|
static |
References get_mtime().
Referenced by load_from_cache_file(), and refresh_cache_file().
|
static |
Referenced by refresh_cache_file().
|
static |
References _MateBG::file_cache, file_cache_entry_delete(), _MateBG::pixbuf_cache, and _MateBG::timeout_id.
Referenced by file_changed(), mate_bg_dispose(), and mate_bg_set_filename().
|
static |
Referenced by mate_bg_load_from_gsettings().
|
static |
Referenced by mate_bg_save_to_gsettings().
|
static |
Referenced by pixbuf_draw_gradient().
|
static |
References blend(), ensure_timeout(), _FileSize::file, _Slide::file1, _Slide::file2, _MateBG::filename, find_best_size(), _Slide::fixed, get_as_slideshow(), get_as_thumbnail(), get_current_slide(), _MateBG::placement, scale_thumbnail(), _SlideShow::slides, and slideshow_unref().
Referenced by mate_bg_create_frame_thumbnail(), and mate_bg_create_thumbnail().
|
static |
References get_mtime(), mate_desktop_thumbnail_factory_create_failed_thumbnail(), mate_desktop_thumbnail_factory_lookup(), mate_desktop_thumbnail_factory_save_thumbnail(), pixbuf_scale_to_fit(), and THUMBNAIL_SIZE.
Referenced by get_as_thumbnail(), and mate_bg_get_image_size().
|
static |
References CHANGED, _MateBG::changed_id, and signals.
Referenced by queue_changed().
|
static |
References _MateBG::pixbuf_cache, signals, TRANSITIONED, and _MateBG::transitioned_id.
Referenced by queue_transitioned().
|
static |
References draw_color_area().
Referenced by mate_bg_create_frame_thumbnail(), mate_bg_create_thumbnail(), and mate_bg_draw().
|
static |
References _MateBG::color_type, MATE_BG_COLOR_H_GRADIENT, MATE_BG_COLOR_SOLID, MATE_BG_COLOR_V_GRADIENT, pixbuf_draw_gradient(), _MateBG::primary, and _MateBG::secondary.
Referenced by draw_color(), and draw_color_each_monitor().
|
static |
References draw_color_area().
Referenced by mate_bg_draw().
|
static |
References draw_image_area(), and get_pixbuf_for_size().
Referenced by mate_bg_draw().
|
static |
References get_scaled_pixbuf(), MATE_BG_PLACEMENT_CENTERED, MATE_BG_PLACEMENT_FILL_SCREEN, MATE_BG_PLACEMENT_SCALED, MATE_BG_PLACEMENT_SPANNED, MATE_BG_PLACEMENT_TILED, MATE_BG_PLACEMENT_ZOOMED, pixbuf_blend(), pixbuf_tile(), _MateBG::placement, and refresh_cache_file().
Referenced by draw_each_monitor(), draw_image_for_thumb(), and draw_once().
|
static |
References draw_image_area().
Referenced by mate_bg_create_frame_thumbnail(), and mate_bg_create_thumbnail().
|
static |
References draw_image_area(), and get_pixbuf_for_size().
Referenced by mate_bg_draw().
|
static |
References _Slide::duration, _FileSize::file, _Slide::file1, _Slide::file2, _Slide::fixed, _FileSize::height, _SlideShow::slides, and _FileSize::width.
Referenced by read_slideshow_file().
References get_slide_timeout(), on_timeout(), and _MateBG::timeout_id.
Referenced by create_img_thumbnail(), and get_pixbuf_for_size().
|
static |
References file_cache_entry_new(), PIXBUF, FileCacheEntry::pixbuf, and FileCacheEntry::u.
Referenced by get_as_pixbuf_for_size().
|
static |
References file_cache_entry_new(), SLIDESHOW, FileCacheEntry::slideshow, slideshow_ref(), and FileCacheEntry::u.
Referenced by get_as_slideshow().
|
static |
References file_cache_entry_new(), THUMBNAIL, FileCacheEntry::thumbnail, and FileCacheEntry::u.
Referenced by get_as_thumbnail().
|
static |
References FileCacheEntry::filename, PIXBUF, FileCacheEntry::pixbuf, SLIDESHOW, FileCacheEntry::slideshow, slideshow_unref(), THUMBNAIL, FileCacheEntry::thumbnail, FileCacheEntry::type, and FileCacheEntry::u.
Referenced by blow_expensive_caches(), bound_cache(), and clear_cache().
|
static |
References bound_cache(), _MateBG::file_cache, file_cache_lookup(), FileCacheEntry::filename, and FileCacheEntry::type.
Referenced by file_cache_add_pixbuf(), file_cache_add_slide_show(), and file_cache_add_thumbnail().
|
static |
References _MateBG::file_cache, FileCacheEntry::filename, and FileCacheEntry::type.
Referenced by file_cache_entry_new(), get_as_pixbuf_for_size(), get_as_slideshow(), and get_as_thumbnail().
|
static |
References clear_cache(), MATE_BG, and queue_changed().
Referenced by mate_bg_set_filename().
|
static |
References _FileSize::height, and _FileSize::width.
Referenced by create_img_thumbnail(), get_filename_for_size(), and get_pixbuf_for_size().
|
static |
Referenced by scale_thumbnail().
|
static |
References file_cache_add_pixbuf(), file_cache_lookup(), load_from_cache_file(), MATE_BG_PLACEMENT_FILL_SCREEN, MATE_BG_PLACEMENT_SCALED, MATE_BG_PLACEMENT_ZOOMED, PIXBUF, FileCacheEntry::pixbuf, _MateBG::placement, and FileCacheEntry::u.
Referenced by get_pixbuf_for_size().
References file_cache_add_slide_show(), file_cache_lookup(), read_slideshow_file(), SLIDESHOW, FileCacheEntry::slideshow, slideshow_ref(), and FileCacheEntry::u.
Referenced by create_img_thumbnail(), get_filename_for_size(), get_pixbuf_for_size(), mate_bg_changes_with_time(), mate_bg_create_frame_thumbnail(), and mate_bg_has_multiple_sizes().
|
static |
References create_thumbnail_for_filename(), file_cache_add_thumbnail(), file_cache_lookup(), THUMBNAIL, FileCacheEntry::thumbnail, and FileCacheEntry::u.
Referenced by create_img_thumbnail().
References _Slide::duration, now(), _SlideShow::slides, _SlideShow::start_time, and _SlideShow::total_duration.
Referenced by create_img_thumbnail(), get_filename_for_size(), and get_pixbuf_for_size().
|
static |
References _FileSize::file, _Slide::file1, _MateBG::filename, find_best_size(), get_as_slideshow(), get_current_slide(), and slideshow_unref().
Referenced by mate_bg_get_image_size().
|
static |
|
static |
Referenced by mate_bg_get_image_size(), and scale_thumbnail().
|
static |
References blend(), blow_expensive_caches_in_idle(), ensure_timeout(), _FileSize::file, _Slide::file1, _Slide::file2, _MateBG::file_mtime, _MateBG::filename, find_best_size(), _Slide::fixed, get_as_pixbuf_for_size(), get_as_slideshow(), get_current_slide(), get_mtime(), get_slide_timeout(), KEEP_EXPENSIVE_CACHE_SECS, _MateBG::pixbuf_cache, slideshow_ref(), and slideshow_unref().
|
static |
Referenced by draw_each_monitor(), draw_once(), and mate_bg_is_dark().
|
static |
References MATE_BG_PLACEMENT_CENTERED, MATE_BG_PLACEMENT_FILL_SCREEN, MATE_BG_PLACEMENT_SCALED, MATE_BG_PLACEMENT_SPANNED, MATE_BG_PLACEMENT_TILED, MATE_BG_PLACEMENT_ZOOMED, pixbuf_clip_to_fit(), pixbuf_scale_to_fit(), and pixbuf_scale_to_min().
Referenced by draw_image_area().
|
static |
References _Slide::duration, and _Slide::fixed.
Referenced by ensure_timeout(), and get_pixbuf_for_size().
|
static |
Referenced by mate_bg_get_image_size(), and scale_thumbnail().
|
inlinestatic |
References MATE_BG_CACHE_DIR.
Referenced by get_wallpaper_cache_filename(), and refresh_cache_file().
|
static |
References get_wallpaper_cache_dir(), and get_wallpaper_cache_prefix_name().
Referenced by load_from_cache_file(), and refresh_cache_file().
|
inlinestatic |
Referenced by get_wallpaper_cache_filename().
|
static |
References _SlideShow::stack.
Referenced by read_slideshow_file().
|
static |
References _Slide::file1, _Slide::file2, _Slide::fixed, _FileSize::height, _SlideShow::slides, _SlideShow::stack, and _FileSize::width.
Referenced by read_slideshow_file().
|
static |
References _Slide::duration, _FileSize::file, _Slide::file1, _Slide::file2, _SlideShow::has_multiple_sizes, _FileSize::height, parse_int(), _SlideShow::slides, stack_is(), _SlideShow::start_tm, _SlideShow::total_duration, and _FileSize::width.
Referenced by read_slideshow_file().
|
static |
References _MateBG::file_mtime, _MateBG::filename, and get_mtime().
Referenced by mate_bg_set_filename().
|
static |
References cache_file_is_valid(), get_wallpaper_cache_filename(), and _MateBG::placement.
Referenced by get_as_pixbuf_for_size().
|
static |
Referenced by mate_bg_create_surface_scale().
| gboolean mate_bg_changes_with_time | ( | MateBG * | bg | ) |
References _MateBG::filename, get_as_slideshow(), _SlideShow::slides, and slideshow_unref().
|
static |
References CHANGED, mate_bg_dispose(), mate_bg_finalize(), signals, and TRANSITIONED.
| GdkPixbuf * mate_bg_create_frame_thumbnail | ( | MateBG * | bg, |
| MateDesktopThumbnailFactory * | factory, | ||
| GdkScreen * | screen, | ||
| int | dest_width, | ||
| int | dest_height, | ||
| int | frame_num | ||
| ) |
mate_bg_create_frame_thumbnail:
Creates a thumbnail for a certain frame, where 'frame' is somewhat vaguely defined as 'suitable point to show while single-stepping through the slideshow'.
Returns: (transfer full): the newly created thumbnail or or NULL if frame_num is out of bounds.
References create_img_thumbnail(), draw_color(), draw_image_for_thumb(), _MateBG::filename, _Slide::fixed, get_as_slideshow(), and _SlideShow::slides.
| cairo_surface_t * mate_bg_create_surface | ( | MateBG * | bg, |
| GdkWindow * | window, | ||
| int | width, | ||
| int | height, | ||
| gboolean | root | ||
| ) |
mate_bg_create_surface: @bg: MateBG @window: @width: @height: @root:
Create a surface that can be set as background for @window. If @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.
References mate_bg_create_surface_scale().
| cairo_surface_t * mate_bg_create_surface_scale | ( | MateBG * | bg, |
| GdkWindow * | window, | ||
| int | width, | ||
| int | height, | ||
| int | scale, | ||
| gboolean | root | ||
| ) |
mate_bg_create_surface_scale: @bg: MateBG @window: @width: @height: @scale: @root:
Create a scaled surface that can be set as background for @window. If @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.
References _MateBG::color_type, _MateBG::filename, make_root_pixmap(), MATE_BG_COLOR_SOLID, mate_bg_draw(), mate_bg_get_pixmap_size(), _MateBG::pixbuf_cache, and _MateBG::primary.
Referenced by mate_bg_create_surface().
| GdkPixbuf * mate_bg_create_thumbnail | ( | MateBG * | bg, |
| MateDesktopThumbnailFactory * | factory, | ||
| GdkScreen * | screen, | ||
| int | dest_width, | ||
| int | dest_height | ||
| ) |
mate_bg_create_thumbnail:
Returns: (transfer full): a #GdkPixbuf showing the background as a thumbnail
References create_img_thumbnail(), draw_color(), draw_image_for_thumb(), and _MateBG::filename.
|
static |
References clear_cache(), _MateBG::file_monitor, and MATE_BG.
Referenced by mate_bg_class_init().
| void mate_bg_draw | ( | MateBG * | bg, |
| GdkPixbuf * | dest, | ||
| GdkScreen * | screen, | ||
| gboolean | is_root | ||
| ) |
References draw_color(), draw_color_each_monitor(), draw_each_monitor(), draw_once(), _MateBG::filename, MATE_BG_PLACEMENT_SPANNED, and _MateBG::placement.
Referenced by mate_bg_create_surface_scale().
|
static |
References _MateBG::blow_caches_id, _MateBG::changed_id, _MateBG::filename, MATE_BG, and _MateBG::transitioned_id.
Referenced by mate_bg_class_init().
| void mate_bg_get_color | ( | MateBG * | bg, |
| MateBGColorType * | type, | ||
| GdkRGBA * | primary, | ||
| GdkRGBA * | secondary | ||
| ) |
References _MateBG::color_type, _MateBG::primary, and _MateBG::secondary.
| gboolean mate_bg_get_draw_background | ( | MateBG * | bg | ) |
References _MateBG::is_enabled.
| const gchar * mate_bg_get_filename | ( | MateBG * | bg | ) |
References _MateBG::filename.
| gboolean mate_bg_get_image_size | ( | MateBG * | bg, |
| MateDesktopThumbnailFactory * | factory, | ||
| int | best_width, | ||
| int | best_height, | ||
| int * | width, | ||
| int * | height | ||
| ) |
References create_thumbnail_for_filename(), _MateBG::filename, get_filename_for_size(), get_original_size(), and get_thumb_annotations().
|
static |
References _MateBG::color_type, _MateBG::filename, MATE_BG_COLOR_H_GRADIENT, MATE_BG_COLOR_SOLID, and MATE_BG_COLOR_V_GRADIENT.
Referenced by mate_bg_create_surface_scale().
| MateBGPlacement mate_bg_get_placement | ( | MateBG * | bg | ) |
References _MateBG::placement.
| cairo_surface_t * mate_bg_get_surface_from_root | ( | GdkScreen * | screen | ) |
mate_bg_get_surface_from_root: @screen: a #GdkScreen
This function queries the _XROOTPMAP_ID property from the root window associated with @screen to determine the current root window background surface and returns a copy of it. If the _XROOTPMAP_ID is not set, then a black surface is returned.
Return value: a #cairo_surface_t if successful or NULL
Referenced by mate_bg_set_surface_as_root_with_crossfade().
| gboolean mate_bg_has_multiple_sizes | ( | MateBG * | bg | ) |
References _MateBG::filename, get_as_slideshow(), slideshow_has_multiple_sizes(), and slideshow_unref().
|
static |
| gboolean mate_bg_is_dark | ( | MateBG * | bg, |
| int | width, | ||
| int | height | ||
| ) |
References _MateBG::color_type, get_pixbuf_for_size(), MATE_BG_COLOR_SOLID, pixbuf_average_value(), _MateBG::primary, and _MateBG::secondary.
| void mate_bg_load_from_gsettings | ( | MateBG * | bg, |
| GSettings * | settings | ||
| ) |
References color_from_string(), _MateBG::is_enabled, MATE_BG_KEY_COLOR_TYPE, MATE_BG_KEY_DRAW_BACKGROUND, MATE_BG_KEY_PICTURE_FILENAME, MATE_BG_KEY_PICTURE_PLACEMENT, MATE_BG_KEY_PRIMARY_COLOR, MATE_BG_KEY_SECONDARY_COLOR, mate_bg_set_color(), mate_bg_set_filename(), mate_bg_set_placement(), and MATE_IS_BG.
Referenced by mate_bg_load_from_preferences(), and mate_bg_load_from_system_gsettings().
| void mate_bg_load_from_preferences | ( | MateBG * | bg | ) |
References mate_bg_load_from_gsettings(), MATE_BG_SCHEMA, and queue_changed().
| void mate_bg_load_from_system_gsettings | ( | MateBG * | bg, |
| GSettings * | settings, | ||
| gboolean | reset_apply | ||
| ) |
References mate_bg_load_from_gsettings(), and MATE_IS_BG.
Referenced by mate_bg_load_from_system_preferences().
| void mate_bg_load_from_system_preferences | ( | MateBG * | bg | ) |
References mate_bg_load_from_system_gsettings(), and MATE_BG_SCHEMA.
| MateBG * mate_bg_new | ( | void | ) |
References MATE_TYPE_BG.
| void mate_bg_save_to_gsettings | ( | MateBG * | bg, |
| GSettings * | settings | ||
| ) |
References color_to_string(), _MateBG::color_type, _MateBG::filename, _MateBG::is_enabled, MATE_BG_KEY_COLOR_TYPE, MATE_BG_KEY_DRAW_BACKGROUND, MATE_BG_KEY_PICTURE_FILENAME, MATE_BG_KEY_PICTURE_PLACEMENT, MATE_BG_KEY_PRIMARY_COLOR, MATE_BG_KEY_SECONDARY_COLOR, MATE_IS_BG, _MateBG::placement, _MateBG::primary, and _MateBG::secondary.
Referenced by mate_bg_save_to_preferences().
| void mate_bg_save_to_preferences | ( | MateBG * | bg | ) |
References mate_bg_save_to_gsettings(), and MATE_BG_SCHEMA.
| void mate_bg_set_color | ( | MateBG * | bg, |
| MateBGColorType | type, | ||
| GdkRGBA * | primary, | ||
| GdkRGBA * | secondary | ||
| ) |
References _MateBG::color_type, _MateBG::primary, queue_changed(), and _MateBG::secondary.
Referenced by mate_bg_load_from_gsettings().
| void mate_bg_set_draw_background | ( | MateBG * | bg, |
| gboolean | draw_background | ||
| ) |
References draw_background(), _MateBG::is_enabled, and queue_changed().
| void mate_bg_set_filename | ( | MateBG * | bg, |
| const char * | filename | ||
| ) |
References clear_cache(), file_changed(), _MateBG::file_monitor, _MateBG::file_mtime, _MateBG::filename, get_mtime(), is_different(), and queue_changed().
Referenced by mate_bg_load_from_gsettings().
| void mate_bg_set_placement | ( | MateBG * | bg, |
| MateBGPlacement | placement | ||
| ) |
References _MateBG::placement, and queue_changed().
Referenced by mate_bg_load_from_gsettings().
|
static |
Referenced by mate_bg_set_surface_as_root().
| void mate_bg_set_surface_as_root | ( | GdkScreen * | screen, |
| cairo_surface_t * | surface | ||
| ) |
mate_bg_set_surface_as_root: @screen: the #GdkScreen to change root background on @surface: the #cairo_surface_t 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 mate_bg_create_surface().
References mate_bg_set_root_pixmap_id().
Referenced by mate_bg_set_surface_as_root_with_crossfade().
| MateBGCrossfade * mate_bg_set_surface_as_root_with_crossfade | ( | GdkScreen * | screen, |
| cairo_surface_t * | surface | ||
| ) |
mate_bg_set_surface_as_root_with_crossfade: @screen: the #GdkScreen to change root background on @surface: the cairo xlib surface to set root background from
Set the root pixmap, and properties pointing to it. This function differs from mate_bg_set_surface_as_root() in that it adds a subtle crossfade animation from the current root pixmap to the new one.
Return value: (transfer full): a MateBGCrossfade object
References mate_bg_crossfade_new(), mate_bg_crossfade_set_end_surface(), mate_bg_crossfade_set_start_surface(), mate_bg_crossfade_start(), mate_bg_get_surface_from_root(), and mate_bg_set_surface_as_root().
|
static |
Referenced by get_current_slide(), get_current_time(), and on_tick().
|
static |
References queue_transitioned(), and _MateBG::timeout_id.
Referenced by ensure_timeout().
|
static |
Referenced by handle_text().
|
static |
Referenced by mate_bg_is_dark().
|
static |
Referenced by blend(), draw_image_area(), and pixbuf_tile().
|
static |
Referenced by get_scaled_pixbuf().
|
static |
References create_gradient().
Referenced by draw_color_area().
|
static |
Referenced by create_thumbnail_for_filename(), and get_scaled_pixbuf().
|
static |
Referenced by get_scaled_pixbuf().
|
static |
References pixbuf_blend().
Referenced by draw_image_area().
|
static |
References _MateBG::changed_id, and do_changed().
Referenced by file_changed(), mate_bg_load_from_preferences(), mate_bg_set_color(), mate_bg_set_draw_background(), mate_bg_set_filename(), and mate_bg_set_placement().
|
static |
References do_transitioned(), and _MateBG::transitioned_id.
Referenced by on_timeout().
|
static |
References dump_bg(), _Slide::duration, handle_end_element(), handle_start_element(), handle_text(), _SlideShow::ref_count, _SlideShow::slides, slideshow_unref(), _SlideShow::stack, _SlideShow::start_time, _SlideShow::start_tm, threadsafe_localtime(), and _SlideShow::total_duration.
Referenced by get_as_slideshow().
|
static |
References cache_file_is_valid(), cleanup_cache_for_monitor(), _MateBG::filename, get_wallpaper_cache_dir(), get_wallpaper_cache_filename(), and _MateBG::placement.
Referenced by draw_image_area().
|
static |
References fit_factor(), get_original_size(), get_thumb_annotations(), MATE_BG_PLACEMENT_CENTERED, and MATE_BG_PLACEMENT_TILED.
Referenced by create_img_thumbnail().
|
static |
References _SlideShow::has_multiple_sizes.
Referenced by mate_bg_has_multiple_sizes().
References _SlideShow::ref_count.
Referenced by file_cache_add_slide_show(), get_as_slideshow(), and get_pixbuf_for_size().
|
static |
References _FileSize::file, _Slide::file1, _Slide::file2, _SlideShow::ref_count, _SlideShow::slides, and _SlideShow::stack.
Referenced by create_img_thumbnail(), file_cache_entry_delete(), get_filename_for_size(), get_pixbuf_for_size(), mate_bg_changes_with_time(), mate_bg_has_multiple_sizes(), and read_slideshow_file().
|
static |
References _SlideShow::stack.
Referenced by handle_text().
|
static |
Referenced by read_slideshow_file().
|
static |
Referenced by do_changed(), do_transitioned(), and mate_bg_class_init().