Commit Graph

3783 Commits

Author SHA1 Message Date
Benjamin Otte
3af4432c6f API: x11: Remove gdk_x11_window_get_drawable_impl()
It's not used anymore
2010-12-02 20:17:27 +01:00
Benjamin Otte
deffc9e39f API: x11: Change GDK_WINDOW_XDISPLAY() macro
Instead of lots of magic, we can go the usual way of requesting the
XDisplay of the window's display. So we do that.
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
Matthias Clasen
670dfdb7cc Re-add some conditionals to symbols files
We need to keep the ifdefs for platform abi differences.
2010-11-29 12:47:44 -05:00
Matthias Clasen
a562646678 Add gdk_device_get_n_keys to symbol list 2010-11-29 11:49:11 -05:00
Emmanuele Bassi
1779ae79a1 rgba: Invert the arguments and improve bindability
Since parse() is a method of the Gdk.RGBA class, the GdkRGBA pointer
should be the first argument, and the string the second one, to allow a
more natural binding.

https://bugzilla.gnome.org/show_bug.cgi?id=635879
2010-11-28 19:01:51 +00:00
Matthias Clasen
b0bf2b5202 Avoid delays in starting applications
Only query file info once, and don't do it for non-native files, since
that may cause sync network IO.

Bug http://bugzilla.gnome.org/show_bug.cgi?id=635588
2010-11-27 23:12:09 -05:00
Milan Bouchet-Valat
2e3935ba9d Fix missing (transfer) annotations in GDK
Mostly missing (transfer none).
2010-11-24 21:37:20 +01:00
Michael Natterer
aaf8530177 gdk: remove GdkDeviceKey and GdkDeviceAxis from the public API
move GdkDeviceKey to gdkdevice.c because it's still used there, remove
GdkDeviceAxis entirely.
2010-11-24 20:28:19 +01:00
Michael Natterer
bdf18500ec gdk: gdk_device_get_n_keys() is now Since: 2.24 2010-11-24 20:16:25 +01:00
Benjamin Otte
fd96b16c15 gdk: Remove unused macros from build
Both ALL_FILES and INCLUDE_VARIABLES don't exist anymore
2010-11-24 16:18:46 +01:00
Benjamin Otte
cca530070e gdk: Clean up gdk.symbols file
Remove all the macro madness and sort it alphabetically.
2010-11-24 16:15:47 +01:00
Tor Lillqvist
290ecb0aba Fix compilation breakage in gdk/win32 2010-11-24 14:26:53 +02:00
John Ralls
c0aae6644a Replace references to sealed GdkDevice private variables with accessor calls in quartz. 2010-11-23 16:53:45 -08:00
Michael Natterer
fb5dd9f72f Move all GdkDevice members to private and add one missing accessor 2010-11-23 20:25:13 +01: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
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
Javier Jardón
b204995c6d docs: Move documentation to inline comments: event_structs
All the GDK documentation is now moved to inline comments
2010-11-15 21:08:11 +01:00
Javier Jardón
e2cfecf813 docs: Move documentation to inline comments: x_interaction 2010-11-15 21:06:35 +01:00
Javier Jardón
a384b35bb5 docs: Move documentation to inline comments: drawing 2010-11-15 21:06:35 +01:00
Javier Jardón
b63800bd33 docs: Move documentation to inline comments: gdkthreads 2010-11-15 21:06:35 +01:00
Javier Jardón
4400f997a8 docs: Move documentation to inline comments: gdkevents 2010-11-15 21:06:35 +01:00
Javier Jardón
d2915ed9d1 docs: Move documentation to inline comments: properties 2010-11-15 21:06:34 +01:00
Javier Jardón
2f06ec02be docs: Move documentation to inline comments: gdkselection 2010-11-15 18:24:31 +01:00
Javier Jardón
6bfdecef7a docs: Move documentation to inline comments: gdkvisual 2010-11-15 18:24:31 +01:00
Javier Jardón
9a8fcfa65a docs: Move documentation to inline comments: gdkpango 2010-11-15 18:24:31 +01:00
Javier Jardón
cc13047315 docs: Move documentation to inline comments: gdkcursor 2010-11-15 18:24:31 +01:00
Bastien Nocera
157ec27a9a gdk: Add big fat warning about updating XSettings
There's a tool to see if we forgot to update the gdk_settings_map
array, or got the offsets wrong. Mention those above the XSettings
list.
2010-11-15 17:15:19 +00:00
Bastien Nocera
6b23787d5a gdk: Update gdk_settings_map for blink timeout to work
gdk_settings_map needs to be updated when gdk_settings_names is changed,
and it's easier to add the setting at the end, so we don't need to
recalculate everything.

Really fixing:
https://bugzilla.gnome.org/show_bug.cgi?id=634697
2010-11-15 17:15:19 +00:00
Javier Jardón
9677dc0b60 docs: gdkrgba: Add "Since: 3.0" tags 2010-11-15 06:04:06 +01:00
Javier Jardón
1268c17983 docs: Move documentation to inline comments: general 2010-11-15 05:35:40 +01:00
Javier Jardón
2cd0302e64 docs: Move documentation to inline comments: gdkkeys 2010-11-15 05:19:33 +01:00
Javier Jardón
44ff1d86b4 docs: move documentation to inline comments: gdktesting 2010-11-15 04:12:57 +01:00
Javier Jardón
5f89dea7f1 docs: Move documentation to inline comments: gdkscreen 2010-11-15 04:12:57 +01:00
Javier Jardón
133dfe55f3 docs: Move documentation to inline comments: gdkdisplaymanager 2010-11-15 04:12:57 +01:00
Javier Jardón
ca480f3771 docs: Move documentation to inline comments: gdkdisplay 2010-11-15 03:37:21 +01:00
Javier Jardón
8ca6882e88 docs: Move documentation to inline comments: gdkapplaunchcontext 2010-11-15 03:18:45 +01: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
Bastien Nocera
7a52b1df67 gdk: Add XSetting for "gtk-cursor-blink-timeout"
Otherwise the blink timeout is the one used by default in GTK+.

https://bugzilla.gnome.org/show_bug.cgi?id=634697
2010-11-12 19:11:21 +00:00
John (J5) Palmieri
cdf517d1c8 [introspection] add transfer none annotation to gdk_keyval_name return
* moved docs from .sgml file to th e.c file so we can add the annotation
2010-11-09 21:00:14 -05:00
Tor Lillqvist
1e9c091457 Avoid a compiler warning 2010-11-06 13:13:37 +02:00
Tor Lillqvist
6e56d05cbc Drop unused static function 2010-11-06 13:13:10 +02:00
Owen W. Taylor
5daab52661 Switch to CSS interpretation of rgb() and rgba() colors
CSS3 defines a somewhat odd syntax for rgba() colors - the rgb values
are integers from 0 to 255 or percentages and the a value is a
float from 0 to 1. To avoid increasing the total amount of confusion
in the world, make gdk_rgb_to_string() and gdk_rgb_parse() follow
this syntax rather than using floats for r, g, and b.

