/usr/include/wx-3.0/wx/wxPython/i_files/_taskbar.i is in python-wxgtk3.0-dev 3.0.2.0+dfsg-4.
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 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 | /////////////////////////////////////////////////////////////////////////////
// Name: _taskbar.i
// Purpose: SWIG interface defs for wxTaskBarIcon
//
// Author: Robin Dunn
//
// Created: 2-June-1998
// RCS-ID: $Id$
// Copyright: (c) 2003 by Total Control Software
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
// Not a %module
//---------------------------------------------------------------------------
%{
#include <wx/taskbar.h>
%}
//---------------------------------------------------------------------------
%newgroup;
%{
#ifndef wxHAS_TASK_BAR_ICON
// implement dummy classes for platforms that don't have it
enum wxTaskBarIconType
{
wxTBI_DOCK,
wxTBI_CUSTOM_STATUSITEM,
wxTBI_DEFAULT_TYPE = wxTBI_CUSTOM_STATUSITEM
};
class wxTaskBarIcon : public wxEvtHandler
{
public:
wxTaskBarIcon(wxTaskBarIconType iconType=wxTBI_DEFAULT_TYPE)
{ wxPyRaiseNotImplemented(); }
};
class wxTaskBarIconEvent : public wxEvent
{
public:
wxTaskBarIconEvent(wxEventType, wxTaskBarIcon *)
{ wxPyRaiseNotImplemented(); }
virtual wxEvent* Clone() const { return NULL; }
bool IsOk() const { return false; }
bool IsIconInstalled() const { return false; }
bool SetIcon(const wxIcon& icon, const wxString& tooltip = wxPyEmptyString) { return false; }
bool RemoveIcon() { return false; }
bool PopupMenu(wxMenu *menu) { return false; }
#ifdef __WXMSW__
bool ShowBalloon(const wxString& title,
const wxString& text,
unsigned msec = 0,
int flags = 0) { return false; }
#endif
static bool IsAvailable() { return false; };
};
enum {
wxEVT_TASKBAR_MOVE = 0,
wxEVT_TASKBAR_LEFT_DOWN = 0,
wxEVT_TASKBAR_LEFT_UP = 0,
wxEVT_TASKBAR_RIGHT_DOWN = 0,
wxEVT_TASKBAR_RIGHT_UP = 0,
wxEVT_TASKBAR_LEFT_DCLICK = 0,
wxEVT_TASKBAR_RIGHT_DCLICK = 0,
};
#else
// Otherwise make a class that can virtualize CreatePopupMenu
class wxPyTaskBarIcon : public wxTaskBarIcon
{
DECLARE_ABSTRACT_CLASS(wxPyTaskBarIcon)
public:
wxPyTaskBarIcon(wxTaskBarIconType iconType=wxTBI_DEFAULT_TYPE) :
wxTaskBarIcon(iconType) {}
wxMenu* CreatePopupMenu() {
wxMenu *rval = NULL;
bool found;
wxPyBlock_t blocked = wxPyBeginBlockThreads();
if ((found = wxPyCBH_findCallback(m_myInst, "CreatePopupMenu"))) {
PyObject* ro;
wxMenu* ptr;
ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("()"));
if (ro) {
if (wxPyConvertSwigPtr(ro, (void **)&ptr, wxT("wxMenu")))
rval = ptr;
Py_DECREF(ro);
}
}
wxPyEndBlockThreads(blocked);
if (! found)
rval = wxTaskBarIcon::CreatePopupMenu();
return rval;
}
PYPRIVATE;
};
IMPLEMENT_ABSTRACT_CLASS(wxPyTaskBarIcon, wxTaskBarIcon);
#endif
%}
enum wxTaskBarIconType
{
wxTBI_DOCK,
wxTBI_CUSTOM_STATUSITEM,
wxTBI_DEFAULT_TYPE
};
MustHaveApp(wxPyTaskBarIcon);
%rename(TaskBarIcon) wxPyTaskBarIcon;
class wxPyTaskBarIcon : public wxEvtHandler
{
public:
%pythonAppend wxPyTaskBarIcon "self._setOORInfo(self);" setCallbackInfo(TaskBarIcon)
wxPyTaskBarIcon(wxTaskBarIconType iconType=wxTBI_DEFAULT_TYPE);
~wxPyTaskBarIcon();
void _setCallbackInfo(PyObject* self, PyObject* _class, int incref=0);
void Destroy();
bool IsOk() const;
%pythoncode { def __nonzero__(self): return self.IsOk() }
bool IsIconInstalled() const;
bool SetIcon(const wxIcon& icon, const wxString& tooltip = wxPyEmptyString);
bool RemoveIcon();
bool PopupMenu(wxMenu *menu);
DocStr(ShowBalloon,
"Show a balloon notification (the icon must have been already
initialized using SetIcon). Only implemented for Windows.
title and text are limited to 63 and 255 characters respectively, msec
is the timeout, in milliseconds, before the balloon disappears (will
be clamped down to the allowed 10-30s range by Windows if it's outside
it) and flags can include wxICON_ERROR/INFO/WARNING to show a
corresponding icon
Returns True if balloon was shown, False on error (incorrect parameters
or function unsupported by OS)
", "");
#ifdef __WXMSW__
bool ShowBalloon(const wxString& title,
const wxString& text,
unsigned msec = 0,
int flags = 0);
#else
%extend {
bool ShowBalloon(const wxString& title,
const wxString& text,
unsigned msec = 0,
int flags = 0) { return false; }
}
#endif
static bool IsAvailable();
};
class wxTaskBarIconEvent : public wxEvent
{
public:
wxTaskBarIconEvent(wxEventType evtType, wxTaskBarIcon *tbIcon);
};
%constant wxEventType wxEVT_TASKBAR_MOVE;
%constant wxEventType wxEVT_TASKBAR_LEFT_DOWN;
%constant wxEventType wxEVT_TASKBAR_LEFT_UP;
%constant wxEventType wxEVT_TASKBAR_RIGHT_DOWN;
%constant wxEventType wxEVT_TASKBAR_RIGHT_UP;
%constant wxEventType wxEVT_TASKBAR_LEFT_DCLICK;
%constant wxEventType wxEVT_TASKBAR_RIGHT_DCLICK;
%constant wxEventType wxEVT_TASKBAR_CLICK;
%constant wxEventType wxEVT_TASKBAR_BALLOON_TIMEOUT;
%constant wxEventType wxEVT_TASKBAR_BALLOON_CLICK;
%pythoncode {
EVT_TASKBAR_MOVE = wx.PyEventBinder ( wxEVT_TASKBAR_MOVE )
EVT_TASKBAR_LEFT_DOWN = wx.PyEventBinder ( wxEVT_TASKBAR_LEFT_DOWN )
EVT_TASKBAR_LEFT_UP = wx.PyEventBinder ( wxEVT_TASKBAR_LEFT_UP )
EVT_TASKBAR_RIGHT_DOWN = wx.PyEventBinder ( wxEVT_TASKBAR_RIGHT_DOWN )
EVT_TASKBAR_RIGHT_UP = wx.PyEventBinder ( wxEVT_TASKBAR_RIGHT_UP )
EVT_TASKBAR_LEFT_DCLICK = wx.PyEventBinder ( wxEVT_TASKBAR_LEFT_DCLICK )
EVT_TASKBAR_RIGHT_DCLICK = wx.PyEventBinder ( wxEVT_TASKBAR_RIGHT_DCLICK )
EVT_TASKBAR_CLICK = wx.PyEventBinder ( wxEVT_TASKBAR_CLICK )
EVT_TASKBAR_BALLOON_TIMEOUT = wx.PyEventBinder ( wxEVT_TASKBAR_BALLOON_TIMEOUT )
EVT_TASKBAR_BALLOON_CLICK = wx.PyEventBinder ( wxEVT_TASKBAR_BALLOON_CLICK )
}
//---------------------------------------------------------------------------
|