![]() |
![]() |
![]() |
GNOME Desktop Library Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Signals |
GnomeBG * gnome_bg_new (void
); void gnome_bg_load_from_preferences (GnomeBG *bg
,GSettings *settings
); void gnome_bg_save_to_preferences (GnomeBG *bg
,GSettings *settings
); void gnome_bg_set_filename (GnomeBG *bg
,const char *filename
); void gnome_bg_set_placement (GnomeBG *bg
,GDesktopBackgroundStyle placement
); void gnome_bg_set_color (GnomeBG *bg
,GDesktopBackgroundShading type
,GdkColor *primary
,GdkColor *secondary
); void gnome_bg_set_draw_background (GnomeBG *bg
,gboolean draw_background
); GDesktopBackgroundStyle gnome_bg_get_placement (GnomeBG *bg
); gboolean gnome_bg_get_draw_background (GnomeBG *bg
); void gnome_bg_get_color (GnomeBG *bg
,GDesktopBackgroundShading *type
,GdkColor *primary
,GdkColor *secondary
); const gchar * gnome_bg_get_filename (GnomeBG *bg
); void gnome_bg_draw (GnomeBG *bg
,GdkPixbuf *dest
,GdkScreen *screen
,gboolean is_root
); cairo_surface_t * gnome_bg_create_surface (GnomeBG *bg
,GdkWindow *window
,int width
,int height
,gboolean root
); gboolean gnome_bg_get_image_size (GnomeBG *bg
,GnomeDesktopThumbnailFactory *factory
,int best_width
,int best_height
,int *width
,int *height
); GdkPixbuf * gnome_bg_create_thumbnail (GnomeBG *bg
,GnomeDesktopThumbnailFactory *factory
,GdkScreen *screen
,int dest_width
,int dest_height
); gboolean gnome_bg_is_dark (GnomeBG *bg
,int dest_width
,int dest_height
); gboolean gnome_bg_has_multiple_sizes (GnomeBG *bg
); gboolean gnome_bg_changes_with_time (GnomeBG *bg
); GdkPixbuf * gnome_bg_create_frame_thumbnail (GnomeBG *bg
,GnomeDesktopThumbnailFactory *factory
,GdkScreen *screen
,int dest_width
,int dest_height
,int frame_num
); void gnome_bg_set_surface_as_root (GdkScreen *screen
,cairo_surface_t *surface
); GnomeBGCrossfade * gnome_bg_set_surface_as_root_with_crossfade (GdkScreen *screen
,cairo_surface_t *surface
); cairo_surface_t * gnome_bg_get_surface_from_root (GdkScreen *screen
); GnomeBG; GnomeBGClass;
void gnome_bg_load_from_preferences (GnomeBG *bg
,GSettings *settings
);
void gnome_bg_save_to_preferences (GnomeBG *bg
,GSettings *settings
);
void gnome_bg_set_placement (GnomeBG *bg
,GDesktopBackgroundStyle placement
);
void gnome_bg_set_color (GnomeBG *bg
,GDesktopBackgroundShading type
,GdkColor *primary
,GdkColor *secondary
);
void gnome_bg_set_draw_background (GnomeBG *bg
,gboolean draw_background
);
void gnome_bg_get_color (GnomeBG *bg
,GDesktopBackgroundShading *type
,GdkColor *primary
,GdkColor *secondary
);
void gnome_bg_draw (GnomeBG *bg
,GdkPixbuf *dest
,GdkScreen *screen
,gboolean is_root
);
cairo_surface_t * gnome_bg_create_surface (GnomeBG *bg
,GdkWindow *window
,int width
,int height
,gboolean root
);
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.
|
GnomeBG |
gboolean gnome_bg_get_image_size (GnomeBG *bg
,GnomeDesktopThumbnailFactory *factory
,int best_width
,int best_height
,int *width
,int *height
);
GdkPixbuf * gnome_bg_create_thumbnail (GnomeBG *bg
,GnomeDesktopThumbnailFactory *factory
,GdkScreen *screen
,int dest_width
,int dest_height
);
Returns : |
a GdkPixbuf showing the background as a thumbnail. [transfer full] |
GdkPixbuf * gnome_bg_create_frame_thumbnail (GnomeBG *bg
,GnomeDesktopThumbnailFactory *factory
,GdkScreen *screen
,int dest_width
,int dest_height
,int frame_num
);
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 : |
the newly created thumbnail or or NULL if frame_num is out of bounds. [transfer full] |
void gnome_bg_set_surface_as_root (GdkScreen *screen
,cairo_surface_t *surface
);
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 gnome_bg_create_surface()
.
|
the GdkScreen to change root background on |
|
the cairo_surface_t to set root background from. Must be an xlib surface backing a pixmap. |
GnomeBGCrossfade * gnome_bg_set_surface_as_root_with_crossfade (GdkScreen *screen
,cairo_surface_t *surface
);
Set the root pixmap, and properties pointing to it.
This function differs from gnome_bg_set_surface_as_root()
in that it adds a subtle crossfade animation from the
current root pixmap to the new one.
|
the GdkScreen to change root background on |
|
the cairo xlib surface to set root background from |
Returns : |
a GnomeBGCrossfade object. [transfer full] |
cairo_surface_t * gnome_bg_get_surface_from_root (GdkScreen *screen
);
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.
|
a GdkScreen |
Returns : |
a cairo_surface_t if successful or NULL
|
"changed"
signalvoid user_function (GnomeBG *bg,
gpointer user_data) : Run Last
|
the object which received the signal. |
|
user data set when the signal handler was connected. |
"transitioned"
signalvoid user_function (GnomeBG *bg,
gpointer user_data) : Run Last
|
the object which received the signal. |
|
user data set when the signal handler was connected. |