/*
 * DWN - Desktop Window Manager
 * Built-in Layout Registration
 */

#ifndef BUILTIN_LAYOUTS_H
#define BUILTIN_LAYOUTS_H

#include "plugins/layout_plugin.h"
#include "dwn.h"

#ifdef __cplusplus
extern "C" {
#endif

/**
 * Initialize and register all built-in layouts.
 * Called during DWN startup.
 */
bool wm_layouts_builtin_init(void);

/**
 * Get a layout plugin by legacy LayoutType.
 */
LayoutPlugin* wm_layout_get_by_type(LayoutManager *mgr, LayoutType type);

/**
 * Bridge function to arrange a workspace using the plugin system.
 */
bool wm_layout_arrange_workspace(LayoutManager *mgr, int workspace, LayoutType type);

/**
 * Get symbol for a layout type.
 */
const char* wm_layout_get_symbol_for_type(LayoutType type);

/**
 * Get name for a layout type.
 */
const char* wm_layout_get_name_for_type(LayoutType type);

/**
 * Get LayoutType from name.
 */
LayoutType wm_layout_type_from_name(const char *name);

/* External layout interface getters */
const LayoutPluginInterface* wm_layout_tiling_get_interface(void);
const LayoutPluginInterface* wm_layout_floating_get_interface(void);
const LayoutPluginInterface* wm_layout_monocle_get_interface(void);
const LayoutPluginInterface* wm_layout_grid_get_interface(void);

#ifdef __cplusplus
}
#endif

#endif /* BUILTIN_LAYOUTS_H */
