Commit Graph

589 Commits

Author SHA1 Message Date
Javier Jardón
76943117be Don't use GTK_WIDGET_*SET_FLAGS (wid, GTK_CAN_FOCUS)
Use new API instead: gtk_widget_set_can_focus ()
2010-04-03 20:58:22 -04:00
Javier Jardón
2d96f39335 Don't use GTK_WIDGET_*SET_FLAGS (wid, GTK_SENSITIVE) 2010-04-03 20:58:21 -04:00
Javier Jardón
5d4af6ca80 Don't use GTK_WIDGET_*SET_FLAGS (wid, GTK_DOUBLE_BUFFERED)
Use new API instead: gtk_widget_set_double_buffered ()
2010-04-03 20:58:21 -04:00
Javier Jardón
3ebbee6958 Don't use GTK_WIDGET_*SET_FLAGS (wid, GTK_RECEIVES_DEFAULT)
Use new API instead: gtk_widget_set_receives_default ()
2010-04-03 20:58:21 -04:00
Javier Jardón
edc65ce1d2 Deprecate widget flag: GTK_WIDGET_VISIBLE
Use gtk_widget_get_visible() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-04-03 20:58:20 -04:00
Javier Jardón
eb90ec7513 Deprecate widget flag: GTK_WIDGET_HAS_FOCUS
Use gtk_widget_has_focus() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-04-03 20:56:30 -04:00
Javier Jardón
c3f8b4226d Deprecate widget flag: GTK_WIDGET_SENSITIVE
Use gtk_widget_get_sensitive() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-04-03 20:56:30 -04:00
Javier Jardón
c44c026ee9 Don't use GTK_WIDGET_NO_WINDOW in internal code anymore
Use gtk_widget_get_has_window() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-04-03 20:56:30 -04:00
Javier Jardón
e7127daf84 Deprecate widget flag: GTK_WIDGET_IS_SENSITIVE
Use gtk_widget_is_sensitive() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-04-03 20:56:29 -04:00
Javier Jardón
04aba4bde2 Deprecate widget flag: GTK_WIDGET_DRAWABLE
Use gtk_widget_is_drawable() instead.

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-04-03 20:56:29 -04:00
Johan Dahlin
eee7bb2b2e [annotations] Add allow-none
This commit was created using a script that searched for all docstrings
containing a parameter and the string 'or %NULL'.
Gdk backends and demos excluded as they are not part of a public API

https://bugzilla.gnome.org/show_bug.cgi?id=610474
2010-04-03 20:56:15 -04:00
Michael Natterer
87334d465c Bug 548026 - No accessor for GtkWidget.requisition
Add gtk_widget_get_requisition().
2010-04-03 20:56:15 -04:00
Stefan Kost
4b8a91bb85 widget: ensure boolean before comparing
Ensure boolean value like done elsewhere.
2010-04-03 20:56:13 -04:00
Stefan Kost
100c6dc513 widget: don't check before setting to avoid costly type checks
There are no side effect of setting these flags and we don't fire g_object
notifies also. Thus set/unset right away without costly check of current state.
2010-04-03 20:56:13 -04:00
Michael Natterer
800fbc513f Allow calling gtk_widget_style_attach() only when realized 2010-04-03 20:56:12 -04:00
Javier Jardón
fc246a9305 Fix compilation warning: return FALSE instead NULL 2010-04-03 20:56:12 -04:00
Matthias Clasen
5438a7b608 Add some more goddamn accessors 2010-04-03 20:56:09 -04:00
Michael Natterer
9dfadca46c Bug 608993 - Add gtk_widget_style_attach()
As replacement for:
widget->style = gtk_style_attach (widget->style, widget->window);
2010-04-03 20:56:05 -04:00
Javier Jardón
ef3dc5fd42 Add gtk_widget_has_rc_style() accessor
Add gtk_widget_has_rc_style() as accessor for sealed
GTK_WIDGET_RC_STYLE widget flag.

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-04-03 20:55:21 -04:00
Christian Dywan
174c126b6e Document GtkWidget::state-changed signal properly
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=598383
2010-04-03 20:55:13 -04:00
Javier Jardón
f8d1cf58af Deprecate widget flag: GTK_WIDGET_CAN_FOCUS
https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-04-03 20:55:11 -04:00
Javier Jardón
69de358b38 Deprecate some widget flags
Deprecate the following:
GTK_WIDGET_APP_PAINTABLE
GTK_WIDGET_CAN_DEFAULT
GTK_WIDGET_DOUBLE_BUFFERED
GTK_WIDGET_HAS_DEFAULT
GTK_WIDGET_HAS_GRAB
GTK_WIDGET_RECEIVES_DEFAULT

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-04-03 20:55:10 -04:00
Christian Dywan
fc2cbf960c Deprecate flag macros for toplevel, state, no window and composite child
Deprecate widget flag macros GTK_WIDGET_STATE, GTK_WIDGET_SAVED_STATE,
GTK_WIDGET_FLAGS, GTK_WIDGET_TOPLEVEL, GTK_WIDGET_NO_WINDOW and
GTK_WIDGET_COMPOSITE_CHILD.

