Example #1
0
        public Gdk.Pixbuf RenderIconPixbuf(Gtk.StyleContext context, Gtk.IconSize size)
        {
            IntPtr raw_ret = gtk_icon_set_render_icon_pixbuf(Handle, context == null ? IntPtr.Zero : context.Handle, (int)size);

            Gdk.Pixbuf ret = GLib.Object.GetObject(raw_ret) as Gdk.Pixbuf;
            return(ret);
        }
Example #2
0
        public Cairo.Surface RenderIconSurface(Gtk.StyleContext context, Gtk.IconSize size, int scale, Gdk.Window for_window)
        {
            IntPtr raw_ret = gtk_icon_set_render_icon_surface(Handle, context == null ? IntPtr.Zero : context.Handle, (int)size, scale, for_window == null ? IntPtr.Zero : for_window.Handle);

            Cairo.Surface ret = Cairo.Surface.Lookup(raw_ret, true);
            return(ret);
        }
Example #3
0
        public static Gdk.Pixbuf IconPixbuf(Gtk.StyleContext context, Gtk.IconSource source, Gtk.IconSize size)
        {
            IntPtr raw_ret = gtk_render_icon_pixbuf(context == null ? IntPtr.Zero : context.Handle, source == null ? IntPtr.Zero : source.Handle, (int)size);

            Gdk.Pixbuf ret = GLib.Object.GetObject(raw_ret, true) as Gdk.Pixbuf;
            return(ret);
        }
Example #4
0
        public static void BackgroundGetClip(Gtk.StyleContext context, double x, double y, double width, double height, Gdk.Rectangle out_clip)
        {
            IntPtr native_out_clip = GLib.Marshaller.StructureToPtrAlloc(out_clip);

            gtk_render_background_get_clip(context == null ? IntPtr.Zero : context.Handle, x, y, width, height, native_out_clip);
            Marshal.FreeHGlobal(native_out_clip);
        }
Example #5
0
        public BooruLog()
        {
            Model = new Gtk.ListStore(typeof(Gdk.Pixbuf), typeof(string), typeof(string), typeof(string));

            Gtk.StyleContext stylecontext = new Gtk.StyleContext();

            DebugPixBuf   = Gtk.IconFactory.LookupDefault("gtk-dialog-question").RenderIconPixbuf(stylecontext, Gtk.IconSize.Menu);
            InfoPixBuf    = Gtk.IconFactory.LookupDefault("gtk-dialog-info").RenderIconPixbuf(stylecontext, Gtk.IconSize.Menu);
            WarningPixBuf = Gtk.IconFactory.LookupDefault("gtk-dialog-warning").RenderIconPixbuf(stylecontext, Gtk.IconSize.Menu);
            ErrorPixBuf   = Gtk.IconFactory.LookupDefault("gtk-dialog-error").RenderIconPixbuf(stylecontext, Gtk.IconSize.Menu);
        }
 public NumerableIcon(GLib.IIcon base_icon, Gtk.StyleContext context) : base(IntPtr.Zero)
 {
     if (GetType() != typeof(NumerableIcon))
     {
         var vals  = new List <GLib.Value> ();
         var names = new List <string> ();
         CreateNativeObject(names.ToArray(), vals.ToArray());
         return;
     }
     Raw = gtk_numerable_icon_new_with_style_context(base_icon == null ? IntPtr.Zero : ((base_icon is GLib.Object) ? (base_icon as GLib.Object).Handle : (base_icon as GLib.IconAdapter).Handle), context == null ? IntPtr.Zero : context.Handle);
 }
Example #7
0
        public unsafe Gdk.Pixbuf LoadSymbolicForContext(Gtk.StyleContext context, out bool was_symbolic)
        {
            IntPtr error   = IntPtr.Zero;
            IntPtr raw_ret = gtk_icon_info_load_symbolic_for_context(Handle, context == null ? IntPtr.Zero : context.Handle, out was_symbolic, out error);

            Gdk.Pixbuf ret = GLib.Object.GetObject(raw_ret) as Gdk.Pixbuf;
            if (error != IntPtr.Zero)
            {
                throw new GLib.GException(error);
            }
            return(ret);
        }
Example #8
0
 public void LoadSymbolicForContextAsync(Gtk.StyleContext context, GLib.Cancellable cancellable, GLib.AsyncReadyCallback cb)
 {
     GLibSharp.AsyncReadyCallbackWrapper cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper(cb);
     gtk_icon_info_load_symbolic_for_context_async(Handle, context == null ? IntPtr.Zero : context.Handle, cancellable == null ? IntPtr.Zero : cancellable.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero);
 }
Example #9
0
 public static void Slider(Gtk.StyleContext context, Cairo.Context cr, double x, double y, double width, double height, Gtk.Orientation orientation)
 {
     gtk_render_slider(context == null ? IntPtr.Zero : context.Handle, cr == null ? IntPtr.Zero : cr.Handle, x, y, width, height, (int)orientation);
 }
Example #10
0
 public static void Arrow(Gtk.StyleContext context, Cairo.Context cr, double angle, double x, double y, double size)
 {
     gtk_render_arrow(context == null ? IntPtr.Zero : context.Handle, cr == null ? IntPtr.Zero : cr.Handle, angle, x, y, size);
 }
Example #11
0
 public static void Layout(Gtk.StyleContext context, Cairo.Context cr, double x, double y, Pango.Layout layout)
 {
     gtk_render_layout(context == null ? IntPtr.Zero : context.Handle, cr == null ? IntPtr.Zero : cr.Handle, x, y, layout == null ? IntPtr.Zero : layout.Handle);
 }
Example #12
0
 public static void Line(Gtk.StyleContext context, Cairo.Context cr, double x0, double y0, double x1, double y1)
 {
     gtk_render_line(context == null ? IntPtr.Zero : context.Handle, cr == null ? IntPtr.Zero : cr.Handle, x0, y0, x1, y1);
 }
Example #13
0
 public static void IconSurface(Gtk.StyleContext context, Cairo.Context cr, Cairo.Surface surface, double x, double y)
 {
     gtk_render_icon_surface(context == null ? IntPtr.Zero : context.Handle, cr == null ? IntPtr.Zero : cr.Handle, surface.Handle, x, y);
 }
Example #14
0
 public static void InsertionCursor(Gtk.StyleContext context, Cairo.Context cr, double x, double y, Pango.Layout layout, int index, Pango.Direction direction)
 {
     gtk_render_insertion_cursor(context == null ? IntPtr.Zero : context.Handle, cr == null ? IntPtr.Zero : cr.Handle, x, y, layout == null ? IntPtr.Zero : layout.Handle, index, (int)direction);
 }
Example #15
0
 public static void Icon(Gtk.StyleContext context, Cairo.Context cr, Gdk.Pixbuf pixbuf, double x, double y)
 {
     gtk_render_icon(context == null ? IntPtr.Zero : context.Handle, cr == null ? IntPtr.Zero : cr.Handle, pixbuf == null ? IntPtr.Zero : pixbuf.Handle, x, y);
 }
 public static void RenderFrameGap(this Gtk.StyleContext style, Cairo.Context cr, RectangleF rect, Gtk.PositionType gap_side, double xy0_gap, double xy1_gap)
 {
     style.RenderFrameGap(cr, rect.X, rect.Y, rect.Width, rect.Height, gap_side, xy0_gap, xy1_gap);
 }
 public static void RenderExtension(this Gtk.StyleContext style, Cairo.Context cr, RectangleF rect, Gtk.PositionType gap_side)
 {
     style.RenderExtension(cr, rect.X, rect.Y, rect.Width, rect.Height, gap_side);
 }
Example #18
0
 public static void FrameGap(Gtk.StyleContext context, Cairo.Context cr, double x, double y, double width, double height, Gtk.PositionType gap_side, double xy0_gap, double xy1_gap)
 {
     gtk_render_frame_gap(context == null ? IntPtr.Zero : context.Handle, cr == null ? IntPtr.Zero : cr.Handle, x, y, width, height, (int)gap_side, xy0_gap, xy1_gap);
 }
Example #19
0
 public static void Extension(Gtk.StyleContext context, Cairo.Context cr, double x, double y, double width, double height, Gtk.PositionType gap_side)
 {
     gtk_render_extension(context == null ? IntPtr.Zero : context.Handle, cr == null ? IntPtr.Zero : cr.Handle, x, y, width, height, (int)gap_side);
 }
 public static void RenderLayout(this Gtk.StyleContext style, Cairo.Context cr, PointF location, Pango.Layout layout)
 {
     style.RenderLayout(cr, location.X, location.Y, layout);
 }
 public static void RenderLine(this Gtk.StyleContext style, Cairo.Context cr, PointF pt0, PointF pt1)
 {
     style.RenderLine(cr, pt0.X, pt0.Y, pt1.X, pt1.Y);
 }
 public static void RenderOption(this Gtk.StyleContext style, Cairo.Context cr, RectangleF rect)
 {
     style.RenderOption(cr, rect.X, rect.Y, rect.Width, rect.Height);
 }
 public static void RenderSlider(this Gtk.StyleContext style, Cairo.Context cr, RectangleF rect, Gtk.Orientation orientation)
 {
     style.RenderSlider(cr, rect.X, rect.Y, rect.Width, rect.Height, orientation);
 }
Example #24
0
 public static void Frame(Gtk.StyleContext context, Cairo.Context cr, double x, double y, double width, double height)
 {
     gtk_render_frame(context == null ? IntPtr.Zero : context.Handle, cr == null ? IntPtr.Zero : cr.Handle, x, y, width, height);
 }
 public static void RenderArrow(this Gtk.StyleContext style, Cairo.Context cr, double angle, PointF location, double size)
 {
     style.RenderArrow(cr, angle, location.X, location.Y, size);
 }