mirror of
https://github.com/labwc/labwc.git
synced 2025-11-05 13:29:58 -05:00
ssd: Move implementation details from ssd.h to ssd-internal.h
- Move private structs and functions to `ssd-internal.h` - Add `ssd_button_get_type()` and `ssd_button_get_view()`
This commit is contained in:
parent
1e8b0414fe
commit
b67eccc99a
8 changed files with 166 additions and 140 deletions
|
|
@ -352,8 +352,8 @@ get_cursor_context(struct server *server)
|
|||
struct ssd_button *button =
|
||||
node_ssd_button_from_node(node);
|
||||
ret.node = node;
|
||||
ret.type = button->type;
|
||||
ret.view = button->view;
|
||||
ret.type = ssd_button_get_type(button);
|
||||
ret.view = ssd_button_get_view(button);
|
||||
return ret;
|
||||
}
|
||||
case LAB_NODE_DESC_LAYER_SURFACE:
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
#include "common/mem.h"
|
||||
#include "common/scene-helpers.h"
|
||||
#include "labwc.h"
|
||||
#include "ssd.h"
|
||||
#include "ssd-internal.h"
|
||||
#include "theme.h"
|
||||
#include "view.h"
|
||||
|
||||
|
|
@ -286,6 +286,18 @@ ssd_hover_state_new(void)
|
|||
return znew(struct ssd_hover_state);
|
||||
}
|
||||
|
||||
enum ssd_part_type
|
||||
ssd_button_get_type(const struct ssd_button *button)
|
||||
{
|
||||
return button ? button->type : LAB_SSD_NONE;
|
||||
}
|
||||
|
||||
struct view *
|
||||
ssd_button_get_view(const struct ssd_button *button)
|
||||
{
|
||||
return button ? button->view : NULL;
|
||||
}
|
||||
|
||||
bool
|
||||
ssd_debug_is_root_node(const struct ssd *ssd, struct wlr_scene_node *node)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#include "common/scene-helpers.h"
|
||||
#include "labwc.h"
|
||||
#include "ssd.h"
|
||||
#include "ssd-internal.h"
|
||||
#include "theme.h"
|
||||
#include "view.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
#include "common/mem.h"
|
||||
#include "common/scene-helpers.h"
|
||||
#include "labwc.h"
|
||||
#include "ssd.h"
|
||||
#include "ssd-internal.h"
|
||||
#include "theme.h"
|
||||
#include "view.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
#include "common/mem.h"
|
||||
#include "labwc.h"
|
||||
#include "node.h"
|
||||
#include "ssd.h"
|
||||
#include "ssd-internal.h"
|
||||
|
||||
/* Internal helpers */
|
||||
static void
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
#include "common/scene-helpers.h"
|
||||
#include "labwc.h"
|
||||
#include "node.h"
|
||||
#include "ssd.h"
|
||||
#include "ssd-internal.h"
|
||||
#include "theme.h"
|
||||
#include "view.h"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue