summaryrefslogtreecommitdiff
path: root/libnautilus-extensions/nautilus-gdk-extensions.h
diff options
context:
space:
mode:
authorRamiro Estrugo <ramiro@src.gnome.org>2000-08-29 02:11:38 +0000
committerRamiro Estrugo <ramiro@src.gnome.org>2000-08-29 02:11:38 +0000
commitf7276747ab4240532078ae7d4385ef0a705f82a0 (patch)
treecdca9cedf1cdcfb29d1f4c3cde3ddd37df7f6b47 /libnautilus-extensions/nautilus-gdk-extensions.h
parentb23f4b14cc0553f49e3fd42441ed4832b13a6023 (diff)
downloadnautilus-f7276747ab4240532078ae7d4385ef0a705f82a0.tar.gz
Add unref/ref functions for gcs that take NULL.
* libnautilus-extensions/nautilus-buffered-widget.c: (nautilus_buffered_widget_initialize), (nautilus_buffered_widget_destroy), (buffered_widget_update_pixbuf), (create_background_pixbuf_from_none), (create_background_pixbuf_from_solid), (create_background_pixbuf_from_ancestor), (create_background_pixbuf), (nautilus_buffered_widget_get_vertical_offset), (nautilus_buffered_widget_set_background_type), (nautilus_buffered_widget_get_background_type), (nautilus_buffered_widget_set_background_color), (nautilus_buffered_widget_get_background_color): * libnautilus-extensions/nautilus-buffered-widget.h: * libnautilus-extensions/nautilus-gdk-extensions.c: (nautilus_gdk_gc_ref_if_not_null), (nautilus_gdk_gc_unref_if_not_null): * libnautilus-extensions/nautilus-gdk-extensions.h: Add unref/ref functions for gcs that take NULL. * libnautilus-extensions/nautilus-label.c: (nautilus_label_new): * libnautilus-extensions/nautilus-label.h: Make the constructor work just like GtkLabel by accepting a string. * components/music/nautilus-music-view.c: (nautilus_music_view_initialize), (add_play_controls): Use the new NautilusLabel constructor. * components/services/nautilus-dependent-shared/shared-service-widg ets.c: (create_label_widget): Use the new NautilusLabel constructor. * src/nautilus-first-time-druid.c: (make_anti_aliased_label), (set_up_update_feedback_page): Use the new NautilusLabel constructor. * src/nautilus-property-browser.c: (nautilus_property_browser_initialize), (make_properties_from_directory_path), (make_properties_from_xml_node), (make_category_link): Use the new NautilusLabel constructor. Fix the tile names to be antialises by using the new buffered widget SOLID background mode. * src/nautilus-sidebar-title.c: (sidebar_create_smooth_components_if_needed): Use the new NautilusLabel constructor. * src/nautilus-theme-selector.c: (nautilus_theme_selector_initialize): Use the new NautilusLabel constructor. * test/test-nautilus-image.c: (main): * test/test-nautilus-label.c: (main): Use the new NautilusLabel constructor.
Diffstat (limited to 'libnautilus-extensions/nautilus-gdk-extensions.h')
-rw-r--r--libnautilus-extensions/nautilus-gdk-extensions.h20
1 files changed, 15 insertions, 5 deletions
diff --git a/libnautilus-extensions/nautilus-gdk-extensions.h b/libnautilus-extensions/nautilus-gdk-extensions.h
index fbd713402..440473b42 100644
--- a/libnautilus-extensions/nautilus-gdk-extensions.h
+++ b/libnautilus-extensions/nautilus-gdk-extensions.h
@@ -68,6 +68,7 @@ char * nautilus_gradient_set_right_color_spec (const char *grad
char * nautilus_gradient_set_bottom_color_spec (const char *gradient_spec,
const char *bottom_color);
+
/* A version of parse_color that substitutes a default color instead of returning
a boolean to indicate it cannot be parsed.
*/
@@ -79,10 +80,11 @@ void nautilus_gdk_color_parse_with_white_default (const char *colo
guint32 nautilus_parse_rgb_with_default (const char *color_spec,
guint32 default_rgb);
guint32 nautilus_parse_rgb_with_white_default (const char *color_spec);
-guint32 nautilus_rgb_shift_color (guint32 color,
- float shift_by);
-guint32 nautilus_gdk_color_to_rgb (const GdkColor *color);
+guint32 nautilus_rgb_shift_color (guint32 color,
+ float shift_by);
+guint32 nautilus_gdk_color_to_rgb (const GdkColor *color);
GdkColor * nautilus_gdk_rgb_to_color (const guint32 color);
+
/* Fill routines that take GdkRectangle parameters instead of four integers. */
void nautilus_fill_rectangle (GdkDrawable *drawable,
GdkGC *gc,
@@ -97,9 +99,11 @@ void nautilus_fill_rectangle_with_gradient (GdkDrawable *draw
guint32 start_rgb,
guint32 end_rgb,
gboolean horizontal_gradient);
+
/* A routine to get a 50% gray stippled bitmap for use in some types of highlighting. */
GdkBitmap *nautilus_stipple_bitmap (void);
+
/* Misc GdkRectangle helper functions */
gboolean nautilus_rectangle_contains (const GdkRectangle *rectangle,
int x,
@@ -108,27 +112,33 @@ void nautilus_rectangle_inset (GdkRectangle *rect
int x,
int y);
+
/* A basic operation we use for drawing gradients is interpolating two colors.*/
guint32 nautilus_interpolate_color (gdouble ratio,
guint32 start_rgb,
guint32 end_rgb);
+
/* Misc GdkFont helper functions */
gboolean nautilus_gdk_font_equal (GdkFont *font_a_null_allowed,
GdkFont *font_b_null_allowed);
GdkFont * nautilus_get_largest_fitting_font (const char *text_to_format,
int width,
const char *font_format);
-GdkFont * nautilus_gdk_font_get_bold (const GdkFont *plain);
+GdkFont * nautilus_gdk_font_get_bold (const GdkFont *plain);
+
/* Misc GdkWindow helper functions */
void nautilus_gdk_window_bring_to_front (GdkWindow *window);
+
/* In GNOME 2.0 this function will be in the libraries */
void nautilus_set_mini_icon (GdkWindow *window,
GdkPixmap *pixmap,
GdkBitmap *mask);
-GdkGC * nautilus_gdk_create_copy_area_gc (GdkWindow *window);
+GdkGC * nautilus_gdk_create_copy_area_gc (GdkWindow *window);
+void nautilus_gdk_gc_ref_if_not_null (GdkGC *gc_or_null);
+void nautilus_gdk_gc_unref_if_not_null (GdkGC *gc_or_null);
#endif /* NAUTILUS_GDK_EXTENSIONS_H */