summaryrefslogtreecommitdiff
path: root/libnautilus-private/nautilus-gdk-extensions.c
diff options
context:
space:
mode:
authorRamiro Estrugo <ramiro@src.gnome.org>2001-04-04 00:07:15 +0000
committerRamiro Estrugo <ramiro@src.gnome.org>2001-04-04 00:07:15 +0000
commitfbbaf803620a6a7cf4598b0b59406718da6fc778 (patch)
tree5771ffd1b01df76f1837270f5f6f57f5092f20e9 /libnautilus-private/nautilus-gdk-extensions.c
parent9f9bfe2e5ff03c6829b4b8730b65cdc00051331d (diff)
downloadnautilus-fbbaf803620a6a7cf4598b0b59406718da6fc778.tar.gz
Remove librsvg.
* Makefile.am: Remove librsvg. * librsvg/.cvsignore: * librsvg/Makefile.am: * librsvg/art_render.c: * librsvg/art_render.h: * librsvg/art_render_gradient.c: * librsvg/art_render_gradient.h: * librsvg/art_render_mask.c: * librsvg/art_render_mask.h: * librsvg/art_render_svp.c: * librsvg/art_render_svp.h: * librsvg/art_rgba.c: * librsvg/art_rgba.h: * librsvg/example-nested-transform.svg: * librsvg/makefile-simple: * librsvg/opacity.svg: * librsvg/rsvg-bpath-util.c: * librsvg/rsvg-bpath-util.h: * librsvg/rsvg-css.c: * librsvg/rsvg-css.h: * librsvg/rsvg-defs.c: * librsvg/rsvg-defs.h: * librsvg/rsvg-ft.c: * librsvg/rsvg-ft.h: * librsvg/rsvg-paint-server.c: * librsvg/rsvg-paint-server.h: * librsvg/rsvg-path.c: * librsvg/rsvg-path.h: * librsvg/rsvg.c: * librsvg/rsvg.h: * librsvg/subpixel-text-test: * librsvg/test-ft-gtk.c: * librsvg/test-ft.c: * librsvg/test-rsvg.c: * librsvg/test.svg: Move librsvg to its own top level GNOME CVS module. * configure.in: Add librsvg and eel dependencies. Remove librsvg and font entries. * nautilus.spec.in: Remove font entries. Add librsvg and eel requirements. * data/Makefile.am: * data/fonts/.cvsignore: * data/fonts/Makefile.am: * data/fonts/urw/.cvsignore: * data/fonts/urw/Makefile.am: * data/fonts/urw/README: * data/fonts/urw/fonts.dir: * data/fonts/urw/n019003l.afm: * data/fonts/urw/n019003l.pfb: * data/fonts/urw/n019003l.pfm: * data/fonts/urw/n019004l.afm: * data/fonts/urw/n019004l.pfb: * data/fonts/urw/n019004l.pfm: * data/fonts/urw/n019023l.afm: * data/fonts/urw/n019023l.pfb: * data/fonts/urw/n019023l.pfm: * data/fonts/urw/n019024l.afm: * data/fonts/urw/n019024l.pfb: * data/fonts/urw/n019024l.pfm: Retire default fonts. These now live in eel. * libnautilus/nautilus-undo-transaction.c: (nautilus_undo_transaction_destroy): * libnautilus/nautilus-view.c: (nautilus_view_destroy): Update for eel changes. Use eel-gtk-macros. * nautilus-installer/src/nautilus-druid-page-eazel.c: (nautilus_druid_page_eazel_destroy), (nautilus_druid_page_eazel_finalize), (nautilus_druid_page_eazel_size_allocate), (nautilus_druid_page_eazel_size_request): Update for eel changes. Use eel-gtk-macros. * libnautilus-extensions/Makefile.am: * libnautilus-extensions/nautilus-bonobo-extensions.c: * libnautilus-extensions/nautilus-bonobo-extensions.h: * libnautilus-extensions/nautilus-bookmark.c: * libnautilus-extensions/nautilus-ctree.c: * libnautilus-extensions/nautilus-customization-data.c: * libnautilus-extensions/nautilus-dateedit-extensions.c: * libnautilus-extensions/nautilus-dateedit-extensions.h: * libnautilus-extensions/nautilus-directory-async.c: * libnautilus-extensions/nautilus-directory-background.c: * libnautilus-extensions/nautilus-directory-background.h: * libnautilus-extensions/nautilus-directory-metafile-monitor.c: * libnautilus-extensions/nautilus-directory-metafile.c: * libnautilus-extensions/nautilus-directory.c: * libnautilus-extensions/nautilus-drag-window.c: * libnautilus-extensions/nautilus-drag.c: * libnautilus-extensions/nautilus-druid-page-eazel.c: * libnautilus-extensions/nautilus-druid.c: * libnautilus-extensions/nautilus-entry.c: * libnautilus-extensions/nautilus-file-changes-queue.c: * libnautilus-extensions/nautilus-file-operations-progress.c: * libnautilus-extensions/nautilus-file-operations.c: * libnautilus-extensions/nautilus-file-private.h: * libnautilus-extensions/nautilus-file-utilities.c: * libnautilus-extensions/nautilus-file.c: * libnautilus-extensions/nautilus-font-factory.c: * libnautilus-extensions/nautilus-gconf-extensions.c: * libnautilus-extensions/nautilus-generous-bin.c: * libnautilus-extensions/nautilus-global-preferences.c: * libnautilus-extensions/nautilus-global-preferences.h: * libnautilus-extensions/nautilus-horizontal-splitter.c: * libnautilus-extensions/nautilus-icon-canvas-item.c: * libnautilus-extensions/nautilus-icon-canvas-item.h: * libnautilus-extensions/nautilus-icon-container.c: * libnautilus-extensions/nautilus-icon-container.h: * libnautilus-extensions/nautilus-icon-dnd.c: * libnautilus-extensions/nautilus-icon-factory.c: * libnautilus-extensions/nautilus-icon-factory.h: * libnautilus-extensions/nautilus-icon-private.h: * libnautilus-extensions/nautilus-icon-text-item.c: * libnautilus-extensions/nautilus-keep-last-vertical-box.c: * libnautilus-extensions/nautilus-lib-self-check-functions.c: * libnautilus-extensions/nautilus-lib-self-check-functions.h: * libnautilus-extensions/nautilus-link-set.c: * libnautilus-extensions/nautilus-link.c: * libnautilus-extensions/nautilus-list-column-title.c: * libnautilus-extensions/nautilus-list.c: * libnautilus-extensions/nautilus-medusa-support.c: * libnautilus-extensions/nautilus-merged-directory.c: * libnautilus-extensions/nautilus-metafile-factory.c: * libnautilus-extensions/nautilus-metafile.c: * libnautilus-extensions/nautilus-mime-actions.c: * libnautilus-extensions/nautilus-preferences-box.c: * libnautilus-extensions/nautilus-preferences-dialog.c: * libnautilus-extensions/nautilus-preferences-group.c: * libnautilus-extensions/nautilus-preferences-item.c: * libnautilus-extensions/nautilus-preferences-pane.c: * libnautilus-extensions/nautilus-preferences.c: * libnautilus-extensions/nautilus-preferences.h: * libnautilus-extensions/nautilus-program-chooser.c: * libnautilus-extensions/nautilus-program-choosing.c: * libnautilus-extensions/nautilus-program-choosing.h: * libnautilus-extensions/nautilus-search-uri.c: * libnautilus-extensions/nautilus-sidebar-functions.c: * libnautilus-extensions/nautilus-tabs.c: * libnautilus-extensions/nautilus-theme.c: * libnautilus-extensions/nautilus-thumbnails.c: * libnautilus-extensions/nautilus-trash-directory.c: * libnautilus-extensions/nautilus-trash-file.c: * libnautilus-extensions/nautilus-trash-monitor.c: * libnautilus-extensions/nautilus-undo-context.c: * libnautilus-extensions/nautilus-undo-manager.c: * libnautilus-extensions/nautilus-undo-signal-handlers.c: * libnautilus-extensions/nautilus-vfs-directory.c: * libnautilus-extensions/nautilus-vfs-file.c: * libnautilus-extensions/nautilus-view-identifier.c: * libnautilus-extensions/nautilus-volume-monitor.c: Use new eel library. * libnautilus-extensions/nautilus-art-extensions.c: * libnautilus-extensions/nautilus-art-extensions.h: * libnautilus-extensions/nautilus-art-gtk-extensions.c: * libnautilus-extensions/nautilus-art-gtk-extensions.h: * libnautilus-extensions/nautilus-background-canvas-group.c: * libnautilus-extensions/nautilus-background-canvas-group.h: * libnautilus-extensions/nautilus-background.c: * libnautilus-extensions/nautilus-background.h: * libnautilus-extensions/nautilus-caption-table.c: * libnautilus-extensions/nautilus-caption-table.h: * libnautilus-extensions/nautilus-caption.c: * libnautilus-extensions/nautilus-caption.h: * libnautilus-extensions/nautilus-clickable-image.c: * libnautilus-extensions/nautilus-clickable-image.h: * libnautilus-extensions/nautilus-debug-drawing.c: * libnautilus-extensions/nautilus-debug-drawing.h: * libnautilus-extensions/nautilus-debug.c: * libnautilus-extensions/nautilus-debug.h: * libnautilus-extensions/nautilus-ellipsizing-label.c: * libnautilus-extensions/nautilus-ellipsizing-label.h: * libnautilus-extensions/nautilus-enumeration.c: * libnautilus-extensions/nautilus-enumeration.h: * libnautilus-extensions/nautilus-font-manager.c: * libnautilus-extensions/nautilus-font-manager.h: * libnautilus-extensions/nautilus-font-picker.c: * libnautilus-extensions/nautilus-font-picker.h: * libnautilus-extensions/nautilus-gdk-extensions.c: * libnautilus-extensions/nautilus-gdk-extensions.h: * libnautilus-extensions/nautilus-gdk-font-extensions.c: * libnautilus-extensions/nautilus-gdk-font-extensions.h: * libnautilus-extensions/nautilus-gdk-pixbuf-extensions.c: * libnautilus-extensions/nautilus-gdk-pixbuf-extensions.h: * libnautilus-extensions/nautilus-glib-extensions.c: * libnautilus-extensions/nautilus-glib-extensions.h: * libnautilus-extensions/nautilus-glyph.c: * libnautilus-extensions/nautilus-glyph.h: * libnautilus-extensions/nautilus-gnome-extensions.c: * libnautilus-extensions/nautilus-gnome-extensions.h: * libnautilus-extensions/nautilus-graphic-effects.c: * libnautilus-extensions/nautilus-graphic-effects.h: * libnautilus-extensions/nautilus-gtk-extensions.c: * libnautilus-extensions/nautilus-gtk-extensions.h: * libnautilus-extensions/nautilus-gtk-macros.h: * libnautilus-extensions/nautilus-image-table.c: * libnautilus-extensions/nautilus-image-table.h: * libnautilus-extensions/nautilus-image-with-background.c: * libnautilus-extensions/nautilus-image-with-background.h: * libnautilus-extensions/nautilus-image.c: * libnautilus-extensions/nautilus-image.h: * libnautilus-extensions/nautilus-label-with-background.c: * libnautilus-extensions/nautilus-label-with-background.h: * libnautilus-extensions/nautilus-label.c: * libnautilus-extensions/nautilus-label.h: * libnautilus-extensions/nautilus-labeled-image.c: * libnautilus-extensions/nautilus-labeled-image.h: * libnautilus-extensions/nautilus-lib-self-check-functions.c: * libnautilus-extensions/nautilus-lib-self-check-functions.h: * libnautilus-extensions/nautilus-password-dialog.c: * libnautilus-extensions/nautilus-password-dialog.h: * libnautilus-extensions/nautilus-radio-button-group.c: * libnautilus-extensions/nautilus-radio-button-group.h: * libnautilus-extensions/nautilus-region.c: * libnautilus-extensions/nautilus-region.h: * libnautilus-extensions/nautilus-scalable-font-private.h: * libnautilus-extensions/nautilus-scalable-font.c: * libnautilus-extensions/nautilus-scalable-font.h: * libnautilus-extensions/nautilus-self-checks.c: * libnautilus-extensions/nautilus-self-checks.h: * libnautilus-extensions/nautilus-smooth-text-layout-cache.c: * libnautilus-extensions/nautilus-smooth-text-layout-cache.h: * libnautilus-extensions/nautilus-smooth-text-layout.c: * libnautilus-extensions/nautilus-smooth-text-layout.h: * libnautilus-extensions/nautilus-smooth-widget.c: * libnautilus-extensions/nautilus-smooth-widget.h: * libnautilus-extensions/nautilus-stock-dialogs.c: * libnautilus-extensions/nautilus-stock-dialogs.h: * libnautilus-extensions/nautilus-string-list.c: * libnautilus-extensions/nautilus-string-list.h: * libnautilus-extensions/nautilus-string-map.c: * libnautilus-extensions/nautilus-string-map.h: * libnautilus-extensions/nautilus-string-picker.c: * libnautilus-extensions/nautilus-string-picker.h: * libnautilus-extensions/nautilus-string.c: * libnautilus-extensions/nautilus-string.h: * libnautilus-extensions/nautilus-text-caption.c: * libnautilus-extensions/nautilus-text-caption.h: * libnautilus-extensions/nautilus-viewport.c: * libnautilus-extensions/nautilus-viewport.h: * libnautilus-extensions/nautilus-wrap-table.c: * libnautilus-extensions/nautilus-wrap-table.h: * libnautilus-extensions/nautilus-xml-extensions.c: * libnautilus-extensions/nautilus-xml-extensions.h: Remove these files. These are all part of eel now. * applets/launcher/nautilus-launcher-applet.c: * applets/preferences-applet/nautilus-preferences-applet.c: * components/adapter/Makefile.am: * components/adapter/main.c: * components/adapter/nautilus-adapter-control-embed-strategy.c: * components/adapter/nautilus-adapter-embed-strategy.c: * components/adapter/nautilus-adapter-embeddable-embed-strategy.c: * components/adapter/nautilus-adapter-factory-server.c: * components/adapter/nautilus-adapter-file-load-strategy.c: * components/adapter/nautilus-adapter-load-strategy.c: * components/adapter/nautilus-adapter-progressive-load-strategy.c: * components/adapter/nautilus-adapter-stream-load-strategy.c: * components/adapter/nautilus-adapter.c: * components/hardware/Makefile.am: * components/hardware/nautilus-hardware-view.c: * components/help/Makefile.am: * components/help/help-method.c: * components/help/hyperbola-filefmt.c: * components/help/hyperbola-nav-tree.c: * components/history/Makefile.am: * components/history/nautilus-history-view.c: * components/image-viewer/Makefile.am: * components/image-viewer/nautilus-image-view.c: * components/loser/content/Makefile.am: * components/loser/content/nautilus-content-loser.c: * components/loser/sidebar/Makefile.am: * components/loser/sidebar/nautilus-sidebar-loser.c: * components/mozilla/Makefile.am: * components/mozilla/bonobo-extensions.c: * components/mozilla/nautilus-mozilla-content-view.c: * components/music/Makefile.am: * components/music/nautilus-music-view.c: * components/notes/Makefile.am: * components/notes/nautilus-notes.c: * components/rpmview/Makefile.am: * components/rpmview/nautilus-rpm-verify-window.c: * components/rpmview/nautilus-rpm-view-install.c: * components/rpmview/nautilus-rpm-view.c: * components/sample/nautilus-sample-content-view.c: * components/services/install-view/Makefile.am: * components/services/install-view/callbacks.c: * components/services/install-view/forms.c: * components/services/install-view/nautilus-service-install-view.c: * components/services/install/lib/eazel-install-logic2.c: * components/services/install/server/main.c: * components/services/inventory-view/Makefile.am: * components/services/inventory-view/nautilus-inventory-config-page .c: * components/services/inventory-view/nautilus-inventory-disable-pag * components/services/inventory-view/nautilus-inventory-enable-page * components/services/inventory-view/nautilus-inventory-view.c: * components/services/inventory/Makefile.am: * components/services/inventory/eazel-inventory-upload-callback.c: * components/services/inventory/eazel-inventory.c: * components/services/inventory/main.c: * components/services/login/nautilus-view/Makefile.am: * components/services/login/nautilus-view/nautilus-change-password- view.c: * components/services/login/nautilus-view/password-box.c: * components/services/nautilus-dependent-shared/Makefile.am: * components/services/nautilus-dependent-shared/eazel-services-exte nsions.c: * components/services/nautilus-dependent-shared/eazel-services-exte nsions.h: * components/services/nautilus-dependent-shared/eazel-services-foot er.c: * components/services/nautilus-dependent-shared/eazel-services-head er.c: * components/services/nautilus-dependent-shared/test-footer-header. c: * components/services/summary/Makefile.am: * components/services/summary/nautilus-summary-callbacks.c: * components/services/summary/nautilus-summary-dialogs.c: * components/services/summary/nautilus-summary-dialogs.h: * components/services/summary/nautilus-summary-footer.c: * components/services/summary/nautilus-summary-menu-items.c: * components/services/summary/nautilus-summary-view-private.h: * components/services/summary/nautilus-summary-view.c: * components/services/time/nautilus-view/main.c: * components/services/time/nautilus-view/trilobite-eazel-time-view. c: * components/services/trilobite/sample/nautilus-view/Makefile.am: * components/text/Makefile.am: * components/text/nautilus-text-view.c: * components/throbber/Makefile.am: * components/throbber/main.c: * components/throbber/nautilus-throbber.c: * components/tree/Makefile.am: * components/tree/nautilus-tree-change-queue.c: * components/tree/nautilus-tree-expansion-state.c: * components/tree/nautilus-tree-model.c: * components/tree/nautilus-tree-node.c: * components/tree/nautilus-tree-view-dnd.c: * components/tree/nautilus-tree-view.c: * helper-utilities/authenticate/Makefile.am: * helper-utilities/authenticate/nautilus-authenticate.c: * nautilus-installer/src/nautilus-druid.c: * src/Makefile.am: * src/file-manager/fm-desktop-icon-view.c: * src/file-manager/fm-directory-view.c: * src/file-manager/fm-directory-view.h: * src/file-manager/fm-error-reporting.c: * src/file-manager/fm-icon-text-window.c: * src/file-manager/fm-icon-view.c: * src/file-manager/fm-list-view.c: * src/file-manager/fm-properties-window.c: * src/file-manager/fm-search-list-view.c: * src/file-manager/nautilus-indexing-info.c: * src/nautilus-about.c: * src/nautilus-application.c: * src/nautilus-bookmark-list.c: * src/nautilus-bookmark-parsing.c: * src/nautilus-bookmarks-window.c: * src/nautilus-complex-search-bar.c: * src/nautilus-component-adapter-factory.c: * src/nautilus-desktop-window.c: * src/nautilus-first-time-druid.c: * src/nautilus-link-set-window.c: * src/nautilus-location-bar.c: * src/nautilus-main.c: * src/nautilus-navigation-bar.c: * src/nautilus-profiler.c: * src/nautilus-property-browser.c: * src/nautilus-search-bar-criterion.c: * src/nautilus-search-bar.c: * src/nautilus-shell.c: * src/nautilus-sidebar-tabs.c: * src/nautilus-sidebar-title.c: * src/nautilus-sidebar.c: * src/nautilus-signaller.c: * src/nautilus-simple-search-bar.c: * src/nautilus-switchable-navigation-bar.c: * src/nautilus-switchable-search-bar.c: * src/nautilus-theme-selector.c: * src/nautilus-view-frame-corba.c: * src/nautilus-view-frame.c: * src/nautilus-window-manage-views.c: * src/nautilus-window-menus.c: * src/nautilus-window-toolbars.c: * src/nautilus-window.c: * src/nautilus-window.h: * src/nautilus-zoom-control.c: Update for new eel library usage. * test/test-nautilus-background.c: * test/test-nautilus-clickable-image.c: * test/test-nautilus-font-manager.c: * test/test-nautilus-font-picker.c: * test/test-nautilus-font-simple.c: * test/test-nautilus-font.c: * test/test-nautilus-glyph-simple.c: * test/test-nautilus-glyph.c: * test/test-nautilus-image-background.c: * test/test-nautilus-image-scrolled.c: * test/test-nautilus-image-simple.c: * test/test-nautilus-image-table.c: * test/test-nautilus-image-tile.c: * test/test-nautilus-image.c: * test/test-nautilus-label-background.c: * test/test-nautilus-label-flavorful.c: * test/test-nautilus-label-offset.c: * test/test-nautilus-label-scrolled.c: * test/test-nautilus-label-simple.c: * test/test-nautilus-label-wrapped.c: * test/test-nautilus-label.c: * test/test-nautilus-labeled-image.c: * test/test-nautilus-password-dialog.c: * test/test-nautilus-pixbuf-tile.c: * test/test-nautilus-smooth-text-layout.c: * test/test-nautilus-viewport-constraint.c: * test/test-nautilus-widgets.c: Remove these. They live in eel now. * test/vsignore: * test/kefile.am: * test/st-nautilus-preferences-change.c: * test/st-nautilus-preferences-display.c: * test/st-nautilus-wrap-table.c: * test/st.c: * test/st.h: Update for new eel library usage.
Diffstat (limited to 'libnautilus-private/nautilus-gdk-extensions.c')
-rw-r--r--libnautilus-private/nautilus-gdk-extensions.c951
1 files changed, 0 insertions, 951 deletions
diff --git a/libnautilus-private/nautilus-gdk-extensions.c b/libnautilus-private/nautilus-gdk-extensions.c
deleted file mode 100644
index 85890cc25..000000000
--- a/libnautilus-private/nautilus-gdk-extensions.c
+++ /dev/null
@@ -1,951 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-
-/* nautilus-gdk-extensions.c: Graphics routines to augment what's in gdk.
-
- Copyright (C) 1999, 2000 Eazel, Inc.
-
- The Gnome Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The Gnome Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the Gnome Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
-
- Authors: Darin Adler <darin@eazel.com>,
- Pavel Cisler <pavel@eazel.com>,
- Ramiro Estrugo <ramiro@eazel.com>
-*/
-
-#include <stdlib.h>
-
-#include <config.h>
-#include "nautilus-gdk-extensions.h"
-#include <gdk-pixbuf/gdk-pixbuf.h>
-#include <gdk/gdkx.h>
-#include <gdk/gdkprivate.h>
-#include "nautilus-glib-extensions.h"
-#include "nautilus-lib-self-check-functions.h"
-#include "nautilus-string.h"
-
-#define GRADIENT_BAND_SIZE 4
-
-/**
- * nautilus_fill_rectangle:
- * @drawable: Target to draw into.
- * @gc: Graphics context (mainly for clip).
- * @rectangle: Rectangle to fill.
- *
- * Fill the rectangle with the foreground color.
- * Convenient when you have a GdkRectangle structure.
- */
-void
-nautilus_fill_rectangle (GdkDrawable *drawable,
- GdkGC *gc,
- const GdkRectangle *rectangle)
-{
- gdk_draw_rectangle (drawable, gc, TRUE,
- rectangle->x, rectangle->y,
- rectangle->width, rectangle->height);
-}
-
-/**
- * nautilus_fill_rectangle_with_color:
- * @drawable: Target to draw into.
- * @gc: Graphics context (mainly for clip).
- * @rectangle: Rectangle to fill.
- * @color: Color to fill with.
- *
- * Fill the rectangle with a color.
- * Convenient when you have a GdkRectangle structure.
- */
-void
-nautilus_fill_rectangle_with_color (GdkDrawable *drawable,
- GdkGC *gc,
- const GdkRectangle *rectangle,
- guint32 rgb)
-{
- GdkGCValues saved_values;
-
- /* FIXME bugzilla.eazel.com 1287: Workaround for a bug in gdk_rgb. */
- gdk_rgb_init ();
-
- gdk_gc_get_values (gc, &saved_values);
- gdk_rgb_gc_set_foreground (gc, rgb);
- nautilus_fill_rectangle (drawable, gc, rectangle);
- gdk_gc_set_foreground (gc, &saved_values.foreground);
-}
-
-/**
- * nautilus_rectangle_contains:
- * @rectangle: Rectangle possibly containing a point.
- * @x: X coordinate of a point.
- * @y: Y coordinate of a point.
- *
- * Retun TRUE if point is contained inside a rectangle
- */
-gboolean
-nautilus_rectangle_contains (const GdkRectangle *rectangle,
- int x,
- int y)
-{
- g_return_val_if_fail (rectangle != NULL, FALSE);
- return rectangle->x <= x && rectangle->x + rectangle->width >= x
- && rectangle->y <= y && rectangle->y + rectangle->height >= y;
-}
-
-/**
- * nautilus_rectangle_inset:
- * @rectangle: Rectangle we are insetting.
- * @x: Horizontal ammount to inset by.
- * @y: Vertical ammount to inset by.
- *
- * Inset a rectangle by a given horizontal and vertical ammount.
- * Pass in negative inset values to grow the rectangle, positive to
- * shrink it.
- */
-void
-nautilus_rectangle_inset (GdkRectangle *rectangle,
- int x,
- int y)
-{
- g_return_if_fail (rectangle != NULL);
-
- rectangle->x += x;
- rectangle->width -= 2 * x;
- rectangle->y += y;
- rectangle->height -= 2 * y;
-}
-
-/**
- * nautilus_interpolate_color:
- * @ratio: Place on line between colors to interpolate.
- * @start_color: Color for one end.
- * @end_color: Color for the other end
- * @interpolated_color: Result.
- *
- * Compute a color between @start_color and @end_color in color space.
- * Currently, the color space used is RGB, but a future version could
- * instead do the interpolation in the best color space for expressing
- * human perception.
- */
-guint32
-nautilus_interpolate_color (gdouble ratio,
- guint32 start_rgb,
- guint32 end_rgb)
-{
- guchar red, green, blue;
-
- g_return_val_if_fail (ratio >= 0.0, 0);
- g_return_val_if_fail (ratio <= 1.0, 0);
-
- red = ((start_rgb >> 16) & 0xFF) * (1.0 - ratio) + ((end_rgb >> 16) & 0xFF) * ratio;
- green = ((start_rgb >> 8) & 0xFF) * (1.0 - ratio) + ((end_rgb >> 8) & 0xFF) * ratio;
- blue = (start_rgb & 0xFF) * (1.0 - ratio) + (end_rgb & 0xFF) * ratio;
- return (((red << 8) | green) << 8) | blue;
-}
-
-/**
- * nautilus_gradient_new
- * @start_color: Color for the top or left.
- * @end_color: Color for the bottom or right.
- * @is_horizontal: Direction of the gradient.
- *
- * Create a string that combines the start and end colors along
- * with the direction of the gradient in a standard format.
- */
-char *
-nautilus_gradient_new (const char *start_color,
- const char *end_color,
- gboolean is_horizontal)
-{
- g_return_val_if_fail (is_horizontal == FALSE || is_horizontal == TRUE, NULL);
-
- /* Handle the special case where the start and end colors are identical.
- Handle the special case where the end color is an empty string.
- */
- if (nautilus_strcmp(start_color, end_color) == 0 || end_color == NULL || end_color[0] == '\0') {
- return g_strdup (start_color);
- }
-
- /* Handle the special case where the start color is an empty string. */
- if (start_color == NULL || start_color[0] == '\0') {
- return g_strdup (end_color);
- }
-
- /* Handle the general case. */
- return g_strconcat (start_color, "-", end_color, is_horizontal ? ":h" : NULL, NULL);
-}
-
-/**
- * nautilus_gradient_is_gradient
- * @gradient_spec: A gradient spec. string.
- *
- * Return true if the spec. specifies a gradient instead of a solid color.
- */
-gboolean
-nautilus_gradient_is_gradient (const char *gradient_spec)
-{
- return nautilus_strchr (gradient_spec, '-') != NULL;
-}
-
-/**
- * nautilus_gradient_is_horizontal
- * @gradient_spec: A gradient spec. string.
- *
- * Return true if the spec. specifies a horizontal gradient.
- */
-gboolean
-nautilus_gradient_is_horizontal (const char *gradient_spec)
-{
- size_t length;
-
- length = nautilus_strlen (gradient_spec);
- return length >= 2 && gradient_spec[length - 2] == ':' && gradient_spec[length - 1] == 'h';
-}
-
-static char *
-nautilus_gradient_strip_trailing_direction_if_any (const char *gradient_spec)
-{
- size_t length;
-
- length = nautilus_strlen (gradient_spec);
- if (length >= 2 && gradient_spec[length - 2] == ':'
- && (gradient_spec[length - 1] == 'v' || gradient_spec[length - 1] == 'h')) {
- length -= 2;
- }
-
- return g_strndup (gradient_spec, length);
-}
-
-/* For parsing n-point gradients. Successive calls should pass the next_spec value
- * set by the previous call as their first argument - to continue parsing where the
- * previous call left off.
- */
-char *
-nautilus_gradient_parse_one_color_spec (const char *spec, int *percent, const char **next_spec)
-{
- char *result;
- const char *rgb_end_ptr;
- const char *percent_ptr;
- const char *separator_ptr;
-
- percent_ptr = nautilus_strchr (spec, '%');
- separator_ptr = nautilus_strchr (spec, '-');
-
- if (percent_ptr != NULL && (separator_ptr == NULL || percent_ptr < separator_ptr)) {
- if (percent != NULL) {
- *percent = (int) strtol (percent_ptr + 1, NULL, 10);
- }
- rgb_end_ptr = percent_ptr;
- } else {
- if (percent != NULL) {
- *percent = 100;
- }
- rgb_end_ptr = separator_ptr;
- }
-
- if (rgb_end_ptr != NULL) {
- result = g_strndup (spec, rgb_end_ptr - spec);
- } else {
- result = nautilus_gradient_strip_trailing_direction_if_any (spec);
- }
-
- /* It's important not to use spec after setting *next_spec because it's
- * likely that *next_spec == spec.
- */
- if (next_spec != NULL) {
- *next_spec = (separator_ptr != NULL) ? separator_ptr + 1 : NULL;
- }
-
- return result;
-}
-
-/* FIXME bugzilla.eazel.com 5076:
- * anyone using nautilus_gradient_get_start_color_spec or
- * nautilus_gradient_get_end_color_spec is assuming the gradient
- * is 2 colors which is questionable.
- *
- * Callers should be rewritten and these fns eliminated.
- */
-
-/**
- * nautilus_gradient_get_start_color_spec
- * @gradient_spec: A gradient spec. string.
- *
- * Return the start color.
- * This may be the entire gradient_spec if it's a solid color.
- */
-char *
-nautilus_gradient_get_start_color_spec (const char *gradient_spec)
-{
- return nautilus_gradient_parse_one_color_spec (gradient_spec, NULL, NULL);
-}
-
-/**
- * nautilus_gradient_get_end_color_spec
- * @gradient_spec: A gradient spec. string.
- *
- * Return the end color.
- * This may be the entire gradient_spec if it's a solid color.
- */
-char *
-nautilus_gradient_get_end_color_spec (const char *gradient_spec)
-{
- char* color = NULL;
-
- do {
- g_free (color);
- color = nautilus_gradient_parse_one_color_spec (gradient_spec, NULL, &gradient_spec);
- } while (gradient_spec != NULL);
-
- return color;
-}
-
-/* Do the work shared by all the set_color_spec functions below. */
-static char *
-nautilus_gradient_set_edge_color (const char *gradient_spec,
- const char *edge_color,
- gboolean is_horizontal,
- gboolean change_end)
-{
- char *opposite_color;
- char *result;
-
- g_return_val_if_fail (edge_color != NULL, g_strdup (gradient_spec));
-
- /* Get the color from the existing gradient spec. for the opposite
- edge. This will parse away all the stuff we don't want from the
- old gradient spec.
- */
- opposite_color = change_end
- ? nautilus_gradient_get_start_color_spec (gradient_spec)
- : nautilus_gradient_get_end_color_spec (gradient_spec);
-
- /* Create a new gradient spec. The nautilus_gradient_new function handles
- some special cases, so we don't have to bother with them here.
- */
- result = nautilus_gradient_new (change_end ? opposite_color : edge_color,
- change_end ? edge_color : opposite_color,
- is_horizontal);
-
- g_free (opposite_color);
-
- return result;
-}
-
-/**
- * nautilus_gradient_set_left_color_spec
- * @gradient_spec: A gradient spec. string.
- * @left_color: Color spec. to replace left color with.
- *
- * Changes the left color to what's passed in.
- * This creates a horizontal gradient.
- */
-char *
-nautilus_gradient_set_left_color_spec (const char *gradient_spec,
- const char *left_color)
-{
- return nautilus_gradient_set_edge_color (gradient_spec, left_color, TRUE, FALSE);
-}
-
-/**
- * nautilus_gradient_set_top_color_spec
- * @gradient_spec: A gradient spec. string.
- * @top_color: Color spec. to replace top color with.
- *
- * Changes the top color to what's passed in.
- * This creates a vertical gradient.
- */
-char *
-nautilus_gradient_set_top_color_spec (const char *gradient_spec,
- const char *top_color)
-{
- return nautilus_gradient_set_edge_color (gradient_spec, top_color, FALSE, FALSE);
-}
-
-/**
- * nautilus_gradient_set_right_color_spec
- * @gradient_spec: A gradient spec. string.
- * @right_color: Color spec. to replace right color with.
- *
- * Changes the right color to what's passed in.
- * This creates a horizontal gradient.
- */
-char *
-nautilus_gradient_set_right_color_spec (const char *gradient_spec,
- const char *right_color)
-{
- return nautilus_gradient_set_edge_color (gradient_spec, right_color, TRUE, TRUE);
-}
-
-/**
- * nautilus_gradient_set_bottom_color_spec
- * @gradient_spec: A gradient spec. string.
- * @bottom_color: Color spec. to replace bottom color with.
- *
- * Changes the bottom color to what's passed in.
- * This creates a vertical gradient.
- */
-char *
-nautilus_gradient_set_bottom_color_spec (const char *gradient_spec,
- const char *bottom_color)
-{
- return nautilus_gradient_set_edge_color (gradient_spec, bottom_color, FALSE, TRUE);
-}
-
-/**
- * nautilus_gdk_color_parse_with_white_default
- * @color_spec: A color spec.
- * @color: Pointer to place to put resulting color.
- *
- * The same as gdk_color_parse, except sets the color to white if
- * the spec. can't be parsed instead of returning a boolean flag.
- */
-void
-nautilus_gdk_color_parse_with_white_default (const char *color_spec,
- GdkColor *color)
-{
- if (color_spec == NULL || !gdk_color_parse (color_spec, color)) {
- color->red = 0xFFFF;
- color->green = 0xFFFF;
- color->blue = 0xFFFF;
- }
-}
-
-/**
- * nautilus_parse_rgb_with_white_default
- * @color_spec: A color spec.
- * Returns: An rgb value.
- *
- * The same as gdk_color_parse, except sets the color to white if
- * the spec. can't be parsed instead of returning a boolean flag
- * and returns a guint32 rgb value instead of a GdkColor.
- */
-guint32
-nautilus_parse_rgb_with_white_default (const char *color_spec)
-{
- GdkColor color;
-
- if (color_spec == NULL || !gdk_color_parse (color_spec, &color)) {
- return NAUTILUS_RGB_COLOR_WHITE;
- }
- return ((color.red << 8) & NAUTILUS_RGB_COLOR_RED)
- | (color.green & NAUTILUS_RGB_COLOR_GREEN)
- | ((color.blue >> 8) & NAUTILUS_RGB_COLOR_BLUE);
-}
-
-guint32
-nautilus_rgb16_to_rgb (gushort r, gushort g, gushort b)
-{
- guint32 result;
-
- result = (0xff0000 | (r & 0xff00));
- result <<= 8;
- result |= ((g & 0xff00) | (b >> 8));
-
- return result;
-}
-
-guint32
-nautilus_rgb8_to_rgb (guchar r, guchar g, guchar b)
-{
- return nautilus_rgb16_to_rgb (r << 8, g << 8, b << 8);
-}
-
-/**
- * nautilus_gdk_color_to_rgb
- * @color: A GdkColor style color.
- * Returns: An rgb value.
- *
- * Converts from a GdkColor stlye color to a gdk_rgb one.
- * Alpha gets set to fully opaque
- */
-guint32
-nautilus_gdk_color_to_rgb (const GdkColor *color)
-{
- return nautilus_rgb16_to_rgb (color->red, color->green, color->blue);
-}
-
-/**
- * nautilus_gdk_rgb_to_color
- * @color: a gdk_rgb style value.
- *
- * Converts from a gdk_rgb value style to a GdkColor one.
- * The gdk_rgb color alpha channel is ignored.
- *
- * Return value: a newly allocated GdkColor.
- */
-GdkColor *
-nautilus_gdk_rgb_to_color (const guint32 color)
-{
- GdkColor *result;
-
- result = g_new0 (GdkColor, 1);
-
- result->red = (color & 0xff0000) >> 16 ;
- result->green = (color & 0xff00);
- result->blue = color << 8;
-
- return result;
-}
-
-/**
- * nautilus_gdk_rgb_to_color_spec
- * @color: a gdk_rgb style value.
- *
- * Converts from a gdk_rgb value style to a string color spec.
- * The gdk_rgb color alpha channel is ignored.
- *
- * Return value: a newly allocated color spec.
- */
-char *
-nautilus_gdk_rgb_to_color_spec (const guint32 color)
-{
- return g_strdup_printf("rgb:%04hX/%04hX/%04hX",
- NAUTILUS_RGBA_COLOR_GET_R (color) * 65535,
- NAUTILUS_RGBA_COLOR_GET_G (color) * 65535,
- NAUTILUS_RGBA_COLOR_GET_B (color) * 65535);
-}
-
-static guint32
-nautilus_shift_color_component (guchar component, float shift_by)
-{
- guint32 result;
- if (shift_by > 1.0) {
- result = component * (2 - shift_by);
- } else {
- result = 0xff - shift_by * (0xff - component);
- }
-
- return result & 0xff;
-}
-
-/**
- * nautilus_rgb_shift_color
- * @color: A color.
- * @shift_by: darken or lighten factor.
- * Returns: An darkened or lightened rgb value.
- *
- * Darkens (@shift_by > 1) or lightens (@shift_by < 1)
- * @color.
- */
-guint32
-nautilus_rgb_shift_color (guint32 color, float shift_by)
-{
- guint32 result;
-
- /* shift red by shift_by */
- result = nautilus_shift_color_component((color & 0x00ff0000) >> 16, shift_by);
- result <<= 8;
- /* shift green by shift_by */
- result |= nautilus_shift_color_component((color & 0x0000ff00) >> 8, shift_by);
- result <<= 8;
- /* shift blue by shift_by */
- result |= nautilus_shift_color_component((color & 0x000000ff), shift_by);
-
- /* alpha doesn't change */
- result |= (0xff000000 & color);
-
- return result;
-}
-
-/**
- * nautilus_gdk_color_is_dark:
- *
- * Return true if the given color is `dark'
- */
-gboolean
-nautilus_gdk_color_is_dark (GdkColor *color)
-{
- int intensity;
-
- intensity = (((color->red >> 8) * 77)
- + ((color->green >> 8) * 150)
- + ((color->blue >> 8) * 28)) >> 8;
-
- return intensity < 128;
-}
-
-/**
- * nautilus_gdk_choose_foreground_color:
- *
- * Select a foreground color given that BACKGROUND is the background
- * color. If the PREFERRED color has a high enough contrast with
- * BACKGROUND, use it, else use one of black or white, depending on
- * the darkness of BACKGROUND.
- *
- * The selected color is stored in PREFERRED.
- */
-void
-nautilus_gdk_choose_foreground_color (GdkColor *preferred,
- GdkColor *background)
-{
- gboolean preferred_is_dark, background_is_dark;
-
- preferred_is_dark = nautilus_gdk_color_is_dark (preferred);
- background_is_dark = nautilus_gdk_color_is_dark (background);
-
- if (preferred_is_dark == background_is_dark) {
- /* Colors are too similar, so choose a different fg.
- * Currently hardcoded to use either white or black.
- */
- if (preferred_is_dark) {
- preferred->red = 65535;
- preferred->green = 65535;
- preferred->blue = 65535;
- } else {
- preferred->red = 0;
- preferred->green = 0;
- preferred->blue = 0;
- }
- }
-}
-
-/**
- * nautilus_gdk_gc_choose_foreground_color:
- *
- * Use nautilus_gdk_color_choose_foreground_color () to set the
- * foreground color of GC to something suitable, given that BACKGROUND
- * will be the background color and PREFERRED is the preferred color.
- *
- * Uses GdkRGB to install the color value.
- */
-void
-nautilus_gdk_gc_choose_foreground_color (GdkGC *gc,
- GdkColor *preferred,
- GdkColor *background)
-{
- GdkColor temp;
- guint32 rgb;
-
- temp = *preferred;
- nautilus_gdk_choose_foreground_color (&temp, background);
- rgb = nautilus_gdk_color_to_rgb (&temp);
-
- gdk_rgb_init ();
- gdk_rgb_gc_set_foreground (gc, rgb);
-}
-
-/**
- * nautilus_stipple_bitmap:
- *
- * Get pointer to singleton 50% stippled bitmap.
- * This is a global object; do not free.
- */
-GdkBitmap *
-nautilus_stipple_bitmap ()
-{
- static GdkBitmap *stipple = NULL;
-
- if (stipple == NULL) {
- char stipple_bits[] = { 0x02, 0x01 };
- stipple = gdk_bitmap_create_from_data (NULL, stipple_bits, 2, 2);
- }
-
- return stipple;
-}
-
-/**
- * nautilus_gdk_window_bring_to_front:
- *
- * Raise window and give it focus.
- */
-void
-nautilus_gdk_window_bring_to_front (GdkWindow *window)
-{
- /* This takes care of un-iconifying the window and
- * raising it if needed.
- */
- gdk_window_show (window);
-
- /* If the window was already showing, it would not have
- * the focus at this point. Do a little X trickery to
- * ensure it is focused.
- */
- nautilus_gdk_window_focus (window, GDK_CURRENT_TIME);
-}
-
-void
-nautilus_gdk_window_focus (GdkWindow *window, guint32 timestamp)
-{
- gdk_error_trap_push ();
- XSetInputFocus (GDK_DISPLAY (),
- GDK_WINDOW_XWINDOW (window),
- RevertToNone,
- timestamp);
- gdk_flush();
- gdk_error_trap_pop ();
-}
-
-void
-nautilus_gdk_window_set_wm_protocols (GdkWindow *window,
- GdkAtom *protocols,
- int nprotocols)
-{
- /* This relies on the identity mapping from GdkAtoms to X Atoms */
- XSetWMProtocols (GDK_WINDOW_XDISPLAY (window),
- GDK_WINDOW_XWINDOW (window),
- protocols, nprotocols);
-}
-
-void
-nautilus_set_mini_icon (GdkWindow *window,
- GdkPixmap *pixmap,
- GdkBitmap *mask)
-{
- GdkAtom icon_atom;
- long data[2];
-
- g_return_if_fail (window != NULL);
- g_return_if_fail (pixmap != NULL);
-
- data[0] = GDK_WINDOW_XWINDOW (pixmap);
- if (mask) {
- data[1] = GDK_WINDOW_XWINDOW (mask);
- } else {
- data[1] = 0;
- }
-
- icon_atom = gdk_atom_intern ("KWM_WIN_ICON", FALSE);
- gdk_property_change (window, icon_atom, icon_atom,
- 32, GDK_PROP_MODE_REPLACE,
- (guchar *) data, 2);
-}
-
-/**
- * nautilus_gdk_window_set_wm_hints_input:
- *
- * Set the WM_HINTS.input flag to the passed in value
- */
-void
-nautilus_gdk_window_set_wm_hints_input (GdkWindow *window, gboolean status)
-{
- Display *dpy;
- Window id;
- XWMHints *wm_hints;
-
- g_return_if_fail (window != NULL);
-
- dpy = GDK_WINDOW_XDISPLAY (window);
- id = GDK_WINDOW_XWINDOW (window);
-
- wm_hints = XGetWMHints (dpy, id);
- if (wm_hints == 0) {
- wm_hints = XAllocWMHints ();
- }
-
- wm_hints->flags |= InputHint;
- wm_hints->input = status;
-
- XSetWMHints (dpy, id, wm_hints);
- XFree (wm_hints);
-}
-
-void
-nautilus_gdk_window_set_invisible_cursor (GdkWindow *window)
-{
- XColor foreColor, backColor;
- GdkWindowPrivate *window_private;
- Pixmap sourcePixmap, maskPixmap;
- Cursor xcursor;
-
- char invisible_cursor_bits[] = {0x0};
- char invisible_cursor_mask_bits[] = {0x0};
-
- foreColor.pixel = 0L;
- foreColor.red = foreColor.green = foreColor.blue = 0;
- foreColor.flags = DoRed | DoGreen | DoBlue;
-
- backColor.pixel = 255L;
- backColor.red = backColor.green = backColor.blue = 65535;
- backColor.flags = DoRed | DoGreen | DoBlue;
-
- window_private = (GdkWindowPrivate *) window;
-
- sourcePixmap = XCreateBitmapFromData (window_private->xdisplay, window_private->xwindow,
- invisible_cursor_bits, 1, 1);
- g_assert (sourcePixmap != 0);
-
- maskPixmap = XCreateBitmapFromData (window_private->xdisplay, window_private->xwindow,
- invisible_cursor_mask_bits, 1, 1);
- g_assert (maskPixmap != 0);
-
- xcursor = XCreatePixmapCursor (window_private->xdisplay, sourcePixmap, maskPixmap,
- &foreColor, &backColor, 0, 0);
-
- XFreePixmap (window_private->xdisplay, sourcePixmap);
- XFreePixmap (window_private->xdisplay, maskPixmap);
-
- XDefineCursor (window_private->xdisplay, window_private->xwindow, xcursor);
-}
-
-NautilusGdkGeometryFlags
-nautilus_gdk_parse_geometry (const char *string, int *x_return, int *y_return,
- guint *width_return, guint *height_return)
-{
- int x11_flags;
- NautilusGdkGeometryFlags gdk_flags;
-
- g_return_val_if_fail (string != NULL, NAUTILUS_GDK_NO_VALUE);
- g_return_val_if_fail (x_return != NULL, NAUTILUS_GDK_NO_VALUE);
- g_return_val_if_fail (y_return != NULL, NAUTILUS_GDK_NO_VALUE);
- g_return_val_if_fail (width_return != NULL, NAUTILUS_GDK_NO_VALUE);
- g_return_val_if_fail (height_return != NULL, NAUTILUS_GDK_NO_VALUE);
-
- x11_flags = XParseGeometry (string, x_return, y_return,
- width_return, height_return);
-
- gdk_flags = NAUTILUS_GDK_NO_VALUE;
- if (x11_flags & XValue) {
- gdk_flags |= NAUTILUS_GDK_X_VALUE;
- }
- if (x11_flags & YValue) {
- gdk_flags |= NAUTILUS_GDK_Y_VALUE;
- }
- if (x11_flags & WidthValue) {
- gdk_flags |= NAUTILUS_GDK_WIDTH_VALUE;
- }
- if (x11_flags & HeightValue) {
- gdk_flags |= NAUTILUS_GDK_HEIGHT_VALUE;
- }
- if (x11_flags & XNegative) {
- gdk_flags |= NAUTILUS_GDK_X_NEGATIVE;
- }
- if (x11_flags & YNegative) {
- gdk_flags |= NAUTILUS_GDK_Y_NEGATIVE;
- }
-
- return gdk_flags;
-}
-
-#if ! defined (NAUTILUS_OMIT_SELF_CHECK)
-
-static char *
-nautilus_gdk_color_as_hex_string (GdkColor color)
-{
- return g_strdup_printf("rgb:%04hX/%04hX/%04hX",
- color.red, color.green, color.blue);
-}
-
-static char *
-nautilus_self_check_parse (const char *color_spec)
-{
- GdkColor color;
-
- nautilus_gdk_color_parse_with_white_default (color_spec, &color);
- return nautilus_gdk_color_as_hex_string (color);
-}
-
-void
-nautilus_self_check_gdk_extensions (void)
-{
- /* nautilus_interpolate_color */
- NAUTILUS_CHECK_INTEGER_RESULT (nautilus_interpolate_color (0.0, 0, 0), 0);
- NAUTILUS_CHECK_INTEGER_RESULT (nautilus_interpolate_color (0.0, 0, 0xFFFFFF), 0);
- NAUTILUS_CHECK_INTEGER_RESULT (nautilus_interpolate_color (0.5, 0, 0xFFFFFF), 0x7F7F7F);
- NAUTILUS_CHECK_INTEGER_RESULT (nautilus_interpolate_color (1.0, 0, 0xFFFFFF), 0xFFFFFF);
-
- /* nautilus_fill_rectangle */
- /* Make a GdkImage and fill it, maybe? */
-
- /* nautilus_fill_rectangle_with_color */
-
- /* nautilus_fill_rectangle_with_gradient */
-
- /* nautilus_gradient_new */
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_new ("", "", FALSE), "");
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_new ("a", "b", FALSE), "a-b");
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_new ("a", "b", TRUE), "a-b:h");
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_new ("a", "a", FALSE), "a");
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_new ("a", "a", TRUE), "a");
-
- /* nautilus_gradient_is_gradient */
- NAUTILUS_CHECK_BOOLEAN_RESULT (nautilus_gradient_is_gradient (""), FALSE);
- NAUTILUS_CHECK_BOOLEAN_RESULT (nautilus_gradient_is_gradient ("-"), TRUE);
- NAUTILUS_CHECK_BOOLEAN_RESULT (nautilus_gradient_is_gradient ("a"), FALSE);
- NAUTILUS_CHECK_BOOLEAN_RESULT (nautilus_gradient_is_gradient ("a-b"), TRUE);
- NAUTILUS_CHECK_BOOLEAN_RESULT (nautilus_gradient_is_gradient ("a-b:h"), TRUE);
-
- /* nautilus_gradient_get_start_color_spec */
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_get_start_color_spec (""), "");
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_get_start_color_spec ("-"), "");
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_get_start_color_spec ("a"), "a");
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_get_start_color_spec ("a-b"), "a");
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_get_start_color_spec ("a-"), "a");
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_get_start_color_spec ("-b"), "");
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_get_start_color_spec ("a:h"), "a");
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_get_start_color_spec ("a:v"), "a");
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_get_start_color_spec ("a:c"), "a:c");
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_get_start_color_spec ("a:-b"), "a:");
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_get_start_color_spec ("a:-b:v"), "a:");
-
- /* nautilus_gradient_get_end_color_spec */
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_get_end_color_spec (""), "");
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_get_end_color_spec ("-"), "");
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_get_end_color_spec ("a"), "a");
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_get_end_color_spec ("a-b"), "b");
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_get_end_color_spec ("a-"), "");
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_get_end_color_spec ("-b"), "b");
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_get_end_color_spec ("a:h"), "a");
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_get_end_color_spec ("a:v"), "a");
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_get_end_color_spec ("a:c"), "a:c");
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_get_end_color_spec ("a:-b"), "b");
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_get_end_color_spec ("a:-b:v"), "b");
-
- /* nautilus_gradient_set_left_color_spec */
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_set_left_color_spec ("", ""), "");
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_set_left_color_spec ("", "a"), "a");
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_set_left_color_spec ("a", ""), "a");
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_set_left_color_spec ("a", "a"), "a");
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_set_left_color_spec ("a", "b"), "b-a:h");
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_set_left_color_spec ("a-c:v", "b"), "b-c:h");
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_set_left_color_spec ("a-c:v", "c"), "c");
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_set_left_color_spec ("a:-b:v", "d"), "d-b:h");
-
- /* nautilus_gradient_set_top_color_spec */
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_set_top_color_spec ("", ""), "");
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_set_top_color_spec ("", "a"), "a");
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_set_top_color_spec ("a", ""), "a");
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_set_top_color_spec ("a", "a"), "a");
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_set_top_color_spec ("a", "b"), "b-a");
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_set_top_color_spec ("a-c:v", "b"), "b-c");
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_set_top_color_spec ("a-c:v", "c"), "c");
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_set_top_color_spec ("a:-b:h", "d"), "d-b");
-
- /* nautilus_gradient_set_right_color_spec */
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_set_right_color_spec ("", ""), "");
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_set_right_color_spec ("", "a"), "a");
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_set_right_color_spec ("a", ""), "a");
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_set_right_color_spec ("a", "a"), "a");
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_set_right_color_spec ("a", "b"), "a-b:h");
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_set_right_color_spec ("a-c:v", "b"), "a-b:h");
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_set_right_color_spec ("a-c:v", "c"), "a-c:h");
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_set_right_color_spec ("a:-b:v", "d"), "a:-d:h");
-
- /* nautilus_gradient_set_bottom_color_spec */
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_set_bottom_color_spec ("", ""), "");
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_set_bottom_color_spec ("", "a"), "a");
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_set_bottom_color_spec ("a", ""), "a");
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_set_bottom_color_spec ("a", "a"), "a");
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_set_bottom_color_spec ("a", "b"), "a-b");
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_set_bottom_color_spec ("a-c:v", "b"), "a-b");
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_set_bottom_color_spec ("a-c:v", "c"), "a-c");
- NAUTILUS_CHECK_STRING_RESULT (nautilus_gradient_set_bottom_color_spec ("a:-b:h", "d"), "a:-d");
-
- /* nautilus_gdk_color_parse_with_white_default */
- NAUTILUS_CHECK_STRING_RESULT (nautilus_self_check_parse (""), "rgb:FFFF/FFFF/FFFF");
- NAUTILUS_CHECK_STRING_RESULT (nautilus_self_check_parse ("a"), "rgb:FFFF/FFFF/FFFF");
- NAUTILUS_CHECK_STRING_RESULT (nautilus_self_check_parse ("white"), "rgb:FFFF/FFFF/FFFF");
- NAUTILUS_CHECK_STRING_RESULT (nautilus_self_check_parse ("black"), "rgb:0000/0000/0000");
- NAUTILUS_CHECK_STRING_RESULT (nautilus_self_check_parse ("rgb:0123/4567/89AB"), "rgb:0123/4567/89AB");
-}
-
-#endif /* ! NAUTILUS_OMIT_SELF_CHECK */