clean up (white spaces, spacing and parenthesis)
added a TODO about using kMaxWorkspaces in ScreenMode.cpp git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36242 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -231,6 +231,7 @@ ScreenMode::GetOriginalMode(screen_mode& mode, int32 workspace) const
|
||||
{
|
||||
if (workspace == ~0)
|
||||
workspace = current_workspace();
|
||||
// TODO this should use kMaxWorkspaces
|
||||
else if (workspace > 31)
|
||||
return B_BAD_INDEX;
|
||||
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
|
||||
|
||||
// prepare parameters so they recognized as tunneled settings
|
||||
static void PrepareTunnel(
|
||||
display_mode *mode, display_mode *low, display_mode *high )
|
||||
static void
|
||||
PrepareTunnel(display_mode *mode, display_mode *low, display_mode *high)
|
||||
{
|
||||
memset(mode, 0, sizeof(*mode));
|
||||
|
||||
@@ -36,8 +36,8 @@ static void PrepareTunnel(
|
||||
|
||||
|
||||
// retrieve value of setting "code"
|
||||
static status_t GetSetting(
|
||||
BScreen *screen, uint16 code, uint32 *setting )
|
||||
static status_t
|
||||
GetSetting(BScreen *screen, uint16 code, uint32 *setting)
|
||||
{
|
||||
display_mode mode, low, high;
|
||||
status_t result;
|
||||
@@ -62,8 +62,8 @@ static status_t GetSetting(
|
||||
|
||||
|
||||
// set setting "code" to "value"
|
||||
static status_t SetSetting(
|
||||
BScreen *screen, uint16 code, uint32 value )
|
||||
static status_t
|
||||
SetSetting(BScreen *screen, uint16 code, uint32 value)
|
||||
{
|
||||
display_mode mode, low, high;
|
||||
status_t result;
|
||||
@@ -83,8 +83,9 @@ static status_t SetSetting(
|
||||
|
||||
|
||||
// retrieve n-th supported value of setting "code"
|
||||
static status_t GetNthSupportedSetting(
|
||||
BScreen *screen, uint16 code, int32 idx, uint32 *setting )
|
||||
static status_t
|
||||
GetNthSupportedSetting(BScreen *screen, uint16 code, int32 idx,
|
||||
uint32 *setting)
|
||||
{
|
||||
display_mode mode, low, high;
|
||||
status_t result;
|
||||
@@ -110,8 +111,8 @@ static status_t GetNthSupportedSetting(
|
||||
|
||||
|
||||
// get current Swap Displays settings
|
||||
status_t GetSwapDisplays(
|
||||
BScreen *screen, bool *swap )
|
||||
status_t
|
||||
GetSwapDisplays(BScreen *screen, bool *swap)
|
||||
{
|
||||
status_t result;
|
||||
uint32 tmp;
|
||||
@@ -127,16 +128,16 @@ status_t GetSwapDisplays(
|
||||
|
||||
|
||||
// set "Swap Displays"
|
||||
status_t SetSwapDisplays(
|
||||
BScreen *screen, bool swap )
|
||||
status_t
|
||||
SetSwapDisplays(BScreen *screen, bool swap)
|
||||
{
|
||||
return SetSetting(screen, ms_swap, swap);
|
||||
}
|
||||
|
||||
|
||||
// get current "Use Laptop Panel" settings
|
||||
status_t GetUseLaptopPanel(
|
||||
BScreen *screen, bool *use )
|
||||
status_t
|
||||
GetUseLaptopPanel(BScreen *screen, bool *use)
|
||||
{
|
||||
status_t result;
|
||||
uint32 tmp;
|
||||
@@ -151,15 +152,16 @@ status_t GetUseLaptopPanel(
|
||||
|
||||
|
||||
// set "Use Laptop Panel"
|
||||
status_t SetUseLaptopPanel(
|
||||
BScreen *screen, bool use )
|
||||
status_t
|
||||
SetUseLaptopPanel(BScreen *screen, bool use)
|
||||
{
|
||||
return SetSetting(screen, ms_use_laptop_panel, use);
|
||||
}
|
||||
|
||||
|
||||
// get n-th supported TV standard
|
||||
status_t GetNthSupportedTVStandard( BScreen *screen, int idx, uint32 *standard )
|
||||
status_t
|
||||
GetNthSupportedTVStandard(BScreen *screen, int idx, uint32 *standard)
|
||||
{
|
||||
return GetNthSupportedSetting(
|
||||
screen, ms_tv_standard, (int32)idx, standard);
|
||||
@@ -167,14 +169,16 @@ status_t GetNthSupportedTVStandard( BScreen *screen, int idx, uint32 *standard )
|
||||
|
||||
|
||||
// get current TV Standard settings
|
||||
status_t GetTVStandard( BScreen *screen, uint32 *standard )
|
||||
status_t
|
||||
GetTVStandard(BScreen *screen, uint32 *standard)
|
||||
{
|
||||
return GetSetting(screen, ms_tv_standard, standard);
|
||||
}
|
||||
|
||||
|
||||
// set TV Standard
|
||||
status_t SetTVStandard( BScreen *screen, uint32 standard )
|
||||
status_t
|
||||
SetTVStandard(BScreen *screen, uint32 standard)
|
||||
{
|
||||
return SetSetting(screen, ms_tv_standard, standard);
|
||||
}
|
||||
|
||||
@@ -1,31 +1,29 @@
|
||||
|
||||
|
||||
#include "LEDAnimation.h"
|
||||
|
||||
#include <InterfaceDefs.h>
|
||||
|
||||
#define SNOOZE_TIME 150000
|
||||
#include <stdio.h>
|
||||
|
||||
/***********************************************************
|
||||
* Constructor
|
||||
***********************************************************/
|
||||
#define SNOOZE_TIME 150000
|
||||
|
||||
|
||||
LEDAnimation::LEDAnimation()
|
||||
:fThread(-1)
|
||||
,fRunning(false)
|
||||
,fOrigModifiers(::modifiers())
|
||||
:
|
||||
fThread(-1),
|
||||
fRunning(false),
|
||||
fOrigModifiers(::modifiers())
|
||||
{
|
||||
}
|
||||
|
||||
/***********************************************************
|
||||
* Destructor
|
||||
***********************************************************/
|
||||
|
||||
LEDAnimation::~LEDAnimation()
|
||||
{
|
||||
Stop();
|
||||
}
|
||||
|
||||
/***********************************************************
|
||||
* Start
|
||||
***********************************************************/
|
||||
|
||||
void
|
||||
LEDAnimation::Start()
|
||||
{
|
||||
@@ -40,9 +38,7 @@ LEDAnimation::Start()
|
||||
::resume_thread(fThread);
|
||||
}
|
||||
|
||||
/***********************************************************
|
||||
* Stop
|
||||
***********************************************************/
|
||||
|
||||
void
|
||||
LEDAnimation::Stop()
|
||||
{
|
||||
@@ -57,16 +53,13 @@ LEDAnimation::Stop()
|
||||
::set_keyboard_locks(fOrigModifiers);
|
||||
}
|
||||
|
||||
/***********************************************************
|
||||
* AnimationThread
|
||||
***********************************************************/
|
||||
|
||||
int32
|
||||
LEDAnimation::AnimationThread(void* data)
|
||||
{
|
||||
LEDAnimation *anim = (LEDAnimation*)data;
|
||||
|
||||
while (anim->fRunning)
|
||||
{
|
||||
while (anim->fRunning) {
|
||||
LED(B_NUM_LOCK,true);
|
||||
LED(B_NUM_LOCK,false);
|
||||
|
||||
@@ -83,9 +76,7 @@ LEDAnimation::AnimationThread(void* data)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/***********************************************************
|
||||
* LED
|
||||
***********************************************************/
|
||||
|
||||
void
|
||||
LEDAnimation::LED(uint32 mod,bool on)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user