Merge in Win32 version: Define macro GDKVAR for declaring gdk variables

* gdk/gdktypes.h: Merge in Win32 version: Define macro GDKVAR for
declaring gdk variables exported/imported from the DLL. New image
type enum, GDK_IMAGE_SHARED_PIXMAP, for gdk_imlib. New drag and
drop protocol enums, GDK_DRAG_PROTO_WIN32_DROPFILES and
GDK_DRAG_PROTO_OLE2.

* gdk/gdk.h: Merge in Win32 version: Two new functions,
gdk_pixmap_create_on_shared_image and gdk_image_bitmap_new. So far
declared only for the Win32 version, but could be in the X11
version as well. (Needed for a Xlib-less gdk_imlib.)
gdk_color_hash should have only one parameter. Declare
gdk_threads_mutex with GDKVAR.

* gdk/gdkcolor.c (gdk_color_hash): As a hash function should have
just one parameter.

* gdk/gdkimage.c (gdk_image_get): Initialize bpp correctly. Bytes
per pixel, not bits.

* gdk/gdkrgb.c: Mingle includes somewhat. (gdk_rgb_select_conv):
Fetch bpp (which means bits-per-pixel here) from another place on
Win32. Accept also depth==32 (which we might get on Win32) with
bpp==32.

* gtk/{gtkclist,gtkctree,gtkdnd,gtkditable,gtkfontsel,
gtkhandlebox,gtklayout,gtkmain,gtkplug,gtkpreview,gtkrc,
gtkselection,gtksocket,gtkstyle,gtkwidget,gtkwindow}.c:
Include gdx.h from "gdkx.h", not "gdk/gdkx.h", as gdkx.h will be
in the backend-dependent directory, not in the common gdk
directory.

* gtk/testgtk.c: Ditto. Also, don't use ../gdk patchs to gdk
headers.
This commit is contained in:
Tor Lillqvist
1999-03-17 23:02:10 +00:00
parent d142187b38
commit 0b4d29fd6e
32 changed files with 338 additions and 40 deletions

View File

@ -227,7 +227,7 @@ void gdk_window_set_child_shapes (GdkWindow *window);
/*
* This routine allows you to merge (ie ADD) child shapes to your
* own window's shape keeping its current shape and ADDING the shild
* own window's shape keeping its current shape and ADDING the child
* shapes to it.
*
* - Raster
@ -464,6 +464,15 @@ GdkPixmap* gdk_pixmap_new (GdkWindow *window,
gint width,
gint height,
gint depth);
#if GDK_WINDOWING == GDK_WINDOWING_WIN32
GdkPixmap* gdk_pixmap_create_on_shared_image
(GdkImage **image_return,
GdkWindow *window,
GdkVisual *visual,
gint width,
gint height,
gint depth);
#endif
GdkBitmap* gdk_bitmap_create_from_data (GdkWindow *window,
const gchar *data,
gint width,
@ -512,6 +521,12 @@ GdkImage* gdk_image_new (GdkImageType type,
GdkVisual *visual,
gint width,
gint height);
#if GDK_WINDOWING == GDK_WINDOWING_WIN32
GdkImage* gdk_image_bitmap_new(GdkImageType type,
GdkVisual *visual,
gint width,
gint height);
#endif
GdkImage* gdk_image_get (GdkWindow *window,
gint x,
gint y,
@ -562,8 +577,7 @@ void gdk_color_free (GdkColor *color);
gint gdk_color_parse (const gchar *spec,
GdkColor *color);
guint gdk_color_hash (const GdkColor *colora,
const GdkColor *colorb);
guint gdk_color_hash (const GdkColor *colora);
gint gdk_color_equal (const GdkColor *colora,
const GdkColor *colorb);
@ -994,7 +1008,7 @@ gboolean gdk_keyval_is_lower (guint keyval);
/* Threading
*/
extern GMutex *gdk_threads_mutex;
GDKVAR GMutex *gdk_threads_mutex;
void gdk_threads_enter (void);
void gdk_threads_leave (void);