Beispiel #1
0
        public static bool Get(Gdk.Window window, Gdk.Atom property, ulong offset, ulong length, bool pdelete, out Gdk.Rectangle[] rects)
        {
            int[] raw_rects;
            if (!Get(window, property, Gdk.Atom.Intern("CARDINAL", false), offset, length, pdelete, out raw_rects))
            {
                rects = null;
                return(false);
            }

            rects = new Gdk.Rectangle [raw_rects.GetLength(0) / 4];
            for (int idx = 0; idx < rects.GetLength(0); idx++)
            {
                rects [idx] = new Gdk.Rectangle(raw_rects [idx * 4], raw_rects [idx * 4 + 1], raw_rects [idx * 4 + 2], raw_rects [idx * 4 + 3]);
            }
            return(true);
        }
Beispiel #2
0
        public static bool Get(Gdk.Window window, Gdk.Atom property, ulong offset, ulong length, bool pdelete, out Gdk.Rectangle[] rects)
        {
            int[] raw_rects;
            if (!Get (window, property, Gdk.Atom.Intern ("CARDINAL", false), offset, length, pdelete, out raw_rects)) {
                rects = null;
                return false;
            }

            rects = new Gdk.Rectangle [raw_rects.GetLength (0) / 4];
            for (int idx = 0; idx < rects.GetLength (0); idx ++) {
                rects [idx] = new Gdk.Rectangle (raw_rects [idx * 4], raw_rects [idx * 4 + 1], raw_rects [idx * 4 + 2], raw_rects [idx * 4 + 3]);
            }
            return true;
        }