summaryrefslogtreecommitdiff
path: root/gdk/meson.build
Commit message (Collapse)AuthorAgeFilesLines
* Alterative sysprof build supportMatthias Clasen2020-08-211-2/+2
| | | | | Don't link libgtk against libsysprof. We only need that for the test-performance binary.
* gdk/toplevel: Negotiate surface size via a compute-size signalJonas Ådahl2020-08-051-0/+3
| | | | | | | | | | | | | | | | | | | | | GTK will not up front know how to correctly calculate a size, since it will not be able to reliably predict the constraints that may exist where it will be mapped. Thus, to handle this, calculate the size of the toplevel by having GDK emitting a signal called 'compute-size' that will contain information needed for computing a toplevel window size. This signal may be emitted at any time, e.g. during gdk_toplevel_present(), or spontaneously if constraints change. This also drops the max size from the toplevel layout, while moving the min size from the toplevel layout struct to the struct passed via the signal, This needs changes to a test case where we make sure we process GDK_CONFIGURE etc, which means we also needs to show the window and process all pending events in the test-focus-chain test case.
* macos: prototype new GDK backend for macOSChristian Hergert2020-07-211-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is fairly substantial rewrite of the GDK backend for quartz and renamed to macOS to allow for a greenfield implementation. Many things have come across from the quartz implementation fairly intact such as the eventloop integration design and discovery of event windows from the NSEvent. However much has been changed to fit in with the new GDK design and how removal of child GdkWindow have been completely eliminated. Furthermore, the new GdkPopup allows for regular NSWindow to be used to provide popovers unlike the previous implementation. The object design more closely follows the ideal for a GDK backend. Views have been broken out into subclasses so that we can support multiple GSK renderer paths such as GL and Cairo (and Metal in the future). However mixed mode GL and Cairo will not be supported. Currently only the Cairo renderer has been implemented. A new frame clock implementation using CVDisplayLink provides more accurate information about when to draw drawing the next frame. Some testing will need to be done here to understand the power implications of this. This implementation has also gained edge snapping for CSD windows. Some work was also done to ensure that CSD windows have opaque regions registered with the display server. ** This is still very much a work-in-progress ** Some outstanding work that needs to be done: - Finish a GL context for macOS and alternate NSView for GL rendering (possibly using speciailized CALayer for OpenGL). - Input rework to ensure that we don't loose remapping of keys that was dropped from GDK during GTK 4 development. - Make sure input methods continue to work. - Drag-n-Drop is still very much a work in progress - High resolution input scrolling needs various work in GDK to land first before we can plumb that to NSEvent. - gtk/ has a number of things based on GDK_WINDOWING_QUARTZ that need to be updated to use the macOS backend. But this is good enough to start playing with and breaking things which is what I'd like to see.
* build: fix linking support on macOS with ClangChristian Hergert2020-07-211-5/+6
| | | | | | This was preventing any sort of building on macOS, even though the quartz backend is currently non-functional. Fixing this is a pre-requisite to getting a new macOS backend compiling.
* Add a GdkDragSurface interfaceMatthias Clasen2020-03-121-0/+2
| | | | This will provide functionality specific to drag icons.
* Introduce GdkToplevelMatthias Clasen2020-03-121-0/+2
| | | | This is a new interface for toplevel surfaces.
* Introduce GdkToplevelLayoutMatthias Clasen2020-03-121-0/+2
| | | | | This will be used in a new GdkTopleve interface in the near future.
* Introduce GdkPopupMatthias Clasen2020-03-111-1/+3
| | | | This is a new interface for popup surfaces.
* gdk: Remove gdk_text_property_to_utf8_list_for_display()Benjamin Otte2020-02-231-3/+0
| | | | | A lot of files became empty now, so they have been removed, which makes this commit seem larger than it is.
* gdk/surface: Replace move_to_rect() with GdkPopupLayout based APIJonas Ådahl2020-02-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the gdk_surface_move_to_rect() API with a new GdkSurface method called gdk_surface_present_popup() taking a new GdkPopupLayout object describing how they should be laid out on screen. The layout properties provided are the same as the ones used with gdk_surface_move_to_rect(), except they are now set up using GdkPopupLayout. Calling gdk_surface_present_popup() will either show the popup at the position described using the popup layout object and a new unconstrained size, or reposition it accordingly. In some situations, such as when a popup is set to autohide, presenting may immediately fail, in case the grab was not granted by the display server. After a successful present, the result of the layout can be queried using the following methods: * gdk_surface_get_position() - to get the position relative to its parent * gdk_surface_get_width() - to get the current width * gdk_surface_get_height() - to get the current height * gdk_surface_get_rect_anchor() - to get the anchor point on the anchor rectangle the popup was effectively positioned against given constraints defined by the environment and the layout rules provided via GdkPopupLayout. * gdk_surface_get_surface_anchor() - the same as the one above but for the surface anchor. A new signal replaces the old "moved-to-rect" one - "popup-layout-changed". However, it is only intended to be emitted when the layout changes implicitly by the windowing system, for example if the monitor resolution changed, or the parent window moved.
* clipboard: file transfer portal supportMatthias Clasen2019-12-121-0/+1
| | | | | | | Implement file-list <-> application/vnd.flatpak.file-list serialization by talking to the file transfer portal. See https://github.com/flatpak/xdg-desktop-portal/pull/222
* Use a single compilation symbolEmmanuele Bassi2019-11-271-1/+1
| | | | | | | | | | | | We use a compilation symbol in our build to allow the inclusion of specific headers while building GTK, to avoid the need to include only the global header. Each namespace has its own compilation symbol because we used to have different libraries, and strict symbol visibility between libraries; now that we have a single library, and we can use private symbols across namespaces while building GTK, we should have a single compilation symbol, and simplify the build rules.
* profiler: port GdkProfiler to sysprof-3Christian Hergert2019-05-291-7/+6
| | | | | | | | | | This uses the new sysprof-3 ABI to implement the capture writer. It also uses the statically linked libsysprof-capture-3.a that is provided with Sysprof for the capture writing to ensure that we do not leak any symbols nor depend on any additional libraries. The GTK_TRACE_FD can be used to pass a FD for tracing into Gtk. Sysprof uses this when the Gtk instrument is selected for recording.
* Get rid of GdkSurfaceImplMatthias Clasen2019-05-281-1/+0
| | | | | | | | We don't need the complicated wrapper system anymore, since client-side windows are gone. This commit moves all the vfuncs to GtkSurfaceClass, and changes the backends to just derive their surface implementation from GdkSurface.
* gdk: Add a profilerMatthias Clasen2019-05-071-0/+8
| | | | | | | This is writing data in the capture format of sysprof, using the SpCaptureWriter. For now, this is using a vendored copy of libsysprof. Eventually, we want to use the static library that sysprof provides.
* rgba: Add gdk_rgba_parser_parse()Benjamin Otte2019-04-121-2/+3
| | | | | | | | | | This function is a (private) function to parse a GdkRGBA accoridng to the CSS specs. We should probably use it for gdk_rgba_parse(), but that would change the syntax we accept there... This also introduces a dependency of libgdk on libgtkcss. So far, no users for this function exist.
* Merge branch 'wip/fanc999/meson.msvc' into 'master'Chun-wei Fan2019-02-231-0/+1
|\ | | | | | | | | GTK+ 4: Improve Windows/Visual Studio build experience See merge request GNOME/gtk!185
| * meson: Build .rc files for WindowsChun-wei Fan2018-12-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | Build the .rc files for Windows so that one can track the version info more easily for Windows, as well as giving GTK+ apps a default icon. Also, move back the manifest embedding for the themed Windows print dialog back into gtk-win32.rc.body.in, so that we just have one way of embedding this manifest file, making things easier for ourselves, as this is supported in the later Visual Studio compilers as well, which is 2013 and later.
* | Add an explicit fribidi depMatthias Clasen2019-02-041-0/+1
|/ | | | We will use fribidi api to determine text direction.
* dnd: Rename headersMatthias Clasen2018-07-021-2/+2
| | | | | | | Rename gdkdnd.h to gdkdrag.h, to go along with gdkdrop.h This commit includes the necessary updates to the X11, Wayland and Broadway backends. Other backends have to be updated separately.
* dnd: Add GdkDrop base class for GdkDragContextBenjamin Otte2018-06-181-0/+2
| | | | | | | | | | | | | | | The ultimate goal of this patch series is to split GdkDragContext into GdkDrop + GdkDrag classes for the destination and source side of a dnd operation. The refactoring is meant to work something like this: 1. Introduce GdkDrop as a base class 2. Make all drop related code (like GdkEvent) use GdkDrop instead of GdkDragContext. Move/duplicate APIs to allow that. 3. Port all drop contexts in the backends from GdkDragContext to GdkDrop 4. Delete all APIs in GdkDragContext that aren't needed anymore. 5. Make GdkDragContext no longer a GdkDrop subclass 6. Rename GdkDragContext to GdkDrag
* Avoid absolute paths when building the API referenceEmmanuele Bassi2018-05-081-3/+4
| | | | | We should always use relative paths, or include_directories objects, to allow using GTK as a subproject.
* gdk: Get rid of GdkDrawingContextBenjamin Otte2018-04-241-3/+0
| | | | All information is kept in GdkDrawContext these days, so use that one.
* gdk: Add GdkCairoContextBenjamin Otte2018-04-241-0/+2
| | | | | | | | This does nothing but disallow passing NULL to gdk_surface_begin_paint() and instead require this context. The ultimate goal is to split out Cairo drawing into its own source file so it doesn't clutter up the generic rendering path.
* build: Remove 'name' kwarg from has_function callsTimm Bäder2018-04-211-2/+2
| | | | They cause warnings with later meson versions.
* GdkWindow -> GdkSurface: File renamesAlexander Larsson2018-03-201-3/+3
| | | | | | | | | | | | | 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
* snapshot: Turn into GObjectBenjamin Otte2018-03-181-0/+2
| | | | | | | This makes GdkSnapshot the base class for GtkSnapshot and hopefully stops confusing bindings. C code should see no difference to before.
* texture: Implement GdkPaintableBenjamin Otte2018-03-161-0/+1
| | | | | This is kind of evil because we need to link to GTK to be able to snapshot, but I hope nobody notices.
* gdk: Add GdkPaintableBenjamin Otte2018-03-161-0/+2
|
* texture: Export gdk_memory_texture_new() and GdkMemoryFormatBenjamin Otte2018-03-121-0/+1
| | | | Also add tests for all these newfangled formats.
* texture: Add GdkMemoryTextureBenjamin Otte2018-03-071-0/+1
| | | | | | | | | | | | | | | | GdkMemoryTexture is a texture implementation for holding data in memory (read: GBytes). You specify the GdkMemoryFormat that data is in and off you go. Renderers can use this to add uploads in various different formats and don't need to fallback to GDK doing the conersion on the CPU. Supported formats can be extended if we need new ones, for now I just added the relevant ones for Cairo and GdkPixbuf. The constructor is also private still, because I'm not sure we want to export GdkMemoryFormat. Wrappers that do from_cairo_surface() and for_pixbuf() do exist though.
* gdk: Split out GL textureBenjamin Otte2018-03-071-0/+2
| | | | | | | Put GdkGLTexture into its own file and rename the API to gdk_gl_texture_foo() instead of gdk_texture_foo_for_gl(). Apart from naming, no actual code changes.
* build: Error if no backends enabledPatrick Griffis2018-02-271-0/+4
|
* build: Use pkg-config to find VulkanEmmanuele Bassi2018-02-051-1/+1
| | | | | | | | | | | | The standard Vulkan SDK ships with a pkg-config file, like a modern library should. We should fall back to finding the library and header only for platforms where pkg-config is not really a thing. Based on a patch by: Daniel Stone <daniels@collabora.com> https://bugzilla.gnome.org/show_bug.cgi?id=793181
* Drop the mir backendMatthias Clasen2018-02-051-2/+1
| | | | | Mir is in the process of switching over to the Wayland protocol, so we don't need to maintain a separate backend, going forward.
* Remove all gdk_threads_* entry pointsEmmanuele Bassi2018-02-031-1/+0
| | | | | | Now that we don't use them anywhere, it's time for them to go. https://bugzilla.gnome.org/show_bug.cgi?id=793124
* gdk: Remove selection definesBenjamin Otte2017-12-141-1/+0
| | | | | | And with it, remove the selections section from the docs. So selections are gone for good now.
* clipboard: Add serializationBenjamin Otte2017-12-031-0/+2
| | | | This completes the local clipboard code.
* clipboard: Implement local fallback clipboard transfersBenjamin Otte2017-12-031-0/+1
| | | | | | | This requires implementing a "pipe" so we can have 2 streams running: contentprovider => serializer => outputstream inputstream => deserializer => reader And the pipe shoves the data from the outputstream into the inputstream.
* clipboard: Introduce GdkContentProviderBenjamin Otte2017-12-031-0/+4
| | | | | | | | | | | GdkContentProvider is the object that represents local data in the clipboard. This patch only introduces the object and adds the clipboard properties, it does not yet provide a way for the actual implementations to access it. The only access that is implemented is the local shortcut GValue access.
* gdk: Im[plement content deserializingBenjamin Otte2017-12-031-0/+2
| | | | | Add infrastructure to do GInputStream => GType conversions. Use that to implement gdk_clipboard_read_value() which reads into GValues.
* gdk: A GdkClipboard API draftMatthias Clasen2017-12-031-0/+2
| | | | | This commit adds a GdkClipboard object which is intended to replace GtkClipboard, eventually.
* Drop GdkDeviceManager entirelyMatthias Clasen2017-11-251-2/+0
| | | | Nothing uses it anymore.
* gdk: Move GtkTargetList to GDKBenjamin Otte2017-11-201-0/+2
| | | | | | It's gonna be renamed next, so put it in the right source file already. For now retain the old name to keep the diff small.
* Drop gdkscreen.hMatthias Clasen2017-11-171-1/+0
| | | | Nothing uses GdkScreen anymore, so we can get rid of it.
* Remove gdkprivate.hMatthias Clasen2017-11-171-2/+0
| | | | | This is one-too-many private headers. Move the few declarations here to gdkinternals.h.
* Drop gdkmain.hMatthias Clasen2017-11-171-1/+0
|
* Drop an empty fileMatthias Clasen2017-11-171-1/+0
| | | | Nothing deprecated left!
* GskTexture => GdkTextureBenjamin Otte2017-11-041-0/+2
| | | | We want this thing to replace GdkPixbuf, so it has to live in GDK.
* Drop GdkScreen from public apiMatthias Clasen2017-11-011-1/+0
| | | | | It is still used by some of the backends, so keep the files around.