/*
 * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
 */
package com.sun.glass.ui.win;

import com.sun.glass.ui.Application;
import com.sun.glass.ui.Screen;

import java.util.List;
import java.util.ArrayList;

/**
 * MS Windows platform implementation class for Screen.
 *
 * @author Anthony Petrov
 */
final class WinScreen {
    native private static void _initIDs();
    static {
        Application.loadNativeLibrary();
        _initIDs();
    }

    native private static Screen _getDeepestScreen(Screen screen);
    native private static Screen _getMainScreen(Screen screen);
    native private static Screen _getScreenForLocation(Screen screen, int x, int y);
    native private static Screen _getScreenForPtr(Screen screen, long screenPtr);
    native private static List<Screen> _getScreens(List<Screen> screens);

    static Screen getDeepestScreen_impl() {
        return _getDeepestScreen(new Screen());
    }

    static Screen getMainScreen_impl() {
        return _getMainScreen(new Screen());
    }

    static Screen getScreenForLocation_impl(int x, int y) {
        return _getScreenForLocation(new Screen(), x, y);
    }

    static Screen getScreenForPtr_impl(long screenPtr) {
        return _getScreenForPtr(new Screen(), screenPtr);
    }

    static List<Screen> getScreens_impl() {
        return _getScreens(new ArrayList<Screen>());
    }
}

