4
* Copyright Ericsson AB 2008-2009. All Rights Reserved.
6
* The contents of this file are subject to the Erlang Public License,
7
* Version 1.1, (the "License"); you may not use this file except in
8
* compliance with the License. You should have received a copy of the
9
* Erlang Public License along with this software. If not, it can be
10
* retrieved online at http://www.erlang.org/.
12
* Software distributed under the License is distributed on an "AS IS"
13
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
14
* the License for the specific language governing rights and limitations
24
* Created on 11 October 2008, 20:33
32
#include "wxe_driver.h"
35
#include <wx/geometry.h>
36
#include <wx/colour.h>
38
#include <wx/gbsizer.h>
39
#include <wx/dynarray.h>
41
// #define send() send_term(__FILE__, __LINE__)
43
// see http://docs.wxwidgets.org/stable/wx_wxarray.html
44
WX_DECLARE_OBJARRAY(ErlDrvTermData, wxErlDrvTermDataArray);
49
wxeReturn (ErlDrvPort _port,
50
ErlDrvTermData _caller,
51
bool _isResult=false);
56
void add(ErlDrvTermData type, ErlDrvTermData data);
58
// void addRef(const void *ptr, const char* className);
59
void addRef(const unsigned int ref, const char* className);
60
void addAtom(const char* atomName);
62
void addBinary(const char* atomName, size_t size);
63
void addExt2Term(wxeErlTerm * term);
64
void addExt2Term(wxETreeItemData * term);
66
void addNil() { rt.Add(ERL_DRV_NIL); };
68
void addUint(unsigned int n);
72
void addFloat(double f);
74
void addTupleCount(unsigned int n);
76
/** @param n length of the list (not including the NIL terminator */
77
void endList(unsigned int n);
79
void addBool(int val);
81
void add(const wxString s);
82
void add(const wxString* s);
83
void add(wxArrayString val);
87
void add( wxPoint2DDouble point2D);
89
void add(wxSize size);
91
void add(wxRect rect);
93
void add(wxRect2DDouble rect2D);
95
void add(wxDateTime dateTime);
97
void add(wxColour colour);
99
void add(wxGridCellCoords val);
101
void add(wxGBPosition val);
103
void add(wxGBSpan val);
105
void add(wxMouseState val);
107
void add(wxArrayInt val);
109
void add(wxUIntPtr *val);
119
inline void addDate(wxDateTime dateTime);
121
inline void addTime(wxDateTime dateTime);
124
ErlDrvTermData caller;
126
// wxeMemEnv *memEnv;
127
wxErlDrvTermDataArray rt;
128
wxArrayDouble temp_float;
129
wxMBConvUTF32 utfConverter;
133
#endif /* _WXE_RETURN_H */