hb_J_K - Petewg/harbour-core GitHub Wiki
🔙 Home
-
hb_jsonDecode(
<cJSON>, <[@]xValue>, [<cdpID>]
) ➜ nLengthDecoded|DecodedData
decodes the<cJSON>
encoded string and stores decoded values into the<xValue>
variable (usually a hash array), when passed by reference, in which case returns the number of processed symbols. If<xValue>
is not passed by reference (or not passed at all), the function returns the decoded (original) data. The optional third parameter<cdpID>
allows to pass explicitly codepage used for strings decoded from JSON data. If this parameter is NULL then strings are decoded in raw form and unicode character with code over255
are converted to?
char! -
hb_jsonEncode(
<xValue>, [<lHuman> | <nIndent>], [<cDestCP>]
) ➜ cJSONString
encodes<xValue>
to JSON format.<lHuman>
if set to .T., makes the output string more human-readable, (default is .F.). Alternatively, if numeric<nIndent>
is used then a value greater than zero defines number of spaces used for indenting, 0 (zero ) disables indenting and -1 meansTAB
(ASCII:9). Code-blocks are stored as "null", object as arrays (methods are not recorded).- For a quite good usage example of this function, see this post in harbour-users group.
-
hb_keyChar(
<nKey>
) ➜ cChar -
hb_keyClear() ➜ NIL
clears all pending keys from keyboard buffer; equivalent to "CLEAR TYPEAHEAD" command. -
hb_keyCode(
<cChar>
) ➜ nExtCode
It helps replacing Asc() calls in Unicode apps where it's used to convert characters (f.e. hotkeys) to keyboard codes. -
hb_keyExt() ➜ nExtKey
extract function/edit key code value HB_KX_* from Harbour extended key code. -
hb_keyIns(
<xValue>
)
works like hb_KeyPut() (see below) but numeric key values are placed at the beginning of keyboard buffer.
It does not clear keyboard buffer contents. -
hb_keyLast() ➜ nCode
returnsnCode
of last key pressed. similar to LastKey() -
hb_keyMod(
<nExtKey>
) ➜ nModifiers
extracts keyboard modifiers (HB_KF_*) from extended key code. -
hb_keyNext(
[<nEventMask>]
) ➜ nKey
returns next key of keyboard buffer without removing it. -
hb_keyPut(
<xValue>
) ➜ NIL
can be used instead of KEYBOARD/__KEYBOARD(), for adding Inkey() codes to the keyboard buffer whose values are outside the range of 1 to 255.<xValue>
can be numeric, string or array with string elements. strings are converted internally into key codes before passed to keyboard-buffer. -
hb_keySetLast(
<nKeyCode>
) -
hb_keyStd(
<nExtKey>
) ➜ nClipKey
converts Harbour extended key code to Cl*pper inkey code. -
hb_keyVal(
<nExtKey>
) ➜ nKeyVal | nCharVal
extracts key/character code from Harbour extended key code.
🔙 Home