godot/scene/main/window.cpp

/**************************************************************************/
/*  window.cpp                                                            */
/**************************************************************************/
/*                         This file is part of:                          */
/*                             GODOT ENGINE                               */
/*                        https://godotengine.org                         */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur.                  */
/*                                                                        */
/* Permission is hereby granted, free of charge, to any person obtaining  */
/* a copy of this software and associated documentation files (the        */
/* "Software"), to deal in the Software without restriction, including    */
/* without limitation the rights to use, copy, modify, merge, publish,    */
/* distribute, sublicense, and/or sell copies of the Software, and to     */
/* permit persons to whom the Software is furnished to do so, subject to  */
/* the following conditions:                                              */
/*                                                                        */
/* The above copyright notice and this permission notice shall be         */
/* included in all copies or substantial portions of the Software.        */
/*                                                                        */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,        */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF     */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY   */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,   */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE      */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
/**************************************************************************/

#include "window.h"

#include "core/config/project_settings.h"
#include "core/input/shortcut.h"
#include "core/string/translation_server.h"
#include "scene/gui/control.h"
#include "scene/theme/theme_db.h"
#include "scene/theme/theme_owner.h"

// Editor integration.

int Window::root_layout_direction =;

void Window::set_root_layout_direction(int p_root_dir) {}

// Dynamic properties.

bool Window::_set(const StringName &p_name, const Variant &p_value) {}

bool Window::_get(const StringName &p_name, Variant &r_ret) const {}

void Window::_get_property_list(List<PropertyInfo> *p_list) const {}

void Window::_validate_property(PropertyInfo &p_property) const {}

//

Window *Window::get_from_id(DisplayServer::WindowID p_window_id) {}

void Window::set_title(const String &p_title) {}

String Window::get_title() const {}

String Window::get_translated_title() const {}

void Window::_settings_changed() {}

void Window::set_initial_position(Window::WindowInitialPosition p_initial_position) {}

Window::WindowInitialPosition Window::get_initial_position() const {}

void Window::set_current_screen(int p_screen) {}

int Window::get_current_screen() const {}

void Window::set_position(const Point2i &p_position) {}

Point2i Window::get_position() const {}

void Window::move_to_center() {}

void Window::set_size(const Size2i &p_size) {}

Size2i Window::get_size() const {}

void Window::reset_size() {}

Point2i Window::get_position_with_decorations() const {}

Size2i Window::get_size_with_decorations() const {}

Size2i Window::_clamp_limit_size(const Size2i &p_limit_size) {}

void Window::_validate_limit_size() {}

void Window::set_max_size(const Size2i &p_max_size) {}

Size2i Window::get_max_size() const {}

void Window::set_min_size(const Size2i &p_min_size) {}

Size2i Window::get_min_size() const {}

void Window::set_mode(Mode p_mode) {}

Window::Mode Window::get_mode() const {}

void Window::set_flag(Flags p_flag, bool p_enabled) {}

bool Window::get_flag(Flags p_flag) const {}

bool Window::is_maximize_allowed() const {}

void Window::request_attention() {}

#ifndef DISABLE_DEPRECATED
void Window::move_to_foreground() {}
#endif // DISABLE_DEPRECATED

bool Window::can_draw() const {}

void Window::set_ime_active(bool p_active) {}

void Window::set_ime_position(const Point2i &p_pos) {}

bool Window::is_embedded() const {}

bool Window::is_in_edited_scene_root() const {}

void Window::_make_window() {}

void Window::_update_from_window() {}

void Window::_clear_window() {}

void Window::_rect_changed_callback(const Rect2i &p_callback) {}

void Window::_propagate_window_notification(Node *p_node, int p_notification) {}

void Window::_event_callback(DisplayServer::WindowEvent p_event) {}

void Window::update_mouse_cursor_state() {}

void Window::show() {}

void Window::hide() {}

void Window::set_visible(bool p_visible) {}

void Window::_clear_transient() {}

void Window::_make_transient() {}

void Window::_set_transient_exclusive_child(bool p_clear_invalid) {}

void Window::set_transient(bool p_transient) {}

bool Window::is_transient() const {}

void Window::set_transient_to_focused(bool p_transient_to_focused) {}

bool Window::is_transient_to_focused() const {}

void Window::set_exclusive(bool p_exclusive) {}

