mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 17:17:35 +00:00
AK: Rename RetainPtr => RefPtr and Retained => NonnullRefPtr.
This commit is contained in:
parent
77b9fa89dd
commit
90b1354688
188 changed files with 562 additions and 562 deletions
|
@ -15,7 +15,7 @@ GAbstractView::~GAbstractView()
|
|||
delete m_edit_widget;
|
||||
}
|
||||
|
||||
void GAbstractView::set_model(RetainPtr<GModel>&& model)
|
||||
void GAbstractView::set_model(RefPtr<GModel>&& model)
|
||||
{
|
||||
if (model == m_model)
|
||||
return;
|
||||
|
|
|
@ -13,7 +13,7 @@ public:
|
|||
explicit GAbstractView(GWidget* parent);
|
||||
virtual ~GAbstractView() override;
|
||||
|
||||
void set_model(RetainPtr<GModel>&&);
|
||||
void set_model(RefPtr<GModel>&&);
|
||||
GModel* model() { return m_model.ptr(); }
|
||||
const GModel* model() const { return m_model.ptr(); }
|
||||
|
||||
|
@ -48,6 +48,6 @@ protected:
|
|||
Rect m_edit_widget_content_rect;
|
||||
|
||||
private:
|
||||
RetainPtr<GModel> m_model;
|
||||
RefPtr<GModel> m_model;
|
||||
bool m_activates_on_selection { false };
|
||||
};
|
||||
|
|
|
@ -16,7 +16,7 @@ GAction::GAction(const StringView& text, Function<void(GAction&)> on_activation_
|
|||
{
|
||||
}
|
||||
|
||||
GAction::GAction(const StringView& text, RetainPtr<GraphicsBitmap>&& icon, Function<void(GAction&)> on_activation_callback, GWidget* widget)
|
||||
GAction::GAction(const StringView& text, RefPtr<GraphicsBitmap>&& icon, Function<void(GAction&)> on_activation_callback, GWidget* widget)
|
||||
: on_activation(move(on_activation_callback))
|
||||
, m_text(text)
|
||||
, m_icon(move(icon))
|
||||
|
@ -29,7 +29,7 @@ GAction::GAction(const StringView& text, const GShortcut& shortcut, Function<voi
|
|||
{
|
||||
}
|
||||
|
||||
GAction::GAction(const StringView& text, const GShortcut& shortcut, RetainPtr<GraphicsBitmap>&& icon, Function<void(GAction&)> on_activation_callback, GWidget* widget)
|
||||
GAction::GAction(const StringView& text, const GShortcut& shortcut, RefPtr<GraphicsBitmap>&& icon, Function<void(GAction&)> on_activation_callback, GWidget* widget)
|
||||
: on_activation(move(on_activation_callback))
|
||||
, m_text(text)
|
||||
, m_icon(move(icon))
|
||||
|
|
|
@ -23,23 +23,23 @@ public:
|
|||
ApplicationGlobal,
|
||||
WidgetLocal,
|
||||
};
|
||||
static Retained<GAction> create(const StringView& text, Function<void(GAction&)> callback, GWidget* widget = nullptr)
|
||||
static NonnullRefPtr<GAction> create(const StringView& text, Function<void(GAction&)> callback, GWidget* widget = nullptr)
|
||||
{
|
||||
return adopt(*new GAction(text, move(callback), widget));
|
||||
}
|
||||
static Retained<GAction> create(const StringView& text, const StringView& custom_data, Function<void(GAction&)> callback, GWidget* widget = nullptr)
|
||||
static NonnullRefPtr<GAction> create(const StringView& text, const StringView& custom_data, Function<void(GAction&)> callback, GWidget* widget = nullptr)
|
||||
{
|
||||
return adopt(*new GAction(text, custom_data, move(callback), widget));
|
||||
}
|
||||
static Retained<GAction> create(const StringView& text, RetainPtr<GraphicsBitmap>&& icon, Function<void(GAction&)> callback, GWidget* widget = nullptr)
|
||||
static NonnullRefPtr<GAction> create(const StringView& text, RefPtr<GraphicsBitmap>&& icon, Function<void(GAction&)> callback, GWidget* widget = nullptr)
|
||||
{
|
||||
return adopt(*new GAction(text, move(icon), move(callback), widget));
|
||||
}
|
||||
static Retained<GAction> create(const StringView& text, const GShortcut& shortcut, Function<void(GAction&)> callback, GWidget* widget = nullptr)
|
||||
static NonnullRefPtr<GAction> create(const StringView& text, const GShortcut& shortcut, Function<void(GAction&)> callback, GWidget* widget = nullptr)
|
||||
{
|
||||
return adopt(*new GAction(text, shortcut, move(callback), widget));
|
||||
}
|
||||
static Retained<GAction> create(const StringView& text, const GShortcut& shortcut, RetainPtr<GraphicsBitmap>&& icon, Function<void(GAction&)> callback, GWidget* widget = nullptr)
|
||||
static NonnullRefPtr<GAction> create(const StringView& text, const GShortcut& shortcut, RefPtr<GraphicsBitmap>&& icon, Function<void(GAction&)> callback, GWidget* widget = nullptr)
|
||||
{
|
||||
return adopt(*new GAction(text, shortcut, move(icon), move(callback), widget));
|
||||
}
|
||||
|
@ -78,8 +78,8 @@ public:
|
|||
private:
|
||||
GAction(const StringView& text, Function<void(GAction&)> = nullptr, GWidget* = nullptr);
|
||||
GAction(const StringView& text, const GShortcut&, Function<void(GAction&)> = nullptr, GWidget* = nullptr);
|
||||
GAction(const StringView& text, const GShortcut&, RetainPtr<GraphicsBitmap>&& icon, Function<void(GAction&)> = nullptr, GWidget* = nullptr);
|
||||
GAction(const StringView& text, RetainPtr<GraphicsBitmap>&& icon, Function<void(GAction&)> = nullptr, GWidget* = nullptr);
|
||||
GAction(const StringView& text, const GShortcut&, RefPtr<GraphicsBitmap>&& icon, Function<void(GAction&)> = nullptr, GWidget* = nullptr);
|
||||
GAction(const StringView& text, RefPtr<GraphicsBitmap>&& icon, Function<void(GAction&)> = nullptr, GWidget* = nullptr);
|
||||
GAction(const StringView& text, const StringView& custom_data = StringView(), Function<void(GAction&)> = nullptr, GWidget* = nullptr);
|
||||
|
||||
template<typename Callback>
|
||||
|
@ -89,7 +89,7 @@ private:
|
|||
|
||||
String m_text;
|
||||
String m_custom_data;
|
||||
RetainPtr<GraphicsBitmap> m_icon;
|
||||
RefPtr<GraphicsBitmap> m_icon;
|
||||
GShortcut m_shortcut;
|
||||
bool m_enabled { true };
|
||||
bool m_checkable { false };
|
||||
|
|
|
@ -81,7 +81,7 @@ void GButton::set_action(GAction& action)
|
|||
set_checked(action.is_checked());
|
||||
}
|
||||
|
||||
void GButton::set_icon(RetainPtr<GraphicsBitmap>&& icon)
|
||||
void GButton::set_icon(RefPtr<GraphicsBitmap>&& icon)
|
||||
{
|
||||
if (m_icon == icon)
|
||||
return;
|
||||
|
|
|
@ -15,7 +15,7 @@ public:
|
|||
explicit GButton(GWidget* parent);
|
||||
virtual ~GButton() override;
|
||||
|
||||
void set_icon(RetainPtr<GraphicsBitmap>&&);
|
||||
void set_icon(RefPtr<GraphicsBitmap>&&);
|
||||
const GraphicsBitmap* icon() const { return m_icon.ptr(); }
|
||||
GraphicsBitmap* icon() { return m_icon.ptr(); }
|
||||
|
||||
|
@ -39,7 +39,7 @@ protected:
|
|||
virtual void paint_event(GPaintEvent&) override;
|
||||
|
||||
private:
|
||||
RetainPtr<GraphicsBitmap> m_icon;
|
||||
RefPtr<GraphicsBitmap> m_icon;
|
||||
ButtonStyle m_button_style { ButtonStyle::Normal };
|
||||
TextAlignment m_text_alignment { TextAlignment::Center };
|
||||
WeakPtr<GAction> m_action;
|
||||
|
|
|
@ -11,11 +11,11 @@
|
|||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
static CLockable<HashMap<String, RetainPtr<GraphicsBitmap>>>& thumbnail_cache()
|
||||
static CLockable<HashMap<String, RefPtr<GraphicsBitmap>>>& thumbnail_cache()
|
||||
{
|
||||
static CLockable<HashMap<String, RetainPtr<GraphicsBitmap>>>* s_map;
|
||||
static CLockable<HashMap<String, RefPtr<GraphicsBitmap>>>* s_map;
|
||||
if (!s_map)
|
||||
s_map = new CLockable<HashMap<String, RetainPtr<GraphicsBitmap>>>();
|
||||
s_map = new CLockable<HashMap<String, RefPtr<GraphicsBitmap>>>();
|
||||
return *s_map;
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ class GDirectoryModel final : public GModel {
|
|||
friend int thumbnail_thread(void*);
|
||||
|
||||
public:
|
||||
static Retained<GDirectoryModel> create() { return adopt(*new GDirectoryModel); }
|
||||
static NonnullRefPtr<GDirectoryModel> create() { return adopt(*new GDirectoryModel); }
|
||||
virtual ~GDirectoryModel() override;
|
||||
|
||||
enum Column {
|
||||
|
@ -42,7 +42,7 @@ public:
|
|||
uid_t uid { 0 };
|
||||
uid_t gid { 0 };
|
||||
ino_t inode { 0 };
|
||||
mutable RetainPtr<GraphicsBitmap> thumbnail;
|
||||
mutable RefPtr<GraphicsBitmap> thumbnail;
|
||||
bool is_directory() const { return S_ISDIR(mode); }
|
||||
bool is_executable() const { return mode & S_IXUSR; }
|
||||
String full_path(const GDirectoryModel& model) const { return String::format("%s/%s", model.path().characters(), name.characters()); }
|
||||
|
|
|
@ -19,7 +19,7 @@ private:
|
|||
void clear_preview();
|
||||
|
||||
GTableView* m_view { nullptr };
|
||||
Retained<GDirectoryModel> m_model;
|
||||
NonnullRefPtr<GDirectoryModel> m_model;
|
||||
FileSystemPath m_selected_file;
|
||||
|
||||
GLabel* m_preview_image_label { nullptr };
|
||||
|
|
|
@ -12,7 +12,7 @@ public:
|
|||
FilesAndDirectories
|
||||
};
|
||||
|
||||
static Retained<GFileSystemModel> create(const StringView& root_path = "/", Mode mode = Mode::FilesAndDirectories)
|
||||
static NonnullRefPtr<GFileSystemModel> create(const StringView& root_path = "/", Mode mode = Mode::FilesAndDirectories)
|
||||
{
|
||||
return adopt(*new GFileSystemModel(root_path, mode));
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ void GFontDatabase::for_each_fixed_width_font(Function<void(const StringView&)>
|
|||
}
|
||||
}
|
||||
|
||||
RetainPtr<Font> GFontDatabase::get_by_name(const StringView& name)
|
||||
RefPtr<Font> GFontDatabase::get_by_name(const StringView& name)
|
||||
{
|
||||
auto it = m_name_to_metadata.find(name);
|
||||
if (it == m_name_to_metadata.end())
|
||||
|
|
|
@ -16,7 +16,7 @@ class GFontDatabase {
|
|||
public:
|
||||
static GFontDatabase& the();
|
||||
|
||||
RetainPtr<Font> get_by_name(const StringView&);
|
||||
RefPtr<Font> get_by_name(const StringView&);
|
||||
void for_each_font(Function<void(const StringView&)>);
|
||||
void for_each_fixed_width_font(Function<void(const StringView&)>);
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ GIcon::GIcon(const GIcon& other)
|
|||
{
|
||||
}
|
||||
|
||||
GIcon::GIcon(RetainPtr<GraphicsBitmap>&& bitmap)
|
||||
GIcon::GIcon(RefPtr<GraphicsBitmap>&& bitmap)
|
||||
: GIcon()
|
||||
{
|
||||
if (bitmap) {
|
||||
|
@ -25,7 +25,7 @@ GIcon::GIcon(RetainPtr<GraphicsBitmap>&& bitmap)
|
|||
}
|
||||
}
|
||||
|
||||
GIcon::GIcon(RetainPtr<GraphicsBitmap>&& bitmap1, RetainPtr<GraphicsBitmap>&& bitmap2)
|
||||
GIcon::GIcon(RefPtr<GraphicsBitmap>&& bitmap1, RefPtr<GraphicsBitmap>&& bitmap2)
|
||||
: GIcon(move(bitmap1))
|
||||
{
|
||||
if (bitmap2) {
|
||||
|
@ -53,7 +53,7 @@ const GraphicsBitmap* GIconImpl::bitmap_for_size(int size) const
|
|||
return best_fit;
|
||||
}
|
||||
|
||||
void GIconImpl::set_bitmap_for_size(int size, RetainPtr<GraphicsBitmap>&& bitmap)
|
||||
void GIconImpl::set_bitmap_for_size(int size, RefPtr<GraphicsBitmap>&& bitmap)
|
||||
{
|
||||
if (!bitmap) {
|
||||
m_bitmaps.remove(size);
|
||||
|
|
|
@ -5,22 +5,22 @@
|
|||
|
||||
class GIconImpl : public RefCounted<GIconImpl> {
|
||||
public:
|
||||
static Retained<GIconImpl> create() { return adopt(*new GIconImpl); }
|
||||
static NonnullRefPtr<GIconImpl> create() { return adopt(*new GIconImpl); }
|
||||
~GIconImpl() {}
|
||||
|
||||
const GraphicsBitmap* bitmap_for_size(int) const;
|
||||
void set_bitmap_for_size(int, RetainPtr<GraphicsBitmap>&&);
|
||||
void set_bitmap_for_size(int, RefPtr<GraphicsBitmap>&&);
|
||||
|
||||
private:
|
||||
GIconImpl() {}
|
||||
HashMap<int, RetainPtr<GraphicsBitmap>> m_bitmaps;
|
||||
HashMap<int, RefPtr<GraphicsBitmap>> m_bitmaps;
|
||||
};
|
||||
|
||||
class GIcon {
|
||||
public:
|
||||
GIcon();
|
||||
explicit GIcon(RetainPtr<GraphicsBitmap>&&);
|
||||
explicit GIcon(RetainPtr<GraphicsBitmap>&&, RetainPtr<GraphicsBitmap>&&);
|
||||
explicit GIcon(RefPtr<GraphicsBitmap>&&);
|
||||
explicit GIcon(RefPtr<GraphicsBitmap>&&, RefPtr<GraphicsBitmap>&&);
|
||||
explicit GIcon(const GIconImpl&);
|
||||
GIcon(const GIcon&);
|
||||
~GIcon() {}
|
||||
|
@ -34,10 +34,10 @@ public:
|
|||
}
|
||||
|
||||
const GraphicsBitmap* bitmap_for_size(int size) const { return m_impl->bitmap_for_size(size); }
|
||||
void set_bitmap_for_size(int size, RetainPtr<GraphicsBitmap>&& bitmap) { m_impl->set_bitmap_for_size(size, move(bitmap)); }
|
||||
void set_bitmap_for_size(int size, RefPtr<GraphicsBitmap>&& bitmap) { m_impl->set_bitmap_for_size(size, move(bitmap)); }
|
||||
|
||||
const GIconImpl& impl() const { return *m_impl; }
|
||||
|
||||
private:
|
||||
Retained<GIconImpl> m_impl;
|
||||
NonnullRefPtr<GIconImpl> m_impl;
|
||||
};
|
||||
|
|
|
@ -17,7 +17,7 @@ GLabel::~GLabel()
|
|||
{
|
||||
}
|
||||
|
||||
void GLabel::set_icon(RetainPtr<GraphicsBitmap>&& icon)
|
||||
void GLabel::set_icon(RefPtr<GraphicsBitmap>&& icon)
|
||||
{
|
||||
m_icon = move(icon);
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ public:
|
|||
String text() const { return m_text; }
|
||||
void set_text(const StringView&);
|
||||
|
||||
void set_icon(RetainPtr<GraphicsBitmap>&&);
|
||||
void set_icon(RefPtr<GraphicsBitmap>&&);
|
||||
const GraphicsBitmap* icon() const { return m_icon.ptr(); }
|
||||
GraphicsBitmap* icon() { return m_icon.ptr(); }
|
||||
|
||||
|
@ -32,7 +32,7 @@ private:
|
|||
virtual void paint_event(GPaintEvent&) override;
|
||||
|
||||
String m_text;
|
||||
RetainPtr<GraphicsBitmap> m_icon;
|
||||
RefPtr<GraphicsBitmap> m_icon;
|
||||
TextAlignment m_text_alignment { TextAlignment::Center };
|
||||
bool m_should_stretch_icon { false };
|
||||
};
|
||||
|
|
|
@ -31,7 +31,7 @@ GMenu::~GMenu()
|
|||
unrealize_menu();
|
||||
}
|
||||
|
||||
void GMenu::add_action(Retained<GAction> action)
|
||||
void GMenu::add_action(NonnullRefPtr<GAction> action)
|
||||
{
|
||||
m_items.append(make<GMenuItem>(m_menu_id, move(action)));
|
||||
#ifdef GMENU_DEBUG
|
||||
|
|
|
@ -18,7 +18,7 @@ public:
|
|||
|
||||
GAction* action_at(int);
|
||||
|
||||
void add_action(Retained<GAction>);
|
||||
void add_action(NonnullRefPtr<GAction>);
|
||||
void add_separator();
|
||||
|
||||
void popup(const Point& screen_position);
|
||||
|
|
|
@ -9,7 +9,7 @@ GMenuItem::GMenuItem(unsigned menu_id, Type type)
|
|||
{
|
||||
}
|
||||
|
||||
GMenuItem::GMenuItem(unsigned menu_id, Retained<GAction>&& action)
|
||||
GMenuItem::GMenuItem(unsigned menu_id, NonnullRefPtr<GAction>&& action)
|
||||
: m_type(Action)
|
||||
, m_menu_id(menu_id)
|
||||
, m_action(move(action))
|
||||
|
|
|
@ -15,7 +15,7 @@ public:
|
|||
};
|
||||
|
||||
GMenuItem(unsigned menu_id, Type);
|
||||
GMenuItem(unsigned menu_id, Retained<GAction>&&);
|
||||
GMenuItem(unsigned menu_id, NonnullRefPtr<GAction>&&);
|
||||
~GMenuItem();
|
||||
|
||||
Type type() const { return m_type; }
|
||||
|
@ -45,5 +45,5 @@ private:
|
|||
bool m_enabled { true };
|
||||
bool m_checkable { false };
|
||||
bool m_checked { false };
|
||||
RetainPtr<GAction> m_action;
|
||||
RefPtr<GAction> m_action;
|
||||
};
|
||||
|
|
|
@ -23,7 +23,7 @@ GMessageBox::~GMessageBox()
|
|||
{
|
||||
}
|
||||
|
||||
RetainPtr<GraphicsBitmap> GMessageBox::icon() const
|
||||
RefPtr<GraphicsBitmap> GMessageBox::icon() const
|
||||
{
|
||||
switch (m_type) {
|
||||
case Type::Information:
|
||||
|
|
|
@ -20,7 +20,7 @@ public:
|
|||
|
||||
private:
|
||||
void build();
|
||||
RetainPtr<GraphicsBitmap> icon() const;
|
||||
RefPtr<GraphicsBitmap> icon() const;
|
||||
|
||||
String m_text;
|
||||
Type m_type { Type::None };
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
#include <LibGUI/GRadioButton.h>
|
||||
#include <SharedGraphics/GraphicsBitmap.h>
|
||||
|
||||
static RetainPtr<GraphicsBitmap> s_unfilled_circle_bitmap;
|
||||
static RetainPtr<GraphicsBitmap> s_filled_circle_bitmap;
|
||||
static RetainPtr<GraphicsBitmap> s_changing_filled_circle_bitmap;
|
||||
static RetainPtr<GraphicsBitmap> s_changing_unfilled_circle_bitmap;
|
||||
static RefPtr<GraphicsBitmap> s_unfilled_circle_bitmap;
|
||||
static RefPtr<GraphicsBitmap> s_filled_circle_bitmap;
|
||||
static RefPtr<GraphicsBitmap> s_changing_filled_circle_bitmap;
|
||||
static RefPtr<GraphicsBitmap> s_changing_unfilled_circle_bitmap;
|
||||
|
||||
GRadioButton::GRadioButton(const StringView& text, GWidget* parent)
|
||||
: GAbstractButton(text, parent)
|
||||
|
|
|
@ -14,5 +14,5 @@ protected:
|
|||
virtual void leave_event(CEvent&) override;
|
||||
|
||||
private:
|
||||
RetainPtr<GraphicsBitmap> m_bitmap;
|
||||
RefPtr<GraphicsBitmap> m_bitmap;
|
||||
};
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
GSortingProxyModel::GSortingProxyModel(Retained<GModel>&& target)
|
||||
GSortingProxyModel::GSortingProxyModel(NonnullRefPtr<GModel>&& target)
|
||||
: m_target(move(target))
|
||||
, m_key_column(-1)
|
||||
{
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
class GSortingProxyModel final : public GModel {
|
||||
public:
|
||||
static Retained<GSortingProxyModel> create(Retained<GModel>&& model) { return adopt(*new GSortingProxyModel(move(model))); }
|
||||
static NonnullRefPtr<GSortingProxyModel> create(NonnullRefPtr<GModel>&& model) { return adopt(*new GSortingProxyModel(move(model))); }
|
||||
virtual ~GSortingProxyModel() override;
|
||||
|
||||
virtual int row_count(const GModelIndex& = GModelIndex()) const override;
|
||||
|
@ -22,14 +22,14 @@ public:
|
|||
GModelIndex map_to_target(const GModelIndex&) const;
|
||||
|
||||
private:
|
||||
explicit GSortingProxyModel(Retained<GModel>&&);
|
||||
explicit GSortingProxyModel(NonnullRefPtr<GModel>&&);
|
||||
|
||||
GModel& target() { return *m_target; }
|
||||
const GModel& target() const { return *m_target; }
|
||||
|
||||
void resort();
|
||||
|
||||
Retained<GModel> m_target;
|
||||
NonnullRefPtr<GModel> m_target;
|
||||
Vector<int> m_row_mappings;
|
||||
int m_key_column { -1 };
|
||||
GSortOrder m_sort_order { GSortOrder::Ascending };
|
||||
|
|
|
@ -60,7 +60,7 @@ private:
|
|||
int width { 0 };
|
||||
bool has_initialized_width { false };
|
||||
bool visibility { true };
|
||||
RetainPtr<GAction> visibility_action;
|
||||
RefPtr<GAction> visibility_action;
|
||||
};
|
||||
ColumnData& column_data(int column) const;
|
||||
|
||||
|
|
|
@ -221,11 +221,11 @@ private:
|
|||
int m_horizontal_content_padding { 2 };
|
||||
GTextRange m_selection;
|
||||
OwnPtr<GMenu> m_context_menu;
|
||||
RetainPtr<GAction> m_undo_action;
|
||||
RetainPtr<GAction> m_redo_action;
|
||||
RetainPtr<GAction> m_cut_action;
|
||||
RetainPtr<GAction> m_copy_action;
|
||||
RetainPtr<GAction> m_paste_action;
|
||||
RetainPtr<GAction> m_delete_action;
|
||||
RefPtr<GAction> m_undo_action;
|
||||
RefPtr<GAction> m_redo_action;
|
||||
RefPtr<GAction> m_cut_action;
|
||||
RefPtr<GAction> m_copy_action;
|
||||
RefPtr<GAction> m_paste_action;
|
||||
RefPtr<GAction> m_delete_action;
|
||||
CElapsedTimer m_triple_click_timer;
|
||||
};
|
||||
|
|
|
@ -18,7 +18,7 @@ GToolBar::~GToolBar()
|
|||
{
|
||||
}
|
||||
|
||||
void GToolBar::add_action(Retained<GAction>&& action)
|
||||
void GToolBar::add_action(NonnullRefPtr<GAction>&& action)
|
||||
{
|
||||
GAction* raw_action_ptr = action.ptr();
|
||||
auto item = make<Item>();
|
||||
|
|
|
@ -9,7 +9,7 @@ public:
|
|||
explicit GToolBar(GWidget* parent);
|
||||
virtual ~GToolBar() override;
|
||||
|
||||
void add_action(Retained<GAction>&&);
|
||||
void add_action(NonnullRefPtr<GAction>&&);
|
||||
void add_separator();
|
||||
|
||||
bool has_frame() const { return m_has_frame; }
|
||||
|
@ -27,7 +27,7 @@ private:
|
|||
Action
|
||||
};
|
||||
Type type { Invalid };
|
||||
RetainPtr<GAction> action;
|
||||
RefPtr<GAction> action;
|
||||
};
|
||||
Vector<OwnPtr<Item>> m_items;
|
||||
bool m_has_frame { true };
|
||||
|
|
|
@ -37,6 +37,6 @@ private:
|
|||
|
||||
mutable HashMap<void*, OwnPtr<MetadataForIndex>> m_view_metadata;
|
||||
|
||||
RetainPtr<GraphicsBitmap> m_expand_bitmap;
|
||||
RetainPtr<GraphicsBitmap> m_collapse_bitmap;
|
||||
RefPtr<GraphicsBitmap> m_expand_bitmap;
|
||||
RefPtr<GraphicsBitmap> m_collapse_bitmap;
|
||||
};
|
||||
|
|
|
@ -371,7 +371,7 @@ void GWidget::set_focus(bool focus)
|
|||
}
|
||||
}
|
||||
|
||||
void GWidget::set_font(RetainPtr<Font>&& font)
|
||||
void GWidget::set_font(RefPtr<Font>&& font)
|
||||
{
|
||||
if (!font)
|
||||
m_font = Font::default_font();
|
||||
|
|
|
@ -161,7 +161,7 @@ public:
|
|||
bool fill_with_background_color() const { return m_fill_with_background_color; }
|
||||
|
||||
const Font& font() const { return *m_font; }
|
||||
void set_font(RetainPtr<Font>&&);
|
||||
void set_font(RefPtr<Font>&&);
|
||||
|
||||
void set_global_cursor_tracking(bool);
|
||||
bool global_cursor_tracking() const;
|
||||
|
@ -221,7 +221,7 @@ private:
|
|||
Rect m_relative_rect;
|
||||
Color m_background_color;
|
||||
Color m_foreground_color;
|
||||
RetainPtr<Font> m_font;
|
||||
RefPtr<Font> m_font;
|
||||
String m_tooltip;
|
||||
|
||||
SizePolicy m_horizontal_size_policy { SizePolicy::Fill };
|
||||
|
|
|
@ -593,7 +593,7 @@ void GWindow::flip(const Vector<Rect, 32>& dirty_rects)
|
|||
painter.blit(dirty_rect.location(), *m_front_bitmap, dirty_rect);
|
||||
}
|
||||
|
||||
Retained<GraphicsBitmap> GWindow::create_backing_bitmap(const Size& size)
|
||||
NonnullRefPtr<GraphicsBitmap> GWindow::create_backing_bitmap(const Size& size)
|
||||
{
|
||||
ASSERT(GEventLoop::server_pid());
|
||||
ASSERT(!size.is_empty());
|
||||
|
|
|
@ -135,12 +135,12 @@ private:
|
|||
|
||||
void collect_keyboard_activation_targets();
|
||||
|
||||
Retained<GraphicsBitmap> create_backing_bitmap(const Size&);
|
||||
NonnullRefPtr<GraphicsBitmap> create_backing_bitmap(const Size&);
|
||||
void set_current_backing_bitmap(GraphicsBitmap&, bool flush_immediately = false);
|
||||
void flip(const Vector<Rect, 32>& dirty_rects);
|
||||
|
||||
RetainPtr<GraphicsBitmap> m_front_bitmap;
|
||||
RetainPtr<GraphicsBitmap> m_back_bitmap;
|
||||
RefPtr<GraphicsBitmap> m_front_bitmap;
|
||||
RefPtr<GraphicsBitmap> m_back_bitmap;
|
||||
int m_window_id { 0 };
|
||||
float m_opacity_when_windowless { 1.0f };
|
||||
GWidget* m_main_widget { nullptr };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue