Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[rcore] Draft: IME support #2809

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
177 changes: 173 additions & 4 deletions parser/output/raylib_api.json
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,12 @@
"type": "UNKNOWN",
"value": "SHADER_LOC_MAP_METALNESS",
"description": ""
},
{
"name": "GetMouseRay",
"type": "UNKNOWN",
"value": "GetScreenToWorldRay",
"description": "Compatibility hack for previous raylib versions"
}
],
"structs": [
Expand Down Expand Up @@ -1410,6 +1416,11 @@
"value": 2,
"description": "Set to run program in fullscreen"
},
{
"name": "FLAG_MANAGE_PREEDIT_CANDIDATE",
"value": 131072,
"description": "Set to manage the drawing of preedit candidates by the application side"
},
{
"name": "FLAG_WINDOW_RESIZABLE",
"value": 4,
Expand Down Expand Up @@ -3093,6 +3104,60 @@
}
]
},
{
"name": "PreeditCallback",
"description": "",
"returnType": "void",
"params": [
{
"type": "int",
"name": "preeditLength"
},
{
"type": "int *",
"name": "preeditString"
},
{
"type": "int",
"name": "blockCount"
},
{
"type": "int *",
"name": "blockSizes"
},
{
"type": "int",
"name": "focusedBlock"
},
{
"type": "int",
"name": "caret"
}
]
},
{
"name": "PreeditCandidateCallback",
"description": "",
"returnType": "void",
"params": [
{
"type": "int",
"name": "candidatesCount"
},
{
"type": "int",
"name": "selectedIndex"
},
{
"type": "int",
"name": "pageStart"
},
{
"type": "int",
"name": "pageSize"
}
]
},
{
"name": "AudioCallback",
"description": "",
Expand Down Expand Up @@ -3873,12 +3938,12 @@
},
{
"name": "GetScreenToWorldRay",
"description": "Get a ray trace from mouse position",
"description": "Get a ray trace from screen position (i.e mouse)",
"returnType": "Ray",
"params": [
{
"type": "Vector2",
"name": "mousePosition"
"name": "position"
},
{
"type": "Camera",
Expand All @@ -3888,12 +3953,12 @@
},
{
"name": "GetScreenToWorldRayEx",
"description": "Get a ray trace from mouse position in a viewport",
"description": "Get a ray trace from screen position (i.e mouse) in a viewport",
"returnType": "Ray",
"params": [
{
"type": "Vector2",
"name": "mousePosition"
"name": "position"
},
{
"type": "Camera",
Expand Down Expand Up @@ -4794,6 +4859,110 @@
}
]
},
{
"name": "SetPreeditCallback",
"description": "Set a callback for preedit",
"returnType": "void",
"params": [
{
"type": "PreeditCallback",
"name": "callback"
}
]
},
{
"name": "SetPreeditCursorRectangle",
"description": "Set the preedit cursor area that is used to decide the position of the candidate window",
"returnType": "void",
"params": [
{
"type": "int",
"name": "x"
},
{
"type": "int",
"name": "y"
},
{
"type": "int",
"name": "w"
},
{
"type": "int",
"name": "h"
}
]
},
{
"name": "GetPreeditCursorRectangle",
"description": "Get the preedit cursor area",
"returnType": "void",
"params": [
{
"type": "int *",
"name": "x"
},
{
"type": "int *",
"name": "y"
},
{
"type": "int *",
"name": "w"
},
{
"type": "int *",
"name": "h"
}
]
},
{
"name": "IsImeOn",
"description": "Check if IME is ON",
"returnType": "bool"
},
{
"name": "SetImeStatus",
"description": "Set IME status",
"returnType": "void",
"params": [
{
"type": "bool",
"name": "on"
}
]
},
{
"name": "ResetPreedit",
"description": "Reset preedit text",
"returnType": "void"
},
{
"name": "SetPreeditCandidateCallback",
"description": "Set a callback for preedit candidates",
"returnType": "void",
"params": [
{
"type": "PreeditCandidateCallback",
"name": "callback"
}
]
},
{
"name": "GetPreeditCandidate",
"description": "Get the text of the preedie candidate. This can be used only when `FLAG_MANAGE_PREEDIT_CANDIDATE` ConfigFlag is enabled on Win32int *",
"returnType": "int *",
"params": [
{
"type": "int",
"name": "index"
},
{
"type": "int *",
"name": "textCount"
}
]
},
{
"name": "IsGamepadAvailable",
"description": "Check if a gamepad is available",
Expand Down
108 changes: 104 additions & 4 deletions parser/output/raylib_api.lua
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,12 @@ return {
type = "UNKNOWN",
value = "SHADER_LOC_MAP_METALNESS",
description = ""
},
{
name = "GetMouseRay",
type = "UNKNOWN",
value = "GetScreenToWorldRay",
description = "Compatibility hack for previous raylib versions"
}
},
structs = {
Expand Down Expand Up @@ -1410,6 +1416,11 @@ return {
value = 2,
description = "Set to run program in fullscreen"
},
{
name = "FLAG_MANAGE_PREEDIT_CANDIDATE",
value = 131072,
description = "Set to manage the drawing of preedit candidates by the application side"
},
{
name = "FLAG_WINDOW_RESIZABLE",
value = 4,
Expand Down Expand Up @@ -3060,6 +3071,30 @@ return {
{type = "char *", name = "text"}
}
},
{
name = "PreeditCallback",
description = "",
returnType = "void",
params = {
{type = "int", name = "preeditLength"},
{type = "int *", name = "preeditString"},
{type = "int", name = "blockCount"},
{type = "int *", name = "blockSizes"},
{type = "int", name = "focusedBlock"},
{type = "int", name = "caret"}
}
},
{
name = "PreeditCandidateCallback",
description = "",
returnType = "void",
params = {
{type = "int", name = "candidatesCount"},
{type = "int", name = "selectedIndex"},
{type = "int", name = "pageStart"},
{type = "int", name = "pageSize"}
}
},
{
name = "AudioCallback",
description = "",
Expand Down Expand Up @@ -3636,19 +3671,19 @@ return {
},
{
name = "GetScreenToWorldRay",
description = "Get a ray trace from mouse position",
description = "Get a ray trace from screen position (i.e mouse)",
returnType = "Ray",
params = {
{type = "Vector2", name = "mousePosition"},
{type = "Vector2", name = "position"},
{type = "Camera", name = "camera"}
}
},
{
name = "GetScreenToWorldRayEx",
description = "Get a ray trace from mouse position in a viewport",
description = "Get a ray trace from screen position (i.e mouse) in a viewport",
returnType = "Ray",
params = {
{type = "Vector2", name = "mousePosition"},
{type = "Vector2", name = "position"},
{type = "Camera", name = "camera"},
{type = "float", name = "width"},
{type = "float", name = "height"}
Expand Down Expand Up @@ -4260,6 +4295,71 @@ return {
{type = "int", name = "key"}
}
},
{
name = "SetPreeditCallback",
description = "Set a callback for preedit",
returnType = "void",
params = {
{type = "PreeditCallback", name = "callback"}
}
},
{
name = "SetPreeditCursorRectangle",
description = "Set the preedit cursor area that is used to decide the position of the candidate window",
returnType = "void",
params = {
{type = "int", name = "x"},
{type = "int", name = "y"},
{type = "int", name = "w"},
{type = "int", name = "h"}
}
},
{
name = "GetPreeditCursorRectangle",
description = "Get the preedit cursor area",
returnType = "void",
params = {
{type = "int *", name = "x"},
{type = "int *", name = "y"},
{type = "int *", name = "w"},
{type = "int *", name = "h"}
}
},
{
name = "IsImeOn",
description = "Check if IME is ON",
returnType = "bool"
},
{
name = "SetImeStatus",
description = "Set IME status",
returnType = "void",
params = {
{type = "bool", name = "on"}
}
},
{
name = "ResetPreedit",
description = "Reset preedit text",
returnType = "void"
},
{
name = "SetPreeditCandidateCallback",
description = "Set a callback for preedit candidates",
returnType = "void",
params = {
{type = "PreeditCandidateCallback", name = "callback"}
}
},
{
name = "GetPreeditCandidate",
description = "Get the text of the preedie candidate. This can be used only when `FLAG_MANAGE_PREEDIT_CANDIDATE` ConfigFlag is enabled on Win32int *",
returnType = "int *",
params = {
{type = "int", name = "index"},
{type = "int *", name = "textCount"}
}
},
{
name = "IsGamepadAvailable",
description = "Check if a gamepad is available",
Expand Down