https://bugzilla.gnome.org/show_bug.cgi?id=633762
2010-11-03 13:41:45 -04:00
Christian Persch
edec3e12dd Make gdk_rgba_to_string() take a const GdkRGBA
https://bugzilla.gnome.org/show_bug.cgi?id=633216
2010-10-29 21:16:52 -04:00
Carlos Garnacho
b1dec866e5 Use the client pointer for events with no device.
The core pointer is sort of meaningless in a multidevice environment,
the client pointer is used instead to fake a GdkDevice on events that
don't have one.
2010-10-28 23:01:16 +02:00
Owen W. Taylor
398728feb5 Remove unused GdkDeviceManager variable
gdk_display_get_device_manager() was called but the device manager
not used.
2010-10-28 16:43:55 -04:00
Matthias Clasen
a7285e6435 Include gdkrgba.h 2010-10-25 14:35:19 -04:00
Matthias Clasen
9c60da8978 Add new GdkRGBA api to symbol list 2010-10-25 13:44:43 -04:00
Matthias Clasen
377e7179b8 Add tests for GdkRGBA serialization
In particular, test that serialization is not dependent on the
locale.
2010-10-25 12:10:48 -04:00
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
Benjamin Otte
4a9c32dc36 API: Remove APIs to generate pixmaps from pixbufs
The 3 functions in question were:
- gdk_pixbuf_render_threshold_alpha()
- gdk_pixbuf_render_pixmap_and_mask()
- gdk_pixbuf_render_pixmap_and_mask_for_colormap()

All of them can be replaced using Cairo if they have to. The
functionality is only needed to talk to old X interfaces and normal apps
do fine without them.
2010-09-26 15:11:29 +02:00
Benjamin Otte
6453710266 x11: Set the icon using Cairo
No more GdkPixmap to store the icon and its mask, but instead use cairo
surfaces. Also render the icon into the surfaces using Cairo instead of
gdk_pixbuf_render_threshold_alpha().
2010-09-26 15:11:29 +02:00
Benjamin Otte
332652f702 API: Change offscreen windows to use a cairo_surface_t
This requires changes to all the offscreen surface getters that used to
return a GdkPixmap before.
2010-09-26 15:11:29 +02:00
Benjamin Otte
ebdf26e1d8 gdk: Use surfaces for double buffering
Don't use pixmaps anymore. Also use subsurfaces for implicit paints and
correcly set device offsets.
2010-09-26 15:11:11 +02:00
Benjamin Otte
666539736d gdk: Make csw windows have their own cairo surface
With Cairo 1.10 now having cairo_surface_create_for_rectangle(), we can
use them. No need to create multiple native surfaces for the same X
window (ugh) anymore.
2010-09-26 15:11:11 +02:00
Benjamin Otte
b69fdbbd04 API: Remove gdk_window_get_internal_paint_info()
This function should not exist in public API, it exposes too many
internals.
2010-09-26 15:11:11 +02:00
Benjamin Otte
d04bb38b28 gdk: offscreen window source drawable now is the root window
As the source drawable is only used for creating pixmaps these days, we
don't have to keep a real drawable around, but can just use the root
window.
2010-09-26 15:11:11 +02:00
Benjamin Otte
6d27362620 gdk: Create surfaces directly, not from the source drawable
The notion of a source drawable does not make a lot of sense for windows
that are not backed by a drawable, such as GdkOffscreenWindow after
converting it to cairo_surface_t.
2010-09-26 15:11:11 +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
d7335837e0 gdk: Remove gdk_window_redirect_to_drawable()
Also remove the reverse gdk_window_remove_redirection().

The code was only used by the snapshotting code, and that code is dead
now.
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
c250b3fe1d gdk: Remove supports_native_bg on WindowImplIface
This will not be TRUE for anything anymore, once we fix background
handling.
2010-09-26 15:03:00 +02:00
Benjamin Otte
95686cb704 gdk: Remove send_expose event from gdk_window_clear_region_internal()
It's always FALSE.
2010-09-26 15:03:00 +02:00
Benjamin Otte
547e2cc837 gdk: Remove GdkWindowImpl->clear_region
It was only used on the X11 backend and is easier to implement locally,
in particular when we want to allow backgrounds that X can't handle.
2010-09-26 15:03:00 +02:00
Benjamin Otte
3d98537c2e gdk: Simplify clear_area code
No more use for a gdk_window_clear_area_internal() function as there's
just one caller.
2010-09-26 15:03:00 +02:00
Benjamin Otte
6ab793da8d API: Remove gdk_window_clear_area_e()
Awesome name for a function. Plus, it's unused and its functionality can
easily be replicated.
2010-09-26 15:03:00 +02:00
Benjamin Otte
4b57560666 gdk: Don't use clear_area_e() in offscreenwindow
Instead, call gdk_window_invalidate_rect() ourselves.
2010-09-26 15:02:59 +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
a7fec8cf46 API: Remove shape_combine_mask functions from gdk
This removes gdk_window_shape_combine_mask() and
gdk_window_input_shape_combine_mask(). GdkBitmap is going away and a
replacement exists via the combine_region() functions and
gdk_cairo_region_create_from_surface().
2010-09-26 15:02:59 +02:00
Benjamin Otte
96b387599d API: Add gdk_cairo_region_create_from_surface()
The function converts the given surface into an alpha bitmap mask. This
is mostly useful for setting shape regions.

Also adds a new internal function _gdk_cairo_surface_extents() that
computes a surface's extents.
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
Benjamin Otte
241f38992b x11: remove icon_window property, it's not used anymore 2010-09-26 15:02:59 +02:00
Benjamin Otte
c65bb2b3b4 x11: Set icon based on icon list
Basically copies the code for setting the WM icon hint from GtkWindow to
GdkWindow. This achieves the following:
- Putting this X11 specific code into the X11 backend
- Enables removal of gdk_window_set_icon()
- Gets rid of Pixmap/Bitmap usage outside of GDK.
2010-09-26 15:02:59 +02:00
Tomeu Vizoso
41f4fd94df Don't try to unref event->dnd.context unconditionally.
As it's not set in gdk_event_new but eventually later.

https://bugzilla.gnome.org/show_bug.cgi?id=630520
2010-09-24 18:20:41 +02:00
Javier Jardón
9ef738c4ab Add deprecation guards for gdk_device_get_core_pointer() 2010-09-22 03:53:23 +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
Matthias Clasen
59bc9e8860 Fix an off-by-one error in serial range handling
trap->end_sequence is the first serial for which we don't
ignore errors anymore, so we know the trap is dead if
end_sequence <= processed_serial.

Bug 629608
2010-09-21 21:10:15 -04:00
Owen W. Taylor
93e203e067 Use g_warning() for X errors and X IO errors
Currently fprintf(stderr, ...) is used for X error and X IO errors
(unless compiled with debugging, in which case g_error() is used for
X errors.)

But if an application is redirecting log messages, we really want
X errors to appear in that same log, so it's better to use a g_logv()
variant.

Though g_warning() isn't really appropriate for "lost connection to the
server", G_LOG_LEVEL_INFO isn't part of the "prefixed log levels"
so will produce output without the application name and PID.

https://bugzilla.gnome.org/show_bug.cgi?id=630216
2010-09-21 00:30:46 -04:00
Matthias Clasen
e0aa12eb0a Tons of transfer annotations 2010-09-21 00:18:11 -04:00
Johan Dahlin
6ba904486c Add a couple of missing transfer annotations 2010-09-20 23:45:01 -03:00
Johan Dahlin
330bc154ed Fixup gtk-doc comment syntax 2010-09-20 23:40:21 -03:00
Matthias Clasen
2ddfaeddad More error trap cleanups
Remove syncs in front of gdk_error_trap_pop() calls, and convert
gdk_error_trap_pop() calls to gdk_error_trap_pop_ignored() in gdk.
2010-09-20 16:40:14 -04:00
Owen W. Taylor
14e38da150 Only store error codes in inner-most X error trap
When an error occurs with nested traps in place, only the innermost
trap should have the error code stored in it; outer traps are
shielded by the inner trap.

