Bug 544684 - Win64 issue, window handles are assumed to be 32-bit
2008-08-05 Tor Lillqvist <tml@novell.com> Bug 544684 - Win64 issue, window handles are assumed to be 32-bit * gdk/gdkdnd.h * gdk/gdkdnd.c * gdk/win32/gdkdnd-win32.c * gdk/x11/gdkdnd-x11.c: Change return value and type of window id from guint32 to GdkNativeWindow for gdk_drag_get_protocol_for_display() and gdk_drag_get_protocol(). This is not an API break on existing platforms, as GdkNativeWindow has been guint32 for them already. svn path=/trunk/; revision=20988
This commit is contained in:
parent
ad2ea92f75
commit
b1e744b064
12
gdk/gdkdnd.c
12
gdk/gdkdnd.c
@ -61,17 +61,17 @@ gdk_drag_find_window (GdkDragContext *context,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* gdk_drag_get_protocol:
|
* gdk_drag_get_protocol:
|
||||||
* @xid: the X id of the destination window.
|
* @xid: the windowing system id of the destination window.
|
||||||
* @protocol: location where the supported DND protocol is returned.
|
* @protocol: location where the supported DND protocol is returned.
|
||||||
*
|
*
|
||||||
* Finds out the DND protocol supported by a window.
|
* Finds out the DND protocol supported by a window.
|
||||||
*
|
*
|
||||||
* Return value: the X id of the window where the drop should happen. This
|
* Return value: the windowing system specific id for the window where
|
||||||
* may be @xid or the X id of a proxy window, or None if @xid doesn't
|
* the drop should happen. This may be @xid or the id of a proxy
|
||||||
* support Drag and Drop.
|
* window, or zero if @xid doesn't support Drag and Drop.
|
||||||
**/
|
**/
|
||||||
guint32
|
GdkNativeWindow
|
||||||
gdk_drag_get_protocol (guint32 xid,
|
gdk_drag_get_protocol (GdkNativeWindow xid,
|
||||||
GdkDragProtocol *protocol)
|
GdkDragProtocol *protocol)
|
||||||
{
|
{
|
||||||
return gdk_drag_get_protocol_for_display (gdk_display_get_default (), xid, protocol);
|
return gdk_drag_get_protocol_for_display (gdk_display_get_default (), xid, protocol);
|
||||||
|
@ -130,9 +130,10 @@ GdkAtom gdk_drag_get_selection (GdkDragContext *context);
|
|||||||
GdkDragContext * gdk_drag_begin (GdkWindow *window,
|
GdkDragContext * gdk_drag_begin (GdkWindow *window,
|
||||||
GList *targets);
|
GList *targets);
|
||||||
|
|
||||||
guint32 gdk_drag_get_protocol_for_display (GdkDisplay *display,
|
GdkNativeWindow gdk_drag_get_protocol_for_display (GdkDisplay *display,
|
||||||
guint32 xid,
|
GdkNativeWindow xid,
|
||||||
GdkDragProtocol *protocol);
|
GdkDragProtocol *protocol);
|
||||||
|
|
||||||
void gdk_drag_find_window_for_screen (GdkDragContext *context,
|
void gdk_drag_find_window_for_screen (GdkDragContext *context,
|
||||||
GdkWindow *drag_window,
|
GdkWindow *drag_window,
|
||||||
GdkScreen *screen,
|
GdkScreen *screen,
|
||||||
@ -142,8 +143,9 @@ void gdk_drag_find_window_for_screen (GdkDragContext *context,
|
|||||||
GdkDragProtocol *protocol);
|
GdkDragProtocol *protocol);
|
||||||
|
|
||||||
#ifndef GDK_MULTIHEAD_SAFE
|
#ifndef GDK_MULTIHEAD_SAFE
|
||||||
guint32 gdk_drag_get_protocol (guint32 xid,
|
GdkNativeWindow gdk_drag_get_protocol (GdkNativeWindow xid,
|
||||||
GdkDragProtocol *protocol);
|
GdkDragProtocol *protocol);
|
||||||
|
|
||||||
void gdk_drag_find_window (GdkDragContext *context,
|
void gdk_drag_find_window (GdkDragContext *context,
|
||||||
GdkWindow *drag_window,
|
GdkWindow *drag_window,
|
||||||
gint x_root,
|
gint x_root,
|
||||||
|
@ -854,7 +854,7 @@ enum_formats_new (void)
|
|||||||
static gboolean
|
static gboolean
|
||||||
resolve_link (HWND hWnd,
|
resolve_link (HWND hWnd,
|
||||||
wchar_t *link,
|
wchar_t *link,
|
||||||
guchar **lpszPath)
|
gchar **lpszPath)
|
||||||
{
|
{
|
||||||
WIN32_FILE_ATTRIBUTE_DATA wfad;
|
WIN32_FILE_ATTRIBUTE_DATA wfad;
|
||||||
HRESULT hres;
|
HRESULT hres;
|
||||||
@ -938,7 +938,7 @@ gdk_dropfiles_filter (GdkXEvent *xev,
|
|||||||
HANDLE hdrop;
|
HANDLE hdrop;
|
||||||
POINT pt;
|
POINT pt;
|
||||||
gint nfiles, i;
|
gint nfiles, i;
|
||||||
guchar *fileName, *linkedFile;
|
gchar *fileName, *linkedFile;
|
||||||
|
|
||||||
if (msg->message == WM_DROPFILES)
|
if (msg->message == WM_DROPFILES)
|
||||||
{
|
{
|
||||||
@ -1294,9 +1294,9 @@ gdk_drag_begin (GdkWindow *window,
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
guint32
|
GdkNativeWindow
|
||||||
gdk_drag_get_protocol_for_display (GdkDisplay *display,
|
gdk_drag_get_protocol_for_display (GdkDisplay *display,
|
||||||
guint32 xid,
|
GdkNativeWindow xid,
|
||||||
GdkDragProtocol *protocol)
|
GdkDragProtocol *protocol)
|
||||||
{
|
{
|
||||||
GdkWindow *window;
|
GdkWindow *window;
|
||||||
@ -1373,7 +1373,7 @@ gdk_drag_find_window_for_screen (GdkDragContext *context,
|
|||||||
*dest_window = NULL;
|
*dest_window = NULL;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
*dest_window = gdk_win32_handle_table_lookup (GPOINTER_TO_UINT (a.result));
|
*dest_window = gdk_win32_handle_table_lookup (a.result);
|
||||||
if (*dest_window)
|
if (*dest_window)
|
||||||
{
|
{
|
||||||
*dest_window = gdk_window_get_toplevel (*dest_window);
|
*dest_window = gdk_window_get_toplevel (*dest_window);
|
||||||
|
@ -3001,15 +3001,15 @@ gdk_drag_begin (GdkWindow *window,
|
|||||||
return new_context;
|
return new_context;
|
||||||
}
|
}
|
||||||
|
|
||||||
static guint32
|
static GdkNativeWindow
|
||||||
_gdk_drag_get_protocol_for_display (GdkDisplay *display,
|
_gdk_drag_get_protocol_for_display (GdkDisplay *display,
|
||||||
guint32 xid,
|
GdkNativeWindow xid,
|
||||||
GdkDragProtocol *protocol,
|
GdkDragProtocol *protocol,
|
||||||
guint *version)
|
guint *version)
|
||||||
|
|
||||||
{
|
{
|
||||||
GdkWindow *window;
|
GdkWindow *window;
|
||||||
guint32 retval;
|
GdkNativeWindow retval;
|
||||||
g_return_val_if_fail (GDK_IS_DISPLAY (display), None);
|
g_return_val_if_fail (GDK_IS_DISPLAY (display), None);
|
||||||
|
|
||||||
base_precache_atoms (display);
|
base_precache_atoms (display);
|
||||||
@ -3106,25 +3106,26 @@ _gdk_drag_get_protocol_for_display (GdkDisplay *display,
|
|||||||
}
|
}
|
||||||
|
|
||||||
*protocol = GDK_DRAG_PROTO_NONE;
|
*protocol = GDK_DRAG_PROTO_NONE;
|
||||||
return None;
|
|
||||||
|
return 0; /* a.k.a. None */
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gdk_drag_get_protocol_for_display:
|
* gdk_drag_get_protocol_for_display:
|
||||||
* @display: the #GdkDisplay where the destination window resides
|
* @display: the #GdkDisplay where the destination window resides
|
||||||
* @xid: the X id of the destination window.
|
* @xid: the windowing system id of the destination window.
|
||||||
* @protocol: location where the supported DND protocol is returned.
|
* @protocol: location where the supported DND protocol is returned.
|
||||||
* @returns: the X id of the window where the drop should happen. This
|
* @returns: the windowing system id of the window where the drop should happen. This
|
||||||
* may be @xid or the X id of a proxy window, or None if @xid doesn't
|
* may be @xid or the id of a proxy window, or zero if @xid doesn't
|
||||||
* support Drag and Drop.
|
* support Drag and Drop.
|
||||||
*
|
*
|
||||||
* Finds out the DND protocol supported by a window.
|
* Finds out the DND protocol supported by a window.
|
||||||
*
|
*
|
||||||
* Since: 2.2
|
* Since: 2.2
|
||||||
*/
|
*/
|
||||||
guint32
|
GdkNativeWindow
|
||||||
gdk_drag_get_protocol_for_display (GdkDisplay *display,
|
gdk_drag_get_protocol_for_display (GdkDisplay *display,
|
||||||
guint32 xid,
|
GdkNativeWindow xid,
|
||||||
GdkDragProtocol *protocol)
|
GdkDragProtocol *protocol)
|
||||||
{
|
{
|
||||||
return _gdk_drag_get_protocol_for_display (display, xid, protocol, NULL);
|
return _gdk_drag_get_protocol_for_display (display, xid, protocol, NULL);
|
||||||
|
Loading…
Reference in New Issue
Block a user