1. 10 Mar, 2007 1 commit
    • Richard Hult's avatar
      Update for the new quartz cairo surface API (#410442). Don't lock focus · d7a33ade
      Richard Hult authored
      2007-03-10  Richard Hult  <richard@imendio.com>
      
      	* gdk/quartz/gdkdrawable-quartz.c:
      	(gdk_quartz_drawable_get_context): Update for the new quartz cairo 
      	surface API (#410442). Don't lock focus unless called outside of an 
      	expose event.
      	(gdk_quartz_drawable_release_context): Only flush the CG context and 
      	unlock focus if called outside of expose.
      	(gdk_quartz_ref_cairo_surface): Reuse the surface during its lifetime.
      	(_gdk_quartz_drawable_finish): New function, used to free the cached
      	cairo surface.
      
      	* gdk/quartz/gdkwindow-quartz.c:
      	(gdk_window_impl_quartz_begin_paint_region): A few small style changes.
      	(gdk_window_quartz_process_all_updates): Move the autorelease pool
      	allocation and freeing outside the loop.
      	(_gdk_windowing_window_destroy): Finish the drawable.
      	(move_resize_window_internal): Small cleanup and remove comment.
      	(_gdk_window_impl_quartz_get_type): No need to make the type info
      	static.
      
      	* gdk/quartz/gdkpixmap-quartz.c: Finish the drawable.
      
      svn path=/trunk/; revision=17463
      d7a33ade
  2. 21 Sep, 2006 1 commit
    • Michael Natterer's avatar
      Implement lots of value setters for GdkGC, based on a heavily modified · 2f50232a
      Michael Natterer authored
      2006-09-21  Michael Natterer  <mitch@imendio.com>
      
             Implement lots of value setters for GdkGC, based on a heavily
             modified patch from Thomas Broyer (bug #328853):
      
      	* gdk/quartz/gdkcolor-quartz.c: removed functions which set colors
      	on the CGContext. Instead, added gdk_quartz_get_rgba_from_pixel()
      	which simply returns RGBA values from a GdkColor's pixel value.
      	See gdk_quartz_update_context_from_gc() below.
      
      	* gdk/quartz/gdkprivate-quartz.h (struct GdkGCQuartz): added lots
      	of members for the newly suppored GC values. Added enum
      	GdkQuartzContextValuesMask which is used for setting up the
      	CGContext for filling and/or stroking.
      
      	* gdk/quartz/gdkgc-quartz.c (gdk_quartz_gc_get_values)
      	(gdk_quartz_gc_set_values)
      	(_gdk_windowing_gc_copy): support a lot more GC values.
      
      	(gdk_quartz_update_context_from_gc): added
      	GdkQuartzContextValuesMask parameter and set filling/stroking
      	parameters accordingly. This function also gained full control
      	over the FG and BG colors (they can't be set separately any more).
      
      	The stipple mask part of the patch doesn't work but seems to take
      	the right approach and doesn't make things worse, so I applied it.
      
      	Did *not* apply the clipping part of the patch since I don't
      	understand it (I don't understand the version in CVS either, but
      	it at least works :-)
      
      	* gdk/quartz/gdkdrawable-quartz.c: pass the right masks to
      	gdk_quartz_update_context_from_gc() and removed separate color
      	setting calls. Some minor fixes.
      
      	* gdk/quartz/gdkwindow-quartz.c
      	(gdk_window_impl_quartz_begin_paint_region): set the CGContext's
      	fill color manually. We don't have/need a GC here.
      2f50232a
  3. 08 Aug, 2006 1 commit
    • Michael Natterer's avatar
      some whitespace and indentation cleanup. · f2faaf2f
      Michael Natterer authored
      2006-08-08  Michael Natterer  <mitch@imendio.com>
      
      	* gdk/quartz/gdkdrawable-quartz.c: some whitespace and indentation
      	cleanup.
      
      	(gdk_quartz_draw_rectangle)
      	(gdk_quartz_draw_arc)
      	(gdk_quartz_draw_polygon)
      	(gdk_quartz_draw_points): for pixel-prefect drawing, stroked
      	coordinates need to go through pixel centers, while filled ones
      	need to go along pixel boundaries. Moved +0.5 adjusting to the
      	if(!filled) branches and added/removed some adjustments where they
      	were wrong.
      f2faaf2f
  4. 07 Aug, 2006 1 commit
  5. 31 Jul, 2006 1 commit
  6. 29 Jul, 2006 1 commit
    • Richard Hult's avatar
      Always set success to TRUE. (gdk_color_change): Implement. · 571c4605
      Richard Hult authored
      2006-07-29  Richard Hult  <richard@imendio.com>
      
      	* gdk/quartz/gdkcolor-quartz.c (gdk_colormap_alloc_colors): Always
      	set success to TRUE.
      	(gdk_color_change): Implement.
      
      	* gdk/quartz/GdkQuartzWindow.c
      	([GdkQuartzWindow -canBecomeKeyWindow]): Add comment.
      
      	* gdk/quartz/gdkevents-quartz.c (gdk_screen_get_setting): Make the
      	default font a bit smaller until we have made this get the system
      	setting.
      
      	* gdk/quartz/gdkwindow-quartz.c (gdk_window_set_type_hint): Enable
      	shadows for the right window types.
      
      	* gdk/quartz/gdkprivate-quartz.h:
      	* gdk/quartz/gdkgc-quartz.c:
      	* gdk/quartz/gdkdrawable-quartz.c:
      	* gdk/quartz/gdkcolor-quartz.c: Expose the CGContext functions,
      	update callers.
      
      	* gdk/quartz/gdkmain-quartz.c: (_gdk_windowing_init): No need to
      	get the current process ID, use the right constant instead.
      571c4605
  7. 16 Apr, 2006 2 commits
    • Richard Hult's avatar
      Add check for source being a window. · 7deea61c
      Richard Hult authored
      2006-04-16  Richard Hult  <richard@imendio.com>
      
      	* gdk/quartz/gdkdrawable-quartz.c: (gdk_quartz_draw_drawable): Add check
      	for source being a window.
      
      	* gdk/quartz/gdkwindow-quartz.c: (_gdk_windowing_window_get_pointer):
      	Don't assert on window not being the root window.
      7deea61c
    • Richard Hult's avatar
      Remove leading cairo/ in include. · 5dc0919e
      Richard Hult authored
      2006-04-16  Richard Hult  <richard@imendio.com>
      
      	* gdk/quartz/gdkdrawable-quartz.c: Remove leading cairo/ in include.
      5dc0919e
  8. 12 Apr, 2006 1 commit
    • Anders Carlsson's avatar
      Don't flush if we're inside a begin_paint/end_paint pair. · 3d1e7107
      Anders Carlsson authored
      2006-04-12  Anders Carlsson  <andersca@imendio.com>
      
              * gdk/quartz/gdkdrawable-quartz.c:
              (_gdk_quartz_drawable_release_context):
              Don't flush if we're inside a begin_paint/end_paint pair.
      
              * gdk/quartz/gdkwindow-quartz.c:
              (gdk_window_impl_quartz_end_paint):
              Free clip region here.
      3d1e7107
  9. 10 Apr, 2006 1 commit
    • Anders Carlsson's avatar
      Have GdkWindowImplQuartz implement GdkPaintable. · 1e3d7220
      Anders Carlsson authored
      2006-04-11  Anders Carlsson  <andersca@mac.imendio.com>
      
              * gdk/quartz/GdkQuartzView.c:
              (-[GdkQuartzView drawRect:]):
              * gdk/quartz/gdkdrawable-quartz.c:
              (gdk_quartz_ref_cairo_surface):
              (_gdk_quartz_drawable_get_context):
              (_gdk_quartz_drawable_release_context):
              * gdk/quartz/gdkwindow-quartz.c:
              (gdk_window_impl_quartz_finalize):
              (gdk_window_impl_quartz_class_init):
              (gdk_window_impl_quartz_begin_paint_region):
              (gdk_window_impl_quartz_end_paint):
              (gdk_window_impl_quartz_invalidate_maybe_recurse):
              (gdk_window_impl_quartz_process_updates):
              (gdk_window_impl_quartz_paintable_init):
              (_gdk_window_impl_quartz_get_type):
              * gdk/quartz/gdkwindow-quartz.h:
              Have GdkWindowImplQuartz implement GdkPaintable.
      1e3d7220
  10. 21 Mar, 2006 1 commit
    • Anders Carlsson's avatar
      Offset coordinates by 0.5 pixels to get consistant results for both image · ac3643d8
      Anders Carlsson authored
      2006-03-21  Anders Carlsson  <andersca@imendio.com>
      
              * gdk/quartz/gdkdrawable-quartz.c:
              (gdk_quartz_ref_cairo_surface):
              (gdk_quartz_draw_rectangle):
              (gdk_quartz_draw_arc):
              (gdk_quartz_draw_polygon):
              (gdk_quartz_draw_drawable):
              (gdk_quartz_draw_segments):
              (gdk_quartz_draw_lines):
              (gdk_quartz_draw_pixbuf):
              (gdk_quartz_draw_image):
              (_gdk_quartz_drawable_get_context):
              * gdk/quartz/gdkdrawable-quartz.h:
              Offset coordinates by 0.5 pixels to get consistant results for both
              image contexts and screen contexts.
      ac3643d8
  11. 18 Jan, 2006 1 commit
  12. 22 Nov, 2005 1 commit
    • Anders Carlsson's avatar
      Add quartz backend. · 1097260a
      Anders Carlsson authored
      2005-11-21  Anders Carlsson  <andersca@imendio.com>
      
              * configure.in:
              * gtk/Makefile.am:
              * gdk/Makefile.am:
      	* gdk/quartz/*:
      	Add quartz backend.
      
              * docs/tools/Makefile.am:
      	Only build docshooter when the X11 backend is used.
      
              * gtk/gtkplug-stub.c:
      	Include gtkplug.h here.
      
              * gtk/gtksocket-stub.c:
      	Include gtksocket.h here.
      1097260a