-
Notifications
You must be signed in to change notification settings - Fork 201
[WIP] Added documentation on far2l terminal extensions protocol #3082
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
base: master
Are you sure you want to change the base?
Conversation
VTExts.md
Outdated
| | Argument | Type | Description | | ||
| | ---------- | ----------- | --------------------------------------- | | ||
| | Format ID | `uint32_t` | The ID of the data format. | | ||
| | Data | `raw bytes` | The data buffer. Its size is determined by the next argument. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
arguments order mixed up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check now pls!
- rearranged feature flags notes for a more logical presentation
VTExts.md
Outdated
| - **Out Stack:** | ||
| | Argument | Type | Description | | ||
| | ----------------- | ---------- | -------------------------------------------- | | ||
| | Capabilities | `uint64_t` | A bitmask of `WP_IMGCAP_*` flags (e.g., `0x02` for RGBA). | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RGBA is not 2, here re currently defines capabilities:
#define WP_IMGCAP_RGBA 0x01 // supports WP_IMG_RGB/WP_IMG_RGBA
#define WP_IMGCAP_SCROLL 0x02 // supports existing image scrolling
#define WP_IMGCAP_ROTATE 0x04 // supports existing image rotation
VTExts.md
Outdated
| | Argument | Type | Description | | ||
| | ------------- | ----------- | -------------------------------------------- | | ||
| | Image ID | `string` | A unique identifier for the image. | | ||
| | Flags | `uint64_t` | The image format (`0x01` for RGB, `0x02` for RGBA). | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again flags are wrong, here re possible flags bits:
// flags used for SetConsoleImage
#define WP_IMG_RGBA 0 // supported if WP_IMGCAP_RGBA
#define WP_IMG_RGB 1 // supported if WP_IMGCAP_RGBA
// SetConsoleImage scrolling flags supported if WP_IMGCAP_SCROLL reported
// move already existing image and scroll it with 'prepending' by newly sent part
#define WP_IMG_SCROLL_AT_LEFT 0x10000 // left->right scrolling, sending rectangle to insert at left
#define WP_IMG_SCROLL_AT_RIGHT 0x20000 // right->left scrolling, sending rectangle to insert at right
#define WP_IMG_SCROLL_AT_TOP 0x30000 // top->bottom scrolling, sending rectangle to insert at top
#define WP_IMG_SCROLL_AT_BOTTOM 0x40000 // bottom->top scrolling, sending rectangle to insert at bottom
#define WP_IMG_MASK_FMT 0x0ffff
#define WP_IMG_MASK_SCROLL 0x70000
as you can see, first 16 bit are reserved for unique format ID, and currently only 2 are defines - 0 (RGBA) and 1 (RGB)
Also there re 3 bits defined for scroll operation, which looks like set image, but instead of setting new image it attaches 'piece' to edge of already existing image, scrolled by opposide direction
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check now pls!
|
и FARTTY_INTERACT_IMAGE_ROT забыт (но он только сегодня был добавлен) |
|
В целом это ИИ генерил? както подозрительно много перепутанных параметров. |
|
Это генерил ИИ, который предварительно смог написать работающую реализацию показывалки картинок (не с первой попытки, конечно), и я решил, что он ок разобрался. Сейчас поправлю всё! |
|
ввиду того что графический апи пока скорее всего еще не финальный, лучше с этим подождать |
А сейчас? :) |
@elfmz гляньте, плз, всё ли правильно написано