~ubuntu-branches/ubuntu/trusty/erlang/trusty

« back to all changes in this revision

Viewing changes to lib/wx/c_src/gen/wxe_events.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Clint Byrum
  • Date: 2011-05-05 15:48:43 UTC
  • mfrom: (3.5.13 sid)
  • Revision ID: james.westby@ubuntu.com-20110505154843-0om6ekzg6m7ugj27
Tags: 1:14.b.2-dfsg-3ubuntu1
* Merge from debian unstable.  Remaining changes:
  - Drop libwxgtk2.8-dev build dependency. Wx isn't in main, and not
    supposed to.
  - Drop erlang-wx binary.
  - Drop erlang-wx dependency from -megaco, -common-test, and -reltool, they
    do not really need wx. Also drop it from -debugger; the GUI needs wx,
    but it apparently has CLI bits as well, and is also needed by -megaco,
    so let's keep the package for now.
  - debian/patches/series: Do what I meant, and enable build-options.patch
    instead.
* Additional changes:
  - Drop erlang-wx from -et
* Dropped Changes:
  - patches/pcre-crash.patch: CVE-2008-2371: outer level option with
    alternatives caused crash. (Applied Upstream)
  - fix for ssl certificate verification in newSSL: 
    ssl_cacertfile_fix.patch (Applied Upstream)
  - debian/patches/series: Enable native.patch again, to get stripped beam
    files and reduce the package size again. (build-options is what
    actually accomplished this)
  - Remove build-options.patch on advice from upstream and because it caused
    odd build failures.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 * %CopyrightBegin%
3
 
 * 
4
 
 * Copyright Ericsson AB 2008-2009. All Rights Reserved.
5
 
 * 
 
3
 *
 
4
 * Copyright Ericsson AB 2008-2010. All Rights Reserved.
 
5
 *
6
6
 * The contents of this file are subject to the Erlang Public License,
7
7
 * Version 1.1, (the "License"); you may not use this file except in
8
8
 * compliance with the License. You should have received a copy of the
9
9
 * Erlang Public License along with this software. If not, it can be
10
10
 * retrieved online at http://www.erlang.org/.
11
 
 * 
 
11
 *
12
12
 * Software distributed under the License is distributed on an "AS IS"
13
13
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
14
14
 * the License for the specific language governing rights and limitations
15
15
 * under the License.
16
 
 * 
 
16
 *
17
17
 * %CopyrightEnd% 
18
18
*/
19
19
 
20
 
/***** This file is generated do not edit ****/ 
 
20
/***** This file is generated do not edit ****/
21
21
 
22
22
#include <wx/wx.h>
23
23
#include "../wxe_impl.h"
31
31
 
32
32
WX_DECLARE_HASH_MAP(int, wxeEtype*, wxIntegerHash, wxIntegerEqual, wxeETmap );
33
33
 
34
 
wxeETmap etmap; 
 
34
wxeETmap etmap;
35
35
 
36
36
int wxeEventTypeFromAtom(char *etype_atom) {
37
37
  wxeETmap::iterator it;
48
48
  return -1; 
49
49
}
50
50
 
51
 
void initEventTable() 
 
