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
This commit is contained in:
parent
9752fda1f6
commit
cbb3831c7b
@ -264,6 +264,22 @@ shell_generic_container_class_init (ShellGenericContainerClass *klass)
|
|||||||
|
|
||||||
container_class->get_focus_chain = shell_generic_container_get_focus_chain;
|
container_class->get_focus_chain = shell_generic_container_get_focus_chain;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ShellGenericContainer::get-preferred-width:
|
||||||
|
* @self: the #ShellGenericContainer
|
||||||
|
* @for_height: as in clutter_actor_get_preferred_width()
|
||||||
|
* @alloc: a #ShellGenericContainerAllocation to be filled in
|
||||||
|
*
|
||||||
|
* Emitted when clutter_actor_get_preferred_width() is called
|
||||||
|
* on @self. You should fill in the fields of @alloc with the
|
||||||
|
* your minimum and natural widths. #ShellGenericContainer
|
||||||
|
* will deal with taking its borders and padding into account
|
||||||
|
* for you.
|
||||||
|
*
|
||||||
|
* @alloc's fields are initialized to 0, so unless you have a fixed
|
||||||
|
* width specified (via #ClutterActor:width or CSS), you must
|
||||||
|
* connect to this signal and fill in the values.
|
||||||
|
*/
|
||||||
shell_generic_container_signals[GET_PREFERRED_WIDTH] =
|
shell_generic_container_signals[GET_PREFERRED_WIDTH] =
|
||||||
g_signal_new ("get-preferred-width",
|
g_signal_new ("get-preferred-width",
|
||||||
G_TYPE_FROM_CLASS (klass),
|
G_TYPE_FROM_CLASS (klass),
|
||||||
@ -273,6 +289,22 @@ shell_generic_container_class_init (ShellGenericContainerClass *klass)
|
|||||||
gi_cclosure_marshal_generic,
|
gi_cclosure_marshal_generic,
|
||||||
G_TYPE_NONE, 2, G_TYPE_FLOAT, SHELL_TYPE_GENERIC_CONTAINER_ALLOCATION);
|
G_TYPE_NONE, 2, G_TYPE_FLOAT, SHELL_TYPE_GENERIC_CONTAINER_ALLOCATION);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ShellGenericContainer::get-preferred-height:
|
||||||
|
* @self: the #ShellGenericContainer
|
||||||
|
* @for_width: as in clutter_actor_get_preferred_height()
|
||||||
|
* @alloc: a #ShellGenericContainerAllocation to be filled in
|
||||||
|
*
|
||||||
|
* Emitted when clutter_actor_get_preferred_height() is called
|
||||||
|
* on @self. You should fill in the fields of @alloc with the
|
||||||
|
* your minimum and natural heights. #ShellGenericContainer
|
||||||
|
* will deal with taking its borders and padding into account
|
||||||
|
* for you.
|
||||||
|
*
|
||||||
|
* @alloc's fields are initialized to 0, so unless you have a fixed
|
||||||
|
* height specified (via #ClutterActor:height or CSS), you must
|
||||||
|
* connect to this signal and fill in the values.
|
||||||
|
*/
|
||||||
shell_generic_container_signals[GET_PREFERRED_HEIGHT] =
|
shell_generic_container_signals[GET_PREFERRED_HEIGHT] =
|
||||||
g_signal_new ("get-preferred-height",
|
g_signal_new ("get-preferred-height",
|
||||||
G_TYPE_FROM_CLASS (klass),
|
G_TYPE_FROM_CLASS (klass),
|
||||||
@ -282,6 +314,18 @@ shell_generic_container_class_init (ShellGenericContainerClass *klass)
|
|||||||
gi_cclosure_marshal_generic,
|
gi_cclosure_marshal_generic,
|
||||||
G_TYPE_NONE, 2, G_TYPE_FLOAT, SHELL_TYPE_GENERIC_CONTAINER_ALLOCATION);
|
G_TYPE_NONE, 2, G_TYPE_FLOAT, SHELL_TYPE_GENERIC_CONTAINER_ALLOCATION);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ShellGenericContainer::allocate:
|
||||||
|
* @self: the #ShellGenericContainer
|
||||||
|
* @box: @self's content box
|
||||||
|
* @flags: the allocation flags.
|
||||||
|
*
|
||||||
|
* Emitted when @self is allocated, after chaining up to the parent
|
||||||
|
* allocate method.
|
||||||
|
*
|
||||||
|
* Note that @box is @self's content box (qv
|
||||||
|
* st_theme_node_get_content_box()), NOT its allocation.
|
||||||
|
*/
|
||||||
shell_generic_container_signals[ALLOCATE] =
|
shell_generic_container_signals[ALLOCATE] =
|
||||||
g_signal_new ("allocate",
|
g_signal_new ("allocate",
|
||||||
G_TYPE_FROM_CLASS (klass),
|
G_TYPE_FROM_CLASS (klass),
|
||||||
|
Loading…
Reference in New Issue
Block a user