Benjamin Otte
475cffd7f8
gadget: Remove gtk_css_gadget_get_render_node()
...
It's unused now that we can snapshot.
2016-11-15 17:49:19 +01:00
Benjamin Otte
4e06d8f73c
snapshot: Add gtk_css_gadget_snapshot()
...
Including a snpahsot() vfunc, wee!
2016-11-15 17:48:45 +01:00
Matthias Clasen
30a56acc7d
gadget: Add a get_render_node vfunc
...
This will let us do box gadgets like we do containers.
2016-11-01 14:29:25 -04:00
Matthias Clasen
62eb900b83
gadget: Add a has_content vfunc
...
...and implement it for GtkCssGadget and GtkCssCustomGadget.
This allows us to decide on a per-object basis if a custom
gadget needs a render node for content or not.
2016-10-18 11:49:12 +01:00
Emmanuele Bassi
e5dace2d51
Integrate CSS gadget with GSK render nodes
...
First stab at an internal API that generates render nodes when drawing a
CSS gadget.
2016-10-18 11:49:10 +01:00
Cosimo Cecchi
44178c0541
gadget: add API to get various area boxes
...
Compared to the function returning the allocation, these will return the
box in gadget coordinates.
2016-02-29 10:45:13 -08:00
Cosimo Cecchi
e9fe46ea5f
gadget: add hit test functions
...
These will be useful in later commits.
2016-02-29 10:45:12 -08:00
Benjamin Otte
a6845091f9
spinbutton: Make the entry gadget be the entry's gadget
...
This is a big and somewhat evil hack: We replace the entry's gadget's
node with the spinbutton's entry node.
2016-01-22 13:46:01 +01:00
Benjamin Otte
8020d5f93a
notebook: Don't store gadget allocation twice
...
If we care about a gadget's allocation, we can ask it. There's no need
to store it in GtkNotebookPage.allocation.
2016-01-11 17:05:24 +01:00
Benjamin Otte
f1e277969a
gadget: Add queue_resize/allocate/draw() functions
2016-01-11 17:05:23 +01:00
Benjamin Otte
8c1a73326c
gadget: Add helpers for modifying state
...
They will be used in future commits.
I also was too lazy to convert existing widgets.
2016-01-11 17:05:22 +01:00
Benjamin Otte
acbff85402
gadget: Handle visibility
...
As GtkCssNode has the visibility concept, it makes sense to mirror it in
gadgets.
Do what visibility does in widgets: Hidden gadgets can't be drawn or
allocated and request a 0x0 size.
Note that just like widgets, gadget visibility must not be changed in
size request, allocate or draw handlers.
GtkWidget::child-visible has no equivalent yet, code will have to
emulate that manually.
2015-12-29 13:48:58 -08:00
Benjamin Otte
197e42efd8
label: Position the text properly
...
The PangoLayout needs to be positioned according to the content
allocation of the gadget, not the widget's allocation.
2015-12-16 20:39:51 +01:00
Matthias Clasen
b14dc6b5a4
gadget: Add api to get the border allocation
...
This can be useful for giving input windows the right size.
2015-12-15 21:58:45 -05:00
Benjamin Otte
6eafe00d8f
gadget: Add the concept of a "gadget"
...
A gadget is halfway between a widget and a CSS node. It's supposed to
provide the minimum convenicence around CSS nodes until we've figured
out how to integrate them with widgets.
2015-12-15 08:41:16 -05:00