Commit Graph

28 Commits

Author SHA1 Message Date
Florian Müllner
d21edcfed5 st: Replace deprecated macros 2015-07-22 16:00:55 +02:00
Florian Müllner
625a38f605 shell: Shut up a compiler warning 2015-02-17 12:34:06 +01:00
Adel Gadllah
37595ff3e7 shell-generic-container: Exclude skip_paint actors from the paint volume
We are not painting them so there is no reason to redraw a bigger
area because of them.
2013-03-01 19:13:10 +01:00
Jasper St. Pierre
d5285674ae st: Remove st-container
At this point, StContainer is a dummy class that does nothing, so it's
safe to remove.

https://bugzilla.gnome.org/show_bug.cgi?id=670034
2012-02-28 08:14:06 -05:00
Jasper St. Pierre
d2aab9d6a6 st-container: Remove st_container_get_children_list
Replace it with the new actor iteration APIs. This fixes a few
unintentional memory leaks - st_container_get_children_list
returns an internal list, and clutter_actor_get_children_list
allocates a new list.

https://bugzilla.gnome.org/show_bug.cgi?id=670034

https://bugzilla.gnome.org/show_bug.cgi?id=670910
2012-02-27 15:15:31 -05:00
Jasper St. Pierre
ea19790828 st-widget: Implement a proper allocate
Since an StWidget now has children, it needs to allocate those children
properly. Defer to the currently installed layout manager, like Clutter
does.

Now that we have something that allocates children in St, to prevent
double allocations, we use clutter_actor_set_allocation rather than
chaining up to StWidget::allocate.

https://bugzilla.gnome.org/show_bug.cgi?id=670034
2012-02-22 17:00:44 -05:00
Jasper St. Pierre
64b2c5d1b4 st-widget: Add a proper paint, add st_widget_paint_background
Since we want to paint children by default in StWidget, we need to
provide a way for custom subclasses to paint their CSS backgrounds
without painting children... introducing st_widget_paint_background.

Additionally, remove any custom paint/pick handlers added by subclasses
of StWidget that just painted their children. This will cause double
painting if left alone.

This also removes the hacky things that some subclasses of StBin did
to prevent their one child to be painted by StBin.

https://bugzilla.gnome.org/show_bug.cgi?id=670034
2012-02-22 17:00:44 -05:00
Jasper St. Pierre
3736d81d8f st-widget: Copy get_focus_chain and navigate_focus from StContainer
We can't get rid of the implementations in StContainer just yet,
as StContainer still keeps its own child list. But this should
lower the amount of code that has to be moved around when we
remove StContainer.

https://bugzilla.gnome.org/show_bug.cgi?id=670034
2012-02-22 17:00:44 -05:00
Jasper St. Pierre
b40b19997a shell: Use generic marshaller
https://bugzilla.gnome.org/show_bug.cgi?id=662152
2012-01-25 19:03:48 -05:00
Dan Winship
cbb3831c7b shell-generic-container: document signals
In particular, document that you can ignore the get-preferred-*
signals if and only if you have a fixed width/height specified by some
other means.

https://bugzilla.gnome.org/show_bug.cgi?id=657986
2011-09-06 14:33:02 -04:00
Dan Winship
dbeab0ef87 St: fix container paint volumes
If a container is not clip-to-allocation, then its get_paint_volume()
needs to include the paint volumes of all of its children, since they
(or their children) may paint outside the container's allocation.

Also, if the superclass get_paint_volume() returns FALSE, then the
subclass should return FALSE too.

https://bugzilla.gnome.org/show_bug.cgi?id=655812
2011-08-03 09:16:55 -04:00
Florian Müllner
bed063eea1 generic-container: Queue a redraw in skip_paint()
When changing a child's visibility with skip_paint(), the change
will not be visible until a redraw is triggered. Queue a redraw,
so that the function has an immediate effect.

https://bugzilla.gnome.org/show_bug.cgi?id=639461
2011-01-14 01:07:42 +01:00
Adel Gadllah
56fb7e2c58 St: Take advantage of clipped redraws
In order to take advantage of clipped redraws (only redraw the
parts that actually changed), we have to inform clutter about
our paint_volume by implementing the get_paint_volume virtual
method.

As this feature had been added in in clutter 1.5.x we now require
that.

