summaryrefslogtreecommitdiff
path: root/gdk/directfb
diff options
context:
space:
mode:
authorSebastian Dröge <sdroege@src.gnome.org>2007-12-15 05:01:30 +0000
committerSebastian Dröge <sdroege@src.gnome.org>2007-12-15 05:01:30 +0000
commit33499debed41e6cf01be9a0ee2110a472145e2ad (patch)
tree6195f70edaa583aea45e63306b1ee5f0505a278b /gdk/directfb
parent8609315d28de7750aa20141e1d2290c67b014e63 (diff)
downloadgtk+-33499debed41e6cf01be9a0ee2110a472145e2ad.tar.gz
Use u32 instead of __u32 and u8 instead of __u8 as the other types are
* gdk/directfb/gdkcursor-directfb.c: (gdk_cursor_new_for_display): Use u32 instead of __u32 and u8 instead of __u8 as the other types are deprecated since DirectFB 1.0.0. If compiling with an older version define the new type name to the old types. Fixes bug #503190. svn path=/trunk/; revision=19182
Diffstat (limited to 'gdk/directfb')
-rw-r--r--gdk/directfb/gdkcursor-directfb.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/gdk/directfb/gdkcursor-directfb.c b/gdk/directfb/gdkcursor-directfb.c
index 8ab7aec7b8..5c2f92ea26 100644
--- a/gdk/directfb/gdkcursor-directfb.c
+++ b/gdk/directfb/gdkcursor-directfb.c
@@ -39,6 +39,13 @@
#include "x-cursors.xbm"
+#include <directfb_version.h>
+
+#if DIRECTFB_MAJOR_VERSION < 1
+#define u32 __u32
+#define u8 __u8
+#endif
+
static struct {
const guchar *bits;
int width, height, hotx, hoty;
@@ -228,7 +235,7 @@ gdk_cursor_new_for_display (GdkDisplay *display,GdkCursorType cursor_type)
}
else
{
- __u32 *dst;
+ u32 *dst;
int pitch;
ret = temp->Lock (temp, DSLF_WRITE, (void**)&dst, &pitch);
@@ -266,13 +273,13 @@ gdk_cursor_new_for_display (GdkDisplay *display,GdkCursorType cursor_type)
gint bit = x-mx + (y-my) * p;
gint mbit = x + y * mp;
- __u32 color = (x-mx < 0 || y-my < 0 ||
+ u32 color = (x-mx < 0 || y-my < 0 ||
x-mx >= stock_cursors[cursor_type].width ||
y-my >= stock_cursors[cursor_type].height)
? 0x00FFFFFF : (src[bit/8] & (1 << bit%8) ? 0 : 0x00FFFFFF);
- __u8 a = color ? 0xE0 : 0xFF;
- __u32 alpha = mask[mbit/8] & (1 << mbit%8) ? (a << 24) : 0;
+ u8 a = color ? 0xE0 : 0xFF;
+ u32 alpha = mask[mbit/8] & (1 << mbit%8) ? (a << 24) : 0;
dst[x + y*pitch] = alpha | color;
}