Also deprecate the type macros GTK_WIDGET_TYPE, GTK_OBJECT_TYPE_NAME and
GTK_OBJECT_TYPE which have become redundant.

Instances of GTK_WIDGET_TOPLEVEL are replaced with gtk_widget_is_toplevel,
GTK_WIDGET_TYPE is replaced with G_OBJECT_TYPE, GTK_WIDGET_COMPOSITE_CHILD
is replaced with use of the "composite-child" property and uses of
GTK_WIDGET_NO_WINDOW are adjusted to use gtk_widget_get_has_window.

Uses of GTK_WIDGET_SAVED_STATE and GTK_WIDGET_FLAGS inside GtkWidget are
changed to direct flag usage.

Documentation is updated to refer to gtk_widget_set_has_window and
gtk_widget_get_has_window.

Gail and tests are updated as well.

Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-04-03 20:55:07 -04:00
Dan Winship
507bf6a85f Change GtkIconSize to int in params/return values
GtkIconSize is an extensible enumeration (via
gtk_icon_size_register()), so methods that claim to take/return a
GtkIconSize need to actually use "int" to work correctly with bindings
that are strict about enum values.

https://bugzilla.gnome.org/show_bug.cgi?id=604895
2010-04-03 20:51:56 -04:00
Colin Walters
fcbbd763cd [introspection] Merge in Gtk-custom.c annotations
The Gtk-custom.c file in gir-repository contained a number of
introspection annotations.  Merge those into the GTK source files.

