|
Packit Service |
fb6fa5 |
/* GDK - The GIMP Drawing Kit
|
|
Packit Service |
fb6fa5 |
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
|
Packit Service |
fb6fa5 |
*
|
|
Packit Service |
fb6fa5 |
* This library is free software; you can redistribute it and/or
|
|
Packit Service |
fb6fa5 |
* modify it under the terms of the GNU Lesser General Public
|
|
Packit Service |
fb6fa5 |
* License as published by the Free Software Foundation; either
|
|
Packit Service |
fb6fa5 |
* version 2 of the License, or (at your option) any later version.
|
|
Packit Service |
fb6fa5 |
*
|
|
Packit Service |
fb6fa5 |
* This library is distributed in the hope that it will be useful,
|
|
Packit Service |
fb6fa5 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
fb6fa5 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit Service |
fb6fa5 |
* Lesser General Public License for more details.
|
|
Packit Service |
fb6fa5 |
*
|
|
Packit Service |
fb6fa5 |
* You should have received a copy of the GNU Lesser General Public
|
|
Packit Service |
fb6fa5 |
* License along with this library; if not, write to the
|
|
Packit Service |
fb6fa5 |
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
Packit Service |
fb6fa5 |
* Boston, MA 02111-1307, USA.
|
|
Packit Service |
fb6fa5 |
*/
|
|
Packit Service |
fb6fa5 |
|
|
Packit Service |
fb6fa5 |
/*
|
|
Packit Service |
fb6fa5 |
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
|
|
Packit Service |
fb6fa5 |
* file for a list of people on the GTK+ Team. See the ChangeLog
|
|
Packit Service |
fb6fa5 |
* files for a list of changes. These files are distributed with
|
|
Packit Service |
fb6fa5 |
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
|
Packit Service |
fb6fa5 |
*/
|
|
Packit Service |
fb6fa5 |
|
|
Packit Service |
fb6fa5 |
#ifndef __GDK_COLOR_H__
|
|
Packit Service |
fb6fa5 |
#define __GDK_COLOR_H__
|
|
Packit Service |
fb6fa5 |
|
|
Packit Service |
fb6fa5 |
#if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
|
|
Packit Service |
fb6fa5 |
#error "Only <gdk/gdk.h> can be included directly."
|
|
Packit Service |
fb6fa5 |
#endif
|
|
Packit Service |
fb6fa5 |
|
|
Packit Service |
fb6fa5 |
#include <cairo.h>
|
|
Packit Service |
fb6fa5 |
#include <gdk/gdktypes.h>
|
|
Packit Service |
fb6fa5 |
|
|
Packit Service |
fb6fa5 |
G_BEGIN_DECLS
|
|
Packit Service |
fb6fa5 |
|
|
Packit Service |
fb6fa5 |
/* The color type.
|
|
Packit Service |
fb6fa5 |
* A color consists of red, green and blue values in the
|
|
Packit Service |
fb6fa5 |
* range 0-65535 and a pixel value. The pixel value is highly
|
|
Packit Service |
fb6fa5 |
* dependent on the depth and colormap which this color will
|
|
Packit Service |
fb6fa5 |
* be used to draw into. Therefore, sharing colors between
|
|
Packit Service |
fb6fa5 |
* colormaps is a bad idea.
|
|
Packit Service |
fb6fa5 |
*/
|
|
Packit Service |
fb6fa5 |
struct _GdkColor
|
|
Packit Service |
fb6fa5 |
{
|
|
Packit Service |
fb6fa5 |
guint32 pixel;
|
|
Packit Service |
fb6fa5 |
guint16 red;
|
|
Packit Service |
fb6fa5 |
guint16 green;
|
|
Packit Service |
fb6fa5 |
guint16 blue;
|
|
Packit Service |
fb6fa5 |
};
|
|
Packit Service |
fb6fa5 |
|
|
Packit Service |
fb6fa5 |
/* The colormap type.
|
|
Packit Service |
fb6fa5 |
*/
|
|
Packit Service |
fb6fa5 |
|
|
Packit Service |
fb6fa5 |
typedef struct _GdkColormapClass GdkColormapClass;
|
|
Packit Service |
fb6fa5 |
|
|
Packit Service |
fb6fa5 |
#define GDK_TYPE_COLORMAP (gdk_colormap_get_type ())
|
|
Packit Service |
fb6fa5 |
#define GDK_COLORMAP(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_COLORMAP, GdkColormap))
|
|
Packit Service |
fb6fa5 |
#define GDK_COLORMAP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_COLORMAP, GdkColormapClass))
|
|
Packit Service |
fb6fa5 |
#define GDK_IS_COLORMAP(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_COLORMAP))
|
|
Packit Service |
fb6fa5 |
#define GDK_IS_COLORMAP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_COLORMAP))
|
|
Packit Service |
fb6fa5 |
#define GDK_COLORMAP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_COLORMAP, GdkColormapClass))
|
|
Packit Service |
fb6fa5 |
|
|
Packit Service |
fb6fa5 |
#define GDK_TYPE_COLOR (gdk_color_get_type ())
|
|
Packit Service |
fb6fa5 |
|
|
Packit Service |
fb6fa5 |
struct _GdkColormap
|
|
Packit Service |
fb6fa5 |
{
|
|
Packit Service |
fb6fa5 |
/*< private >*/
|
|
Packit Service |
fb6fa5 |
GObject parent_instance;
|
|
Packit Service |
fb6fa5 |
|
|
Packit Service |
fb6fa5 |
/*< public >*/
|
|
Packit Service |
fb6fa5 |
gint GSEAL (size);
|
|
Packit Service |
fb6fa5 |
GdkColor *GSEAL (colors);
|
|
Packit Service |
fb6fa5 |
|
|
Packit Service |
fb6fa5 |
/*< private >*/
|
|
Packit Service |
fb6fa5 |
GdkVisual *GSEAL (visual);
|
|
Packit Service |
fb6fa5 |
|
|
Packit Service |
fb6fa5 |
gpointer GSEAL (windowing_data);
|
|
Packit Service |
fb6fa5 |
};
|
|
Packit Service |
fb6fa5 |
|
|
Packit Service |
fb6fa5 |
struct _GdkColormapClass
|
|
Packit Service |
fb6fa5 |
{
|
|
Packit Service |
fb6fa5 |
GObjectClass parent_class;
|
|
Packit Service |
fb6fa5 |
|
|
Packit Service |
fb6fa5 |
};
|
|
Packit Service |
fb6fa5 |
|
|
Packit Service |
fb6fa5 |
GType gdk_colormap_get_type (void) G_GNUC_CONST;
|
|
Packit Service |
fb6fa5 |
|
|
Packit Service |
fb6fa5 |
GdkColormap* gdk_colormap_new (GdkVisual *visual,
|
|
Packit Service |
fb6fa5 |
gboolean allocate);
|
|
Packit Service |
fb6fa5 |
|
|
Packit Service |
fb6fa5 |
#ifndef GDK_DISABLE_DEPRECATED
|
|
Packit Service |
fb6fa5 |
GdkColormap* gdk_colormap_ref (GdkColormap *cmap);
|
|
Packit Service |
fb6fa5 |
void gdk_colormap_unref (GdkColormap *cmap);
|
|
Packit Service |
fb6fa5 |
#endif
|
|
Packit Service |
fb6fa5 |
|
|
Packit Service |
fb6fa5 |
#ifndef GDK_MULTIHEAD_SAFE
|
|
Packit Service |
fb6fa5 |
GdkColormap* gdk_colormap_get_system (void);
|
|
Packit Service |
fb6fa5 |
#endif
|
|
Packit Service |
fb6fa5 |
|
|
Packit Service |
fb6fa5 |
GdkScreen *gdk_colormap_get_screen (GdkColormap *cmap);
|
|
Packit Service |
fb6fa5 |
|
|
Packit Service |
fb6fa5 |
#ifndef GDK_DISABLE_DEPRECATED
|
|
Packit Service |
fb6fa5 |
gint gdk_colormap_get_system_size (void);
|
|
Packit Service |
fb6fa5 |
#endif
|
|
Packit Service |
fb6fa5 |
|
|
Packit Service |
fb6fa5 |
#if !defined (GDK_DISABLE_DEPRECATED) || defined (GDK_COMPILATION)
|
|
Packit Service |
fb6fa5 |
/* Used by gdk_colors_store () */
|
|
Packit Service |
fb6fa5 |
void gdk_colormap_change (GdkColormap *colormap,
|
|
Packit Service |
fb6fa5 |
gint ncolors);
|
|
Packit Service |
fb6fa5 |
#endif
|
|
Packit Service |
fb6fa5 |
|
|
Packit Service |
fb6fa5 |
gint gdk_colormap_alloc_colors (GdkColormap *colormap,
|
|
Packit Service |
fb6fa5 |
GdkColor *colors,
|
|
Packit Service |
fb6fa5 |
gint n_colors,
|
|
Packit Service |
fb6fa5 |
gboolean writeable,
|
|
Packit Service |
fb6fa5 |
gboolean best_match,
|
|
Packit Service |
fb6fa5 |
gboolean *success);
|
|
Packit Service |
fb6fa5 |
gboolean gdk_colormap_alloc_color (GdkColormap *colormap,
|
|
Packit Service |
fb6fa5 |
GdkColor *color,
|
|
Packit Service |
fb6fa5 |
gboolean writeable,
|
|
Packit Service |
fb6fa5 |
gboolean best_match);
|
|
Packit Service |
fb6fa5 |
void gdk_colormap_free_colors (GdkColormap *colormap,
|
|
Packit Service |
fb6fa5 |
const GdkColor *colors,
|
|
Packit Service |
fb6fa5 |
gint n_colors);
|
|
Packit Service |
fb6fa5 |
void gdk_colormap_query_color (GdkColormap *colormap,
|
|
Packit Service |
fb6fa5 |
gulong pixel,
|
|
Packit Service |
fb6fa5 |
GdkColor *result);
|
|
Packit Service |
fb6fa5 |
|
|
Packit Service |
fb6fa5 |
GdkVisual *gdk_colormap_get_visual (GdkColormap *colormap);
|
|
Packit Service |
fb6fa5 |
|
|
Packit Service |
fb6fa5 |
GdkColor *gdk_color_copy (const GdkColor *color);
|
|
Packit Service |
fb6fa5 |
void gdk_color_free (GdkColor *color);
|
|
Packit Service |
fb6fa5 |
gboolean gdk_color_parse (const gchar *spec,
|
|
Packit Service |
fb6fa5 |
GdkColor *color);
|
|
Packit Service |
fb6fa5 |
guint gdk_color_hash (const GdkColor *colora);
|
|
Packit Service |
fb6fa5 |
gboolean gdk_color_equal (const GdkColor *colora,
|
|
Packit Service |
fb6fa5 |
const GdkColor *colorb);
|
|
Packit Service |
fb6fa5 |
gchar * gdk_color_to_string (const GdkColor *color);
|
|
Packit Service |
fb6fa5 |
|
|
Packit Service |
fb6fa5 |
GType gdk_color_get_type (void) G_GNUC_CONST;
|
|
Packit Service |
fb6fa5 |
|
|
Packit Service |
fb6fa5 |
/* The following functions are deprecated */
|
|
Packit Service |
fb6fa5 |
#ifndef GDK_DISABLE_DEPRECATED
|
|
Packit Service |
fb6fa5 |
void gdk_colors_store (GdkColormap *colormap,
|
|
Packit Service |
fb6fa5 |
GdkColor *colors,
|
|
Packit Service |
fb6fa5 |
gint ncolors);
|
|
Packit Service |
fb6fa5 |
gint gdk_color_white (GdkColormap *colormap,
|
|
Packit Service |
fb6fa5 |
GdkColor *color);
|
|
Packit Service |
fb6fa5 |
gint gdk_color_black (GdkColormap *colormap,
|
|
Packit Service |
fb6fa5 |
GdkColor *color);
|
|
Packit Service |
fb6fa5 |
gint gdk_color_alloc (GdkColormap *colormap,
|
|
Packit Service |
fb6fa5 |
GdkColor *color);
|
|
Packit Service |
fb6fa5 |
gint gdk_color_change (GdkColormap *colormap,
|
|
Packit Service |
fb6fa5 |
GdkColor *color);
|
|
Packit Service |
fb6fa5 |
#endif /* GDK_DISABLE_DEPRECATED */
|
|
Packit Service |
fb6fa5 |
|
|
Packit Service |
fb6fa5 |
#if !defined (GDK_DISABLE_DEPRECATED) || defined (GDK_COMPILATION)
|
|
Packit Service |
fb6fa5 |
/* Used by gdk_rgb_try_colormap () */
|
|
Packit Service |
fb6fa5 |
gint gdk_colors_alloc (GdkColormap *colormap,
|
|
Packit Service |
fb6fa5 |
gboolean contiguous,
|
|
Packit Service |
fb6fa5 |
gulong *planes,
|
|
Packit Service |
fb6fa5 |
gint nplanes,
|
|
Packit Service |
fb6fa5 |
gulong *pixels,
|
|
Packit Service |
fb6fa5 |
gint npixels);
|
|
Packit Service |
fb6fa5 |
void gdk_colors_free (GdkColormap *colormap,
|
|
Packit Service |
fb6fa5 |
gulong *pixels,
|
|
Packit Service |
fb6fa5 |
gint npixels,
|
|
Packit Service |
fb6fa5 |
gulong planes);
|
|
Packit Service |
fb6fa5 |
#endif /* !GDK_DISABLE_DEPRECATED || GDK_COMPILATION */
|
|
Packit Service |
fb6fa5 |
|
|
Packit Service |
fb6fa5 |
G_END_DECLS
|
|
Packit Service |
fb6fa5 |
|
|
Packit Service |
fb6fa5 |
#endif /* __GDK_COLOR_H__ */
|