Exemple #1
0
    def __new__(cls, frame):
        self = _FrameWindow.__new__(cls, frame)
        self.id = window.create(self.frame.parent.id,
                          xcb.xproto.CW.BackPixel,
                          [self.frame.colors[self.frame.state]['bg']])

        return self
Exemple #2
0
    def __new__(cls, frame):
        self = _FrameWindow.__new__(cls, frame)
        self.id = window.create(self.frame.parent.id,
                          xcb.xproto.CW.BackPixmap,
                          [xcb.xproto.BackPixmap.ParentRelative])

        return self
Exemple #3
0
    def __new__(cls, parent, client):
        self = _PopupWindow.__new__(cls)

        mask = xcb.xproto.CW.BackPixel
        values = [c_bg]
        self.id = window.create(parent.inner.id, mask, values)

        self.parent = parent
        self.client = client

        return self
Exemple #4
0
    def __init__(self):
        _PopupWindow.__init__(self)

        # Create the inner window
        inner_id = window.create(self.id, xcb.xproto.CW.BackPixel, [c_bg])
        self.inner = window.GeometryWindow(inner_id)

        self.icons = []
        self.wins = []

        self.current = 0
        self.showing = False
Exemple #5
0
    def __new__(cls):
        self = _PopupWindow.__new__(cls)

        mask = xcb.xproto.CW.BackPixel | xcb.xproto.CW.EventMask
        values = [c_brdr_clr]
        values.append(xcb.xproto.EventMask.SubstructureRedirect |
                      xcb.xproto.EventMask.ButtonPress |
                      xcb.xproto.EventMask.ButtonRelease)

        self.id = window.create(state.root, mask, values)

        return self
Exemple #6
0
    def __new__(cls, frame, ident):
        self = _FrameWindow.__new__(cls, frame)
        self.id = window.create(self.frame.parent.id,
                          xcb.xproto.CW.BackPixmap | xcb.xproto.CW.EventMask,
                          [xcb.xproto.BackPixmap.ParentRelative,
                           xcb.xproto.EventMask.ButtonPress |
                           xcb.xproto.EventMask.ButtonRelease |
                           xcb.xproto.EventMask.EnterWindow |
                           xcb.xproto.EventMask.LeaveWindow])

        self.ident = ident

        return self
Exemple #7
0
def main():
    parser = OptionParser()
    options, args = parser.parse_args()

    logger = logging.getLogger()
    logger.setLevel(logging.DEBUG)
    ch = logging.StreamHandler()
    ch.setLevel(logging.DEBUG)
    logger.addHandler(ch)

    dirname = os.path.dirname(__file__)
    if dirname:
        os.chdir(dirname)

    for directory in ['algorithms',
                      'topologies',
                      'charts',
                      ]:
        registry.auto_register(os.path.join(os.path.dirname(__file__),
                                            directory))

    window.create(options, args, pygame).run()
Exemple #8
0
    def __new__(cls, frame, frm_ident, cursor, direction):
        self = _FrameWindow.__new__(cls, frame)

        mask = (xcb.xproto.CW.BackPixmap | xcb.xproto.CW.EventMask |
                xcb.xproto.CW.Cursor)
        values = [xcb.xproto.BackPixmap.ParentRelative,
                  xcb.xproto.EventMask.ButtonPress |
                    xcb.xproto.EventMask.ButtonRelease,
                  cursor]
        self.id = window.create(self.frame.parent.id, mask, values)

        self.frm_ident = frm_ident
        self.cursor = cursor
        self.direction = direction

        return self
Exemple #9
0
    def __new__(cls, frame, frm_ident, cursor, direction):
        self = _FrameWindow.__new__(cls, frame)

        mask = (xcb.xproto.CW.BackPixmap | xcb.xproto.CW.EventMask
                | xcb.xproto.CW.Cursor)
        values = [
            xcb.xproto.BackPixmap.ParentRelative,
            xcb.xproto.EventMask.ButtonPress
            | xcb.xproto.EventMask.ButtonRelease, cursor
        ]
        self.id = window.create(self.frame.parent.id, mask, values)

        self.frm_ident = frm_ident
        self.cursor = cursor
        self.direction = direction

        return self
Exemple #10
0
    def __new__(cls, frame):
        self = _FrameWindow.__new__(cls, frame)

        self.nada = False

        mask = xcb.xproto.CW.EventMask
        bg = self.frame.colors[self.frame.state]['bg']
        if bg == -1:
            self.nada = True
            mask |= xcb.xproto.CW.BackPixmap
            values = [xcb.xproto.BackPixmap.ParentRelative]
        else:
            mask |= xcb.xproto.CW.BackPixel
            values = [0]
        values.append(xcb.xproto.EventMask.SubstructureRedirect |
                      xcb.xproto.EventMask.ButtonPress |
                      xcb.xproto.EventMask.ButtonRelease)

        self.id = window.create(state.root, mask, values)

        return self
Exemple #11
0
    def __new__(cls, frame):
        self = _FrameWindow.__new__(cls, frame)

        self.nada = False

        mask = xcb.xproto.CW.EventMask
        bg = self.frame.colors[self.frame.state]['bg']
        if bg == -1:
            self.nada = True
            mask |= xcb.xproto.CW.BackPixmap
            values = [xcb.xproto.BackPixmap.ParentRelative]
        else:
            mask |= xcb.xproto.CW.BackPixel
            values = [0]
        values.append(xcb.xproto.EventMask.SubstructureRedirect
                      | xcb.xproto.EventMask.ButtonPress
                      | xcb.xproto.EventMask.ButtonRelease)

        self.id = window.create(state.root, mask, values)

        return self
Exemple #12
0
import tkinter as tk
import authorization
import functions
import window
import time

spotify = authorization.auth().getToken()
if (spotify == False or spotify == None):
    spotify = authorization.auth().getToken()

try:
    window = window.create(spotify)
except:
    pass