2003-09-17 07:44:49 +00:00
|
|
|
/* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*-
|
2003-09-17 07:32:52 +00:00
|
|
|
|
|
|
|
color.h for the Openbox window manager
|
2007-04-23 17:56:35 +00:00
|
|
|
Copyright (c) 2003-2007 Dana Jansens
|
2003-09-17 07:32:52 +00:00
|
|
|
Copyright (c) 2003 Derek Foreman
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program 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 General Public License for more details.
|
|
|
|
|
|
|
|
See the COPYING file for a copy of the GNU General Public License.
|
|
|
|
*/
|
|
|
|
|
2003-03-16 21:11:39 +00:00
|
|
|
#ifndef __color_h
|
|
|
|
#define __color_h
|
|
|
|
|
2003-06-20 07:58:51 +00:00
|
|
|
#include "render.h"
|
|
|
|
|
2003-03-16 21:11:39 +00:00
|
|
|
#include <X11/Xlib.h>
|
2003-03-19 23:26:54 +00:00
|
|
|
#include <X11/Xutil.h>
|
2003-06-20 07:58:51 +00:00
|
|
|
#include <glib.h>
|
2003-03-19 23:26:54 +00:00
|
|
|
|
2003-06-20 07:58:51 +00:00
|
|
|
struct _RrColor {
|
|
|
|
const RrInstance *inst;
|
2003-03-16 21:11:39 +00:00
|
|
|
|
2003-10-15 03:59:35 +00:00
|
|
|
gint r;
|
|
|
|
gint g;
|
|
|
|
gint b;
|
|
|
|
gulong pixel;
|
2003-03-16 21:11:39 +00:00
|
|
|
GC gc;
|
2003-09-02 08:38:03 +00:00
|
|
|
|
|
|
|
gint key;
|
|
|
|
gint refcount;
|
2003-10-11 06:45:04 +00:00
|
|
|
|
|
|
|
#ifdef DEBUG
|
|
|
|
gint id;
|
|
|
|
#endif
|
2003-06-20 07:58:51 +00:00
|
|
|
};
|
2003-03-16 21:11:39 +00:00
|
|
|
|
2003-06-21 02:30:14 +00:00
|
|
|
void RrColorAllocateGC(RrColor *in);
|
|
|
|
XColor *RrPickColor(const RrInstance *inst, gint r, gint g, gint b);
|
|
|
|
void RrReduceDepth(const RrInstance *inst, RrPixel32 *data, XImage *im);
|
|
|
|
void RrIncreaseDepth(const RrInstance *inst, RrPixel32 *data, XImage *im);
|
2003-05-18 23:06:11 +00:00
|
|
|
|
2003-03-16 21:11:39 +00:00
|
|
|
#endif /* __color_h */
|