Ejemplo n.º 1
0
        // Constructor.
        internal Screen(Display dpy, int number, IntPtr screen)
        {
            // Copy parameters in from the create process.
            this.dpy    = dpy;
            this.number = number;
            this.screen = screen;

            // Create the root window instance for this screen.
            rootWindow = new Xsharp.RootWindow
                             (dpy, this, Xlib.XRootWindowOfScreen(screen));

            // Get the default root visual for this screen.
            visual = Xlib.XDefaultVisualOfScreen(screen);

            // Create a "Colormap" object for the default colormap.
            defaultColormap = new Colormap
                                  (dpy, this, Xlib.XDefaultColormapOfScreen(screen));

            // Create the GC cache.
            defaultGCs = new IntPtr [GCCacheSize];
            bitmapGCs  = new IntPtr [GCCacheSize];

            // Initialize the standard colors.
            InitStandardColors();

            // Create the placeholder window for parent-less widgets.
            placeholder = new PlaceholderWindow(rootWindow);

            // Create the grab window for managing popup window events.
            grabWindow = new GrabWindow(rootWindow);
        }