Commit Graph

24 Commits

Author SHA1 Message Date
Matthias Clasen
64c5b97be8 quartz: Don't use the instancetype keyword
gdkcursor-quartz.c uses the instancetype keyword, which doesn't seem to
be supported in the version of Objective C that Snow Leopard uses.
Replacing that keyword with the thing it represents makes it build.

Patch by Ryan Hendrickson,
http://bugzilla.gnome.org/show_bug.cgi?id=756770
2015-10-25 13:26:01 -04:00
Pietro Gagliardi
3c8b80dce2 Implemented most of the GDK named cursors on Mac OS X.
Only "wait" and "all-scroll" are not implemented properly. OS X does not
seem to have a proper interface to either cursor. Approximations are used
instead; see the code.

See bug 749178.
2015-05-16 17:11:44 -04:00
Matthias Clasen
be9915b16a quartz: Support css cursor names
We want these to work across platforms, so do a best-effort
approximation. We could do much better here by copying what
webkit does.

https://bugzilla.gnome.org/show_bug.cgi?id=749178
2015-05-11 22:29:07 -04:00
John Ralls
dfbd0c2b98 Implement gdk_display_get_cursor_for_surface in quartz
Left out of b2113b7, breaking quartz build
2013-08-11 10:43:48 -07:00
Alexander Larsson
71fe43543c gdk: Add gdk_cursor_get_surface()
We want a surface so we can properly represent the scale factor for it.
All backends are converted to use surfaces and we reimplement the
backwards compat code in the generic code.
2013-08-07 13:34:10 +02:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Michael Natterer
90b991dd13 quartz: s/gdk_cursor_ref/g_object_ref/ 2012-01-26 10:37:12 +01:00
Kristian Rietveld
fb8717f722 quartz: move utils to gdkutils-quartz.c 2010-12-23 14:17:41 +01:00
Kristian Rietveld
caa9794af8 quartz: Clean up header files, use same arrangement as X11 backend 2010-12-23 14:17:41 +01:00
Kristian Rietveld
f4c0c47a1a quartz: move bits into gdkcursor-quartz.h (private header for now) 2010-12-22 17:47:01 +01:00
Kristian Rietveld
3ace122563 quartz: turn quartz GdkCursor into GObject 2010-12-22 17:47:01 +01:00
Matthias Clasen
a1a0205dad Implment process_updates_recurse vfunc for quartz 2010-12-22 17:46:59 +01:00
Benjamin Otte
4793bd3399 gdk: Move gdk_cursor_get_display() out of the backends
Now that we store the display inside the cursor, that change is obvious.
2010-12-21 12:07:05 -05:00
Benjamin Otte
6218c16ff8 API: Remove gdk_cursor_new_from_pixmap()
gdk_cursor_new_from_pixbuf() is the proper replacement.
2010-09-26 15:02:59 +02:00
Kristian Rietveld
f3a5bf48d4 Fix compile warning in gdk_cursor_new_from_pixmap 2009-12-28 21:18:57 +01:00
Kristian Rietveld
b2b70e5a8d Start using NSInteger and NSUInteger
These have been introduced in Leopard and default to int and unsigned int.
In 64-bit Snow Leopard they are long and unsigned long.  This caused issues
with the getRectsBeingDrawn message which needs a pointer to a NSInteger
(long on 64-bit!) but we passed in an integer.  Surprisingly this problem
was visible when compiling with -O0 (segfault), but *not* when compiling
with -O1.  Other messages were NSInteger is now needed have also been
adapted.

