Exemple #1
0
        public void UnsetProperty(string property, Gtk.StateFlags state)
        {
            IntPtr native_property = GLib.Marshaller.StringToPtrGStrdup(property);

            gtk_style_properties_unset_property(Handle, native_property, (int)state);
            GLib.Marshaller.Free(native_property);
        }
Exemple #2
0
        public Gtk.StateFlags IterGetState(int pos)
        {
            int raw_ret = gtk_widget_path_iter_get_state(Handle, pos);

            Gtk.StateFlags ret = (Gtk.StateFlags)raw_ret;
            return(ret);
        }
Exemple #3
0
        public Pango.FontDescription GetFont(Gtk.StateFlags state)
        {
            IntPtr raw_ret = gtk_style_context_get_font(Handle, (int)state);

            Pango.FontDescription ret = raw_ret == IntPtr.Zero ? null : (Pango.FontDescription)GLib.Opaque.GetOpaque(raw_ret, typeof(Pango.FontDescription), false);
            return(ret);
        }
Exemple #4
0
        public bool GetStyleProperty(Gtk.WidgetPath path, Gtk.StateFlags state, IntPtr pspec, GLib.Value value)
        {
            IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc(value);
            bool   raw_ret      = gtk_style_provider_get_style_property(Handle, path == null ? IntPtr.Zero : path.Handle, (int)state, pspec, native_value);
            bool   ret          = raw_ret;

            Marshal.FreeHGlobal(native_value);
            return(ret);
        }
Exemple #5
0
        public void SetProperty(string property, Gtk.StateFlags state, GLib.Value value)
        {
            IntPtr native_property = GLib.Marshaller.StringToPtrGStrdup(property);
            IntPtr native_value    = GLib.Marshaller.StructureToPtrAlloc(value);

            gtk_style_properties_set_property(Handle, native_property, (int)state, native_value);
            GLib.Marshaller.Free(native_property);
            Marshal.FreeHGlobal(native_value);
        }
Exemple #6
0
        public Gtk.Border GetPadding(Gtk.StateFlags state)
        {
            Gtk.Border padding;
            IntPtr     native_padding = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(Gtk.Border)));

            gtk_style_context_get_padding(Handle, (int)state, native_padding);
            padding = Gtk.Border.New(native_padding);
            Marshal.FreeHGlobal(native_padding);
            return(padding);
        }
Exemple #7
0
        public Gtk.Border GetMargin(Gtk.StateFlags state)
        {
            Gtk.Border margin;
            IntPtr     native_margin = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(Gtk.Border)));

            gtk_style_context_get_margin(Handle, (int)state, native_margin);
            margin = Gtk.Border.New(native_margin);
            Marshal.FreeHGlobal(native_margin);
            return(margin);
        }
Exemple #8
0
        public Gdk.RGBA GetColor(Gtk.StateFlags state)
        {
            Gdk.RGBA color;
            IntPtr   native_color = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(Gdk.RGBA)));

            gtk_style_context_get_color(Handle, (int)state, native_color);
            color = Gdk.RGBA.New(native_color);
            Marshal.FreeHGlobal(native_color);
            return(color);
        }
Exemple #9
0
        public Gtk.Border GetBorder(Gtk.StateFlags state)
        {
            Gtk.Border border;
            IntPtr     native_border = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(Gtk.Border)));

            gtk_style_context_get_border(Handle, (int)state, native_border);
            border = Gtk.Border.New(native_border);
            Marshal.FreeHGlobal(native_border);
            return(border);
        }
Exemple #10
0
        public bool GetProperty(string property, Gtk.StateFlags state, GLib.Value value)
        {
            IntPtr native_property = GLib.Marshaller.StringToPtrGStrdup(property);
            IntPtr native_value    = GLib.Marshaller.StructureToPtrAlloc(value);
            bool   raw_ret         = gtk_style_properties_get_property(Handle, native_property, (int)state, native_value);
            bool   ret             = raw_ret;

            GLib.Marshaller.Free(native_property);
            Marshal.FreeHGlobal(native_value);
            return(ret);
        }
Exemple #11
0
        public GLib.Value GetProperty(string property, Gtk.StateFlags state)
        {
            GLib.Value value;
            IntPtr     native_property = GLib.Marshaller.StringToPtrGStrdup(property);
            IntPtr     native_value    = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(GLib.Value)));

            gtk_style_context_get_property(Handle, native_property, (int)state, native_value);
            GLib.Marshaller.Free(native_property);
            value = (GLib.Value)Marshal.PtrToStructure(native_value, typeof(GLib.Value));
            Marshal.FreeHGlobal(native_value);
            return(value);
        }
Exemple #12
0
 public void IterSetState(int pos, Gtk.StateFlags state)
 {
     gtk_widget_path_iter_set_state(Handle, pos, (int)state);
 }
Exemple #13
0
 public void SetValist(Gtk.StateFlags state, IntPtr args)
 {
     gtk_style_properties_set_valist(Handle, (int)state, args);
 }