1 /* 2 * This file is part of gtkD. 3 * 4 * gtkD is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU Lesser General Public License 6 * as published by the Free Software Foundation; either version 3 7 * of the License, or (at your option) any later version, with 8 * some exceptions, please read the COPYING file. 9 * 10 * gtkD is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public License 16 * along with gtkD; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA 18 */ 19 20 // generated automatically - do not change 21 // find conversion definition on APILookup.txt 22 // implement new conversion functionalities on the wrap.utils pakage 23 24 25 module gtk.StyleProviderIF; 26 27 private import glib.MemorySlice; 28 private import gobject.ObjectG; 29 private import gobject.ParamSpec; 30 private import gobject.Value; 31 private import gtk.IconFactory; 32 private import gtk.StyleProperties; 33 private import gtk.WidgetPath; 34 private import gtk.c.functions; 35 public import gtk.c.types; 36 public import gtkc.gtktypes; 37 38 39 /** 40 * GtkStyleProvider is an interface used to provide style information to a #GtkStyleContext. 41 * See gtk_style_context_add_provider() and gtk_style_context_add_provider_for_screen(). 42 */ 43 public interface StyleProviderIF{ 44 /** Get the main Gtk struct */ 45 public GtkStyleProvider* getStyleProviderStruct(bool transferOwnership = false); 46 47 /** the main Gtk struct as a void* */ 48 protected void* getStruct(); 49 50 51 /** */ 52 public static GType getType() 53 { 54 return gtk_style_provider_get_type(); 55 } 56 57 /** 58 * Returns the #GtkIconFactory defined to be in use for @path, or %NULL if none 59 * is defined. 60 * 61 * Deprecated: Will always return %NULL for all GTK-provided style providers. 62 * 63 * Params: 64 * path = #GtkWidgetPath to query 65 * 66 * Returns: The icon factory to use for @path, or %NULL 67 * 68 * Since: 3.0 69 */ 70 public IconFactory getIconFactory(WidgetPath path); 71 72 /** 73 * Returns the style settings affecting a widget defined by @path, or %NULL if 74 * @provider doesn’t contemplate styling @path. 75 * 76 * Deprecated: Will always return %NULL for all GTK-provided style providers 77 * as the interface cannot correctly work the way CSS is specified. 78 * 79 * Params: 80 * path = #GtkWidgetPath to query 81 * 82 * Returns: a #GtkStyleProperties containing the 83 * style settings affecting @path 84 * 85 * Since: 3.0 86 */ 87 public StyleProperties getStyle(WidgetPath path); 88 89 /** 90 * Looks up a widget style property as defined by @provider for 91 * the widget represented by @path. 92 * 93 * Params: 94 * path = #GtkWidgetPath to query 95 * state = state to query the style property for 96 * pspec = The #GParamSpec to query 97 * value = return location for the property value 98 * 99 * Returns: %TRUE if the property was found and has a value, %FALSE otherwise 100 * 101 * Since: 3.0 102 */ 103 public bool getStyleProperty(WidgetPath path, GtkStateFlags state, ParamSpec pspec, out Value value); 104 }