Commit Graph

193 Commits

Author SHA1 Message Date
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
Javier Jardón
df9e1c3294 Substitute gtk_widget_ref/unref with g_object_ref/unref
Substitute the use of gtk_widget_ref/unref in documentation examples
and in internal gtk+ code

https://bugzilla.gnome.org/show_bug.cgi?id=598218
2009-10-14 03:30:57 +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
Cody Russell
a5f6b812be Add gtk_widget_set_allocation to gtkwidget.h and gtk.symbols 2009-08-13 11:22:57 -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
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
Michael Natterer
839aeeafa8 removed this function because there is massive disagreement about how to
2008-09-02  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkwidget.c (gtk_widget_get_allocation): removed this
	function because there is massive disagreement about how to
	implement it. Needs some general discussion in the next
	development cycle about how our C api should evolve.

	* gtk/gtk.symbols: changed accordingly.


svn path=/trunk/; revision=21259
2008-09-02 16:06:02 +00:00
Michael Natterer
2faae9fd1d move the gtk_widget_get_parent() and gtk_widget_get_parent_window()
2008-08-29  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkwidget.h: move the gtk_widget_get_parent() and
	gtk_widget_get_parent_window() prototypes together with their
	respective setters.

	* gtk/gtkwidget.c: move gtk_widget_get_parent_window() together
	with its setter.


svn path=/trunk/; revision=21240
2008-08-29 16:21:09 +00:00
Cody Russell
4e3c97b3f2 Bug 56070 – Can't click button after setting it sensitive.
2008-07-31  Cody Russell  <bratsche@gnome.org>

        Bug 56070 – Can't click button after setting it sensitive.

        * gtk/gtkwidget.[ch] 
        * gtk/gtkwindow.c
        * gtk/gtkmain.c
        * gtk/gtkbutton.c
        * gtk/gtkprivate.h
        * gdk/gdkevents.h: Synthesize crossing events events where necessary.

        * gtk/tests/crossingevents.c: Add unit tests for crossing events.

        Big thanks to Ed Catmur, Matthias Clasen, and everyone else who
        has worked on and helped out with this.


svn path=/trunk/; revision=20924
2008-08-01 03:30:50 +00:00
Cody Russell
57223c9a05 Revert name change
svn path=/trunk/; revision=20724
2008-07-01 22:57:50 +00:00
Cody Russell
fce9c8b7d4 Practically everything changed.
2008-06-30  Cody Russell  <bratsche@gnome.org>

        * Practically everything changed.

        Change	all references	of GIMP	Toolkit	(and variations	of it)
        to GTK+	Toolkit, showing no mercy at all to our	beloved
	ancestry. (#540529)


svn path=/trunk/; revision=20709
2008-06-30 23:01:56 +00:00
Tim Janik
bf2323b1de Change docs and signature of gtk_widget_get_allocation
svn path=/trunk/; revision=20625
2008-06-20 11:10:14 +00:00
Tim Janik
886ffbe067 Fix gtk_widget_get_allocation
svn path=/trunk/; revision=20622
2008-06-20 11:09:56 +00:00
Tim Janik
10896d4874 Seal GtkWidget
svn path=/trunk/; revision=20620
2008-06-20 11:09:42 +00:00
Michael Natterer
2c5f8a5c2b whitespace cleanup: remove trailing whitespace and excess newlines and
2008-05-28  Michael Natterer  <mitch@imendio.com>

	* gtk/gtk*.h: whitespace cleanup: remove trailing whitespace and
	excess newlines and sprinkled some newlines where needed. Zero
	code or formatting changes included.


svn path=/trunk/; revision=20225
2008-05-28 15:35:43 +00:00
Michael Natterer
eff99c282c define __GTK_H_INSIDE__ around including all other headers.
2008-05-28  Michael Natterer  <mitch@imendio.com>

	* gtk/gtk.h: define __GTK_H_INSIDE__ around including all other
	headers.

	* gtk/gtktypebuiltins.h.template
	* gtk/gtkversion.h.in
	* gtk/gtk*.h: add single-include guards that #error out if
	GTK_DISABLE_SINGLE_INCLUDES is defined and any of these files is
	included individually.

	* gtk/gtkprintbackend.h
	* gtk/gtkprinter-private.h
	* gtk/gtktextlayout.h
	* gtk/gtktexttagprivate.h
	* gtk/gtktexttypes.h
	* gtk/gtktreedatalist.h: include <gtk/gtk.h> instead of individual
	headers in these private or semi-private headers.

	* gtk/gtkimmodule.h: also here because it's not in gtk.h.

	* gtk/gtkpagesetupunixdialog.h
	* gtk/gtkprinter.h
	* gtk/gtkprintjob.h
	* gtk/gtkprintunixdialog.h: likewise in the gtkunixprint headers.

	* gtk/gtkclist.h
	* gtk/gtkcombo.h
	* gtk/gtkctree.h
	* gtk/gtkfilesel.h
	* gtk/gtkitemfactory.h
	* gtk/gtklist.h
	* gtk/gtklistitem.h
	* gtk/gtkoldeditable.h
	* gtk/gtkoptionmenu.h
	* gtk/gtkpixmap.h
	* gtk/gtkpreview.h
	* gtk/gtksignal.h
	* gtk/gtktipsquery.h: whenever possible, include only <gtk/gtk.h>
	instead of individual headers in these deprecated headers. They
	don't get included at all when GTK_DISABLE_DEPRECATED is defined,
	so if an app needs them anyway, it must undef GTK_DISABLE_DEPRECATED
	and include them individually, which should continue to work.

	* gtk/gtkclist.c: include "gtkctree.h" because of the change
	above.


svn path=/trunk/; revision=20221
2008-05-28 15:07:04 +00:00
21:10:15 Tim Janik
b3d160ced5 added GdkRectangle *clip_rect to gtk_widget_get_snapshot().
2008-05-21 21:10:15  Tim Janik  <timj@imendio.com>

        * gtk/gtkwidget.h: added GdkRectangle *clip_rect to gtk_widget_get_snapshot().

        * gtk/gtkwidget.c: clip the returned snapshot pixmap to clip_rect.
        return snapshot pixmap coordinates widget relative in *clip_rect.

        * tests/testgtk.c: fixed bogus NULL pointer unref.


svn path=/trunk/; revision=20124
2008-05-21 19:15:12 +00:00
10:49:20 Tim Janik
4111cf2065 Bug 318807 – Offscreen windows and window redirection.
2008-03-18 10:49:20  Tim Janik  <timj@imendio.com>

	* Applied pixmap redirection patch by Alexander Larsson with
	various updates from:
	Bug 318807 – Offscreen windows and window redirection.


	Updates:

	* updated docs to mention "Since 2.16".

	* tests/testgtk.c: fixed snapshooting pixmap leak.
	convert pixmap to pixbuf after snapshooting, to compensate for different
	bit depths (occurs when snapshooting ARGB visuals and displaying the
	pixmap in an RGB visual).

	* gdk/gdkwindow.[hc]: made GdkWindowRedirect private.

	* gdk/gdkwindow.c: removed damage idle handler, there's no aparent
	need for it. enqueue damage notification as GDK_DAMAGE events
	for each painting redirection at the start of the event queue.
	consider windows with a redirection fully visible when invalidating,
	and when updating from backing store. cleaned up stale variables.

	* gdk/gdkevents.c: added _gdk_event_queue_prepend().

	* gtk/gtkwidget.c: fixed coordinates for !NO_WINDOW widgets in
	gtk_widget_get_snapshot; this fixes garbage snap offsets for gammacurve,
	tree, drawingarea, text, handlebox, etc.
	clip the redirected window hierarchy to window sizes, the visible
	rectangles don't need to be taken into account here.
	extended snapshooting docs to recommend gdk_pixbuf_get_from_drawable()
	in case pixmap visuals could mismatch.

	* gdk/x11/gdkwindow-x11.c: removed _gdk_windowing_window_get_visible_rect().


	Base patch:

	* tests/testgtk.c: add a "Snapshot" test to demonstrate snapshooting
	of possibly obscured widgets into an offscreen pixmap.

	* gtk/gtkwidget.[hc]: add GtkWidget::damage-event signal, add
	gtk_widget_get_snapshot() to render a widget's contents to a GdkPixmap.

	* gtk/gtkmain.c: dispatch GDK_DAMAGE events.

	* gdk/gdkwindow.c: moved outer gdk_window_new() and gdk_window_reparent()
	implementations here, adapted them to propagate redirects to child windows.
	gdk_window_end_paint(): copy repainted window contents to redirection pixmap,
	clipped to visible region. queue GDK_DAMAGE event delivery.
	gdk_window_redirect_to_drawable(): install window painting redirection.
	gdk_window_remove_redirection(): remove previously installed redirection.

	* gdk/x11/gdkwindow-x11.c: added _gdk_windowing_window_get_visible_rect(),
	renamed _gdk_window_new() and _gdk_window_reparent().

	* gdk/gdkwindow.h: added GdkWindowRedirect* to GdkWindowObject, export
	gdk_window_redirect_to_drawable() and gdk_window_remove_redirection().

	* gdk/gdkevents.h: added GDK_DAMAGE event type.

	* gdk/gdkevents.c: extract time and state from GDK_DAMAGE events.

	* gdk/gdkinternals.h: added internal prototypes.



svn path=/trunk/; revision=20122
2008-05-21 19:04:24 +00:00
Johan Dahlin
60f33a23b6 include <atk/atk.h> instead of <atk/atkobject.h>
2008-04-25  Johan Dahlin  <jdahlin@async.com.br>

    * gtk/gtkwidget.h: include <atk/atk.h> instead of <atk/atkobject.h>


svn path=/trunk/; revision=20043
2008-04-25 17:32:12 +00:00
Michael Natterer
a362eecc4a gtk/gtkbutton.h gtk/gtkcellrenderer.h gtk/gtkimcontext.h gtk/gtkstyle.h
2008-01-25  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkbutton.h
	* gtk/gtkcellrenderer.h
	* gtk/gtkimcontext.h
	* gtk/gtkstyle.h
	* gtk/gtktoolbar.h
	* gtk/gtktooltip.h
	* gtk/gtktreeprivate.h
	* gtk/gtktreeviewcolumn.h
	* gtk/gtkwidget.h: add const to constant structs which are passed
	into GTK+. Also add some forgotten const for const strings.

	* gtk/gtkbutton.c
	* gtk/gtkcellrenderer.c
	* gtk/gtkimcontext.c
	* gtk/gtkstyle.c
	* gtk/gtktoolbar.c
	* gtk/gtktooltip.c
	* gtk/gtktreeview.c
	* gtk/gtktreeviewcolumn.c
	* gtk/gtkwidget.c: changed accordingly.


svn path=/trunk/; revision=19399
2008-01-25 09:30:40 +00:00
Kristian Rietveld
15dee8e529 add getter/setter pair, slight addition to has-tooltip property
2007-07-10  Kristian Rietveld  <kris@imendio.com>

	* gtk/gtk.symbols:
	* gtk/gtkwidget.[ch] (gtk_widget_{get,set}_has_tooltip): add
	getter/setter pair, slight addition to has-tooltip property
	documentation,
	(gtk_widget_real_set_has_tooltip): renamed internal function.


svn path=/trunk/; revision=18439
2007-07-10 18:24:37 +00:00
Mathias Hasselmann
9b604e29a2 Introduce convenience property "GtkWidget:tooltip-text" taking care of
2007-06-15 Mathias Hasselmann <mathias.hasselmann@gmx.de>

        * docs/reference/gtk/gtk-sections.txt, gtk/gtk.symbols,
        gtk/gtkwidget.c, gtk/gtkwidget.h, tests/testtooltips.c: Introduce
        convenience property "GtkWidget:tooltip-text" taking care of escaping
        it for unwanted markup entities. Add functions to set tooltip text:
        gtk_widget_set_tooltip_text(), gtk_widget_set_tooltip_markup(),
        gtk_widget_get_tooltip_text(), gtk_widget_get_tooltip_markup().

        * gtk/gtktooltip.c, gtk/gtktooltip.h: Add gtk_tooltip_set_text()
        to set the tooltip text without using markup.

        Patches from Emmanuele Bassi (#447643).

svn path=/trunk/; revision=18142
2007-06-15 18:24:55 +00:00
Matthias Clasen
08cc834061 Update docs Deprecate gtk_widget_{ref,unref}
2007-06-09  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkwidget.c:
        * gtk/gtkscrolledwindow.c: Update docs
        * gtk/gtkwidget.h: Deprecate gtk_widget_{ref,unref}

        * gtk/tmpl/gtkbindings.sgml:
        * gtk/tmpl/gtkrc.sgml:
        * gtk/tmpl/gtkwidget.sgml:
        * gtk/tmpl/gtkrecentmanager.sgml:
        * gtk/*.sgml:
        * gtk/tmpl/gtkstock.sgml:
        * gtk/gtk-sections.txt: Updates



svn path=/trunk/; revision=18090
2007-06-10 06:52:51 +00:00
Yevgen Muntyan
2cbaeadf43 new method, gtk_widget_modify_cursor() (#89314).
2007-06-06  Yevgen Muntyan  <muntyan@tamu.edu>

	* gtk/gtkwidget.c:
	* gtk/gtkwidget.h: new method, gtk_widget_modify_cursor() (#89314).

	* gtkrc.c:
	* gtkrc.h: new functions _gtk_rc_style_set_rc_property() and
	_gtk_rc_style_unset_rc_property().

	* gtk/gtk.symbols: added gtk_widget_modify_cursor.

	* tests/testtext.c (do_cursor_visible_changed):
	* tests/testgtk.c (create_styles): test it.


svn path=/trunk/; revision=18066
2007-06-06 19:43:31 +00:00
Kristian Rietveld
0ef946ed64 New tooltips API.
2007-02-06  Kristian Rietveld  <kris@imendio.com>

	New tooltips API.

	* gtk/Makefile.am
	* gtk/gtk.h
	* gtk/gtk.symbols: build system foo.

	* gtk/gtkmain.c (gtk_main_do_event): call tooltip event handler
	hook for appropriate events.

	* gtk/gtkmarshalers.list: add BOOLEAN:INT,INT,BOOLEAN,OBJECT.

	* gtk/gtkrc.c: add style for gtk-tooltip.

	* gtk/gtksettings.c (gtk_settings_class_init): make the
	different tooltip timeouts configurable.

	* gtk/gtkwidget.[ch]: add new properties, signals, make sure
	tooltips are hidden on unmap, destroy, update window event
	mask on realize, hook into focus change and show help
	handlers.

	* gtk/gtkwindow.h: move GtkWindow typdef to gtkwidget.h ...

	* gtk/gtktooltip.[ch]: new files.

	* tests/Makefile.am
	* tests/testtooltips.c: add test application.


svn path=/trunk/; revision=17264
2007-02-06 10:25:21 +00:00
Michael Natterer
7f374a74ba Add new infrastructure for notifications of failed keyboard navigation and
2006-11-16  Michael Natterer  <mitch@imendio.com>

	Add new infrastructure for notifications of failed keyboard
	navigation and navigation with restricted set of keys.

	The patch handles configurable beeping, navigating the GUI with
	cursor keys only (as in phone environments), and configurable
	wrap-around. Fixes bugs #322640, #70986, #318827, #334726, #334742
	and #309291.

	* gtk/gtksettings.c: added properties gtk-keynav-cursor-only,
	gtk-keynav-wrap-around and gtk-error-bell.

	* gtk/gtkwidget.[ch]: added new signal "keynav-failed" and public
	API to emit it. Added New function gtk_widget_error_bell() which
	looks at the gtk-error-bell setting and calls gdk_window_beep()
	accordingly.

	* gtk/gtk.symbols: add the new widget symbols.

	* gtk/gtkcellrendereraccel.c
	* gtk/gtkimcontextsimple.c
	* gtk/gtkmenu.c
	* gtk/gtknotebook.c: use gtk_widget_error_bell() or look at the
	gtk-error-bell setting instead of calling gdk_display_beep()
	unconditionally.

	* gtk/gtkcombobox.c
	* gtk/gtkentry.c
	* gtk/gtkiconview.c
	* gtk/gtklabel.c
	* gtk/gtkmenushell.c
	* gtk/gtkspinbutton.c
	* gtk/gtktextview.c
	* gtk/gtktreeview.c: call gtk_widget_error_bell() on failed keynav.

	* gtk/gtkentry.c
	* gtk/gtklabel.c
	* gtk/gtkrange.c
	* gtk/gtktextview.c: consult gtk_widget_keynav_failed() on failed
	cursor navigation and leave the widget if it returns FALSE.

	* gtk/gtkmenushell.c
	* gtk/gtknotebook.c: only wrap around if gtk-keynav-wrap-around
	is TRUE.

	* gtk/gtkradiobutton.c: ask gtk_widget_keynav_failed() to decide
	whether to to wrap-around, and don't select active items on cursor
	navigation if gtk-keynav-cursor-only is TRUE. Should look at
	gtk-keynav-wrap-around too, will look into that.
2006-11-16 12:56:30 +00:00
Søren Sandmann
b9d1a03440 Create 'composited' label.
Tue Apr 25 10:25:28 2006  Søren Sandmann  <sandmann@redhat.com>

	* tests/testgtk.c (create_alpha_window): Create 'composited' label.

	* tests/testgtk.c (on_composited_changed): New function, change
	the label to say whether the screen is composited or not.

	* gtk/gtkwindow.c (gtk_window_on_composited_changed): When
	composited status change, invalidate the window and propagate the signal;.

	* gtk/gtkwindow.c (gtk_window_map): Set the appropriate type hint
	if reset_type_hint is TRUE.

	* gtk/gtkwindow.c (gtk_window_set_type_hint): If hint is one of
	the old hints, store a shadow copy in the public window->type_hint
	bitfield, otherwise set this field to normal. Set the private
	field to the type hint.

	* gtk/gtkwindow.c (gtk_window_init): Initialize priv->type_hint.

	* gtk/gtkwindow.c (struct _GtkWindowPrivate): New field
	"reset_type_hint" indicating whether the type hint needs to be
	reset. New field type_hint containing a GdkWindowTypeHint.

	* gtk/gtkwidget.c (propagate_composited_changed): New function to
	propagate changes in composited status.
	(gtk_widget_class_init): Add composited_changed signal.

	* gtk/gtkwidget.h (struct _GtkWidgetClass): New signal composited-changed.

	* gtk/gtkwidget.c (gtk_widget_is_composited): New function.

	* gtk/gtktooltips.c (gtk_tooltips_draw_tips): Set transient for.

	* gtk/gtktooltips.c (gtk_tooltips_force_window): Set the type hint

	* gtk/gtkmenuitem.c (gtk_menu_item_position_menu): Compute whether
	the item belongs to a menubar. Set the type_hint appropriately
	depending on the outcome.

	* gtk/gtkmenu.c (gtk_menu_position): Set the default type hint here.

	* gtk/gtkmenu.c (gtk_menu_attach_to_widget): connect to hierarchy
	changed on the attach widget.

	* gtk/gtkmenu.c (attach_widget_hierarchy_changed): New function to
	set the transient_for property for menus.

	* gtk/gtkdnd.c (set_icon_stock_pixbuf): Set the appropriate type hint.

	* gtk/gtkcombo.c (gtk_combo_popup_list): Make the popup window
	transient for the toplevel.

	* gtk/gtkcombobox.c (gtk_combo_box_set_popup_widget): Set
	transient-for, for the popup window.

	* gdk/x11/gdkwindow-x11.c (gdk_window_get_type_hint): Support for
	new window types.

	* gdk/x11/gdkwindow-x11.c (gdk_window_set_type_hint): Add support
	for new window types.

	* gdk/x11/gdkscreen-x11.c (_gdk_x11_screen_process_owner_change):
	New function called whenever the compositing manager comes and goes.

	* gdk/x11/gdkscreen-x11.c (gdk_screen_is_composited): New function.

	* gdk/x11/gdkscreen-x11.c
	(_gdk_x11_screen_request_cm_notification, make_cm_atom,
	check_is_composited): New functions

	* gdk/x11/gdkevents-x11.c (gdk_event_translate): Call
	_gdk_x11_screen_process_owner_change when an
	XFixesSelectionNotifyEvent is received.

	* gdk/x11/gdkdisplay-x11.c (gdk_display_open): Call
	_gdk_x11_screen_request_cm_notification() on all screens.

	* gdk/quartz/gdkscreen-quartz.c (gdk_screen_is_composited): Dummy
	implementation.

	* gdk/gdkscreen.c (gdk_screen_class_init): New signal,
	'composited-changed'.

	* gdk/gdkwindow.h: Add new EWMH window types.

	* gdk/win32/gdkscreen-win32.c (gdk_screen_is_composited)
2006-04-25 14:27:32 +00:00
Matthias Clasen
1ad93a683b Support input shapes: (#331070)
2006-02-19  Matthias Clasen  <mclasen@redhat.com>

	Support input shapes:  (#331070)

	* gdk/gdk.symbols:
	* gdk/gdkdisplay.h:
	* gdk/gdkwindow.h:
	* gdk/x11/gdkdisplay-x11.c (gdk_display_supports_shapes)
	(gdk_display_supports_input_shapes): Functions to determine
	if a display supports shaped windows or input shapes.

	* gdk/x11/gdkwindow-x11.c (gdk_window_input_shape_combine_region):
	(gdk_window_input_shape_combine_mask):
	(gdk_window_set_child_input_shapes):
	(gdk_window_merge_child_input_shapes): Input shape versions
	of the window shape API.

	* gtk/gtk.symbols:
	* gtk/gtkwidget.h:
	* gtk/gtkwidget.c (gtk_widget_input_shape_combine_mask):
	New function to set an input shape on a widget.
2006-02-20 01:36:50 +00:00
Matthias Clasen
2e64df4035 Remove G_GNUC_NULL_TERMINATED from gtk_widget_new as well, pointed out by
2005-07-26  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkwidget.h:
	* gtk/gtk.symbols: Remove G_GNUC_NULL_TERMINATED from
	gtk_widget_new as well, pointed out by Kjartan Maraas.
2005-07-26 15:02:23 +00:00
Matthias Clasen
9b356ea0d8 Add a GrabBroken event to GDK, and a grab-broken-event signal to
2005-06-25  Matthias Clasen  <mclasen@redhat.com>

	Add a GrabBroken event to GDK, and a grab-broken-event
	signal to GtkWidget.  (#107320, Simon Cooke, initial patch
	by John Ehresman)

	* gdk/gdkevents.h: Add a GDK_GRAB_BROKEN event type,
	define a GdkEventGrabBroken event struct.

	* gdk/win32/gdkevents-win32.c (gdk_event_translate):
	Generate GrabBroken events in response to WM_KILLFOCUS.

	* gdk/x11/gdkmain-x11.c: Generate GrabBroken events
	when a grab is broken by the window becoming unviewable,
	or by another grab from the same client.

	* gtk/gtkwidget.h (GtkWidgetClass): Add grab_broken_event.

	* gtk/gtkwidget.c (gtk_widget_event_internal): Translate
	GrabBroken events into grab_broken_event signals.

	* gtk/gtkmain.c (gtk_main_do_event): Propagate GrabBroken
	events.

	* gtk/gtkmenushell.c (gtk_menu_shell_grab_broken): Deactivate
	the menu when the grab is broken.

	* gtk/gtkcolorsel.c (gtk_color_selection_grab_broken): Stop
	the color picker if the grab is broken.

	* gtk/gtkpaned.c (gtk_paned_grab_broken): Stop the drag if
	the grab is broken.
2005-06-25 07:10:40 +00:00
Matthias Clasen
f8e922f9ec Small cleanups.
2005-05-05  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreednd.h:
	* gtk/gtkwidget.h: Small cleanups.
2005-05-06 03:12:33 +00:00
Matthias Clasen
8d279c6d77 Typo fixes. (#169728, Morten Welinder, Owen Taylor)
2005-03-09  Matthias Clasen  <mclasen@redhat.com>

	* gtk/tmpl/gtkwidget.sgml: Typo fixes. 	(#169728,
	Morten Welinder, Owen Taylor)
2005-03-09 17:47:32 +00:00
Matthias Clasen
c8830f2504 Use G_GNUC_NULL_TERMINATED where appropriate. (#165682, Marc Meissner)
2005-03-08  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkwidget.h:
	* gtk/gtktreeview.h:
	* gtk/gtktreeviewcolumn.h:
	* gtk/gtktextbuffer.h:
	* gtk/gtkobject.h:
	* gtk/gtkfilechooserdialog.h:
	* gtk/gtkdialog.h:
	* gtk/gtkcontainer.h:
	* gtk/gtkcelllayout.h:
	* gtk/gtkaboutdialog.h: Use G_GNUC_NULL_TERMINATED where
	appropriate.  (#165682, Marc Meissner)
2005-03-08 05:52:55 +00:00
Matthias Clasen
c50066b452 Mark as const.
2004-11-28  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkwidget.h (gtk_requisition_get_type):
	* gtk/gtktypeutils.h (gtk_identifier_get_type):
	* gtk/gtktexttag.h (gtk_text_attributes_get_type):
	* gtk/gtkstyle.h (gtk_border_get_type):
	* gtk/gtkfilesystemmodel.h (_gtk_file_system_model_get_type):
	* gtk/gtkfilechooserentry.h (_gtk_file_chooser_entry_get_type):
	* gtk/gtkfilechooserembed.h (_gtk_file_chooser_embed_get_type):
	* gtk/gtkfilechooserdefault.h (_gtk_file_chooser_default_get_type):
	* gtk/gtkaccelmap.h (gtk_accel_map_get_type): Mark as const.

	* gtk/gtk.symbols:
	* gtk/Makefile.am: Mark get_type() functions
	generated by glib-mkenums as const.
2004-11-28 07:02:27 +00:00
Matthias Clasen
764bf6bb7e Fix #149191, reported by Morten Welinder:
Tue Aug  3 18:16:55 2004  Matthias Clasen  <maclas@gmx.de>

	Fix #149191, reported by Morten Welinder:

	* gtk/gtkmain.c: Include gtkclipboard.h,
	* gtk/gtkwidget.h: Declare _gtk_widget_grab_notify, not
	_gtk_widget_emit_grab_notify.
2004-08-03 22:19:37 +00:00
Soeren Sandmann
72d97795eb Add prototype for _gtk_widget_grab_notify()
Mon May 10 23:04:25 2004  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtkwidget.h: Add prototype for _gtk_widget_grab_notify()
2004-05-10 21:10:25 +00:00
Owen Taylor
be71d625f0 Fixes from Torsten Schoenfeld.
Thu Feb 26 16:36:38 2004  Owen Taylor  <otaylor@redhat.com>

        Fixes from Torsten Schoenfeld.

        * gtk/gtkwidget.c (gtk_widget_add_mnemonic_label):
        Fix name in doc comment.

        * gtk/gtkwidget.h: gtk_widget_list_mnemonic_labels(),
        not get_mnemonic_labels.
2004-02-26 21:43:19 +00:00
Owen Taylor
32ba5ce7d8 Patch from Padraig O'Briain to add gtk_widget_add/remove_mnemonic_label,
Wed Feb 25 12:21:32 2004  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkwidget.[ch] gtk/gtklabel.c: Patch from
        Padraig O'Briain to add gtk_widget_add/remove_mnemonic_label,
        gtk_widget_get_mnemonic_labels(). (#103456)
2004-02-25 17:28:34 +00:00
Federico Mena Quintero
5ebb6b04f2 Fix #105497; constify uses of GdkColor.
2004-01-26  Federico Mena Quintero  <federico@ximian.com>

	Fix #105497; constify uses of GdkColor.

	* gdk/gdkgc.c (gdk_gc_set_rgb_fg_color): Constify.
	(gdk_gc_set_rgb_bg_color): Constify.
	(gdk_gc_set_foreground): Constify.

	* gdk/x11/gdkcursor-x11.c (gdk_cursor_new_from_pixmap): Constify.
	* gdk/win32/gdkcursor-win32.c (gdk_cursor_new_from_pixmap): Constify.
	* gdk/linux-fb/gdkcursor-fb.c (gdk_cursor_new_from_pixmap): Constify.

	* gdk/x11/gdkpixmap-x11.c (gdk_pixmap_create_from_data): Constify.
	* gdk/win32/gdkpixmap-win32.c (gdk_pixmap_create_from_data): Constify.
	* gdk/linux-fb/gdkpixmap-fb.c (gdk_pixmap_create_from_data): Constify.

	* gdk/x11/gdkwindow-x11.c (gdk_window_set_background): Constify.
	* gdk/win32/gdkwindow-win32.c (gdk_window_set_background): Constify.
	* gdk/linux-fb/gdkwindow-fb.c (gdk_window_set_background): Constify.

	* gdk/gdkpango.c (gdk_draw_layout_line_with_colors): Constify.
	(gdk_draw_layout_with_colors): Constify.

	* gdk/gdkpixmap.c (gdk_pixmap_colormap_new_from_pixbuf): Constify.
	(gdk_pixmap_colormap_create_from_xpm): Constify.
	(gdk_pixmap_create_from_xpm): Constify.
	(gdk_pixmap_colormap_create_from_xpm_d): Constify.
	(gdk_pixmap_create_from_xpm_d): Constify.

	* gtk/gtkcellview.c (gtk_cell_view_set_background_color): Constify.

	* gtk/gtkclist.c (gtk_clist_set_foreground): Constify.
	(gtk_clist_set_background): Constify.

	* gtk/gtkcolorbutton.c (gtk_color_button_new_with_color): Constify.
	(gtk_color_button_set_color): Constify.

	* gtk/gtkcolorsel.c (gtk_color_selection_set_current_color):
	Constify and add a check for color != NULL.
	(gtk_color_selection_get_current_color): Add a check for color != NULL.
	(gtk_color_selection_set_previous_color): Constify and add a check
	for color != NULL.
	(gtk_color_selection_get_previous_color): Add a check for color != NULL.

	* gtk/gtkctree.c (gtk_ctree_node_set_foreground): Constify.
	(gtk_ctree_node_set_background): Constify.

	* gtk/gtktext.c (gtk_text_insert): Constify.
	(insert_text_property): Constify.
	(text_properties_equal): Constify.
	(new_text_property): Constify.

	* gtk/gtkwidget.c (gtk_widget_modify_color_component): Constify.
	(gtk_widget_modify_fg): Constify.
	(gtk_widget_modify_bg): Constify.
	(gtk_widget_modify_text): Constify.
	(gtk_widget_modify_base): Constify.
2004-01-26 20:21:09 +00:00
Tim Janik
448b576dc1 allow accel activation depending on sensitivity and the attach widget.
Thu Nov 27 16:19:03 2003  Tim Janik  <timj@gtk.org>

        * gtk/gtkmenu.c: allow accel activation depending on sensitivity
        and the attach widget.

        * gtk/gtkmenuitem.c: allow accel activation depending on visibility,
        sensitivity and the parent menu.

        * gtk/gtkwidget.[hc]: introduced ::can-activate-accel signal which
        checks whether accelerators may activate a widget. the default handler
        demands the widget be sensitive and visible+viewable.

        * gtk/gtkaccelgroup.[hc]: export gtk_accel_group_activate().
2003-11-27 15:51:32 +00:00
Matthias Clasen
d381967d5c Changes to make cross-process merging feasible:
2003-09-21  Matthias Clasen  <maclas@gmx.de>

	Changes to make cross-process merging feasible:

	* gtk/gtkuimanager.[hc]: Add a readonly "ui" property which holds the
	merged UI definition. Remove the "changed" signal, since its role
	is now filled by "notify::ui". Instead add a "actions-changed" signal
	which gets emitted when the set of actions changes.

	* gtk/gtktoggleactionprivate.h:
	* gtk/gtktoggleaction.[hc] (gtk_toggle_action_[sg]et_draw_as_radio):
	Add a "draw_as_radio" property to toggle actions so that they can be
	used as proxies for radio actions much like the "draw_as_radio"
	property on check menu items enables them to operate as proxies for
	radio actions.

	Prevent the "show_all" trap for action-based menus (see
	http://mail.gnome.org/archives/gtk-devel-list/2003-September/
	msg00260.html):

	* gtk/gtkmenu.c (gtk_menu_{hide,show}_all): Remove g_return_if_fail()
	calls from static functions.

	* gtk/gtkuimanager.c (update_node):
	* gtk/gtkaction.c (connect_proxy): Set "no_show_all" on constructed
	widgets whose visibility is externally controlled.

	* gtk/gtkwidget.[hc] (gtk_widget_[gs]et_no_show_all): Add a boolean
	"no_show_all" property with setter and getter. When TRUE, it keeps
	gtk_widget_{hide,show}_all() from modifying the visibility of the
	widget and its children.
2003-09-21 22:04:48 +00:00
Owen Taylor
370728f8bf Mark parent public as well; it's extensively accessed in existing code, so
Mon Aug 11 11:10:07 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkwidget.h: Mark parent public as well; it's
        extensively accessed in existing code, so there is
        no advantage in making people use get_parent().
        (Tweak to #119463 fix)
2003-08-11 15:18:27 +00:00