Gnash  0.8.11dev
Key_as.h
Go to the documentation of this file.
1 // Key_as.h: ActionScript 3 "Keyboard" class, for Gnash.
2 //
3 // Copyright (C) 2009, 2010, 2011, 2012 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 #ifndef GNASH_ASOBJ3_KEYBOARD_H
21 #define GNASH_ASOBJ3_KEYBOARD_H
22 
23 
24 namespace gnash {
25 
26 class as_object;
27 struct ObjectURI;
28 
29 void key_class_init(as_object& global, const ObjectURI& uri);
30 void registerKeyNative(as_object& global);
31 
32 } // gnash namespace
33 
34 // GNASH_ASOBJ3_KEYBOARD_H
35 #endif
36 
37 // local Variables:
38 // mode: C++
39 // indent-tabs-mode: t
40 // End:
41 
gnash::key::KEY
@ KEY
Definition: GnashKey.h:332
gnash::key::DOWN
@ DOWN
Definition: GnashKey.h:207
gnash::key_is_accessible
as_value key_is_accessible(const fn_call &)
Definition: Key_as.cpp:38
movie_root.h
gnash::key::BACKSPACE
@ BACKSPACE
Definition: GnashKey.h:53
keys
char * keys[KEY_MAX+1]
Definition: evtest.c:55
gnash::toInt
std::int32_t toInt(const as_value &v, const VM &vm)
AS2-compatible conversion to 32bit integer.
Definition: VM.cpp:463
gnash::as_object
The base class for all ActionScript objects.
Definition: as_object.h:162
gnash::key_class_init
void key_class_init(as_object &where, const ObjectURI &uri)
Definition: Key_as.cpp:156
_
#define _(String)
Definition: log.h:44
gnash::VM
The AVM1 virtual machine.
Definition: VM.h:72
gnash
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:41
gnash::key::DELETEKEY
@ DELETEKEY
Definition: GnashKey.h:177
gnash::registerBuiltinObject
as_object * registerBuiltinObject(as_object &where, Global_as::Properties p, const ObjectURI &uri)
Register a built-in object.
Definition: Global_as.h:114
gnash::key::CONTROL
@ CONTROL
Definition: GnashKey.h:62
gnash::key::CAPSLOCK
@ CAPSLOCK
Definition: GnashKey.h:65
gnash::PropFlags::dontEnum
@ dontEnum
Protect from enumeration.
Definition: PropFlags.h:36
gnash::PropFlags::dontDelete
@ dontDelete
Protect from deletion.
Definition: PropFlags.h:39
GnashKey.h
gnash::key::ASCII
@ ASCII
Definition: GnashKey.h:333
NativeFunction.h
gnash::registerKeyNative
void registerKeyNative(as_object &global)
Definition: Key_as.cpp:103
gnash::attachKeyInterface
void attachKeyInterface(as_object &o)
Definition: Key_as.cpp:113
Global_as.h
KEY_CONST
#define KEY_CONST(k)
gnash::getGlobal
Global_as & getGlobal(const as_environment &env)
Definition: as_environment.cpp:651
gnash::getVM
VM & getVM(const as_environment &env)
Definition: as_environment.h:222
AsBroadcaster.h
gnash::key::PGUP
@ PGUP
Definition: GnashKey.h:213
Key_as.h
gnash::key::LEFT
@ LEFT
Definition: GnashKey.h:209
gnash::key::RIGHT
@ RIGHT
Definition: GnashKey.h:208
gnash::fn_call
Parameters/environment for builtin or user-defined functions callable from ActionScript.
Definition: fn_call.h:118
gnash::callMethod
as_value callMethod(fn_call::Args &args, as_object *obj, const ObjectURI &uri)
Call a member function of this object in an AS-compatible way.
Definition: Global_as.h:219
gnash::Global_as::createFunction
as_function * createFunction(Global_as::ASFunction function)
Create an ActionScript function.
Definition: Global_as.cpp:159
gnash::key::codeMap
const unsigned char codeMap[KEYCOUNT][TYPES]
Definition: GnashKey.h:337
gnash::key::INSERT
@ INSERT
Definition: GnashKey.h:210
gnash::key::ALT
@ ALT
Definition: GnashKey.h:63
gnash::key::PGDN
@ PGDN
Definition: GnashKey.h:214
gnash::key::END
@ END
Definition: GnashKey.h:212
IF_VERBOSE_ASCODING_ERRORS
#define IF_VERBOSE_ASCODING_ERRORS(x)
Definition: log.h:397
gnash::key::code
code
Definition: GnashKey.h:44
gnash::key_is_toggled
as_value key_is_toggled(const fn_call &)
Given the keycode of NUM_LOCK or CAPSLOCK, returns true if the associated state is on.
Definition: Key_as.cpp:95
gnash::key::ENTER
@ ENTER
Definition: GnashKey.h:58
gnash::movie_root::Keys
std::bitset< key::KEYCOUNT > Keys
Definition: movie_root.h:170
gnash::key::TAB
@ TAB
Definition: GnashKey.h:54
gnash::VM::registerNative
void registerNative(as_c_function_ptr fun, unsigned int x, unsigned int y)
Definition: VM.cpp:268
gnash::key::SHIFT
@ SHIFT
Definition: GnashKey.h:61
gnash::fn_call::nargs
Args::size_type nargs
Number of arguments to this ActionScript function call.
Definition: fn_call.h:178
gnash::key::UP
@ UP
Definition: GnashKey.h:206
gnash::VM::getNative
NativeFunction * getNative(unsigned int x, unsigned int y) const
Return a native function or null.
Definition: VM.cpp:276
gnash::key::HOME
@ HOME
Definition: GnashKey.h:211
gnash::key::KEYCOUNT
@ KEYCOUNT
Definition: GnashKey.h:326
gnash::as_value
ActionScript value type.
Definition: as_value.h:95
VM.h
gnash::NSV::PROP_AS_SET_PROP_FLAGS
@ PROP_AS_SET_PROP_FLAGS
Definition: namedStrings.h:137
gnash::fn_call::arg
const Args::value_type & arg(unsigned int n) const
Access a particular argument.
Definition: fn_call.h:194
gnash::log_aserror
void log_aserror(StringType msg, Args... args)
Definition: log.h:331
gnash::AsBroadcaster::initialize
static void initialize(as_object &obj)
Initialize the given object as an AsBroadcaster.
Definition: AsBroadcaster.cpp:145
log.h
gnash::getRoot
movie_root & getRoot(const as_environment &env)
Definition: as_environment.cpp:645
fn_call.h
gnash::key::ESCAPE
@ ESCAPE
Definition: GnashKey.h:72
gnash::key_get_code
as_value key_get_code(const fn_call &fn)
Returns the keycode of the last key pressed.
Definition: Key_as.cpp:56
gnash::movie_root
This class represents the 'Stage' and top-level movie.
Definition: movie_root.h:151
namedStrings.h
SPACE
#define SPACE
Definition: aos4_gnash_prefs.cpp:29
gnash::Global_as
The Global object ultimately contains all objects in an ActionScript run.
Definition: Global_as.h:50
gnash::key_is_down
as_value key_is_down(const fn_call &fn)
Return true if the specified (first arg keycode) key is pressed.
Definition: Key_as.cpp:65
test.uri
uri
Definition: test.py:12
gnash::movie_root::unreleasedKeys
const Keys & unreleasedKeys() const
Definition: movie_root.h:666
gnash::key::o
@ o
Definition: GnashKey.h:161
gnash::PropFlags::readOnly
@ readOnly
Protect from assigning a value.
Definition: PropFlags.h:42
gnash::log_unimpl
void log_unimpl(StringType msg, Args... args)
Definition: log.h:289
gnash::ObjectURI
A URI for describing as_objects.
Definition: ObjectURI.h:45
gnash::key_get_ascii
as_value key_get_ascii(const fn_call &fn)
Return the ascii number of the last key pressed.
Definition: Key_as.cpp:47
GnashException.h
gnash::movie_root::lastKeyEvent
key::code lastKeyEvent() const
Definition: movie_root.h:662