This file is indexed.

/usr/include/wx-3.0/wx/wxPython/i_files/_palette.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
/////////////////////////////////////////////////////////////////////////////
// Name:        _wxPalette.i
// Purpose:     SWIG interface defs for wxPalette
//
// Author:      Robin Dunn
//
// Created:     7-July-1997
// RCS-ID:      $Id$
// Copyright:   (c) 2003 by Total Control Software
// Licence:     wxWindows license
/////////////////////////////////////////////////////////////////////////////

// Not a %module


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

MustHaveApp(wxPalette);

class wxPalette : public wxGDIObject {
public:
    //wxPalette(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
    %extend {
        wxPalette(const wxArrayInt& red, const wxArrayInt& green, const wxArrayInt& blue)
        {
            wxPalette* self = new wxPalette();
            int count = red.Count();

            wxCHECK_MSG( count == green.Count() && count == blue.Count(),
                         self,
                         wxT("Palette list lengths must be equal"));

            int idx;
            unsigned char* ra = new unsigned char[count];
            unsigned char* ga = new unsigned char[count];
            unsigned char* ba = new unsigned char[count];
            for (idx=0; idx<count; idx++)
            {
                int rv = red.Item(idx);
                int gv = green.Item(idx);
                int bv = blue.Item(idx);
                wxCHECK_MSG( rv >=0 && rv <=255 &&
                             gv >=0 && gv <=255 &&
                             bv >=0 && bv <=255,
                             self,
                             wxT("Palette values must be in the range 0..255"));
                ra[idx] = (unsigned char)rv;
                ga[idx] = (unsigned char)gv;
                ba[idx] = (unsigned char)bv;
            }
            self->Create(count, ra, ga, ba);
            delete [] ra;
            delete [] ga;
            delete [] ba;

            return self;
        }
    }
    ~wxPalette();

    int GetPixel(byte red, byte green, byte blue);
    
    DocDeclA(
        bool, GetRGB(int pixel, byte* OUTPUT, byte* OUTPUT, byte* OUTPUT),
        "GetRGB(self, int pixel) -> (success, R,G,B)");

    int GetColoursCount() const;
    bool IsOk();
    %pythoncode { Ok = IsOk }

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

    %property(ColoursCount, GetColoursCount, doc="See `GetColoursCount`");
};



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