mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-25 21:21:21 +00:00
Implement.
2006-07-21 Richard Hult <richard@imendio.com> * gdk/quartz/gdkgc-quartz.c: (gdk_quartz_gc_get_values), (gdk_quartz_gc_set_values), (_gdk_windowing_gc_copy), (gdk_gc_get_screen): Implement. * gdk/quartz/gdkwindow-quartz.c: (gdk_window_set_back_pixmap): Implement.
This commit is contained in:
parent
465daa910f
commit
a0cdff6cca
@ -1,3 +1,12 @@
|
||||
2006-07-21 Richard Hult <richard@imendio.com>
|
||||
|
||||
* gdk/quartz/gdkgc-quartz.c: (gdk_quartz_gc_get_values),
|
||||
(gdk_quartz_gc_set_values), (_gdk_windowing_gc_copy),
|
||||
(gdk_gc_get_screen): Implement.
|
||||
|
||||
* gdk/quartz/gdkwindow-quartz.c: (gdk_window_set_back_pixmap):
|
||||
Implement.
|
||||
|
||||
2006-07-21 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkstyle.c:
|
||||
|
@ -1,3 +1,12 @@
|
||||
2006-07-21 Richard Hult <richard@imendio.com>
|
||||
|
||||
* gdk/quartz/gdkgc-quartz.c: (gdk_quartz_gc_get_values),
|
||||
(gdk_quartz_gc_set_values), (_gdk_windowing_gc_copy),
|
||||
(gdk_gc_get_screen): Implement.
|
||||
|
||||
* gdk/quartz/gdkwindow-quartz.c: (gdk_window_set_back_pixmap):
|
||||
Implement.
|
||||
|
||||
2006-07-21 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkstyle.c:
|
||||
|
@ -29,7 +29,30 @@ static void
|
||||
gdk_quartz_gc_get_values (GdkGC *gc,
|
||||
GdkGCValues *values)
|
||||
{
|
||||
/* FIXME: Implement */
|
||||
GdkGCQuartz *private;
|
||||
|
||||
private = GDK_GC_QUARTZ (gc);
|
||||
|
||||
memset (values, 0, sizeof (GdkGCValues));
|
||||
|
||||
/* FIXME: Fill in more value as/if they are added. */
|
||||
|
||||
values->foreground.pixel = _gdk_gc_get_fg_pixel (gc);
|
||||
values->background.pixel = _gdk_gc_get_bg_pixel (gc);
|
||||
|
||||
values->function = GDK_COPY;
|
||||
|
||||
values->fill = _gdk_gc_get_fill (gc);
|
||||
values->tile = _gdk_gc_get_tile (gc);
|
||||
values->stipple = _gdk_gc_get_stipple (gc);
|
||||
|
||||
/* The X11 backend always returns a NULL clip_mask. */
|
||||
values->clip_mask = NULL;
|
||||
|
||||
values->ts_x_origin = gc->ts_x_origin;
|
||||
values->ts_y_origin = gc->ts_y_origin;
|
||||
values->clip_x_origin = gc->clip_x_origin;
|
||||
values->clip_y_origin = gc->clip_y_origin;
|
||||
}
|
||||
|
||||
static void
|
||||
@ -160,13 +183,29 @@ void
|
||||
_gdk_windowing_gc_copy (GdkGC *dst_gc,
|
||||
GdkGC *src_gc)
|
||||
{
|
||||
/* FIXME: Implement */
|
||||
GdkGCQuartz *dst_quartz_gc = GDK_GC_QUARTZ (dst_gc);
|
||||
GdkGCQuartz *src_quartz_gc = GDK_GC_QUARTZ (src_gc);
|
||||
|
||||
dst_quartz_gc->values_mask = src_quartz_gc->values_mask;
|
||||
|
||||
dst_quartz_gc->have_clip_region = src_quartz_gc->have_clip_region;
|
||||
dst_quartz_gc->have_clip_mask = src_quartz_gc->have_clip_mask;
|
||||
|
||||
if (dst_quartz_gc->values_mask & GDK_GC_CLIP_MASK && dst_quartz_gc->clip_mask)
|
||||
{
|
||||
CGImageRelease (dst_quartz_gc->clip_mask);
|
||||
dst_quartz_gc->clip_mask = NULL;
|
||||
}
|
||||
|
||||
if (src_quartz_gc->values_mask & GDK_GC_CLIP_MASK && src_quartz_gc->clip_mask)
|
||||
dst_quartz_gc->clip_mask =
|
||||
CGImageCreateCopy (GDK_PIXMAP_IMPL_QUARTZ (GDK_PIXMAP_OBJECT (src_quartz_gc->clip_mask)->impl)->image);
|
||||
}
|
||||
|
||||
GdkScreen *
|
||||
gdk_gc_get_screen (GdkGC *gc)
|
||||
{
|
||||
return NULL;
|
||||
return _gdk_screen;
|
||||
}
|
||||
|
||||
void
|
||||
@ -210,7 +249,7 @@ _gdk_quartz_update_context_from_gc (CGContextRef context, GdkGC *gc)
|
||||
}
|
||||
else if (private->have_clip_mask && private->clip_mask)
|
||||
{
|
||||
/* FIXME: This is 10.4 only. For lower versions, we need to transform the
|
||||
/* Note: This is 10.4 only. For lower versions, we need to transform the
|
||||
* mask into a region.
|
||||
*/
|
||||
CGContextClipToMask (context,
|
||||
|
@ -128,7 +128,6 @@ gdk_window_impl_quartz_class_init (GdkWindowImplQuartzClass *klass)
|
||||
drawable_class->get_visible_region = gdk_window_impl_quartz_get_visible_region;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
gdk_window_impl_quartz_init (GdkWindowImplQuartz *impl)
|
||||
{
|
||||
@ -887,11 +886,37 @@ gdk_window_set_back_pixmap (GdkWindow *window,
|
||||
GdkPixmap *pixmap,
|
||||
gboolean parent_relative)
|
||||
{
|
||||
GdkWindowObject *private = (GdkWindowObject *)window;
|
||||
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
g_return_if_fail (pixmap == NULL || !parent_relative);
|
||||
g_return_if_fail (pixmap == NULL || gdk_drawable_get_depth (window) == gdk_drawable_get_depth (pixmap));
|
||||
|
||||
/* FIXME: Implement */
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
return;
|
||||
|
||||
if (private->bg_pixmap &&
|
||||
private->bg_pixmap != GDK_PARENT_RELATIVE_BG &&
|
||||
private->bg_pixmap != GDK_NO_BG)
|
||||
g_object_unref (private->bg_pixmap);
|
||||
|
||||
if (parent_relative)
|
||||
{
|
||||
private->bg_pixmap = GDK_PARENT_RELATIVE_BG;
|
||||
GDK_NOTE (MISC, g_print (G_STRLOC ": setting background pixmap to parent_relative\n"));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (pixmap)
|
||||
{
|
||||
g_object_ref (pixmap);
|
||||
private->bg_pixmap = pixmap;
|
||||
}
|
||||
else
|
||||
{
|
||||
private->bg_pixmap = GDK_NO_BG;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user