#!/usr/bin/env python
# -*- coding:utf-8 -*-

__author__ = 'Olivier Larrieu'

from gtk import gdk


class ScreenProperties(object):
    """
     Usefull to get basic screen informations
    """

    @classmethod
    def screen_dimension(cls):
        """
            Return a dic with the screen height and screen width
        """
        width = gdk.screen_width()
        height = gdk.screen_height()
        return {'width': width, 'height': height}
#!/usr/bin/env python
# -*- coding:utf-8 -*-

__author__ = 'Olivier Larrieu'


class ScreenProperties(object):
    """
     Usefull to get basic screen informations
    """

    @classmethod
    def screen_dimension(cls):
        """
            Return a dic with the screen height and screen width
        """
        from Xlib import display
        display = display.Display()
        root = display.screen().root
        desktop = root.get_geometry()

        return {'width': desktop.width, 'height': desktop.height}
Use Xlib instead of gtk to get screen width and screen height This limit dependances
Use Xlib instead of gtk to get screen width and screen height
This limit dependances
