-
Notifications
You must be signed in to change notification settings - Fork 57
/
TODO
143 lines (114 loc) · 7.8 KB
/
TODO
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
[ ] add the "get it on f-droid" badge with the link to the app
Roadmap:
- 1.0.0: !!! start semantic versioning from here !!!
[ ] switch to the new plugin system, deprecate shared uid
[ ] add more logging
[ ] Option for notifications to stay after the connection is closed
[ ] but ongoing notifications will be set to not ongoing, to allow dismissal
[ ] HardwareBuffer features
[ ] render thread
[ ] frame sync: signal when the Buffer is finished being written and can be used by the plugin,
and signal when the plugin finished using a buffer and the client can use it again
[ ] eventfd
[ ] EGL_ANDROID_native_fence_sync
[ ] EGL_ANDROID_presentation_time
[ ] EGL_ANDROID_get_frame_timestamps
[ ] EGL_ANDROID_front_buffer_auto_refresh
[ ] rendering into the front buffer of the surface
[ ] set a buffer with damage, implement with EGL_KHR_swap_buffers_with_damage and EGL_KHR_partial_update
[ ] better framerate handling: https://developer.android.com/guide/topics/media/frame-rate
[ ] C library 1.0
[ ] add error codes from protobuf to C library
[x] add finishActivity
[/] finish tutorial
[ ] button in settings to save a logcat dump to a file
[?] RelativeLayout
good ConstraintLayout support accomplishes the same
[ ] ConstraintLayout
[ ] scroll events
[ ] make overlay Activities better
[ ] Option to specify a margin on the sides where grabbing & moving is handled by the plugin
[ ] Option to handle pinch scaling in the plugin
[ ] including a multiplier of how the pinching is translated to scaling
[ ] Dialogs in DialogFragments, so they stay in the Activity they're started in and don't close on leaving
[?] add the ability to intercept touch events in layouts
[ ] events for PiP action buttons
[ ] make the readme nicer
[/] add Javadocs
[ ] Put all known applications using Termux:GUI in the readme, I made quite a few by now
[ ] update the f-droid metadata
[ ] write a changelog
[ ] more screenshots
[ ] update description and readme
- 1.1.0
[ ] JSON protocol version 2 based on Protocol Buffers JSON encoding
[ ] add methods for android 12 widget api
[ ] settable margins and paddings
[ ] better dynamic RemoteViews
[ ] Stateful widgets
[ ] prepopulated collections views
[ ] material you theming
[ ] Quick settings tiles?
[ ] Have to be defined as services in the manifest, icon can probably be changed by a content provider or otherwise dynamically
[ ] Programs could set quick settings tiles and then listen for events on them
[ ] material design components
[ ] md2
[ ] md3
[ ] the material design theme should be the Activity theme
[ ] set md colors to activity colors
[ ] material you support
[ ] add a style enum to the create info message, error if a particular style isn't supported for a component.
Also allows more future versions of MD or custom styles, and can re-use the existing methods.
[ ] not for RemoteViews, these only support the plain Views
[ ] update the f-droid metadata
[ ] write a changelog
[ ] more screenshots
[ ] update description and readme
- 2.0.0:
[ ] remove shared uid
[ ] additional argument to methods that require a View: subtree: id of a ViewGroup that contains the View as a child, grandchild, ... .
The id gets looked up once and cached in a Hashmap (delete when view is removed).
Future methods with the same subtree argument can then use the cached value and don't have to traverse the whole View tree.
[ ] also add the subtree id to the events, so the client can do the same optimisation when processing events
[ ] or just keep all Views in a HashMap
[ ] Enable method batching, multiple requests are send in the same message and are all enqueued on the main thread as one.
Result messages are then returned in the order the messages were send.
[ ] or a new transaction-based api
[ ] Add a method to create a view tree from a representation. The view ids are returned from a flattened version of the tree.
[ ] add more arguments to the create messages like the tab/spinner list, so this is the only message you need to send to set up a full layout.
[ ] update the f-droid metadata
[ ] write a changelog
[ ] more screenshots
[ ] update description and readme
Maybe in the future:
- tooltip/context menus
- action bar with configurable actions
[ ] fragment connections
[ ] make a method to check if it's a fragment connection
[ ] use 0-0 as the dummy activity id for the activity the fragment connection is in.
[ ] option for the fragment to emit events to it's embedder, and for the embedder to "call" methods in the fragment
[ ] as an optimisation, put all views and the ids in a HashMap, and let findView use that map. It's faster than searching the view tree and main and fragment connections can have different Maps.
idea: use vulkan to create a buffer and create a file descriptor for it, use the buffer in opengl to draw to a GL SurfaceView and pass the file descriptor to the program, so it can also map it.
That consumes no cpu memory and allows the program to use accelerated graphics in the buffer.
Android doesn't support the extension to export a buffer as a fd, look into EGL instead.
https://source.android.com/devices/graphics/arch-egl-opengl?hl=en
https://www.khronos.org/registry/EGL/specs/eglspec.1.5.pdf
https://www.khronos.org/registry/OpenGL/specs/es/2.0/es_full_spec_2.0.pdf
Turns out sharing between processes isn't in the scope of EGL.
Look at the android-specific interfaces instead.
You can use hardware buffers with the ndk
To make a c program use AHardwareBuffer: -target arch-linux-android26 -landroid
https://developer.android.com/ndk/reference/group/a-hardware-buffer#ahardwarebuffer_recvhandlefromunixsocket
https://medium.com/@spencerfricke/android-ahardwarebuffer-shared-memory-over-unix-domain-sockets-7b27b1271b36
https://github.com/sjfricke/NDK-Socket-IPC
https://developer.android.com/guide/topics/graphics/opengl
https://developer.android.com/ndk/guides/graphics/getting-started
[ ] idea: Fragment connections: create a child connection whose root View is a FrameLayout in the current hierarchy.
- the child connection doesn't count as a full connection and can't create it's own activities or overlays. For that the child has to create a completely new connection.
- child connections get closed when the parent closes.
- a method the get the fragment activity id. That will be a virtual activity id, because all view methods need an activity to act on.
- fragment connections can send events to the parent connection. The event will be reported as from the id of the layout of the parent of the fragment
- also a method to send custom messages to fragments. That enables a full 2-way communication
- This system allows you to transparently use other programs as custom views in you layout, by creating a configured fragment connections, setting the fd to not close on exec, exec the program and pass the fd number as a parameter
- nesting should be supported.
- Views in Fragments can still be found from the Parent activity. Make a custom findViewById that doesn't search Fragments, also for performance reasons