mirror of
https://github.com/labwc/labwc.git
synced 2025-10-29 05:40:24 -04:00
include: reduce global includes in labwc.h
This commit is contained in:
parent
e21fc065c4
commit
e1475a1e47
30 changed files with 78 additions and 52 deletions
|
|
@ -2,53 +2,10 @@
|
|||
#ifndef LABWC_H
|
||||
#define LABWC_H
|
||||
#include "config.h"
|
||||
#include <getopt.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
#include <wayland-server-core.h>
|
||||
#include <wlr/backend.h>
|
||||
#include <wlr/render/allocator.h>
|
||||
#include <wlr/render/wlr_renderer.h>
|
||||
#include <wlr/types/wlr_compositor.h>
|
||||
#include <wlr/types/wlr_buffer.h>
|
||||
#include <wlr/types/wlr_cursor.h>
|
||||
#include <wlr/types/wlr_data_device.h>
|
||||
#include <wlr/types/wlr_gamma_control_v1.h>
|
||||
#include <wlr/types/wlr_input_device.h>
|
||||
#include <wlr/types/wlr_keyboard.h>
|
||||
#include <wlr/types/wlr_keyboard_group.h>
|
||||
#include <wlr/types/wlr_layer_shell_v1.h>
|
||||
#include <wlr/types/wlr_output.h>
|
||||
#include <wlr/types/wlr_output_management_v1.h>
|
||||
#include <wlr/types/wlr_output_power_management_v1.h>
|
||||
#include <wlr/types/wlr_output_layout.h>
|
||||
#include <wlr/types/wlr_scene.h>
|
||||
#include <wlr/types/wlr_relative_pointer_v1.h>
|
||||
#include <wlr/types/wlr_pointer.h>
|
||||
#include <wlr/types/wlr_pointer_constraints_v1.h>
|
||||
#include <wlr/types/wlr_seat.h>
|
||||
#include <wlr/types/wlr_subcompositor.h>
|
||||
#include <wlr/types/wlr_xcursor_manager.h>
|
||||
#include <wlr/types/wlr_xdg_activation_v1.h>
|
||||
#include <wlr/types/wlr_xdg_shell.h>
|
||||
#include <wlr/types/wlr_drm_lease_v1.h>
|
||||
#include <wlr/types/wlr_virtual_pointer_v1.h>
|
||||
#include <wlr/types/wlr_virtual_keyboard_v1.h>
|
||||
#include <wlr/types/wlr_tearing_control_v1.h>
|
||||
#include <wlr/types/wlr_text_input_v3.h>
|
||||
#include <wlr/types/wlr_input_method_v2.h>
|
||||
#include <wlr/types/wlr_tablet_v2.h>
|
||||
#include <wlr/util/log.h>
|
||||
#include "common/set.h"
|
||||
#include "config/keybind.h"
|
||||
#include "config/rcxml.h"
|
||||
#include "input/cursor.h"
|
||||
#include "overlay.h"
|
||||
#include "regions.h"
|
||||
#include "session-lock.h"
|
||||
#if HAVE_NLS
|
||||
#include <libintl.h>
|
||||
#include <locale.h>
|
||||
|
|
@ -60,6 +17,8 @@
|
|||
#define XCURSOR_DEFAULT "left_ptr"
|
||||
#define XCURSOR_SIZE 24
|
||||
|
||||
struct wlr_xdg_popup;
|
||||
|
||||
enum input_mode {
|
||||
LAB_INPUT_STATE_PASSTHROUGH = 0,
|
||||
LAB_INPUT_STATE_MOVE,
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
#include <string.h>
|
||||
#include <strings.h>
|
||||
#include <unistd.h>
|
||||
#include <wlr/types/wlr_scene.h>
|
||||
#include <wlr/util/log.h>
|
||||
#include "common/macros.h"
|
||||
#include "common/list.h"
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <wlr/types/wlr_keyboard_group.h>
|
||||
#include <wlr/util/log.h>
|
||||
#include "common/list.h"
|
||||
#include "common/mem.h"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
#include <assert.h>
|
||||
#include <wlr/types/wlr_server_decoration.h>
|
||||
#include <wlr/types/wlr_xdg_shell.h>
|
||||
#include "common/list.h"
|
||||
#include "common/mem.h"
|
||||
#include "decorations.h"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
#include "config.h"
|
||||
#include <assert.h>
|
||||
#include <wlr/types/wlr_seat.h>
|
||||
#include <wlr/types/wlr_subcompositor.h>
|
||||
#include <wlr/types/wlr_xdg_shell.h>
|
||||
#include "common/scene-helpers.h"
|
||||
#include "common/surface-helpers.h"
|
||||
#include "dnd.h"
|
||||
|
|
|
|||
|
|
@ -7,7 +7,14 @@
|
|||
#include <time.h>
|
||||
#include <wlr/backend/libinput.h>
|
||||
#include <wlr/types/wlr_cursor_shape_v1.h>
|
||||
#include <wlr/types/wlr_data_device.h>
|
||||
#include <wlr/types/wlr_pointer_constraints_v1.h>
|
||||
#include <wlr/types/wlr_primary_selection.h>
|
||||
#include <wlr/types/wlr_relative_pointer_v1.h>
|
||||
#include <wlr/types/wlr_scene.h>
|
||||
#include <wlr/types/wlr_subcompositor.h>
|
||||
#include <wlr/types/wlr_xcursor_manager.h>
|
||||
#include <wlr/types/wlr_xdg_shell.h>
|
||||
#include <wlr/util/region.h>
|
||||
#include "action.h"
|
||||
#include "common/macros.h"
|
||||
|
|
@ -15,7 +22,6 @@
|
|||
#include "common/scene-helpers.h"
|
||||
#include "common/surface-helpers.h"
|
||||
#include "config/mousebind.h"
|
||||
#include "config/tablet-tool.h"
|
||||
#include "dnd.h"
|
||||
#include "idle.h"
|
||||
#include "input/gestures.h"
|
||||
|
|
|
|||
|
|
@ -3,6 +3,9 @@
|
|||
|
||||
#include "input/ime.h"
|
||||
#include <assert.h>
|
||||
#include <wlr/types/wlr_layer_shell_v1.h>
|
||||
#include <wlr/types/wlr_virtual_keyboard_v1.h>
|
||||
#include <wlr/types/wlr_xdg_shell.h>
|
||||
#include "common/mem.h"
|
||||
#include "node.h"
|
||||
#include "output.h"
|
||||
|
|
|
|||
|
|
@ -6,9 +6,11 @@
|
|||
#include <wlr/backend/multi.h>
|
||||
#include <wlr/backend/session.h>
|
||||
#include <wlr/interfaces/wlr_keyboard.h>
|
||||
#include <wlr/types/wlr_keyboard_group.h>
|
||||
#include "action.h"
|
||||
#include "common/macros.h"
|
||||
#include "common/three-state.h"
|
||||
#include "config/keybind.h"
|
||||
#include "idle.h"
|
||||
#include "input/ime.h"
|
||||
#include "input/key-state.h"
|
||||
|
|
@ -16,6 +18,7 @@
|
|||
#include "menu/menu.h"
|
||||
#include "osd.h"
|
||||
#include "regions.h"
|
||||
#include "session-lock.h"
|
||||
#include "view.h"
|
||||
#include "workspaces.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include <wlr/backend/libinput.h>
|
||||
#include <wlr/types/wlr_compositor.h>
|
||||
#include <wlr/types/wlr_tablet_pad.h>
|
||||
#include <wlr/types/wlr_tablet_tool.h>
|
||||
#include <wlr/util/log.h>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
#include "input/touch.h"
|
||||
#include <wayland-util.h>
|
||||
#include <wlr/types/wlr_scene.h>
|
||||
#include <wlr/types/wlr_seat.h>
|
||||
#include <wlr/types/wlr_touch.h>
|
||||
#include <linux/input-event-codes.h>
|
||||
#include "common/macros.h"
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
#include <wayland-server.h>
|
||||
#include <wlr/types/wlr_fractional_scale_v1.h>
|
||||
#include <wlr/types/wlr_layer_shell_v1.h>
|
||||
#include <wlr/types/wlr_xdg_shell.h>
|
||||
#include <wlr/util/log.h>
|
||||
#include "common/macros.h"
|
||||
#include "common/mem.h"
|
||||
|
|
|
|||
|
|
@ -2,8 +2,10 @@
|
|||
|
||||
#include "magnifier.h"
|
||||
#include <assert.h>
|
||||
#include <wlr/render/allocator.h>
|
||||
#include <wlr/render/swapchain.h>
|
||||
#include <wlr/types/wlr_output.h>
|
||||
#include <wlr/types/wlr_scene.h>
|
||||
#include <wlr/util/transform.h>
|
||||
#include "common/box.h"
|
||||
#include "labwc.h"
|
||||
|
|
|
|||
|
|
@ -1,13 +1,11 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
#define _POSIX_C_SOURCE 200809L
|
||||
#include <getopt.h>
|
||||
#include <pango/pangocairo.h>
|
||||
#include <signal.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include "common/dir.h"
|
||||
#include "common/fd-util.h"
|
||||
#include "common/font.h"
|
||||
#include "common/mem.h"
|
||||
#include "common/spawn.h"
|
||||
#include "config/session.h"
|
||||
#include "labwc.h"
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <strings.h>
|
||||
#include <unistd.h>
|
||||
#include <wayland-server-core.h>
|
||||
#include <wlr/types/wlr_xdg_shell.h>
|
||||
#include <wlr/util/log.h>
|
||||
|
|
|
|||
|
|
@ -14,7 +14,11 @@
|
|||
#include <wlr/backend/wayland.h>
|
||||
#include <wlr/types/wlr_buffer.h>
|
||||
#include <wlr/types/wlr_drm_lease_v1.h>
|
||||
#include <wlr/types/wlr_gamma_control_v1.h>
|
||||
#include <wlr/types/wlr_output.h>
|
||||
#include <wlr/types/wlr_output_management_v1.h>
|
||||
#include <wlr/types/wlr_output_power_management_v1.h>
|
||||
#include <wlr/types/wlr_xcursor_manager.h>
|
||||
#include <wlr/types/wlr_xdg_output_v1.h>
|
||||
#include <wlr/types/wlr_scene.h>
|
||||
#include <wlr/util/region.h>
|
||||
|
|
@ -31,6 +35,7 @@
|
|||
#include "protocols/cosmic-workspaces.h"
|
||||
#include "protocols/ext-workspace.h"
|
||||
#include "regions.h"
|
||||
#include "session-lock.h"
|
||||
#include "view.h"
|
||||
#include "xwayland.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
#include "overlay.h"
|
||||
#include <assert.h>
|
||||
#include <wlr/types/wlr_scene.h>
|
||||
#include "common/lab-scene-rect.h"
|
||||
#include "labwc.h"
|
||||
#include "output.h"
|
||||
|
|
|
|||
|
|
@ -5,8 +5,14 @@
|
|||
#include <wlr/backend/libinput.h>
|
||||
#include <wlr/types/wlr_input_device.h>
|
||||
#include <wlr/types/wlr_keyboard.h>
|
||||
#include <wlr/types/wlr_keyboard_group.h>
|
||||
#include <wlr/types/wlr_layer_shell_v1.h>
|
||||
#include <wlr/types/wlr_pointer.h>
|
||||
#include <wlr/types/wlr_pointer_constraints_v1.h>
|
||||
#include <wlr/types/wlr_touch.h>
|
||||
#include <wlr/types/wlr_virtual_keyboard_v1.h>
|
||||
#include <wlr/types/wlr_virtual_pointer_v1.h>
|
||||
#include <wlr/types/wlr_xdg_shell.h>
|
||||
#include <wlr/util/log.h>
|
||||
#include "common/macros.h"
|
||||
#include "common/mem.h"
|
||||
|
|
@ -18,6 +24,7 @@
|
|||
#include "input/key-state.h"
|
||||
#include "labwc.h"
|
||||
#include "output.h"
|
||||
#include "session-lock.h"
|
||||
#include "view.h"
|
||||
|
||||
static void
|
||||
|
|
|
|||
20
src/server.c
20
src/server.c
|
|
@ -6,25 +6,36 @@
|
|||
#include <sys/wait.h>
|
||||
#include <wlr/backend/headless.h>
|
||||
#include <wlr/backend/multi.h>
|
||||
#include <wlr/render/allocator.h>
|
||||
#include <wlr/types/wlr_alpha_modifier_v1.h>
|
||||
#include <wlr/types/wlr_data_control_v1.h>
|
||||
#include <wlr/types/wlr_ext_data_control_v1.h>
|
||||
#include <wlr/types/wlr_data_device.h>
|
||||
#include <wlr/types/wlr_drm.h>
|
||||
#include <wlr/types/wlr_drm_lease_v1.h>
|
||||
#include <wlr/types/wlr_export_dmabuf_v1.h>
|
||||
#include <wlr/types/wlr_ext_data_control_v1.h>
|
||||
#include <wlr/types/wlr_ext_foreign_toplevel_list_v1.h>
|
||||
#include <wlr/types/wlr_ext_image_capture_source_v1.h>
|
||||
#include <wlr/types/wlr_ext_image_copy_capture_v1.h>
|
||||
#include <wlr/types/wlr_foreign_toplevel_management_v1.h>
|
||||
#include <wlr/types/wlr_fractional_scale_v1.h>
|
||||
#include <wlr/types/wlr_gamma_control_v1.h>
|
||||
#include <wlr/types/wlr_input_method_v2.h>
|
||||
#include <wlr/types/wlr_linux_drm_syncobj_v1.h>
|
||||
#include <wlr/types/wlr_output_power_management_v1.h>
|
||||
#include <wlr/types/wlr_pointer_constraints_v1.h>
|
||||
#include <wlr/types/wlr_presentation_time.h>
|
||||
#include <wlr/types/wlr_primary_selection_v1.h>
|
||||
#include <wlr/types/wlr_relative_pointer_v1.h>
|
||||
#include <wlr/types/wlr_scene.h>
|
||||
#include <wlr/types/wlr_screencopy_v1.h>
|
||||
#include <wlr/types/wlr_ext_image_capture_source_v1.h>
|
||||
#include <wlr/types/wlr_ext_image_copy_capture_v1.h>
|
||||
#include <wlr/types/wlr_security_context_v1.h>
|
||||
#include <wlr/types/wlr_single_pixel_buffer_v1.h>
|
||||
#include <wlr/types/wlr_viewporter.h>
|
||||
#include <wlr/types/wlr_subcompositor.h>
|
||||
#include <wlr/types/wlr_tablet_v2.h>
|
||||
#include <wlr/types/wlr_tearing_control_v1.h>
|
||||
#include <wlr/types/wlr_text_input_v3.h>
|
||||
#include <wlr/types/wlr_viewporter.h>
|
||||
#include <wlr/types/wlr_xdg_foreign_registry.h>
|
||||
#include <wlr/types/wlr_xdg_foreign_v1.h>
|
||||
#include <wlr/types/wlr_xdg_foreign_v2.h>
|
||||
|
|
@ -52,6 +63,7 @@
|
|||
#include "output-virtual.h"
|
||||
#include "regions.h"
|
||||
#include "resize-indicator.h"
|
||||
#include "session-lock.h"
|
||||
#include "theme.h"
|
||||
#include "view.h"
|
||||
#include "workspaces.h"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#include <assert.h>
|
||||
#include <wlr/types/wlr_scene.h>
|
||||
#include "common/scene-helpers.h"
|
||||
#include "labwc.h"
|
||||
#include "ssd-internal.h"
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include <assert.h>
|
||||
#include <pixman.h>
|
||||
#include <wlr/types/wlr_scene.h>
|
||||
#include "common/scene-helpers.h"
|
||||
#include "config/rcxml.h"
|
||||
#include "labwc.h"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#include <assert.h>
|
||||
#include "common/scene-helpers.h"
|
||||
#include <wlr/types/wlr_scene.h>
|
||||
#include "labwc.h"
|
||||
#include "buffer.h"
|
||||
#include "ssd-internal.h"
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include <assert.h>
|
||||
#include <strings.h>
|
||||
#include <wlr/types/wlr_scene.h>
|
||||
#include "common/mem.h"
|
||||
#include "common/scene-helpers.h"
|
||||
#include "labwc.h"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#include <wlr/types/wlr_tearing_control_v1.h>
|
||||
#include "common/mem.h"
|
||||
#include "labwc.h"
|
||||
#include "view.h"
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <wlr/util/box.h>
|
||||
#include <wlr/util/log.h>
|
||||
#include <wlr/render/pixman.h>
|
||||
|
|
|
|||
|
|
@ -2,8 +2,11 @@
|
|||
#include "view.h"
|
||||
#include <assert.h>
|
||||
#include <strings.h>
|
||||
#include <wlr/types/wlr_keyboard_group.h>
|
||||
#include <wlr/types/wlr_output_layout.h>
|
||||
#include <wlr/types/wlr_scene.h>
|
||||
#include <wlr/types/wlr_security_context_v1.h>
|
||||
#include <wlr/types/wlr_xdg_shell.h>
|
||||
#include "action.h"
|
||||
#include "buffer.h"
|
||||
#include "common/box.h"
|
||||
|
|
@ -21,6 +24,7 @@
|
|||
#include "placement.h"
|
||||
#include "regions.h"
|
||||
#include "resize-indicator.h"
|
||||
#include "session-lock.h"
|
||||
#include "snap-constraints.h"
|
||||
#include "snap.h"
|
||||
#include "ssd.h"
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <strings.h>
|
||||
#include <wlr/types/wlr_scene.h>
|
||||
#include "buffer.h"
|
||||
#include "common/font.h"
|
||||
#include "common/graphic-helpers.h"
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
* - keeping non-layer-shell xdg-popups outside the layers.c code
|
||||
*/
|
||||
|
||||
#include <wlr/types/wlr_xdg_shell.h>
|
||||
#include "common/macros.h"
|
||||
#include "common/mem.h"
|
||||
#include "labwc.h"
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
#include <assert.h>
|
||||
#include <wlr/types/wlr_fractional_scale_v1.h>
|
||||
#include <wlr/types/wlr_xdg_activation_v1.h>
|
||||
#include <wlr/types/wlr_xdg_shell.h>
|
||||
#include <wlr/types/wlr_xdg_toplevel_icon_v1.h>
|
||||
#include "buffer.h"
|
||||
#include "common/array.h"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
#include <assert.h>
|
||||
#include <wlr/types/wlr_compositor.h>
|
||||
#include <wlr/types/wlr_scene.h>
|
||||
#include <wlr/types/wlr_seat.h>
|
||||
#include <wlr/xwayland.h>
|
||||
#include "common/list.h"
|
||||
#include "common/macros.h"
|
||||
|
|
|
|||
|
|
@ -3,6 +3,9 @@
|
|||
#include "xwayland.h"
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include <wlr/types/wlr_compositor.h>
|
||||
#include <wlr/types/wlr_seat.h>
|
||||
#include <wlr/types/wlr_xcursor_manager.h>
|
||||
#include <wlr/xwayland.h>
|
||||
#include "buffer.h"
|
||||
#include "common/array.h"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue