コード例 #1
0
ファイル: login.cpp プロジェクト: EyMenZ/NetSurf-OS3
void
LoginAlert::MessageReceived(BMessage *message)
{
	switch (message->what) {
	case 'ALTB':
	{
		int32 which;
		if (message->FindInt32("which", &which) < B_OK)
			break;
		// not 'Ok'
		if (which != 1)
			break;
		BMessage *m = new BMessage(*message);
		m->what = 'nsLO';
		m->AddPointer("URL", fUrl);
		m->AddString("Host", fHost.String());
		m->AddString("Realm", fRealm.String());
		m->AddPointer("callback", (void *)fCallback);
		m->AddPointer("callback_pw", (void *)fCallbackPw);
		m->AddString("User", fUserControl->Text());
		m->AddString("Pass", fPassControl->Text());
		BString auth(fUserControl->Text());
		auth << ":" << fPassControl->Text();
		m->AddString("Auth", auth.String());
		
		// notify the main thread
		// the event dispatcher will handle it
		nsbeos_pipe_message(m, NULL, NULL);
	}
		break;
	default:
		break;
	}
	BAlert::MessageReceived(message);
}
コード例 #2
0
ファイル: gui.cpp プロジェクト: Achal-Aggarwal/netsurf
bool
NSBrowserApplication::QuitRequested()
{
	// let it notice it
	nsbeos_pipe_message(new BMessage(B_QUIT_REQUESTED), NULL, NULL);
	// we'll let the main thread Quit() ourselves when it's done.
	return false;
}
コード例 #3
0
ファイル: window.cpp プロジェクト: pcwalton/NetSurf
void
NSBrowserFrameView::MouseMoved(BPoint where, uint32 transit, const BMessage *msg)
{
	if (transit != B_INSIDE_VIEW) {
		BView::MouseMoved(where, transit, msg);
		return;
	}
	BMessage *message = Window()->DetachCurrentMessage();
	nsbeos_pipe_message(message, this, fGuiWindow);
}
コード例 #4
0
ファイル: window.cpp プロジェクト: pcwalton/NetSurf
void
NSBrowserFrameView::FrameResized(float new_width, float new_height)
{
	BMessage *message = Window()->DetachCurrentMessage();
	// discard any other pending resize, 
	// so we don't end up processing them all, the last one matters.
	atomic_add(&fGuiWindow->pending_resizes, 1);
	nsbeos_pipe_message(message, this, fGuiWindow);
	BView::FrameResized(new_width, new_height);
}
コード例 #5
0
ファイル: window.cpp プロジェクト: pcwalton/NetSurf
void
NSBrowserFrameView::FrameMoved(BPoint new_location)
{
	BMessage *message = Window()->DetachCurrentMessage();
	// discard any other pending resize, 
	// so we don't end up processing them all, the last one matters.
	//atomic_add(&fGuiWindow->pending_resizes, 1);
	nsbeos_pipe_message(message, this, fGuiWindow);
	BView::FrameMoved(new_location);
}
コード例 #6
0
ファイル: window.cpp プロジェクト: pcwalton/NetSurf
void
NSBrowserFrameView::MouseDown(BPoint where)
{
	BMessage *message = Window()->DetachCurrentMessage();
	BPoint screenWhere;
	if (message->FindPoint("screen_where", &screenWhere) < B_OK) {
		screenWhere = ConvertToScreen(where);
		message->AddPoint("screen_where", screenWhere);
	}
	nsbeos_pipe_message(message, this, fGuiWindow);
}
コード例 #7
0
ファイル: window.cpp プロジェクト: pcwalton/NetSurf
void
NSBrowserFrameView::Draw(BRect updateRect)
{
	BMessage *message = NULL;
	//message = Window()->DetachCurrentMessage();
	// might be called directly...
	if (message == NULL)
		message = new BMessage(_UPDATE_);
	message->AddRect("rect", updateRect);
	nsbeos_pipe_message(message, this, fGuiWindow);
}
コード例 #8
0
ファイル: window.cpp プロジェクト: pcwalton/NetSurf
void
NSBrowserFrameView::KeyDown(const char *bytes, int32 numBytes)
{
	BMessage *message = Window()->DetachCurrentMessage();
	nsbeos_pipe_message(message, this, fGuiWindow);
}
コード例 #9
0
ファイル: gui.cpp プロジェクト: Achal-Aggarwal/netsurf
void
NSBrowserApplication::AboutRequested()
{
	nsbeos_pipe_message(new BMessage(B_ABOUT_REQUESTED), NULL, NULL);
}