Commit Graph

107 Commits

Author SHA1 Message Date
Matthias Clasen
89ad7893ad gdk: Make GdkKeymap a private api
We have replacement apis in GdkDevice and GdkDisplay.
2020-04-06 16:32:03 -04:00
Carlos Garnacho
c2d92794e2 gdk/x11: Drop GdkDeviceManagerCore
Keep only the XInput2 device manager, which handles "modern" stuff
like scroll and touch.
2019-05-15 01:05:29 +02:00
Alexander Larsson
890080ebf7 GdkWindow -> GdkSurface: File renames
Rename all *window.[ch] source files.

This is an automatic operation, done by the following commands:

for i in $(git ls-files gdk | grep window); do
    git mv $i $(echo $i | sed s/window/surface/);
    git sed -f g $(basename $i) $(basename $i | sed s/window/surface/) ;
done

git checkout NEWS* po-properties po
2018-03-20 11:46:11 +01:00
Matthias Clasen
71c463ae85 x11: Drop GdkX11Visual as public api
There was no useful functionality left here,
so just remove this from the api altogether.
2017-11-17 13:03:11 -05:00
Benjamin Otte
e294f71555 x11: Redo cursor handling completely
Instead of creating a GdkX11Cursor, create GdkCursors. Cache the XCursor
in a hash table instead.

Also, make use of the new fallback mechanism for fallback code: Make
sure to provide cursors for the names that are guaranteed to exist, but
do not do bad attempts at displaying texture surfaces.
Black/White/transparent is not a replacement for those.
2017-11-04 00:07:13 +01:00
Emmanuele Bassi
98b1075764 gdk: Remove GdkX11DisplayManager from the build
We don't instantiate it, and we don't use it any more.
2017-05-03 14:15:57 +01:00
Matthias Clasen
d92fda2103 x11: Port to new monitor api 2016-04-27 23:18:16 -04:00
Alexander Larsson
a71ff33266 gdk: Add support for g_autoptr()
https://bugzilla.gnome.org/show_bug.cgi?id=743640
2015-02-02 09:28:22 +01:00
Alexander Larsson
038aac6275 gdk: Add support for OpenGL
This adds the new type GdkGLContext that wraps an OpenGL context for a
particular native window. It also adds support for the gdk paint
machinery to use OpenGL to draw everything. As soon as anyone creates
a GL context for a native window we create a "paint context" for that
GdkWindow and switch to using GL for painting it.

This commit contains only an implementation for X11 (using GLX).

The way painting works is that all client gl contexts draw into
offscreen buffers rather than directly to the back buffer, and the
way something gets onto the window is by using gdk_cairo_draw_from_gl()
to draw part of that buffer onto the draw cairo context.

As a fallback (if we're doing redirected drawing or some effect like a
cairo_push_group()) we read back the gl buffer into memory and composite
using cairo. This means that GL rendering works in all cases, including
rendering to a PDF. However, this is not particularly fast.

In the *typical* case, where we're drawing directly to the window in
the regular paint loop we hit the fast path. The fast path uses opengl
to draw the buffer to the window back buffer, either by blitting or
texturing. Then we track the region that was drawn, and when the draw
ends we paint the normal cairo surface to the window (using
texture-from-pixmap in the X11 case, or texture from cairo image
otherwise) in the regions where there is no gl painted.

There are some complexities wrt layering of gl and cairo areas though:
* We track via gdk_window_mark_paint_from_clip() whenever gtk is
  painting over a region we previously rendered with opengl
  (flushed_region). This area (needs_blend_region) is blended
  rather than copied at the end of the frame.
* If we're drawing a gl texture with alpha we first copy the current
  cairo_surface inside the target region to the back buffer before
  we blend over it.

