|
wlmaker
|
#include "tile.h"#include <cairo.h>#include <inttypes.h>#include <libbase/libbase.h>#include <libbase/plist.h>#include <string.h>#include "gfxbuf.h"#include "primitives.h"#include "style.h"
Variables | |
| const bspl_desc_t | wlmtk_tile_style_desc [] |
| static const bs_test_case_t | _wlmtk_tile_test_cases [] |
| const bs_test_set_t | wlmtk_tile_test_set |
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
static |
(re)centers the content element.
|
static |
Crates a wlr_buffer with background, as described in style_ptr.
|
static |
Exercises setup and teardown.
| bs_dllist_node_t * wlmtk_dlnode_from_tile | ( | wlmtk_tile_t * | tile_ptr | ) |
tile_ptr. | wlmtk_element_t * wlmtk_tile_element | ( | wlmtk_tile_t * | tile_ptr | ) |
tile_ptr. | wlmtk_tile_vmt_t wlmtk_tile_extend | ( | wlmtk_tile_t * | tile_ptr, |
| const wlmtk_tile_vmt_t * | tile_vmt_ptr | ||
| ) |
Extends the tile's virtual methods.
| tile_ptr | |
| tile_vmt_ptr |
| void wlmtk_tile_fini | ( | wlmtk_tile_t * | tile_ptr | ) |
Un-initializes the tile.
| tile_ptr |
| wlmtk_tile_t * wlmtk_tile_from_dlnode | ( | bs_dllist_node_t * | dlnode_ptr | ) |
dlnode_ptr. | bool wlmtk_tile_init | ( | wlmtk_tile_t * | tile_ptr, |
| const struct wlmtk_tile_style * | style_ptr | ||
| ) |
Initializes the tile.
| tile_ptr | |
| style_ptr |
| bool wlmtk_tile_set_background_buffer | ( | wlmtk_tile_t * | tile_ptr, |
| struct wlr_buffer * | wlr_buffer_ptr | ||
| ) |
Sets (overwrites) the default tile's background buffer.
This permits specific tiles, eg. a Dock Clip to include active elements in the background, or change the bezel or texture.
| tile_ptr | |
| wlr_buffer_ptr | Points to a struct wlr_buffer. The tile will add a buffer lock, so the caller may safely drop or unlock the buffer. The buffer must match the tile's size. |
| void wlmtk_tile_set_content | ( | wlmtk_tile_t * | tile_ptr, |
| wlmtk_element_t * | element_ptr | ||
| ) |
Sets element_ptr as the content of tile_ptr.
TODO(kaese.nosp@m.r@gu.nosp@m.bbe.c.nosp@m.h): Flesh out the behaviour – permit only 1 content? Does the tile claim ownerwhip? How to reset the content?
| tile_ptr | |
| element_ptr |
| void wlmtk_tile_set_overlay | ( | wlmtk_tile_t * | tile_ptr, |
| wlmtk_element_t * | element_ptr | ||
| ) |
Sets element_ptr as the overlay of tile_ptr.
TODO(kaese.nosp@m.r@gu.nosp@m.bbe.c.nosp@m.h): Flesh out the behaviour – permit only 1 overlay? Does the tile claim ownerwhip? How to reset the overlay?
| tile_ptr | |
| element_ptr |
| bool wlmtk_tile_set_style | ( | wlmtk_tile_t * | tile_ptr, |
| const struct wlmtk_tile_style * | style_ptr | ||
| ) |
Updates the style for the tile.
| tile_ptr | |
| style_ptr |
|
static |
Test cases
| const bspl_desc_t wlmtk_tile_style_desc[] |
Plist decoding descriptor of a tile style.
| const bs_test_set_t wlmtk_tile_test_set |
Unit test cases for wlmtk_tile_t.