wlmaker
|
#include "tile.h"
#include <cairo.h>
#include <inttypes.h>
#include <libbase/libbase.h>
#include <string.h>
#include "gfxbuf.h"
#include "primitives.h"
Functions | |
static void | _wlmtk_tile_update_layout (wlmtk_container_t *container_ptr) |
static struct wlr_buffer * | _wlmtk_tile_create_buffer (const wlmtk_tile_style_t *style_ptr) |
bool | wlmtk_tile_init (wlmtk_tile_t *tile_ptr, const wlmtk_tile_style_t *style_ptr) |
void | wlmtk_tile_fini (wlmtk_tile_t *tile_ptr) |
bool | wlmtk_tile_set_background_buffer (wlmtk_tile_t *tile_ptr, struct wlr_buffer *wlr_buffer_ptr) |
void | wlmtk_tile_set_content (wlmtk_tile_t *tile_ptr, wlmtk_element_t *element_ptr) |
void | wlmtk_tile_set_overlay (wlmtk_tile_t *tile_ptr, wlmtk_element_t *element_ptr) |
wlmtk_element_t * | wlmtk_tile_element (wlmtk_tile_t *tile_ptr) |
static void | test_init_fini (bs_test_t *test_ptr) |
Variables | |
static const wlmtk_container_vmt_t | _wlmtk_tile_container_vmt |
const bs_test_case_t | wlmtk_tile_test_cases [] |
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 |
Crates a wlr_buffer with background, as described in style_ptr
.
|
static |
Handles requests to update layout. Called when elements are added.
|
static |
Exercises setup and teardown.
wlmtk_element_t * wlmtk_tile_element | ( | wlmtk_tile_t * | tile_ptr | ) |
tile_ptr
. void wlmtk_tile_fini | ( | wlmtk_tile_t * | tile_ptr | ) |
Un-initializes the tile.
tile_ptr |
bool wlmtk_tile_init | ( | wlmtk_tile_t * | tile_ptr, |
const wlmtk_tile_style_t * | 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 |
|
static |
Virtual methods implemented by wlmtk_tile_t.
const bs_test_case_t wlmtk_tile_test_cases[] |
Unit test cases for wlmtk_tile_t.