X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9543e985ff1ac8d10d9c9574343427e1df14bb31..9ead8387d02667092186a7dd2671bacbd010406a:/include/wx/taskbar.h diff --git a/include/wx/taskbar.h b/include/wx/taskbar.h index 97f912ceb8..1992d92eb9 100644 --- a/include/wx/taskbar.h +++ b/include/wx/taskbar.h @@ -1,3 +1,14 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/taskbar.h +// Purpose: wxTaskBarIcon base header and class +// Author: Julian Smart +// Modified by: +// Created: +// Copyright: (c) Julian Smart +// RCS-ID: $Id$ +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + #ifndef _WX_TASKBAR_H_BASE_ #define _WX_TASKBAR_H_BASE_ @@ -41,7 +52,7 @@ private: // now include the actual class declaration // ---------------------------------------------------------------------------- -#if defined(__PALMOS__) +#if defined(__WXPALMOS__) #include "wx/palmos/taskbar.h" #elif defined(__WXMSW__) #include "wx/msw/taskbar.h" @@ -84,13 +95,19 @@ BEGIN_DECLARE_EVENT_TYPES() DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV,wxEVT_TASKBAR_RIGHT_DCLICK,1556) END_DECLARE_EVENT_TYPES() -#define EVT_TASKBAR_MOVE(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_TASKBAR_MOVE, wxID_ANY, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTaskBarIconEventFunction, &fn ), NULL), -#define EVT_TASKBAR_LEFT_DOWN(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_TASKBAR_LEFT_DOWN, wxID_ANY, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTaskBarIconEventFunction, &fn ), NULL), -#define EVT_TASKBAR_LEFT_UP(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_TASKBAR_LEFT_UP, wxID_ANY, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTaskBarIconEventFunction, &fn ), NULL), -#define EVT_TASKBAR_RIGHT_DOWN(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_TASKBAR_RIGHT_DOWN, wxID_ANY, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTaskBarIconEventFunction, &fn ), NULL), -#define EVT_TASKBAR_RIGHT_UP(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_TASKBAR_RIGHT_UP, wxID_ANY, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTaskBarIconEventFunction, &fn ), NULL), -#define EVT_TASKBAR_LEFT_DCLICK(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_TASKBAR_LEFT_DCLICK, wxID_ANY, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTaskBarIconEventFunction, &fn ), NULL), -#define EVT_TASKBAR_RIGHT_DCLICK(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_TASKBAR_RIGHT_DCLICK, wxID_ANY, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTaskBarIconEventFunction, &fn ), NULL), +#define wxTaskBarIconEventHandler(func) \ + (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxTaskBarIconEventFunction, &func) + +#define wx__DECLARE_TASKBAREVT(evt, fn) \ + wx__DECLARE_EVT0(wxEVT_TASKBAR_ ## evt, wxTaskBarIconEventHandler(fn)) + +#define EVT_TASKBAR_MOVE(fn) wx__DECLARE_TASKBAREVT(MOVE, fn) +#define EVT_TASKBAR_LEFT_DOWN(fn) wx__DECLARE_TASKBAREVT(LEFT_DOWN, fn) +#define EVT_TASKBAR_LEFT_UP(fn) wx__DECLARE_TASKBAREVT(LEFT_UP, fn) +#define EVT_TASKBAR_RIGHT_DOWN(fn) wx__DECLARE_TASKBAREVT(RIGHT_DOWN, fn) +#define EVT_TASKBAR_RIGHT_UP(fn) wx__DECLARE_TASKBAREVT(RIGHT_UP, fn) +#define EVT_TASKBAR_LEFT_DCLICK(fn) wx__DECLARE_TASKBAREVT(LEFT_DCLICK, fn) +#define EVT_TASKBAR_RIGHT_DCLICK(fn) wx__DECLARE_TASKBAREVT(RIGHT_DCLICK, fn) #endif // wxHAS_TASK_BAR_ICON