Commit a5a6071d authored by kollo's avatar kollo

added HIDEK and SHOWK commands

parent d7f5781e
Release notes for Version 1.25 (Sept 2016 -- )
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- HASH()/SHA1 and MD5 now work also without libgcrypt
- HASH()/SHA1 and MD5 now work also without libgcrypt
- new Commands: HIDEK, SHOWK (Android)
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -81,6 +81,19 @@ EXAMPLES:
SEE ALSO: STR$(), BIN$(), OCT$(), RADIX$()
##############################################################################
Command: HIDEK
Syntax: HIDEK
DESCRIPTION:
Hide the virtual keyboard. (It will be invisible.)
COMMENT:
Works only on Android. On other platforms this command has currently
no effect.
SEE ALSO: SHOWK
##############################################################################
Command: HIDEM
Syntax: HIDEM
......@@ -89,7 +102,7 @@ DESCRIPTION:
Hide the mouse cursor. (It will be invisible.)
COMMENT:
Works only on the framebuffer (Android). On other platforms
Works only on the framebuffer (Android) and on ATARI-MINT. On other platforms
this command has no effect.
SEE ALSO: SHOWM, DEFMOUSE
......
......@@ -537,7 +537,19 @@ DESCRIPTION:
SEE ALSO: SHM_FREE, SHM_ATTACH()
##############################################################################
Command: SHOWK
Syntax: SHOWK
DESCRIPTION:
Show the vitual keyboard (make it visible) and activate it for input.
COMMENT:
This command works currently only on Android. An other platforms it
has no effect.
SEE ALSO: HIDEK
##############################################################################
Command: SHOWM
Syntax: SHOWM
......
......@@ -407,6 +407,7 @@ XXXXXXXXXXXXXXX\=XXXXXXXXXXXXXXXXXXXXXXXXXXXX\=\kill\\
%\verb|| \>\> p.\pageref{}\\
\verb|EVENT ,,,,,,,,| \> Waits until an event occurs\> p.\pageref{EVENT}\\
\verb|FILESELECT tit$,path$,dflt$,f$| \> display a fileselector-box\> p.\pageref{FILESELECT}\\
\verb|HIDEK| \> hide the virtual keyboard\> p.\pageref{HIDEK}\\
\verb|HIDEM| \> hide the mouse cursor\> p.\pageref{HIDEM}\\
\verb|KEYEVENT a,b| \> Waits until key is pressed\> p.\pageref{KEYEVENT}\\
\verb|LISTSELECT tit$,list$()| \> display a selector-box\> p.\pageref{LISTSELECT}\\
......@@ -424,6 +425,7 @@ XXXXXXXXXXXXXXX\=XXXXXXXXXXXXXXXXXXXXXXXXXXXX\=\kill\\
\verb|OBJC_DELETE t%,o%| \> delete object from tree\> p.\pageref{OBJCiDELETE}\\
\verb|RSRC_LOAD file$| \> loads a GEM resource file\> p.\pageref{RSRCiLOAD}\\
\verb|RSRC_FREE| \> unloads a GEM resource \> p.\pageref{RSRCiFREE}\\
\verb|SHOWK| \> show the virtual keyboard\> p.\pageref{SHOWK}\\
\verb|SHOWM| \> show the mouse cursor\> p.\pageref{SHOWM}\\
\end{tabbing}
......
......@@ -24,7 +24,7 @@ INCDIR=@prefix@/include/x11basic
LIBNO=@version@
RELEASE=43
RELEASE=44
# Register variables (-ffixed-reg) -Wall
......
......@@ -61,6 +61,8 @@ AndroidBitmapInfo screen_info;
static jmethodID nativeCrashed;
static jmethodID redrawMethod;
static jmethodID beepMethod;
static jmethodID hidekMethod;
static jmethodID showkMethod;
static jmethodID getlocationMethod;
static jmethodID playsoundfileMethod;
static jmethodID playtoneMethod;
......@@ -115,6 +117,8 @@ JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) {
redrawMethod =(*env)->GetMethodID(env,cls, "redraw", "()V");
beepMethod =(*env)->GetMethodID(env,cls, "beep", "()V");
hidekMethod =(*env)->GetMethodID(env,cls, "hidek", "()V");
showkMethod =(*env)->GetMethodID(env,cls, "showk", "()V");
getlocationMethod =(*env)->GetMethodID(env,cls, "get_location", "()V");
playsoundfileMethod=(*env)->GetMethodID(env,cls, "playsoundfile", "(Ljava/lang/String;)V");
runaudioMethod =(*env)->GetMethodID(env,cls, "RunAudioThreads","()V");
......@@ -632,6 +636,28 @@ void ANDROID_beep() {
(*env)->ExceptionClear(env);
}
}
void ANDROID_hidek() {
NLOG(">hidek.");
JNIEnv *env;
int status = (*m_vm)->AttachCurrentThread(m_vm,&env, NULL);
if(status < 0) LOGE("hidek: ERROR, no env.");
else if(hidekMethod == NULL) LOGE("Error: Can't find Java method void hidek()");
else {
(*env)->CallVoidMethod(env,x11basicView,hidekMethod);
(*env)->ExceptionClear(env);
}
}
void ANDROID_showk() {
NLOG(">showk.");
JNIEnv *env;
int status = (*m_vm)->AttachCurrentThread(m_vm,&env, NULL);
if(status < 0) LOGE("showk: ERROR, no env.");
else if(showkMethod == NULL) LOGE("Error: Can't find Java method void showk()");
else {
(*env)->CallVoidMethod(env,x11basicView,showkMethod);
(*env)->ExceptionClear(env);
}
}
/*Triggert das auslesen der GPS-Werte. Diese befinden sich hinterher in
den entsprechenden globalen variablen.*/
void ANDROID_get_location() {
......
......@@ -8,7 +8,7 @@
#define BC_STACKLEN 256
#define BC_VERSION 0x1238 /* Version 1.23 release 8*/
#define BC_VERSION 0x1251 /* Version 1.25 release 1*/
typedef struct {
unsigned char BRAs; /* DC_BRAs */
......
......@@ -98,6 +98,20 @@ void c_showm(char *n) {
#endif
}
/* Show and hide virtual Keyboard,
especially for Android.
TODO....*/
void c_hidek(char *n) {
#ifdef ANDROID
ANDROID_hidek();
#endif
}
void c_showk(char *n) {
#ifdef ANDROID
ANDROID_showk();
#endif
}
void c_plot(PARAMETER *plist,int e) {
graphics();
......
......@@ -35,6 +35,7 @@ void c_getgeometry (PARAMETER *,int);
void c_getscreensize(PARAMETER *,int);
void c_gprint (PARAMETER *,int);
void c_graphmode (PARAMETER *,int);
void c_hidek (char *);
void c_hidem (char *);
void c_infow (PARAMETER *,int);
void c_keyevent (PARAMETER *,int);
......@@ -73,6 +74,7 @@ void c_screen (PARAMETER *,int);
void c_setfont (PARAMETER *,int);
void c_setmouse (PARAMETER *,int);
void c_sget (PARAMETER *,int);
void c_showk (char *);
void c_showm (char *);
void c_sizew (PARAMETER *,int);
void c_sput (PARAMETER *,int);
......
......@@ -197,6 +197,7 @@
#define c_setfont NULL
#define c_setmouse NULL
#define c_sget NULL
#define c_showk NULL
#define c_showm NULL
#define c_vsync NULL
#define c_sizew NULL
......@@ -222,6 +223,7 @@
#define c_gprint NULL
#define c_graphmode NULL
#define c_hidem NULL
#define c_hidek NULL
#define c_infow NULL
#define c_input NULL
#define c_keyevent NULL
......@@ -2779,6 +2781,7 @@ const COMMAND comms[]= {
#endif
{ P_PLISTE, "HELP" , c_help,0,1,(unsigned short []){PL_KEY}},
#ifndef NOGRAPHICS
{ P_SIMPLE, "HIDEK" , c_hidek,0,0},
{ P_SIMPLE, "HIDEM" , c_hidem,0,0},
#endif
{ P_SIMPLE, "HOME" , c_home,0,0},
......@@ -2933,6 +2936,7 @@ const COMMAND comms[]= {
{ P_PLISTE, "SHM_DETACH" , c_detatch,1,1,(unsigned short []){PL_INT}},
{ P_PLISTE, "SHM_FREE" , c_shm_free,1,1,(unsigned short []){PL_INT}},
#ifndef NOGRAPHICS
{ P_SIMPLE, "SHOWK" , c_showk,0,0},
{ P_SIMPLE, "SHOWM" , c_showm,0,0},
{ P_SIMPLE, "SHOWPAGE" , c_vsync, 0,0},
{ P_PLISTE, "SIZEW" , c_sizew, 3,3,(unsigned short []){PL_FILENR,PL_INT,PL_INT}},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment