mirror of
https://github.com/Sani7/remote-ui.git
synced 2026-10-26 21:51:13 +01:00
update protocol
now resembles the changes to the protocol I made
This commit is contained in:
+54
-14
@@ -7,7 +7,7 @@
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"type": "string",
|
||||
"type": "size_t",
|
||||
"description": "The id of the UI element"
|
||||
}
|
||||
],
|
||||
@@ -98,31 +98,71 @@
|
||||
[
|
||||
{
|
||||
"type": "clicked",
|
||||
"id": "name"
|
||||
"description": "Someone clicked on a UI elements",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"type": "size_t",
|
||||
"description": "The id of the UI element"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "value_changed",
|
||||
"id": "name",
|
||||
"value": 0
|
||||
"description": "Someone changed a value on a UI elements",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"type": "size_t",
|
||||
"description": "The id of the UI element"
|
||||
},
|
||||
{
|
||||
"name": "value",
|
||||
"type": "double",
|
||||
"description": "The value that changed"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "text_changed",
|
||||
"id": "name",
|
||||
"text": "text"
|
||||
"description": "Someone changed text on a UI elements",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"type": "size_t",
|
||||
"description": "The id of the UI element"
|
||||
},
|
||||
{
|
||||
"name": "text",
|
||||
"type": "string",
|
||||
"description": "The text that changed"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "selected",
|
||||
"id": "name",
|
||||
"item": "name"
|
||||
"description": "Someone changed selection on a UI elements",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"type": "size_t",
|
||||
"description": "The id of the UI element"
|
||||
},
|
||||
{
|
||||
// Server to client
|
||||
"type": "ui_changed",
|
||||
"UI_elements": [
|
||||
"name": "selected",
|
||||
"type": "size_t",
|
||||
"description": "The index of the selected item"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "name",
|
||||
"type": "type"
|
||||
// ,...
|
||||
"type": "ui_changed",
|
||||
"description": "A message from Server to client to notify that the UI changed with the changed UI elements",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "UIElements",
|
||||
"type": "List<UIElements>",
|
||||
"description": "List of UI elements"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user