File: App.xs

package info (click to toggle)
libwx-perl 1%3A0.9909-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 3,912 kB
  • sloc: cpp: 9,728; perl: 8,182; ansic: 626; makefile: 41
file content (278 lines) | stat: -rw-r--r-- 4,640 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
#############################################################################
## Name:        XS/App.xs
## Purpose:     XS for Wx::_App and Wx::App
## Author:      Mattia Barbon
## Modified by:
## Created:     29/10/2000
## RCS-ID:      $Id: App.xs 3010 2011-02-20 16:27:27Z mbarbon $
## Copyright:   (c) 2000-2007, 2010-2011 Mattia Barbon
## Licence:     This program is free software; you can redistribute it and/or
##              modify it under the same terms as Perl itself
#############################################################################

#include <wx/app.h>
##include "cpp/app.h"

#include <wx/artprov.h>

MODULE=Wx PACKAGE=Wx PREFIX=wx

void
wxPostEvent( evthnd, event )
    wxEvtHandler* evthnd
    wxEvent* event
  CODE:
    wxPostEvent( evthnd, *event );

void
wxWakeUpIdle()

MODULE=Wx PACKAGE=Wx::_App

int
Start( app, sub )
    wxApp* app 
    SV* sub
  CODE:
    // for Wx::Perl::SplashFast
    if( !SvROK( sub ) || SvTYPE( SvRV( sub ) ) != SVt_PVCV )
      croak( "sub must be a CODE reference" );
#if WXPERL_W_VERSION_LE( 2, 5, 1 )
    app->argc = wxPli_get_args_argc_argv( (void***) &app->argv, 1 );
#endif
#ifdef __WXMOTIF__
    app->SetClassName( app->argv[0] );
    app->SetAppName( app->argv[0] );
#endif
#if WXPERL_W_VERSION_LE( 2, 5, 0 )
    if( !wxPerlAppCreated )
        wxEntryInitGui();
#endif

    PUTBACK;
    RETVAL = call_oninit( aTHX_ ST(0), sub );
    SPAGAIN;
  OUTPUT:
    RETVAL

wxApp*
wxApp::new()
  CODE:
    if( !wxTheApp )
#if WXPERL_W_VERSION_LT( 2, 5, 1 )
        wxTheApp = new wxPliApp();
#else
        wxAppConsole::SetInstance( new wxPliApp() );
#endif
    RETVAL = wxTheApp;
  OUTPUT:
    RETVAL

MODULE=Wx PACKAGE=Wx::App

# unimplemented
# virtual void OnFatalException() # too low level

void
wxApp::Dispatch()

wxString
wxApp::GetAppName()

#if WXPERL_W_VERSION_GE( 2, 9, 0 )

wxString
wxApp::GetAppDisplayName()

#endif

#if defined( __WXMSW__ ) && WXPERL_W_VERSION_LT( 2, 5, 1 )

bool
wxApp::GetAuto3D()

#endif

wxString
wxApp::GetClassName()

bool
wxApp::GetExitOnFrameDelete()

wxIcon*
wxApp::GetStdIcon( which )
    int which
  CODE:
    wxString id;
    switch( which )
    {
    case wxICON_EXCLAMATION:
        id = wxART_WARNING;
        break;
    case wxICON_HAND:
        id = wxART_ERROR; 
        break;
    case wxICON_QUESTION:
        id = wxART_QUESTION;
        break;
    case wxICON_INFORMATION:
        id = wxART_INFORMATION;
        break;
    };

    RETVAL = new wxIcon( wxArtProvider::GetIcon( id, wxART_MESSAGE_BOX ) );
  OUTPUT:
    RETVAL

wxWindow*
wxApp::GetTopWindow()

bool
wxApp::GetUseBestVisual()

wxString
wxApp::GetVendorName()

#if WXPERL_W_VERSION_GE( 2, 9, 0 )

wxString
wxApp::GetVendorDisplayName()

#endif

void
wxApp::ExitMainLoop()

#if WXPERL_W_VERSION_LT( 2, 7, 0 )

bool
wxApp::Initialized()

#endif

int
wxApp::MainLoop()
  CODE:
    RETVAL = THIS->MainLoop();
    // hack for embedded case...
#if defined( __WXMSW__ ) && WXPERL_W_VERSION_LT( 2, 5, 0 )
    wxPliApp::SetKeepGoing( (wxPliApp*) THIS, true );
#endif
    wxPliApp::DeletePendingObjects( THIS );
  OUTPUT: RETVAL

bool
wxApp::Pending()

void
wxApp::ProcessPendingEvents()

void
wxApp::SetAppName( name )
    wxString name

#if WXPERL_W_VERSION_GE( 2, 9, 0 )

void
wxApp::SetAppDisplayName( name )
    wxString name

#endif

#if defined( __WXMSW__ ) && WXPERL_W_VERSION_LT( 2, 5, 0 )

void
wxApp::SetAuto3D( auto3d )
    bool auto3d

#endif

void
wxApp::SetClassName( name )
    wxString name

void
wxApp::SetExitOnFrameDelete( flag )
    bool flag

void
wxApp::SetTopWindow( window )
    wxWindow* window

void
wxApp::SetVendorName( name )
    wxString name

#if WXPERL_W_VERSION_GE( 2, 9, 0 )

void
wxApp::SetVendorDisplayName( name )
    wxString name

#endif

void
wxApp::SetUseBestVisual( flag )
    bool flag

void
wxApp::Yield( onlyifneeded = false )
    bool onlyifneeded
  CODE:
    THIS->wxApp::Yield( onlyifneeded );

#if defined( __WXMSW__ ) && WXPERL_W_VERSION_GE( 2, 5, 0 )

int
GetComCtl32Version()
  CODE:
    RETVAL = wxApp::GetComCtl32Version();
  OUTPUT:
    RETVAL

#endif

#if WXPERL_W_VERSION_GE( 2, 5, 2 )

void
wxApp::Exit()

bool
wxApp::ProcessIdle()

#if WXPERL_W_VERSION_LT( 2, 9, 2 )

bool
wxApp::SendIdleEvents( window, event )
    wxWindow* window
    wxIdleEvent* event
  C_ARGS: window, *event

#endif

bool
wxApp::IsActive()

#endif

#if WXPERL_W_VERSION_GE( 2, 7, 1 )

wxLayoutDirection
wxApp::GetLayoutDirection()

#endif

wxApp*
GetInstance()
  CODE:
    RETVAL = (wxApp*)wxApp::GetInstance();
  OUTPUT: RETVAL

void
SetInstance( app )
    wxApp* app
  CODE:
    wxApp::SetInstance( app );

bool
wxApp::IsMainLoopRunning()