Fix various type mismatch warnings

This commit is contained in:
Руслан Ижбулатов 2018-06-10 20:53:46 +00:00
parent aaa4e23a77
commit bc47fa27d4
4 changed files with 19 additions and 19 deletions

View File

@ -193,7 +193,7 @@ gdk_win32_clipboard_store_async (GdkClipboard *clipboard,
formats = gdk_content_provider_ref_storable_formats (content);
formats = gdk_content_formats_union_serialize_mime_types (formats);
if (!_gdk_win32_store_clipboard_contentformats (cb, store_task, formats))
if (!_gdk_win32_store_clipboard_contentformats (clipboard, store_task, formats))
{
GDK_NOTE (CLIPBOARD, g_printerr ("clipdrop says there's nothing to store: SUCCESS!\n"));
g_task_return_boolean (store_task, TRUE);

View File

@ -1026,7 +1026,7 @@ process_retrieve (GdkWin32ClipboardThreadRetrieve *retr)
}
stream = g_memory_input_stream_new_from_data (data, data_len, g_free);
g_object_set_data (stream, "gdk-clipboard-stream-contenttype", pair->contentformat);
g_object_set_data (G_OBJECT (stream), "gdk-clipboard-stream-contenttype", (gpointer) pair->contentformat);
GDK_NOTE (CLIPBOARD, g_printerr ("reading clipboard data from a %" G_GSIZE_FORMAT "-byte buffer\n",
data_len));
@ -1619,7 +1619,7 @@ gdk_win32_clipdrop_init (GdkWin32Clipdrop *win32_clipdrop)
win32_clipdrop->n_known_pixbuf_formats++;
}
win32_clipdrop->known_pixbuf_formats = g_new (gchar *, win32_clipdrop->n_known_pixbuf_formats);
win32_clipdrop->known_pixbuf_formats = g_new (const gchar *, win32_clipdrop->n_known_pixbuf_formats);
i = 0;
for (rover = pixbuf_formats; rover != NULL; rover = rover->next)
@ -1655,7 +1655,7 @@ gdk_win32_clipdrop_init (GdkWin32Clipdrop *win32_clipdrop)
fmt.w32format = CF_TEXT;
g_array_append_val (comp, fmt);
g_hash_table_replace (win32_clipdrop->compatibility_w32formats, fmt.contentformat, comp);
g_hash_table_replace (win32_clipdrop->compatibility_w32formats, (gpointer) fmt.contentformat, comp);
comp = g_array_sized_new (FALSE, FALSE, sizeof (GdkWin32ContentFormatPair), 3);
@ -1672,7 +1672,7 @@ gdk_win32_clipdrop_init (GdkWin32Clipdrop *win32_clipdrop)
fmt.transmute = TRUE;
g_array_append_val (comp, fmt);
g_hash_table_replace (win32_clipdrop->compatibility_w32formats, fmt.contentformat, comp);
g_hash_table_replace (win32_clipdrop->compatibility_w32formats, (gpointer) fmt.contentformat, comp);
comp = g_array_sized_new (FALSE, FALSE, sizeof (GdkWin32ContentFormatPair), 4);
@ -1692,7 +1692,7 @@ gdk_win32_clipdrop_init (GdkWin32Clipdrop *win32_clipdrop)
fmt.w32format = CF_DIB;
g_array_append_val (comp, fmt);
g_hash_table_replace (win32_clipdrop->compatibility_w32formats, fmt.contentformat, comp);
g_hash_table_replace (win32_clipdrop->compatibility_w32formats, (gpointer) fmt.contentformat, comp);
comp = g_array_sized_new (FALSE, FALSE, sizeof (GdkWin32ContentFormatPair), 4);
@ -1712,7 +1712,7 @@ gdk_win32_clipdrop_init (GdkWin32Clipdrop *win32_clipdrop)
fmt.w32format = CF_DIB;
g_array_append_val (comp, fmt);
g_hash_table_replace (win32_clipdrop->compatibility_w32formats, fmt.contentformat, comp);
g_hash_table_replace (win32_clipdrop->compatibility_w32formats, (gpointer) fmt.contentformat, comp);
comp = g_array_sized_new (FALSE, FALSE, sizeof (GdkWin32ContentFormatPair), 2);
@ -1726,7 +1726,7 @@ gdk_win32_clipdrop_init (GdkWin32Clipdrop *win32_clipdrop)
fmt.transmute = TRUE;
g_array_append_val (comp, fmt);
g_hash_table_replace (win32_clipdrop->compatibility_w32formats, fmt.contentformat, comp);
g_hash_table_replace (win32_clipdrop->compatibility_w32formats, (gpointer) fmt.contentformat, comp);
/* Not implemented, but definitely possible
@ -2099,7 +2099,7 @@ _gdk_win32_add_w32format_to_pairs (UINT w32format,
}
if (list && interned_w32format_name != 0 && g_list_find (*list, interned_w32format_name) == NULL)
*list = g_list_prepend (*list, interned_w32format_name);
*list = g_list_prepend (*list, (gpointer) interned_w32format_name);
}
comp_pairs = _gdk_win32_get_compatibility_contentformats_for_w32format (w32format);
@ -2124,7 +2124,7 @@ _gdk_win32_add_w32format_to_pairs (UINT w32format,
pair = g_array_index (comp_pairs, GdkWin32ContentFormatPair, i);
if (g_list_find (*list, pair.contentformat) == NULL)
*list = g_list_prepend (*list, pair.contentformat);
*list = g_list_prepend (*list, (gpointer) pair.contentformat);
}
}
@ -3184,10 +3184,10 @@ clipboard_store_hdata_ready (GObject *clipboard,
{
GdkWin32ClipboardStorePrepElement *el = &g_array_index (prep->elements, GdkWin32ClipboardStorePrepElement, i);
if (el->stream == stream)
if (el->stream == G_OUTPUT_STREAM (stream))
{
g_output_stream_close (G_OUTPUT_STREAM (el->stream), NULL, NULL);
el->handle = gdk_win32_hdata_output_stream_get_handle (el->stream, NULL);
g_output_stream_close (el->stream, NULL, NULL);
el->handle = gdk_win32_hdata_output_stream_get_handle (GDK_WIN32_HDATA_OUTPUT_STREAM (el->stream), NULL);
g_object_unref (el->stream);
el->stream = NULL;
}
@ -3270,7 +3270,7 @@ _gdk_win32_store_clipboard_contentformats (GdkClipboard *cb,
GdkWin32ClipboardStorePrepElement *el = &g_array_index (prep->elements, GdkWin32ClipboardStorePrepElement, i);
GdkWin32ClipboardHDataPrepAndStream *prep_and_stream = g_new0 (GdkWin32ClipboardHDataPrepAndStream, 1);
prep_and_stream->prep = prep;
prep_and_stream->stream = el->stream;
prep_and_stream->stream = GDK_WIN32_HDATA_OUTPUT_STREAM (el->stream);
gdk_clipboard_write_async (GDK_CLIPBOARD (cb),
el->contentformat,

View File

@ -746,7 +746,7 @@ gdk_dropfiles_filter (GdkWin32Display *display,
event->any.send_event = FALSE;
g_set_object (&event->dnd.context, context);
g_set_object (&event->any.surface, window);
gdk_event_set_display (event, display);
gdk_event_set_display (event, GDK_DISPLAY (display));
gdk_event_set_device (event, gdk_drag_context_get_device (context));
event->dnd.x_root = pt.x / context_win32->scale + _gdk_offset_x;
event->dnd.y_root = pt.y / context_win32->scale + _gdk_offset_y;
@ -836,7 +836,7 @@ gdk_dropfiles_filter (GdkWin32Display *display,
DragFinish (hdrop);
gdk_display_put_event (display, event);
gdk_display_put_event (GDK_DISPLAY (display), event);
g_object_unref (event);
*ret_valp = 0;
@ -971,7 +971,7 @@ _gdk_win32_surface_register_dnd (GdkSurface *window)
* whether the window (widget) in question actually accepts files
* (in gtk, data of type text/uri-list) or not.
*/
gdk_win32_display_add_filter (gdk_display_get_default (), gdk_dropfiles_filter, NULL);
gdk_win32_display_add_filter (GDK_WIN32_DISPLAY (gdk_display_get_default ()), gdk_dropfiles_filter, NULL);
DragAcceptFiles (GDK_SURFACE_HWND (window), TRUE);
}
else

View File

@ -1043,7 +1043,7 @@ apply_message_filters (GdkDisplay *display,
}
filter->ref_count++;
result = filter->function (display, msg, ret_valp, filter->data);
result = filter->function (GDK_WIN32_DISPLAY (display), msg, ret_valp, filter->data);
/* get the next node after running the function since the
function may add or remove a next node */
@ -2256,7 +2256,7 @@ gdk_event_translate (MSG *msg,
if (win32_display->filters)
{
/* Apply display filters */
GdkWin32MessageFilterReturn result = apply_message_filters (win32_display, msg, ret_valp, &win32_display->filters);
GdkWin32MessageFilterReturn result = apply_message_filters (display, msg, ret_valp, &win32_display->filters);
if (result == GDK_WIN32_MESSAGE_FILTER_REMOVE)
return TRUE;