summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog18
-rw-r--r--ChangeLog.pre-2-018
-rw-r--r--ChangeLog.pre-2-1018
-rw-r--r--ChangeLog.pre-2-218
-rw-r--r--ChangeLog.pre-2-418
-rw-r--r--ChangeLog.pre-2-618
-rw-r--r--ChangeLog.pre-2-818
-rw-r--r--config.h.win32.in4
-rw-r--r--gdk/win32/gdkgeometry-win32.c467
-rwxr-xr-xgtk/gtk.def68
-rw-r--r--gtk/gtkaccelmap.c9
-rw-r--r--gtk/gtkfilesel.c32
-rw-r--r--gtk/makefile.msc.in31
-rw-r--r--gtk/queryimmodules.c23
14 files changed, 481 insertions, 279 deletions
diff --git a/ChangeLog b/ChangeLog
index 66411c3dff..bf543e4c6b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+2001-11-18 Hans Breuer <hans@breuer.org>
+
+ * gtk/gdkaccelmap.c : make it compile with msvc: !HAVE_UNISTD_H;
+ no label without op, even if it's a no-op.
+
+ * gtk/gtk.def :
+ * gtk/makefile.msc.in : reflect marshaler split, some clean-up
+
+ * config.h.win32.in : remove definition of HAVE_DIRENT_H
+ * gtk/gtkfilesel.c : due to GDir (new in glib) DIR isn't
+ required anymore, replace it.
+ * gtk/queryimmodules.c : DIR -> GDir replacement, also
+ getcwd() -> g_get_current_dir()
+
+ * gdk/win32/gdkgeometry-win32.c : adapt to refactored gdkgeometry-x11.c
+ Even 'noisy laugh' scolling appears to work, though I still can't
+ claim to have fully understood what it is supposed to do ...
+
Sat Nov 17 21:07:46 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkenums.h: Include glib-object.h instead of
diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0
index 66411c3dff..bf543e4c6b 100644
--- a/ChangeLog.pre-2-0
+++ b/ChangeLog.pre-2-0
@@ -1,3 +1,21 @@
+2001-11-18 Hans Breuer <hans@breuer.org>
+
+ * gtk/gdkaccelmap.c : make it compile with msvc: !HAVE_UNISTD_H;
+ no label without op, even if it's a no-op.
+
+ * gtk/gtk.def :
+ * gtk/makefile.msc.in : reflect marshaler split, some clean-up
+
+ * config.h.win32.in : remove definition of HAVE_DIRENT_H
+ * gtk/gtkfilesel.c : due to GDir (new in glib) DIR isn't
+ required anymore, replace it.
+ * gtk/queryimmodules.c : DIR -> GDir replacement, also
+ getcwd() -> g_get_current_dir()
+
+ * gdk/win32/gdkgeometry-win32.c : adapt to refactored gdkgeometry-x11.c
+ Even 'noisy laugh' scolling appears to work, though I still can't
+ claim to have fully understood what it is supposed to do ...
+
Sat Nov 17 21:07:46 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkenums.h: Include glib-object.h instead of
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 66411c3dff..bf543e4c6b 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,21 @@
+2001-11-18 Hans Breuer <hans@breuer.org>
+
+ * gtk/gdkaccelmap.c : make it compile with msvc: !HAVE_UNISTD_H;
+ no label without op, even if it's a no-op.
+
+ * gtk/gtk.def :
+ * gtk/makefile.msc.in : reflect marshaler split, some clean-up
+
+ * config.h.win32.in : remove definition of HAVE_DIRENT_H
+ * gtk/gtkfilesel.c : due to GDir (new in glib) DIR isn't
+ required anymore, replace it.
+ * gtk/queryimmodules.c : DIR -> GDir replacement, also
+ getcwd() -> g_get_current_dir()
+
+ * gdk/win32/gdkgeometry-win32.c : adapt to refactored gdkgeometry-x11.c
+ Even 'noisy laugh' scolling appears to work, though I still can't
+ claim to have fully understood what it is supposed to do ...
+
Sat Nov 17 21:07:46 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkenums.h: Include glib-object.h instead of
diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2
index 66411c3dff..bf543e4c6b 100644
--- a/ChangeLog.pre-2-2
+++ b/ChangeLog.pre-2-2
@@ -1,3 +1,21 @@
+2001-11-18 Hans Breuer <hans@breuer.org>
+
+ * gtk/gdkaccelmap.c : make it compile with msvc: !HAVE_UNISTD_H;
+ no label without op, even if it's a no-op.
+
+ * gtk/gtk.def :
+ * gtk/makefile.msc.in : reflect marshaler split, some clean-up
+
+ * config.h.win32.in : remove definition of HAVE_DIRENT_H
+ * gtk/gtkfilesel.c : due to GDir (new in glib) DIR isn't
+ required anymore, replace it.
+ * gtk/queryimmodules.c : DIR -> GDir replacement, also
+ getcwd() -> g_get_current_dir()
+
+ * gdk/win32/gdkgeometry-win32.c : adapt to refactored gdkgeometry-x11.c
+ Even 'noisy laugh' scolling appears to work, though I still can't
+ claim to have fully understood what it is supposed to do ...
+
Sat Nov 17 21:07:46 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkenums.h: Include glib-object.h instead of
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index 66411c3dff..bf543e4c6b 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -1,3 +1,21 @@
+2001-11-18 Hans Breuer <hans@breuer.org>
+
+ * gtk/gdkaccelmap.c : make it compile with msvc: !HAVE_UNISTD_H;
+ no label without op, even if it's a no-op.
+
+ * gtk/gtk.def :
+ * gtk/makefile.msc.in : reflect marshaler split, some clean-up
+
+ * config.h.win32.in : remove definition of HAVE_DIRENT_H
+ * gtk/gtkfilesel.c : due to GDir (new in glib) DIR isn't
+ required anymore, replace it.
+ * gtk/queryimmodules.c : DIR -> GDir replacement, also
+ getcwd() -> g_get_current_dir()
+
+ * gdk/win32/gdkgeometry-win32.c : adapt to refactored gdkgeometry-x11.c
+ Even 'noisy laugh' scolling appears to work, though I still can't
+ claim to have fully understood what it is supposed to do ...
+
Sat Nov 17 21:07:46 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkenums.h: Include glib-object.h instead of
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index 66411c3dff..bf543e4c6b 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,21 @@
+2001-11-18 Hans Breuer <hans@breuer.org>
+
+ * gtk/gdkaccelmap.c : make it compile with msvc: !HAVE_UNISTD_H;
+ no label without op, even if it's a no-op.
+
+ * gtk/gtk.def :
+ * gtk/makefile.msc.in : reflect marshaler split, some clean-up
+
+ * config.h.win32.in : remove definition of HAVE_DIRENT_H
+ * gtk/gtkfilesel.c : due to GDir (new in glib) DIR isn't
+ required anymore, replace it.
+ * gtk/queryimmodules.c : DIR -> GDir replacement, also
+ getcwd() -> g_get_current_dir()
+
+ * gdk/win32/gdkgeometry-win32.c : adapt to refactored gdkgeometry-x11.c
+ Even 'noisy laugh' scolling appears to work, though I still can't
+ claim to have fully understood what it is supposed to do ...
+
Sat Nov 17 21:07:46 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkenums.h: Include glib-object.h instead of
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index 66411c3dff..bf543e4c6b 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,21 @@
+2001-11-18 Hans Breuer <hans@breuer.org>
+
+ * gtk/gdkaccelmap.c : make it compile with msvc: !HAVE_UNISTD_H;
+ no label without op, even if it's a no-op.
+
+ * gtk/gtk.def :
+ * gtk/makefile.msc.in : reflect marshaler split, some clean-up
+
+ * config.h.win32.in : remove definition of HAVE_DIRENT_H
+ * gtk/gtkfilesel.c : due to GDir (new in glib) DIR isn't
+ required anymore, replace it.
+ * gtk/queryimmodules.c : DIR -> GDir replacement, also
+ getcwd() -> g_get_current_dir()
+
+ * gdk/win32/gdkgeometry-win32.c : adapt to refactored gdkgeometry-x11.c
+ Even 'noisy laugh' scolling appears to work, though I still can't
+ claim to have fully understood what it is supposed to do ...
+
Sat Nov 17 21:07:46 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkenums.h: Include glib-object.h instead of
diff --git a/config.h.win32.in b/config.h.win32.in
index f05267e3d7..0181ecb411 100644
--- a/config.h.win32.in
+++ b/config.h.win32.in
@@ -22,7 +22,7 @@
/* #undef HAVE_CATGETS */
/* #undef HAVE_DIMM_H */
-#define HAVE_DIRENT_H 1 /* MSVC users: include it from build/win32/dirent */
+/* #undef HAVE_DIRENT_H */
#define HAVE_GETTEXT 1
/* #undef HAVE_IPC_H */
/* #undef HAVE_LC_MESSAGES */
@@ -115,7 +115,7 @@
/* #undef HAVE_DIMM_H */
/* Define if you have the <dirent.h> header file, and it defines `DIR'. */
-#define HAVE_DIRENT_H 1
+/* #undef HAVE_DIRENT_H */
/* Define if you have the <dlfcn.h> header file. */
/* #undef HAVE_DLFCN_H */
diff --git a/gdk/win32/gdkgeometry-win32.c b/gdk/win32/gdkgeometry-win32.c
index c2b4d53756..1ed7b343ec 100644
--- a/gdk/win32/gdkgeometry-win32.c
+++ b/gdk/win32/gdkgeometry-win32.c
@@ -26,6 +26,7 @@
* The X11 version by Owen Taylor <otaylor@redhat.com>
* Copyright Red Hat, Inc. 2000
* Win32 hack by Tor Lillqvist <tml@iki.fi>
+ * and Hans Breuer <hans@breuer.org>
*/
#include "gdk.h" /* For gdk_rectangle_intersect */
@@ -68,11 +69,11 @@ struct _GdkWindowParentPos
GdkRectangle clip_rect;
};
-static void gdk_window_compute_position (GdkWindowImplWin32 *window,
- GdkWindowParentPos *parent_pos,
- GdkWin32PositionInfo *info);
-static void gdk_window_compute_parent_pos (GdkWindowImplWin32 *window,
- GdkWindowParentPos *parent_pos);
+static void gdk_window_compute_position (GdkWindowImplWin32 *window,
+ GdkWindowParentPos *parent_pos,
+ GdkWin32PositionInfo *info);
+static void gdk_window_compute_parent_pos (GdkWindowImplWin32 *window,
+ GdkWindowParentPos *parent_pos);
static void gdk_window_premove (GdkWindow *window,
GdkWindowParentPos *parent_pos);
static void gdk_window_postmove (GdkWindow *window,
@@ -105,30 +106,196 @@ _gdk_window_init_position (GdkWindow *window)
{
GdkWindowParentPos parent_pos;
GdkWindowImplWin32 *impl;
-
+
g_return_if_fail (GDK_IS_WINDOW (window));
-
+
impl = GDK_WINDOW_IMPL_WIN32 (GDK_WINDOW_OBJECT (window)->impl);
-
+
gdk_window_compute_parent_pos (impl, &parent_pos);
gdk_window_compute_position (impl, &parent_pos, &impl->position_info);
}
+static void
+gdk_window_copy_area_scroll (GdkWindow *window,
+ GdkRectangle *dest_rect,
+ gint dx,
+ gint dy)
+{
+ GdkWindowObject *obj = GDK_WINDOW_OBJECT (window);
+ GList *tmp_list;
+
+ if (dest_rect->width > 0 && dest_rect->height > 0)
+ {
+ RECT clipRect;
+ clipRect.left = dest_rect->x - dx;
+ clipRect.top = dest_rect->y - dy;
+ clipRect.right = clipRect.left + dest_rect->width;
+ clipRect.bottom = clipRect.top + dest_rect->height;
+
+ gdk_window_queue_translation (window, dx, dy);
+
+ if (!ScrollWindowEx (GDK_WINDOW_HWND (window),
+ dx, dy, /* in: scroll offsets */
+ NULL, /* in: scroll rect, NULL == entire client area */
+ &clipRect, /* in: restrict to, XXX: really want this ?? */
+ NULL, /* out: update region */
+ NULL, /* out: update rect */
+ SW_INVALIDATE))
+ WIN32_API_FAILED ("ScrollWindowEx");
+ }
+
+ tmp_list = obj->children;
+ while (tmp_list)
+ {
+ GdkWindow *child = GDK_WINDOW (tmp_list->data);
+ GdkWindowObject *child_obj = GDK_WINDOW_OBJECT (child);
+
+ gdk_window_move (child, child_obj->x + dx, child_obj->y + dy);
+
+ tmp_list = tmp_list->next;
+ }
+}
+
+static void
+compute_intermediate_position (GdkWin32PositionInfo *position_info,
+ GdkWin32PositionInfo *new_info,
+ gint d_xoffset,
+ gint d_yoffset,
+ GdkRectangle *new_position)
+{
+ gint new_x0, new_x1, new_y0, new_y1;
+
+ /* Wrap d_xoffset, d_yoffset into [-32768,32767] range. For the
+ * purposes of subwindow movement, it doesn't matter if we are
+ * off by a factor of 65536, and if we don't do this range
+ * reduction, we'll end up with invalid widths.
+ */
+ d_xoffset = (gint16)d_xoffset;
+ d_yoffset = (gint16)d_yoffset;
+
+ if (d_xoffset < 0)
+ {
+ new_x0 = position_info->x + d_xoffset;
+ new_x1 = position_info->x + position_info->width;
+ }
+ else
+ {
+ new_x0 = position_info->x;
+ new_x1 = position_info->x + new_info->width + d_xoffset;
+ }
+
+ new_position->x = new_x0;
+ new_position->width = new_x1 - new_x0;
+
+ if (d_yoffset < 0)
+ {
+ new_y0 = position_info->y + d_yoffset;
+ new_y1 = position_info->y + position_info->height;
+ }
+ else
+ {
+ new_y0 = position_info->y;
+ new_y1 = position_info->y + new_info->height + d_yoffset;
+ }
+
+ new_position->y = new_y0;
+ new_position->height = new_y1 - new_y0;
+}
+
+static void
+gdk_window_guffaw_scroll (GdkWindow *window,
+ gint dx,
+ gint dy)
+{
+ GdkWindowObject *obj = GDK_WINDOW_OBJECT (window);
+ GdkWindowImplWin32 *impl = GDK_WINDOW_IMPL_WIN32 (obj->impl);
+
+ gint d_xoffset = -dx;
+ gint d_yoffset = -dy;
+ GdkRectangle new_position;
+ GdkWin32PositionInfo new_info;
+ GdkWindowParentPos parent_pos;
+ GList *tmp_list;
+
+ gdk_window_compute_parent_pos (impl, &parent_pos);
+ gdk_window_compute_position (impl, &parent_pos, &new_info);
+
+ parent_pos.x += obj->x;
+ parent_pos.y += obj->y;
+ parent_pos.win32_x += new_info.x;
+ parent_pos.win32_y += new_info.y;
+ parent_pos.clip_rect = new_info.clip_rect;
+
+ gdk_window_tmp_unset_bg (window);
+
+ if (d_xoffset < 0 || d_yoffset < 0)
+ gdk_window_queue_translation (window, MIN (d_xoffset, 0), MIN (d_yoffset, 0));
+
+ gdk_window_set_static_gravities (window, TRUE);
+
+ compute_intermediate_position (&impl->position_info, &new_info, d_xoffset, d_yoffset,
+ &new_position);
+
+ /* XXX: this is only translating the X11 code. Don't know why the
+ * window movement needs to be done in three steps there, and here ??
+ */
+ if (!SetWindowPos (GDK_WINDOW_HWND (window), NULL,
+ new_position.x, new_position.y,
+ new_position.width, new_position.height,
+ SWP_NOACTIVATE | SWP_NOZORDER))
+ WIN32_API_FAILED ("SetWindowPos");
+
+ tmp_list = obj->children;
+ while (tmp_list)
+ {
+ GDK_WINDOW_OBJECT(tmp_list->data)->x -= d_xoffset;
+ GDK_WINDOW_OBJECT(tmp_list->data)->y -= d_yoffset;
+
+ gdk_window_premove (tmp_list->data, &parent_pos);
+ tmp_list = tmp_list->next;
+ }
+
+ if (!SetWindowPos (GDK_WINDOW_HWND (window), NULL,
+ new_position.x - d_xoffset, new_position.y - d_yoffset, 1, 1,
+ SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOSIZE))
+ WIN32_API_FAILED ("SetWindowPos");
+
+ if (d_xoffset > 0 || d_yoffset > 0)
+ gdk_window_queue_translation (window, MAX (d_xoffset, 0), MAX (d_yoffset, 0));
+
+ if (!SetWindowPos (GDK_WINDOW_HWND (window), NULL,
+ impl->position_info.x, impl->position_info.y,
+ impl->position_info.width, impl->position_info.height,
+ SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOSIZE))
+ WIN32_API_FAILED ("SetWindowPos");
+
+ if (impl->position_info.no_bg)
+ gdk_window_tmp_reset_bg (window);
+
+ impl->position_info = new_info;
+
+ tmp_list = obj->children;
+ while (tmp_list)
+ {
+ gdk_window_postmove (tmp_list->data, &parent_pos);
+ tmp_list = tmp_list->next;
+ }
+}
+
/**
* gdk_window_scroll:
* @window: a #GdkWindow
* @dx: Amount to scroll in the X direction
* @dy: Amount to scroll in the Y direction
*
- * Scroll the contents of its window, both pixels and children, by
- * the given amount. Portions of the window that the scroll operation
- * brings in from offscreen areas are invalidated. The invalidated
- * region may be bigger than what would strictly be necessary.
- * (For X11, a minimum area will be invalidated if the window has
- * no subwindows, or if the edges of the window's parent do not extend
- * beyond the edges of the window. In other cases, a multi-step process
- * is used to scroll the window which may produce temporary visual
- * artifacts and unnecessary invalidations.)
+ * Scroll the contents of @window, both pixels and children, by the given
+ * amount. @window itself does not move. Portions of the window that the scroll
+ * operation brings in from offscreen areas are invalidated. The invalidated
+ * region may be bigger than what would strictly be necessary. (For Win32, a
+ * minimum area will be invalidated if the window has no subwindows, or if the
+ * edges of the window's parent do not extend beyond the edges of the window. In
+ * other cases, a multi-step process is used to scroll the window which may
+ * produce temporary visual artifacts and unnecessary invalidations.)
**/
void
gdk_window_scroll (GdkWindow *window,
@@ -136,125 +303,60 @@ gdk_window_scroll (GdkWindow *window,
gint dy)
{
gboolean can_guffaw_scroll = FALSE;
+ GdkRegion *invalidate_region;
GdkWindowImplWin32 *impl;
GdkWindowObject *obj;
+ GdkRectangle dest_rect;
g_return_if_fail (GDK_IS_WINDOW (window));
- obj = GDK_WINDOW_OBJECT (window);
- impl = GDK_WINDOW_IMPL_WIN32 (obj->impl);
-
if (GDK_WINDOW_DESTROYED (window))
return;
+
+ obj = GDK_WINDOW_OBJECT (window);
+ impl = GDK_WINDOW_IMPL_WIN32 (obj->impl);
+ if (dx == 0 && dy == 0)
+ return;
+
/* Move the current invalid region */
if (obj->update_area)
gdk_region_offset (obj->update_area, dx, dy);
+
+ invalidate_region = gdk_region_rectangle (&impl->position_info.clip_rect);
+
+ dest_rect = impl->position_info.clip_rect;
+ dest_rect.x += dx;
+ dest_rect.y += dy;
+ gdk_rectangle_intersect (&dest_rect, &impl->position_info.clip_rect, &dest_rect);
+
+ if (dest_rect.width > 0 && dest_rect.height > 0)
+ {
+ GdkRegion *tmp_region;
+
+ tmp_region = gdk_region_rectangle (&dest_rect);
+ gdk_region_subtract (invalidate_region, tmp_region);
+ gdk_region_destroy (tmp_region);
+ }
+
+ gdk_window_invalidate_region (window, invalidate_region, TRUE);
+ gdk_region_destroy (invalidate_region);
/* We can guffaw scroll if we are a child window, and the parent
- * does not extend beyond our edges.
+ * does not extend beyond our edges. Otherwise, we use XCopyArea, then
+ * move any children later
*/
-
if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_CHILD)
{
GdkWindowImplWin32 *parent_impl = GDK_WINDOW_IMPL_WIN32 (obj->parent->impl);
- can_guffaw_scroll = (obj->x <= 0 &&
- obj->y <= 0 &&
- obj->x + impl->width >= parent_impl->width &&
- obj->y + impl->height >= parent_impl->height);
+ can_guffaw_scroll = ((dx == 0 || (obj->x <= 0 && obj->x + impl->width >= parent_impl->width)) &&
+ (dy == 0 || (obj->y <= 0 && obj->y + impl->height >= parent_impl->height)));
}
if (!obj->children || !can_guffaw_scroll)
- {
-#if 0 /* this may be the better way to do it, though there seems to
- be an offset error in it */
- GList *tmp_list = obj->children;
- int num_windows = g_list_length (tmp_list) + 1;
- HDWP hWinPosInfo = BeginDeferWindowPos (num_windows);
-
- GDK_NOTE (MISC,
- g_print ("gdk_window_scroll (%x, %d, %d), %d childs\n",
- GDK_WINDOW_HWND (window), dx, dy, num_windows -1));
- if (!hWinPosInfo)
- WIN32_API_FAILED ("BeginDeferWindowPos");
- else
- {
-
- hWinPosInfo =
- DeferWindowPos (hWinPosInfo, /* may change on return */
- GDK_WINDOW_HWND (window),
- NULL, /* placement-order handle, ignored */
- obj->x + dx, obj->y + dy, /* new pos */
- 30, 20, /* new size, ignored */
- SWP_NOSIZE | SWP_NOZORDER);
-
- while (tmp_list)
- {
- GdkWindowObject * child = GDK_WINDOW_OBJECT (tmp_list->data);
-
- hWinPosInfo =
- DeferWindowPos (hWinPosInfo, /* may change on return */
- GDK_WINDOW_HWND (child),
- NULL, /* placement-order handle, ignored */
- child->x + dx, child->y + dy, /* new pos */
- 30, 20, /* new size, ignored */
- SWP_NOSIZE | SWP_NOZORDER);
-
- tmp_list = tmp_list->next;
- }
-
- if (!EndDeferWindowPos (hWinPosInfo))
- WIN32_API_FAILED ("EndDeferWindowPos");
- }
-#else
- /* Use ScrollWindowEx, then move any children later
- */
- GList *tmp_list;
- GdkRegion *invalidate_region;
- GdkRectangle dest_rect;
-
- invalidate_region = gdk_region_rectangle (&impl->position_info.clip_rect);
-
- dest_rect = impl->position_info.clip_rect;
- dest_rect.x += dx;
- dest_rect.y += dy;
- gdk_rectangle_intersect (&dest_rect, &impl->position_info.clip_rect, &dest_rect);
-
- if (dest_rect.width > 0 && dest_rect.height > 0)
- {
- GdkRegion *tmp_region;
-
- tmp_region = gdk_region_rectangle (&dest_rect);
- gdk_region_subtract (invalidate_region, tmp_region);
- gdk_region_destroy (tmp_region);
-
- gdk_window_queue_translation (window, dx, dy);
-
- if (ScrollWindowEx (GDK_WINDOW_HWND (window), dx, dy,
- NULL, NULL, NULL, NULL, 0) == ERROR)
- WIN32_API_FAILED ("ScrollWindowEx");
- }
-
- gdk_window_invalidate_region (window, invalidate_region, TRUE);
- gdk_region_destroy (invalidate_region);
-
- tmp_list = obj->children;
- while (tmp_list)
- {
- GdkWindow * child = GDK_WINDOW (tmp_list->data);
-
- gdk_window_move (child, obj->x + dx, obj->y + dy);
-
- tmp_list = tmp_list->next;
- }
-#endif
- }
+ gdk_window_copy_area_scroll (window, &dest_rect, dx, dy);
else
- {
- /* Guffaw scroll
- */
- g_warning ("gdk_window_scroll(): guffaw scrolling not yet implemented");
- }
+ gdk_window_guffaw_scroll (window, dx, dy);
}
void
@@ -279,7 +381,7 @@ _gdk_window_move_resize_child (GdkWindow *window,
obj = GDK_WINDOW_OBJECT (window);
impl = GDK_WINDOW_IMPL_WIN32 (obj->impl);
-
+
dx = x - obj->x;
dy = y - obj->y;
@@ -310,40 +412,22 @@ _gdk_window_move_resize_child (GdkWindow *window,
if (d_xoffset != 0 || d_yoffset != 0)
{
- gint new_x0, new_y0, new_x1, new_y1;
+ GdkRectangle new_position;
gdk_window_set_static_gravities (window, TRUE);
if (d_xoffset < 0 || d_yoffset < 0)
gdk_window_queue_translation (window, MIN (d_xoffset, 0), MIN (d_yoffset, 0));
-
- if (d_xoffset < 0)
- {
- new_x0 = impl->position_info.x + d_xoffset;
- new_x1 = impl->position_info.x + impl->position_info.width;
- }
- else
- {
- new_x0 = impl->position_info.x;
- new_x1 = impl->position_info.x + new_info.width + d_xoffset;
- }
- if (d_yoffset < 0)
- {
- new_y0 = impl->position_info.y + d_yoffset;
- new_y1 = impl->position_info.y + impl->position_info.height;
- }
- else
- {
- new_y0 = impl->position_info.y;
- new_y1 = impl->position_info.y + new_info.height + d_yoffset;
- }
+ compute_intermediate_position (&impl->position_info, &new_info, d_xoffset, d_yoffset,
+ &new_position);
if (!SetWindowPos (GDK_WINDOW_HWND (window), NULL,
- new_x0, new_y0, new_x1 - new_x0, new_y1 - new_y0,
- SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOREDRAW))
- WIN32_API_FAILED ("SetWindowPos");
-
+ new_position.x, new_position.y,
+ new_position.width, new_position.height,
+ SWP_NOACTIVATE | SWP_NOZORDER))
+ WIN32_API_FAILED ("SetWindowPos");
+
tmp_list = obj->children;
while (tmp_list)
{
@@ -352,24 +436,18 @@ _gdk_window_move_resize_child (GdkWindow *window,
}
if (!SetWindowPos (GDK_WINDOW_HWND (window), NULL,
- new_x0 + dx, new_y0 + dy, 0, 0,
- SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOSIZE | SWP_NOREDRAW))
- WIN32_API_FAILED ("SetWindowPos");
+ new_position.x + dx, new_position.y + dy, 0, 0,
+ SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOSIZE | SWP_NOREDRAW))
+ WIN32_API_FAILED ("SetWindowPos");
if (d_xoffset > 0 || d_yoffset > 0)
gdk_window_queue_translation (window, MAX (d_xoffset, 0), MAX (d_yoffset, 0));
-
- /* FIXME:
- */
- if (new_info.x + new_info.width > SIZE_LIMIT)
- new_info.width = SIZE_LIMIT - new_info.x;
- if (new_info.y + new_info.height > SIZE_LIMIT)
- new_info.height = SIZE_LIMIT - new_info.y;
-
+
if (!SetWindowPos (GDK_WINDOW_HWND (window), NULL,
- new_info.x, new_info.y, new_info.width, new_info.height,
- SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOREDRAW))
- WIN32_API_FAILED ("SetWindowPos");
+ new_info.x, new_info.y,
+ new_info.width, new_info.height,
+ SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOREDRAW))
+ WIN32_API_FAILED ("SetWindowPos");
if (impl->position_info.no_bg)
gdk_window_tmp_reset_bg (window);
@@ -402,10 +480,11 @@ _gdk_window_move_resize_child (GdkWindow *window,
}
if (!SetWindowPos (GDK_WINDOW_HWND (window), NULL,
- new_info.x, new_info.y, new_info.width, new_info.height,
- SWP_NOACTIVATE | SWP_NOZORDER |
- (is_resize ? 0 : SWP_NOSIZE)))
- WIN32_API_FAILED ("SetWindowPos");
+ new_info.x, new_info.y,
+ new_info.width, new_info.height,
+ SWP_NOACTIVATE | SWP_NOZORDER |
+ (is_resize ? 0 : SWP_NOSIZE)))
+ WIN32_API_FAILED ("SetWindowPos");
tmp_list = obj->children;
while (tmp_list)
@@ -426,17 +505,17 @@ _gdk_window_move_resize_child (GdkWindow *window,
static void
gdk_window_compute_position (GdkWindowImplWin32 *window,
- GdkWindowParentPos *parent_pos,
- GdkWin32PositionInfo *info)
+ GdkWindowParentPos *parent_pos,
+ GdkWin32PositionInfo *info)
{
GdkWindowObject *wrapper;
int parent_x_offset;
int parent_y_offset;
-
+
g_return_if_fail (GDK_IS_WINDOW_IMPL_WIN32 (window));
wrapper = GDK_WINDOW_OBJECT (GDK_DRAWABLE_IMPL_WIN32 (window)->wrapper);
-
+
info->big = FALSE;
if (window->width <= SIZE_LIMIT)
@@ -523,7 +602,7 @@ gdk_window_compute_position (GdkWindowImplWin32 *window,
}
static void
-gdk_window_compute_parent_pos (GdkWindowImplWin32 *window,
+gdk_window_compute_parent_pos (GdkWindowImplWin32 *window,
GdkWindowParentPos *parent_pos)
{
GdkWindowObject *wrapper;
@@ -592,7 +671,7 @@ gdk_window_premove (GdkWindow *window,
GList *tmp_list;
gint d_xoffset, d_yoffset;
GdkWindowParentPos this_pos;
-
+
obj = (GdkWindowObject *) window;
impl = GDK_WINDOW_IMPL_WIN32 (obj->impl);
@@ -614,37 +693,19 @@ gdk_window_premove (GdkWindow *window,
if (d_xoffset != 0 || d_yoffset != 0)
{
- gint new_x0, new_y0, new_x1, new_y1;
+ GdkRectangle new_position;
if (d_xoffset < 0 || d_yoffset < 0)
gdk_window_queue_translation (window, MIN (d_xoffset, 0), MIN (d_yoffset, 0));
-
- if (d_xoffset < 0)
- {
- new_x0 = impl->position_info.x + d_xoffset;
- new_x1 = impl->position_info.x + impl->position_info.width;
- }
- else
- {
- new_x0 = impl->position_info.x;
- new_x1 = impl->position_info.x + new_info.width + d_xoffset;
- }
- if (d_yoffset < 0)
- {
- new_y0 = impl->position_info.y + d_yoffset;
- new_y1 = impl->position_info.y + impl->position_info.height;
- }
- else
- {
- new_y0 = impl->position_info.y;
- new_y1 = impl->position_info.y + new_info.height + d_yoffset;
- }
+ compute_intermediate_position (&impl->position_info, &new_info, d_xoffset, d_yoffset,
+ &new_position);
if (!SetWindowPos (GDK_WINDOW_HWND (window), NULL,
- new_x0, new_y0, new_x1 - new_x0, new_y1 - new_y0,
+ new_position.x, new_position.y,
+ new_position.width, new_position.height,
SWP_NOREDRAW | SWP_NOZORDER | SWP_NOACTIVATE))
- WIN32_API_FAILED ("SetWindowPos");
+ WIN32_API_FAILED ("SetWindowPos");
}
tmp_list = obj->children;
@@ -665,7 +726,7 @@ gdk_window_postmove (GdkWindow *window,
GList *tmp_list;
gint d_xoffset, d_yoffset;
GdkWindowParentPos this_pos;
-
+
obj = (GdkWindowObject *) window;
impl = GDK_WINDOW_IMPL_WIN32 (obj->impl);
@@ -686,9 +747,10 @@ gdk_window_postmove (GdkWindow *window,
gdk_window_queue_translation (window, MAX (d_xoffset, 0), MAX (d_yoffset, 0));
if (!SetWindowPos (GDK_WINDOW_HWND (window), NULL,
- new_info.x, new_info.y, new_info.width, new_info.height,
- SWP_NOREDRAW | SWP_NOZORDER | SWP_NOACTIVATE))
- WIN32_API_FAILED ("SetWindowPos");
+ new_info.x, new_info.y,
+ new_info.width, new_info.height,
+ SWP_NOREDRAW | SWP_NOZORDER | SWP_NOACTIVATE))
+ WIN32_API_FAILED ("SetWindowPos");
}
if (!impl->position_info.mapped && new_info.mapped && GDK_WINDOW_IS_MAPPED (obj))
@@ -781,13 +843,13 @@ _gdk_window_process_expose (GdkWindow *window,
GdkRegion *invalidate_region = gdk_region_rectangle (area);
GdkRegion *clip_region;
GSList *tmp_list = translate_queue;
-
+
impl = GDK_WINDOW_IMPL_WIN32 (GDK_WINDOW_OBJECT (window)->impl);
GDK_NOTE (EVENTS, g_print ("_gdk_window_process_expose %#x %ld %dx%d@+%d+%d\n",
(guint) GDK_WINDOW_HWND (window), serial,
area->width, area->height, area->x, area->y));
-
+
while (tmp_list)
{
GdkWindowQueueItem *item = tmp_list->data;
@@ -823,7 +885,7 @@ _gdk_window_process_expose (GdkWindow *window,
if (!gdk_region_empty (invalidate_region))
gdk_window_invalidate_region (window, invalidate_region, FALSE);
-
+
gdk_region_destroy (invalidate_region);
gdk_region_destroy (clip_region);
}
@@ -872,15 +934,13 @@ gdk_window_tmp_reset_bg (GdkWindow *window)
}
static void
-gdk_window_clip_changed (GdkWindow *window,
- GdkRectangle *old_clip,
- GdkRectangle *new_clip)
+gdk_window_clip_changed (GdkWindow *window, GdkRectangle *old_clip, GdkRectangle *new_clip)
{
GdkWindowImplWin32 *impl;
GdkWindowObject *obj;
GdkRegion *old_clip_region;
GdkRegion *new_clip_region;
-
+
if (((GdkWindowObject *)window)->input_only)
return;
@@ -890,6 +950,11 @@ gdk_window_clip_changed (GdkWindow *window,
old_clip_region = gdk_region_rectangle (old_clip);
new_clip_region = gdk_region_rectangle (new_clip);
+ /* We need to update this here because gdk_window_invalidate_region makes
+ * use if it (through gdk_drawable_get_visible_region
+ */
+ impl->position_info.clip_rect = *new_clip;
+
/* Trim invalid region of window to new clip rectangle
*/
if (obj->update_area)
diff --git a/gtk/gtk.def b/gtk/gtk.def
index 36a729a2b4..08ef824b46 100755
--- a/gtk/gtk.def
+++ b/gtk/gtk.def
@@ -89,11 +89,17 @@ EXPORTS
gtk_accel_group_connect
gtk_accel_group_disconnect
+ gtk_accel_group_find
+ gtk_accel_group_from_accel_closure
gtk_accel_group_get_type
gtk_accel_group_lock
gtk_accel_group_new
+ gtk_accel_group_query
gtk_accel_group_unlock
gtk_accel_groups_activate
+ gtk_accel_groups_disconnect_closure
+ gtk_accel_groups_from_acceleratable
+ gtk_accel_label_get_accel_widget
gtk_accel_label_get_accel_width
gtk_accel_label_get_type
gtk_accel_label_new
@@ -105,13 +111,14 @@ EXPORTS
gtk_accel_map_add_notifer
gtk_accel_map_change_entry
gtk_accel_map_foreach
+ gtk_accel_map_foreach_unfiltered
gtk_accel_map_load
gtk_accel_map_load_fd
gtk_accel_map_load_scanner
- gtk_accel_map_save
- gtk_accel_map_save_fd
gtk_accel_map_lookup_entry
gtk_accel_map_remove_notifer
+ gtk_accel_map_save
+ gtk_accel_map_save_fd
gtk_accelerator_get_default_mod_mask
gtk_accelerator_name
gtk_accelerator_parse
@@ -873,6 +880,7 @@ EXPORTS
gtk_list_store_prepend
gtk_list_store_remove
gtk_list_store_set
+ gtk_list_store_set_column_types
gtk_list_store_set_valist
gtk_list_store_set_value
gtk_list_toggle_add_mode
@@ -889,51 +897,31 @@ EXPORTS
gtk_main_level
gtk_main_quit
gtk_major_version
- gtk_marshal_BOOLEAN__BOOLEAN
- gtk_marshal_BOOLEAN__BOXED
- gtk_marshal_BOOLEAN__BOXED_BOXED
- gtk_marshal_BOOLEAN__ENUM
- gtk_marshal_BOOLEAN__INT_INT
- gtk_marshal_BOOLEAN__OBJECT_BOXED_BOXED
- gtk_marshal_BOOLEAN__OBJECT_INT_INT_UINT
- gtk_marshal_BOOLEAN__OBJECT_STRING_STRING_BOXED
+ gtk_marshal_BOOLEAN__POINTER
+ gtk_marshal_BOOLEAN__POINTER_INT_INT
+ gtk_marshal_BOOLEAN__POINTER_INT_INT_UINT
+ gtk_marshal_BOOLEAN__POINTER_POINTER_INT_INT
+ gtk_marshal_BOOLEAN__POINTER_STRING_STRING_POINTER
gtk_marshal_BOOLEAN__VOID
gtk_marshal_ENUM__ENUM
gtk_marshal_INT__POINTER
- gtk_marshal_STRING__DOUBLE
- gtk_marshal_VOID__BOOLEAN_BOOLEAN_BOOLEAN
- gtk_marshal_VOID__BOXED_BOXED
- gtk_marshal_VOID__BOXED_BOXED_POINTER
- gtk_marshal_VOID__BOXED_OBJECT
- gtk_marshal_VOID__BOXED_POINTER
- gtk_marshal_VOID__BOXED_STRING_INT
- gtk_marshal_VOID__BOXED_UINT
- gtk_marshal_VOID__BOXED_UINT_FLAGS
- gtk_marshal_VOID__BOXED_UINT_UINT
- gtk_marshal_VOID__ENUM_ENUM
+ gtk_marshal_INT__POINTER_CHAR_CHAR
gtk_marshal_VOID__ENUM_FLOAT
gtk_marshal_VOID__ENUM_FLOAT_BOOLEAN
- gtk_marshal_VOID__ENUM_INT
- gtk_marshal_VOID__ENUM_INT_BOOLEAN
gtk_marshal_VOID__INT_INT
- gtk_marshal_VOID__INT_INT_BOXED
- gtk_marshal_VOID__INT_INT_INT
- gtk_marshal_VOID__OBJECT_BOOLEAN
- gtk_marshal_VOID__OBJECT_BOXED_BOXED
- gtk_marshal_VOID__OBJECT_BOXED_UINT_UINT
- gtk_marshal_VOID__OBJECT_INT_INT
- gtk_marshal_VOID__OBJECT_INT_INT_BOXED_UINT_UINT
- gtk_marshal_VOID__OBJECT_OBJECT
- gtk_marshal_VOID__OBJECT_STRING_STRING
- gtk_marshal_VOID__OBJECT_UINT
- gtk_marshal_VOID__OBJECT_UINT_FLAGS
+ gtk_marshal_VOID__INT_INT_POINTER
gtk_marshal_VOID__POINTER_INT
+ gtk_marshal_VOID__POINTER_INT_INT_POINTER_UINT_UINT
+ gtk_marshal_VOID__POINTER_POINTER
gtk_marshal_VOID__POINTER_POINTER_POINTER
+ gtk_marshal_VOID__POINTER_POINTER_UINT_UINT
+ gtk_marshal_VOID__POINTER_STRING_STRING
gtk_marshal_VOID__POINTER_UINT
+ gtk_marshal_VOID__POINTER_UINT_ENUM
+ gtk_marshal_VOID__POINTER_UINT_UINT
gtk_marshal_VOID__STRING_INT_POINTER
- gtk_marshal_VOID__STRING_STRING
- gtk_marshal_VOID__UINT_BOXED_UINT_FLAGS_FLAGS
- gtk_marshal_VOID__UINT_OBJECT_UINT_FLAGS_FLAGS
+ gtk_marshal_VOID__UINT_POINTER_UINT_ENUM_ENUM_POINTER
+ gtk_marshal_VOID__UINT_POINTER_UINT_UINT_ENUM
gtk_marshal_VOID__UINT_STRING
gtk_menu_attach_to_widget
gtk_menu_bar_get_type
@@ -1711,6 +1699,7 @@ EXPORTS
gtk_tree_drag_source_drag_data_delete
gtk_tree_drag_source_drag_data_get
gtk_tree_drag_source_get_type
+ gtk_tree_drag_source_row_draggable
gtk_tree_get_row_drag_data
gtk_tree_get_type
gtk_tree_insert
@@ -1831,6 +1820,7 @@ EXPORTS
gtk_tree_store_prepend
gtk_tree_store_remove
gtk_tree_store_set
+ gtk_tree_store_set_column_types
gtk_tree_store_set_valist
gtk_tree_store_set_value
gtk_tree_unselect_child
@@ -1888,11 +1878,12 @@ EXPORTS
gtk_tree_view_column_set_widget
gtk_tree_view_columns_autosize
gtk_tree_view_create_row_drag_icon
- gtk_tree_view_enable_model_drag_source
gtk_tree_view_enable_model_drag_dest
+ gtk_tree_view_enable_model_drag_source
gtk_tree_view_expand_all
gtk_tree_view_expand_row
gtk_tree_view_get_background_area
+ gtk_tree_view_get_bin_window
gtk_tree_view_get_cell_area
gtk_tree_view_get_column
gtk_tree_view_get_columns
@@ -2071,6 +2062,7 @@ EXPORTS
gtk_widget_set_name
gtk_widget_set_parent
gtk_widget_set_parent_window
+ gtk_widget_set_redraw_on_allocate
gtk_widget_set_scroll_adjustments
gtk_widget_set_sensitive
gtk_widget_set_size_request
diff --git a/gtk/gtkaccelmap.c b/gtk/gtkaccelmap.c
index 24dca7d5c3..d99e01aacb 100644
--- a/gtk/gtkaccelmap.c
+++ b/gtk/gtkaccelmap.c
@@ -16,13 +16,21 @@
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
+
+#include "config.h"
+
#include "gtkaccelmap.h"
#include "gtkwindow.h" /* in lack of GtkAcceleratable */
#include <string.h>
#include <fcntl.h>
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
+#ifdef G_OS_WIN32
+#include <io.h>
+#endif
#include <errno.h>
@@ -816,6 +824,7 @@ gtk_accel_map_foreach (gpointer data,
goto skip_accel;
foreach_func (data, entry->accel_path, entry->accel_key, entry->accel_mods, changed);
skip_accel:
+ /* noop */;
}
g_slist_free (entries);
}
diff --git a/gtk/gtkfilesel.c b/gtk/gtkfilesel.c
index fc8bab7254..19fb7ab9e8 100644
--- a/gtk/gtkfilesel.c
+++ b/gtk/gtkfilesel.c
@@ -32,9 +32,6 @@
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
-#ifdef HAVE_DIRENT_H
-#include <dirent.h>
-#endif
#include <stdlib.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
@@ -2592,8 +2589,9 @@ open_new_dir (gchar *dir_name,
gboolean stat_subdirs)
{
CompletionDirSent *sent;
- DIR *directory;
- struct dirent *dirent_ptr;
+ GDir *directory;
+ char *dirent;
+ GError *error;
gint entry_count = 0;
gint n_entries = 0;
gint i;
@@ -2615,38 +2613,38 @@ open_new_dir (gchar *dir_name,
return NULL;
}
- directory = opendir (sys_dir_name);
+ directory = g_dir_open (sys_dir_name, 0, &error);
if (!directory)
{
- cmpl_errno = errno;
+ cmpl_errno = error->code; /* ??? */
g_free (sys_dir_name);
return NULL;
}
- while ((dirent_ptr = readdir (directory)) != NULL)
+ while ((dirent = g_dir_read_name (directory)) != NULL)
entry_count++;
sent->entries = g_new (CompletionDirEntry, entry_count);
sent->entry_count = entry_count;
- rewinddir (directory);
+ g_dir_rewind (directory);
for (i = 0; i < entry_count; i += 1)
{
- dirent_ptr = readdir (directory);
+ dirent = g_dir_read_name (directory);
- if (!dirent_ptr)
+ if (!dirent)
{
- cmpl_errno = errno;
- closedir (directory);
+ g_warning ("Failure reading directory '%s'", sys_dir_name);
+ g_dir_close (directory);
g_free (sys_dir_name);
return NULL;
}
- sent->entries[n_entries].entry_name = g_filename_to_utf8 (dirent_ptr->d_name, -1, NULL, NULL, NULL);
+ sent->entries[n_entries].entry_name = g_filename_to_utf8 (dirent, -1, NULL, NULL, NULL);
if (!g_utf8_validate (sent->entries[n_entries].entry_name, -1, NULL))
{
- g_warning (_("The filename %s couldn't be converted to UTF-8. Try setting the environment variable G_BROKEN_FILENAMES."), dirent_ptr->d_name);
+ g_warning (_("The filename %s couldn't be converted to UTF-8. Try setting the environment variable G_BROKEN_FILENAMES."), dirent);
continue;
}
@@ -2655,7 +2653,7 @@ open_new_dir (gchar *dir_name,
{
g_string_append_c (path, G_DIR_SEPARATOR);
}
- g_string_append (path, dirent_ptr->d_name);
+ g_string_append (path, dirent);
if (stat_subdirs)
{
@@ -2678,7 +2676,7 @@ open_new_dir (gchar *dir_name,
g_string_free (path, TRUE);
qsort (sent->entries, sent->entry_count, sizeof (CompletionDirEntry), compare_cmpl_dir);
- closedir (directory);
+ g_dir_close (directory);
return sent;
}
diff --git a/gtk/makefile.msc.in b/gtk/makefile.msc.in
index 815cc46352..965dd6e9e8 100644
--- a/gtk/makefile.msc.in
+++ b/gtk/makefile.msc.in
@@ -27,8 +27,8 @@ AWK = gawk
INCLUDES = -I . -I .. -I ../gdk -I ../gdk-pixbuf -DPANGO_ENABLE_BACKEND
DEPCFLAGS = $(PANGO_CFLAGS) $(GLIB_CFLAGS) $(LIBICONV_CFLAGS) \
- $(INTL_CFLAGS) $(ATK_CFLAGS) $(DIRENT_CFLAGS)
-LDFLAGS = $(ATK_LIBS) $(DIRENT_LIBS) /link /machine:ix86 $(LINKDEBUG)
+ $(INTL_CFLAGS) $(ATK_CFLAGS)
+LDFLAGS = $(ATK_LIBS) /link /machine:ix86 $(LINKDEBUG)
# Some files use near as an identifier
# Don't define GTK_COMPILATION here, because it's for gtk-x.x.dll only
DEFINES = $(G_DEBUGGING) -DGTK_DISABLE_COMPAT_H -DG_LOG_DOMAIN=\"Gtk\" -Dnear=xxnear \
@@ -46,14 +46,15 @@ all : \
generated \
gtk-stocks-icons \
gtk-win32-$(GTK_VER).dll \
+ gtk-query-immodules-$(GTK_VER).exe \
# gtk-win32-$(GTK_VER)s.lib \
# gtk-x11-$(GTK_VER).dll
gtk_OBJECTS = \
fnmatch.obj \
-# gdk-pixbuf-loader.obj \
gtkaccelgroup.obj \
gtkaccellabel.obj \
+ gtkaccelmap.obj \
gtkaccessible.obj \
gtkadjustment.obj \
gtkalignment.obj \
@@ -118,6 +119,8 @@ gtk_OBJECTS = \
gtklistitem.obj \
gtkliststore.obj \
gtkmain.obj \
+ gtkmarshalers.obj \
+ gtkmarshal.obj \
gtkmenu.obj \
gtkmenubar.obj \
gtkmenuitem.obj \
@@ -179,7 +182,6 @@ gtk_OBJECTS = \
gtktreednd.obj \
gtktreeitem.obj \
gtktreemodel.obj \
-# gtktreemodelsimple.obj \
gtktreemodelsort.obj \
gtktreeselection.obj \
gtktreesortable.obj \
@@ -268,6 +270,7 @@ gtk_public_h_sources = \
gtklistitem.h \
gtkliststore.h \
gtkmain.h \
+ gtkmarshal.h \
gtkmenu.h \
gtkmenubar.h \
gtkmenuitem.h \
@@ -278,9 +281,7 @@ gtk_public_h_sources = \
gtkoldeditable.h \
gtkobject.h \
gtkoptionmenu.h \
-# gtkpacker.h \
gtkpaned.h \
-# gdk-pixbuf-loader.h \
gtkpixmap.h \
gtkplug.h \
gtkpreview.h \
@@ -323,7 +324,6 @@ gtk_public_h_sources = \
gtktree.h \
gtktreeitem.h \
gtktreemodel.h \
-# gtktreemodelsimple.h \
gtktreemodelsort.h \
gtktreeselection.h \
gtktreesortable.h \
@@ -353,7 +353,7 @@ gtk_extra_sources = \
..\config.h : ..\config.h.win32
copy ..\config.h.win32 ..\config.h
-GENERATED = gtk.defs gtktypebuiltins.h gtktypebuiltins_vars.c gtktypebuiltins_ids.c gtktypebuiltins_evals.c gtkmarshal.h gtkmarshal.c
+GENERATED = gtk.defs gtktypebuiltins.h gtktypebuiltins_vars.c gtktypebuiltins_ids.c gtktypebuiltins_evals.c gtkmarshal.h gtkmarshal.c gtkmarshalers.h gtkmarshalers.c
#
# Generated source files:
@@ -382,8 +382,18 @@ gtktypebuiltins_ids.c: gtk.defs maketypes.awk
gtktypebuiltins_evals.c: makeenums.pl gtk.defs
$(PERL) makeenums.pl arrays $(gtk_public_h_sources) $(gdk_headers) >gtktypebuiltins_evals.c
+# private marshalers
+gtkmarshalers.h : gtkmarshalers.list
+ $(GLIB)\gobject\glib-genmarshal --prefix=_gtk_marshal gtkmarshalers.list --header >>gtkmarshalers.h
+
+gtkmarshalers.c : gtkmarshalers.list
+ $(GLIB)\gobject\glib-genmarshal --prefix=_gtk_marshal gtkmarshalers.list --body >gtkmarshalers.c
+
+# public, deprecated marshalers
gtkmarshal.h : gtkmarshal.list
- $(GLIB)\gobject\glib-genmarshal --prefix=gtk_marshal gtkmarshal.list --header >gtkmarshal.h
+ echo #ifndef GTK_DISABLE_DEPRECATED >gtkmarshal.h
+ $(GLIB)\gobject\glib-genmarshal --prefix=gtk_marshal gtkmarshal.list --header >>gtkmarshal.h
+ echo #endif /* GTK_DISABLE_DEPRECATED */ >>gtkmarshal.h
gtkmarshal.c : gtkmarshal.list
$(GLIB)\gobject\glib-genmarshal --prefix=gtk_marshal gtkmarshal.list --body >gtkmarshal.c
@@ -400,6 +410,9 @@ gtk-win32-$(GTK_VER).dll : $(gtk_OBJECTS) gtk.def
gtk-win32-$(GTK_VER)s.lib : $(gtk_OBJECTS)
lib /out:gtk-win32-$(GTK_VER)s.lib $(gtk_OBJECTS)
+gtk-query-immodules-$(GTK_VER).exe : queryimmodules.obj
+ $(CC) $(CFLAGS) -Fe$@ queryimmodules.obj $(GTK_LIBS) $(GLIB_LIBS) $(PANGO_LIBS) $(LDFLAGS)
+
gtk-x11-$(GTK_VER).dll : $(gtk_OBJECTS) gtk.def
$(CC) $(CFLAGS) -LD -Fm -Fegtk-x11-$(GTK_VER).dll $(gtk_OBJECTS) ../gdk/gdk-x11-$(GTK_VER).lib $(GDK_PIXBUF_LIBS) $(PANGO_LIBS) $(INTL_LIBS) $(GLIB_LIBS) gdi32.lib user32.lib advapi32.lib $(LDFLAGS) /def:gtk.def
diff --git a/gtk/queryimmodules.c b/gtk/queryimmodules.c
index d60b3661e5..aa45cf9584 100644
--- a/gtk/queryimmodules.c
+++ b/gtk/queryimmodules.c
@@ -22,9 +22,6 @@
#include "config.h"
#include <glib.h>
-#ifdef HAVE_DIRENT_H
-#include <dirent.h>
-#endif
#include <gmodule.h>
#include <errno.h>
@@ -120,7 +117,7 @@ query_module (const char *dir, const char *name)
int main (int argc, char **argv)
{
- char cwd[PATH_MAX];
+ char *cwd;
int i;
char *path;
gboolean error = FALSE;
@@ -142,28 +139,30 @@ int main (int argc, char **argv)
for (i=0; dirs[i]; i++)
{
- DIR *dir = opendir (dirs[i]);
+ GDir *dir = g_dir_open (dirs[i], 0, NULL);
if (dir)
{
- struct dirent *dent;
+ char *dent;
- while ((dent = readdir (dir)))
+ while ((dent = g_dir_read_name (dir)))
{
- int len = strlen (dent->d_name);
- if (len > 3 && strcmp (dent->d_name + len - strlen (SOEXT), SOEXT) == 0)
- error |= query_module (dirs[i], dent->d_name);
+ int len = strlen (dent);
+ if (len > 3 && strcmp (dent + len - strlen (SOEXT), SOEXT) == 0)
+ error |= query_module (dirs[i], dent);
}
- closedir (dir);
+ g_dir_close (dir);
}
}
}
else
{
- getcwd (cwd, PATH_MAX);
+ cwd = g_get_current_dir ();
for (i=1; i<argc; i++)
error |= query_module (cwd, argv[i]);
+
+ g_free (cwd);
}
return error ? 1 : 0;