GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — livecode/lcidlc/src/EncodedSupportJava.c at develop · livecode/livecode
This repository was archived by the owner on Aug 31, 2021. It is now read-only.
Expand file tree/ Copy pathEncodedSupportJava.cMore file actions 382 lines (382 loc) · 10.7 KB / Copy pathEncodedSupportJava.cFile metadata and controls382 lines (382 loc) · 10.7 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 const char *g_java_support_template [] = { "package com.runrev.external;\n", "\n", "import java.lang.*;\n", "import android.app.*;\n", "import android.view.*;\n", "import android.content.*;\n", "import com.runrev.android.EngineApi;\n", "\n", "public class LC\n", "{\n", " public static final int USE_CASE_SENSITIVE = 1 << 30;\n", " public static final int USE_CONVERT_OCTALS = 1 << 28;\n", " public static final int USE_NUMBER_FORMAT_DECIMAL = 0 << 26;\n", " public static final int USE_NUMBER_FORMAT_SCIENTIFIC = 1 << 26;\n", " public static final int USE_NUMBER_FORMAT_COMPACT = 2 << 26;\n", "\n", " public class Error extends RuntimeException\n", " {\n", " private int m_code;\n", " \n", " public Error(int p_code)\n", " {\n", " m_code = p_code;\n", " }\n", " \n", " public int getCode()\n", " {\n", " return m_code;\n", " }\n", " };\n", "\n", " /*public static class Array\n", " {\n", " private long m_pointer;\n", " \n", " public Array()\n", " {\n", " m_pointer = ArrayCreate(0);\n", " }\n", " \n", " public void Release()\n", " {\n", " if (m_pointer == 0)\n", " return;\n", " \n", " ArrayRelease(m_pointer);\n", " m_pointer = 0;\n", " }\n", " \n", " //////////\n", " \n", " public int CountKeys()\n", " {\n", " Check();\n", " return ArrayCountKeys(m_pointer, 0, null);\n", " }\n", " \n", " public String[] ListKeys()\n", " {\n", " Check();\n", " return ArrayListKeys(m_pointer, 0, null);\n", " }\n", " \n", " public void RemoveKeys()\n", " {\n", " Check();\n", " ArrayRemoveKeys(m_pointer, 0, null);\n", " }\n", " \n", " //////////\n", " \n", " boolean HasKey(String p_key)\n", " {\n", " Check();\n", " return ArrayHasKey(m_pointer, 0, null, p_key);\n", " }\n", " \n", " boolean HasExactKey(String p_key)\n", " {\n", " Check();\n", " return ArrayHasKey(m_pointer, USE_CASE_SENSITIVE, null, p_key);\n", " }\n", " \n", " java.lang.Object FetchKey(String p_key)\n", " {\n", " Check();\n", " return ArrayFetchKey(m_pointer, 0, null, p_key);\n", " }\n", " \n", " java.lang.Object FetchExactKey(String p_key)\n", " {\n", " Check();\n", " return ArrayFetchKey(m_pointer, USE_CASE_SENSITIVE, null, p_key);\n", " }\n", " \n", " void StoreKey(String p_key, Object p_value)\n", " {\n", " Check();\n", " ArrayStoreKey(m_pointer, 0, null, p_key, p_value);\n", " }\n", " \n", " void StoreExactKey(String p_key, Object p_value)\n", " {\n", " Check();\n", " ArrayStoreKey(m_pointer, USE_CASE_SENSITIVE, null, p_key, p_value);\n", " }\n", " \n", " void RemoveKey(String p_key)\n", " {\n", " Check();\n", " ArrayRemoveKey(m_pointer, 0, null, p_key);\n", " }\n", " \n", " void RemoveExactKey(String p_key)\n", " {\n", " Check();\n", " ArrayRemoveKey(m_pointer, USE_CASE_SENSITIVE, null, p_key);\n", " }\n", " \n", " //////////\n", " \n", " protected void finalize() throws java.lang.Throwable\n", " {\n", " Release();\n", " super.finalize();\n", " }\n", " \n", " //////////\n", " \n", " private Array(long p_pointer)\n", " {\n", " m_pointer = p_pointer;\n", " }\n", " \n", " private void Check()\n", " {\n", " if (m_pointer == 0)\n", " throw new RuntimeException();\n", " }\n", " \n", " //////////\n", " \n", " };*/\n", " \n", " public static class Object\n", " {\n", " private long m_pointer;\n", " \n", " public Object(String p_chunk)\n", " {\n", " m_pointer = __ObjectResolve(p_chunk);\n", " }\n", " \n", " public void Release()\n", " {\n", " if (m_pointer == 0)\n", " return;\n", " \n", " __ObjectRelease(m_pointer);\n", " \n", " m_pointer = 0;\n", " }\n", " \n", " //////////\n", " \n", " public boolean Exists()\n", " {\n", " Check();\n", " return true;\n", " }\n", " \n", " //////////\n", " \n", " public void Send(String p_message, java.lang.Object... p_arguments)\n", " {\n", " Check();\n", " __ObjectSend(m_pointer, p_message, p_arguments);\n", " }\n", " \n", " public void Post(String p_message, java.lang.Object... p_arguments)\n", " {\n", " Check();\n", " __ObjectPost(m_pointer, p_message, p_arguments);\n", " }\n", " \n", " //////////\n", " \n", " private Object(long p_pointer)\n", " {\n", " m_pointer = p_pointer;\n", " }\n", " \n", " private void Check()\n", " {\n", " if (m_pointer == 0)\n", " throw new RuntimeException();\n", " }\n", " \n", " //////////\n", " };\n", " \n", " public static class Wait\n", " {\n", " private long m_pointer;\n", " \n", " public Wait(boolean p_allow_dispatch)\n", " {\n", " if (p_allow_dispatch)\n", " m_pointer = __WaitCreate(1);\n", " else\n", " m_pointer = __WaitCreate(0);\n", " }\n", " \n", " public void Release()\n", " {\n", " if (m_pointer == 0)\n", " return;\n", " \n", " __WaitRelease(m_pointer);\n", " \n", " m_pointer = 0;\n", " }\n", " \n", " public boolean IsRunning()\n", " {\n", " Check();\n", " return __WaitIsRunning(m_pointer);\n", " }\n", " \n", " public void Run()\n", " {\n", " Check();\n", " __WaitRun(m_pointer);\n", " }\n", " \n", " public void Break()\n", " {\n", " Check();\n", " __WaitBreak(m_pointer);\n", " }\n", " \n", " public void Reset()\n", " {\n", " Check();\n", " __WaitReset(m_pointer);\n", " }\n", " \n", " private void Check()\n", " {\n", " if (m_pointer == 0)\n", " throw new RuntimeException();\n", " }\n", " \n", " protected void finalize() throws java.lang.Throwable\n", " {\n", " Release();\n", " super.finalize();\n", " }\n", " };\n", " \n", " public static Object ContextMe()\n", " {\n", " return new Object(__ContextMe());\n", " }\n", " \n", " public static Object ContextTarget()\n", " {\n", " return new Object(__ContextTarget());\n", " }\n", " \n", " ///////////\n", " \n", " public static Activity InterfaceQueryActivity()\n", " {\n", " return getEngineApi() . getActivity();\n", " }\n", " \n", " public static ViewGroup InterfaceQueryContainer()\n", " {\n", " return getEngineApi() . getContainer();\n", " }\n", " \n", " public static double InterfaceQueryViewScale()\n", " {\n", " return __InterfaceQueryViewScale();\n", " }\n", " \n", " //////////\n", " \n", " public interface ActivityResultCallback\n", " {\n", " public abstract void handleActivityResult(int resultCode, Intent data);\n", " };\n", "\n", " public static void ActivityRun(Intent p_intent, ActivityResultCallback p_callback)\n", " {\n", " final ActivityResultCallback t_callback = p_callback;\n", " getEngineApi() . runActivity(p_intent, new EngineApi.ActivityResultCallback() {\n", " public void handleActivityResult(int resultCode, Intent data)\n", " {\n", " t_callback . handleActivityResult(resultCode, data);\n", " }\n", " });\n", " }\n", " \n", " //////////\n", " \n", " public static void RunOnSystemThread(Runnable p_callback)\n", " {\n", " __RunOnSystemThread(p_callback);\n", " }\n", " \n", " //////////\n", " \n", " private static EngineApi s_engine_api = null;\n", " \n", " private static EngineApi getEngineApi()\n", " {\n", " if (s_engine_api == null)\n", " s_engine_api = __InterfaceQueryEngine();\n", " return s_engine_api;\n", " }\n", " \n", " //////////\n", " \n", " /*private static native long ArrayCreate(int options);\n", " private static native void ArrayRetain(long array);\n", " private static native void ArrayRelease(long array);\n", " private static native int ArrayCountKeys(long array, int options, String[] path);\n", " private static native String[] ArrayListKeys(long array, int options, String[] path);\n", " private static native void ArrayRemoveKeys(long array, int options, String[] path);\n", " \n", " private static native boolean ArrayHasKey(long array, int options, String[] path, String key);\n", " private static native java.lang.Object ArrayFetchKey(long array, int options, String[] path, String key);\n", " private static native void ArrayStoreKey(long array, int options, String[] path, String key, java.lang.Object value);\n", " private static native void ArrayRemoveKey(long array, int options, String[] path, String key);*/\n", " \n", " private static native long __ObjectResolve(String chunk);\n", " private static native void __ObjectRetain(long object);\n", " private static native void __ObjectRelease(long object);\n", " private static native boolean __ObjectExists(long object);\n", " private static native void __ObjectSend(long object, String message, java.lang.Object[] arguments);\n", " private static native void __ObjectPost(long object, String message, java.lang.Object[] arguments);\n", " /*private static native java.lang.Object __ObjectGet(long object, int options, String property, String key);\n", " private static native void __ObjectSet(long object, int options, String property, String key);*/\n", " \n", " private static native long __ContextMe();\n", " private static native long __ContextTarget();\n", " /*private static native long __ContextDefaultStack();\n", " private static native long __ContextDefaultCard();\n", " public static native boolean __ContextCaseSensitive();\n", " public static native boolean __ContextConvertOctals();\n", " public static native boolean __ContextWholeMatches();\n", " private static native Object __ContextItemDelimiter(int options);\n", " private static native Object __ContextLineDelimiter(int options);\n", " private static native Object __ContextRowDelimiter(int options);\n", " private static native Object __ContextColumnDelimiter(int options);\n", " private static native Object __ContextResult(int options);\n", " private static native Object __ContextIt(int options);\n", " private static native Object __ContextEvaluate(String expression, int options);\n", " private static native Object __ContextExecute(String statements, int options);*/\n", " \n", " private static native long __WaitCreate(int options);\n", " //private static native long __WaitRetain(long wait);\n", " private static native long __WaitRelease(long wait);\n", " private static native boolean __WaitIsRunning(long wait);\n", " private static native void __WaitRun(long wait);\n", " private static native void __WaitBreak(long wait);\n", " private static native void __WaitReset(long wait);\n", " \n", " private static native EngineApi __InterfaceQueryEngine();\n", " \n", " private static native void __RunOnSystemThread(Runnable callback);\n", " \n", " //private static native Activity __InterfaceQueryActivity();\n", " //private static native ViewGroup __InterfaceQueryContainer();\n", " private static native double __InterfaceQueryViewScale();\n", "};", 0 }; |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |