~ubuntu-branches/ubuntu/saucy/gnash/saucy-proposed

« back to all changes in this revision

Viewing changes to libcore/asobj/flash/events/FullScreenEvent_as.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Sindhudweep Narayan Sarkar
  • Date: 2009-10-07 00:06:10 UTC
  • mfrom: (1.1.12 upstream)
  • Revision ID: james.westby@ubuntu.com-20091007000610-mj9rwqe774gizn1j
Tags: 0.8.6-0ubuntu1
new upstream release 0.8.6 (LP: #435897)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// FullScreenEvent_as.cpp:  ActionScript "FullScreenEvent" class, for Gnash.
 
2
//
 
3
//   Copyright (C) 2009 Free Software Foundation, Inc.
 
4
//
 
5
// This program is free software; you can redistribute it and/or modify
 
6
// it under the terms of the GNU General Public License as published by
 
7
// the Free Software Foundation; either version 3 of the License, or
 
8
// (at your option) any later version.
 
9
//
 
10
// This program is distributed in the hope that it will be useful,
 
11
// but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
// GNU General Public License for more details.
 
14
//
 
15
// You should have received a copy of the GNU General Public License
 
16
// along with this program; if not, write to the Free Software
 
17
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
18
//
 
19
 
 
20
#ifdef HAVE_CONFIG_H
 
21
#include "gnashconfig.h"
 
22
#endif
 
23
 
 
24
#include "events/FullScreenEvent_as.h"
 
25
#include "log.h"
 
26
#include "fn_call.h"
 
27
#include "Global_as.h"
 
28
#include "smart_ptr.h" // for boost intrusive_ptr
 
29
#include "builtin_function.h" // need builtin_function
 
30
#include "GnashException.h" // for ActionException
 
31
 
 
32
namespace gnash {
 
33
 
 
34
// Forward declarations
 
35
namespace {
 
36
    as_value fullscreenevent_toString(const fn_call& fn);
 
37
    as_value fullscreenevent_FULL_SCREEN(const fn_call& fn);
 
38
    as_value fullscreenevent_ctor(const fn_call& fn);
 
39
    void attachFullScreenEventInterface(as_object& o);
 
40
    void attachFullScreenEventStaticInterface(as_object& o);
 
41
 
 
42
}
 
43
 
 
44
// extern (used by Global.cpp)
 
45
void
 
46
fullscreenevent_class_init(as_object& where, const ObjectURI& uri)
 
47
{
 
48
    registerBuiltinClass(where, fullscreenevent_ctor, attachFullScreenEventInterface, 
 
49
        attachFullScreenEventStaticInterface, uri);
 
50
}
 
51
 
 
52
namespace {
 
53
 
 
54
void
 
55
attachFullScreenEventInterface(as_object& o)
 
56
{
 
57
    Global_as* gl = getGlobal(o);
 
58
    o.init_member("toString", gl->createFunction(fullscreenevent_toString));
 
59
    o.init_member("FULL_SCREEN", gl->createFunction(fullscreenevent_FULL_SCREEN));
 
60
}
 
61
 
 
62
void
 
63
attachFullScreenEventStaticInterface(as_object& /*o*/)
 
64
{
 
65
}
 
66
 
 
67
as_value
 
68
fullscreenevent_toString(const fn_call& /*fn*/)
 
69
{
 
70
    log_unimpl (__FUNCTION__);
 
71
    return as_value();
 
72
}
 
73
 
 
74
as_value
 
75
fullscreenevent_FULL_SCREEN(const fn_call& /*fn*/)
 
76
{
 
77
    log_unimpl (__FUNCTION__);
 
78
    return as_value();
 
79
}
 
80
 
 
81
as_value
 
82
fullscreenevent_ctor(const fn_call& /*fn*/)
 
83
{
 
84
 
 
85
    return as_value(); // will keep alive
 
86
}
 
87
 
 
88
} // anonymous namespace 
 
89
} // gnash namespace
 
90
 
 
91
// local Variables:
 
92
// mode: C++
 
93
// indent-tabs-mode: t
 
94
// End:
 
95