2
// Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
4
// This program is free software; you can redistribute it and/or modify
5
// it under the terms of the GNU General Public License as published by
6
// the Free Software Foundation; either version 3 of the License, or
7
// (at your option) any later version.
9
// This program is distributed in the hope that it will be useful,
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
// GNU General Public License for more details.
14
// You should have received a copy of the GNU General Public License
15
// along with this program; if not, write to the Free Software
16
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18
#ifndef __ASBROADCASTER_H__
19
#define __ASBROADCASTER_H__
21
// Forward declarations
30
/// AsBroadcaster facilities
35
/// Initialize the given object as an AsBroadcaster
37
/// This method set the addListener,removeListener and broadcastMessage
38
/// AS methods with the object, and set the _listners array member.
40
/// It is exposed so that Stage,TextField,Key,Mouse and Selection
41
/// can call this internally.
43
/// The AsBroadcaster_init will take care of registering
44
/// the _global.AsBroadcaster object and it's 'initialize'
45
/// method for user-defined broadcasters initialization
47
static void initialize(as_object& obj);
49
/// AsBroadcaster.initialize() AS method
50
static as_value initialize_method(const fn_call& fn);
52
/// Return the global AsBroadcaster
53
/// (the native one, immune to any override)
55
static as_object* getAsBroadcaster();
59
static as_value addListener_method(const fn_call& fn);
60
static as_value removeListener_method(const fn_call& fn);
61
static as_value broadcastMessage_method(const fn_call& fn);
65
void AsBroadcaster_init(as_object& global);
67
} // end of gnash namespace
69
// __ASBROADCASTER_H__