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
This commit is contained in:
@ -1,3 +1,10 @@
|
|||||||
|
2007-12-15 Sebastian Dröge <slomo@circular-chaos.org>
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
2007-12-14 Ray Strode <rstrode@redhat.com>
|
2007-12-14 Ray Strode <rstrode@redhat.com>
|
||||||
|
|
||||||
* gtk/gtkwidget.c: Suggest g_signal_connect (..., "realize", ...)
|
* gtk/gtkwidget.c: Suggest g_signal_connect (..., "realize", ...)
|
||||||
|
|||||||
@ -39,6 +39,13 @@
|
|||||||
|
|
||||||
#include "x-cursors.xbm"
|
#include "x-cursors.xbm"
|
||||||
|
|
||||||
|
#include <directfb_version.h>
|
||||||
|
|
||||||
|
#if DIRECTFB_MAJOR_VERSION < 1
|
||||||
|
#define u32 __u32
|
||||||
|
#define u8 __u8
|
||||||
|
#endif
|
||||||
|
|
||||||
static struct {
|
static struct {
|
||||||
const guchar *bits;
|
const guchar *bits;
|
||||||
int width, height, hotx, hoty;
|
int width, height, hotx, hoty;
|
||||||
@ -228,7 +235,7 @@ gdk_cursor_new_for_display (GdkDisplay *display,GdkCursorType cursor_type)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
__u32 *dst;
|
u32 *dst;
|
||||||
int pitch;
|
int pitch;
|
||||||
|
|
||||||
ret = temp->Lock (temp, DSLF_WRITE, (void**)&dst, &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 bit = x-mx + (y-my) * p;
|
||||||
gint mbit = x + y * mp;
|
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 ||
|
x-mx >= stock_cursors[cursor_type].width ||
|
||||||
y-my >= stock_cursors[cursor_type].height)
|
y-my >= stock_cursors[cursor_type].height)
|
||||||
? 0x00FFFFFF : (src[bit/8] & (1 << bit%8) ? 0 : 0x00FFFFFF);
|
? 0x00FFFFFF : (src[bit/8] & (1 << bit%8) ? 0 : 0x00FFFFFF);
|
||||||
|
|
||||||
__u8 a = color ? 0xE0 : 0xFF;
|
u8 a = color ? 0xE0 : 0xFF;
|
||||||
__u32 alpha = mask[mbit/8] & (1 << mbit%8) ? (a << 24) : 0;
|
u32 alpha = mask[mbit/8] & (1 << mbit%8) ? (a << 24) : 0;
|
||||||
|
|
||||||
dst[x + y*pitch] = alpha | color;
|
dst[x + y*pitch] = alpha | color;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user