This file is indexed.

/usr/include/wx-3.0/wx/wxPython/i_files/_cursor.i is in python-wxgtk3.0-dev 3.0.2.0+dfsg-7.

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
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
/////////////////////////////////////////////////////////////////////////////
// Name:        _cursor.i
// Purpose:     SWIG interface for wxCursor
//
// Author:      Robin Dunn
//
// Created:     7-July-1997
// RCS-ID:      $Id$
// Copyright:   (c) 2003 by Total Control Software
// Licence:     wxWindows license
/////////////////////////////////////////////////////////////////////////////

// Not a %module


//---------------------------------------------------------------------------

// enum {
//     wxCURSOR_DEFAULT_TYPE
// };


DocStr(wxCursor,
"A cursor is a small bitmap usually used for denoting where the mouse
pointer is, with a picture that might indicate the interpretation of a
mouse click.

A single cursor object may be used in many windows (any subwindow
type). The wxWindows convention is to set the cursor for a window, as
in X, rather than to set it globally as in MS Windows, although a
global `wx.SetCursor` function is also available for use on MS Windows.
","

Stock Cursor IDs
-----------------
    ========================    ======================================
    wx.CURSOR_ARROW             A standard arrow cursor.
    wx.CURSOR_RIGHT_ARROW       A standard arrow cursor pointing to the right.
    wx.CURSOR_BLANK             Transparent cursor.
    wx.CURSOR_BULLSEYE          Bullseye cursor.
    wx.CURSOR_CHAR              Rectangular character cursor.
    wx.CURSOR_CROSS             A cross cursor.
    wx.CURSOR_HAND              A hand cursor.
    wx.CURSOR_IBEAM             An I-beam cursor (vertical line).
    wx.CURSOR_LEFT_BUTTON       Represents a mouse with the left button depressed.
    wx.CURSOR_MAGNIFIER         A magnifier icon.
    wx.CURSOR_MIDDLE_BUTTON     Represents a mouse with the middle button depressed.
    wx.CURSOR_NO_ENTRY          A no-entry sign cursor.
    wx.CURSOR_PAINT_BRUSH       A paintbrush cursor.
    wx.CURSOR_PENCIL            A pencil cursor.
    wx.CURSOR_POINT_LEFT        A cursor that points left.
    wx.CURSOR_POINT_RIGHT       A cursor that points right.
    wx.CURSOR_QUESTION_ARROW    An arrow and question mark.
    wx.CURSOR_RIGHT_BUTTON      Represents a mouse with the right button depressed.
    wx.CURSOR_SIZENESW          A sizing cursor pointing NE-SW.
    wx.CURSOR_SIZENS            A sizing cursor pointing N-S.
    wx.CURSOR_SIZENWSE          A sizing cursor pointing NW-SE.
    wx.CURSOR_SIZEWE            A sizing cursor pointing W-E.
    wx.CURSOR_SIZING            A general sizing cursor.
    wx.CURSOR_SPRAYCAN          A spraycan cursor.
    wx.CURSOR_WAIT              A wait cursor.
    wx.CURSOR_WATCH             A watch cursor.
    wx.CURSOR_ARROWWAIT         A cursor with both an arrow and an hourglass, (windows.)
    ========================    ======================================

");

MustHaveApp(wxCursor);

class wxCursor : public wxGDIObject
{
public:
    
    %extend {
        DocStr(wxCursor,
               "Construct a Cursor from a file.  Specify the type of file using
wx.BITMAP_TYPE* constants, and specify the hotspot if not using a .cur
file.","
:see: Alternate constructors `wx.StockCursor`,`wx.CursorFromImage`");
        wxCursor(const wxString& cursorName,
                 // defaulting to a resource type on some platforms makes no
                 // sense from wxPython perspective
                 wxBitmapType type, /*=wxCURSOR_DEFAULT_TYPE,*/  
                 int hotSpotX=0, int hotSpotY=0) {
%#ifdef __WXGTK__
            wxImage img(cursorName, type);
            img.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_X, hotSpotX);
            img.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_Y, hotSpotY);
            return new wxCursor(img);
%#else
            return new wxCursor(cursorName, type, hotSpotX, hotSpotY);
%#endif
        }
    }

    ~wxCursor();

    DocCtorStrName(
        wxCursor(wxStockCursor id),
        "Create a cursor using one of the stock cursors.  Note that not all
stock cursors are available on all platforms.", "",
        StockCursor);

    
    DocCtorStrName(
        wxCursor(const wxImage& image),
        "Constructs a cursor from a `wx.Image`. The mask (if any) will be used
for setting the transparent portions of the cursor.",
"
In MSW the cursor is resized to 32x32 if it was larger.

In GTK the cursor will be displayed at the size of the image.

On MacOS the cursor is resized to 16x16 if it was larger.",
        CursorFromImage);
    
    
//     %extend {
//         DocStr(wxCursor,
//                "");
//         %RenameCtor(CursorFromBits,  wxCursor(PyObject* bits, int width, int  height,
//                                          int hotSpotX=-1, int hotSpotY=-1,
//                                          PyObject* maskBits=NULL))
//         {
//             char* bitsbuf;
//             char* maskbuf = NULL;
//             int   length;
//             PyString_AsStringAndSize(bits, &bitsbuf, &length);
//             if (maskBits)
//                 PyString_AsStringAndSize(maskBits, &maskbuf, &length);
//             return new wxCursor(bitsbuf, width, height, hotSpotX, hotSpotY, maskbuf);
//         }
//     }

    
    
#ifdef __WXMSW__
    DocDeclStr(
        long , GetHandle(),
        "Get the MS Windows handle for the cursor", "");
    
    %extend {
    DocStr(SetHandle,
        "Set the MS Windows handle to use for the cursor", "");
        void SetHandle(long handle) { self->SetHandle((WXHANDLE)handle); }
    }
    
#endif
    
    DocDeclStr(
        bool , IsOk(),
        "", "");
    %pythoncode { Ok = IsOk }

    %pythoncode { def __nonzero__(self): return self.IsOk() }

    
#ifdef __WXMSW__
    DocDeclStr(
        int , GetWidth(),
        "", "");
    
    DocDeclStr(
        int , GetHeight(),
        "", "");
    
    DocDeclStr(
        int , GetDepth(),
        "", "");
    
    DocDeclStr(
        void , SetWidth(int w),
        "", "");
    
    DocDeclStr(
        void , SetHeight(int h),
        "", "");
    
    DocDeclStr(
        void , SetDepth(int d),
        "", "");
    
    DocDeclStr(
        void , SetSize(const wxSize& size),
        "", "");
    
#endif
    
};


//---------------------------------------------------------------------------
//---------------------------------------------------------------------------