You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: text/0047-switch-to-advanced-docking-system.md
+13-88Lines changed: 13 additions & 88 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,8 +5,7 @@
5
5
- Allow the user to switch between pre-made layouts
6
6
- Plugins could register their own
7
7
- Users could save their own
8
-
- Dock added by plugins with the old method are added as "*Legacy dock*"
9
-
- Frontend API methods and events about ADS docks
8
+
- Dock added by plugins with the old methods are added as "*Legacy dock*"
10
9
11
10
Note: The "central widget" design is kept.
12
11
@@ -140,7 +139,7 @@ Those docks are named `obs-$SERVICE_$DOCK_NAME` where `$SERVICE` is the service
140
139
141
140
## Legacy dock
142
141
143
-
If switching to ADS is made at the same as switching to Qt 6. This feature will only concern builds that still use Qt 5 (e.g. Ubuntu 20.04).
142
+
**TODO: Talk about `obs_frontend_add_custom_qdock()`**
144
143
145
144
The frontend API method `obs_frontend_add_dock()` is put in deprecation. And if dual switch only Qt5 and on Qt 6 the method is removed or does nothing, this is possible because plugin will need to be rebuilt agaisnt Qt6.
146
145
@@ -171,103 +170,23 @@ Users could be able to save their own layouts. Those layouts will have their nam
171
170
172
171
Note: ADS perspective feature is not directly used because it relies heavily on QSettings.
173
172
## Frontend API
174
-
Like said earlier, the method `obs_frontend_add_dock()` is put in deprecation.
175
173
176
-
All add/remove methods related to ADS requiring a name will require the plugin module to be able to prefix the given name with the module name (`mod_name`) to avoid conflicts.
177
-
178
-
So the following method will be added to libobs to access modules `mod_name`:
**TODO: Talk about obs_frontend_add_dock_by_id() that is now a thing**
194
175
195
176
This allow to add a OBSAdvDock with the given QWidget. Those docks are stored in the Dock Manager and their names is stored in the QStringList for plugins extra docks.
196
177
197
-
Default height and width would based on the widget actual size except if `"defaultWidth"` and `"defaultHeight"` properties are set with the [`setProperty()`][7] method on the widget.
178
+
Default height and width would based on the widget actual size.
198
179
199
180
Minimum sizes used by the dock are based on the widget ones.
This allow to know if the running OBS Studio has browser feature enabled. So it returnfalseif OBS Studio was built without browser or is running under Wayland.
This allow the plugin to add a dock with a QCefWidget as widget.
228
183
229
-
If browser docks are added in the module load or post load steps, their parameter will be stored and those will be really added later.
184
+
**TODO: Talk about `obs_frontend_remove_dock()` that is now a thing**
230
185
231
-
The QCefWidget will get parameters from this structure:
232
-
233
-
```c++
234
-
struct obs_frontend_browser_params {
235
-
const char *url;
236
-
bool enable_cookie;
237
-
struct dstr startup_script;
238
-
DARRAY(char *) force_popup_urls;
239
-
};
240
-
```
241
-
242
-
- `bool enable_cookie`: iftrue `panel_cookie` will be used. The plugin maker will have to remove the dock the between profile change because the cookie manager is per profile.
243
-
- `structdstr startup_script` allow to set a startup script for the QCefWidget.
244
-
-`DARRAY(char *) force_popup_urls` allow to set a list of url forced to popup.
245
-
246
-
And the dock itself will get parameters from this structure:
247
-
248
-
```c++
249
-
structobs_frontend_browser_dock_params {
250
-
const char *unique_name;
251
-
const char *title;
252
-
int default_width;
253
-
int default_height;
254
-
int min_width;
255
-
int min_height;
256
-
};
257
-
```
258
-
259
-
`obs_frontend_remove_dock()` can be used to remove the browser dock.
260
-
261
-
### Remove browser cookie
262
-
Since enabling cookie is posible, allowing to delete those is required.
0 commit comments