native_activity.cpp revision d76b67c340d1564abf8d14d976fdaf83bf2b3320
1c383a500aa59423264811be3874461bf8adbfea0Zonr Chang/*
2c383a500aa59423264811be3874461bf8adbfea0Zonr Chang * Copyright (C) 2010 The Android Open Source Project
3c383a500aa59423264811be3874461bf8adbfea0Zonr Chang *
4c383a500aa59423264811be3874461bf8adbfea0Zonr Chang * Licensed under the Apache License, Version 2.0 (the "License");
5c383a500aa59423264811be3874461bf8adbfea0Zonr Chang * you may not use this file except in compliance with the License.
6c383a500aa59423264811be3874461bf8adbfea0Zonr Chang * You may obtain a copy of the License at
7c383a500aa59423264811be3874461bf8adbfea0Zonr Chang *
8c383a500aa59423264811be3874461bf8adbfea0Zonr Chang *      http://www.apache.org/licenses/LICENSE-2.0
9c383a500aa59423264811be3874461bf8adbfea0Zonr Chang *
10c383a500aa59423264811be3874461bf8adbfea0Zonr Chang * Unless required by applicable law or agreed to in writing, software
11c383a500aa59423264811be3874461bf8adbfea0Zonr Chang * distributed under the License is distributed on an "AS IS" BASIS,
12c383a500aa59423264811be3874461bf8adbfea0Zonr Chang * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13c383a500aa59423264811be3874461bf8adbfea0Zonr Chang * See the License for the specific language governing permissions and
14c383a500aa59423264811be3874461bf8adbfea0Zonr Chang * limitations under the License.
15c383a500aa59423264811be3874461bf8adbfea0Zonr Chang */
16c383a500aa59423264811be3874461bf8adbfea0Zonr Chang
17e639eb5caa2c386b4a60659a4929e8a6141a2cbeStephen Hines#define LOG_TAG "native_activity"
18e639eb5caa2c386b4a60659a4929e8a6141a2cbeStephen Hines#include <utils/Log.h>
19462aefd62cc646d2ff753c1d003ef3cd7bbea26Shih-wei Liao
20e639eb5caa2c386b4a60659a4929e8a6141a2cbeStephen Hines#include <android_runtime/android_app_NativeActivity.h>
21462aefd62cc646d2ff753c1d003ef3cd7bbea26Shih-wei Liao
22e639eb5caa2c386b4a60659a4929e8a6141a2cbeStephen Hinesusing namespace android;
23462aefd62cc646d2ff753c1d003ef3cd7bbea26Shih-wei Liao
24e639eb5caa2c386b4a60659a4929e8a6141a2cbeStephen Hinesvoid ANativeActivity_setWindowFormat(ANativeActivity* activity, int32_t format) {
25e639eb5caa2c386b4a60659a4929e8a6141a2cbeStephen Hines	android_NativeActivity_setWindowFormat(activity, format);
26462aefd62cc646d2ff753c1d003ef3cd7bbea26Shih-wei Liao}
279ef2f785e0cc490af678dfd685995dec787321ffShih-wei Liao
289ef2f785e0cc490af678dfd685995dec787321ffShih-wei Liaovoid ANativeActivity_setWindowFlags(ANativeActivity* activity,
29462aefd62cc646d2ff753c1d003ef3cd7bbea26Shih-wei Liao		uint32_t addFlags, uint32_t removeFlags) {
303fd0a94a5cf1656569b1aea07043cc63939dcb46Stephen Hines	android_NativeActivity_setWindowFlags(activity, addFlags, addFlags|removeFlags);
313fd0a94a5cf1656569b1aea07043cc63939dcb46Stephen Hines}
32462aefd62cc646d2ff753c1d003ef3cd7bbea26Shih-wei Liao
336315f76e3cc6ff2d012d1183a0b030d4ff0dc808zonrvoid ANativeActivity_showSoftInput(ANativeActivity* activity, uint32_t flags) {
346315f76e3cc6ff2d012d1183a0b030d4ff0dc808zonr	android_NativeActivity_showSoftInput(activity, flags);
359ef2f785e0cc490af678dfd685995dec787321ffShih-wei Liao}
36462aefd62cc646d2ff753c1d003ef3cd7bbea26Shih-wei Liao
37462aefd62cc646d2ff753c1d003ef3cd7bbea26Shih-wei Liaovoid ANativeActivity_hideSoftInput(ANativeActivity* activity, uint32_t flags) {
386315f76e3cc6ff2d012d1183a0b030d4ff0dc808zonr	android_NativeActivity_hideSoftInput(activity, flags);
396315f76e3cc6ff2d012d1183a0b030d4ff0dc808zonr}
406315f76e3cc6ff2d012d1183a0b030d4ff0dc808zonr