Commit Graph

576 Commits

Author SHA1 Message Date
Johan Dahlin
fe85272112 [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-02-19 17:57:51 -02:00
Michael Natterer
347d406f80 Bug 548026 - No accessor for GtkWidget.requisition
Add gtk_widget_get_requisition().
2010-02-19 17:04:20 +01:00
Stefan Kost
5ff724ea95 widget: ensure boolean before comparing
Ensure boolean value like done elsewhere.
2010-02-15 10:14:50 +02:00
Stefan Kost
ad93f2bc3e 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-02-15 10:14:50 +02:00
Michael Natterer
0231cff988 Allow calling gtk_widget_style_attach() only when realized 2010-02-11 09:27:05 +01:00
Javier Jardón
3cccae316e Fix compilation warning: return FALSE instead NULL 2010-02-11 01:11:17 +01:00
Matthias Clasen
e821eea4f0 Add some more goddamn accessors 2010-02-09 13:41:58 -05:00
Michael Natterer
9d4c8f38d8 Bug 608993 - Add gtk_widget_style_attach()
As replacement for:
widget->style = gtk_style_attach (widget->style, widget->window);
2010-02-04 16:43:54 +01:00
Javier Jardón
6b808a7389 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-01-19 00:20:52 +01:00
Christian Dywan
3925408232 Document GtkWidget::state-changed signal properly
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=598383
2010-01-11 10:30:48 +01:00
Javier Jardón
56a893ca8c Deprecate widget flag: GTK_WIDGET_CAN_FOCUS
https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-01-07 10:05:08 +01:00
Javier Jardón
51e0dd9a82 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-01-07 10:04:55 +01:00
Christian Dywan
bb1824c131 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-01-04 07:57:05 +01:00
Dan Winship
0b4af241b6 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
2009-12-19 10:32:35 +01:00
Colin Walters
6529c07614 [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.
2009-12-16 17:22:01 -02: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
Matthias Clasen
6e51533ec3 Fix a shadowed variable and a few other compiler warnings 2009-05-03 12:15:28 -04:00
Matthias Clasen
1ad8bfb69a Better i18n support in GtkBuilder
Let descriptions of accessible actions be translated, by specifying
the description as content of the <action> element, and allowing
"translatable", "context" and "comment" as attributes. (#518642)
2009-04-06 12:12:08 -04:00
Claudio Saavedra
584bd9cbc6 Bug 574283 – unused assignment and dead code in
2009-03-19  Claudio Saavedra  <csaavedra@igalia.com>

	Bug 574283 – unused assignment and dead code in
	gtk_widget_set_tooltip_window()

	* gtk/gtkwidget.c: (gtk_widget_set_tooltip_window): Remove
	an unused assignment, improving checks, and clean up method.


svn path=/trunk/; revision=22575
2009-03-19 07:47:23 +00:00
Matthias Clasen
d0e7f5889e Bug 573069 – Gdk-CRITICAL warnings with Gtk 2.14 when dragging
GtkNotebook tabs

        * gtk/gtkwidget.c (_gtk_widget_synthesize_crossing): Be a little
        more careful when navigating up the parent chain.

        * gdk/gdkwindow.c (_gdk_window_destroy_hierarchy): Reset the
        pointer window thats stored on the screen when it is destroyed.


svn path=/trunk/; revision=22420
2009-02-28 05:24:07 +00:00
Matthias Clasen
379822c74b Use a different approach to snapshotting that is in line with what is done
* gtk/gtkwidget.c (gtk_widget_get_snapshot): Use a different approach
        to snapshotting that is in line with what is done in the client-side
        windows branch, and that works for widgets regardless if they are
        double-buffered or not. Patch by Alex Larsson.

        * gdk/gdkwindow.c (_gdk_window_calculate_full_clip_region): Clip
        to the parent.


svn path=/trunk/; revision=22187
2009-01-23 05:34:14 +00:00
Matthias Clasen
125e80a64b Add docs
svn path=/trunk/; revision=22042
2009-01-02 20:55:54 +00:00
Matthias Clasen
860286c919 Doc additions
svn path=/trunk/; revision=21991
2008-12-29 06:48:44 +00:00
Matthias Clasen
a7e5938f58 Un-doc-commentize non-exported functions
svn path=/trunk/; revision=21979
2008-12-29 04:50:15 +00:00
Matthias Clasen
9f7e7c435b Documentation fixes
2008-12-28  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkhsv.c:
        * gtk/gtkwidget.c:
        * gtk/gtkaccelgroup.c: Documentation fixes

        * gtk/gtkstatusicon.c:
        * gtk/gtkentry.c:
        * gtk/gtkeditable.[hc]: Make parameter names match to make gtk-doc
        happy.


svn path=/trunk/; revision=21953
2008-12-28 06:58:09 +00:00
Matthias Clasen
1934d3423b Fix a typo
svn path=/trunk/; revision=21877
2008-12-13 05:20:10 +00:00
Sven Neumann
2c32cdd893 removed redundant conditional.
2008-10-30  Sven Neumann  <sven@gimp.org>

	* gtk/gtkwidget.c (gtk_widget_get_property): removed redundant
	conditional.


svn path=/trunk/; revision=21731
2008-10-30 15:04:38 +00:00
Christian Dywan
fa59a16884 Bug 558397 – gtk_widget_error_bell undefined without a screen
* gtk/gtkwidget.c (gtk_widget_error_bell): Test the settings
instance and return silently if unset

svn path=/trunk/; revision=21725
2008-10-29 15:08:49 +00:00
Tristan Van Berkom
c29237900c Added a note about GtkWidget:has-tooltip in the docs for
* gtk/gtkwidget.c: Added a note about GtkWidget:has-tooltip in
	the docs for GtkWidget::query-tooltip.


svn path=/trunk/; revision=21712
2008-10-24 18:25:43 +00:00