https://bugzilla.gnome.org/show_bug.cgi?id=629608
2010-09-20 16:35:41 -04:00
Matthias Clasen
def95d1319 Add new error trap api to gdk.symbols and gdk3-sections.txt 2010-09-19 22:45:02 -04:00
Havoc Pennington
e32ab82069 Improve tests for X error traps, fix two bugs
* don't lose track of previous X error handler
  if nested traps are pushed
* free any remaining traps when display
  is finalized

Test will fail unless bug 630032 is closed so
gdk_display_close() works.

https://bugzilla.gnome.org/show_bug.cgi?id=630033
2010-09-18 23:03:31 -04:00
Havoc Pennington
c7d73ee587 Fix bugs that crashed gdk_display_close() on x11
* _gdk_device_set_associated_device() did not allow NULL device
* GdkDisplay should dispose device manager to avoid devices
  trying to touch the display in finalize
* GdkDeviceManagerXI did not ref devices in id hash
* GdkDisplayX11 did not ref devices in ->input_devices
2010-09-18 22:57:36 -04: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
Havoc Pennington
8d5b4e9f6e Replace crufty old code for gdk error traps with GQueue and GSlice
No need to do a manual free list these days.

https://bugzilla.gnome.org/show_bug.cgi?id=629608
2010-09-18 16:44:25 -04:00
Havoc Pennington
de3512dbba Remove trailing whitespace and obsolete doc comments from gdk_error_trap code
(there are actual docs in the template file, these were some kind of
pre-gtk-doc comments without useful info)

https://bugzilla.gnome.org/show_bug.cgi?id=629608
2010-09-18 16:39:56 -04:00
Matthias Clasen
28c66ed9b0 Fix a doc comment 2010-09-17 09:25:49 -04:00
Matthias Clasen
bf19aa46e9 Scan gdk/x11 sources for Gdk-3.0.gir
The doc comments (with annotations) for some of the gdk api are down
in x11/ sources, so we need to scan those too, when building Gdk-3.0.gir.
2010-09-17 09:23:30 -04:00
Matthias Clasen
6aa8941b84 Add annotations
The goi scanner warns about these nowadays.
2010-09-17 00:18:20 -04:00
Colin Walters
bf2a7ee1b6 introspection: Only use 0.9.3 API 2010-09-15 15:07:58 -04:00
Sebastian Dröge
560ca1eaad gdk: Only use XComposite if it is available
Fixes build if it isn't available. Bug #629748.
2010-09-15 16:42:57 +02:00
Adel Gadllah
85ae875dcb [GdkWindowCache] Don't ignore the CompositeOverlayWindow
Add the composite overlay window to the cache, as this can be a reasonable Xdnd proxy as well.

This is only done when the screen is composited in order to avoid mapping
the COW. We assume that the CM is using the COW (which is true for pretty
much any CM currently in use).

https://bugzilla.gnome.org/show_bug.cgi?id=601731
2010-09-13 18:20:22 +02:00
Kristian Rietveld
234d750bb3 Update Quartz backend for GDK key name changes 2010-09-13 16:26:02 +02:00
Javier Jardón
e3fafd7512 docs: Fix gdk_display_get_core_pointer() docs
Point to gdk_device_manager_get_client_pointer(),
not gdk_display_get_client_pointer().
2010-09-13 02:48:21 +02:00
Matthias Clasen
08dd02fe25 Don't use g_idle_add to schedule idles in GDK
We need to use gdk_threads_add_idle, in order to keep GDK code
under the GDK lock.

Bug 629277
2010-09-10 22:32:44 -04:00
Matthias Clasen
056ec835cc Include gdkkeysyms.h in gdk.h
Followup to bug 629093
2010-09-10 11:08:18 -04:00
Matthias Clasen
0dcaad3a85 Drop the gdk_display variable from gdk
This was the last exported variable; it wasn't multihead safe,
and there's easy replacement with gdk_display_get_default().
Also drop the GDK_DISPLAY() macro which was just a wrapper around
the variable.
2010-09-09 19:46:41 -04:00