From d5d5c2aab03c76519b58841a45539edf23c63643 Mon Sep 17 00:00:00 2001 From: Ramiro Estrugo Date: Mon, 21 Aug 2000 14:29:01 +0000 Subject: New utility function to create copy area gcs. * libnautilus-extensions/nautilus-gdk-extensions.c: (nautilus_gdk_font_get_bold), (nautilus_gdk_create_copy_area_gc): * libnautilus-extensions/nautilus-gdk-extensions.h: New utility function to create copy area gcs. New macros to pack and unpack RGBA values. --- libnautilus-private/nautilus-gdk-extensions.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'libnautilus-private/nautilus-gdk-extensions.h') diff --git a/libnautilus-private/nautilus-gdk-extensions.h b/libnautilus-private/nautilus-gdk-extensions.h index afdba1316..65e092e1d 100644 --- a/libnautilus-private/nautilus-gdk-extensions.h +++ b/libnautilus-private/nautilus-gdk-extensions.h @@ -19,7 +19,8 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - Authors: Darin Adler + Authors: Darin Adler , + Ramiro Estrugo */ #ifndef NAUTILUS_GDK_EXTENSIONS_H @@ -33,6 +34,19 @@ #define NAUTILUS_RGB_COLOR_WHITE 0xFFFFFF #define NAUTILUS_RGB_COLOR_BLACK 0x000000 +/* Pack RGBA values into a 32 bits */ +#define NAUTILUS_RGBA_COLOR_PACK(_r, _g, _b, _a) \ +( ((_a) << 24) | \ + ((_r) << 16) | \ + ((_g) << 8) | \ + ((_b) << 0) ) + +/* Access the individual RGBA components */ +#define NAUTILUS_RGBA_COLOR_GET_R(_color) (((_color) >> 16) & 0xff) +#define NAUTILUS_RGBA_COLOR_GET_G(_color) (((_color) >> 8) & 0xff) +#define NAUTILUS_RGBA_COLOR_GET_B(_color) (((_color) >> 0) & 0xff) +#define NAUTILUS_RGBA_COLOR_GET_A(_color) (((_color) >> 24) & 0xff) + /* A gradient spec. is a string that contains a specifier for either a color or a gradient. If the string has a "-" in it, then it's a gradient. The gradient is vertical by default and the spec. can end with ":v" to indicate that. @@ -115,5 +129,6 @@ void nautilus_gdk_window_bring_to_front (GdkWindow *wind void nautilus_set_mini_icon (GdkWindow *window, GdkPixmap *pixmap, GdkBitmap *mask); +GdkGC * nautilus_gdk_create_copy_area_gc (GdkWindow *window); #endif /* NAUTILUS_GDK_EXTENSIONS_H */ -- cgit v1.2.1