ladybird/Userland/Libraries/LibGUI/Forward.h
Linus Groh 5367bbb82c LibGUI: Add ScreenRectChangeEvent and deliver it to windows and widgets
Having to rely on GUI::Desktop's on_rect_change is quite limiting and a
bit awkward (continuing to use it would mean having to setup the
callback in every application using a webview) - we need a better way of
letting widgets know of a screen rect change automatically.

The specific use case will be IPWV/OOPWV which need to keep track of the
screen rect and notify the WebContent service of any change (which on
its own deliberately can't interact with WindowServer at all).

It'll also be useful for notification windows and the taskbar, which
currently both rely on the GUI::Desktop callback but will now be able to
listen and react to the event themselves.
2021-04-04 00:37:54 +02:00

108 lines
2.8 KiB
C++

/*
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#pragma once
namespace GUI {
class AbstractButton;
class AbstractTableView;
class AbstractView;
class Action;
class ActionGroup;
class Application;
class AutocompleteBox;
class AutocompleteProvider;
class BoxLayout;
class Button;
class CheckBox;
class ComboBox;
class Command;
class DragEvent;
class DropEvent;
class EditingEngine;
class FileSystemModel;
class Frame;
class GroupBox;
class HeaderView;
class HorizontalBoxLayout;
class HorizontalSlider;
class Icon;
class IconView;
class JsonArrayModel;
class KeyEvent;
class Label;
class Layout;
class ListView;
class Menu;
class MenuBar;
class MenuItem;
class Model;
class ModelEditingDelegate;
class ModelIndex;
class MouseEvent;
class MultiPaintEvent;
class MultiView;
class OpacitySlider;
class PaintEvent;
class Painter;
class RadioButton;
class ResizeCorner;
class ResizeEvent;
class ScreenRectChangeEvent;
class ScrollBar;
class ScrollableWidget;
class Slider;
class SortingProxyModel;
class SpinBox;
class Splitter;
class StackWidget;
class StatusBar;
class TabWidget;
class TableView;
class TextBox;
class TextDocument;
class TextDocumentLine;
struct TextDocumentSpan;
class TextDocumentUndoCommand;
class TextEditor;
class ThemeChangeEvent;
class ToolBar;
class ToolBarContainer;
class TreeView;
class Variant;
class VerticalBoxLayout;
class VerticalSlider;
class WMEvent;
class Widget;
class WidgetClassRegistration;
class Window;
class WindowServerConnection;
enum class ModelRole;
enum class SortOrder;
}