gnome-desktop r5101 - in trunk/libgnome-desktop: . libgnomeui
- From: ssp svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-desktop r5101 - in trunk/libgnome-desktop: . libgnomeui
- Date: Sun, 1 Jun 2008 23:51:39 +0000 (UTC)
Author: ssp
Date: Sun Jun 1 23:51:39 2008
New Revision: 5101
URL: http://svn.gnome.org/viewvc/gnome-desktop?rev=5101&view=rev
Log:
Sun Jun 1 19:35:42 2008 Sïren Sandmann <sandmann redhat com>
* gnome-bg.[ch]: Add getters for the various properties
Modified:
trunk/libgnome-desktop/ChangeLog
trunk/libgnome-desktop/gnome-bg.c
trunk/libgnome-desktop/libgnomeui/gnome-bg.h
Modified: trunk/libgnome-desktop/gnome-bg.c
==============================================================================
--- trunk/libgnome-desktop/gnome-bg.c (original)
+++ trunk/libgnome-desktop/gnome-bg.c Sun Jun 1 23:51:39 2008
@@ -457,6 +457,34 @@
}
}
+GnomeBGPlacement
+gnome_bg_get_placement (GnomeBG *bg)
+{
+ g_return_val_if_fail (bg != NULL, -1);
+
+ return bg->placement;
+}
+
+void
+gnome_bg_get_color (GnomeBG *bg,
+ GnomeBGColorType *type,
+ GdkColor *primary,
+ GdkColor *secondary)
+{
+ g_return_if_fail (bg != NULL);
+
+ if (type)
+ *type = bg->color_type;
+
+ if (primary)
+ *primary = bg->primary;
+
+ if (secondary)
+ *secondary = bg->secondary;
+}
+
+const gchar * gnome_bg_get_filename (GnomeBG *bg);
+
void
gnome_bg_set_filename (GnomeBG *bg,
const char *filename)
Modified: trunk/libgnome-desktop/libgnomeui/gnome-bg.h
==============================================================================
--- trunk/libgnome-desktop/libgnomeui/gnome-bg.h (original)
+++ trunk/libgnome-desktop/libgnomeui/gnome-bg.h Sun Jun 1 23:51:39 2008
@@ -61,43 +61,53 @@
GNOME_BG_PLACEMENT_FILL_SCREEN
} GnomeBGPlacement;
-GType gnome_bg_get_type (void);
-GnomeBG * gnome_bg_new (void);
-void gnome_bg_load_from_preferences (GnomeBG *bg,
- GConfClient *client);
-void gnome_bg_save_to_preferences (GnomeBG *bg,
- GConfClient *client);
-void gnome_bg_set_placement (GnomeBG *img,
- GnomeBGPlacement placement);
-void gnome_bg_set_color (GnomeBG *img,
- GnomeBGColorType type,
- GdkColor *c1,
- GdkColor *c2);
-void gnome_bg_set_filename (GnomeBG *img,
- const char *filename);
-void gnome_bg_draw (GnomeBG *img,
- GdkPixbuf *dest);
-GdkPixmap *gnome_bg_create_pixmap (GnomeBG *img,
- GdkWindow *window,
- int width,
- int height,
- gboolean root);
-gboolean gnome_bg_get_image_size (GnomeBG *bg,
- GnomeThumbnailFactory *factory,
- int *width,
- int *height);
-GdkPixbuf *gnome_bg_create_thumbnail (GnomeBG *bg,
- GnomeThumbnailFactory *factory,
- GdkScreen *screen,
- int dest_width,
- int dest_height);
-gboolean gnome_bg_is_dark (GnomeBG *img);
-gboolean gnome_bg_changes_with_size (GnomeBG *img);
+GType gnome_bg_get_type (void);
+GnomeBG * gnome_bg_new (void);
+void gnome_bg_load_from_preferences (GnomeBG *bg,
+ GConfClient *client);
+void gnome_bg_save_to_preferences (GnomeBG *bg,
+ GConfClient *client);
+/* Setters */
+void gnome_bg_set_filename (GnomeBG *bg,
+ const char *filename);
+void gnome_bg_set_placement (GnomeBG *bg,
+ GnomeBGPlacement placement);
+void gnome_bg_set_color (GnomeBG *bg,
+ GnomeBGColorType type,
+ GdkColor *primary,
+ GdkColor *secondary);
+/* Getters */
+GnomeBGPlacement gnome_bg_get_placement (GnomeBG *bg);
+void gnome_bg_get_color (GnomeBG *bg,
+ GnomeBGColorType *type,
+ GdkColor *primary,
+ GdkColor *secondary);
+const gchar * gnome_bg_get_filename (GnomeBG *bg);
+
+/* Drawing and thumbnailing */
+void gnome_bg_draw (GnomeBG *bg,
+ GdkPixbuf *dest);
+GdkPixmap * gnome_bg_create_pixmap (GnomeBG *bg,
+ GdkWindow *window,
+ int width,
+ int height,
+ gboolean root);
+gboolean gnome_bg_get_image_size (GnomeBG *bg,
+ GnomeThumbnailFactory *factory,
+ int *width,
+ int *height);
+GdkPixbuf * gnome_bg_create_thumbnail (GnomeBG *bg,
+ GnomeThumbnailFactory *factory,
+ GdkScreen *screen,
+ int dest_width,
+ int dest_height);
+gboolean gnome_bg_is_dark (GnomeBG *bg);
+gboolean gnome_bg_changes_with_size (GnomeBG *bg);
-/* Set a pixmap as root - not a GnomeBG method */
-void gnome_bg_set_pixmap_as_root (GdkScreen *screen,
- GdkPixmap *pixmap);
+/* Set a pixmap as root - not a GnomeBG method */
+void gnome_bg_set_pixmap_as_root (GdkScreen *screen,
+ GdkPixmap *pixmap);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]