Commit Graph

480 Commits

Author SHA1 Message Date
Kristian Rietveld
fd6e57687d Port Quartz backend to latest rendering-cleanup changes 2010-12-06 14:15:47 +01:00
Benjamin Otte
d55073fde6 gdk: Remove depth argument from GdkWindowImpl->get_geometry() 2010-12-06 01:02:52 +01:00
Benjamin Otte
f9a9567731 gdk: Replace direct calls of _gdk_event_func with _gdk_event_emit()
For now that function just calls the event func.
2010-12-02 20:21:05 +01:00
Benjamin Otte
4d1604c77d gdk: Move window beeps into GdkWindowImpl
One less magic function. Also refactored it to make it easier to
implement. It now returns TRUE if it beeped and FALSE if it failed to do
so. A default implementation exists that just returns FALSE for all the
backends that can't beep windows (read: everything but X11 with XKB -
and why on earth do keyboard libs implement beeping?)
2010-12-02 20:21:05 +01:00
Benjamin Otte
1269f8424f gdk: Make get_shape and get_input_shape vfuncs
Trying to get rid of all the _gdk_windowing_something() functions that
we expect backends to magically know about and instead put them in a
proper interface (mostly GdkWindowImplClass).
2010-12-02 20:21:04 +01:00
Benjamin Otte
17a0a467a1 gdk: Pass the GdkWindow to resize_cairo_surface vfunc
So it's in sync with all the other vfuncs.
2010-12-02 20:21:04 +01:00
Benjamin Otte
370d272b13 gdk: Remove _gdk_window_impl_get_type() function
It was only used in the backends, and they can use the correct type
directly.
2010-12-02 20:21:03 +01:00
Benjamin Otte
62622a94ae gdk: Pass Drawable as argument
We're not passing a GdKWindow here, but the implementation.
2010-12-02 20:21:02 +01:00
John Ralls
c0aae6644a Replace references to sealed GdkDevice private variables with accessor calls in quartz. 2010-11-23 16:53:45 -08:00
William Jon McCann
323df2b280 Make gdk_event_apply_filters safe against changes in filter list
An event filter may add or remove filters itself.  This patch does
two things to address this case.  The first is to take a temporary
reference to the filter while it is being used.  The second is
to wait until after the filter function is run before determining
the next node in the list to process.  This guards against
changes to the next node.  It also does not run functions
that have been marked as removed.  Though I'm not sure if this
case can arise.

https://bugzilla.gnome.org/show_bug.cgi?id=635380
2010-11-22 13:16:24 -05:00
Michael Natterer
a1134e5622 gdk: change signature of gdk_device_get_history() back to what it used to be
"n_events" went back from guint to gint.
2010-10-19 13:30:42 +02:00
John Ralls
c3851df92d Replace GDK_Tab and GDK_ISO_Left_Tab with GDK_KEY equivalents
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=631475

Signed-off-by: Javier Jardón <jjardon@gnome.org>
2010-10-06 01:20:29 +02:00
Kristian Rietveld
eca2af5230 Make set_cairo_surface_size a vfunc on GdkWindowImpl
Note the special implementation of this method on GdkOffscreenWindow
that makes sure its current surface is not destroyed.
2010-10-05 15:38:23 +02:00
Kristian Rietveld
8970b174dc quartz: Emulate root window as 1x1 bitmap
We subclass GdkWindowImplQuartz into a new GdkRootWindowImplQuartz,
and override the get_context method in order to do this cleanly.
Also made release_context a virtual method, since the root window has
to release its CGContextRef differently compared to normal windows.
2010-10-04 11:45:47 +02:00
Kristian Rietveld
1b9029fc64 Fix GDK build on Quartz 2010-09-30 09:01:11 +02:00
Benjamin Otte
f44f35548d quartz: Get rid of gdk_drawable_get_size() usage 2010-09-26 15:11:43 +02:00
Kristian Rietveld
0129b89153 quartz: Get size from wrapper, not drawable 2010-09-26 15:11:34 +02:00
Benjamin Otte
e624656c20 API: Remove GdkColormap 2010-09-26 15:11:34 +02:00
Benjamin Otte
cf4cb4f6d9 API: Remove colormap handling from GdkScreen
In particular, the following functions are gone:
- gdk_screen_get_default_colormap()
- gdk_screen_set_default_colormap()
- gdk_screen_get_system_colormap()
- gdk_screen_get_rgba_colormap()
2010-09-26 15:11:34 +02:00
Benjamin Otte
04d5c477aa API: Remove gdk_drawable_get_colormap()
And with it, remove any notion of colormaps from GdkWindow. In
particular, X11 windows will now not set attrs.colormap when calling
XCreateWindow.
2010-09-26 15:11:33 +02:00
Benjamin Otte
f08254074c API: Remove colormap member from GdkWindowAttr
Also remove all code that cares about differing colormaps for child
windows.
2010-09-26 15:11:33 +02:00
Benjamin Otte
eac72ec830 quartz: Compare visuals for RGBA, not colormaps 2010-09-26 15:11:33 +02:00
Benjamin Otte
b5097de481 gdk: gdk_drawable_get_display() => gdk_window_get_display() 2010-09-26 15:11:33 +02:00
Benjamin Otte
a6ef356107 API: Remove drawable getters for visual, screen and depth
Removed and replaced are:
gdk_drawable_get_visual() => gdk_window_get_visual()
gdk_drawable_get_screen() => gdk_window_get_screen()
gdk_drawable_get_depth()  => gdk_visual_get_depth
                                          (gdk_window_get_visual())
