Introduced classes

extern class NativeKeyEvent

android :: NativeKeyEvent

Java class: android.view.KeyEvent

Redefined classes

redef class Sys

android :: key_event $ Sys

The main class of the program.

All class definitions

extern class NativeKeyEvent

android $ NativeKeyEvent

Java class: android.view.KeyEvent
redef class Sys

android :: key_event $ Sys

The main class of the program.
package_diagram android::key_event key_event android::platform platform android::key_event->android::platform java java android::platform->java app app android::platform->app android::aware aware android::platform->android::aware ...>java ...>app ...>android::aware android::nit_activity nit_activity android::nit_activity->android::key_event android::native_ui native_ui android::native_ui->android::nit_activity android::wifi wifi android::wifi->android::nit_activity android::service service android::service->android::nit_activity android::native_ui... ... android::native_ui...->android::native_ui android::wifi... ... android::wifi...->android::wifi android::service... ... android::service...->android::service


module abstract_collection

core :: abstract_collection

Abstract collection classes and services.
module abstract_text

core :: abstract_text

Abstract class for manipulation of sequences of characters
module app

app :: app

app.nit is a framework to create cross-platform applications
module app_base

app :: app_base

Base of the app.nit framework, defines App
module array

core :: array

This module introduces the standard array structure.
module assets

app :: assets

Portable services to load resources from the assets folder
module aware

android :: aware

Android compatibility module
module bitset

core :: bitset

Services to handle BitSet
module bytes

core :: bytes

Services for byte streams and arrays
module circular_array

core :: circular_array

Efficient data structure to access both end of the sequence.
module codec_base

core :: codec_base

Base for codecs to use with streams
module codecs

core :: codecs

Group module for all codec-related manipulations
module collection

core :: collection

This module define several collection classes.
module collections

java :: collections

Basic Java collections
module core

core :: core

Standard classes and methods used by default by Nit programs and libraries.
module environ

core :: environ

Access to the environment variables of the process
module error

core :: error

Standard error-management infrastructure.
module exec

core :: exec

Invocation and management of operating system sub-processes.
module ffi_support

java :: ffi_support

Core supporting services for the FFI with Java
module file

core :: file

File manipulations (create, read, write, etc.)
module fixed_ints

core :: fixed_ints

Basic integers of fixed-precision
module fixed_ints_text

core :: fixed_ints_text

Text services to complement fixed_ints
module flat

core :: flat

All the array-based text representations
module gc

core :: gc

Access to the Nit internal garbage collection mechanism
module hash_collection

core :: hash_collection

Introduce HashMap and HashSet.
module iso8859_1

core :: iso8859_1

Codec for ISO8859-1 I/O
module java

java :: java

Supporting services for the FFI with Java and to access Java libraries
module jvm

jvm :: jvm

Java Virtual Machine invocation API and others services from the JNI C API
module kernel

core :: kernel

Most basic classes and methods.
module list

core :: list

This module handle double linked lists
module math

core :: math

Mathematical operations
module native

core :: native

Native structures for text and bytes
module numeric

core :: numeric

Advanced services for Numeric types
module protocol

core :: protocol

module queue

core :: queue

Queuing data structures and wrappers
module range

core :: range

Module for range of discrete objects.
module re

core :: re

Regular expression support for all services based on Pattern
module ropes

core :: ropes

Tree-based representation of a String.
module sorter

core :: sorter

This module contains classes used to compare things and sorts arrays.
module stream

core :: stream

Input and output streams of characters
module text

core :: text

All the classes and methods related to the manipulation of text entities
module time

core :: time

Management of time and dates
module union_find

core :: union_find

union–find algorithm using an efficient disjoint-set data structure
module utf8

core :: utf8

Codec for UTF-8 I/O


module platform

android :: platform

Triggers compilation for the android platform


module nit_activity

android :: nit_activity

Core implementation of app.nit on Android using a custom Java entry point


module a_star-m


module at_boot

android :: at_boot

Import this module to launch Service at device boot
module http_request

android :: http_request

Android implementation of app:http_request
module native_ui

android :: native_ui

Native services from the android.view and android.widget namespaces
module service

android :: service

Android service support for app.nit centered around the class Service
module ui

android :: ui

Views and services to use the Android native user interface
module ui_test

android :: ui_test

Test for app.nit's UI services
module wifi

android :: wifi

Simple wrapper of the Android WiFi services
module key_event

import platform

