Matthias Clasen
2d7583c0e3
Make gdk_window_{lookup,foreign_new}_for_display backend specific
...
At the same time, make GDK_IS_DISPLAY_X11 available in gdkx.h, and
add some exemplaric ifdefs to GTK+ code.
2010-12-21 12:06:59 -05:00
Matthias Clasen
224726f554
Remove gdk_windowing_{get_device_state,window_at_device_position}
...
The !trusted workaround code is pushed down into the GdkDevice
subclasses, and we use the device vfuncs directly in gdkdisplay.c
2010-12-21 12:06:59 -05:00
Matthias Clasen
9635f09623
Move warp functions to the frontend
...
There were already GdkDevice vfuncs for this.
2010-12-21 12:06:58 -05:00
Matthias Clasen
ccb6edeb8b
Add vfuncs for process_updates_recurse and the before and after hooks
2010-12-21 12:06:58 -05:00
Javier Jardón
dfe6ba932c
Don't access GdkDisplay fields directly
...
Use accessors instead.
2010-12-21 12:06:58 -05:00
Matthias Clasen
ea96e5e16f
Explode gdkinternals.h into per-class private headers
...
At the same time, move some more class and instance structs
out of public headers.
2010-12-21 12:06:58 -05:00
Matthias Clasen
9a1cc81acb
Add a vfunc to replace _gdk_windowing_window_destroy_foreign
...
All backends updated.
2010-12-21 12:06:57 -05:00
Matthias Clasen
7f6ac56e3c
Add a vfunc for gdk_window_set_composited
2010-12-21 12:06:57 -05:00
Matthias Clasen
c53ec081ce
Add vtables for DND
...
This commit hides GdkDragContext and GdkDragContextClass, adds
vfuncs for most drag context functionality, and turns the X11 DND
implementation into GdkDragContextX11. We also add vfuncs to
GdkDisplay for gdk_drag_get_protocol and to GdkWindow for
gdk_drag_begin, and implemenet them for X11.
Other backends need similar treatment and are broken now.
2010-12-21 12:06:56 -05:00
Matthias Clasen
de84a7b14f
Move gdk_window_lookup to common code
2010-12-21 12:06:55 -05:00
Alexander Larsson
ac7d55c948
Convert all gdk_window methods to vtable calls
2010-12-21 12:06:54 -05:00
Benjamin Otte
d55073fde6
gdk: Remove depth argument from GdkWindowImpl->get_geometry()
2010-12-06 01:02:52 +01:00
Benjamin Otte
645d0ac403
API: gdk: Remove depth argument from gdk_window_get_geometry()
...
We don't want to expose depth anymore. If you need it, query the visual.
2010-12-06 01:02:52 +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
98838df2db
gdk: Make GdkWindow->impl a GdkWindowImpl
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
d1700d6e3c
gdk: Move ref_cairo_surface from GdkDrawable to GdkWindowImpl
...
Also make it take the actual GdkWindow, not the implementation, like all
the other vfuncs do.
2010-12-02 20:21:03 +01:00
Benjamin Otte
1215f70e23
gdk: Remove GdkDrawable->create_cairo_surface vfunc
...
It's unused.
2010-12-02 20:21:03 +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
1bb6f48bb3
gdk: Rename GdkWindowObject to GdkWindow
...
... and remove most of the casting that used to be necessary.
2010-12-02 20:21:03 +01:00
Benjamin Otte
7acb64f983
gdk: Make GdkWindowImpl a class, not an interface
...
It's a subclass of GdkDrawable and the baseclass for GdkWindowImplX11
etc now.
2010-12-02 20:21:02 +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
Benjamin Otte
e724054d19
API: Remove GDK_WINDOW_XWINDOW() macro
...
Use GDK_WINDOW_XID() instead.
THis was done using sed, so there might be issues resulting to that.
Feel free to fix.
2010-12-02 20:20:56 +01:00
Benjamin Otte
fe6f76a5a2
x11: Make wrapper member a GdkDrawable
...
This is in preparation for getting rid of GdkDrawable as a dependency of
GdkWindow.
2010-12-02 20:17:28 +01:00
Benjamin Otte
88399c041c
x11: Remove GdkDrawableImplX11
...
It's not use anymore, the whole functionality has been moved to
GdkWindowImplX11.
2010-12-02 20:17:27 +01:00
Benjamin Otte
3e6a4af6d3
x11: _gdk_x11_drawable_update_size() => _gdk_x11_window_update_size()
2010-12-02 20:17:27 +01:00
Benjamin Otte
bb79506665
x11: Move cairo_surface and wrapper members to GdkWindowImplX11 struct
2010-12-02 20:17:27 +01:00
Benjamin Otte
1c7f58fdb6
x11: Move xid member from GdkDrawableImplX11 to GdkWindowImplX11
2010-12-02 20:17:27 +01:00
Benjamin Otte
094b0eeb98
x11: Remove screen member from GdkDrawableImplX11
2010-12-02 20:17:27 +01:00
Benjamin Otte
5f12730599
x11: Get display from window, not from impl-drawable's screen
2010-12-02 20:17:27 +01:00
Benjamin Otte
dc7d8dae67
x11: Change GDK_WINDOW_SCREEN macro
...
on't look at GdkDrawableImplX11->screen, but call
gdk_window_get_screen() instead.
2010-12-02 20:17:27 +01:00
Benjamin Otte
3b8aea389d
x11: Use window macros instead of drawable macros
...
GDK_WINDOW_XID() instead of GDK_DRAWABLE_XID()
GDK_WINDOW_XDISPLAY() instead of GDK_DRAWABLE_XDISPLAY()
2010-12-02 20:17:27 +01:00
Benjamin Otte
cf51750bf4
API: x11: gdk_drawable_get_xid => gdk_window_get_xid
...
Also moves the function implementations to gtkwindow-x11.c.
2010-12-02 20:17:27 +01:00
Milan Bouchet-Valat
2e3935ba9d
Fix missing (transfer) annotations in GDK
...
Mostly missing (transfer none).
2010-11-24 21:37:20 +01:00
Owen W. Taylor
a4d59f7415
Create the icon pixmap with the system visual
...
Since what we are doing is turning an icon with alpha into a
no-alpha icon + mask for legacy window managers, it makes more sense
to use the system visual than the window's visual, which might
be ARGB.
https://bugzilla.gnome.org/show_bug.cgi?id=634821
2010-11-19 09:29:43 -05:00
Matthias Clasen
45498417c8
Fix a crash in gnome-terminal when using a compositor
...
In this case, gnome-terminal sets an RGBA visual on its window,
and we need to be careful when creating the icon pixmap, to create
the pixmap with the same depth as the visual, or we risk a BadMatch
from XRenderCreatePicture deep inside cairo.
2010-11-12 19:22:49 -05:00
Benjamin Otte
22d28ef47d
x11: Don't set ParentRelative if the parent's visual is different
...
It's like 82e6e32c
, but when a pattern is given as argument.
https://bugzilla.gnome.org/show_bug.cgi?id=632218
2010-10-15 17:10:05 +02:00
Matthias Clasen
bda1f35585
Inclusion cleanups in sources
...
Try to do inclusions in the same sequence, more or less.
2010-10-14 22:09:36 -04: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
Benjamin Otte
82e6e32c77
x11: Don't set ParentRealtive if the parent's visual is different
...
Causes a BadMatch otherwise, see code comments.
https://bugzilla.gnome.org/show_bug.cgi?id=630864
2010-09-29 12:18:17 +02:00
Benjamin Otte
e8e657725c
x11: Get rid of gdk_drawable_get_size() usage
2010-09-26 15:11:43 +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
28b4567159
x11: Keep a default X Colormap in every visual to construct windows with
...
This way, we can specify a colormap when constructing windows. And ew
must do that to avoid BadMatch from XCreateWindow when we use a
different visual.
2010-09-26 15:11:33 +02:00
Benjamin Otte
47ee996198
x11: Use G_DEFINE_TYPE() to define GdkVisual
...
Also add a priv pointer to GdkVisual and use it for the GdkVisualPrivate
structure. Then Make GdkVisualPrivate actually private to
gdkvisual-x11.c and make other callers use proper function calls to
access it.
2010-09-26 15:11:33 +02:00
Benjamin Otte
571e749d60
x11: Set background color bypassing colormaps
...
Direct and TrueColor visuals don't alloc colors, so they don't need to
fiddle with colormaps. Just copy the code that computes the pixel value
from gdkcolor-x11.c and use it. For other visual types, don't set the
background color and fallback to background = None.
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
b5097de481
gdk: gdk_drawable_get_display() => gdk_window_get_display()
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