gtk2/gdk/win32/gdkwin32id.c
Tor Lillqvist 658b4b1da8 Update.
2000-10-09  Tor Lillqvist  <tml@iki.fi>

	* README.win32: Update.

	* gdk/win32/gdkgeometry-win32.c (gdk_window_clip_changed): Add two
	lines that had been deleted by mistake (?).

	* gdk/win32/gdkcursor-win32.c (gdk_cursor_new_from_pixmap): Handle
	also the case fg==white and bg==black (but still not randomly
	coloured cursors). Thanks to Wolfgang Sourdeau.

	* gdk/win32/*.c: Silence gcc -Wall.

	* gtk/gtk.def: Add missing entry points.

	Fixes by Hans Breuer:

	* gdk/makefile.msc
	* gdk/win32/makefile.msc: Update.

	* gdk/testgdk.c: If compiling with debugging (with _DEBUG defined,
	some MSVC thing, presumably), cause breakpoint on failures. Add
	GDK_NOR case. Call g_log_set_always_fatal.

	* gdk/win32/gdkwin32id.c (gdk_win32_handle_table_insert): Handle
	should be pased by reference.

	* gdk/win32/gdkprivate-win32.h: Correct declaration accordingly.

	* gdk/win32/*.c: Correct calls to gdk_win32_handle_table_insert.

	* gdk/win32/gdkevents-win32.c
	* gdk/win32/gdkwindow-win32.c: Handle WM_CREATE.

	* gdk/win32/gdkgc-win32.c: Fix mixups of drawable and
	implementation object.

	* gdk/win32/gdkimage-win32.c (gdk_image_get): Handle drawables,
	not just windows.

	* gdk/win32/gdkpixmap-win32.c (gdk_pixmap_impl_win32_finalize):
	Use the wrapper object.
2000-10-09 19:49:42 +00:00

79 lines
2.0 KiB
C

/* GDK - The GIMP Drawing Kit
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/*
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
* file for a list of people on the GTK+ Team. See the ChangeLog
* files for a list of changes. These files are distributed with
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/
#include <gdk/gdk.h>
#include "gdkprivate-win32.h"
static GHashTable *handle_ht = NULL;
static guint
gdk_handle_hash (HANDLE *handle)
{
return (guint) *handle;
}
static gint
gdk_handle_compare (HANDLE *a,
HANDLE *b)
{
return (*a == *b);
}
void
gdk_win32_handle_table_insert (HANDLE *handle,
gpointer data)
{
g_return_if_fail (handle != NULL);
if (!handle_ht)
handle_ht = g_hash_table_new ((GHashFunc) gdk_handle_hash,
(GCompareFunc) gdk_handle_compare);
g_hash_table_insert (handle_ht, handle, data);
}
void
gdk_win32_handle_table_remove (HANDLE handle)
{
if (!handle_ht)
handle_ht = g_hash_table_new ((GHashFunc) gdk_handle_hash,
(GCompareFunc) gdk_handle_compare);
g_hash_table_remove (handle_ht, &handle);
}
gpointer
gdk_win32_handle_table_lookup (GdkNativeWindow handle)
{
gpointer data = NULL;
if (handle_ht)
data = g_hash_table_lookup (handle_ht, &handle);
return data;
}