Matthias Clasen
366a37d8c1
Add some GdkRGBA tests
2010-10-25 12:01:11 -04:00
Carlos Garnacho
ce06043f17
GdkWindow: Add gdk_window_set_background_rgba()
...
This new function takes a GdkRGBA in order to set the background to
an alpha color. Keep in mind that RGBA visuals and a composited environment
are still necessary to have an alpha background displayed.
2010-10-22 20:14:56 +02:00
Carlos Garnacho
5a5f8081f0
Add GdkRGBA struct to supersede GdkColor
...
GdkRGBA is a boxed struct similar to GdkColor, with the difference
that it stores alpha information as well, and colors are stored in
[0..1] doubles, in the cairo spirit.
gdk_cairo_set_source_rgba() has been also added to allow easier handling
of this new type.
2010-10-22 20:14:56 +02:00
Michael Natterer
0f2d1547f8
gdk: add alpha to the offscreen window's surface if its visual is RGBA
2010-10-20 17:44:23 +02:00
Kristian Rietveld
6e4643de14
Make gdk_pixbuf_get_from_surface() accept negative src_x,y coordinates
2010-10-19 14:07:39 +02: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
Ryan Lortie
ab5fb5dee5
GtkApplication rewrite
2010-10-19 01:31:09 +02:00
Benjamin Otte
e0d7da3c8c
x11: Set GDK_PIXBUF_ENABLE_BACKEND before including files
...
Otherwise we get an undefined gdk_pixbuf_set_option().
2010-10-18 19:22:43 +02:00
Ryan Lortie
8cca398a2f
Gdk X11: Add setter for startup notify ID
...
For launch requests coming in over DBus.
2010-10-18 17:21:22 +02:00
Christian Persch
b5621b3c89
Take cursor hotspot from pixbuf if available
...
Allow -1 for the hotspot coordinates in gdk_cursor_new_from_pixbuf,
if the pixbuf contains the x_hot/y_hot options with appropriate values.
Bug #632140 .
2010-10-15 14:38:21 -04: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
Matthias Clasen
88ef199ed7
Inclusion cleanups in headers
2010-10-14 22:08:53 -04:00
Matthias Clasen
9d644e9d2d
Make gdk.h an include-only header
...
Move declarations to other headers, and introduce some new ones:
gdkmain.h, gdkrectangle.h, gdkthreads.h.
2010-10-14 22:08:48 -04:00
Matthias Clasen
e613d26448
Drop dead gxid_proto.h header
...
This header is no longer used.
2010-10-14 22:08:26 -04:00
Kristian Rietveld
5cbb309841
Initialize device_cursor hash table before creating impl window
2010-10-14 18:01:51 +02:00
Matthias Clasen
34b117865a
Initialize variables
...
valgrind was complaining about uninitialized values here, and
sure enough, gdkdevice-xi.c doesn't set device position.
2010-10-14 08:14:33 -04:00
Michael Natterer
4ca2632d42
gdk: add slots for all GdkWindowObject signals
...
Also add padding for future extension.
2010-10-14 13:43:08 +02:00
Michael Natterer
9d9742f1e5
Bug 631599 - Allow to use arbitrary surfaces for offscreen windows
...
Add signal GdkWindow::create-surface which allows to use any
surface type as storage for offscreen windows.
Test the new signal in tests/gdkoffscreenbox.c
2010-10-14 13:25:23 +02:00
Matthias Clasen
0a8abdcdf6
docs: Update cairo-related docs
2010-10-12 11:29:55 -04:00
Matthias Clasen
ec7c2acf7b
Move GdkVisualType docs inline
2010-10-12 11:29:55 -04:00
Michael Natterer
bef6c0a4a3
Bug 631599 - Allow to use arbitrary surfaces for offscreen windows
...
As a first step, create surfaces lazily and factor surface creation
out to a single function.
2010-10-12 11:34:20 +02:00
Xan Lopez
3f3d33ee6c
Plug leak in gdkcairo.c
...
1,968 (1,236 direct, 732 indirect) bytes in 1 blocks are definitely lost in loss record 11,816 of 11,947
at 0x4025BDC: malloc (vg_replace_malloc.c:195)
by 0x6950676: _context_get (cairo.c:250)
by 0x6950940: cairo_create (cairo.c:370)
by 0x685CD1E: _gdk_cairo_surface_extents (gdkcairo.c:381)
by 0x685CEDA: gdk_cairo_region_create_from_surface (gdkcairo.c:433)
Signed-off-by: Benjamin Otte <otte@redhat.com>
2010-10-11 02:33:09 +02:00
Javier Jardón
9009683247
docs: Region returned by gdk_cairo_region_create_from_surface() should be freed
2010-10-11 02:17:08 +02:00
Tor Lillqvist
e346d26f70
Make it compile again for Windows
2010-10-07 01:28:47 +03: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
Javier Jardón
97bdf55b6d
docs: Move documentation to inline comments: colors
2010-10-04 03:48:05 +02:00
Javier Jardón
9e869af6c5
docs: Move documentation to inline comments: pixbufs
2010-10-04 03:36:12 +02:00
Javier Jardón
a4c2018452
docs: Move documentation to inline comments: regions
2010-10-04 03:19:43 +02:00
Javier Jardón
4e71a4df7b
docs: Move documentation to inline comments: cairo_interaction
2010-10-04 03:04:09 +02:00
Matthias Clasen
6f3c3c3413
Fix a reference in the gdk_pixbuf_get_from_surface docs
2010-10-01 21:43:23 -04:00
Matthias Clasen
30a660213e
More distcheck fixes
2010-10-01 21:40:34 -04:00
Benjamin Otte
872ef111ec
gdk: Make gdk_pixbuf_get_from_*() bindable
...
The ownership of the return value for gdk_pixbuf_get_from_window() and
gdk_pixbuf_get_from_surface() was determined by the first argument.
Because that is an ugly design and the functions are new to GTK3, we
decided to adapt them.
And that adaptation was quite easy since almost no one passses anything
but NULL as the first argument.
2010-10-02 03:08:24 +02:00
Matthias Clasen
0555dd0645
Fix distcheck
...
Don't include config.h in headers, it doesn't work.
2010-10-01 20:02:35 -04:00
Matthias Clasen
d35aa02dd5
Drop GdkSpan type
...
GdkSpan is not used anywhere.
2010-10-01 09:39:10 -04:00
Matthias Clasen
28aa906681
GDK docs: Improve gdk_pixbuf_get_from_window docs
2010-10-01 09:38:36 -04:00
Matthias Clasen
32d1defc76
GDK docs: help gtk-doc understand gdk_window_invalidate_maybe_recurse
2010-10-01 09:10:52 -04:00
Matthias Clasen
448d903c16
GDK docs: improve the gdk_x11_display_error_trap_push docs
2010-10-01 08:16:38 -04:00
Matthias Clasen
036aa0eea9
GdkVisual: tell gtk-doc to ignore the innards
2010-10-01 07:37:26 -04:00
Matthias Clasen
98b497eb99
Remove colormap api from gdk.symbols
2010-10-01 07:09:28 -04:00
Benjamin Otte
7203b72193
gdk: Fix gdk_cairo_region_create_from_surface() with device offsets
2010-09-30 16:24:41 +02:00
Kristian Rietveld
1b9029fc64
Fix GDK build on Quartz
2010-09-30 09:01:11 +02:00
Benjamin Otte
1408bd9a37
gdk: Don't (un)set the background when destroying a window.
...
This previously caused the x11 code to do a XSetWindowBackgroundPixmap
call on a window that was about to be destroyed. And that's not really
useful.
https://bugzilla.gnome.org/show_bug.cgi?id=630864
2010-09-29 12:18:17 +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
Michael Natterer
06773b1e8b
gdk: remove "screen" member from GdkOffscreenWindow, it has become obsolete
...
Also remove screen parameter from _gdk_offscreen_window_new() and get
rid of a bunch on includes in gdkoffscreenwindow.c
2010-09-28 16:05:38 +02:00
Tor Lillqvist
f51f39af2a
Create directory before installing files there
2010-09-28 16:24:24 +03:00
Matthias Clasen
2b3574dda1
Improve some docs
2010-09-27 20:59:08 -04:00
Benjamin Otte
f0d337a0ca
x11: Fix debug code
...
With recent changes, nobody compiled with debug enabled. Fix that.
2010-09-27 17:39:51 +02:00
Benjamin Otte
f52a1fcfbd
API: remove gdk_drawable_get_size()
2010-09-26 15:11:45 +02:00
Benjamin Otte
5b687d938a
gdk: Remove default implementations for get_*_region
...
This should only be used on windows anyway and GdkWindow has an
implementation for both functions.
2010-09-26 15:11:45 +02:00
Benjamin Otte
9826c31a9f
gdk: Get rid of gdk_drawable_get_size() usage
2010-09-26 15:11:43 +02:00
Benjamin Otte
0a57863f73
win32: Get rid of gdk_drawable_get_size() usage
2010-09-26 15:11:43 +02:00
Benjamin Otte
f44f35548d
quartz: Get rid of gdk_drawable_get_size() usage
2010-09-26 15:11:43 +02:00
Benjamin Otte
e8e657725c
x11: Get rid of gdk_drawable_get_size() usage
2010-09-26 15:11:43 +02:00
Benjamin Otte
6c971ac479
API: Remove window clear APIs
...
The feature can and should be implemented manually using
gdk_window_get_background() and Cairo drawing. A non-cairo drawing API
does not make sense in GDK anymore.
2010-09-26 15:11:43 +02:00
Benjamin Otte
fd200f07f5
gdk: No need to clear offscreen window when showing
...
I don't think it's necessary to clear the backing surface when showing
the window, as we're going to repaint it anyway. If it's needed, we can
implement it again using internal APIs, as the public window_clear()
APIs are going away.
2010-09-26 15:11:43 +02:00
Benjamin Otte
af32c9c9be
API: Add size getters for GdkWindow
...
gdk_window_get_width() and gdk_window_get_height() will replace
gdk_drawable_get_size().
2010-09-26 15:11:43 +02:00
Benjamin Otte
5625c20759
x11: When querying window size, ask the wrapper, not ourselves
2010-09-26 15:11:41 +02:00
Benjamin Otte
7c62a44324
gdk: Make GdkWindow cope better with its surface outliving the window
...
Make extra sure we release the surface properly. Also make sure that the
released surface doesn't keep any references to us.
2010-09-26 15:11:41 +02:00
Benjamin Otte
d4f08efd57
API: add gdk_cairo_get_clip_rectangle() convenience API
2010-09-26 15:11:34 +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
94f809d439
gdk: Remove nonexisting function from internal header
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
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
eac72ec830
quartz: Compare visuals for RGBA, not colormaps
2010-09-26 15:11:33 +02:00
Benjamin Otte
504a2d4194
API: Remove gdk_drawable_get_display()
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
7f486231ac
API: Add gdk_window_get_display()
2010-09-26 15:11:33 +02:00
Benjamin Otte
0f13411cb0
x11: Use gdk_window_get_screen() in the testutils
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
5b9bbf9de2
API: Add gdk_window_get_visual() and gdk_window_get_screen()
...
Now that we store the visual in the GdkWindow, these are rather trivial
accessors.
2010-09-26 15:11:32 +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
e316157671
API: gdk_pixbuf_get_from_drawable() => gdk_pixbuf_get_from_window()
...
The Colormap argument needed to be removed, so the renaming is just a
side effect.
2010-09-26 15:11:32 +02:00
Benjamin Otte
2fc80e6102
gdk: Create paint surfaces of the same content as the window
...
Previously, we failed to create RGBA double buffers for RGBA windows.
2010-09-26 15:11:32 +02:00
Benjamin Otte
6a2124d566
gdk: Remove _gdk_drawable_get_source_drawable()
...
Now that we don't create pixmaps anymore, this function is not needed
anymore. The indirection it did previously is now basically moved to
gdk_window_create_similar_surface()
2010-09-26 15:11:31 +02:00
Benjamin Otte
a520b4f372
x11: Remove some unused macros
2010-09-26 15:11:31 +02:00
Benjamin Otte
a7208d675f
x11: s/GDK_DRAWABLE_DISPLAY/GDK_WINDOW_DISPLAY
2010-09-26 15:11:31 +02:00
Benjamin Otte
522becccc0
gdk: Remove pixmap debug category
...
It's not used anywhere anymore.
2010-09-26 15:11:30 +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
9bcbdb7494
x11: Create blank cursor without pixmaps
2010-09-26 15:11:30 +02:00
Benjamin Otte
e6b74551d1
gdk: Get rid of all occurences of "pixmap" in the comments
...
Replace them with the correct term, usually "surface".
2010-09-26 15:11:30 +02:00
Benjamin Otte
55c4cdab1a
x11: Make fallback cursor code not use pixmaps
...
The fallback code for when XCursor wasn't available was still using
GdkPixmap to create the bitmaps.
2010-09-26 15:11:30 +02:00
Benjamin Otte
8d3319f088
x11: Remove last traces of XShm
...
Since deletion of GdkImage, shm is no longer in use.
2010-09-26 15:11:30 +02:00
Benjamin Otte
2b4efe2690
x11: Remove _gdk_x11_convert_to_format()
...
It's unused now.
2010-09-26 15:11:30 +02:00
Benjamin Otte
47292f28d5
x11: Upload cursor image using Cairo
...
There's no need to write our own upload function when the cursor format
is identical to CAIRO_FORMAT_ARGB32.
2010-09-26 15:11:30 +02:00
Benjamin Otte
6607f2b794
API: Rename gdk_set_source_pixmap() to gdk_set_source_window()
...
That's what it's used for now.
2010-09-26 15:11:30 +02:00
Benjamin Otte
e500f997db
gdk: Convert test to not use pixmaps
2010-09-26 15:11:30 +02:00
Benjamin Otte
90b4b88629
API: Remove gdk_window_set_back_pixmap()
...
The same effect can be achieved with
gdk_window_set_background_pattern().
2010-09-26 15:11:30 +02:00