Commit Graph

3946 Commits

Author SHA1 Message Date
Benjamin Otte
52d2faef88 gsk: Add gsk_cairo_node_new()
Split off Cairo drawn content nodes and require you to allocate them
using this new function.
2016-12-20 18:01:09 +01:00
Benjamin Otte
d1b80a6baa gtk: Don't push cairo nodes
We want to split nodes into containers and nodes that do actual drawing.
So pushing nodes that do drawing is exactly the wrong thing.

Also fix up GtkPopover. There's no need for it to push anything.
2016-12-20 18:01:09 +01:00
Benjamin Otte
8c8691b469 gsk: Add gsk_texture_node_new()
Start the transition into the different node types.
2016-12-20 18:01:09 +01:00
Benjamin Otte
ac5e277a71 gsk: Add GskRenderNodeType
For now, this is unused.
2016-12-20 18:01:09 +01:00
Benjamin Otte
f258af9cce gsk: Remove GskRenderNodeIter 2016-12-20 18:01:09 +01:00
Benjamin Otte
9bff1c12d4 gsk: Remove custom GValue API for GskRenderNode 2016-12-20 18:01:09 +01:00
Benjamin Otte
ff884385c0 gsk: Remove GskRenderNode::hidden
If you want to hide something, don't render it.
2016-12-20 18:01:09 +01:00
Benjamin Otte
04a2c1499a gsk: Remove RenderNode::anchor-point 2016-12-20 18:01:09 +01:00
Debarshi Ray
7ea199c831 flowbox: Export gtk_flow_box_get_child_at_pos as public API
https://bugzilla.gnome.org/show_bug.cgi?id=776187
2016-12-20 00:35:17 +01:00
Benjamin Otte
795f38b4cc cellview: Remove code to modify the background
GtkCellView has a gadget, so peopl can do all their shenanigans with
CSS.

