mirror of
https://github.com/labwc/labwc.git
synced 2025-10-29 05:40:24 -04:00
Currently, the dependencies between foreign-toplevel[-internal],
ext-foreign, and wlr-foreign are cyclical and a bit complex.
I suggest we reorganize it into a simpler hierarchy:
foreign-toplevel/
-> foreign.c/h
-> (depends on) ext-foreign.c/h
-> (depends on) wlr-foreign.c/h
The refactored code is smaller and (IMO) easier to follow.
In detail:
- Add include/foreign-toplevel folder mirroring src/foreign-toplevel
- Split foreign-toplevel-internal.h to ext-foreign.h and wlr-foreign.h
- Eliminate ext-/wlr-foreign.c -> foreign.c reverse dependencies
(including internal signals and foreign_request* functions)
- Make struct foreign_toplevel private to foreign.c
Lightly tested with qmpanel (which uses wlr-foreign-toplevel).
v2: reorder foreign-toplevel internal API funcs
13 lines
427 B
C
13 lines
427 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
#ifndef LABWC_FOREIGN_TOPLEVEL_H
|
|
#define LABWC_FOREIGN_TOPLEVEL_H
|
|
|
|
struct view;
|
|
struct foreign_toplevel;
|
|
|
|
struct foreign_toplevel *foreign_toplevel_create(struct view *view);
|
|
void foreign_toplevel_set_parent(struct foreign_toplevel *toplevel,
|
|
struct foreign_toplevel *parent);
|
|
void foreign_toplevel_destroy(struct foreign_toplevel *toplevel);
|
|
|
|
#endif /* LABWC_FOREIGN_TOPLEVEL_H */
|