Some cleanup, mostly GetHWInterface() to HWInterface().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15016 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
b43c728310
commit
8d8f5950d0
@ -70,7 +70,7 @@ class Desktop : public MessageLooper, public ScreenOwner {
|
||||
const ::VirtualScreen& VirtualScreen() const { return fVirtualScreen; }
|
||||
inline DrawingEngine* GetDrawingEngine() const
|
||||
{ return fVirtualScreen.DrawingEngine(); }
|
||||
inline HWInterface* GetHWInterface() const
|
||||
inline ::HWInterface* HWInterface() const
|
||||
{ return fVirtualScreen.HWInterface(); }
|
||||
|
||||
// Methods for layer(WinBorder) manipulation.
|
||||
|
@ -6,12 +6,7 @@
|
||||
* DarkWyrm <bpmagic@columbus.rr.com>
|
||||
* Adi Oanca <adioanca@gmail.com>
|
||||
* Stephan Aßmus <superstippi@gmx.de>
|
||||
*
|
||||
* Description:
|
||||
* Class used for tracking drawing context and screen clipping.
|
||||
* One Layer per client BWindow (WindowBorder) and each BView therein.
|
||||
*/
|
||||
|
||||
#ifndef _LAYER_H_
|
||||
#define _LAYER_H_
|
||||
|
||||
|
@ -147,9 +147,6 @@ friend class Desktop;
|
||||
|
||||
void _ProcessMouseMovedEvent(BMessage *msg);
|
||||
|
||||
inline HWInterface* GetHWInterface() const
|
||||
{ return fDesktop->GetHWInterface(); }
|
||||
|
||||
Desktop* fDesktop;
|
||||
BMessage* fDragMessage;
|
||||
Layer* fLastLayerUnderMouse;
|
||||
|
@ -298,10 +298,10 @@ ServerApp::Activate(bool value)
|
||||
|
||||
//! Sets the cursor to the application cursor, if any.
|
||||
void
|
||||
ServerApp::SetAppCursor(void)
|
||||
ServerApp::SetAppCursor()
|
||||
{
|
||||
if (fAppCursor)
|
||||
fDesktop->GetHWInterface()->SetCursor(fAppCursor);
|
||||
fDesktop->HWInterface()->SetCursor(fAppCursor);
|
||||
}
|
||||
|
||||
|
||||
@ -412,11 +412,8 @@ ServerApp::_DispatchMessage(int32 code, BPrivate::LinkReceiver& link)
|
||||
|
||||
// TODO: this should be done using notifications (so that an abandoned
|
||||
// stream will get noticed directly)
|
||||
if (fDesktop->EventDispatcher().InitCheck() != B_OK) {
|
||||
if (fDesktop->EventDispatcher().InitCheck() != B_OK)
|
||||
fDesktop->EventDispatcher().SetTo(gInputManager->GetStream());
|
||||
fDesktop->EventDispatcher().SetHWInterface(fDesktop->GetHWInterface());
|
||||
fDesktop->GetHWInterface()->SetCursorVisible(true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case AS_CREATE_WINDOW:
|
||||
@ -881,7 +878,7 @@ ServerApp::_DispatchMessage(int32 code, BPrivate::LinkReceiver& link)
|
||||
{
|
||||
STRACE(("ServerApp %s: Show Cursor\n", Signature()));
|
||||
// TODO: support nested showing/hiding
|
||||
fDesktop->GetHWInterface()->SetCursorVisible(true);
|
||||
fDesktop->HWInterface()->SetCursorVisible(true);
|
||||
fCursorHidden = false;
|
||||
break;
|
||||
}
|
||||
@ -889,7 +886,7 @@ ServerApp::_DispatchMessage(int32 code, BPrivate::LinkReceiver& link)
|
||||
{
|
||||
STRACE(("ServerApp %s: Hide Cursor\n", Signature()));
|
||||
// TODO: support nested showing/hiding
|
||||
fDesktop->GetHWInterface()->SetCursorVisible(false);
|
||||
fDesktop->HWInterface()->SetCursorVisible(false);
|
||||
fCursorHidden = true;
|
||||
break;
|
||||
}
|
||||
@ -897,7 +894,7 @@ ServerApp::_DispatchMessage(int32 code, BPrivate::LinkReceiver& link)
|
||||
{
|
||||
STRACE(("ServerApp %s: Obscure Cursor\n", Signature()));
|
||||
// ToDo: Enable ObscureCursor
|
||||
//fDesktop->GetHWInterface()->ObscureCursor();
|
||||
//fDesktop->HWInterface()->ObscureCursor();
|
||||
break;
|
||||
}
|
||||
case AS_QUERY_CURSOR_HIDDEN:
|
||||
@ -928,7 +925,7 @@ ServerApp::_DispatchMessage(int32 code, BPrivate::LinkReceiver& link)
|
||||
|
||||
// ToDo: These two should probably both be done in Desktop directly
|
||||
fDesktop->GetCursorManager().AddCursor(fAppCursor);
|
||||
fDesktop->GetHWInterface()->SetCursor(fAppCursor);
|
||||
fDesktop->HWInterface()->SetCursor(fAppCursor);
|
||||
break;
|
||||
}
|
||||
case AS_SET_CURSOR_BCURSOR:
|
||||
@ -946,7 +943,7 @@ ServerApp::_DispatchMessage(int32 code, BPrivate::LinkReceiver& link)
|
||||
|
||||
ServerCursor *cursor = fDesktop->GetCursorManager().FindCursor(ctoken);
|
||||
if (cursor)
|
||||
fDesktop->GetHWInterface()->SetCursor(cursor);
|
||||
fDesktop->HWInterface()->SetCursor(cursor);
|
||||
|
||||
if (sync) {
|
||||
// the application is expecting a reply, but plans to do literally nothing
|
||||
@ -2128,7 +2125,7 @@ ServerApp::_DispatchMessage(int32 code, BPrivate::LinkReceiver& link)
|
||||
link.Read<display_mode>(&target);
|
||||
link.Read<display_mode>(&low);
|
||||
link.Read<display_mode>(&high);
|
||||
status_t status = fDesktop->GetHWInterface()->ProposeMode(&target, &low, &high);
|
||||
status_t status = fDesktop->HWInterface()->ProposeMode(&target, &low, &high);
|
||||
|
||||
// ProposeMode() returns B_BAD_VALUE to hint that the candidate is
|
||||
// not within the given limits (but is supported)
|
||||
@ -2151,7 +2148,7 @@ ServerApp::_DispatchMessage(int32 code, BPrivate::LinkReceiver& link)
|
||||
|
||||
display_mode* modeList;
|
||||
uint32 count;
|
||||
status_t status = fDesktop->GetHWInterface()->GetModeList(&modeList, &count);
|
||||
status_t status = fDesktop->HWInterface()->GetModeList(&modeList, &count);
|
||||
if (status == B_OK) {
|
||||
fLink.StartMessage(B_OK);
|
||||
fLink.Attach<uint32>(count);
|
||||
@ -2225,7 +2222,7 @@ ServerApp::_DispatchMessage(int32 code, BPrivate::LinkReceiver& link)
|
||||
|
||||
accelerant_device_info accelerantInfo;
|
||||
// TODO: I wonder if there should be a "desktop" lock...
|
||||
status_t status = fDesktop->GetHWInterface()->GetDeviceInfo(&accelerantInfo);
|
||||
status_t status = fDesktop->HWInterface()->GetDeviceInfo(&accelerantInfo);
|
||||
if (status == B_OK) {
|
||||
fLink.StartMessage(B_OK);
|
||||
fLink.Attach<accelerant_device_info>(accelerantInfo);
|
||||
@ -2246,7 +2243,7 @@ ServerApp::_DispatchMessage(int32 code, BPrivate::LinkReceiver& link)
|
||||
|
||||
frame_buffer_config config;
|
||||
// TODO: I wonder if there should be a "desktop" lock...
|
||||
status_t status = fDesktop->GetHWInterface()->GetFrameBufferConfig(config);
|
||||
status_t status = fDesktop->HWInterface()->GetFrameBufferConfig(config);
|
||||
if (status == B_OK) {
|
||||
fLink.StartMessage(B_OK);
|
||||
fLink.Attach<frame_buffer_config>(config);
|
||||
@ -2265,7 +2262,7 @@ ServerApp::_DispatchMessage(int32 code, BPrivate::LinkReceiver& link)
|
||||
screen_id id;
|
||||
link.Read<screen_id>(&id);
|
||||
|
||||
sem_id semaphore = fDesktop->GetHWInterface()->RetraceSemaphore();
|
||||
sem_id semaphore = fDesktop->HWInterface()->RetraceSemaphore();
|
||||
fLink.StartMessage(semaphore);
|
||||
fLink.Flush();
|
||||
break;
|
||||
@ -2279,7 +2276,7 @@ ServerApp::_DispatchMessage(int32 code, BPrivate::LinkReceiver& link)
|
||||
link.Read<screen_id>(&id);
|
||||
|
||||
display_timing_constraints constraints;
|
||||
status_t status = fDesktop->GetHWInterface()->GetTimingConstraints(
|
||||
status_t status = fDesktop->HWInterface()->GetTimingConstraints(
|
||||
&constraints);
|
||||
if (status == B_OK) {
|
||||
fLink.StartMessage(B_OK);
|
||||
@ -2301,7 +2298,7 @@ ServerApp::_DispatchMessage(int32 code, BPrivate::LinkReceiver& link)
|
||||
link.Read<display_mode>(&mode);
|
||||
|
||||
uint32 low, high;
|
||||
status_t status = fDesktop->GetHWInterface()->GetPixelClockLimits(&mode,
|
||||
status_t status = fDesktop->HWInterface()->GetPixelClockLimits(&mode,
|
||||
&low, &high);
|
||||
if (status == B_OK) {
|
||||
fLink.StartMessage(B_OK);
|
||||
@ -2323,7 +2320,7 @@ ServerApp::_DispatchMessage(int32 code, BPrivate::LinkReceiver& link)
|
||||
uint32 mode;
|
||||
link.Read<uint32>(&mode);
|
||||
|
||||
status_t status = fDesktop->GetHWInterface()->SetDPMSMode(mode);
|
||||
status_t status = fDesktop->HWInterface()->SetDPMSMode(mode);
|
||||
fLink.StartMessage(status);
|
||||
|
||||
fLink.Flush();
|
||||
@ -2337,7 +2334,7 @@ ServerApp::_DispatchMessage(int32 code, BPrivate::LinkReceiver& link)
|
||||
screen_id id;
|
||||
link.Read<screen_id>(&id);
|
||||
|
||||
uint32 state = fDesktop->GetHWInterface()->DPMSMode();
|
||||
uint32 state = fDesktop->HWInterface()->DPMSMode();
|
||||
fLink.StartMessage(B_OK);
|
||||
fLink.Attach<uint32>(state);
|
||||
fLink.Flush();
|
||||
@ -2350,7 +2347,7 @@ ServerApp::_DispatchMessage(int32 code, BPrivate::LinkReceiver& link)
|
||||
screen_id id;
|
||||
link.Read<screen_id>(&id);
|
||||
|
||||
uint32 capabilities = fDesktop->GetHWInterface()->DPMSCapabilities();
|
||||
uint32 capabilities = fDesktop->HWInterface()->DPMSCapabilities();
|
||||
fLink.StartMessage(B_OK);
|
||||
fLink.Attach<uint32>(capabilities);
|
||||
fLink.Flush();
|
||||
|
@ -1,14 +1,13 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// Copyright (c) 2001-2005, Haiku, Inc. All rights reserved.
|
||||
// Distributed under the terms of the MIT license.
|
||||
//
|
||||
// File Name: ServerScreen.cpp
|
||||
// Author: Adi Oanca <adioanca@myrealbox.com>
|
||||
// Axel Dörfler, axeld@pinc-software.de
|
||||
// Stephan Aßmus, <superstippi@gmx.de>
|
||||
// Description: Handles individual screens
|
||||
//
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
* Copyright (c) 2001-2005, Haiku, Inc.
|
||||
* Distributed under the terms of the MIT license.
|
||||
*
|
||||
* Authors:
|
||||
* Adi Oanca <adioanca@myrealbox.com>
|
||||
* Axel Dörfler, axeld@pinc-software.de
|
||||
* Stephan Aßmus, <superstippi@gmx.de>
|
||||
*/
|
||||
|
||||
|
||||
#include <Accelerant.h>
|
||||
#include <Point.h>
|
||||
@ -23,13 +22,14 @@
|
||||
#include "ServerScreen.h"
|
||||
|
||||
|
||||
Screen::Screen(HWInterface *interface, int32 id)
|
||||
Screen::Screen(::HWInterface *interface, int32 id)
|
||||
: fID(id),
|
||||
fDriver(interface ? new DrawingEngine(interface) : NULL),
|
||||
fHWInterface(interface)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Screen::Screen()
|
||||
: fID(-1),
|
||||
fDriver(NULL),
|
||||
@ -180,7 +180,7 @@ Screen::_FindMode(uint16 width, uint16 height, uint32 colorspace,
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
// _FindMode
|
||||
|
||||
int32
|
||||
Screen::_FindMode(const display_mode* dm, uint32 count,
|
||||
uint16 width, uint16 height, uint32 colorspace,
|
||||
|
@ -1,26 +1,26 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// Copyright (c) 2001-2005, Haiku, Inc. All rights reserved.
|
||||
// Distributed under the terms of the MIT license.
|
||||
//
|
||||
// File Name: ServerScreen.h
|
||||
// Author: Adi Oanca <adioanca@myrealbox.com>
|
||||
// Axel Dörfler, axeld@pinc-software.de
|
||||
// Stephan Aßmus, <superstippi@gmx.de>
|
||||
// Description: Handles individual screens
|
||||
//
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
* Copyright (c) 2001-2005, Haiku, Inc.
|
||||
* Distributed under the terms of the MIT license.
|
||||
*
|
||||
* Authors:
|
||||
* Adi Oanca <adioanca@myrealbox.com>
|
||||
* Axel Dörfler, axeld@pinc-software.de
|
||||
* Stephan Aßmus, <superstippi@gmx.de>
|
||||
*/
|
||||
#ifndef _SCREEN_H_
|
||||
#define _SCREEN_H_
|
||||
|
||||
|
||||
#include <Accelerant.h>
|
||||
#include <Point.h>
|
||||
|
||||
|
||||
class DrawingEngine;
|
||||
class HWInterface;
|
||||
|
||||
class Screen {
|
||||
public:
|
||||
Screen(HWInterface *interface, int32 id);
|
||||
Screen(::HWInterface *interface, int32 id);
|
||||
Screen();
|
||||
virtual ~Screen();
|
||||
|
||||
@ -47,7 +47,7 @@ class Screen {
|
||||
|
||||
inline DrawingEngine* GetDrawingEngine() const
|
||||
{ return fDriver; }
|
||||
inline HWInterface* GetHWInterface() const
|
||||
inline ::HWInterface* HWInterface() const
|
||||
{ return fHWInterface; }
|
||||
|
||||
private:
|
||||
@ -64,7 +64,7 @@ class Screen {
|
||||
|
||||
int32 fID;
|
||||
DrawingEngine* fDriver;
|
||||
HWInterface* fHWInterface;
|
||||
::HWInterface* fHWInterface;
|
||||
};
|
||||
|
||||
#endif /* _SCREEN_H_ */
|
||||
|
@ -1583,7 +1583,7 @@ if (myRootLayer)
|
||||
// 1) BPoint mouse location
|
||||
// 2) int32 button state
|
||||
|
||||
fLink.Attach<BPoint>(fDesktop->GetHWInterface()->GetCursorPosition());
|
||||
fLink.Attach<BPoint>(fDesktop->HWInterface()->GetCursorPosition());
|
||||
fLink.Attach<int32>(fDesktop->ActiveRootLayer()->Buttons());
|
||||
|
||||
fLink.Flush();
|
||||
@ -2156,7 +2156,7 @@ ServerWindow::HandleDirectConnection(int bufferState, int driverState)
|
||||
|
||||
if ((bufferState & B_DIRECT_MODE_MASK) != B_DIRECT_STOP) {
|
||||
// TODO: Locking ?
|
||||
RenderingBuffer *buffer = fDesktop->GetHWInterface()->FrontBuffer();
|
||||
RenderingBuffer *buffer = fDesktop->HWInterface()->FrontBuffer();
|
||||
fDirectWindowData->direct_info->bits = buffer->Bits();
|
||||
fDirectWindowData->direct_info->pci_bits = NULL; // TODO
|
||||
fDirectWindowData->direct_info->bytes_per_row = buffer->BytesPerRow();
|
||||
|
@ -105,7 +105,7 @@ VirtualScreen::AddScreen(Screen* screen)
|
||||
|
||||
// TODO: this works only for single screen configurations
|
||||
fDrawingEngine = screen->GetDrawingEngine();
|
||||
fHWInterface = screen->GetHWInterface();
|
||||
fHWInterface = screen->HWInterface();
|
||||
fFrame = screen->Frame();
|
||||
|
||||
fScreenList.AddItem(item);
|
||||
|
Loading…
Reference in New Issue
Block a user