Commit d142187b authored by Tor Lillqvist's avatar Tor Lillqvist

Fixes to the win32 backend to actually be able to compile within a

directory hierarchy like this, with common gdk.h and gdktypes.h
for all backends. gdkrectangles.c and gdkrgb.c is copied before
compilation from the x11 backed (which still is in .., but
eventually will be in ..\x11).
parent 9f513b18
......@@ -33,12 +33,11 @@
#include <limits.h>
#include <io.h>
#include "gdk.h"
#include "gdkprivate.h"
#include "gdkinput.h"
#include <gdk/gdk.h>
#include <gdk/gdkkeysyms.h>
#include <gdk/gdki18n.h>
#include "gdkx.h"
#include "gdkkeysyms.h"
#include "gdki18n.h"
#include "gdkinput.h"
static void gdkx_XConvertCase (KeySym symbol,
KeySym *lower,
......@@ -2090,7 +2089,7 @@ gdk_keys_keyval_compare (const void *pkey, const void *pbase)
return (*(int *) pkey) - ((struct gdk_key *) pbase)->keyval;
}
const gchar*
gchar*
gdk_keyval_name (guint keyval)
{
struct gdk_key *found =
......
This diff is collapsed.
......@@ -64,8 +64,7 @@
#include <stdlib.h>
#include <string.h>
#include "gdk.h"
#include "gdkprivate.h"
#include "gdkx.h"
#define MAX_IMAGE_COLORS 256
......
......@@ -31,8 +31,6 @@
#include <string.h>
#include <time.h>
#include "gdk.h"
#include "gdkprivate.h"
#include "gdkx.h"
#ifdef _MSC_VER
......
......@@ -31,8 +31,6 @@
#include <string.h>
#include <time.h>
#include "gdk.h"
#include "gdkprivate.h"
#include "gdkx.h"
#ifdef _MSC_VER
......
/* Handcrafted for Win32 */
#define GDK_WINDOWING GDK_WINDOWING_WIN32
#define GDK_HAVE_WCHAR_H 1
#define GDK_HAVE_WCTYPE_H 1
......@@ -19,7 +19,7 @@
#include "config.h"
#include "gdk.h"
#include <gdk/gdk.h>
#include "gdkprivate.h"
static const struct { const char *name; int type; } cursors[] = {
......
......@@ -19,7 +19,7 @@
#include "config.h"
#include "gdk.h"
#include <gdk/gdk.h>
#include "gdkprivate.h"
static const struct { const char *name; int type; } cursors[] = {
......
......@@ -30,13 +30,14 @@
#define INITGUID
#include <string.h>
#include "gdk.h"
#include "gdkx.h"
#include "gdk/gdkprivate.h"
#include <ole2.h>
#include <shlobj.h>
#include <shlguid.h>
#include <gdk/gdk.h>
#include "gdkx.h"
typedef struct _GdkDragContextPrivate GdkDragContextPrivate;
typedef enum {
......
......@@ -30,13 +30,14 @@
#define INITGUID
#include <string.h>
#include "gdk.h"
#include "gdkx.h"
#include "gdk/gdkprivate.h"
#include <ole2.h>
#include <shlobj.h>
#include <shlguid.h>
#include <gdk/gdk.h>
#include "gdkx.h"
typedef struct _GdkDragContextPrivate GdkDragContextPrivate;
typedef enum {
......
......@@ -27,7 +27,7 @@
#include "config.h"
#include <math.h>
#include "gdk.h"
#include <gdk/gdk.h>
#include "gdkprivate.h"
#ifndef M_TWOPI
......
......@@ -27,7 +27,7 @@
#include "config.h"
#include <math.h>
#include "gdk.h"
#include <gdk/gdk.h>
#include "gdkprivate.h"
#ifndef M_TWOPI
......
......@@ -28,11 +28,10 @@
#include "config.h"
#include <stdio.h>
#include "gdk.h"
#include <gdk/gdk.h>
#include <gdk/gdkkeysyms.h>
#include "gdkx.h"
#include "gdkprivate.h"
#include "gdkinput.h"
#include "gdkkeysyms.h"
#define PING() printf("%s: %d\n",__FILE__,__LINE__),fflush(stdout)
......
......@@ -28,11 +28,10 @@
#include "config.h"
#include <stdio.h>
#include "gdk.h"
#include <gdk/gdk.h>
#include <gdk/gdkkeysyms.h>
#include "gdkx.h"
#include "gdkprivate.h"
#include "gdkinput.h"
#include "gdkkeysyms.h"
#define PING() printf("%s: %d\n",__FILE__,__LINE__),fflush(stdout)
......
......@@ -29,7 +29,7 @@
#include <stdio.h>
#include <ctype.h>
#include "gdk.h"
#include <gdk/gdk.h>
#include "gdkprivate.h"
GdkFont*
......
......@@ -29,7 +29,7 @@
#include <stdio.h>
#include <ctype.h>
#include "gdk.h"
#include <gdk/gdk.h>
#include "gdkprivate.h"
GdkFont*
......
......@@ -27,7 +27,7 @@
#include "config.h"
#include <string.h>
#include "gdk.h"
#include <gdk/gdk.h>
#include "gdkprivate.h"
GdkGC*
......
......@@ -27,7 +27,7 @@
#include "config.h"
#include <string.h>
#include "gdk.h"
#include <gdk/gdk.h>
#include "gdkprivate.h"
GdkGC*
......
......@@ -25,7 +25,7 @@
*/
#include <stdio.h>
#include "gdk.h"
#include <gdk/gdk.h>
#include "gdkprivate.h"
guint gdk_debug_flags = 0;
......
......@@ -25,7 +25,7 @@
*/
#include <stdio.h>
#include "gdk.h"
#include <gdk/gdk.h>
#include "gdkprivate.h"
guint gdk_debug_flags = 0;
......
......@@ -31,9 +31,8 @@
# endif
#endif
#include "gdk.h"
#include "gdkprivate.h"
#include "gdki18n.h"
#include <gdk/gdk.h>
#include <gdk/gdki18n.h>
#include "gdkx.h"
/* If this variable is FALSE, it indicates that we should
......
......@@ -31,9 +31,8 @@
# endif
#endif
#include "gdk.h"
#include "gdkprivate.h"
#include "gdki18n.h"
#include <gdk/gdk.h>
#include <gdk/gdki18n.h>
#include "gdkx.h"
/* If this variable is FALSE, it indicates that we should
......
......@@ -26,7 +26,7 @@
#include "config.h"
#include "gdk.h"
#include <gdk/gdk.h>
#include "gdkprivate.h"
static void gdk_image_put_normal (GdkDrawable *drawable,
......
......@@ -26,7 +26,7 @@
#include "config.h"
#include "gdk.h"
#include <gdk/gdk.h>
#include "gdkprivate.h"
static void gdk_image_put_normal (GdkDrawable *drawable,
......
......@@ -31,10 +31,8 @@
#include <stdio.h>
#include <math.h>
#include "gdk.h"
#include <gdk/gdk.h>
#include "gdkx.h"
#include "gdkprivate.h"
#include "gdkinput.h"
#ifndef M_PI
......
......@@ -31,10 +31,8 @@
#include <stdio.h>
#include <math.h>
#include "gdk.h"
#include <gdk/gdk.h>
#include "gdkx.h"
#include "gdkprivate.h"
#include "gdkinput.h"
#ifndef M_PI
......
......@@ -33,12 +33,11 @@
#include <limits.h>
#include <io.h>
#include "gdk.h"
#include "gdkprivate.h"
#include "gdkinput.h"
#include <gdk/gdk.h>
#include <gdk/gdkkeysyms.h>
#include <gdk/gdki18n.h>
#include "gdkx.h"
#include "gdkkeysyms.h"
#include "gdki18n.h"
#include "gdkinput.h"
static void gdkx_XConvertCase (KeySym symbol,
KeySym *lower,
......@@ -2090,7 +2089,7 @@ gdk_keys_keyval_compare (const void *pkey, const void *pbase)
return (*(int *) pkey) - ((struct gdk_key *) pbase)->keyval;
}
const gchar*
gchar*
gdk_keyval_name (guint keyval)
{
struct gdk_key *found =
......
......@@ -31,7 +31,7 @@
#include <stdio.h>
#include <string.h>
#include "gdk.h"
#include <gdk/gdk.h>
#include "gdkprivate.h"
typedef struct
......
......@@ -31,7 +31,7 @@
#include <stdio.h>
#include <string.h>
#include "gdk.h"
#include <gdk/gdk.h>
#include "gdkprivate.h"
typedef struct
......
......@@ -27,7 +27,7 @@
#include "config.h"
#include <string.h>
#include "gdk.h"
#include <gdk/gdk.h>
#include "gdkprivate.h"
GdkAtom
......
......@@ -27,7 +27,7 @@
#include "config.h"
#include <string.h>
#include "gdk.h"
#include <gdk/gdk.h>
#include "gdkprivate.h"
GdkAtom
......
/* 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 Library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library 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-1999. 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.h"
void
gdk_rectangle_union (GdkRectangle *src1,
GdkRectangle *src2,
GdkRectangle *dest)
{
g_return_if_fail (src1 != NULL);
g_return_if_fail (src2 != NULL);
g_return_if_fail (dest != NULL);
dest->x = MIN (src1->x, src2->x);
dest->y = MIN (src1->y, src2->y);
dest->width = MAX (src1->x + src1->width, src2->x + src2->width) - dest->x;
dest->height = MAX (src1->y + src1->height, src2->y + src2->height) - dest->y;
}
gint
gdk_rectangle_intersect (GdkRectangle *src1,
GdkRectangle *src2,
GdkRectangle *dest)
{
GdkRectangle *temp;
gint src1_x2, src1_y2;
gint src2_x2, src2_y2;
gint return_val;
g_return_val_if_fail (src1 != NULL, FALSE);
g_return_val_if_fail (src2 != NULL, FALSE);
g_return_val_if_fail (dest != NULL, FALSE);
return_val = FALSE;
if (src2->x < src1->x)
{
temp = src1;
src1 = src2;
src2 = temp;
}
dest->x = src2->x;
src1_x2 = src1->x + src1->width;
src2_x2 = src2->x + src2->width;
if (src2->x < src1_x2)
{
if (src1_x2 < src2_x2)
dest->width = src1_x2 - dest->x;
else
dest->width = src2_x2 - dest->x;
if (src2->y < src1->y)
{
temp = src1;
src1 = src2;
src2 = temp;
}
dest->y = src2->y;
src1_y2 = src1->y + src1->height;
src2_y2 = src2->y + src2->height;
if (src2->y < src1_y2)
{
return_val = TRUE;
if (src1_y2 < src2_y2)
dest->height = src1_y2 - dest->y;
else
dest->height = src2_y2 - dest->y;
if (dest->height == 0)
return_val = FALSE;
if (dest->width == 0)
return_val = FALSE;
}
}
return return_val;
}
......@@ -26,7 +26,7 @@
#include "config.h"
#include "gdk.h"
#include <gdk/gdk.h>
#include "gdkprivate.h"
......
......@@ -26,7 +26,7 @@
#include "config.h"
#include "gdk.h"
#include <gdk/gdk.h>
#include "gdkprivate.h"
......
This diff is collapsed.
......@@ -28,9 +28,8 @@
#include <string.h>
#include "gdk.h"
#include <gdk/gdk.h>
#include "gdkx.h"
#include "gdkprivate.h"
/* We emulate the GDK_SELECTION window properties by storing
* it's data in a per-window hashtable.
......
......@@ -28,9 +28,8 @@
#include <string.h>
#include "gdk.h"
#include <gdk/gdk.h>
#include "gdkx.h"
#include "gdkprivate.h"
/* We emulate the GDK_SELECTION window properties by storing
* it's data in a per-window hashtable.
......
This diff is collapsed.
......@@ -26,8 +26,7 @@
#include "config.h"
#include "gdk.h"
#include "gdkprivate.h"
#include <gdk/gdk.h>
#include "gdkx.h"
static void gdk_visual_add (GdkVisual *visual);
......
......@@ -26,8 +26,7 @@
#include "config.h"
#include "gdk.h"
#include "gdkprivate.h"
#include <gdk/gdk.h>
#include "gdkx.h"
static void gdk_visual_add (GdkVisual *visual);
......
......@@ -28,7 +28,7 @@
#define __GDK_X_H__
#include <gdk/gdk.h>
#include <gdk/gdkprivate.h>
#include <gdkprivate.h>
#include <time.h>
#include <locale.h>
......
......@@ -26,9 +26,9 @@
#include "config.h"
#include "gdk.h"
#include "gdkprivate.h"
#include <stdio.h>
#include <gdk/gdk.h>
#include "gdkprivate.h"
static guint gdk_xid_hash (XID *xid);
static gint gdk_xid_compare (XID *a,
......
......@@ -27,11 +27,11 @@
#include "config.h"
#include "gdk.h"
#include "gdkprivate.h"
#include "gdkinput.h"
#include <stdlib.h>
#include <stdio.h>
#include <gdk/gdk.h>
#include "gdkprivate.h"
#include "gdkinput.h"
/* The Win API function AdjustWindowRect may return negative values
* resulting in obscured title bars. This helper function is coreccting it.
......
......@@ -27,11 +27,11 @@
#include "config.h"
#include "gdk.h"
#include "gdkprivate.h"
#include "gdkinput.h"
#include <stdlib.h>
#include <stdio.h>
#include <gdk/gdk.h>
#include "gdkprivate.h"
#include "gdkinput.h"
/* The Win API function AdjustWindowRect may return negative values
* resulting in obscured title bars. This helper function is coreccting it.
......
......@@ -28,7 +28,7 @@
#define __GDK_X_H__
#include <gdk/gdk.h>
#include <gdk/gdkprivate.h>
#include <gdkprivate.h>
#include <time.h>
#include <locale.h>
......
......@@ -26,9 +26,9 @@
#include "config.h"
#include "gdk.h"
#include "gdkprivate.h"
#include <stdio.h>
#include <gdk/gdk.h>
#include "gdkprivate.h"
static guint gdk_xid_hash (XID *xid);
static gint gdk_xid_compare (XID *a,
......
......@@ -75,6 +75,13 @@ gdk-$(GTK_VER).dll : $(gdk_OBJECTS) gdk.def gdk.res
.c.obj :
$(CC) $(CFLAGS) -GD -c -DGDK_COMPILATION -DG_LOG_DOMAIN=\"Gdk\" $<
gdkrgb.c : ..\gdkrgb.c
copy ..\gdkrgb.c .
gdkrectangle.c : ..\gdkrectangle.c
copy ..\gdkrectangle.c .
testgdk.exe : testgdk.obj gdk-$(GTK_VER).dll
$(CC) $(CFLAGS) testgdk.obj gdk-$(GTK_VER).lib $(GLIB)\glib-$(GLIB_VER).lib $(LDFLAGS)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment