Examples of CLongPointer


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

    public void placeAfter(NativeWindow w) {
        if (w == null) {
            toFront();
            return;
        }
        CLongPointer params = bridge.createCLongPointer(2, false);
        params.set(0, w.getId());
        params.set(1, windowID);
        x11.XRestackWindows(display, params, 2);
        x11.XFlush(display);
    }
View Full Code Here

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

        x11.XLowerWindow(display, windowID);
        x11.XFlush(display);
    }

    Point queryPointer() {
        CLongPointer rootReturned = bridge.createCLongPointer(1, false);
        CLongPointer childReturned = bridge.createCLongPointer(1, false);
        Int32Pointer rootX = bridge.createInt32Pointer(1, false);
        Int32Pointer rootY = bridge.createInt32Pointer(1, false);
        Int32Pointer windowX = bridge.createInt32Pointer(1, false);
        Int32Pointer windowY = bridge.createInt32Pointer(1, false);
        Int32Pointer mask = bridge.createInt32Pointer(1, false);
View Full Code Here

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);

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

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

        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

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

    public NativeWindow getWindowFromPoint(Point p) {
        long rootID = getRootWindow();
        long childID = rootID;
        Int32Pointer x = bridge.createInt32Pointer(1, false);
        Int32Pointer y = bridge.createInt32Pointer(1, false);
        CLongPointer childWindow = bridge.createCLongPointer(1, false);

        //recursevily ask for child containing p
        //until the deepest child is found
        //or until our top-level window is found
        while (childID != X11Defs.None) {
            x11.XTranslateCoordinates(display, rootID, childID,
                    p.x, p.y, x, y, childWindow);
            long nextID = childWindow.get(0);
            // avoid endless loop
            if (childID == nextID) {
                return null;
            }
            childID = nextID;
View Full Code Here

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

    public Dimension getWindowSizeById(long id) {
        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, id, root, x, y, w, h, border, depth);
        return new Dimension(w.get(0), h.get(0));
View Full Code Here

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

        //so have to translate it for top-level(managed by WM)windows
        //to get root-related coords
        if (!child && !isSynthetic) {
            Int32Pointer x = bridge.createInt32Pointer(1, false);
            Int32Pointer y = bridge.createInt32Pointer(1, false);
            CLongPointer childWindow = bridge.createCLongPointer(1, false);

            long parentId = win.getParentID();
            x11.XTranslateCoordinates(win.getDisplay(), parentId,
                                      factory.getRootWindow(),
                                      windowRect.x, windowRect.y,
View Full Code Here

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

        forwardToContent();

    }

    private void processWindowStateEvent() {
        CLongPointer actualTypeReturn = bridge.createCLongPointer(1, false);
        Int32Pointer actualFormatReturn = bridge.createInt32Pointer(1, false);
        CLongPointer nitemsReturn = bridge.createCLongPointer(1, false);
        CLongPointer bytesAfterReturn = bridge.createCLongPointer(1, false);
        PointerPointer propReturn = bridge.createPointerPointer(1, false);

        x11.XGetWindowProperty(factory.getDisplay(), windowId,
                factory.wm.NET_WM_STATE, 0, Integer.MAX_VALUE, X11Defs.FALSE,
                X11Defs.AnyPropertyType, actualTypeReturn, actualFormatReturn,
                nitemsReturn, bytesAfterReturn, propReturn);

        int count = (int)nitemsReturn.get(0);
        if (count == 0) {
            return;
        }
        if (actualFormatReturn.get(0) == 32) {
            CLongPointer types = bridge.createCLongPointer(propReturn.get(0));
            deriveNewWindowState(count, types);
        } else {
            // awt.10=Only 32-bit format is supported for window state operations.
            throw new RuntimeException(Messages.getString("awt.10")); //$NON-NLS-1$
        }
View Full Code Here

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

        forwardToContent();
    }

    private void processClientMessageEvent(X11.XClientMessageEvent event) {
        if (event.get_message_type() == factory.wm.WM_PROTOCOLS) {
            CLongPointer data = event.get_l();
            long protocol = data.get(0);
            if (protocol == factory.wm.WM_DELETE_WINDOW) {
                LinuxWindow lw = (LinuxWindow)factory.getWindowById(windowId);
                LinuxWindow cw = lw.getContentWindow();
                if (lw.isInputAllowed()) {
                    eventId = WindowEvent.WINDOW_CLOSING;
View Full Code Here

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

    }
    /**
     * @see org.apache.harmony.awt.wtk.NativeMouseInfo#getLocation()
     */
    public Point getLocation() {
        CLongPointer rootReturned = bridge.createCLongPointer(1, false);
        CLongPointer childReturned = bridge.createCLongPointer(1, false);
        Int32Pointer rootX = bridge.createInt32Pointer(1, false);
        Int32Pointer rootY = bridge.createInt32Pointer(1, false);
        Int32Pointer windowX = bridge.createInt32Pointer(1, false);
        Int32Pointer windowY = bridge.createInt32Pointer(1, false);
        Int32Pointer mask = bridge.createInt32Pointer(1, false);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.