-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #50 from tiosgz/wlr-scene
- Loading branch information
Showing
27 changed files
with
704 additions
and
1,274 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* Copyright (c), Charlotte Meyer <[email protected]> | ||
* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
* You can obtain one at https://mozilla.org/MPL/2.0/. | ||
*/ | ||
|
||
#ifndef KIWMI_DESKTOP_DESKTOP_SURFACE_H | ||
#define KIWMI_DESKTOP_DESKTOP_SURFACE_H | ||
|
||
struct wlr_surface; | ||
struct kiwmi_desktop; | ||
|
||
enum kiwmi_desktop_surface_type { | ||
KIWMI_DESKTOP_SURFACE_VIEW, | ||
KIWMI_DESKTOP_SURFACE_LAYER, | ||
}; | ||
|
||
struct kiwmi_desktop_surface { | ||
// The tree is where the config is supposed to put custom decorations (it | ||
// also contains the surface_node) | ||
struct wlr_scene_tree *tree; | ||
struct wlr_scene_node *surface_node; | ||
|
||
struct wlr_scene_tree *popups_tree; | ||
|
||
enum kiwmi_desktop_surface_type type; | ||
const struct kiwmi_desktop_surface_impl *impl; | ||
}; | ||
|
||
struct kiwmi_desktop_surface_impl { | ||
struct kiwmi_output *(*get_output)( | ||
struct kiwmi_desktop_surface *desktop_surface); | ||
}; | ||
|
||
struct kiwmi_desktop_surface * | ||
desktop_surface_at(struct kiwmi_desktop *desktop, double lx, double ly); | ||
struct kiwmi_output * | ||
desktop_surface_get_output(struct kiwmi_desktop_surface *desktop_surface); | ||
void desktop_surface_get_pos( | ||
struct kiwmi_desktop_surface *desktop_surface, | ||
int *lx, | ||
int *ly); | ||
|
||
#endif /* KIWMI_DESKTOP_DESKTOP_SURFACE_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* Copyright (c), Charlotte Meyer <[email protected]> | ||
* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
* You can obtain one at https://mozilla.org/MPL/2.0/. | ||
*/ | ||
|
||
#ifndef KIWMI_DESKTOP_POPUP_H | ||
#define KIWMI_DESKTOP_POPUP_H | ||
|
||
struct wlr_xdg_popup; | ||
struct kiwmi_desktop_surface; | ||
|
||
struct kiwmi_desktop_surface * | ||
popup_get_desktop_surface(struct wlr_xdg_popup *popup); | ||
void popup_attach( | ||
struct wlr_xdg_popup *popup, | ||
struct kiwmi_desktop_surface *desktop_surface); | ||
|
||
#endif /* KIWMI_DESKTOP_POPUP_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* Copyright (c), Charlotte Meyer <[email protected]> | ||
* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
* You can obtain one at https://mozilla.org/MPL/2.0/. | ||
*/ | ||
|
||
#ifndef KIWMI_DESKTOP_STRATUM_H | ||
#define KIWMI_DESKTOP_STRATUM_H | ||
|
||
#include <stdint.h> | ||
|
||
/** | ||
* A stratum is a layer in the scene-graph (the name was chosen to avoid | ||
* confusion with layer-shell). The root node contains a scene_tree for each | ||
* stratum, which itself contains a scene_tree per output. | ||
*/ | ||
|
||
// There are some assumptions made about the values, don't mindlessly change. | ||
enum kiwmi_stratum { | ||
KIWMI_STRATUM_LS_BACKGROUND, // LS == layer_shell | ||
KIWMI_STRATUM_LS_BOTTOM, | ||
KIWMI_STRATUM_NORMAL, | ||
KIWMI_STRATUM_LS_TOP, | ||
KIWMI_STRATUM_LS_OVERLAY, | ||
KIWMI_STRATUM_POPUPS, | ||
KIWMI_STRATA_COUNT, | ||
KIWMI_STRATUM_NONE = KIWMI_STRATA_COUNT, | ||
}; | ||
|
||
enum kiwmi_stratum stratum_from_layer_shell_layer(uint32_t layer); | ||
|
||
#endif /* KIWMI_DESKTOP_STRATUM_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.