File: App.xs

package info (click to toggle)
libwx-perl 1%3A0.9923-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 4,236 kB
  • ctags: 2,407
  • sloc: cpp: 11,021; perl: 8,615; ansic: 710; makefile: 48
file content (356 lines) | stat: -rw-r--r-- 5,874 bytes parent folder | download | duplicates (5)
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
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
#############################################################################
## 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 3376 2012-09-26 13:38:47Z mdootson $
## 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()

#if ( WXPERL_W_VERSION_GE( 2, 9, 1 ) && wxDEBUG_LEVEL > 0 ) || ( WXPERL_W_VERSION_LE( 2, 9, 0) && defined(__WXDEBUG__) )

void
wxApp::OnAssertFailure(file, line, func, cond, msg)
    wxChar* file
    int line
    wxChar* func
    wxChar* cond
    wxChar* msg
  CODE:
    THIS->wxApp::OnAssertFailure( file, line, func, cond, msg );

#endif

#if ( WXPERL_W_VERSION_GE( 2, 9, 4 ) )

bool
wxApp::HasPendingEvents()

bool
wxApp::IsScheduledForDestruction( obj )
    wxObject* obj

void
wxApp::ResumeProcessingOfPendingEvents()

void
wxApp::SuspendProcessingOfPendingEvents()

void
wxApp::ScheduleForDestruction( obj )
    wxObject* obj

bool
wxApp::SafeYield( win, onlyIfNeeded )
    wxWindow* win
    bool onlyIfNeeded

bool
wxApp::SafeYieldFor( win, eventsToProcess );
    wxWindow* win
    long eventsToProcess

bool
wxApp::SetNativeTheme( theme )
    wxString theme
    
#if defined(__WXOSX_COCOA__)

void
wxApp::MacOpenFiles( fileNames ) ;
    wxArrayString fileNames

void
wxApp::MacOpenFile( fileName )
    wxString fileName

void
wxApp::MacOpenURL( url )
    wxString url

void
wxApp::MacPrintFile( fileName )
    wxString fileName

void
wxApp::MacNewFile()

void
wxApp::MacReopenApp()

void
wxApp::MacHideApp()

#endif

#endif