'IconPositionHint', 'IconMaskHint', 'WindowGroupHint', 'MessageHint', 'UrgencyHint', ) AllHints = (wmHintsFlags.InputHint|wmHintsFlags.StateHint|wmHintsFlags.IconPixmapHint|wmHintsFlags.IconWindowHint| wmHintsFlags.IconPositionHint|wmHintsFlags.IconMaskHint|wmHintsFlags.WindowGroupHint|wmHintsFlags.MessageHint| wmHintsFlags.UrgencyHint) # DontCareState = 0 wmState = enum( 'WITHDRAWN', 'NORMAL', 'ZOOM', 'ICONIC', 'INACTIVE', ) visualMask = enum( VisualNoMask = 0x0, VisualIDMask = 0x1, VisualScreenMask = 0x2, VisualDepthMask = 0x4, VisualClassMask = 0x8, VisualRedMaskMask = 0x10, VisualGreenMaskMask = 0x20, VisualBlueMaskMask = 0x40, VisualColormapSizeMask = 0x80,
import xcb.xproto from orion import utils #import command from orion import hook from orion.utils import flagEnum, enum import orion from icccm import wmState import icccm from xcb.xproto import CW from orion.signals import SignalGroup # float states floatStates = enum( 'NOT_FLOATING', 'FLOATING', 'MAXIMIZED', 'FULLSCREEN', 'TOP', 'MINIMIZED', ) class MaskMap: """ A general utility class that encapsulates the way the mask/value idiom works in xpyb. It understands a special attribute _maskvalue on objects, which will be used instead of the object value if present. This lets us passin a Font object, rather than Font.fid, for example. """ def __init__(self, obj): self.mmap = []
from orion.utils import flagEnum, enum ButtonCodes = enum ( 'Button1', 'Button2', 'Button3', 'Button4', 'Button5', ) AllButtonsMask = 0b11111 << 8 ButtonMotionMask = 1 << 13 ButtonReleaseMask = 1 << 3 HintsFlags = flagEnum ( 'InputHint', # input 'StateHint', # initial_state 'IconPixmapHint', # icon_pixmap 'IconWindowHint', # icon_window 'IconPositionHint', # icon_x & icon_y 'IconMaskHint', # icon_mask 'WindowGroupHint', # window_group 'MessageHint', # (this bit is obsolete) 'UrgencyHint', # urgency ) WindowTypes = { '_NET_WM_WINDOW_TYPE_DESKTOP' : "desktop",