[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Antiright-devel] antiright/xshell button.c decoration.c decorati...
From: |
Jeffrey Bedard |
Subject: |
[Antiright-devel] antiright/xshell button.c decoration.c decorati... |
Date: |
Mon, 06 Aug 2007 20:26:24 +0000 |
CVSROOT: /sources/antiright
Module name: antiright
Changes by: Jeffrey Bedard <jefbed> 07/08/06 20:26:24
Modified files:
xshell : button.c decoration.c decoration.h
Log message:
Began bitmap rendering code, to be used for gradient store/acceleration,
as well as desktop icon set.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/antiright/xshell/button.c?cvsroot=antiright&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/antiright/xshell/decoration.c?cvsroot=antiright&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/antiright/xshell/decoration.h?cvsroot=antiright&r1=1.3&r2=1.4
Patches:
Index: button.c
===================================================================
RCS file: /sources/antiright/antiright/xshell/button.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- button.c 5 Aug 2007 02:18:17 -0000 1.3
+++ button.c 6 Aug 2007 20:26:24 -0000 1.4
@@ -33,6 +33,21 @@
XDrawString(xsh->gui.display, button->window, xsh->gui.gc,
5, 12, label, strlen(label));
+#if 0
+{
+ unsigned int width, height;
+ GC gc = xsh->gui.gc;
+ Display * dpy=xsh->gui.display;
+ Pixmap pixmap;
+ XReadBitmapFile(dpy, button->window,
+ "bitmap.xbm", &width, &height,
+ &pixmap, NULL, NULL);
+ XSH_SET_COLOR(dpy, xsh->gui.gc, 255,255,255);
+ XCopyPlane(dpy, pixmap, button->window,
+ xsh->gui.gc, 0, 0, width, height, 0, 0, 1);
+ XFreePixmap(dpy, pixmap);
+}
+#endif
}
static void
Index: decoration.c
===================================================================
RCS file: /sources/antiright/antiright/xshell/decoration.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- decoration.c 5 Aug 2007 02:18:17 -0000 1.4
+++ decoration.c 6 Aug 2007 20:26:24 -0000 1.5
@@ -31,8 +31,8 @@
return XCreateGC(display, window, 0, NULL);
}
-static unsigned long
-get_color(Display * display,
+unsigned long
+xsh_get_color(Display * display,
unsigned short r, unsigned short g, unsigned short b)
{
XColor color;
@@ -47,8 +47,8 @@
return color.pixel;
}
-static void
-set_foreground(Display * display, GC gc, unsigned long color)
+void
+xsh_set_foreground(Display * display, GC gc, unsigned long color)
{
XGCValues values;
@@ -57,8 +57,6 @@
XChangeGC(display, gc, GCForeground, &values);
}
-#define SET_COLOR(dpy, gc, r, g, b)\
- set_foreground(dpy, gc, get_color(dpy, r, g, b))
static void
cleanup(Display * display, GC gc)
@@ -66,6 +64,8 @@
XFreeGC(display, gc);
}
+#define SET_COLOR XSH_SET_COLOR
+
static void
draw_frame(Display * dpy, Window win, GC gc, Bool outset,
XWindowAttributes geometry)
Index: decoration.h
===================================================================
RCS file: /sources/antiright/antiright/xshell/decoration.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- decoration.h 22 Jul 2007 21:54:10 -0000 1.3
+++ decoration.h 6 Aug 2007 20:26:24 -0000 1.4
@@ -34,6 +34,16 @@
void
xsh_setup_gradients(XShell * xsh);
+unsigned long
+xsh_get_color(Display * display,
+ unsigned short r, unsigned short g, unsigned short b);
+
+void
+xsh_set_foreground(Display * display, GC gc, unsigned long color);
+
+#define XSH_SET_COLOR(dpy, gc, r, g, b)\
+ xsh_set_foreground(dpy, gc, xsh_get_color(dpy, r, g, b))
+
#endif /* XSH_DECOR_H */
#endif /* XSH_DECORATE */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Antiright-devel] antiright/xshell button.c decoration.c decorati...,
Jeffrey Bedard <=