And the original use case (overriding the background so that the
cellview's GdkWindow shares the background color of the combobox) is
outdated since we have transparent backgrounds.
2016-12-19 05:36:06 +01:00
Matthias Clasen
8fb311cb4b Document the border-spacing CSS property 2016-12-10 20:34:24 -05:00
Benjamin Otte
8915be00d1 gdkgl: Add gdk_gl_context_get_damage()
This is a way to query the damaged area of the backbuffer.

The GL renderer uses this to compute the extents of that damage region
(computed via buffer age) and use them to minimize the area to redraw.

This changes the semantics of GL rendering to "When calling
gdk_window_begin_frame() with a GL context, the area by
gdk_gl_context_get_damage() needs to be redrawn and every other pixel of
the backbuffer is guaranteed to be correct.
After gdk_window_end_frame() on a GL-drawn window, the whole backbuffer
must be correct.

We can always glXBufferSwap() now because of this.
2016-12-05 15:02:47 +01:00
Benjamin Otte
60567db486 gskrenderer: Add gsk_renderer_begin_draw_frame()
This way, we can hijack the begin/end draw process and do out own
processing before passing it on to GDK.
2016-12-05 15:02:47 +01:00
Benjamin Otte
db8e3065bd gdk: Add GdkDrawContext
This will be the base class for GdkVulkanContext and GdkGLContext.
2016-12-05 15:02:47 +01:00
Benjamin Otte
e42e27304a gskrenderer: Store the GL context
And use it to create the drawing context with it.

Note that this doesn't yet have any effect and is all infrastructure
preparation work.
2016-12-05 15:02:47 +01:00
Benjamin Otte
5563841603 gsk: Add gsk_renderer_new_for_window()
and remove gsk_renderer_get_for_display().

This new function returns a realized renderer. Because of that, GSK can
catch failures to realize, destroy the renderer and try another one.

Or in short: I can finally use GTK on Weston with the nvidia binary
drivers again.

Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
2016-11-30 15:56:00 +01:00
Benjamin Otte
ce98df881f gsk: Change gsk_renderer_realize()
Instead of having a gsk_renderer_set_window() call, pass the window to
realize(). This way, the realization can fail with the wrong window.

Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
2016-11-30 15:55:45 +01:00
Benjamin Otte
2a27b7ecc6 API: Remove gdk_window_process_all_updates()
It's completely unused since we have a frame clock.
2016-11-23 19:10:34 +01:00
Benjamin Otte
ef75ca2d53 API: gdk: Remove gdk_window_process_updates()
We have a frame clock now.
2016-11-23 19:02:58 +01:00
Benjamin Otte
4850271ae8 API: Remove gtk_cairo_should_draw_window()
The answer is: Yes.
2016-11-23 18:48:38 +01:00
Matthias Clasen
8a88745186 Some additions to the migration guide 2016-11-20 08:14:19 -05:00
Benjamin Otte
e62a4d8eea API: gdk: Remove ability to render window contents
The functions gdk_pixbuf_get_from_window() and
gdk_cairo_set_source_window() are unreliable and depend on the windowing
system (they work great on X11 and Win32, less so on Quartz and Wayland).

With the switch to new drawing API and OpenGL, we can definitely no
longer support a generic way to snapshot windows.

People should either write windowsystem-specific code or draw their
widgets directly - like with gtk_widget_draw() - if they need to get a
rendering.
2016-11-20 11:47:44 +01:00
Benjamin Otte
78888ade0d tools: Rewrite screenshotting code for shooter
Uses X directly, so bypasses both the need to query the root window and
to draw window contents.
2016-11-20 11:43:09 +01:00
Matthias Clasen
fd6d28dd8d Add some things to the sections file
This makes gtk-doc happier.
2016-11-19 13:46:13 -05:00
Matthias Clasen
5170218a1d More work towards a clean doc build
Tell gtk-doc about more private headers.
2016-11-19 13:45:04 -05:00
Matthias Clasen
2d65156be3 Add gtk_im_context_simple_add_compose_file 2016-11-19 13:30:27 -05:00
Matthias Clasen
6734f354b4 docs: Add gtk_print_job_set_source_fd 2016-11-19 13:26:49 -05:00
Matthias Clasen
d0f8e324b1 Add gtk_menu_place_on_monitor to the docs 2016-11-19 12:53:13 -05:00
Matthias Clasen
c9c391bd55 Drop macro wrappers for get_version functions
These are not really useful, and were added long ago
as a clutch for transitioning to the new names.
2016-11-19 12:28:52 -05:00
Matthias Clasen
aa74d96532 Document newly supported 3d transforms in CSS 2016-11-18 19:34:02 -05:00
Matthias Clasen
7d34229cdd More docs cleanup 2016-11-18 18:54:45 -05:00
Matthias Clasen
0a75bb4353 Work towards a clean docs build
Remove various no-longer-existing functions from the sections
file, and exclude more private headers, etc.
2016-11-18 14:43:34 -05:00
Matthias Clasen
b15bc437a6 Rename broadwayd to gtk4-broadwayd
This was the last unprefixed binary, and it was causing file
conflicts between gtk3 and gtk4.
2016-11-18 13:40:37 -05:00
Matthias Clasen
f73c5dd8dd docs: Name the 3.90 index properly 2016-11-18 08:14:23 -05:00
Matthias Clasen
5c1af1af04 docs: Ignore gtksnapshotprivate.h 2016-11-18 08:12:20 -05:00
Matthias Clasen
95c13ee471 Document GtkSnapshot
This is just some initial documentation, more detail needed.
2016-11-18 07:43:39 -05:00
Matthias Clasen
9ecb34b4a0 Add some drawing information the migration guide
Mention snapshot(), and the new GtkDrawingArea API.
2016-11-18 07:43:33 -05:00
Matthias Clasen
3c5dbc2f17 docs: Add GtkDrawingAreaDrawFunc 2016-11-18 06:09:46 -05:00
Benjamin Otte
5940625e9e drawingarea: Add gtk_drawing_area_set_draw_func() 2016-11-18 06:40:53 +01:00
Benjamin Otte
41d1e1fea8 drawingarea: Add content-width and content-height properties
People should use these instead of gtk_widget_set_size_request().
2016-11-18 06:40:53 +01:00
Matthias Clasen
fbbd3ccfd7 docs: Fix print-related includes
Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=774614.
2016-11-17 09:33:30 -05:00
Matthias Clasen
21570a57f2 docs: Update an example
Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=774490
2016-11-17 06:17:11 -05:00
Benjamin Otte
bcf70e3a03 API: Remove everything relating to "grip"
Grips have long been unused in GTK, so remove all support for them.
This removes the GTK_STYLE_CLASS_GRIP and the special
gtk_render_handle() code for drawing those grips.
2016-11-16 19:27:43 +01:00
Benjamin Otte
56e11f057c API: Remove gtk_render_extension()
This is long-gone drawing API.
2016-11-16 18:36:10 +01:00
Matthias Clasen
2520662d13 Allow replacing input file in gtk-builder-tool simplify 2016-11-12 22:33:01 -05:00
Matthias Clasen
5b8646c6e8 Update the migration guide
Mention the demise of -gtk-gradient, and explain that CSS syntax
works fine for this now.
2016-11-07 16:00:05 -05:00
Matthias Clasen
fa7d77d407 Revert "Update the CSS docs for the demise of define-color"
This reverts commit 12d9451b1c.
2016-11-07 15:05:37 -05:00
Matthias Clasen
a1e03346d9 Revert "Update the migration guide"
This reverts commit b868164381.
2016-11-07 15:05:28 -05:00
Matthias Clasen
b868164381 Update the migration guide
Mention some removed CSS extensions.
2016-11-07 14:59:23 -05:00
Matthias Clasen
12d9451b1c Update the CSS docs for the demise of define-color 2016-11-07 14:49:46 -05:00