Since NSInteger and NSUInteger are not available on Tiger, a define
has been added to add typedefs for these when they have not been defined
by the system headers.
2009-12-27 19:28:56 +01:00
Kristian Rietveld
785e55f87d Bug 596250 - Gdkcursor-quartz.c doesn't implement GDK_BLANK_CURSOR
Support GDK_BLANK_CURSOR.  Patch by John Ralls.
2009-09-25 18:51:55 +02:00
Johan Dahlin
d97cdbdf53 Include "config.h" instead of <config.h> Command used: find -name
2008-06-21  Johan Dahlin  <jdahlin@async.com.br>

    * *.[ch]: Include "config.h" instead of <config.h>
    Command used:
    find -name \*.[ch]|xargs perl -p -i -e 's/^#include <config.h>/#include "config.h"/g'
    Rubberstamped by Mitch and Tim


svn path=/trunk/; revision=20669
2008-06-22 14:28:52 +00:00
Richard Hult
032b0aab6b Ref the cursor in the cached case.
2007-07-18  Richard Hult  <richard@imendio.com>

	* gdk/quartz/gdkcursor-quartz.c (gdk_cursor_new_for_display): Ref
	the cursor in the cached case.

svn path=/trunk/; revision=18490
2007-07-18 09:52:25 +00:00
Richard Hult
b4e0b5339b Fallback to X cursors for the ones that OS X doesn't provide. Fixes bug
2007-06-25  Richard Hult  <richard@imendio.com>

	* gdk/quartz/Makefile.am:
	* gdk/quartz/xcursors.h:
	* gdk/quartz/gdkcursor-quartz.c: Fallback to X cursors for the
	ones that OS X doesn't provide. Fixes bug #327912.

svn path=/trunk/; revision=18229
2007-06-25 19:43:22 +00:00
Richard Hult
9e2114e629 Clean up namespaces to make the code more maintainable.
2007-04-06  Richard Hult  <richard@imendio.com>

	* gdk/quartz/: Clean up namespaces to make the code more
	maintainable.

	* gdk/quartz/gdkdrawable-quartz.c:
	* gdk/quartz/gdkgc-quartz.c: Fix bug #418384, alignment of tiled
	images, by setting the pattern phase for the CG pattern.

svn path=/trunk/; revision=17584
2007-04-06 21:12:48 +00:00
Mikael Hallendal
7c92045621 Splitted out the GdkPixbuf to NSImage routine so that it can be used from
2006-12-19  Mikael Hallendal  <micke@imendio.com>

	* gdk/quartz/gdkcursor-quartz.c: Splitted out the GdkPixbuf to NSImage
	routine so that it can be used from libgtk as well (needed for
	upcoming GtkStatusIcon support in the Quartz port).
	* gdk/quartz/gdkevents-quartz.c: Don't assume that all NSWindows are
	created from GDK, this is not true for the status icon.
	* gdk/quartz/gdkprivate-quartz.h:
	* gdk/quartz/gdkquartz.h: Added
	gdk_quartz_pixbuf_to_ns_image_libgtk_only so that it is available to
	the status icon code.
2006-12-19 15:53:44 +00:00
Richard Hult
2d41ff51f5 Fix comment. (gdk_window_set_title): Surround by release pool macros.
2006-07-17  Richard Hult  <richard@imendio.com>

	* gdk/quartz/gdkwindow-quartz.c:
	(_gdk_windowing_window_destroy_foreign): Fix comment.
	(gdk_window_set_title): Surround by release pool macros.
	(gdk_window_get_type_hint): Fix return value.
	(gdk_window_get_frame_extents): Implement.
	(gdk_window_iconify): Use the release pool macros.
	(gdk_window_deiconify): Likewise.
	(_gdk_windowing_get_pointer): Implement.
	(gdk_window_get_deskrelative_origin, gdk_window_get_root_origin):
	Implement.

	* gdk/quartz/gdkevents-quartz.c (create_crossing_event)
	(create_scroll_event, convert_window_coordinates_to_root):
	Set coordinates and root coordinates for crossing and scroll
	events.

	* gdk/quartz/gdkcursor-quartz.c (gdk_cursor_new_for_display):
	Map some more cursors.
2006-07-17 08:07:55 +00:00
Anders Carlsson
1097260aa7 Add quartz backend.
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.
2005-11-22 10:03:32 +00:00