diff options
author | Ramiro Estrugo <ramiro@src.gnome.org> | 2000-08-21 14:29:01 +0000 |
---|---|---|
committer | Ramiro Estrugo <ramiro@src.gnome.org> | 2000-08-21 14:29:01 +0000 |
commit | d5d5c2aab03c76519b58841a45539edf23c63643 (patch) | |
tree | 4babf3a604004dc0861b36e4864a0880669ea000 /libnautilus-private/nautilus-gdk-extensions.h | |
parent | daa7d4bfe12e1c5785be6066c4fecd0a37420242 (diff) | |
download | nautilus-d5d5c2aab03c76519b58841a45539edf23c63643.tar.gz |
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.
Diffstat (limited to 'libnautilus-private/nautilus-gdk-extensions.h')
-rw-r--r-- | libnautilus-private/nautilus-gdk-extensions.h | 17 |
1 files changed, 16 insertions, 1 deletions
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 <darin@eazel.com> + Authors: Darin Adler <darin@eazel.com>, + Ramiro Estrugo <ramiro@eazel.com> */ #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 */ |