~bennabiy/+junk/python-xlib

« back to all changes in this revision

Viewing changes to .pc/python3.patch/Xlib/xobject/cursor.py

  • Committer: Package Import Robot
  • Author(s): Andrew Shadura, Ramkumar Ramachandra, Andrew Shadura
  • Date: 2015-08-13 08:14:19 UTC
  • mfrom: (6.1.2 sid)
  • Revision ID: package-import@ubuntu.com-20150813081419-hdefinnghp2iydkx
Tags: 0.14+20091101-3
[ Ramkumar Ramachandra ]
* Remove useless debugging output (Closes: #565996)

[ Andrew Shadura ]
* Switch to 3.0 (quilt) format.
* Rename patches.
* Use debhelper 9 in its short form.
* Use pybuild.
* Bump Standards-Version.
* Don't build or install PostScript documentation and info files.
* Use system-provided texi2html instead of a shipped version
  (Closes: #795057).
* Update debian/copyright (Closes: #795057).
* Don't install Makefile or texi2html with the documentation.
* Set executable bit for examples.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Xlib.xobject.cursor -- cursor object
 
2
#
 
3
#    Copyright (C) 2000 Peter Liljenberg <petli@ctrl-c.liu.se>
 
4
#
 
5
#    This program is free software; you can redistribute it and/or modify
 
6
#    it under the terms of the GNU General Public License as published by
 
7
#    the Free Software Foundation; either version 2 of the License, or
 
8
#    (at your option) any later version.
 
9
#
 
10
#    This program is distributed in the hope that it will be useful,
 
11
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
#    GNU General Public License for more details.
 
14
#
 
15
#    You should have received a copy of the GNU General Public License
 
16
#    along with this program; if not, write to the Free Software
 
17
#    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
18
 
 
19
from Xlib.protocol import request
 
20
 
 
21
import resource
 
22
 
 
23
class Cursor(resource.Resource):
 
24
    __cursor__ = resource.Resource.__resource__
 
25
 
 
26
    def free(self, onerror = None):
 
27
        request.FreeCursor(display = self.display,
 
28
                           onerror = onerror,
 
29
                           cursor = self.id)
 
30
        self.display.free_resource_id(self.id)
 
31
 
 
32
    def recolor(self, (fore_red, fore_green, fore_blue),
 
33
                (back_red, back_green, back_blue), onerror = None):
 
34
 
 
35
        request.RecolorCursor(display = self.display,
 
36
                              onerror = onerror,
 
37
                              cursor = self.id,
 
38
                              fore_red = fore_red,
 
39
                              fore_green = fore_green,
 
40
                              fore_blue = fore_blue,
 
41
                              back_red = back_red,
 
42
                              back_green = back_green,
 
43
                              back_blue = back_blue)