Commit f34e996b authored by Hans Breuer's avatar Hans Breuer Committed by Hans Breuer

updated externals

2001-08-18  Hans Breuer  <hans@breuer.org>

	* gdk/gdk.def : updated externals

	* gdk/win32/gdkselection-win32.c : returning TRUE with gdk_selection_set
	is required to get (at least) visible in entry fields. Some selections
	are really handled now - even on win32 - but copying via middle
	mouse button into a different app needs to wait ...

	* gdk/win32/gdkdnd-win32.c : implemented inter-app drag&drop
	mostly by stealling code from gdkdnd-fb.c. Thanks to who ever wrote it!

	* gdk/win32/gdkevents-win32.c : some tweaking to get better expose
	handling. I'm not sure if it is better now, but at least not worse

	* gdk/win32/gdkgeometry-win32.c : replaced every call to MoveWindow
	with SetWindowPos () which allows more fine-tuning backing-store wise

	* gdk/win32/gdkwindow-win32.c : allow unraised gdk_window_show ().
	Also changed move/resize to be more like the X version.

	* gtk/gtk.def : updated externals
parent dedfce8a
2001-08-18 Hans Breuer <hans@breuer.org>
* gdk/gdk.def : updated externals
* gdk/win32/gdkselection-win32.c : returning TRUE with gdk_selection_set
is required to get (at least) visible in entry fields. Some selections
are really handled now - even on win32 - but copying via middle
mouse button into a different app needs to wait ...
* gdk/win32/gdkdnd-win32.c : implemented inter-app drag&drop
mostly by stealling code from gdkdnd-fb.c. Thanks to who ever wrote it!
* gdk/win32/gdkevents-win32.c : some tweaking to get better expose
handling. I'm not sure if it is better now, but at least not worse
* gdk/win32/gdkgeometry-win32.c : replaced every call to MoveWindow
with SetWindowPos () which allows more fine-tuning backing-store wise
* gdk/win32/gdkwindow-win32.c : allow unraised gdk_window_show ().
Also changed move/resize to be more like the X version.
* gtk/gtk.def : updated externals
2001-08-19 Sven Neumann <sven@gimp.org>
* gtk/gtktooltips.c
......
2001-08-18 Hans Breuer <hans@breuer.org>
* gdk/gdk.def : updated externals
* gdk/win32/gdkselection-win32.c : returning TRUE with gdk_selection_set
is required to get (at least) visible in entry fields. Some selections
are really handled now - even on win32 - but copying via middle
mouse button into a different app needs to wait ...
* gdk/win32/gdkdnd-win32.c : implemented inter-app drag&drop
mostly by stealling code from gdkdnd-fb.c. Thanks to who ever wrote it!
* gdk/win32/gdkevents-win32.c : some tweaking to get better expose
handling. I'm not sure if it is better now, but at least not worse
* gdk/win32/gdkgeometry-win32.c : replaced every call to MoveWindow
with SetWindowPos () which allows more fine-tuning backing-store wise
* gdk/win32/gdkwindow-win32.c : allow unraised gdk_window_show ().
Also changed move/resize to be more like the X version.
* gtk/gtk.def : updated externals
2001-08-19 Sven Neumann <sven@gimp.org>
* gtk/gtktooltips.c
......
2001-08-18 Hans Breuer <hans@breuer.org>
* gdk/gdk.def : updated externals
* gdk/win32/gdkselection-win32.c : returning TRUE with gdk_selection_set
is required to get (at least) visible in entry fields. Some selections
are really handled now - even on win32 - but copying via middle
mouse button into a different app needs to wait ...
* gdk/win32/gdkdnd-win32.c : implemented inter-app drag&drop
mostly by stealling code from gdkdnd-fb.c. Thanks to who ever wrote it!
* gdk/win32/gdkevents-win32.c : some tweaking to get better expose
handling. I'm not sure if it is better now, but at least not worse
* gdk/win32/gdkgeometry-win32.c : replaced every call to MoveWindow
with SetWindowPos () which allows more fine-tuning backing-store wise
* gdk/win32/gdkwindow-win32.c : allow unraised gdk_window_show ().
Also changed move/resize to be more like the X version.
* gtk/gtk.def : updated externals
2001-08-19 Sven Neumann <sven@gimp.org>
* gtk/gtktooltips.c
......
2001-08-18 Hans Breuer <hans@breuer.org>
* gdk/gdk.def : updated externals
* gdk/win32/gdkselection-win32.c : returning TRUE with gdk_selection_set
is required to get (at least) visible in entry fields. Some selections
are really handled now - even on win32 - but copying via middle
mouse button into a different app needs to wait ...
* gdk/win32/gdkdnd-win32.c : implemented inter-app drag&drop
mostly by stealling code from gdkdnd-fb.c. Thanks to who ever wrote it!
* gdk/win32/gdkevents-win32.c : some tweaking to get better expose
handling. I'm not sure if it is better now, but at least not worse
* gdk/win32/gdkgeometry-win32.c : replaced every call to MoveWindow
with SetWindowPos () which allows more fine-tuning backing-store wise
* gdk/win32/gdkwindow-win32.c : allow unraised gdk_window_show ().
Also changed move/resize to be more like the X version.
* gtk/gtk.def : updated externals
2001-08-19 Sven Neumann <sven@gimp.org>
* gtk/gtktooltips.c
......
2001-08-18 Hans Breuer <hans@breuer.org>
* gdk/gdk.def : updated externals
* gdk/win32/gdkselection-win32.c : returning TRUE with gdk_selection_set
is required to get (at least) visible in entry fields. Some selections
are really handled now - even on win32 - but copying via middle
mouse button into a different app needs to wait ...
* gdk/win32/gdkdnd-win32.c : implemented inter-app drag&drop
mostly by stealling code from gdkdnd-fb.c. Thanks to who ever wrote it!
* gdk/win32/gdkevents-win32.c : some tweaking to get better expose
handling. I'm not sure if it is better now, but at least not worse
* gdk/win32/gdkgeometry-win32.c : replaced every call to MoveWindow
with SetWindowPos () which allows more fine-tuning backing-store wise
* gdk/win32/gdkwindow-win32.c : allow unraised gdk_window_show ().
Also changed move/resize to be more like the X version.
* gtk/gtk.def : updated externals
2001-08-19 Sven Neumann <sven@gimp.org>
* gtk/gtktooltips.c
......
2001-08-18 Hans Breuer <hans@breuer.org>
* gdk/gdk.def : updated externals
* gdk/win32/gdkselection-win32.c : returning TRUE with gdk_selection_set
is required to get (at least) visible in entry fields. Some selections
are really handled now - even on win32 - but copying via middle
mouse button into a different app needs to wait ...
* gdk/win32/gdkdnd-win32.c : implemented inter-app drag&drop
mostly by stealling code from gdkdnd-fb.c. Thanks to who ever wrote it!
* gdk/win32/gdkevents-win32.c : some tweaking to get better expose
handling. I'm not sure if it is better now, but at least not worse
* gdk/win32/gdkgeometry-win32.c : replaced every call to MoveWindow
with SetWindowPos () which allows more fine-tuning backing-store wise
* gdk/win32/gdkwindow-win32.c : allow unraised gdk_window_show ().
Also changed move/resize to be more like the X version.
* gtk/gtk.def : updated externals
2001-08-19 Sven Neumann <sven@gimp.org>
* gtk/gtktooltips.c
......
2001-08-18 Hans Breuer <hans@breuer.org>
* gdk/gdk.def : updated externals
* gdk/win32/gdkselection-win32.c : returning TRUE with gdk_selection_set
is required to get (at least) visible in entry fields. Some selections
are really handled now - even on win32 - but copying via middle
mouse button into a different app needs to wait ...
* gdk/win32/gdkdnd-win32.c : implemented inter-app drag&drop
mostly by stealling code from gdkdnd-fb.c. Thanks to who ever wrote it!
* gdk/win32/gdkevents-win32.c : some tweaking to get better expose
handling. I'm not sure if it is better now, but at least not worse
* gdk/win32/gdkgeometry-win32.c : replaced every call to MoveWindow
with SetWindowPos () which allows more fine-tuning backing-store wise
* gdk/win32/gdkwindow-win32.c : allow unraised gdk_window_show ().
Also changed move/resize to be more like the X version.
* gtk/gtk.def : updated externals
2001-08-19 Sven Neumann <sven@gimp.org>
* gtk/gtktooltips.c
......
EXPORTS
gdk_atom_intern
gdk_atom_name
gdk_axis_use_get_type
gdk_beep
gdk_bitmap_create_from_data
gdk_byte_order_get_type
gdk_cap_style_get_type
gdk_char_height
gdk_char_measure
......@@ -34,6 +36,7 @@ EXPORTS
gdk_colors_free
gdk_colors_store
gdk_core_pointer
gdk_crossing_mode_get_type
gdk_cursor_new
gdk_cursor_new_from_pixmap
gdk_cursor_ref
......@@ -124,11 +127,14 @@ EXPORTS
gdk_event_queue_remove_link
gdk_event_send_client_message
gdk_event_send_clientmessage_toall
gdk_event_type_get_type
gdk_event_unqueue
gdk_events_pending
gdk_exit
gdk_extension_mode_get_type
gdk_fill_get_type
gdk_fill_rule_get_type
gdk_filter_return_get_type
gdk_flush
gdk_font_equal
gdk_font_from_description
......@@ -138,6 +144,7 @@ EXPORTS
gdk_font_id
gdk_font_load
gdk_font_ref
gdk_font_type_get_type
gdk_font_unref
gdk_fontset_load
gdk_free_compound_text
......@@ -173,6 +180,7 @@ EXPORTS
gdk_get_display
gdk_get_show_events
gdk_get_use_xshm
gdk_grab_status_get_type
gdk_gravity_get_type
gdk_image_get
gdk_image_get_pixel
......@@ -190,9 +198,11 @@ EXPORTS
gdk_input_condition_get_type
gdk_input_exit
gdk_input_init
gdk_input_mode_get_type
gdk_input_motion_events
gdk_input_remove
gdk_input_set_extension_events
gdk_input_source_get_type
gdk_join_style_get_type
gdk_key_repeat_disable
gdk_key_repeat_restore
......@@ -217,7 +227,9 @@ EXPORTS
gdk_list_visuals
gdk_mbstowcs
gdk_modifier_type_get_type
gdk_notify_type_get_type
gdk_null_window_warnings
gdk_overlap_type_get_type
gdk_pango_attr_embossed_new
gdk_pango_attr_stipple_new
gdk_pango_context_get
......@@ -245,6 +257,7 @@ EXPORTS
gdk_property_change
gdk_property_delete
gdk_property_get
gdk_property_state_get_type
gdk_query_depths
gdk_query_visual_types
gdk_rectangle_get_type
......@@ -284,7 +297,9 @@ EXPORTS
gdk_screen_height_mm
gdk_screen_width
gdk_screen_width_mm
gdk_scroll_direction_get_type
gdk_selection_convert
gdk_selection_get_type
gdk_selection_owner_get
gdk_selection_owner_set
gdk_selection_property
......@@ -295,7 +310,9 @@ EXPORTS
gdk_set_show_events
gdk_set_sm_client_id
gdk_set_use_xshm
gdk_setting_action_get_type
gdk_setting_get
gdk_status_get_type
gdk_string_extents
gdk_string_height
gdk_string_measure
......@@ -303,6 +320,7 @@ EXPORTS
gdk_string_width
gdk_subwindow_mode_get_type
gdk_synthesize_window_state
gdk_target_get_type
gdk_text_extents
gdk_text_extents_wc
gdk_text_height
......@@ -317,6 +335,7 @@ EXPORTS
gdk_unicode_to_keyval
gdk_utf8_to_compound_text
gdk_utf8_to_string_target
gdk_visibility_state_get_type
gdk_visual_get_best
gdk_visual_get_best_depth
gdk_visual_get_best_type
......@@ -332,10 +351,12 @@ EXPORTS
gdk_win32_hdc_release
gdk_window_add_filter
gdk_window_at_pointer
gdk_window_attributes_type_get_type
gdk_window_begin_move_drag
gdk_window_begin_paint_rect
gdk_window_begin_paint_region
gdk_window_begin_resize_drag
gdk_window_class_get_type
gdk_window_clear
gdk_window_clear_area
gdk_window_clear_area_e
......@@ -343,6 +364,7 @@ EXPORTS
gdk_window_deiconify
gdk_window_destroy
gdk_window_destroy_notify
gdk_window_edge_get_type
gdk_window_end_paint
gdk_window_focus
gdk_window_foreign_new
......@@ -362,6 +384,7 @@ EXPORTS
gdk_window_get_user_data
gdk_window_get_window_type
gdk_window_hide
gdk_window_hints_get_type
gdk_window_iconify
gdk_window_invalidate_rect
gdk_window_invalidate_region
......@@ -407,8 +430,10 @@ EXPORTS
gdk_window_shape_combine_mask
gdk_window_shape_combine_region
gdk_window_show
gdk_window_state_get_type
gdk_window_stick
gdk_window_thaw_updates
gdk_window_type_get_type
gdk_window_type_hint_get_type
gdk_window_unmaximize
gdk_window_unstick
......
......@@ -89,15 +89,16 @@ static int nformats;
* this is used on both source and destination sides.
*/
struct _GdkDragContextPrivateWin32 {
gint ref_count;
GdkAtom local_selection;
gint ref_count;
guint16 last_x; /* Coordinates from last event */
guint16 last_y;
HWND dest_xid;
guint drag_status; /* Current status of drag */
HWND dest_xid;
guint drag_status; /* Current status of drag */
};
#define PRIVATE_DATA(context) ((GdkDragContextPrivateWin32 *) GDK_DRAG_CONTEXT (context)->windowing_data)
#define GDK_DRAG_CONTEXT_PRIVATE_DATA(context) ((GdkDragContextPrivateWin32 *) GDK_DRAG_CONTEXT (context)->windowing_data)
GdkDragContext *current_dest_drag = NULL;
......@@ -161,7 +162,7 @@ static void
gdk_drag_context_finalize (GObject *object)
{
GdkDragContext *context = GDK_DRAG_CONTEXT (object);
GdkDragContextPrivateWin32 *private = PRIVATE_DATA (context);
GdkDragContextPrivateWin32 *private = GDK_DRAG_CONTEXT_PRIVATE_DATA (context);
g_list_free (context->targets);
......@@ -204,34 +205,32 @@ gdk_drag_context_unref (GdkDragContext *context)
g_object_unref (G_OBJECT (context));
}
#if 0
static GdkDragContext *
gdk_drag_context_find (gboolean is_source,
HWND source_xid,
HWND dest_xid)
gdk_drag_context_find (gboolean is_source,
GdkWindow *source,
GdkWindow *dest)
{
GList *tmp_list = contexts;
GdkDragContext *context;
GdkDragContextPrivateWin32 *private;
while (tmp_list)
{
context = (GdkDragContext *)tmp_list->data;
private = GDK_DRAG_CONTEXT_PRIVATE_DATA (context);
if ((!context->is_source == !is_source) &&
((source_xid == None) || (context->source_window &&
(GDK_WINDOW_XWINDOW (context->source_window) == source_xid))) &&
((dest_xid == None) || (context->dest_window &&
(GDK_WINDOW_XWINDOW (context->dest_window) == dest_xid))))
return context;
((source == NULL) || (context->source_window && (context->source_window == source))) &&
((dest == NULL) || (context->dest_window && (context->dest_window == dest))))
return context;
tmp_list = tmp_list->next;
}
return NULL;
}
#endif
typedef struct {
#ifdef OLE2_DND
......@@ -266,7 +265,7 @@ static ULONG STDMETHODCALLTYPE
idroptarget_addref (LPDROPTARGET This)
{
target_drag_context *ctx = (target_drag_context *) This;
GdkDragContextPrivateWin32 *private = PRIVATE_DATA (ctx->context);
GdkDragContextPrivateWin32 *private = GDK_DRAG_CONTEXT_PRIVATE_DATA (ctx->context);
int ref_count = ++private->ref_count;
gdk_drag_context_ref (ctx->context);
......@@ -311,7 +310,7 @@ static ULONG STDMETHODCALLTYPE
idroptarget_release (LPDROPTARGET This)
{
target_drag_context *ctx = (target_drag_context *) This;
GdkDragContextPrivateWin32 *private = PRIVATE_DATA (ctx->context);
GdkDragContextPrivateWin32 *private = GDK_DRAG_CONTEXT_PRIVATE_DATA (ctx->context);
int ref_count = --private->ref_count;
gdk_drag_context_unref (ctx->context);
......@@ -370,7 +369,7 @@ static ULONG STDMETHODCALLTYPE
idropsource_addref (LPDROPSOURCE This)
{
source_drag_context *ctx = (source_drag_context *) This;
GdkDragContextPrivateWin32 *private = PRIVATE_DATA (ctx->context);
GdkDragContextPrivateWin32 *private = GDK_DRAG_CONTEXT_PRIVATE_DATA (ctx->context);
gdk_drag_context_ref (ctx->context);
GDK_NOTE (DND, g_print ("idropsource_addref %#x %d\n",
......@@ -414,7 +413,7 @@ static ULONG STDMETHODCALLTYPE
idropsource_release (LPDROPSOURCE This)
{
source_drag_context *ctx = (source_drag_context *) This;
GdkDragContextPrivateWin32 *private = PRIVATE_DATA (ctx->context);
GdkDragContextPrivateWin32 *private = GDK_DRAG_CONTEXT_PRIVATE_DATA (ctx->context);
int ref_count = --private->ref_count;
gdk_drag_context_unref (ctx->context);
......@@ -962,10 +961,11 @@ gdk_dropfiles_filter (GdkXEvent *xev,
GDK_NOTE (DND, g_print ("WM_DROPFILES: %#x\n", (guint) msg->hwnd));
context = gdk_drag_context_new ();
private = PRIVATE_DATA (context);
private = GDK_DRAG_CONTEXT_PRIVATE_DATA (context);
context->protocol = GDK_DRAG_PROTO_WIN32_DROPFILES;
context->is_source = FALSE;
context->source_window = gdk_parent_root;
gdk_drawable_ref (context->source_window);
context->dest_window = event->any.window;
gdk_drawable_ref (context->dest_window);
/* WM_DROPFILES drops are always file names */
......@@ -1059,6 +1059,147 @@ gdk_win32_dnd_exit (void)
/* Source side */
static void
local_send_leave (GdkDragContext *context,
guint32 time)
{
GdkEvent tmp_event;
if ((current_dest_drag != NULL) &&
(current_dest_drag->protocol == GDK_DRAG_PROTO_LOCAL) &&
(current_dest_drag->source_window == context->source_window))
{
tmp_event.dnd.type = GDK_DRAG_LEAVE;
tmp_event.dnd.window = context->dest_window;
/* Pass ownership of context to the event */
tmp_event.dnd.context = current_dest_drag;
tmp_event.dnd.send_event = FALSE;
tmp_event.dnd.time = GDK_CURRENT_TIME; /* FIXME? */
current_dest_drag = NULL;
gdk_event_put (&tmp_event);
}
}
static void
local_send_enter (GdkDragContext *context,
guint32 time)
{
GdkEvent tmp_event;
GdkDragContextPrivateWin32 *private;
GdkDragContext *new_context;
private = GDK_DRAG_CONTEXT_PRIVATE_DATA (context);
if (!private->local_selection)
private->local_selection = gdk_atom_intern ("LocalDndSelection", FALSE);
if (current_dest_drag != NULL)
{
gdk_drag_context_unref (current_dest_drag);
current_dest_drag = NULL;
}
new_context = gdk_drag_context_new ();
new_context->protocol = GDK_DRAG_PROTO_LOCAL;
new_context->is_source = FALSE;
new_context->source_window = context->source_window;
gdk_window_ref (new_context->source_window);
new_context->dest_window = context->dest_window;
gdk_window_ref (new_context->dest_window);
new_context->targets = g_list_copy (context->targets);
gdk_window_set_events (new_context->source_window,
gdk_window_get_events (new_context->source_window) |
GDK_PROPERTY_CHANGE_MASK);
new_context->actions = context->actions;
tmp_event.dnd.type = GDK_DRAG_ENTER;
tmp_event.dnd.window = context->dest_window;
tmp_event.dnd.send_event = FALSE;
tmp_event.dnd.context = new_context;
gdk_drag_context_ref (new_context);
tmp_event.dnd.time = GDK_CURRENT_TIME; /* FIXME? */
current_dest_drag = new_context;
(GDK_DRAG_CONTEXT_PRIVATE_DATA (new_context))->local_selection =
private->local_selection;
gdk_event_put (&tmp_event);
}
static void
local_send_motion (GdkDragContext *context,
gint x_root,
gint y_root,
GdkDragAction action,
guint32 time)
{
GdkEvent tmp_event;
if ((current_dest_drag != NULL) &&
(current_dest_drag->protocol == GDK_DRAG_PROTO_LOCAL) &&
(current_dest_drag->source_window == context->source_window))
{
tmp_event.dnd.type = GDK_DRAG_MOTION;
tmp_event.dnd.window = current_dest_drag->dest_window;
tmp_event.dnd.send_event = FALSE;
tmp_event.dnd.context = current_dest_drag;
gdk_drag_context_ref (current_dest_drag);
tmp_event.dnd.time = time;
current_dest_drag->suggested_action = action;
current_dest_drag->actions = current_dest_drag->suggested_action;
tmp_event.dnd.x_root = x_root;
tmp_event.dnd.y_root = y_root;
(GDK_DRAG_CONTEXT_PRIVATE_DATA (current_dest_drag))->last_x = x_root;
(GDK_DRAG_CONTEXT_PRIVATE_DATA (current_dest_drag))->last_y = y_root;
GDK_DRAG_CONTEXT_PRIVATE_DATA (context)->drag_status = GDK_DRAG_STATUS_MOTION_WAIT;
gdk_event_put (&tmp_event);
}
}
static void
local_send_drop (GdkDragContext *context, guint32 time)
{
GdkEvent tmp_event;
if ((current_dest_drag != NULL) &&
(current_dest_drag->protocol == GDK_DRAG_PROTO_LOCAL) &&
(current_dest_drag->source_window == context->source_window))
{
GdkDragContextPrivateWin32 *private;
private = GDK_DRAG_CONTEXT_PRIVATE_DATA (current_dest_drag);
tmp_event.dnd.type = GDK_DROP_START;
tmp_event.dnd.window = current_dest_drag->dest_window;
tmp_event.dnd.send_event = FALSE;
tmp_event.dnd.context = current_dest_drag;
gdk_drag_context_ref (current_dest_drag);
tmp_event.dnd.time = GDK_CURRENT_TIME;
tmp_event.dnd.x_root = private->last_x;
tmp_event.dnd.y_root = private->last_y;
gdk_event_put (&tmp_event);
}
}
static void
gdk_drag_do_leave (GdkDragContext *context,
guint32 time)
......@@ -1066,6 +1207,16 @@ gdk_drag_do_leave (GdkDragContext *context,
if (context->dest_window)
{
GDK_NOTE (DND, g_print ("gdk_drag_do_leave\n"));
switch (context->protocol)
{
case GDK_DRAG_PROTO_LOCAL:
local_send_leave (context, time);
break;
default:
break;
}
gdk_drawable_unref (context->dest_window);
context->dest_window = NULL;
}
......@@ -1075,8 +1226,31 @@ GdkDragContext *
gdk_drag_begin (GdkWindow *window,
GList *targets)
{
#ifndef OLE2_DND
GList *tmp_list;
GdkDragContext *new_context;
g_return_val_if_fail (window != NULL, NULL);
new_context = gdk_drag_context_new ();
new_context->is_source = TRUE;
new_context->source_window = window;
gdk_window_ref (window);
tmp_list = g_list_last (targets);
new_context->targets = NULL;
while (tmp_list)
{
new_context->targets = g_list_prepend (new_context->targets,
tmp_list->data);
tmp_list = tmp_list->prev;
}
new_context->actions = 0;
return new_context;
#else
source_drag_context *ctx;
#ifdef OLE2_DND
GList *tmp_list;
data_object *dobj;
HRESULT hResult;
......@@ -1084,7 +1258,6 @@ gdk_drag_begin (GdkWindow *window,
HGLOBAL global;
FORMATETC format;
STGMEDIUM medium;
#endif
g_return_val_if_fail (window != NULL, NULL);
......@@ -1095,7 +1268,6 @@ gdk_drag_begin (GdkWindow *window,
ctx->context->source_window = window;
gdk_drawable_ref (window);
#ifdef OLE2_DND
tmp_list = g_list_last (targets);
ctx->context->targets = NULL;
while (tmp_list)
......@@ -1129,15 +1301,28 @@ gdk_drag_begin (GdkWindow *window,
dobj->ido.lpVtbl->Release (&dobj->ido);
ctx->ids.lpVtbl->Release (&