diff options
author | Dan Gudmundsson <[email protected]> | 2012-02-24 12:25:19 +0100 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2012-02-24 12:25:19 +0100 |
commit | e28f2b94964c75eaea74e860a413532ebdcacc4b (patch) | |
tree | 9fc6c448c1cb548d0d495a80343ce870b0f0678c /lib/wx/c_src | |
parent | ec9ee1b76343c146cec17d0642dd9d1db7bbf3d6 (diff) | |
download | otp-e28f2b94964c75eaea74e860a413532ebdcacc4b.tar.gz otp-e28f2b94964c75eaea74e860a413532ebdcacc4b.tar.bz2 otp-e28f2b94964c75eaea74e860a413532ebdcacc4b.zip |
[wx] Add wxTaskBarIcon class
Diffstat (limited to 'lib/wx/c_src')
-rw-r--r-- | lib/wx/c_src/gen/wxe_derived_dest.h | 5 | ||||
-rw-r--r-- | lib/wx/c_src/gen/wxe_events.cpp | 16 | ||||
-rw-r--r-- | lib/wx/c_src/gen/wxe_funcs.cpp | 37 | ||||
-rw-r--r-- | lib/wx/c_src/gen/wxe_macros.h | 6 |
4 files changed, 63 insertions, 1 deletions
diff --git a/lib/wx/c_src/gen/wxe_derived_dest.h b/lib/wx/c_src/gen/wxe_derived_dest.h index cf32c85cdd..6b7a5378cb 100644 --- a/lib/wx/c_src/gen/wxe_derived_dest.h +++ b/lib/wx/c_src/gen/wxe_derived_dest.h @@ -743,3 +743,8 @@ class EwxHtmlWindow : public wxHtmlWindow { EwxHtmlWindow() : wxHtmlWindow() {}; }; +class EwxTaskBarIcon : public wxTaskBarIcon { + public: ~EwxTaskBarIcon() {((WxeApp *)wxTheApp)->clearPtr(this);}; + EwxTaskBarIcon() : wxTaskBarIcon() {}; +}; + diff --git a/lib/wx/c_src/gen/wxe_events.cpp b/lib/wx/c_src/gen/wxe_events.cpp index cda98bfc3f..0afb02150a 100644 --- a/lib/wx/c_src/gen/wxe_events.cpp +++ b/lib/wx/c_src/gen/wxe_events.cpp @@ -1,7 +1,7 @@ /* * %CopyrightBegin% * - * Copyright Ericsson AB 2008-2011. All Rights Reserved. + * Copyright Ericsson AB 2008-2012. All Rights Reserved. * * The contents of this file are subject to the Erlang Public License, * Version 1.1, (the "License"); you may not use this file except in @@ -301,6 +301,13 @@ void initEventTable() {wxEVT_AUI_PANE_RESTORE, 224, "aui_pane_restore"}, {wxEVT_AUI_RENDER, 224, "aui_render"}, {wxEVT_AUI_FIND_MANAGER, 224, "aui_find_manager"}, + {wxEVT_TASKBAR_MOVE, 227, "taskbar_move"}, + {wxEVT_TASKBAR_LEFT_DOWN, 227, "taskbar_left_down"}, + {wxEVT_TASKBAR_LEFT_UP, 227, "taskbar_left_up"}, + {wxEVT_TASKBAR_RIGHT_DOWN, 227, "taskbar_right_down"}, + {wxEVT_TASKBAR_RIGHT_UP, 227, "taskbar_right_up"}, + {wxEVT_TASKBAR_LEFT_DCLICK, 227, "taskbar_left_dclick"}, + {wxEVT_TASKBAR_RIGHT_DCLICK, 227, "taskbar_right_dclick"}, {-1, 0, } }; for(int i=0; event_types[i].ev_type != -1; i++) { @@ -807,6 +814,13 @@ case 224: {// wxAuiManagerEvent rt.addTupleCount(8); break; } +case 227: {// wxTaskBarIconEvent + evClass = (char*)"wxTaskBarIconEvent"; + rt.addAtom((char*)"wxTaskBarIcon"); + rt.addAtom(Etype->eName); + rt.addTupleCount(2); + break; +} } rt.addTupleCount(5); diff --git a/lib/wx/c_src/gen/wxe_funcs.cpp b/lib/wx/c_src/gen/wxe_funcs.cpp index 0d506488b7..c222cb02f2 100644 --- a/lib/wx/c_src/gen/wxe_funcs.cpp +++ b/lib/wx/c_src/gen/wxe_funcs.cpp @@ -31336,6 +31336,43 @@ case wxLogNull_destroy: { // wxLogNull::destroy delete This;} break; } +case wxTaskBarIcon_new: { // wxTaskBarIcon::wxTaskBarIcon + wxTaskBarIcon * Result = new EwxTaskBarIcon(); + newPtr((void *) Result, 1, memenv); + rt.addRef(getRef((void *)Result,memenv), "wxTaskBarIcon"); + break; +} +case wxTaskBarIcon_PopupMenu: { // wxTaskBarIcon::PopupMenu + wxTaskBarIcon *This = (wxTaskBarIcon *) getPtr(bp,memenv); bp += 4; + wxMenu *menu = (wxMenu *) getPtr(bp,memenv); bp += 4; + if(!This) throw wxe_badarg(0); + bool Result = This->PopupMenu(menu); + rt.addBool(Result); + break; +} +case wxTaskBarIcon_RemoveIcon: { // wxTaskBarIcon::RemoveIcon + wxTaskBarIcon *This = (wxTaskBarIcon *) getPtr(bp,memenv); bp += 4; + if(!This) throw wxe_badarg(0); + bool Result = This->RemoveIcon(); + rt.addBool(Result); + break; +} +case wxTaskBarIcon_SetIcon: { // wxTaskBarIcon::SetIcon + wxString tooltip= wxEmptyString; + wxTaskBarIcon *This = (wxTaskBarIcon *) getPtr(bp,memenv); bp += 4; + wxIcon *icon = (wxIcon *) getPtr(bp,memenv); bp += 4; + while( * (int*) bp) { switch (* (int*) bp) { + case 1: {bp += 4; + int * tooltipLen = (int *) bp; bp += 4; + tooltip = wxString(bp, wxConvUTF8); + bp += *tooltipLen+((8-((0+ *tooltipLen) & 7)) & 7); + } break; + }}; + if(!This) throw wxe_badarg(0); + bool Result = This->SetIcon(*icon,tooltip); + rt.addBool(Result); + break; +} default: { wxeReturn error = wxeReturn(WXE_DRV_PORT, Ecmd.caller, false); error.addAtom("_wxe_error_"); error.addInt((int) Ecmd.op); diff --git a/lib/wx/c_src/gen/wxe_macros.h b/lib/wx/c_src/gen/wxe_macros.h index d891df04ad..55775cc69f 100644 --- a/lib/wx/c_src/gen/wxe_macros.h +++ b/lib/wx/c_src/gen/wxe_macros.h @@ -57,6 +57,7 @@ #include <wx/toolbook.h> #include <wx/listbook.h> #include <wx/treebook.h> +#include <wx/taskbar.h> #include <wx/html/htmlwin.h> #include <wx/html/htmlcell.h> #include <wx/filename.h> @@ -3344,5 +3345,10 @@ #define wxAuiManagerEvent_CanVeto 3516 #define wxLogNull_new 3517 #define wxLogNull_destroy 3518 +#define wxTaskBarIcon_new 3519 +#define wxTaskBarIcon_destruct 3520 +#define wxTaskBarIcon_PopupMenu 3521 +#define wxTaskBarIcon_RemoveIcon 3522 +#define wxTaskBarIcon_SetIcon 3523 |