2010-09-26 15:11:33 +02:00
Benjamin Otte
ffed076891 quartz: Remove unused _gdk_quartz_colormap_get_cgcolor_from_pixel() 2010-09-26 15:11:33 +02:00
Benjamin Otte
a6e936788a gdk: gdk_drawable_get_screen/visual => gdk_window_get_screen/visual 2010-09-26 15:11:33 +02:00
Benjamin Otte
eee6c002d1 gdk: store the visual in the GdkWindowObject 2010-09-26 15:11:32 +02:00
Benjamin Otte
894d402c0f API: Remove gdk_drawable_set_colormap() 2010-09-26 15:11:32 +02:00
Benjamin Otte
f74f9b2766 gdk: Remove GdkPixmap
All iusers of it are gone, so it's now time to let go.
cairo_surface_t is a full replacement, combined with
gdk_window_create_similar_surface().
2010-09-26 15:11:30 +02:00
Kristian Rietveld
cadcd029a1 Include OS X system headers 2010-09-26 15:11:30 +02:00
Kristian Rietveld
18a4ed6fd0 quartz: Remove else-clause for pixmaps 2010-09-26 15:11:30 +02:00
Benjamin Otte
2bedd205c5 gdk: Remove gdk_windowing_create_cairo_surface()
Instead, actually use the create_cairo_surface vfunc on the
implementation drawable. D'oh.
2010-09-26 15:11:11 +02:00
Benjamin Otte
2c1633699f gdk: Rewrite background handling
Now the window background is a cairo_pattern_t. The backends will try to
set this as good as they can on the windowing system, but no guarantees
are made on wether the windowing system supports the pattern.

Also gets rid of GDK_NO_BG as undefined behavior is not a good idea to
support, and GDK_NO_BG effectively made the window's contents undefined.
It wasn't effectively used in GTK anyway.
2010-09-26 15:03:00 +02:00
Benjamin Otte
bfa6ad6e7c gdk: Remove _gdk_windowing_get_shape_for_mask()
It's unused. And there's a replacement available with
gdk_cairo_region_create_from_surface()
2010-09-26 15:02:59 +02: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
Benjamin Otte
6ef27387e0 API: remove gdk_window_set_icon()
gdk_window_set_icon_list() now does everything gdk_window_set_icon()
used to do.
2010-09-26 15:02:59 +02:00
Javier Jardón
9c3d1080d6 Do not use deprecated gdk_display_get_core_pointer()
Use gdk_device_manager_get_client_pointer() instead
2010-09-22 03:42:15 +02:00
Havoc Pennington
b837ef5a6d Revamp and modernize X error traps
* add per-display gdk_x11_display_error_trap_push()
  (X11-specific because gdk_error_trap_push() probably
  should have been)
* make gdk_error_trap_push() handle only GDK displays
  not displays opened without a GDK wrapper
* make gdk_error_trap_pop() and gdk_x11_display_error_trap_pop()
  automatically sync only if needed, so manual gdk_flush() is not
  required
* add gdk_error_trap_pop_ignored() which just asynchronously
  ignores errors, so never needs to sync
* add G_GNUC_WARN_UNUSED_RESULT to plain pop(), because
  if you use plain pop() and don't need the return value,
  the async gdk_error_trap_pop_ignored() should be used
  instead. This results in lots of warnings to clean
  up in a later patch.

The main objective here was to avoid the need to sync just
to ignore an error. Now, syncing is automatic, and only
happens when we need to know the error code.

https://bugzilla.gnome.org/show_bug.cgi?id=629608
2010-09-18 18:19:27 -04:00
Kristian Rietveld
234d750bb3 Update Quartz backend for GDK key name changes 2010-09-13 16:26:02 +02:00
Javier Jardón
bd277fad50 Remove deprecated gdk_window_get_deskrelative_origin() and its implementations 2010-09-09 00:50:46 +02:00
Matthias Clasen
eb10e6b128 Remove the long deprecated GDK_WINDOW_DIALOG type.
This has been deprecated forever, and was just left in for
compatibility reasons.
2010-08-28 20:10:02 -04:00
Kristian Rietveld
14cc894dd7 quartz: gdk_window_get_frame_extents() needs to get effective toplevel 2010-08-15 17:34:44 +02:00
Kristian Rietveld
8b917eeaf6 quartz: make it compile 2010-08-12 10:57:59 +02:00
Kristian Rietveld
bde0f9a8f6 quartz: Misc. fixes for getting offscreen windows to work
Mainly fixes to properly differentiate between toplevel and offscreen
windows, since these sometimes need different treatment.  Furthermore,
usage of gdk_window_get_effective_foo() instead of gdk_window_get_foo()
where applicable.
2010-08-10 21:02:31 +02:00
Kristian Rietveld
d819bc4814 Invalidate cairo surface if resizing is not supported for target
While X11 surfaces can be resized, this is not the case for Quartz
surfaces.  Instead of resizing we will invalidate the surface instead.
By giving _gdk_windowing_set_cairo_surface_size() a boolean return
value, we can signal back whether or not resizing was possible.  If not
possible, we invalidate the surface.
2010-08-10 21:02:31 +02:00
Kristian Rietveld
9c6696dfcc quartz: Convert default background drawing to cairo
Includes some untested (read: uncompiled) simplifications from Benjamin
Otte.
2010-08-10 21:02:31 +02:00
Benjamin Otte
c9d08d02e5 gdk: Remove data consructors for GdkPixmap
That is all of the gdk_pixmap/bitmap_create_from_* constructors.
2010-08-10 21:02:31 +02:00
Benjamin Otte
d0d2a6f12c API: remove gdk_colormap_query_color 2010-08-10 21:02:30 +02:00
Kristian Rietveld
f7a8bac5e6 quartz: Make backend compile again 2010-08-10 21:02:29 +02:00
Kristian Rietveld
23c9cee274 quartz: Fix up _gdk_quartz_window_translate 2010-08-10 21:02:29 +02:00