mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 16:07:45 +00:00
LibCore: Move LibGUI/GNotifier to LibCore/CNotifier.
This commit is contained in:
parent
b2542414d7
commit
fc1d3074de
15 changed files with 53 additions and 53 deletions
|
@ -4,7 +4,7 @@
|
|||
#include "IRCLogBuffer.h"
|
||||
#include "IRCWindow.h"
|
||||
#include "IRCWindowListModel.h"
|
||||
#include <LibGUI/GNotifier.h>
|
||||
#include <LibCore/CNotifier.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
|
@ -47,8 +47,8 @@ void IRCClient::set_server(const String &hostname, int port)
|
|||
|
||||
void IRCClient::on_socket_connected()
|
||||
{
|
||||
m_notifier = make<GNotifier>(m_socket->fd(), GNotifier::Read);
|
||||
m_notifier->on_ready_to_read = [this] (GNotifier&) { receive_from_server(); };
|
||||
m_notifier = make<CNotifier>(m_socket->fd(), CNotifier::Read);
|
||||
m_notifier->on_ready_to_read = [this] { receive_from_server(); };
|
||||
|
||||
send_user();
|
||||
send_nick();
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
class IRCChannel;
|
||||
class IRCQuery;
|
||||
class IRCWindowListModel;
|
||||
class GNotifier;
|
||||
class CNotifier;
|
||||
|
||||
class IRCClient final : public CObject {
|
||||
friend class IRCChannel;
|
||||
|
@ -118,7 +118,7 @@ private:
|
|||
|
||||
String m_nickname;
|
||||
Vector<char> m_line_buffer;
|
||||
OwnPtr<GNotifier> m_notifier;
|
||||
OwnPtr<CNotifier> m_notifier;
|
||||
HashMap<String, RetainPtr<IRCChannel>> m_channels;
|
||||
HashMap<String, RetainPtr<IRCQuery>> m_queries;
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
Terminal::Terminal(int ptm_fd)
|
||||
: m_ptm_fd(ptm_fd)
|
||||
, m_notifier(ptm_fd, GNotifier::Read)
|
||||
, m_notifier(ptm_fd, CNotifier::Read)
|
||||
{
|
||||
m_cursor_blink_timer.set_interval(500);
|
||||
m_cursor_blink_timer.on_timeout = [this] {
|
||||
|
@ -28,9 +28,9 @@ Terminal::Terminal(int ptm_fd)
|
|||
};
|
||||
|
||||
set_font(Font::default_fixed_width_font());
|
||||
m_notifier.on_ready_to_read = [this] (GNotifier& notifier) {
|
||||
m_notifier.on_ready_to_read = [this]{
|
||||
byte buffer[BUFSIZ];
|
||||
ssize_t nread = read(notifier.fd(), buffer, sizeof(buffer));
|
||||
ssize_t nread = read(m_ptm_fd, buffer, sizeof(buffer));
|
||||
if (nread < 0) {
|
||||
dbgprintf("Terminal read error: %s\n", strerror(errno));
|
||||
perror("read(ptm)");
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include <SharedGraphics/GraphicsBitmap.h>
|
||||
#include <SharedGraphics/Rect.h>
|
||||
#include <LibGUI/GWidget.h>
|
||||
#include <LibGUI/GNotifier.h>
|
||||
#include <LibCore/CNotifier.h>
|
||||
#include <LibGUI/GTimer.h>
|
||||
|
||||
class Font;
|
||||
|
@ -152,7 +152,7 @@ private:
|
|||
bool m_in_active_window { false };
|
||||
bool m_need_full_flush { false };
|
||||
|
||||
GNotifier m_notifier;
|
||||
CNotifier m_notifier;
|
||||
|
||||
float m_opacity { 1 };
|
||||
bool m_needs_background_fill { true };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue