Package: gtk

Function gtk:widget-add-provider

Lambda List

gtk:widget-add-provider (widget provider &optional priority)

Arguments

widget -- a gtk:widget object
provider -- a gtk:style-provider object
priority -- an optional unsigned integer for the priority of the style provider

Return Value

The string with an unique identifier for the added provider.

Details

Adds a style provider to the display of widget to be used in style construction. The style provider is removed from the display when the widget is destroyed. Call the gtk:widget-remove-provider function with the returned unique identifier to remove the provider from the display of the widget.

The lower the priority of the style provider is, the earlier it will be used in the style construction. Typically this will be in the range between the gtk:+priority-fallback+ and gtk:+priority-user+ priorities. The default value is gtk:+priority-application+. See the gtk:style-context-add-provider documentation for more information.

Notes

This function is a Lisp extension that provides a convenient way to apply a provider to the display of the widget. The style provider is added with the gtk:style-context-add-provider-for-display function. A destroy notify callback function is installed with the g:object-set-data-full function. It removes the style provider with the gtk:style-context-remove-provider-for-display function for the display when the widget is destroyed. Alternativly, you can remove the provider from the display of the widget with the gtk:widget-remove-provider function.
 

See also

2025-2-15