Commit Graph

994 Commits

Author SHA1 Message Date
Javier Jardón
392fdff8e5 docs: GtkWidget's "state-flags-changed" is a signal not a property 2012-02-15 13:43:58 +00:00
Murray Cumming
a0b4ab109d Documentation: Correct references to properties.
These should use :, not ::, though signals would use ::.
See
http://developer.gnome.org/gtk-doc-manual/unstable/documenting_syntax.html.en
and
http://developer.gnome.org/gtk-doc-manual/unstable/documenting_symbols.html.en
2012-02-15 11:43:33 +01:00
Andrea Cimitan
4a18fe7ef2 Introduce gtk_window_get/set_attached_to()
gtk_window_get/set_attached_to() is a new API that allows for windows to
be attached to a GtkWidget.
The attachment is a logical binding between the toplevel window and the
widget that generated it; this kind of information is currently used to
propagate style information from the widget to the window, but is also
useful e.g. for accessibility.

https://bugzilla.gnome.org/show_bug.cgi?id=666103
2012-01-12 14:03:00 -05:00
Rui Matos
e9adaabc5e Rename 'window-unfocused' to 'backdrop'
'window-unfocused' is too long and mentions "focus" which is historically
loaded with the meaning "input focus".

'backdrop' isn't generally used in GUI speak and still conveys the state the
widgets in an unfocused or background toplevel window are in.
2012-01-09 18:38:00 +01:00
Benjamin Otte
0ac519e8a1 widget: Set parent style context 2012-01-09 18:37:50 +01:00
Javier Jardón
d005b01319 gtk/*: Use g_list_free_full() convenience function 2012-01-05 04:22:43 +01:00
Benjamin Otte
8a83f0c2d1 widget: Print a g_warning() when a cairo_t is invalid
Only print the warning on internal code, so we aren't too verbose.
2011-12-23 00:15:59 +01:00
Rui Matos
cc8012eb32 widget: Set style flags on the style context when the flags are set
This will allow us to simplify most draw methods by not having to explicitly
set the style flags on the context.
2011-12-19 19:21:15 +00:00
Rui Matos
eecbdb6f57 widget: Always propagate state flags to all children
https://bugzilla.gnome.org/show_bug.cgi?id=666126
2011-12-19 19:21:15 +00:00
Matthias Clasen
2398d7e900 Introduce gtkaccelmapprivate.h
Move internal accel map API there and update all users.
Also, add an internal function to create an accel path for
an action and parameter, and use it in gtkapplication.c and
gtkmodelmenuitem.c instead of duplicating that code.
2011-12-19 12:51:11 -05:00
Benjamin Otte
0c1f2f2fc1 widget: Set widget in accessible's constructor
No need to add t manually later.
2011-12-19 16:17:13 +01:00
Benjamin Otte
03a63def24 widget: Unref accessible 2011-12-19 16:17:13 +01:00
Benjamin Otte
e042462674 widget: Unset self from accessible 2011-12-19 16:17:13 +01:00
Benjamin Otte
23b5f9c066 widget: Unset widget on accessibles 2011-12-19 16:17:13 +01:00
Rui Matos
9d6da33ff5 widget: Flip the sensitive flag even if the state doesn't change
Even if we can't change our sensitivity because the parent is insensitive we
should still flip the sensitive flag. Otherwise, with and insensitive parent,

child.set_sensitive(True)
...
parent.set_sensitive(True)

would result in child still being insensitive.

https://bugzilla.gnome.org/show_bug.cgi?id=666392
2011-12-17 11:48:01 +00:00
Benjamin Otte
94f00eb04d widget: Don't change sensitive state with insensitve parent
This way child.set_sensitive(True) with an insensitive parent doesn't
cause child to become sensitive.
2011-12-16 04:50:11 +01:00
Rui Matos
1235dc320b widget: Synthesize crossing only if sensitivity changed while propagating state 2011-12-14 17:03:44 +00:00
Alexander Larsson
10b5ec20f2 Fix set_focus_child handling during focus changes
In many cases we used to set focus_child to NULL all the way up
to the top and then to the right value, even if there was
a common ancestor, meaning these see a temporary NULL value for
focus_child. Only when the new focus widgets direct parent was
in the previous ancestor list did we stop early.

This fixes that by always stopping propagation when reaching
the common ancestor.
2011-12-14 00:26:40 +01:00
Rui Matos
7a6babfd02 widget: Unset window-unfocused in gtk_widget_unparent()
Widgets without a parent aren't inside a toplevel window so we must remove
window-unfocused as it doesn't make sense outside a toplevel.

https://bugzilla.gnome.org/show_bug.cgi?id=661428
2011-12-07 22:41:58 +00:00
Benjamin Otte
4259a27cf5 widget: Update Pango context on state change
The layout depends on the state flags, so it must be updated when they
change.
2011-12-05 18:27:05 +01:00
Matthias Clasen
7814718152 Drop uses of @returns syntax 2011-11-21 13:12:58 -05:00
Murray Cumming
43dd705308 Fix tiny docs typo. 2011-11-18 11:30:07 +01:00
Benjamin Otte
0b716e77ea widget: Add _gtk_widget_peek_accessible()
This function returns the accessible if it already exists. This way we
can call functions on the accessible from the widget itself instead of
having to rely on signals.
2011-11-16 04:39:23 +01:00
Benjamin Otte
fd93e08a7c widget: Don't use deprecated symbols
Not even in deprecated functions!
2011-11-08 21:14:06 +01:00
Benjamin Otte
d41732b729 widget: Deprecate gtk_widget_get_pointer () 2011-11-08 21:14:06 +01:00
Rui Matos
70f87b8bd5 gtk: Add a GTK_STATE_FLAG_WINDOW_UNFOCUSED widget state flag
This allows themes to style widgets differently according to whether the
toplevel window they are in is presented as focused.

https://bugzilla.gnome.org/show_bug.cgi?id=661428
2011-11-08 19:33:22 +00:00
Matthias Clasen
2de4405c32 Move deprecated gtkwidget style api to gtkstyle 2011-11-02 08:10:42 -04:00
Matthias Clasen
df1e2cd128 Fix more test breakage 2011-10-25 07:38:36 -04:00
Benjamin Otte
b195c7dbb2 a11y: Hack around infinite loops in parent setting
This is kind of a hack to get rid of infinite loops that occur when
child accessibles try to set their parent upon creation but the parent
accessible creates its children in the initialize vfunc. Because in that
case, the parent will not have an accessible set when the child tries to
access it, because it is still initializing itself. Which will cause a
new accessible to be created.

https://bugzilla.gnome.org/show_bug.cgi?id=660687
2011-10-25 07:38:36 -04:00
Michael Natterer
5c4f2ef0c1 gtk: move _gtk_modules_has_mixed_deps() to gtkmodlesprivate.h
and remove gtkmainprivate.h completely.
2011-10-23 13:57:07 +02:00
Michael Natterer
4a7a67339a Bug 659602 - Provide an abstraction for the platform's use of modifier keys
Add enum GdkModifierIntent which identifies use cases for modifier masks
and GdkKeyMap::get_modifier_mask(). Add a default implementation which returns
what is currently hardcoded all over GTK+, and an implementation in the
quartz backend. Also add gtk_widget_get_modifier_mask() which simplifies
things by doing widget->display->keymap->get_modifier_mask().
2011-09-27 09:56:25 +02:00
Matthias Clasen
5ff8fe6971 Documentation fixes
Mostly making sure that return values and varargs don't loose
their docs.
2011-09-25 21:04:49 -04:00
Matthias Clasen
a233022934 Disable underallocation warnings in non-debug builds
It doesn't look like we have much traction of actually fixing
these, and there is very real cost to not being able to distcheck.
2011-08-30 11:28:52 -04:00
Jürg Billeter
c7bcef426b widget: Add transfer annotation for gtk_widget_set_window
gtk_widget_set_window does not add any reference to the window and
unrealize will destroy it.
2011-08-11 12:35:46 +02:00
Matthias Clasen
2ba9c4b4a7 Make focus rectangles optional
This commit introduces a new setting, gtk-visible-focus, backed
by the Gtk/VisibleFocus X setting. Its three values control how
focus rectangles are displayed.

'always' is equivalent to the traditional GTK+ behaviour of always
rendering focus rectangles.

'never' does what it says, and is intended for keyboardless
situations, e.g. tablets.

'automatic' hides focus rectangles initially, until the user
interacts with the keyboard, at which point focus rectangles
become visible.

https://bugzilla.gnome.org/show_bug.cgi?id=649567
2011-08-10 16:34:20 +02:00
Matthias Clasen
2983f3fc14 Update gtk_widget_get_accessible() docs
Don't mention GTK_MODULES for loading a11y implementations
anymore.
2011-07-23 21:28:29 -04:00
Benjamin Otte
9c81336830 widget: Reset the accessible role when a new accessible type is set
We want the role to be kept in the accessible object. Using
gtk_widget_class_set_accessible_role() is only meant as a quick
workaround to requiring subclassing of the accessibles in the quite
common case where a subclass does not change the accessible
implementation at all and only has a different role.
2011-07-18 18:30:50 +02:00
Benjamin Otte
b17ad131ea API: Add gtk_widget_class_set_accessible_role()
Easy access to modifying the roles of subclasses, as this is a thing
that commonly changes for various subclasses.
2011-07-18 18:30:49 +02:00
Matthias Clasen
d8c00cd537 Revert "Add a getter for the accessible type of a widget class"
This reverts commit 9a212b3120.
2011-07-14 19:28:07 -04:00
Matthias Clasen
9a212b3120 Add a getter for the accessible type of a widget class
This will be necessary to port out-of-tree a11y implementations
from the atk object factory approach to this new way of doing
things.
2011-07-13 23:02:25 -04:00
Matthias Clasen
775ccf39e7 Initial conversion of GailWidget to GtkWidgetAccessible 2011-07-05 16:09:57 -04:00
Benjamin Otte
4227a63f48 widget: Use g_type_add_class_private()
It turns out that that funciton does indeed exist and my rant was just
outdated. Shame on me.
2011-07-05 16:08:01 -04:00
Benjamin Otte
ebf8bf0000 API: Add gtk_widget_class_set_accessible_type()
The function is supposed to bypass the ATK registry. For 2 reasons:
1) We get rid of a lot of boilerplate madness.
2) The registry allows creating multiple accessibles per widget and we
   don't.

The old code for registries is still there.
2011-07-05 16:07:57 -04:00
Benjamin Otte
9ebcd66d43 widget: Add a GtkWidgetClassPrivate
As long as glib doesn't provide class privates, we'll have to ship our
own...
2011-07-05 16:07:57 -04:00
Matthias Clasen
f1a9c3efff Remove unused includes
Nothing is using gtkrc.h functionality any more.
2011-06-16 23:33:43 -04:00
Benjamin Otte
76f2aa737b docs: Add Since tag to GtkWidget::draw 2011-06-13 18:29:07 +02:00
Javier Jardón
bf0d8402f5 gtk: Use const instead G_CONST_RETURN 2011-06-10 13:07:54 +01:00
Javier Jardón
7b0d77def5 gtkcontainer: Move private functions to private header
https://bugzilla.gnome.org/show_bug.cgi?id=651707
2011-06-06 12:10:29 +01:00
Benjamin Otte
c6285387e3 widget: Update the font at the right place
Doing it unconditionally is not useful when the subclasses actually
using them can only ever do it in the style_updated signal. So do it in
the style_updated handler instead.
2011-06-04 21:18:09 +02:00
Benjamin Otte
a6daba5e78 API: Change semantics of gtk_container_get_child_path()
Include the child widget path in the returned path now. This allows
customizing the path of the current widgets - like adding flags to child
widgets (and maybe siblings in the future).
2011-06-02 02:03:50 +02:00