https://bugzilla.gnome.org/show_bug.cgi?id=630932
2010-11-29 11:23:47 -05:00
Dan Winship
d2b968a7df St: add keyboard focus navigation support
Add StWidget:can-focus, st_widget_navigate_focus(), and
st_container_get_focus_chain(), and implement as needed to allow
keyboard navigation of widgets.

https://bugzilla.gnome.org/show_bug.cgi?id=621671
2010-10-29 08:38:05 -04:00
Florian Müllner
652ce3ce8c introspection: Fix annotations
The scanner got more strict, now some annotations need fixing.
2010-09-15 03:02:26 +02:00
Florian Müllner
54d11b65a1 Move shared container methods from st-private to a common base class
Add StContainer, which implements the ClutterContainer interface based
on the container methods in st-private and make the existing containers
subclass it.

https://bugzilla.gnome.org/show_bug.cgi?id=613907
2010-05-10 19:00:07 +02:00
Dan Winship
1816a6339d [ShellGenericContainer] add _get_skip_paint()
https://bugzilla.gnome.org/show_bug.cgi?id=608667
2010-05-03 12:51:13 -04:00
Dan Winship
8dd572d1cc ShellGenericContainer: adjust requested height/width for border/padding
https://bugzilla.gnome.org/show_bug.cgi?id=614293
2010-03-31 10:10:14 -04:00
Owen W. Taylor
163b2d0403 Fixes for dispose and finalize
* Add missing chain-up for dispose and finalize methods
* ShellGenericContainer needs to destroy its children in dispose()
* Fix variable naming and excess casts in st_label_dispose()

https://bugzilla.gnome.org/show_bug.cgi?id=612511
2010-03-11 15:08:48 -05:00
Colin Walters
1a0d507316 [ShellGenericContainer] When removing actors, remove them from skip_paint
This fixes a regression introduced by the previous patch.
2010-03-04 17:38:35 -05:00
Dan Winship
b5853fe7e5 [ShellGenericContainer] make this an StWidget
https://bugzilla.gnome.org/show_bug.cgi?id=611647
2010-03-04 15:43:02 -05:00
Dan Winship
0f81c7efe0 [ShellGenericContainer] minor style fixes
https://bugzilla.gnome.org/show_bug.cgi?id=611647
2010-03-04 15:41:26 -05:00
Dan Winship
0f0e3d9644 [ShellGenericContainer] remove example
There are plenty of examples in js/ui/ now

https://bugzilla.gnome.org/show_bug.cgi?id=611647
2010-03-04 15:41:26 -05:00
Colin Walters
c635cb7016 [ShellGenericContainer] Add method to get number of skipped children
This will be used in search results.

https://bugzilla.gnome.org/show_bug.cgi?id=610740
2010-03-04 14:08:13 -05:00
Owen W. Taylor
ed36517615 [ShellGenericContainer] Simplify tracking of skip-paint children
The current way we keep track of skip-paint children is more
difficult than it needs to be, and can lead to subtle bugs.
(For one, the skip-paint state of a child is remembered
when it is removed then added back again, which is completely
unexpected.)

Instead of using weak references to track children, just remove
items from the skip-paint list by overriding the remove() virtual
function of the ClutterContainer interface.

The 'skip_paint' hash table is then destroyed in finalize rather than
dispose since it doesn't hold references to memory any more but just
passively tracks an attribute of the children that are currently in
the container.

https://bugzilla.gnome.org/show_bug.cgi?id=608848
2010-02-03 12:00:56 -05:00
Colin Walters
81b7c0170d Add set_skip_paint method
Ideally we'd be able to override _paint, but given that we can't
at the moment, this method gives a way to implement containers
which don't happen to paint all of their children.

https://bugzilla.gnome.org/show_bug.cgi?id=603522
2009-12-15 15:53:08 -05:00
Dan Winship
dd8f05c81d include "config.h" in all .c files
Also, fix shell-global.c to actually compile with config.h included.

Was supposed to fix bug 602802, but doesn't...
2009-11-24 09:15:35 -05:00
Colin Walters
91353c6d60 Add ShellGenericContainer, which makes it possible to write containers in JS
Subclass ClutterGroup (to avoid having to implement all of dispose,
raise, lower, add, etc.), and have it proxy the allocation requests
out into signals.  We have to group up the two out parameters
into a struct unfortunately.

Included example code in the C file source for now.
2009-08-05 11:36:33 -04:00