This file is indexed.

/usr/include/wx-3.0/wx/wxPython/i_files/_power.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
/////////////////////////////////////////////////////////////////////////////
// Name:        _power.i
// Purpose:     SWIG interface for wx poser events and functions
//
// Author:      Robin Dunn
//
// Created:     28-May-2006
// RCS-ID:      $Id$
// Copyright:   (c) 2006 by Total Control Software
// Licence:     wxWindows license
/////////////////////////////////////////////////////////////////////////////

// Not a %module

//---------------------------------------------------------------------------
%newgroup


%{
#ifndef wxHAS_POWER_EVENTS
// Dummy class and other definitions for platforms that don't have them

// See wxPython_int.h for wxPowerEvent
    
enum {
    wxEVT_POWER_SUSPENDING,
    wxEVT_POWER_SUSPENDED,
    wxEVT_POWER_SUSPEND_CANCEL,
    wxEVT_POWER_RESUME,
};

wxPowerType wxGetPowerType()       { return wxPOWER_UNKNOWN; }
wxBatteryState wxGetBatteryState() { return wxBATTERY_UNKNOWN_STATE; }

#endif
%}



enum wxPowerType
{
    wxPOWER_SOCKET,
    wxPOWER_BATTERY,
    wxPOWER_UNKNOWN
};

enum wxBatteryState
{
    wxBATTERY_NORMAL_STATE,    // system is fully usable
    wxBATTERY_LOW_STATE,       // start to worry
    wxBATTERY_CRITICAL_STATE,  // save quickly
    wxBATTERY_SHUTDOWN_STATE,  // too late
    wxBATTERY_UNKNOWN_STATE
};


DocStr(wxPowerEvent,
"wx.PowerEvent is generated when the system online status changes.
Currently this is only implemented for Windows.",
"");
class wxPowerEvent : public wxEvent
{
public:
    wxPowerEvent(wxEventType evtType);

    // Veto the operation (only makes sense with EVT_POWER_SUSPENDING)
    void Veto();
    bool IsVetoed() const;
};


%constant wxEventType wxEVT_POWER_SUSPENDING;
%constant wxEventType wxEVT_POWER_SUSPENDED;
%constant wxEventType wxEVT_POWER_SUSPEND_CANCEL;
%constant wxEventType wxEVT_POWER_RESUME;

%pythoncode {
EVT_POWER_SUSPENDING       = wx.PyEventBinder( wxEVT_POWER_SUSPENDING , 1 )
EVT_POWER_SUSPENDED        = wx.PyEventBinder( wxEVT_POWER_SUSPENDED , 1 )
EVT_POWER_SUSPEND_CANCEL   = wx.PyEventBinder( wxEVT_POWER_SUSPEND_CANCEL , 1 )
EVT_POWER_RESUME           = wx.PyEventBinder( wxEVT_POWER_RESUME , 1 )
}


DocDeclStr(
    wxPowerType , wxGetPowerType(),
    "return the current system power state: online or offline", "");


DocDeclStr(
    wxBatteryState , wxGetBatteryState(),
    "return approximate battery state", "");


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