# Java class: android.view.KeyEvent
extern class NativeKeyEvent in "Java" `{ android.view.KeyEvent `}
	super JavaObject

	# Java implementation: boolean android.view.KeyEvent.isSystem()
	fun is_system: Bool in "Java" `{
		return self.isSystem();

	# Java implementation:  android.view.KeyEvent.setSource(int)
	fun set_source(arg0: Int) in "Java" `{

	# Java implementation: int android.view.KeyEvent.getMetaState()
	fun meta_state: Int in "Java" `{
		return self.getMetaState();

	# Java implementation: int android.view.KeyEvent.getModifiers()
	fun modifiers: Int in "Java" `{
		return self.getModifiers();

	# Java implementation: int android.view.KeyEvent.getFlags()
	fun flags: Int in "Java" `{
		return self.getFlags();

	# Java implementation: boolean android.view.KeyEvent.hasNoModifiers()
	fun has_no_modifiers: Bool in "Java" `{
		return self.hasNoModifiers();

	# Java implementation: boolean android.view.KeyEvent.hasModifiers(int)
	fun has_modifiers(arg0: Int): Bool in "Java" `{
		return self.hasModifiers((int)arg0);

	# Java implementation: boolean android.view.KeyEvent.isAltPressed()
	fun is_alt_pressed: Bool in "Java" `{
		return self.isAltPressed();

	# Java implementation: boolean android.view.KeyEvent.isShiftPressed()
	fun is_shift_pressed: Bool in "Java" `{
		return self.isShiftPressed();

	# Java implementation: boolean android.view.KeyEvent.isSymPressed()
	fun is_sym_pressed: Bool in "Java" `{
		return self.isSymPressed();

	# Java implementation: boolean android.view.KeyEvent.isCtrlPressed()
	fun is_ctrl_pressed: Bool in "Java" `{
		return self.isCtrlPressed();

	# Java implementation: boolean android.view.KeyEvent.isMetaPressed()
	fun is_meta_pressed: Bool in "Java" `{
		return self.isMetaPressed();

	# Java implementation: boolean android.view.KeyEvent.isFunctionPressed()
	fun is_function_pressed: Bool in "Java" `{
		return self.isFunctionPressed();

	# Java implementation: boolean android.view.KeyEvent.isCapsLockOn()
	fun is_caps_lock_on: Bool in "Java" `{
		return self.isCapsLockOn();

	# Java implementation: boolean android.view.KeyEvent.isNumLockOn()
	fun is_num_lock_on: Bool in "Java" `{
		return self.isNumLockOn();

	# Java implementation: boolean android.view.KeyEvent.isScrollLockOn()
	fun is_scroll_lock_on: Bool in "Java" `{
		return self.isScrollLockOn();

	# Java implementation: int android.view.KeyEvent.getAction()
	fun action: Int in "Java" `{
		return self.getAction();

	# Java implementation: boolean android.view.KeyEvent.isCanceled()
	fun is_canceled: Bool in "Java" `{
		return self.isCanceled();

	# Java implementation:  android.view.KeyEvent.startTracking()
	fun start_tracking in "Java" `{

	# Java implementation: boolean android.view.KeyEvent.isTracking()
	fun is_tracking: Bool in "Java" `{
		return self.isTracking();

	# Java implementation: boolean android.view.KeyEvent.isLongPress()
	fun is_long_press: Bool in "Java" `{
		return self.isLongPress();

	# Java implementation: int android.view.KeyEvent.getKeyCode()
	fun key_code: Int in "Java" `{
		return self.getKeyCode();

	# Java implementation: java.lang.String android.view.KeyEvent.getCharacters()
	fun characters: JavaString in "Java" `{
		return self.getCharacters();

	# Java implementation: int android.view.KeyEvent.getScanCode()
	fun scan_code: Int in "Java" `{
		return self.getScanCode();

	# Java implementation: int android.view.KeyEvent.getRepeatCount()
	fun repeat_count: Int in "Java" `{
		return self.getRepeatCount();

	# Java implementation: long android.view.KeyEvent.getDownTime()
	fun down_time: Int in "Java" `{
		return self.getDownTime();

	# Java implementation: long android.view.KeyEvent.getEventTime()
	fun event_time: Int in "Java" `{
		return self.getEventTime();

	# Java implementation: char android.view.KeyEvent.getDisplayLabel()
	fun display_label: Char in "Java" `{
		return self.getDisplayLabel();

	# Java implementation: int android.view.KeyEvent.getUnicodeChar()
	fun unicode_char: Int in "Java" `{
		return self.getUnicodeChar();

	# Java implementation: char android.view.KeyEvent.getNumber()
	fun number: Char in "Java" `{
		return self.getNumber();

	# Java implementation: boolean android.view.KeyEvent.isPrintingKey()
	fun is_printing_key: Bool in "Java" `{
		return self.isPrintingKey();

	redef fun new_global_ref import sys, Sys.jni_env `{
		Sys sys = NativeKeyEvent_sys(self);
		JNIEnv *env = Sys_jni_env(sys);
		return (*env)->NewGlobalRef(env, self);

	redef fun pop_from_local_frame_with_env(jni_env) `{
		return (*jni_env)->PopLocalFrame(jni_env, self);

# Java getter: android.view.KeyEvent.KEYCODE_BACK
fun android_view_key_event_keycode_back: Int in "Java" `{
	return android.view.KeyEvent.KEYCODE_BACK;