bool Window::is_exclusive() const {}

bool Window::is_visible() const {}

Size2i Window::_clamp_window_size(const Size2i &p_size) {}

void Window::_update_window_size() {}

void Window::_update_viewport_size() {}

void Window::_update_window_callbacks() {}

void Window::set_force_native(bool p_force_native) {}

bool Window::get_force_native() const {}

Viewport *Window::get_embedder() const {}

void Window::_notification(int p_what) {}

void Window::set_content_scale_size(const Size2i &p_size) {}

Size2i Window::get_content_scale_size() const {}

void Window::set_content_scale_mode(ContentScaleMode p_mode) {}

Window::ContentScaleMode Window::get_content_scale_mode() const {}

void Window::set_content_scale_aspect(ContentScaleAspect p_aspect) {}

Window::ContentScaleAspect Window::get_content_scale_aspect() const {}

void Window::set_content_scale_stretch(ContentScaleStretch p_stretch) {}

Window::ContentScaleStretch Window::get_content_scale_stretch() const {}

void Window::set_keep_title_visible(bool p_title_visible) {}

bool Window::get_keep_title_visible() const {}

void Window::set_content_scale_factor(real_t p_factor) {}

real_t Window::get_content_scale_factor() const {}

void Window::set_use_font_oversampling(bool p_oversampling) {}

bool Window::is_using_font_oversampling() const {}

DisplayServer::WindowID Window::get_window_id() const {}

void Window::set_mouse_passthrough_polygon(const Vector<Vector2> &p_region) {}

Vector<Vector2> Window::get_mouse_passthrough_polygon() const {}

void Window::set_wrap_controls(bool p_enable) {}

bool Window::is_wrapping_controls() const {}

Size2 Window::_get_contents_minimum_size() const {}

void Window::child_controls_changed() {}

void Window::_update_child_controls() {}

bool Window::_can_consume_input_events() const {}

void Window::_window_input(const Ref<InputEvent> &p_ev) {}

void Window::_window_input_text(const String &p_text) {}

void Window::_window_drop_files(const Vector<String> &p_files) {}

Viewport *Window::get_parent_viewport() const {}

Window *Window::get_parent_visible_window() const {}

void Window::popup_on_parent(const Rect2i &p_parent_rect) {}

void Window::popup_centered_clamped(const Size2i &p_size, float p_fallback_ratio) {}

void Window::popup_centered(const Size2i &p_minsize) {}

void Window::popup_centered_ratio(float p_ratio) {}

void Window::popup(const Rect2i &p_screen_rect) {}

bool Window::_try_parent_dialog(Node *p_from_node) {}

void Window::popup_exclusive(Node *p_from_node, const Rect2i &p_screen_rect) {}

void Window::popup_exclusive_on_parent(Node *p_from_node, const Rect2i &p_parent_rect) {}

void Window::popup_exclusive_centered(Node *p_from_node, const Size2i &p_minsize) {}

void Window::popup_exclusive_centered_ratio(Node *p_from_node, float p_ratio) {}

void Window::popup_exclusive_centered_clamped(Node *p_from_node, const Size2i &p_size, float p_fallback_ratio) {}

Rect2i Window::fit_rect_in_parent(Rect2i p_rect, const Rect2i &p_parent_rect) const {}

Size2 Window::get_contents_minimum_size() const {}

Size2 Window::get_clamped_minimum_size() const {}

void Window::grab_focus() {}

bool Window::has_focus() const {}

Rect2i Window::get_usable_parent_rect() const {}

void Window::add_child_notify(Node *p_child) {}

void Window::remove_child_notify(Node *p_child) {}

// Theming.

void Window::set_theme_owner_node(Node *p_node) {}

Node *Window::get_theme_owner_node() const {}

bool Window::has_theme_owner_node() const {}

void Window::set_theme_context(ThemeContext *p_context, bool p_propagate) {}

void Window::set_theme(const Ref<Theme> &p_theme) {}

Ref<Theme> Window::get_theme() const {}

void Window::_theme_changed() {}

void Window::_notify_theme_override_changed() {}

void Window::_invalidate_theme_cache() {}

void Window::_update_theme_item_cache() {}

void Window::_update_embedded_window() {}

void Window::set_theme_type_variation(const StringName &p_theme_type) {}

