Package org.apache.harmony.awt.nativebridge

Examples of org.apache.harmony.awt.nativebridge.CLongPointer


    private long getParentID(long windowID) {
        if (windowID == 0) {
            return 0;
        }

        CLongPointer root = bridge.createCLongPointer(1, false);
        CLongPointer parent = bridge.createCLongPointer(1, false);
        PointerPointer children = bridge.createPointerPointer(1, true);
        Int32Pointer count = bridge.createInt32Pointer(1, false);

        x11.XQueryTree(display, windowID, root, parent, children, count);
        VoidPointer data = children.get(0);
        if (data != null) {
            x11.XFree(data);
        }
        return parent.get(0);
    }
View Full Code Here


        Int32Pointer x = bridge.createInt32Pointer(1, false);
        Int32Pointer y = bridge.createInt32Pointer(1, false);
        Int32Pointer w = bridge.createInt32Pointer(1, false);
        Int32Pointer h = bridge.createInt32Pointer(1, false);
        CLongPointer root = bridge.createCLongPointer(1, false);
        Int32Pointer border = bridge.createInt32Pointer(1, false);
        Int32Pointer depth = bridge.createInt32Pointer(1, false);

        x11.XGetGeometry(display, windowID, root, x, y, w, h, border, depth);
        long rootID = root.get(0);

        CLongPointer childWindow = bridge.createCLongPointer(1, false);
        x11.XTranslateCoordinates(display, getParentID(), rootID,
                x.get(0), y.get(0), x, y, childWindow);

        Point pos = new Point(x.get(0), y.get(0));
        return pos;
View Full Code Here

TOP

Related Classes of org.apache.harmony.awt.nativebridge.CLongPointer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.