These two operations allow us full stacking of transparent gl and cairo
regions.
2014-10-13 10:43:31 -04:00
Javier Jardón
962a5d8b8a Require XInput2.h in X11 backend
Also remove support for XInput.h
2012-03-02 12:52:12 +00:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Carlos Garnacho
6aab48ead0 gdk/x11: Add gdk_x11_device_manager_lookup()
This function can be used to find the GdkDevice wrapping
an XInput2 device ID. For core devices, the Virtual Core
Pointer/Keyboard IDs (2/3) may be used.
2011-07-15 18:14:38 +02:00
Carlos Garnacho
f90c154472 gdk/x11: Add gdk_x11_device_get_id()
This function can be used to find out the XInput2 device ID
behind a GdkDevice, mostly useful when you need to interact
with say Clutter, or raw libXi calls.
2011-07-15 18:14:38 +02:00
Matthias Clasen
27ce9421d0 Fix up GDK docs 2010-12-25 00:02:39 -05:00
Matthias Clasen
bd36374413 Rename GdkAppLaunchContextX11 to GdkX11AppLaunchContext 2010-12-21 12:07:10 -05:00
Matthias Clasen
3fb8c3415b Rename GdkDragContextX11 to GdkX11DragContext 2010-12-21 12:07:09 -05:00
Matthias Clasen
b4802e3042 Rename x11-specific GdkDevice[Manager] implementations
Make them all fit in the gdk_x11_ prefix, and make the
get_type functions and standard macros available in headers.
2010-12-21 12:07:09 -05:00
Matthias Clasen
5cddc7ccbb Rename GdkDevice[Manager]Core to GdkX11Device[Manager]Core
This is mainly to avoid clash with the classes of the same
name in the quartz backend.
2010-12-21 12:07:09 -05:00
Matthias Clasen
e96c193d06 Rename GdkKeymapX11 to GdkX11Keymap
And add a gdkx11keys.h header file.
2010-12-21 12:07:09 -05:00
Matthias Clasen
146fd989d6 Rename GdkDisplayManagerX11 to GdkX11DisplayManager
And add a gdkx11displaymanager.h header file.
2010-12-21 12:07:09 -05:00
Benjamin Otte
04d1459fca x11: Move remaining APIs into gdkx11utils.h
Now gdkx.h is a clean header equivalent to gdk.h.
2010-12-21 12:07:07 -05:00
Benjamin Otte
dd177b5201 x11: Move atom API into gdkx11property.h 2010-12-21 12:07:07 -05:00
Benjamin Otte
ebe46e6f9d x11: Move selection-specific API into gdkx11selection.h 2010-12-21 12:07:07 -05:00
Benjamin Otte
7949073dd5 x11: Move display-specific APIs into gdkx11display.h 2010-12-21 12:07:06 -05:00
Benjamin Otte
6dfa90f57c x11: Move screen-specific API into gdkx11screen.h 2010-12-21 12:07:06 -05:00
Benjamin Otte
0ca6a7ab20 x11: Move visual-specific API into gdkx11visual.h 2010-12-21 12:07:06 -05:00
Benjamin Otte
55f3451754 x11: Move cursor API into gdkx11cursor.h 2010-12-21 12:07:06 -05:00
Benjamin Otte
124cf96850 x11: Split out public window API into gdkx11window.h 2010-12-21 12:07:06 -05:00
Matthias Clasen
572bb20011 Deal with property encoding functions
Move everything dealing with compound text to be X11 specific
Only gdk_text_property_to_utf8_list and gdk_utf8_to_string_target
are kept across backends, so add vfuncs for these.

Also, remove the non-multihead-safe variants of all these.
2010-12-21 12:07:03 -05:00
Matthias Clasen
55e1031e84 Remove gdk_net_wm_supports
This function is totally misnamed, only operates on the default
screen, and has a perfectly fine replacement in
gdk_x11_screen_supports_net_wm_hint.
2010-12-21 12:07:02 -05:00
Matthias Clasen
214342eac5 Clean up gdkx.h a bit
Moving the direct-access redefinitions of various macros
to gdkprivate-x11.h and use that header throughout in x11/.

Also remove a workaround for a long-fixed X server bug.
2010-12-21 12:07:01 -05:00
Matthias Clasen
19cf9309a5 Drop gdkx_visual_get
The function is badly named, not multihead-safe, basically unused,
and has a better replacement with gdk_x11_screen_lookup_visual.
2010-12-21 12:07:01 -05:00
Matthias Clasen
985eb14469 Multiple changes to reduce the amount of unprefixed symbols
The X11 backend exports a number of symbols which are _-prefixed
(so don't become part of the gdk api), but are not named in a
way to prevent accidental clashes between backends.

The one API change here is that the gdk_xid_table functions
have been removed - they did not server an purpose, since the
xid table only stores windows anyway, and we already have a
lookup-by-xid function for windows.
2010-12-21 12:07:00 -05:00
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
4a74060d63 Make gdk_set_sm_client_id X11-specific
This is really not a cross-platform API
2010-12-21 12:06:58 -05:00
Matthias Clasen
17e2c5391c Fix up parameter mismatches in the docs
And other minor gdk doc fixes.
2010-12-03 09:07:06 -05:00
Benjamin Otte
b3e8504111 x11: Don't include gdkprivate.h in gdkx.h
It's private, mkay?
And include it directly where we need it anyway.
2010-12-02 20:21:05 +01:00
Benjamin Otte
2408936bb5 x11: Remove duplicate definition of GDK_WINDOW_XID
Now, where did that come from?
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
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
1c7f58fdb6 x11: Move xid member from GdkDrawableImplX11 to GdkWindowImplX11 2010-12-02 20:17:27 +01:00
Benjamin Otte
5139eecc75 API: x11: Remove GDK_DRAWABLE_XID and GDK_DRAWABLE_XDISPLAY
Window equivalents exist and drawables are on their way out.
2010-12-02 20:17:27 +01:00
Benjamin Otte
91679c384a API: Remove gdk_x11_drawable_get_xdisplay()
No need for the function. Macros exist to do the same thing.
2010-12-02 20:17:27 +01:00
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
Javier Jardón
e2cfecf813 docs: Move documentation to inline comments: x_interaction 2010-11-15 21:06:35 +01: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
Matthias Clasen
88ef199ed7 Inclusion cleanups in headers 2010-10-14 22:08:53 -04:00
Benjamin Otte
e624656c20 API: Remove GdkColormap 2010-09-26 15:11:34 +02:00