~ubuntu-branches/debian/squeeze/erlang/squeeze

« back to all changes in this revision

Viewing changes to lib/wx/c_src/wxe_return.h

  • Committer: Bazaar Package Importer
  • Author(s): Sergei Golovan
  • Date: 2009-05-07 15:07:37 UTC
  • mfrom: (1.2.1 upstream) (5.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20090507150737-i4yb5elwinm7r0hc
Tags: 1:13.b-dfsg1-1
* Removed another bunch of non-free RFCs from original tarball
  (closes: #527053).
* Fixed build-dependencies list by adding missing comma. This requires
  libsctp-dev again. Also, added libsctp1 dependency to erlang-base and
  erlang-base-hipe packages because the shared library is loaded via
  dlopen now and cannot be added using dh_slibdeps (closes: #526682).
* Weakened dependency of erlang-webtool on erlang-observer to recommends
  to avoid circular dependencies (closes: #526627).
* Added solaris-i386 to HiPE enabled architectures.
* Made script sources in /usr/lib/erlang/erts-*/bin directory executable,
  which is more convenient if a user wants to create a target Erlang system.
* Shortened extended description line for erlang-dev package to make it
  fit 80x25 terminals.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * %CopyrightBegin%
 
3
 * 
 
4
 * Copyright Ericsson AB 2008-2009. All Rights Reserved.
 
5
 * 
 
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/.
 
11
 * 
 
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
 
15
 * under the License.
 
16
 * 
 
17
 * %CopyrightEnd% 
 
18
 */
 
19
 
 
20
/* 
 
21
 * File:   wxe_return.h
 
22
 * Author: matthew
 
23
 *
 
24
 * Created on 11 October 2008, 20:33
 
25
 */
 
26
 
 
27
#ifndef _WXE_RETURN_H
 
28
#define _WXE_RETURN_H
 
29
//#define wxUSEGUI
 
30
#include "wxe_impl.h"
 
31
extern "C" {
 
32
#include "wxe_driver.h"
 
33
}
 
34
#include <wx/wx.h>
 
35
#include <wx/geometry.h>
 
36
#include <wx/colour.h>
 
37
#include <wx/grid.h>
 
38
#include <wx/gbsizer.h>
 
39
#include <wx/dynarray.h>
 
40
 
 
41
// #define send() send_term(__FILE__, __LINE__)
 
42
 
 
43
// see http://docs.wxwidgets.org/stable/wx_wxarray.html
 
44
WX_DECLARE_OBJARRAY(ErlDrvTermData, wxErlDrvTermDataArray);
 
45
 
 
46
class wxeReturn {
 
47
 
 
48
public:
 
49
    wxeReturn (ErlDrvPort          _port,  
 
50
            ErlDrvTermData      _caller, 
 
51
            bool                _isResult=false);
 
52
 
 
53
    ~wxeReturn();
 
54
 
 
55
 
 
56
    void add(ErlDrvTermData type, ErlDrvTermData data);
 
57
 
 
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);
 
61
    
 
62
    void addBinary(const char* atomName, size_t size);
 
63
    void addExt2Term(wxeErlTerm * term);
 
64
    void addExt2Term(wxETreeItemData * term);
 
65
 
 
66
    void addNil() { rt.Add(ERL_DRV_NIL); };
 
67
    
 
68
    void addUint(unsigned int n);
 
69
    
 
70
    void addInt(int n);
 
71
    
 
72
    void addFloat(double f);
 
73
    
 
74
    void addTupleCount(unsigned int n);
 
75
    
 
76
    /** @param n length of the list (not including the NIL terminator */
 
77
    void endList(unsigned int n);
 
78
    
 
79
    void addBool(int val);
 
80
    
 
81
    void add(const wxString s);
 
82
    void add(const wxString* s);
 
83
    void add(wxArrayString val);
 
84
    
 
85
    void add(wxPoint pt);
 
86
    
 
87
    void add( wxPoint2DDouble point2D);
 
88
        
 
89
    void add(wxSize size);
 
90
    
 
91
    void add(wxRect rect);
 
92
    
 
93
    void add(wxRect2DDouble rect2D);
 
94
    
 
95
    void add(wxDateTime dateTime);
 
96
        
 
97
    void add(wxColour colour);
 
98
    
 
99
    void add(wxGridCellCoords val);
 
100
 
 
101
    void add(wxGBPosition val);
 
102
 
 
103
    void add(wxGBSpan val);
 
104
 
 
105
    void add(wxMouseState val);
 
106
 
 
107
    void add(wxArrayInt val);
 
108
 
 
109
    void add(wxUIntPtr *val);
 
110
 
 
111
    int  send();
 
112
    
 
113
    void reset();
 
114
    
 
115
    unsigned int size();
 
116
    
 
117
private:
 
118
 
 
119
    inline void  addDate(wxDateTime dateTime);
 
120
 
 
121
    inline void  addTime(wxDateTime dateTime);
 
122
    
 
123
//    WxeApp*                 wxe_app;
 
124
    ErlDrvTermData          caller;
 
125
    ErlDrvPort              port; 
 
126
//    wxeMemEnv               *memEnv;
 
127
    wxErlDrvTermDataArray   rt;
 
128
    wxArrayDouble           temp_float;
 
129
    wxMBConvUTF32           utfConverter;
 
130
    bool                    isResult;
 
131
};
 
132
 
 
133
#endif  /* _WXE_RETURN_H */
 
134