51
void initEventTable()
52
52
{
53
 
  struct { int ev_type;  int class_id; const char * ev_name;} event_types[] = 
 
53
  struct { int ev_type;  int class_id; const char * ev_name;} event_types[] =
54
54
  {
55
55
   {wxEVT_NULL, 0, "null"},
56
56
   {wxEVT_COMMAND_BUTTON_CLICKED, 163, "command_button_clicked"},
266
266
   {wxEVT_COMMAND_SPLITTER_DOUBLECLICKED, 217, "command_splitter_doubleclicked"},
267
267
   {wxEVT_COMMAND_SPLITTER_UNSPLIT, 217, "command_splitter_unsplit"},
268
268
   {wxEVT_COMMAND_HTML_LINK_CLICKED, 219, "command_html_link_clicked"},
269
 
   {wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, 220, "command_auinotebook_page_close"},
270
 
   {wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, 220, "command_auinotebook_page_changed"},
271
 
   {wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING, 220, "command_auinotebook_page_changing"},
272
 
   {wxEVT_COMMAND_AUINOTEBOOK_BUTTON, 220, "command_auinotebook_button"},
273
 
   {wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG, 220, "command_auinotebook_begin_drag"},
274
 
   {wxEVT_COMMAND_AUINOTEBOOK_END_DRAG, 220, "command_auinotebook_end_drag"},
275
 
   {wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION, 220, "command_auinotebook_drag_motion"},
276
 
   {wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND, 220, "command_auinotebook_allow_dnd"},
277
 
#if wxCHECK_VERSION(2,8,5) 
278
 
   {wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN, 220, "command_auinotebook_tab_middle_down"},
279
 
#endif 
280
 
#if wxCHECK_VERSION(2,8,5) 
281
 
   {wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP, 220, "command_auinotebook_tab_middle_up"},
282
 
#endif 
283
 
#if wxCHECK_VERSION(2,8,5) 
284
 
   {wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN, 220, "command_auinotebook_tab_right_down"},
285
 
#endif 
286
 
#if wxCHECK_VERSION(2,8,5) 
287
 
   {wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP, 220, "command_auinotebook_tab_right_up"},
288
 
#endif 
289
 
#if wxCHECK_VERSION(2,8,5) 
290
 
   {wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED, 220, "command_auinotebook_page_closed"},
291
 
#endif 
292
 
#if wxCHECK_VERSION(2,8,5) 
293
 
   {wxEVT_COMMAND_AUINOTEBOOK_DRAG_DONE, 220, "command_auinotebook_drag_done"},
294
 
#endif 
295
 
#if wxCHECK_VERSION(2,8,5) 
296
 
   {wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK, 220, "command_auinotebook_bg_dclick"},
297
 
#endif 
298
 
   {wxEVT_AUI_PANE_BUTTON, 221, "aui_pane_button"},
299
 
   {wxEVT_AUI_PANE_CLOSE, 221, "aui_pane_close"},
300
 
   {wxEVT_AUI_PANE_MAXIMIZE, 221, "aui_pane_maximize"},
301
 
   {wxEVT_AUI_PANE_RESTORE, 221, "aui_pane_restore"},
302
 
   {wxEVT_AUI_RENDER, 221, "aui_render"},
303
 
   {wxEVT_AUI_FIND_MANAGER, 221, "aui_find_manager"},
 
269
   {wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, 221, "command_auinotebook_page_close"},
 
270
   {wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, 221, "command_auinotebook_page_changed"},
 
271
   {wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING, 221, "command_auinotebook_page_changing"},
 
272
   {wxEVT_COMMAND_AUINOTEBOOK_BUTTON, 221, "command_auinotebook_button"},
 
273
   {wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG, 221, "command_auinotebook_begin_drag"},
 
274
   {wxEVT_COMMAND_AUINOTEBOOK_END_DRAG, 221, "command_auinotebook_end_drag"},
 
275
   {wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION, 221, "command_auinotebook_drag_motion"},
 
276
   {wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND, 221, "command_auinotebook_allow_dnd"},
 
277
#if wxCHECK_VERSION(2,8,5)
 
278
   {wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN, 221, "command_auinotebook_tab_middle_down"},
 
279
#endif
 
280
#if wxCHECK_VERSION(2,8,5)
 
281
   {wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP, 221, "command_auinotebook_tab_middle_up"},
 
282
#endif
 
283
#if wxCHECK_VERSION(2,8,5)
 
284
   {wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN, 221, "command_auinotebook_tab_right_down"},
 
285
#endif
 
286
#if wxCHECK_VERSION(2,8,5)
 
287
   {wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP, 221, "command_auinotebook_tab_right_up"},
 
288
#endif
 
289
#if wxCHECK_VERSION(2,8,5)
 
290
   {wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED, 221, "command_auinotebook_page_closed"},
 
291
#endif
 
292
#if wxCHECK_VERSION(2,8,5)
 
293
   {wxEVT_COMMAND_AUINOTEBOOK_DRAG_DONE, 221, "command_auinotebook_drag_done"},
 
294
#endif
 
295
#if wxCHECK_VERSION(2,8,5)
 
296
   {wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK, 221, "command_auinotebook_bg_dclick"},
 
297
#endif
 
298
   {wxEVT_AUI_PANE_BUTTON, 222, "aui_pane_button"},
 
299
   {wxEVT_AUI_PANE_CLOSE, 222, "aui_pane_close"},
 
300
   {wxEVT_AUI_PANE_MAXIMIZE, 222, "aui_pane_maximize"},
 
301
   {wxEVT_AUI_PANE_RESTORE, 222, "aui_pane_restore"},
 
302
   {wxEVT_AUI_RENDER, 222, "aui_render"},
 
303
   {wxEVT_AUI_FIND_MANAGER, 222, "aui_find_manager"},
304
304
   {-1, 0, }
305
305
  };
306
306
  for(int i=0; event_types[i].ev_type != -1; i++) {
307
307
     if(NULL == etmap[event_types[i].ev_type]) {
308
 
       etmap[event_types[i].ev_type] = 
 
308
       etmap[event_types[i].ev_type] =
309
309
        new wxeEtype(event_types[i].ev_name, event_types[i].class_id);
310
310
     } else {
311
311
       wxeEtype *prev = etmap[event_types[i].ev_type];
319
319
  }
320
320
}
321
321
 
322
 
void wxeEvtListener::forward(wxEvent& event) 
323
 
 
322
void wxeEvtListener::forward(wxEvent& event)
 
323
{
324
324
#ifdef DEBUG
325
 
  if(!sendevent(&event, port)) 
 
325
  if(!sendevent(&event, port))
326
326
    fprintf(stderr, "Couldn't send event!\r\n");
327
327
#else
328
328
sendevent(&event, port);
329
329
#endif
330
330
}
331
331
 
332
 
int getRef(void* ptr, wxeMemEnv* memenv) 
333
 
 
332
int getRef(void* ptr, wxeMemEnv* memenv)
 
333
{
334
334
  WxeApp * app = (WxeApp *) wxTheApp;
335
335
  return app->getRef(ptr,memenv);
336
 
 
336
}
337
337
 
338
338
bool sendevent(wxEvent *event, ErlDrvPort port)
339
339
{
740
740
    evClass = (char*)"wxTreeEvent";
741
741
    rt.addAtom((char*)"wxTree");
742
742
    rt.addAtom(Etype->eName);
743
 
 rt.addRef(getRef((void *)ev->GetItem().m_pItem,memenv), "wxTreeItemId");
744
 
 rt.addRef(getRef((void *)ev->GetOldItem().m_pItem,memenv), "wxTreeItemId");
 
743
 rt.add((wxUIntPtr *) ev->GetItem().m_pItem);
 
744
 rt.add((wxUIntPtr *) ev->GetOldItem().m_pItem);
745
745
 rt.add(ev->GetPoint());
746
746
    rt.addTupleCount(5);
747
747
  break;
778
778
    rt.addTupleCount(3);
779
779
  break;
780
780
}
781
 
case 220: {// wxAuiNotebookEvent
 
781
case 221: {// wxAuiNotebookEvent
782
782
 wxAuiNotebookEvent * ev = (wxAuiNotebookEvent *) event;
783
783
 wxAuiNotebook * GetDragSource = ev->GetDragSource();
784
784
    evClass = (char*)"wxAuiNotebookEvent";
790
790
    rt.addTupleCount(5);
791
791
  break;
792
792
}
793
 
case 221: {// wxAuiManagerEvent
 
793
case 222: {// wxAuiManagerEvent
794
794
 wxAuiManagerEvent * ev = (wxAuiManagerEvent *) event;
795
795
 wxAuiManager * GetManager = ev->GetManager();
796
796
 wxAuiPaneInfo * GetPane = ev->GetPane();