Commit 8a19c2a1 authored by Tim Janik's avatar Tim Janik Committed by Tim Janik

fix behavior of gtk_preview_put() with srcx/srcy != 0,

Sat Feb 28 15:18:36 1998  Tim Janik  <timj@gimp.org>

        * gtk/gtkpreview.c: fix behavior of gtk_preview_put() with
        srcx/srcy != 0, gtk-shige-980127-0.patch.gz by
        AOSASA Shigeru <aozasa@sakuranet.or.jp>.

        * gdk: applied gtk-roebling-980121-0.patch.gz, patch for region
        support in Gdk, by Robert Roebling <roebling@ruf.uni-freiburg.de>.
parent 7ad17f7b
Sat Feb 28 15:18:36 1998 Tim Janik <timj@gimp.org>
* gtk/gtkpreview.c: fix behavior of gtk_preview_put() with
srcx/srcy != 0, gtk-shige-980127-0.patch.gz by
AOSASA Shigeru <aozasa@sakuranet.or.jp>.
* gdk: applied gtk-roebling-980121-0.patch.gz, patch for region
support in Gdk, by Robert Roebling <roebling@ruf.uni-freiburg.de>.
Fri Feb 27 15:31:55 1998 Tim Janik <timj@gimp.org>
* gtk/gtktipsquery.c: we make an active server grab now, this way we
......
Sat Feb 28 15:18:36 1998 Tim Janik <timj@gimp.org>
* gtk/gtkpreview.c: fix behavior of gtk_preview_put() with
srcx/srcy != 0, gtk-shige-980127-0.patch.gz by
AOSASA Shigeru <aozasa@sakuranet.or.jp>.
* gdk: applied gtk-roebling-980121-0.patch.gz, patch for region
support in Gdk, by Robert Roebling <roebling@ruf.uni-freiburg.de>.
Fri Feb 27 15:31:55 1998 Tim Janik <timj@gimp.org>
* gtk/gtktipsquery.c: we make an active server grab now, this way we
......
Sat Feb 28 15:18:36 1998 Tim Janik <timj@gimp.org>
* gtk/gtkpreview.c: fix behavior of gtk_preview_put() with
srcx/srcy != 0, gtk-shige-980127-0.patch.gz by
AOSASA Shigeru <aozasa@sakuranet.or.jp>.
* gdk: applied gtk-roebling-980121-0.patch.gz, patch for region
support in Gdk, by Robert Roebling <roebling@ruf.uni-freiburg.de>.
Fri Feb 27 15:31:55 1998 Tim Janik <timj@gimp.org>
* gtk/gtktipsquery.c: we make an active server grab now, this way we
......
Sat Feb 28 15:18:36 1998 Tim Janik <timj@gimp.org>
* gtk/gtkpreview.c: fix behavior of gtk_preview_put() with
srcx/srcy != 0, gtk-shige-980127-0.patch.gz by
AOSASA Shigeru <aozasa@sakuranet.or.jp>.
* gdk: applied gtk-roebling-980121-0.patch.gz, patch for region
support in Gdk, by Robert Roebling <roebling@ruf.uni-freiburg.de>.
Fri Feb 27 15:31:55 1998 Tim Janik <timj@gimp.org>
* gtk/gtktipsquery.c: we make an active server grab now, this way we
......
Sat Feb 28 15:18:36 1998 Tim Janik <timj@gimp.org>
* gtk/gtkpreview.c: fix behavior of gtk_preview_put() with
srcx/srcy != 0, gtk-shige-980127-0.patch.gz by
AOSASA Shigeru <aozasa@sakuranet.or.jp>.
* gdk: applied gtk-roebling-980121-0.patch.gz, patch for region
support in Gdk, by Robert Roebling <roebling@ruf.uni-freiburg.de>.
Fri Feb 27 15:31:55 1998 Tim Janik <timj@gimp.org>
* gtk/gtktipsquery.c: we make an active server grab now, this way we
......
Sat Feb 28 15:18:36 1998 Tim Janik <timj@gimp.org>
* gtk/gtkpreview.c: fix behavior of gtk_preview_put() with
srcx/srcy != 0, gtk-shige-980127-0.patch.gz by
AOSASA Shigeru <aozasa@sakuranet.or.jp>.
* gdk: applied gtk-roebling-980121-0.patch.gz, patch for region
support in Gdk, by Robert Roebling <roebling@ruf.uni-freiburg.de>.
Fri Feb 27 15:31:55 1998 Tim Janik <timj@gimp.org>
* gtk/gtktipsquery.c: we make an active server grab now, this way we
......
Sat Feb 28 15:18:36 1998 Tim Janik <timj@gimp.org>
* gtk/gtkpreview.c: fix behavior of gtk_preview_put() with
srcx/srcy != 0, gtk-shige-980127-0.patch.gz by
AOSASA Shigeru <aozasa@sakuranet.or.jp>.
* gdk: applied gtk-roebling-980121-0.patch.gz, patch for region
support in Gdk, by Robert Roebling <roebling@ruf.uni-freiburg.de>.
Fri Feb 27 15:31:55 1998 Tim Janik <timj@gimp.org>
* gtk/gtktipsquery.c: we make an active server grab now, this way we
......
......@@ -133,7 +133,14 @@ GTK_BASIC:
disallow to act as a container for another GtkButton. Now the
gnit is, one can add a GtkHBox (which is a `basic' widget) to
the first button, and put the second into the box.
GTK_RESERVED_3:
GTK_RC_STYLE:
This flag indicates that its style has been looked up through
the rc mechanism. It does not imply that the widget actually
had a style defined through the rc mechanism.
GtkWidget, private flags:
......
......@@ -24,6 +24,7 @@ libgdk_la_SOURCES = \
gdkpixmap.c \
gdkproperty.c \
gdkrectangle.c \
gdkregion.c \
gdkselection.c \
gdkvisual.c \
gdkwindow.c \
......
This diff is collapsed.
......@@ -8,7 +8,7 @@
*
* 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
* 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
......@@ -28,9 +28,9 @@ gdk_gc_new (GdkWindow *window)
}
GdkGC*
gdk_gc_new_with_values (GdkWindow *window,
GdkGCValues *values,
GdkGCValuesMask values_mask)
gdk_gc_new_with_values (GdkWindow *window,
GdkGCValues *values,
GdkGCValuesMask values_mask)
{
GdkWindowPrivate *window_private;
GdkGC *gc;
......@@ -366,7 +366,7 @@ gdk_gc_get_values (GdkGC *gc,
}
void
gdk_gc_set_foreground (GdkGC *gc,
gdk_gc_set_foreground (GdkGC *gc,
GdkColor *color)
{
GdkGCPrivate *private;
......@@ -379,7 +379,7 @@ gdk_gc_set_foreground (GdkGC *gc,
}
void
gdk_gc_set_background (GdkGC *gc,
gdk_gc_set_background (GdkGC *gc,
GdkColor *color)
{
GdkGCPrivate *private;
......@@ -392,7 +392,7 @@ gdk_gc_set_background (GdkGC *gc,
}
void
gdk_gc_set_font (GdkGC *gc,
gdk_gc_set_font (GdkGC *gc,
GdkFont *font)
{
GdkGCPrivate *gc_private;
......@@ -412,7 +412,7 @@ gdk_gc_set_font (GdkGC *gc,
}
void
gdk_gc_set_function (GdkGC *gc,
gdk_gc_set_function (GdkGC *gc,
GdkFunction function)
{
GdkGCPrivate *private;
......@@ -436,7 +436,7 @@ gdk_gc_set_function (GdkGC *gc,
}
void
gdk_gc_set_fill (GdkGC *gc,
gdk_gc_set_fill (GdkGC *gc,
GdkFill fill)
{
GdkGCPrivate *private;
......@@ -463,7 +463,7 @@ gdk_gc_set_fill (GdkGC *gc,
}
void
gdk_gc_set_tile (GdkGC *gc,
gdk_gc_set_tile (GdkGC *gc,
GdkPixmap *tile)
{
GdkGCPrivate *private;
......@@ -535,7 +535,7 @@ gdk_gc_set_clip_origin (GdkGC *gc,
}
void
gdk_gc_set_clip_mask (GdkGC *gc,
gdk_gc_set_clip_mask (GdkGC *gc,
GdkBitmap *mask)
{
GdkGCPrivate *private;
......@@ -562,8 +562,8 @@ gdk_gc_set_clip_mask (GdkGC *gc,
void
gdk_gc_set_clip_rectangle (GdkGC *gc,
GdkRectangle *rectangle)
gdk_gc_set_clip_rectangle (GdkGC *gc,
GdkRectangle *rectangle)
{
GdkGCPrivate *private;
XRectangle xrectangle;
......@@ -587,8 +587,29 @@ gdk_gc_set_clip_rectangle (GdkGC *gc,
}
void
gdk_gc_set_subwindow (GdkGC *gc,
GdkSubwindowMode mode)
gdk_gc_set_clip_region (GdkGC *gc,
GdkRegion *region)
{
GdkGCPrivate *private;
g_return_if_fail (gc != NULL);
private = (GdkGCPrivate*) gc;
if (region)
{
GdkRegionPrivate *region_private;
region_private = (GdkRegionPrivate*) region;
XSetRegion (private->xdisplay, private->xgc, region_private->xregion);
}
else
XSetClipMask (private->xdisplay, private->xgc, None);
}
void
gdk_gc_set_subwindow (GdkGC *gc,
GdkSubwindowMode mode)
{
GdkGCPrivate *private;
......@@ -613,10 +634,10 @@ gdk_gc_set_exposures (GdkGC *gc,
}
void
gdk_gc_set_line_attributes (GdkGC *gc,
gint line_width,
gdk_gc_set_line_attributes (GdkGC *gc,
gint line_width,
GdkLineStyle line_style,
GdkCapStyle cap_style,
GdkCapStyle cap_style,
GdkJoinStyle join_style)
{
GdkGCPrivate *private;
......
......@@ -8,7 +8,7 @@
*
* 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
* 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
......@@ -25,9 +25,9 @@
#define DND_PROTOCOL_VERSION 0
#define gdk_window_lookup(xid) ((GdkWindow*) gdk_xid_table_lookup (xid))
#define gdk_pixmap_lookup(xid) ((GdkPixmap*) gdk_xid_table_lookup (xid))
#define gdk_font_lookup(xid) ((GdkFont*) gdk_xid_table_lookup (xid))
#define gdk_window_lookup(xid) ((GdkWindow*) gdk_xid_table_lookup (xid))
#define gdk_pixmap_lookup(xid) ((GdkPixmap*) gdk_xid_table_lookup (xid))
#define gdk_font_lookup(xid) ((GdkFont*) gdk_xid_table_lookup (xid))
#ifdef __cplusplus
......@@ -37,14 +37,15 @@ extern "C" {
typedef struct _GdkWindowPrivate GdkWindowPrivate;
typedef struct _GdkWindowPrivate GdkPixmapPrivate;
typedef struct _GdkImagePrivate GdkImagePrivate;
typedef struct _GdkGCPrivate GdkGCPrivate;
typedef struct _GdkImagePrivate GdkImagePrivate;
typedef struct _GdkGCPrivate GdkGCPrivate;
typedef struct _GdkColormapPrivate GdkColormapPrivate;
typedef struct _GdkVisualPrivate GdkVisualPrivate;
typedef struct _GdkFontPrivate GdkFontPrivate;
typedef struct _GdkFontPrivate GdkFontPrivate;
typedef struct _GdkCursorPrivate GdkCursorPrivate;
typedef struct _GdkEventFilter GdkEventFilter;
typedef struct _GdkEventFilter GdkEventFilter;
typedef struct _GdkColorContextPrivate GdkColorContextPrivate;
typedef struct _GdkRegionPrivate GdkRegionPrivate;
struct _GdkWindowPrivate
......@@ -89,14 +90,14 @@ struct _GdkImagePrivate
gpointer x_shm_info;
void (*image_put) (GdkDrawable *window,
GdkGC *gc,
GdkImage *image,
gint xsrc,
gint ysrc,
gint xdest,
gint ydest,
gint width,
gint height);
GdkGC *gc,
GdkImage *image,
gint xsrc,
gint ysrc,
gint xdest,
gint ydest,
gint width,
gint height);
};
struct _GdkGCPrivate
......@@ -142,23 +143,23 @@ struct _GdkCursorPrivate
};
struct _GdkDndCursorInfo {
Cursor gdk_cursor_dragdefault, gdk_cursor_dragok;
GdkWindow *drag_pm_default, *drag_pm_ok;
GdkPoint default_hotspot, ok_hotspot;
Cursor gdk_cursor_dragdefault, gdk_cursor_dragok;
GdkWindow *drag_pm_default, *drag_pm_ok;
GdkPoint default_hotspot, ok_hotspot;
};
typedef struct _GdkDndCursorInfo GdkDndCursorInfo;
struct _GdkDndGlobals {
GdkAtom gdk_XdeEnter, gdk_XdeLeave, gdk_XdeRequest;
GdkAtom gdk_XdeDataAvailable, gdk_XdeDataShow, gdk_XdeCancel;
GdkAtom gdk_XdeTypelist;
GdkAtom gdk_XdeEnter, gdk_XdeLeave, gdk_XdeRequest;
GdkAtom gdk_XdeDataAvailable, gdk_XdeDataShow, gdk_XdeCancel;
GdkAtom gdk_XdeTypelist;
GdkDndCursorInfo *c;
GdkWindow **drag_startwindows;
guint drag_numwindows;
gboolean drag_really, drag_perhaps, dnd_grabbed;
Window dnd_drag_target;
GdkPoint drag_dropcoords;
GdkWindow **drag_startwindows;
guint drag_numwindows;
gboolean drag_really, drag_perhaps, dnd_grabbed;
Window dnd_drag_target;
GdkPoint drag_dropcoords;
};
typedef struct _GdkDndGlobals GdkDndGlobals;
......@@ -186,6 +187,12 @@ struct _GdkColorContextPrivate
XStandardColormap std_cmap;
};
struct _GdkRegionPrivate
{
GdkRegion region;
Region xregion;
};
typedef enum {
GDK_DEBUG_MISC = 1<<0,
GDK_DEBUG_EVENTS = 1 << 1,
......@@ -201,15 +208,15 @@ void gdk_image_init (void);
void gdk_image_exit (void);
GdkColormap* gdk_colormap_lookup (Colormap xcolormap);
GdkVisual* gdk_visual_lookup (Visual *xvisual);
GdkVisual* gdk_visual_lookup (Visual *xvisual);
void gdk_window_add_colormap_windows (GdkWindow *window);
void gdk_window_destroy_notify (GdkWindow *window);
void gdk_window_destroy_notify (GdkWindow *window);
void gdk_xid_table_insert (XID *xid,
gpointer data);
void gdk_xid_table_remove (XID xid);
gpointer gdk_xid_table_lookup (XID xid);
void gdk_xid_table_insert (XID *xid,
gpointer data);
void gdk_xid_table_remove (XID xid);
gpointer gdk_xid_table_lookup (XID xid);
/* If you pass x = y = -1, it queries the pointer
to find out where it currently is.
......@@ -222,35 +229,35 @@ void gdk_dnd_display_drag_cursor(gint x,
gboolean change_made);
extern gint gdk_debug_level;
extern gint gdk_show_events;
extern gint gdk_use_xshm;
extern gint gdk_stack_trace;
extern gchar *gdk_display_name;
extern Display *gdk_display;
extern gint gdk_screen;
extern Window gdk_root_window;
extern Window gdk_leader_window;
extern GdkWindowPrivate gdk_root_parent;
extern Atom gdk_wm_delete_window;
extern Atom gdk_wm_take_focus;
extern Atom gdk_wm_protocols;
extern Atom gdk_wm_window_protocols[];
extern Atom gdk_selection_property;
extern GdkDndGlobals gdk_dnd;
extern GdkWindow *selection_owner[];
extern gchar *gdk_progname;
extern gchar *gdk_progclass;
extern gint gdk_error_code;
extern gint gdk_error_warnings;
extern gint gdk_debug_level;
extern gint gdk_show_events;
extern gint gdk_use_xshm;
extern gint gdk_stack_trace;
extern gchar *gdk_display_name;
extern Display *gdk_display;
extern gint gdk_screen;
extern Window gdk_root_window;
extern Window gdk_leader_window;
extern GdkWindowPrivate gdk_root_parent;
extern Atom gdk_wm_delete_window;
extern Atom gdk_wm_take_focus;
extern Atom gdk_wm_protocols;
extern Atom gdk_wm_window_protocols[];
extern Atom gdk_selection_property;
extern GdkDndGlobals gdk_dnd;
extern GdkWindow *selection_owner[];
extern gchar *gdk_progname;
extern gchar *gdk_progclass;
extern gint gdk_error_code;
extern gint gdk_error_warnings;
/* Debugging support */
#ifdef G_ENABLE_DEBUG
#define GDK_NOTE(type,action) G_STMT_START { \
if (gdk_debug_flags & GDK_DEBUG_##type) \
{ action; }; } G_STMT_END
#define GDK_NOTE(type,action) G_STMT_START { \
if (gdk_debug_flags & GDK_DEBUG_##type) \
{ action; }; } G_STMT_END
#else /* !G_ENABLE_DEBUG */
......
This diff is collapsed.
......@@ -312,13 +312,13 @@ gtk_preview_put (GtkPreview *preview,
widget = GTK_WIDGET (preview);
r1.x = srcx;
r1.y = srcy;
r1.x = 0;
r1.y = 0;
r1.width = preview->buffer_width;
r1.height = preview->buffer_height;
r2.x = destx;
r2.y = desty;
r2.x = srcx;
r2.y = srcy;
r2.width = width;
r2.height = height;
......@@ -418,7 +418,9 @@ gtk_preview_put (GtkPreview *preview,
}
gdk_draw_image (window, gc,
image, 0, 0, x, y,
image, 0, 0,
destx + (r3.x - srcx) + (x - r3.x),
desty + (r3.y - srcy) + (y - r3.y),
xe - x, ye - y);
gdk_flush ();
}
......@@ -693,15 +695,17 @@ gtk_preview_expose (GtkWidget *widget,
if (GTK_WIDGET_DRAWABLE (widget))
{
preview = GTK_PREVIEW (widget);
gtk_preview_put (GTK_PREVIEW (widget),
widget->window, widget->style->black_gc,
(widget->allocation.width - preview->buffer_width) / 2,
(widget->allocation.height - preview->buffer_height) / 2,
event->area.x -
(widget->allocation.width - preview->buffer_width)/2,
event->area.y -
(widget->allocation.height - preview->buffer_height)/2,
event->area.x, event->area.y,
event->area.width, event->area.height);
}
return FALSE;
}
......
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