Add libwx-perl
[pkg-perl] / deb-src / libwx-perl / libwx-perl-0.96 / XS / TopLevelWindow.xsp
1 #############################################################################
2 ## Name:        XS/TopLevelWindow.xsp
3 ## Purpose:     XS++ for Wx::TopLevelWindow
4 ## Author:      Mattia Barbon
5 ## Modified by:
6 ## Created:     04/01/2005
7 ## RCS-ID:      $Id: TopLevelWindow.xsp 2291 2007-11-25 00:09:04Z mbarbon $
8 ## Copyright:   (c) 2005-2007 Mattia Barbon
9 ## Licence:     This program is free software; you can redistribute it and/or
10 ##              modify it under the same terms as Perl itself
11 #############################################################################
12
13 %module{Wx};
14
15 %typemap{wxTopLevelWindow*}{simple};
16
17 #if !defined(__WXMOTIF__) || WXPERL_W_VERSION_GE( 2, 5, 1 )
18
19 #include <wx/toplevel.h>
20 #include "cpp/overload.h"
21
22 %name{Wx::TopLevelWindow} class wxTopLevelWindow
23 {
24 #if WXPERL_W_VERSION_GE( 2, 5, 3 )
25     void RequestUserAttention( int flags = wxUSER_ATTENTION_INFO );
26 #endif
27 #if WXPERL_W_VERSION_GE( 2, 7, 0 )
28     bool IsAlwaysMaximized();
29
30     wxWindow* GetDefaultItem();
31     wxWindow* SetDefaultItem( wxWindow* win );
32     wxWindow* GetTmpDefaultItem() const;
33     wxWindow* SetTmpDefaultItem( wxWindow* win );
34
35     bool SetTransparent( wxByte alpha );
36     bool CanSetTransparent();
37 #endif
38 #if WXPERL_W_VERSION_GE( 2, 7, 2 )
39     bool EnableCloseButton( bool enable );
40 #endif
41     const wxIcon& GetIcon() const;
42     const wxIconBundle& GetIcons() const;
43
44     void SetIcon( const wxIcon& icon );
45     void SetIcons( const wxIconBundle& icons );
46
47     void Iconize( bool iconize );
48     void Maximize( bool maximize );
49     bool ShowFullScreen( bool show, long style = wxFULLSCREEN_ALL );
50
51     bool IsFullScreen() const;
52     bool IsActive() const;
53     bool IsIconized() const;
54     bool IsMaximized() const;
55 #ifdef __WXUNIVERSAL__
56     bool IsUsingNativeDecorations() const;
57 #endif
58
59     void SetShape( const wxRegion& region );
60
61 #if WXPERL_W_VERSION_GE( 2, 7, 2 )
62     bool ShouldPreventAppExit();
63 #endif
64
65 #ifdef __WXUNIVERSAL__
66     void UseNativeDecorations( bool native = true );
67 %{
68 void
69 wxTopLevelWindow::UseNativeDecorationsByDefault( native = true )
70     bool native
71   CODE:
72     wxTopLevelWindow::UseNativeDecorationsByDefault( native );
73 %}
74 #endif
75 };
76
77 %{
78
79 ##void
80 ##wxIconBundle::new( ... )
81 ##  PPCODE:
82 ##    BEGIN_OVERLOAD()
83 ##        MATCH_VOIDM_REDISP( newEmpty )
84 ##        MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_s_n, newFile, 1 )
85 ##        MATCH_REDISP( wxPliOvl_wico, newIcon )
86 ##    END_OVERLOAD( Wx::IconBundle::new )
87
88 %}
89
90 #endif