summaryrefslogtreecommitdiff
path: root/gdk/gdkdisplay.c
Commit message (Collapse)AuthorAgeFilesLines
* Deprecate more startup-notification APIMatthias Clasen2023-02-011-1/+3
|
* gdk: fix warning when !HAVE_EGLChristian Hergert2023-01-121-1/+1
|
* Deprecate gdk_display_put_eventMatthias Clasen2023-01-091-2/+2
| | | | | | | The documentation already tells you not to use this function. Ifdef the remaining users in the X11 backend.
* gdk: Update docsMatthias Clasen2023-01-071-3/+0
| | | | Update the docs for gdk_display_get_monitor_at_surface.
* Merge branch 'gdk-display-get-monitor-is-nullable' into 'main'Matthias Clasen2023-01-071-1/+1
|\ | | | | | | | | | | | | gdkdisplay: Document get_monitor_at_surface can return NULL Closes #5075 See merge request GNOME/gtk!4917
| * gdkdisplay: Document get_monitor_at_surface can return NULLOndřej Míchal2022-08-011-1/+1
| | | | | | | | Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/5075
* | gdkdisplay: Deprecate gdk_display_notify_startup_complete()Carlos Garnacho2023-01-031-0/+2
| | | | | | | | | | | | | | | | | | We have various layers where we store the startup ID for a request, since this API does not have a GdkToplevel that we can refer about for the Wayland platform, this is the most obvious candidate to start untangling these various layers. Deprecate this call, it is already unused in the gtk/ side.
* | gdk_display_open: Mark arg as nullablenullable-gdkMaximiliano Sandoval R2023-01-021-1/+1
| |
* | Drop gdkintl.hMatthias Clasen2022-09-231-1/+1
| | | | | | | | | | This header was merely including gi18n-lib.h. Just do that directly.
* | Rename gdk-private.h to gdkprivate.hMatthias Clasen2022-09-231-1/+1
| | | | | | | | The extra - does not add any value.
* | gdk: Use the new debug macrosMatthias Clasen2022-09-231-16/+19
| |
* | Make the gl-disable flag always availableMatthias Clasen2022-09-211-1/+1
|/ | | | No need to restrict this to debug builds.
* egl: Fix invalid format stringLoïc Minier2022-05-121-3/+3
|
* Remove all nicks and blurbs from param specsSophie Herold2022-05-111-9/+3
| | | | | | | | Those property features don't seem to be in use anywhere. They are redundant since the docs cover the same information and more. They also created unnecessary translation work. Closes #4904
* gdk: use EGL_KHR_swap_buffers_with_damageChristian Hergert2022-03-031-2/+0
| | | | | | | It appears that NVIDIA does not implement EGL_EXT_swap_buffers_with_damage on their EGL implementation, but does implement the KHR variant of it. This checks for a suitable implementation and stores a pointer to the compatible implementation within the GdkGLContextPrivate struct.
* GDK: Force GLES 3.0+ on libANGLEChun-wei Fan2022-01-191-0/+2
| | | | | ...when libANGLE is being used on Windows, by checking for a Windows-specific an ANGLE-specific extension.
* gdkdisplay.c: Fix builds without EGLChun-wei Fan2021-11-081-25/+29
| | | | | | | We need to ensure that gdk_display_get_egl_display() is available even if EGL is not enabled in the build, so that things will continue to link and work. For builds without EGL, just return NULL.
* gdkdisplay: Remove (nullable)Jordan Petridis2021-10-251-1/+1
| | | | | | | gdk_display_create_gl_context only returns NULL when there is an error set or asserts/aborts. So nullalbe annotation isn't needed. Similar to 53312cf696516cdeb1c284008992022a210bb233
* API: Add gdk_display_create_gl_context()Benjamin Otte2021-10-201-0/+32
| | | | | | | | | | | | This is an alternative to gdk_surface_create_gl_context() when the context is meant to only draw to textures. This is useful in the testsuite or in GStreamer or with GLArea, basically whenever we want to do GL stuff but don't need to actually draw anything on screen. A bunch of code will need to be updated to deal with context->surface being NULL.
* gdkdisplay.c: Include stdlib.hChun-wei Fan2021-10-071-0/+1
| | | | It is needed for qsort().
* gdk: hdr => high depthBenjamin Otte2021-10-061-13/+13
| | | | | | | | | | | | The term "hdr" is so overloaded, we shouldn't use them anywhere, except from maybe describing all of this work in blog posts and other marketing materials. So do renames: * hdr => high_depth * request_hdr => prefers_high_depth This more accurately describes what is going on.
* gdk: Fix an oversightMatthias Clasen2021-10-051-1/+1
| | | | | The intention here was obviously to return the hdr config.
* egl: Implement HDR supportBenjamin Otte2021-10-061-9/+39
| | | | | | | | | | If EGL supports: * no-config contexts * >8bits pixel formats * (optionally) floating point pixel formats Then select such a profile as the HDR format and use it when HDR is requested.
* egl: Support EGL_KHR_no_config_contextBenjamin Otte2021-10-061-0/+2
| | | | | | | If the extension is supported, we create configless contexts. This will come in handy real soon now, we use different configs for HDR and SDR.
* egl: Move extension checks to GdkDisplayBenjamin Otte2021-10-061-1/+5
| | | | We check the same extensions anyway, so no need to duplicate the code.
* egl: Move EGLSurface handling to GdkSurfaceBenjamin Otte2021-10-061-0/+1
| | | | Calling gdk_surface_set_egl_native_window() enables this.
* display: Get carried away by extension checkerBenjamin Otte2021-10-061-4/+50
| | | | | I wanted to make it easy to check for multiple extensions and then got carried away by trying to generate beautiful error messages.
* egl: Move initialization code and port WaylandBenjamin Otte2021-10-061-0/+361
| | | | | | | Moves the EGL initialization code to gdk/ so it can be shared between backends. Also port the Wayland backend to this code, so I know that it works.
* gdk: Remove gdkinternals.hBenjamin Otte2021-09-241-4/+3
|
* gdk: Remove gdk.h include from gdk-private.hBenjamin Otte2021-09-241-0/+1
|
* gdk: Make sure only one GL backend is usedwip/otte/shittymorphBenjamin Otte2021-09-241-0/+2
| | | | | | | | | | | | Creative people managed to create an X11 display and a Wayland display at once, thereby getting EGL and GLX involved in a fight to the death over the ownership of the glFoo() symbolspace. A way to force such a fight with available tools here is (on Wayland) running something like: GTK_INSPECTOR_DISPLAY=:1 GTK_DEBUG=interactive gtk4-demo Related: xdg-desktop-portal-gnome#5
* Add more sysprof marksMatthias Clasen2021-07-221-0/+12
| | | | | | Add a few more marks during gtk_init to figure out where our startup time goes, and avoid the sysprof initialization from distorting the first mark.
* gl: Move vfuncBenjamin Otte2021-07-221-15/+0
| | | | | | | | | | | | | | | | Instead of Display::make_gl_context_current() we now have GLContext::clear_current() GLContext::make_current() This fits better with the backends (we can actually implement clearCurrent on macOS now) and makes it easier to implement different GL backends for backends (like EGL/GLX on X11). We also pass a surfaceless boolean to make_current() so the calling code can decide if a surface needs to be bound or not, because the backends were all doing whatever, which was very counterproductive.
* gdk: Add GdkDisplay::init_gl vfuncBenjamin Otte2021-07-221-5/+130
| | | | | | | | | | | | | | | | | | | | | | | | | The vfunc is called to initialize GL and it returns a "base" context that GDK then uses as the context all others are shared with. So the GL context share tree now looks like: + context from init_gl - context1 - context2 ... So this is a flat tree now, the complexity is gone. The only caveat is that backends now need to create a GL context when initializing GL so some refactoring was needed. Two new functions have been added: * gdk_display_prepare_gl() This is public API and can be used to ensure that GL has been initialized or if not, retrieve an error to display (or debug-print). * gdk_display_get_gl_context() This is a private function to retrieve the base context from init_gl(). It replaces gdk_surface_get_shared_data_context().
* gdk: Add a private struct to GdkDisplayBenjamin Otte2021-07-221-16/+44
| | | | | | | | | | ... and move some members from the GdkDisplay struct. We've always wanted to add one to isolate the display from the backends a bit more, but so far it's never happened. Now that I'm about to add more data to GdkDisplay, it's a good excuse to start.
* Docs: TweaksMatthias Clasen2021-06-051-4/+4
| | | | Remove some more redundant "or NULL" blurbs.
* gdk: Clean up docs syntaxMatthias Clasen2021-05-221-6/+6
| | | | Replace leftover gtk-doc syntax (#Type) with backquotes.
* Documentation fixesMatthias Clasen2021-05-201-19/+18
| | | | | Mostly fixing up indentation of continuation lines, and other small cleanups.
* display: Add property annotationsMatthias Clasen2021-03-111-12/+6
| | | | Connect properties, getters, and setters with annotations.
* gdk: Some more tweaks of the docsMatthias Clasen2021-03-111-125/+132
|
* Add some missing nullable return annotationsSophie Herold2020-10-171-1/+1
|
* gdk: Drop some unused private apiMatthias Clasen2020-10-071-77/+3
| | | | | | No users of gdk_display_peek_event, gdk_display_has_pending _gdk_display_event_data_copy or _gdk_display_event_data_free, so drop all of these, and related vfuncs.
* Clean up lots of GTK+ -> GTKMatthias Clasen2020-09-121-1/+1
| | | | | | Replace most remaining uses of GTK+ in the docs and user-visible strings by GTK. Also remove some leftover "Was added in 3.x" sentences from the docs.
* *: Fix spelling mistakes found by codespellBjörn Daase2020-08-211-2/+2
|
* docs: Clean up dangling links in gdk docsMatthias Clasen2020-08-051-7/+4
| | | | Clean up references to no-longer-existing APIs.
* gdk: Fix toplevel calculation on pointer grab switchCarlos Garnacho2020-07-311-2/+1
| | | | | | | | | | | This check used to read if (grab || device_type != GDK_DEVICE_TYPE_PHYSICAL), the grab check was only reserved to physical devices, which the current pointer device definitely doesn't act like. So the condition was "fixed" the wrong way around, and the latter check is now moot, so the condition should really go away. We always want to check the new toplevel under the pointer here. Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2970
* gdk: Drop gdk_device_get_device_type()Carlos Garnacho2020-07-301-6/+1
| | | | | There is no longer a hierarchy of devices, or none that is seen on the outside.
* gdk: Avoid gdk_device_get_associated_device()Carlos Garnacho2020-07-301-2/+8
| | | | Query the seat for that.
* docs: Don't refer to nonexisting functionsMatthias Clasen2020-07-291-1/+3
| | | | | gdk_surface_input_shape_combine_mask() no longer exists.
* gdk: Move default group api to the X11 backendMatthias Clasen2020-07-291-19/+0
| | | | This is the only place where it is implemented.