StringName Window::get_theme_type_variation() const {}

/// Theme property lookup.

Ref<Texture2D> Window::get_theme_icon(const StringName &p_name, const StringName &p_theme_type) const {}

Ref<StyleBox> Window::get_theme_stylebox(const StringName &p_name, const StringName &p_theme_type) const {}

Ref<Font> Window::get_theme_font(const StringName &p_name, const StringName &p_theme_type) const {}

int Window::get_theme_font_size(const StringName &p_name, const StringName &p_theme_type) const {}

Color Window::get_theme_color(const StringName &p_name, const StringName &p_theme_type) const {}

int Window::get_theme_constant(const StringName &p_name, const StringName &p_theme_type) const {}

Variant Window::get_theme_item(Theme::DataType p_data_type, const StringName &p_name, const StringName &p_theme_type) const {}

#ifdef TOOLS_ENABLED
Ref<Texture2D> Window::get_editor_theme_icon(const StringName &p_name) const {}
#endif

bool Window::has_theme_icon(const StringName &p_name, const StringName &p_theme_type) const {}

bool Window::has_theme_stylebox(const StringName &p_name, const StringName &p_theme_type) const {}

bool Window::has_theme_font(const StringName &p_name, const StringName &p_theme_type) const {}

bool Window::has_theme_font_size(const StringName &p_name, const StringName &p_theme_type) const {}

bool Window::has_theme_color(const StringName &p_name, const StringName &p_theme_type) const {}

bool Window::has_theme_constant(const StringName &p_name, const StringName &p_theme_type) const {}

/// Local property overrides.

void Window::add_theme_icon_override(const StringName &p_name, const Ref<Texture2D> &p_icon) {}

void Window::add_theme_style_override(const StringName &p_name, const Ref<StyleBox> &p_style) {}

void Window::add_theme_font_override(const StringName &p_name, const Ref<Font> &p_font) {}

void Window::add_theme_font_size_override(const StringName &p_name, int p_font_size) {}

void Window::add_theme_color_override(const StringName &p_name, const Color &p_color) {}

void Window::add_theme_constant_override(const StringName &p_name, int p_constant) {}

void Window::remove_theme_icon_override(const StringName &p_name) {}

void Window::remove_theme_style_override(const StringName &p_name) {}

void Window::remove_theme_font_override(const StringName &p_name) {}

void Window::remove_theme_font_size_override(const StringName &p_name) {}

void Window::remove_theme_color_override(const StringName &p_name) {}

void Window::remove_theme_constant_override(const StringName &p_name) {}

bool Window::has_theme_icon_override(const StringName &p_name) const {}

bool Window::has_theme_stylebox_override(const StringName &p_name) const {}

bool Window::has_theme_font_override(const StringName &p_name) const {}

bool Window::has_theme_font_size_override(const StringName &p_name) const {}

bool Window::has_theme_color_override(const StringName &p_name) const {}

bool Window::has_theme_constant_override(const StringName &p_name) const {}

/// Default theme properties.

float Window::get_theme_default_base_scale() const {}

Ref<Font> Window::get_theme_default_font() const {}

int Window::get_theme_default_font_size() const {}

/// Bulk actions.

void Window::begin_bulk_theme_override() {}

void Window::end_bulk_theme_override() {}

//

Rect2i Window::get_parent_rect() const {}

void Window::set_clamp_to_embedder(bool p_enable) {}

bool Window::is_clamped_to_embedder() const {}

void Window::set_unparent_when_invisible(bool p_unparent) {}

void Window::set_layout_direction(Window::LayoutDirection p_direction) {}

Window::LayoutDirection Window::get_layout_direction() const {}

bool Window::is_layout_rtl() const {}

#ifndef DISABLE_DEPRECATED
void Window::set_auto_translate(bool p_enable) {}

bool Window::is_auto_translating() const {}
#endif

Transform2D Window::get_final_transform() const {}

Transform2D Window::get_screen_transform_internal(bool p_absolute_position) const {}

Transform2D Window::get_popup_base_transform() const {}

Viewport *Window::get_section_root_viewport() const {}

bool Window::is_attached_in_viewport() const {}

void Window::_update_mouse_over(Vector2 p_pos) {}

void Window::_mouse_leave_viewport() {}

void Window::_bind_methods() {}

Window::Window() {}

Window::~Window() {}