/usr/lib/python2.7/dist-packages/DisplayCAL/taskbar.py is in dispcalgui 3.5.0.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | # -*- coding: utf-8 -*-
import comtypes.gen.TaskbarLib as tbl
import comtypes.client as cc
TBPF_NOPROGRESS = 0
TBPF_INDETERMINATE = 0x1
TBPF_NORMAL = 0x2
TBPF_ERROR = 0x4
TBPF_PAUSED = 0x8
taskbar = cc.CreateObject("{56FDF344-FD6D-11d0-958A-006097C9A090}",
interface=tbl.ITaskbarList3)
taskbar.HrInit()
class Taskbar(object):
def __init__(self, frame, maxv=100):
self.frame = frame
self.maxv = maxv
def set_progress_value(self, value):
if self.frame:
taskbar.SetProgressValue(self.frame.GetHandle(), value, self.maxv)
def set_progress_state(self, state):
if self.frame:
taskbar.SetProgressState(self.frame.GetHandle(), state)
|