Some documentation was moved from the tmpl/ files to accomodate
the addition of annotations.
2010-04-03 20:51:53 -04:00
Johannes Schmid
9724366289 native-layout: Don't expose extra gtk_widget_* function that are similar to the GtkExtendedLayout interface 2009-12-14 16:28:56 +01:00
Johannes Schmid
c659d1a505 Merge branch 'master' into native-layout 2009-12-14 15:36:22 +01:00
Johannes Schmmid
e08d04b561 native-layout: Introduce GtkExtendedLayout interface. 2009-12-14 15:32:49 +01:00
Christian Dywan
46f5ee1d0c Store the buildable name in object data instead of the widget name
Widget names are used for theming which is why GtkBuilder should
use object data.

Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=591085
2009-12-03 13:10:02 +01:00
Javier Jardón
0ef8f52567 Move documentation from templates to inline comments: GtkWidget
https://bugzilla.gnome.org/show_bug.cgi?id=597865
2009-11-28 02:59:06 +01:00
Christian Dywan
31771cc640 Add a note about tooltip theming
This should help to reduce the amount of confusion about how to
make a tooltip window appear like a tooltip. Bug 596080.
2009-09-30 08:45:30 -04:00
Michael Natterer
6ee228a363 gtk_widget_set_property(): use accessors instead of setting flags
Use the newly added accessors to set the "can-focus", "can-default"
and "receives-default" properties.
2009-09-04 15:18:24 +02:00
Michael Natterer
026bea2293 gtk_widget_set_property(): use gtk_widget_set_visible()
Use the new API instead of show() and hide().
2009-09-04 14:54:13 +02:00
Michael Natterer
b81079d898 Bug 69872 - GTK_WIDGET_SET_FLAGS should be deprecated
Add gtk_widget_set_receives_default() and
gtk_widget_get_receives_default() as accessors for
GTK_RECEIVES_DEFAULT.
2009-09-04 14:50:35 +02:00
Michael Natterer
cc8927a589 Add gtk_widget_set_window()
New function as replacement for setting widget->window directly.
Should only be used in GtkWidget::realize().
2009-08-28 16:51:48 +02:00
Michael Natterer
0e52286d53 Bug 69872 - GTK_WIDGET_SET_FLAGS should be deprecated
Add gtk_widget_is_toplevel() for GTK_WIDGET_TOPLEVEL()
and gtk_widget_is_drawable() for GTK_WIDGET_DRAWABLE()
2009-08-28 16:27:26 +02:00
Dan Winship
05b246accc fix gtk-doc syntax on GtkWidget:double-buffered, so Since gets picked up 2009-08-27 10:49:16 -04:00
Matthias Clasen
9bad2f70a4 Documentation fixes 2009-08-24 18:17:54 -04:00
Cody Russell
5c89bbf3de Make the allocation parameter const 2009-08-13 11:21:15 -05:00
Cody Russell
2ba836defb Add widget->allocation setter method
Add gtk_widget_set_allocation() to be used by size_allocate() methods,
since widget->allocation is now sealed.  Bug #585211
2009-08-13 11:14:55 -05:00
Michael Natterer
8296bf7035 Bug 69872 – GTK_WIDGET_SET_FLAGS should be deprecated
Add gtk_widget_has_grab() as replacement for GTK_WIDGET_HAS_GRAB().
2009-08-07 14:48:00 +02:00
Michael Natterer
eb0a5721d9 Bug 69872 – GTK_WIDGET_SET_FLAGS should be deprecated
Add gtk_widget_get_visible(). For symmetry reasons and for convenience
when a widget's visibility state is available as a boolean condition,
also add gtk_widget_set_visible() (which simply calls show()/hide()).
2009-08-07 08:53:32 +02:00
Michael Natterer
6007761549 Fix gtk_widget_get_allocation()
- add it to the header
- add the symbol to gtk.symbols
- fix coding style and check for allocation != NULL
2009-07-30 11:49:47 +02:00
Cody Russell
4a73b41a34 add getter function for widget->allocation
Add gtk_widget_get_allocation() to retrieve a widget's allocation.
Needed as a step to enable GSEAL building.

This fixes bug #585211
2009-07-29 22:28:17 -05:00
Michael Natterer
40408e74dd Two more getters for flags plus one new property
More stuff based on patches from Christian Dywan:
- gtk_widget_get_app_paintable()
- gtk_widget_get_double_buffered()
- r/w property "double-buffered"
2009-07-17 21:51:47 +02:00
Michael Natterer
74ca4e2482 Add API for more widget flags
Add the following functions based on a patch from Christian Dywan:
- gtk_widget_set/get_can_focus()
- gtk_widget_set/get_can_default()
- gtk_widget_has_default()
2009-07-17 21:20:14 +02:00
Michael Natterer
2686930bfd Add gtk_widget_get_state() for accessing the sealed member "state" 2009-07-14 02:45:42 +02:00
Michael Natterer
8f60176229 Add API for some sealed widget flags
- gtk_widget_has_focus() for GTK_WIDGET_HAS_FOCUS()
- gtk_widget_get_sensitive() for GTK_WIDGET_SENSITIVE()
- gtk_widget_is_sensitive() for GTK_WIDGET_IS_SENSITIVE()
2009-07-14 02:12:40 +02:00
Tristan Van Berkom
515a0b61a1 Accelerators failed for submenus (GNOME bug 582025)
gtk/gtkmenuitem.c: Override custom_tag_finished() for "accelerator" and search
the correct toplevel GtkWindow to attach accelerators to menu items.

gtk/gtkwidget.[ch]: Added _gtk_widget_buildable_finish_accelerator() to allow
subclasses to specify a toplevel window to associate with when parsing <accelerator>
tags
2009-06-22 12:19:56 -04:00
Matthias Clasen
0f00d3fdb0 Reduce roundtrips
Setting a tooltip on a widget unfortunately triggers several roundtrips
to the X server. We reduce this overhead by only doing it if the
widget is visible, and by deferring to an idle. See bug 585626.
2009-06-20 16:34:54 -04:00