Merge remote-tracking branch 'upstream/master' into intel-extreme

This commit is contained in:
Alexander von Gluck IV
2016-02-19 10:17:42 -06:00
1091 changed files with 19459 additions and 26142 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2004-2015, Haiku, Inc. All Rights Reserved.
* Copyright 2004-2016, Haiku, Inc. All Rights Reserved.
* Copyright 2001 Dr. Zoidberg Enterprises. All rights reserved.
* Copyright 2011 Clemens Zeidler. All rights reserved.
*
@@ -70,11 +70,6 @@ public:
virtual void MessageReceived(BMessage* message);
// Mail storage operations
virtual status_t MoveMessage(const entry_ref& ref,
BDirectory& dir);
virtual status_t DeleteMessage(const entry_ref& ref);
// Convenience methods that call the BMailNotifier
void ShowError(const char* error);
void ShowMessage(const char* message);
@@ -136,13 +131,18 @@ public:
virtual void MessageReceived(BMessage* message);
virtual status_t SyncMessages() = 0;
virtual status_t FetchBody(const entry_ref& ref) = 0;
virtual status_t FetchBody(const entry_ref& ref,
BMessenger* replyTo);
virtual status_t MarkMessageAsRead(const entry_ref& ref,
read_flags flags = B_READ);
virtual status_t DeleteMessage(const entry_ref& ref) = 0;
virtual status_t AppendMessage(const entry_ref& ref);
static void ReplyBodyFetched(const BMessenger& replyTo,
const entry_ref& ref, status_t status);
protected:
virtual status_t HandleFetchBody(const entry_ref& ref,
const BMessenger& replyTo) = 0;
void NotiyMailboxSynchronized(status_t status);
};
+2 -4
View File
@@ -67,10 +67,8 @@ enum {
B_WORKSPACES_CHANGED = '_WCG',
B_WORKSPACE_ACTIVATED = '_WAC',
B_ZOOM = '_WZM',
_COLORS_UPDATED = '_CLU',
// Currently internal-use only. Later, public as B_COLORS_UPDATED
_FONTS_UPDATED = '_FNU',
// Currently internal-use only. Later, public as B_FONTS_UPDATED
B_COLORS_UPDATED = '_CLU',
B_FONTS_UPDATED = '_FNU',
_APP_MENU_ = '_AMN',
_BROWSER_MENUS_ = '_BRM',
_MENU_EVENT_ = '_MEV',
+16
View File
@@ -29,6 +29,7 @@ class BHandler;
class BString;
class BStringList;
struct entry_ref;
struct rgb_color;
// Name lengths and Scripting specifiers
@@ -154,6 +155,7 @@ public:
status_t AddBool(const char* name, bool value);
status_t AddFloat(const char* name, float value);
status_t AddDouble(const char* name, double value);
status_t AddColor(const char* name, rgb_color value);
status_t AddPointer(const char* name,
const void* pointer);
status_t AddMessenger(const char* name,
@@ -241,6 +243,10 @@ public:
double* value) const;
status_t FindDouble(const char* name, int32 index,
double* value) const;
status_t FindColor(const char* name,
rgb_color* value) const;
status_t FindColor(const char* name, int32 index,
rgb_color* value) const;
status_t FindPointer(const char* name,
void** pointer) const;
status_t FindPointer(const char* name, int32 index,
@@ -324,6 +330,10 @@ public:
status_t ReplaceDouble(const char* name, double value);
status_t ReplaceDouble(const char* name, int32 index,
double value);
status_t ReplaceColor(const char* name,
rgb_color value);
status_t ReplaceColor(const char* name, int32 index,
rgb_color value);
status_t ReplacePointer(const char* name,
const void* pointer);
status_t ReplacePointer(const char* name, int32 index,
@@ -379,6 +389,7 @@ public:
bool HasBool(const char* name, int32 n = 0) const;
bool HasFloat(const char* name, int32 n = 0) const;
bool HasDouble(const char* name, int32 n = 0) const;
bool HasColor(const char* name, int32 n = 0) const;
bool HasPointer(const char* name, int32 n = 0) const;
bool HasMessenger(const char* name,
int32 n = 0) const;
@@ -446,6 +457,10 @@ public:
double defaultValue) const;
double GetDouble(const char* name, int32 index,
double defaultValue) const;
rgb_color GetColor(const char* name,
rgb_color defaultValue) const;
rgb_color GetColor(const char* name, int32 index,
rgb_color defaultValue) const;
const char* GetString(const char* name,
const char* defaultValue = NULL) const;
const char* GetString(const char* name, int32 index,
@@ -477,6 +492,7 @@ public:
status_t SetUInt32(const char* name, uint32 value);
status_t SetInt64(const char* name, int64 value);
status_t SetUInt64(const char* name, uint64 value);
status_t SetColor(const char* name, rgb_color value);
status_t SetPointer(const char* name, const void* value);
status_t SetString(const char* name, const char* string);
status_t SetString(const char* name,
+3 -4
View File
@@ -24,12 +24,11 @@ public:
return (linkkey_t){{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
}
static char* ToString(const linkkey_t lk)
static BString ToString(const linkkey_t lk)
{
// TODO: not safe
static char str[50];
BString str;
sprintf(str, "%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:"
str.SetToFormat("%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:"
"%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X",
lk.l[0], lk.l[1], lk.l[2], lk.l[3], lk.l[4], lk.l[5],
lk.l[6], lk.l[7], lk.l[8], lk.l[9], lk.l[10], lk.l[11],
+5 -4
View File
@@ -9,6 +9,8 @@
#include <stdio.h>
#include <string.h>
#include <String.h>
#include <bluetooth/bluetooth.h>
namespace Bluetooth {
@@ -45,12 +47,11 @@ public:
memcpy(&dst, &src, sizeof(bdaddr_t));
}
static char* ToString(const bdaddr_t bdaddr)
static BString ToString(const bdaddr_t bdaddr)
{
// TODO: not safe
static char str[18];
BString str;
sprintf(str,"%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X",bdaddr.b[5],
str.SetToFormat("%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X",bdaddr.b[5],
bdaddr.b[4], bdaddr.b[3], bdaddr.b[2], bdaddr.b[1],
bdaddr.b[0]);
return str;
+2 -3
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2005-2013 Haiku, Inc. All Rights Reserved.
* Copyright 2005-2015 Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _BOX_H
@@ -12,8 +12,7 @@
class BBox : public BView {
public:
BBox(BRect frame, const char* name = NULL,
uint32 resizingMode = B_FOLLOW_LEFT
| B_FOLLOW_TOP,
uint32 resizingMode = B_FOLLOW_LEFT_TOP,
uint32 flags = B_WILL_DRAW | B_FRAME_EVENTS
| B_NAVIGABLE_JUMP,
border_style border = B_FANCY_BORDER);
+2 -3
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2001-2014 Haiku, Inc. All rights reserved.
* Copyright 2001-2015 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _BUTTON_H
@@ -20,8 +20,7 @@ public:
public:
BButton(BRect frame, const char* name,
const char* label, BMessage* message,
uint32 resizingMode
= B_FOLLOW_LEFT | B_FOLLOW_TOP,
uint32 resizingMode = B_FOLLOW_LEFT_TOP,
uint32 flags = B_WILL_DRAW | B_NAVIGABLE
| B_FULL_UPDATE_ON_RESIZE);
BButton(const char* name, const char* label,
+47
View File
@@ -0,0 +1,47 @@
/*
* Copyright 2015, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _CARD_VIEW_H
#define _CARD_VIEW_H
#include <View.h>
class BCardLayout;
class BCardView : public BView {
public:
BCardView();
BCardView(const char* name);
BCardView(BMessage* from);
virtual ~BCardView();
virtual void SetLayout(BLayout* layout);
BCardLayout* CardLayout() const;
static BArchivable* Instantiate(BMessage* from);
virtual status_t Perform(perform_code d, void* arg);
private:
// FBC padding - prevent breaking compatibility when methods are added
virtual void _ReservedCardView1();
virtual void _ReservedCardView2();
virtual void _ReservedCardView3();
virtual void _ReservedCardView4();
virtual void _ReservedCardView5();
virtual void _ReservedCardView6();
virtual void _ReservedCardView7();
virtual void _ReservedCardView8();
virtual void _ReservedCardView9();
virtual void _ReservedCardView10();
// forbitten methods
BCardView(const BCardView&);
void operator =(const BCardView&);
uint32 _reserved[10];
};
#endif // _CARD_VIEW_H
+2 -3
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2008-2009, Haiku, Inc. All rights reserved.
* Copyright 2008-2015, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _CHANNEL_CONTROL_H
@@ -18,8 +18,7 @@ public:
BChannelControl(BRect frame, const char* name,
const char* label, BMessage* model,
int32 channelCount = 1,
uint32 resizingMode
= B_FOLLOW_LEFT | B_FOLLOW_TOP,
uint32 resizingMode = B_FOLLOW_LEFT_TOP,
uint32 flags = B_WILL_DRAW);
BChannelControl(const char* name,
const char* label, BMessage* model,
+3 -5
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2009, Haiku, Inc. All rights reserved.
* Copyright 2009-2015, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _CHANNEL_SLIDER_H
@@ -14,15 +14,13 @@ public:
BChannelSlider(BRect area, const char* name,
const char* label, BMessage* message,
int32 channels = 1,
uint32 resizeMode
= B_FOLLOW_LEFT | B_FOLLOW_TOP,
uint32 resizeMode = B_FOLLOW_LEFT_TOP,
uint32 flags = B_WILL_DRAW);
BChannelSlider(BRect area, const char* name,
const char* label, BMessage* message,
orientation orientation,
int32 channels = 1,
uint32 resizeMode
= B_FOLLOW_LEFT | B_FOLLOW_TOP,
uint32 resizeMode = B_FOLLOW_LEFT_TOP,
uint32 flags = B_WILL_DRAW);
BChannelSlider(const char* name,
const char* label, BMessage* message,
+2 -3
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2001-2014 Haiku, Inc. All rights reserved.
* Copyright 2001-2015 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _CHECK_BOX_H
@@ -13,8 +13,7 @@ class BCheckBox : public BControl {
public:
BCheckBox(BRect frame, const char* name,
const char* label, BMessage* message,
uint32 resizingMode
= B_FOLLOW_LEFT | B_FOLLOW_TOP,
uint32 resizingMode = B_FOLLOW_LEFT_TOP,
uint32 flags = B_WILL_DRAW | B_NAVIGABLE);
BCheckBox(const char* name, const char* label,
BMessage* message, uint32 flags
+12 -6
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2009-2012, Haiku, Inc. All rights reserved.
* Copyright 2009-2015, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _CONTROL_LOOK_H
@@ -85,6 +85,7 @@ public:
B_PARTIALLY_ACTIVATED = 1 << 7, // like B_ACTIVATED, but for tri-state
B_FLAT = 1 << 8, // flat look (e.g. button background)
B_INVALID = 1 << 9, // invalid value, use B_FAILURE_COLOR
B_IS_CONTROL = 1 << 10, // use control colors
B_BLEND_FRAME = 1 << 16,
};
@@ -328,27 +329,32 @@ public:
/*virtual*/ void DrawLabel(BView* view, const char* label,
BRect rect, const BRect& updateRect,
const rgb_color& base, uint32 flags);
const rgb_color& base, uint32 flags,
const rgb_color* textColor = NULL);
virtual void DrawLabel(BView* view, const char* label,
BRect rect, const BRect& updateRect,
const rgb_color& base, uint32 flags,
const BAlignment& alignment);
const BAlignment& alignment,
const rgb_color* textColor = NULL);
// TODO: Would be nice to have a (non-virtual) version of this method
// which takes an array of labels and locations. That would save some
// setup with the view graphics state.
/*virtual*/ void DrawLabel(BView* view, const char* label,
const rgb_color& base, uint32 flags,
const BPoint& where);
const BPoint& where,
const rgb_color* textColor = NULL);
void DrawLabel(BView* view, const char* label,
const BBitmap* icon, BRect rect,
const BRect& updateRect,
const rgb_color& base, uint32 flags);
const rgb_color& base, uint32 flags,
const rgb_color* textColor = NULL);
virtual void DrawLabel(BView* view, const char* label,
const BBitmap* icon, BRect rect,
const BRect& updateRect,
const rgb_color& base, uint32 flags,
const BAlignment& alignment);
const BAlignment& alignment,
const rgb_color* textColor = NULL);
virtual void GetFrameInsets(frame_type frameType,
uint32 flags, float& _left, float& _top,
+8 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2008-2012 Haiku, Inc. All rights reserved.
* Copyright 2008-2015 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _GRAPHICS_DEFS_H
@@ -57,6 +57,8 @@ typedef struct rgb_color {
return *this;
}
int32 Brightness() const;
inline bool
operator==(const rgb_color& other) const
{
@@ -88,6 +90,11 @@ make_color(uint8 red, uint8 green, uint8 blue, uint8 alpha = 255)
#endif
rgb_color mix_color(rgb_color color1, rgb_color color2, uint8 amount);
rgb_color blend_color(rgb_color color1, rgb_color color2, uint8 amount);
rgb_color disable_color(rgb_color color, rgb_color background);
extern const rgb_color B_TRANSPARENT_COLOR;
extern const uint8 B_TRANSPARENT_MAGIC_CMAP8;
extern const uint16 B_TRANSPARENT_MAGIC_RGBA15;
+10
View File
@@ -11,6 +11,7 @@
class BBitmap;
class BMessage;
class BPoint;
class BRect;
@@ -296,6 +297,7 @@ enum bitmap_drawing_options {
// Default UI Colors
enum color_which {
B_NO_COLOR = 0,
B_PANEL_BACKGROUND_COLOR = 1,
B_PANEL_TEXT_COLOR = 10,
B_DOCUMENT_BACKGROUND_COLOR = 11,
@@ -310,6 +312,11 @@ enum color_which {
B_SHINE_COLOR = 18,
B_SHADOW_COLOR = 19,
B_LINK_TEXT_COLOR = 33,
B_LINK_HOVER_COLOR = 34,
B_LINK_VISITED_COLOR = 35,
B_LINK_ACTIVE_COLOR = 36,
B_MENU_BACKGROUND_COLOR = 2,
B_MENU_SELECTED_BACKGROUND_COLOR = 6,
B_MENU_ITEM_TEXT_COLOR = 7,
@@ -463,7 +470,10 @@ void set_accept_first_click(bool acceptFirstClick);
bool accept_first_click();
rgb_color ui_color(color_which which);
const char* ui_color_name(color_which which);
color_which which_ui_color(const char* name);
void set_ui_color(const color_which& which, const rgb_color& color);
void set_ui_colors(const BMessage* colors);
rgb_color tint_color(rgb_color color, float tint);
extern "C" status_t _init_interface_kit_();
+466 -10
View File
@@ -8,6 +8,8 @@
#include <new>
#include <CardLayout.h>
#include <CardView.h>
#include <GridLayout.h>
#include <GridView.h>
#include <GroupLayout.h>
@@ -27,6 +29,7 @@ template<typename ParentBuilder> class Base;
template<typename ParentBuilder = void*> class Group;
template<typename ParentBuilder = void*> class Grid;
template<typename ParentBuilder = void*> class Split;
template<typename ParentBuilder = void*> class Cards;
template<typename ParentBuilder = void*> class Menu;
template<typename ParentBuilder = void*> class MenuItem;
@@ -53,6 +56,7 @@ public:
typedef Group<ThisBuilder> GroupBuilder;
typedef Grid<ThisBuilder> GridBuilder;
typedef Split<ThisBuilder> SplitBuilder;
typedef Cards<ThisBuilder> CardBuilder;
public:
inline Group(orientation orientation = B_HORIZONTAL,
@@ -99,6 +103,12 @@ public:
inline SplitBuilder AddSplit(BSplitView* splitView,
float weight = 1.0f);
inline CardBuilder AddCards(float weight = 1.0f);
inline CardBuilder AddCards(BCardLayout* cardLayout,
float weight = 1.0f);
inline CardBuilder AddCards(BCardView* cardView,
float weight = 1.0f);
inline ThisBuilder& AddGlue(float weight = 1.0f);
inline ThisBuilder& AddStrut(float size);
@@ -126,6 +136,7 @@ public:
typedef Group<ThisBuilder> GroupBuilder;
typedef Grid<ThisBuilder> GridBuilder;
typedef Split<ThisBuilder> SplitBuilder;
typedef Cards<ThisBuilder> CardBuilder;
public:
inline Grid(float horizontal
@@ -192,6 +203,15 @@ public:
int32 row, int32 columnCount = 1,
int32 rowCount = 1);
inline CardBuilder AddCards(int32 column, int32 row,
int32 columnCount = 1, int32 rowCount = 1);
inline CardBuilder AddCards(BCardLayout* cardLayout, int32 column,
int32 row, int32 columnCount = 1,
int32 rowCount = 1);
inline CardBuilder AddCards(BCardView* cardView, int32 column,
int32 row, int32 columnCount = 1,
int32 rowCount = 1);
inline ThisBuilder& AddGlue(int32 column, int32 row,
int32 columnCount = 1, int32 rowCount = 1);
@@ -226,6 +246,7 @@ public:
typedef Group<ThisBuilder> GroupBuilder;
typedef Grid<ThisBuilder> GridBuilder;
typedef Split<ThisBuilder> SplitBuilder;
typedef Cards<ThisBuilder> CardBuilder;
public:
inline Split(orientation orientation = B_HORIZONTAL,
@@ -264,6 +285,12 @@ public:
inline SplitBuilder AddSplit(BSplitView* splitView,
float weight = 1.0f);
inline CardBuilder AddCards(float weight = 1.0f);
inline CardBuilder AddCards(BCardLayout* cardLayout,
float weight = 1.0f);
inline CardBuilder AddCards(BCardView* cardView,
float weight = 1.0f);
inline ThisBuilder& SetCollapsible(bool collapsible);
inline ThisBuilder& SetCollapsible(int32 index, bool collapsible);
inline ThisBuilder& SetCollapsible(int32 first, int32 last,
@@ -280,6 +307,62 @@ private:
BSplitView* fView;
};
template<typename ParentBuilder>
class Cards : public Base<ParentBuilder> {
public:
typedef Cards<ParentBuilder> ThisBuilder;
typedef Group<ThisBuilder> GroupBuilder;
typedef Grid<ThisBuilder> GridBuilder;
typedef Split<ThisBuilder> SplitBuilder;
typedef Cards<ThisBuilder> CardBuilder;
public:
inline Cards();
inline Cards(BWindow* window);
inline Cards(BView* view);
inline Cards(BCardLayout* layout);
inline Cards(BCardView* view);
inline BCardLayout* Layout() const;
inline BView* View() const;
inline ThisBuilder& GetLayout(BCardLayout** _layout);
inline ThisBuilder& GetView(BView** _view);
inline ThisBuilder& Add(BView* view);
inline ThisBuilder& Add(BLayoutItem* item);
inline GroupBuilder AddGroup(orientation orientation,
float spacing = B_USE_DEFAULT_SPACING);
inline GroupBuilder AddGroup(BGroupView* groupView);
inline GroupBuilder AddGroup(BGroupLayout* groupLayout);
inline GridBuilder AddGrid(float horizontal
= B_USE_DEFAULT_SPACING,
float vertical = B_USE_DEFAULT_SPACING);
inline GridBuilder AddGrid(BGridLayout* gridLayout);
inline GridBuilder AddGrid(BGridView* gridView);
inline SplitBuilder AddSplit(orientation orientation,
float spacing = B_USE_DEFAULT_SPACING);
inline SplitBuilder AddSplit(BSplitView* splitView);
inline CardBuilder AddCards();
inline CardBuilder AddCards(BCardLayout* cardLayout);
inline CardBuilder AddCards(BCardView* cardView);
inline ThisBuilder& SetExplicitMinSize(BSize size);
inline ThisBuilder& SetExplicitMaxSize(BSize size);
inline ThisBuilder& SetExplicitPreferredSize(BSize size);
inline ThisBuilder& SetExplicitAlignment(BAlignment alignment);
inline ThisBuilder& SetVisibleItem(int32 index);
inline operator BCardLayout*();
private:
BCardLayout* fLayout;
};
template<typename ParentBuilder>
class Menu : public Base<ParentBuilder> {
@@ -374,9 +457,7 @@ Group<ParentBuilder>::Group(BWindow* window, orientation orientation,
fLayout(new BGroupLayout(orientation, spacing))
{
window->SetLayout(fLayout);
fLayout->Owner()->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
// TODO: we get a white background if we don't do this
fLayout->Owner()->AdoptSystemColors();
}
@@ -386,9 +467,11 @@ Group<ParentBuilder>::Group(BView* view, orientation orientation,
:
fLayout(new BGroupLayout(orientation, spacing))
{
if (view->HasDefaultColors())
view->AdoptSystemColors();
view->SetLayout(fLayout);
view->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
// TODO: we get a white background if we don't do this
}
@@ -569,6 +652,39 @@ Group<ParentBuilder>::AddSplit(BSplitView* splitView, float weight)
}
template<typename ParentBuilder>
typename Group<ParentBuilder>::CardBuilder
Group<ParentBuilder>::AddCards(float weight)
{
CardBuilder builder;
builder.SetParent(this);
fLayout->AddView(builder.View(), weight);
return builder;
}
template<typename ParentBuilder>
typename Group<ParentBuilder>::CardBuilder
Group<ParentBuilder>::AddCards(BCardLayout* cardLayout, float weight)
{
CardBuilder builder(cardLayout);
builder.SetParent(this);
fLayout->AddView(builder.View(), weight);
return builder;
}
template<typename ParentBuilder>
typename Group<ParentBuilder>::CardBuilder
Group<ParentBuilder>::AddCards(BCardView* cardView, float weight)
{
CardBuilder builder(cardView);
builder.SetParent(this);
fLayout->AddView(builder.View(), weight);
return builder;
}
template<typename ParentBuilder>
typename Group<ParentBuilder>::ThisBuilder&
Group<ParentBuilder>::AddGlue(float weight)
@@ -680,9 +796,7 @@ Grid<ParentBuilder>::Grid(BWindow* window, float horizontalSpacing,
fLayout(new BGridLayout(horizontalSpacing, verticalSpacing))
{
window->SetLayout(fLayout);
fLayout->Owner()->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
// TODO: we get a white background if we don't do this
fLayout->Owner()->AdoptSystemColors();
}
@@ -692,9 +806,10 @@ Grid<ParentBuilder>::Grid(BView* view, float horizontalSpacing,
:
fLayout(new BGridLayout(horizontalSpacing, verticalSpacing))
{
if (view->HasDefaultColors())
view->AdoptSystemColors();
view->SetLayout(fLayout);
view->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
// TODO: we get a white background if we don't do this
}
@@ -884,6 +999,42 @@ Grid<ParentBuilder>::AddSplit(BSplitView* splitView, int32 column, int32 row,
}
template<typename ParentBuilder>
typename Grid<ParentBuilder>::CardBuilder
Grid<ParentBuilder>::AddCards(int32 column, int32 row, int32 columnCount,
int32 rowCount)
{
CardBuilder builder;
builder.SetParent(this);
fLayout->AddView(builder.View(), column, row, columnCount, rowCount);
return builder;
}
template<typename ParentBuilder>
typename Grid<ParentBuilder>::CardBuilder
Grid<ParentBuilder>::AddCards(BCardLayout* cardLayout, int32 column, int32 row,
int32 columnCount, int32 rowCount)
{
CardBuilder builder(cardLayout);
builder.SetParent(this);
fLayout->AddView(builder.View(), column, row, columnCount, rowCount);
return builder;
}
template<typename ParentBuilder>
typename Grid<ParentBuilder>::CardBuilder
Grid<ParentBuilder>::AddCards(BCardView* cardView, int32 column, int32 row,
int32 columnCount, int32 rowCount)
{
CardBuilder builder(cardView);
builder.SetParent(this);
fLayout->AddView(builder.View(), column, row, columnCount, rowCount);
return builder;
}
template<typename ParentBuilder>
typename Grid<ParentBuilder>::ThisBuilder&
Grid<ParentBuilder>::AddGlue(int32 column, int32 row, int32 columnCount,
@@ -1172,6 +1323,39 @@ Split<ParentBuilder>::AddSplit(orientation orientation, float spacing,
}
template<typename ParentBuilder>
typename Split<ParentBuilder>::CardBuilder
Split<ParentBuilder>::AddCards(float weight)
{
CardBuilder builder;
builder.SetParent(this);
fView->AddChild(builder.View(), weight);
return builder;
}
template<typename ParentBuilder>
typename Split<ParentBuilder>::CardBuilder
Split<ParentBuilder>::AddCards(BCardLayout* cardLayout, float weight)
{
CardBuilder builder(cardLayout);
builder.SetParent(this);
fView->AddChild(builder.View(), weight);
return builder;
}
template<typename ParentBuilder>
typename Split<ParentBuilder>::CardBuilder
Split<ParentBuilder>::AddCards(BCardView* cardView, float weight)
{
CardBuilder builder(cardView);
builder.SetParent(this);
fView->AddChild(builder.View(), weight);
return builder;
}
template<typename ParentBuilder>
typename Split<ParentBuilder>::ThisBuilder&
Split<ParentBuilder>::SetCollapsible(bool collapsible)
@@ -1234,6 +1418,278 @@ Split<ParentBuilder>::operator BSplitView*()
}
// #pragma mark - Cards
template<typename ParentBuilder>
Cards<ParentBuilder>::Cards()
:
fLayout((new BCardView())->CardLayout())
{
}
template<typename ParentBuilder>
Cards<ParentBuilder>::Cards(BWindow* window)
:
fLayout(new BCardLayout())
{
window->SetLayout(fLayout);
fLayout->Owner()->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
}
template<typename ParentBuilder>
Cards<ParentBuilder>::Cards(BView* view)
:
fLayout(new BCardLayout())
{
view->SetLayout(fLayout);
view->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
}
template<typename ParentBuilder>
Cards<ParentBuilder>::Cards(BCardLayout* layout)
:
fLayout(layout)
{
}
template<typename ParentBuilder>
Cards<ParentBuilder>::Cards(BCardView* view)
:
fLayout(view->CardLayout())
{
}
template<typename ParentBuilder>
BCardLayout*
Cards<ParentBuilder>::Layout() const
{
return fLayout;
}
template<typename ParentBuilder>
BView*
Cards<ParentBuilder>::View() const
{
return fLayout->Owner();
}
template<typename ParentBuilder>
typename Cards<ParentBuilder>::ThisBuilder&
Cards<ParentBuilder>::GetLayout(BCardLayout** _layout)
{
*_layout = fLayout;
return *this;
}
template<typename ParentBuilder>
typename Cards<ParentBuilder>::ThisBuilder&
Cards<ParentBuilder>::GetView(BView** _view)
{
*_view = fLayout->Owner();
return *this;
}
template<typename ParentBuilder>
typename Cards<ParentBuilder>::ThisBuilder&
Cards<ParentBuilder>::Add(BView* view)
{
fLayout->AddView(view);
return *this;
}
template<typename ParentBuilder>
typename Cards<ParentBuilder>::ThisBuilder&
Cards<ParentBuilder>::Add(BLayoutItem* item)
{
fLayout->AddItem(item);
return *this;
}
template<typename ParentBuilder>
typename Cards<ParentBuilder>::GroupBuilder
Cards<ParentBuilder>::AddGroup(orientation orientation, float spacing)
{
GroupBuilder builder(new BGroupLayout(orientation, spacing));
builder.SetParent(this);
fLayout->AddItem(builder.Layout());
return builder;
}
template<typename ParentBuilder>
typename Cards<ParentBuilder>::GroupBuilder
Cards<ParentBuilder>::AddGroup(BGroupView* groupView)
{
GroupBuilder builder(groupView);
builder.SetParent(this);
fLayout->AddItem(builder.Layout());
return builder;
}
template<typename ParentBuilder>
typename Cards<ParentBuilder>::GroupBuilder
Cards<ParentBuilder>::AddGroup(BGroupLayout* groupLayout)
{
GroupBuilder builder(groupLayout);
builder.SetParent(this);
fLayout->AddItem(builder.Layout());
return builder;
}
template<typename ParentBuilder>
typename Cards<ParentBuilder>::GridBuilder
Cards<ParentBuilder>::AddGrid(float horizontal, float vertical)
{
GridBuilder builder(horizontal, vertical);
builder.SetParent(this);
fLayout->AddItem(builder.Layout());
return builder;
}
template<typename ParentBuilder>
typename Cards<ParentBuilder>::GridBuilder
Cards<ParentBuilder>::AddGrid(BGridLayout* gridLayout)
{
GridBuilder builder(gridLayout);
builder.SetParent(this);
fLayout->AddItem(builder.Layout());
return builder;
}
template<typename ParentBuilder>
typename Cards<ParentBuilder>::GridBuilder
Cards<ParentBuilder>::AddGrid(BGridView* gridView)
{
GridBuilder builder(gridView);
builder.SetParent(this);
fLayout->AddItem(builder.Layout());
return builder;
}
template<typename ParentBuilder>
typename Cards<ParentBuilder>::SplitBuilder
Cards<ParentBuilder>::AddSplit(orientation orientation, float spacing)
{
SplitBuilder builder(orientation, spacing);
builder.SetParent(this);
fLayout->AddView(builder.View());
return builder;
}
template<typename ParentBuilder>
typename Cards<ParentBuilder>::SplitBuilder
Cards<ParentBuilder>::AddSplit(BSplitView* splitView)
{
SplitBuilder builder(splitView);
builder.SetParent(this);
fLayout->AddView(builder.View());
return builder;
}
template<typename ParentBuilder>
typename Cards<ParentBuilder>::CardBuilder
Cards<ParentBuilder>::AddCards()
{
CardBuilder builder;
builder.SetParent(this);
fLayout->AddView(builder.View());
return builder;
}
template<typename ParentBuilder>
typename Cards<ParentBuilder>::CardBuilder
Cards<ParentBuilder>::AddCards(BCardLayout* cardLayout)
{
CardBuilder builder(cardLayout);
builder.SetParent(this);
fLayout->AddView(builder.View());
return builder;
}
template<typename ParentBuilder>
typename Cards<ParentBuilder>::CardBuilder
Cards<ParentBuilder>::AddCards(BCardView* cardView)
{
CardBuilder builder(cardView);
builder.SetParent(this);
fLayout->AddView(builder.View());
return builder;
}
template<typename ParentBuilder>
typename Cards<ParentBuilder>::ThisBuilder&
Cards<ParentBuilder>::SetExplicitMinSize(BSize size)
{
fLayout->SetExplicitMinSize(size);
return *this;
}
template<typename ParentBuilder>
typename Cards<ParentBuilder>::ThisBuilder&
Cards<ParentBuilder>::SetExplicitMaxSize(BSize size)
{
fLayout->SetExplicitMaxSize(size);
return *this;
}
template<typename ParentBuilder>
typename Cards<ParentBuilder>::ThisBuilder&
Cards<ParentBuilder>::SetExplicitPreferredSize(BSize size)
{
fLayout->SetExplicitPreferredSize(size);
return *this;
}
template<typename ParentBuilder>
typename Cards<ParentBuilder>::ThisBuilder&
Cards<ParentBuilder>::SetExplicitAlignment(BAlignment alignment)
{
fLayout->SetExplicitAlignment(alignment);
return *this;
}
template<typename ParentBuilder>
typename Cards<ParentBuilder>::ThisBuilder&
Cards<ParentBuilder>::SetVisibleItem(int32 item)
{
fLayout->SetVisibleItem(item);
return *this;
}
template<typename ParentBuilder>
Cards<ParentBuilder>::operator BCardLayout*()
{
return fLayout;
}
// #pragma mark - Menu
+2 -3
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2013 Haiku, Inc. All rights reserved.
* Copyright 2002-2015 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _LIST_VIEW_H
@@ -26,8 +26,7 @@ public:
BListView(BRect frame, const char* name,
list_view_type type
= B_SINGLE_SELECTION_LIST,
uint32 resizeMask = B_FOLLOW_LEFT
| B_FOLLOW_TOP,
uint32 resizeMask = B_FOLLOW_LEFT_TOP,
uint32 flags = B_WILL_DRAW
| B_FRAME_EVENTS | B_NAVIGABLE);
BListView(const char* name,
+3 -5
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2006-2013, Haiku, Inc. All rights reserved.
* Copyright 2006-2015, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _MENU_FIELD_H
@@ -17,14 +17,12 @@ class BMenuField : public BView {
public:
BMenuField(BRect frame, const char* name,
const char* label, BMenu* menu,
uint32 resizingMode = B_FOLLOW_LEFT
| B_FOLLOW_TOP,
uint32 resizingMode = B_FOLLOW_LEFT_TOP,
uint32 flags = B_WILL_DRAW | B_NAVIGABLE);
BMenuField(BRect frame, const char* name,
const char* label, BMenu* menu,
bool fixed_size,
uint32 resizingMode = B_FOLLOW_LEFT
| B_FOLLOW_TOP,
uint32 resizingMode = B_FOLLOW_LEFT_TOP,
uint32 flags = B_WILL_DRAW | B_NAVIGABLE);
BMenuField(const char* name,
const char* label, BMenu* menu,
+2 -3
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2009, Haiku, Inc. All rights reserved.
* Copyright 2015, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _MULTI_CHANNEL_CONTROL_H
@@ -14,8 +14,7 @@ public:
BMultiChannelControl(BRect frame,
const char* name, const char* label,
BMessage* message, int32 channelCount = 1,
uint32 resize = B_FOLLOW_LEFT
| B_FOLLOW_TOP,
uint32 resize = B_FOLLOW_LEFT_TOP,
uint32 flags = B_WILL_DRAW);
BMultiChannelControl(BMessage* archive);
virtual ~BMultiChannelControl();
+2 -3
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2001-2009, Haiku, Inc. All rights reserved.
* Copyright 2001-2015, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _OPTION_CONTROL_H
@@ -18,8 +18,7 @@ class BOptionControl : public BControl {
public:
BOptionControl(BRect frame, const char* name,
const char* label, BMessage* message,
uint32 resizeMask = B_FOLLOW_LEFT
| B_FOLLOW_TOP,
uint32 resizeMask = B_FOLLOW_LEFT_TOP,
uint32 flags = B_WILL_DRAW);
BOptionControl(const char* name,
const char* label, BMessage* message,
+3 -4
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2001-2009, Haiku, Inc. All rights reserved.
* Copyright 2001-2015, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _OPTION_POP_UP_H
@@ -16,13 +16,12 @@ class BOptionPopUp : public BOptionControl {
public:
BOptionPopUp(BRect frame, const char* name,
const char* label, BMessage* message,
uint32 resizeMask = B_FOLLOW_LEFT
| B_FOLLOW_TOP,
uint32 resizeMask = B_FOLLOW_LEFT_TOP,
uint32 flags = B_WILL_DRAW);
BOptionPopUp(BRect frame, const char* name,
const char* label, BMessage* message,
bool fixed, uint32 resizeMask
= B_FOLLOW_LEFT | B_FOLLOW_TOP,
= B_FOLLOW_LEFT_TOP,
uint32 flags = B_WILL_DRAW);
BOptionPopUp(const char* name,
const char* label, BMessage* message,
+2 -3
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2006-2013, Haiku, Inc. All rights reserved.
* Copyright 2006-2015, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _OUTLINE_LIST_VIEW_H
@@ -14,8 +14,7 @@ public:
BOutlineListView(BRect frame, const char* name,
list_view_type type
= B_SINGLE_SELECTION_LIST,
uint32 resizingMode
= B_FOLLOW_LEFT | B_FOLLOW_TOP,
uint32 resizingMode = B_FOLLOW_LEFT_TOP,
uint32 flags = B_WILL_DRAW
| B_FRAME_EVENTS | B_NAVIGABLE);
BOutlineListView(const char* name,
+2 -3
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2001-2008, Haiku, Inc. All rights reserved.
* Copyright 2001-2015, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _PICTURE_BUTTON_H
@@ -22,8 +22,7 @@ public:
BPicture* off, BPicture* on,
BMessage* message,
uint32 behavior = B_ONE_STATE_BUTTON,
uint32 resizingMode = B_FOLLOW_LEFT
| B_FOLLOW_TOP,
uint32 resizingMode = B_FOLLOW_LEFT_TOP,
uint32 flgs = B_WILL_DRAW | B_NAVIGABLE);
BPictureButton(BMessage* archive);
+2 -3
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2001-2008, Haiku, Inc. All rights reserved.
* Copyright 2001-2015, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _RADIO_BUTTON_H
@@ -14,8 +14,7 @@ class BRadioButton : public BControl {
public:
BRadioButton(BRect frame, const char* name,
const char* label, BMessage* message,
uint32 resizingMode
= B_FOLLOW_LEFT | B_FOLLOW_TOP,
uint32 resizingMode = B_FOLLOW_LEFT_TOP,
uint32 flags = B_WILL_DRAW | B_NAVIGABLE);
BRadioButton(const char* name,
const char* label, BMessage* message,
+1 -2
View File
@@ -15,8 +15,7 @@
class BScrollView : public BView {
public:
BScrollView(const char* name, BView* target,
uint32 resizingMode
= B_FOLLOW_LEFT | B_FOLLOW_TOP,
uint32 resizingMode = B_FOLLOW_LEFT_TOP,
uint32 flags = 0, bool horizontal = false,
bool vertical = false,
border_style border = B_FANCY_BORDER);
+3 -5
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2001-2013, Haiku, Inc. All rights reserved.
* Copyright 2001-2015, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _SLIDER_H
@@ -30,8 +30,7 @@ public:
const char* label, BMessage* message,
int32 minValue, int32 maxValue,
thumb_style thumbType = B_BLOCK_THUMB,
uint32 resizingMode
= B_FOLLOW_LEFT | B_FOLLOW_TOP,
uint32 resizingMode = B_FOLLOW_LEFT_TOP,
uint32 flags = B_NAVIGABLE | B_WILL_DRAW
| B_FRAME_EVENTS);
@@ -40,8 +39,7 @@ public:
int32 minValue, int32 maxValue,
orientation posture,
thumb_style thumbType = B_BLOCK_THUMB,
uint32 resizingMode
= B_FOLLOW_LEFT | B_FOLLOW_TOP,
uint32 resizingMode = B_FOLLOW_LEFT_TOP,
uint32 flags = B_NAVIGABLE | B_WILL_DRAW
| B_FRAME_EVENTS);
+2 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2006-2010, Haiku, Inc. All rights reserved.
* Copyright 2006-2015, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _SPLIT_VIEW_H
@@ -61,6 +61,7 @@ public:
bool AddChild(int32 index, BLayoutItem* child,
float weight);
virtual void AttachedToWindow();
virtual void Draw(BRect updateRect);
virtual void DrawAfterChildren(BRect updateRect);
virtual void MouseDown(BPoint where);
+3 -2
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2006-2009, Haiku, Inc. All rights reserved.
* Copyright 2006-2015, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _STATUS_BAR_H
@@ -110,8 +110,9 @@ private:
float fTextDivider;
rgb_color fBarColor;
bool fCustomBarHeight;
uint32 fInternalFlags;
uint32 _reserved[5];
uint32 _reserved[4];
};
#endif // _STATUS_BAR_H
+1 -1
View File
@@ -13,7 +13,7 @@ class BStringView : public BView {
public:
BStringView(BRect frame, const char* name,
const char* text, uint32 resizingMode
= B_FOLLOW_LEFT | B_FOLLOW_TOP,
= B_FOLLOW_LEFT_TOP,
uint32 flags = B_WILL_DRAW);
BStringView(const char* name, const char* text,
uint32 flags = B_WILL_DRAW);
+1 -2
View File
@@ -21,8 +21,7 @@ public:
BTextControl(BRect frame, const char* name,
const char* label, const char* initialText,
BMessage* message,
uint32 resizeMask
= B_FOLLOW_LEFT | B_FOLLOW_TOP,
uint32 resizeMask = B_FOLLOW_LEFT_TOP,
uint32 flags = B_WILL_DRAW | B_NAVIGABLE);
BTextControl(const char* name,
const char* label, const char* initialText,
+28 -8
View File
@@ -107,6 +107,7 @@ inline uint32 _rule_(uint32 r1, uint32 r2, uint32 r3, uint32 r4)
#define B_FOLLOW_TOP_BOTTOM _rule_(_VIEW_TOP_, 0, _VIEW_BOTTOM_, 0)
#define B_FOLLOW_V_CENTER _rule_(_VIEW_CENTER_, 0, _VIEW_CENTER_, 0)
#define B_FOLLOW_LEFT_TOP B_FOLLOW_TOP | B_FOLLOW_LEFT
class BBitmap;
class BCursor;
@@ -242,32 +243,38 @@ public:
void SetViewCursor(const BCursor* cursor,
bool sync = true);
bool HasDefaultColors() const;
bool HasSystemColors() const;
void AdoptParentColors();
void AdoptSystemColors();
void AdoptViewColors(BView* view);
virtual void SetViewColor(rgb_color color);
void SetViewColor(uchar red, uchar green, uchar blue,
uchar alpha = 255);
rgb_color ViewColor() const;
void SetViewUIColor(color_which which,
float tint = B_NO_TINT);
color_which ViewUIColor(float* tint = NULL) const;
void SetViewBitmap(const BBitmap* bitmap,
BRect srcRect, BRect dstRect,
uint32 followFlags
= B_FOLLOW_TOP | B_FOLLOW_LEFT,
uint32 followFlags = B_FOLLOW_LEFT_TOP,
uint32 options = B_TILE_BITMAP);
void SetViewBitmap(const BBitmap* bitmap,
uint32 followFlags
= B_FOLLOW_TOP | B_FOLLOW_LEFT,
uint32 followFlags = B_FOLLOW_LEFT_TOP,
uint32 options = B_TILE_BITMAP);
void ClearViewBitmap();
status_t SetViewOverlay(const BBitmap* overlay,
BRect srcRect, BRect dstRect,
rgb_color* colorKey,
uint32 followFlags
= B_FOLLOW_TOP | B_FOLLOW_LEFT,
uint32 followFlags = B_FOLLOW_LEFT_TOP,
uint32 options = 0);
status_t SetViewOverlay(const BBitmap* overlay,
rgb_color* colorKey,
uint32 followFlags
= B_FOLLOW_TOP | B_FOLLOW_LEFT,
uint32 followFlags = B_FOLLOW_LEFT_TOP,
uint32 options = 0);
void ClearViewOverlay();
@@ -276,11 +283,19 @@ public:
uchar alpha = 255);
rgb_color HighColor() const;
void SetHighUIColor(color_which which,
float tint = B_NO_TINT);
color_which HighUIColor(float* tint = NULL) const;
virtual void SetLowColor(rgb_color color);
void SetLowColor(uchar red, uchar green, uchar blue,
uchar alpha = 255);
rgb_color LowColor() const;
void SetLowUIColor(color_which which,
float tint = B_NO_TINT);
color_which LowUIColor(float* tint = NULL) const;
void SetLineMode(cap_mode lineCap,
join_mode lineJoin,
float miterLimit = B_DEFAULT_MITER_LIMIT);
@@ -495,6 +510,9 @@ public:
void Invalidate(BRect invalRect);
void Invalidate(const BRegion* invalRegion);
void Invalidate();
void DelayedInvalidate(bigtime_t delay);
void DelayedInvalidate(bigtime_t delay,
BRect invalRect);
void SetDiskMode(char* filename, long offset);
@@ -691,9 +709,11 @@ private:
void _Activate(bool state);
void _Attach();
void _ColorsUpdated(BMessage* message);
void _Detach();
void _Draw(BRect screenUpdateRect);
void _DrawAfterChildren(BRect screenUpdateRect);
void _FontsUpdated(BMessage*);
void _Pulse();
void _UpdateStateForRemove();
+1 -1
View File
@@ -272,7 +272,7 @@ public:
void InvalidateLayout(bool descendants = false);
void Layout(bool force);
bool IsOffscreenWindow() const;
private:
// FBC padding and forbidden methods
virtual void _ReservedWindow2();
+2 -1
View File
@@ -38,8 +38,9 @@ struct media_timed_event {
int32 data;
int64 bigdata;
char user_data[64];
bigtime_t enqueue_time;
uint32 _reserved_media_timed_event_[8];
uint32 _reserved_media_timed_event_[6];
};
+2 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2015, Haiku, Inc. All Rights Reserved.
* Copyright 2015-2016, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
@@ -27,6 +27,7 @@ enum {
B_GET_LAUNCH_DATA = 'lnda',
B_LAUNCH_TARGET = 'lntg',
B_LAUNCH_JOB = 'lnjo',
B_ENABLE_LAUNCH_JOB = 'lnje',
B_STOP_LAUNCH_JOB = 'lnsj',
B_LAUNCH_SESSION = 'lnse',
B_REGISTER_SESSION_DAEMON = 'lnrs',
+2 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2015 Haiku, Inc. All rights reserved.
* Copyright 2015-2016 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _LAUNCH_ROSTER_H
@@ -36,6 +36,7 @@ public:
status_t Start(const char* name);
status_t Stop(const char* name, bool force = false);
status_t SetEnabled(const char* name, bool enabled);
status_t StartSession(const char* login);
+11
View File
@@ -293,11 +293,18 @@ enum {
AS_VIEW_SET_PEN_SIZE,
AS_VIEW_GET_PEN_SIZE,
AS_VIEW_SET_HIGH_COLOR,
AS_VIEW_SET_HIGH_UI_COLOR,
AS_VIEW_SET_LOW_COLOR,
AS_VIEW_SET_LOW_UI_COLOR,
AS_VIEW_SET_VIEW_COLOR,
AS_VIEW_SET_VIEW_UI_COLOR,
AS_VIEW_GET_HIGH_COLOR,
AS_VIEW_GET_HIGH_UI_COLOR,
AS_VIEW_GET_LOW_COLOR,
AS_VIEW_GET_LOW_UI_COLOR,
AS_VIEW_GET_VIEW_COLOR,
AS_VIEW_GET_VIEW_UI_COLOR,
AS_VIEW_PRINT_ALIASING,
AS_VIEW_CLIP_TO_PICTURE,
AS_VIEW_GET_CLIP_REGION,
@@ -314,6 +321,7 @@ enum {
AS_VIEW_COPY_BITS,
AS_VIEW_DRAW_PICTURE,
AS_VIEW_INVALIDATE_RECT,
AS_VIEW_DELAYED_INVALIDATE_RECT,
AS_VIEW_INVALIDATE_REGION,
AS_VIEW_INVERT_RECT,
AS_VIEW_MOVE_TO,
@@ -355,6 +363,9 @@ enum {
AS_VIEW_CLIP_TO_RECT,
AS_VIEW_CLIP_TO_SHAPE,
// Internal messages
AS_COLOR_MAP_UPDATED,
AS_LAST_CODE
};
@@ -18,6 +18,10 @@ struct ViewSetStateInfo {
float penSize;
rgb_color highColor;
rgb_color lowColor;
color_which whichHighColor;
color_which whichLowColor;
float whichHighColorTint;
float whichLowColorTint;
::pattern pattern;
drawing_mode drawingMode;
BPoint origin;
+5 -5
View File
@@ -13,11 +13,11 @@
#include <InterfaceDefs.h>
// Update this constant with the largest color constant excluding
// B_SUCCESS_COLOR and B_FAILURE_COLOR.
// If you add a constant with index greater than 100 you'll have to add
// to the second operand.
static const int32 kColorWhichCount = B_SCROLL_BAR_THUMB_COLOR + 3;
// Update kColorWhichLastContinuous with the largest color constant which
// leaves no gaps in the color_which integer values.
static const int32 kColorWhichLastContinuous = B_LINK_ACTIVE_COLOR;
static const int32 kColorWhichCount = kColorWhichLastContinuous + 3;
// + 1 for index-offset, + 2 for B_SUCCESS_COLOR, B_FAILURE_COLOR
struct server_read_only_memory {
+1 -1
View File
@@ -27,7 +27,7 @@ public:
PincodeWindow(RemoteDevice* rDevice);
virtual void MessageReceived(BMessage *msg);
virtual bool QuitRequested();
void SetBDaddr(const char* address);
void SetBDaddr(BString address);
private:
void InitUI();
@@ -5,7 +5,7 @@
Other authors:
Mark Watson;
Apsed;
Rudolf Cornelissen 10/2002-10/2009.
Rudolf Cornelissen 10/2002-1/2016.
*/
#ifndef DRIVERINTERFACE_H
@@ -63,6 +63,20 @@ typedef struct {
#define TV_VIDEO (1<<12)
#define TV_PRIMARY (1<<13)
/* additional timing flags for GetMode/SetMode for Haiku ScreenPrefs panel */
enum {
RADEON_MODE_MULTIMON_REQUEST = 1 << 25,
RADEON_MODE_MULTIMON_REPLY = 1 << 26
};
/* operation codes tunneled via ProposeDisplayMode for Haiku ScreenPrefs panel */
typedef enum {
ms_swap = 'sw',
ms_use_laptop_panel = 'up',
ms_tv_standard = 'tv'
} multi_mon_settings;
#define SKD_MOVE_CURSOR 0x00000001
#define SKD_PROGRAM_CLUT 0x00000002
#define SKD_SET_START_ADDR 0x00000004
@@ -231,6 +245,7 @@ typedef struct { // apsed, see comments in nvidia.settings
bool block_acc;
uint32 gpu_clk;
uint32 ram_clk;
bool check_edid;
} nv_settings;
/* monitor info gathered via EDID */
@@ -306,6 +321,8 @@ typedef struct {
bool acc_mode; /* signals (non)accelerated mode */
bool interlaced_tv_mode;/* signals interlaced CRTC TV output mode */
bool crtc_switch_mode; /* signals dualhead switch mode if panels are used */
bool haiku_prefs_used; /* signals use of Haiku ScreenPrefs app for special modes */
bool Haiku_switch_head; /* signals Haiku ScreenPrefs panel want inverted mode later on */
/*frame buffer config - for BDirectScreen*/
frame_buffer_config fbc; /* bytes_per_row and start of frame buffer: head1 */
@@ -5,7 +5,7 @@
Other authors:
Mark Watson;
Apsed;
Rudolf Cornelissen 10/2002-9/2005.
Rudolf Cornelissen 10/2002-1/2016.
*/
#ifndef DRIVERINTERFACE_H
@@ -174,12 +174,12 @@ typedef struct {
/* card info - information gathered from PINS (and other sources) */
enum
{ // card_type in order of date of VIA chip design (fixme: check order)
CLE3122 = 0,
CLE3022,
VT3122 = 0,
VT3022,
VT7205,
VT3205,
VT7204,
VT3204,
VT3108,
VT3204NC,
NV04,
NV05,
NV05M64,
+13 -9
View File
@@ -653,13 +653,16 @@
#define ENSEQX_MSIZE_CLE266 0x34
#define ENSEQX_MSIZE_OTHER 0x39
#define ENSEQX_PLL_RESET 0x40
#define ENSEQX_0x44 0x44
#define ENSEQX_0x45 0x45
#define ENSEQX_PPLL_P_OTH 0x44
#define ENSEQX_PPLL_M_OTH 0x45
#define ENSEQX_PPLL_N_OTH 0x46
#define ENSEQX_PPLL2_MP_CLE 0x44
#define ENSEQX_PPLL2_N_CLE 0x45
#define ENSEQX_PPLL_N_OTH 0x44
#define ENSEQX_PPLL_P_OTH 0x45
#define ENSEQX_PPLL_M_OTH 0x46
#define ENSEQX_PPLL_MP_CLE 0x46
#define ENSEQX_PPLL_N_CLE 0x47
#define ENSEQX_PPLL2_N_OTH 0x4a
#define ENSEQX_PPLL2_P_OTH 0x4b
#define ENSEQX_PPLL2_M_OTH 0x4c
/* VIA GRAPHICS indexed registers */
/* VGA standard registers: */
@@ -702,6 +705,7 @@
#define ENBES_HI_TRANSP_COL 0x00000270
#define ENBES_V3A_FIFO 0x00000278
#define ENBES_V3_SRC_WIDTH 0x0000027c
#define ENBES_V3_COLKEY 0x00000280
#define ENBES_VID1_COLSPAC1 0x00000284
#define ENBES_VID1_COLSPAC2 0x00000288
#define ENBES_VID1U_ADDR0 0x0000028c
@@ -711,14 +715,14 @@
#define ENBES_VID3_CTL 0x000002a0
#define ENBES_VID3_ADDR0 0x000002a4
#define ENBES_VID3_ADDR1 0x000002a8
#define ENBES_VID3_STRIBE 0x000002ac
#define ENBES_VID3_STRIDE 0x000002ac
#define ENBES_VID3_HVSTART 0x000002b0
#define ENBES_VID3_SIZE 0x000002b4
#define ENBES_V3A_FETCH 0x000002b8
#define ENBES_VID3_ZOOM 0x000002bc
#define ENBES_VID3_MICTL 0x000002c0
#define ENBES_VID3_CSC1 0x000002c4
#define ENBES_VID3_CSC2 0x000002c8
#define ENBES_VID3_MINI_CTL 0x000002c0
#define ENBES_VID3_COLSPAC1 0x000002c4
#define ENBES_VID3_COLSPAC2 0x000002c8
#define ENBES_VID1U_ADDR1 0x000002e4
#define ENBES_VID1U_ADDR2 0x000002e8
#define ENBES_VID1U_ADDR3 0x000002ec
+3 -1
View File
@@ -15,7 +15,9 @@
#include <View.h>
namespace BPrivate {
class AboutView;
}
class BBitmap;
class BPoint;
@@ -72,7 +74,7 @@ private:
virtual void _ReservedAboutWindow1();
private:
AboutView* fAboutView;
BPrivate::AboutView* fAboutView;
// FBC Padding
uint32 _reserved[20];
+2 -1
View File
@@ -39,7 +39,7 @@ class BAbstractSpinner : public BControl {
public:
BAbstractSpinner(BRect frame, const char* name,
const char* label, BMessage* message,
uint32 resizingMode = B_FOLLOW_LEFT | B_FOLLOW_TOP,
uint32 resizingMode = B_FOLLOW_LEFT_TOP,
uint32 flags = B_WILL_DRAW | B_NAVIGABLE);
BAbstractSpinner(const char* name, const char* label,
BMessage* message,
@@ -59,6 +59,7 @@ public:
virtual void Draw(BRect updateRect);
virtual void FrameResized(float width, float height);
virtual void ValueChanged();
virtual void MessageReceived(BMessage* message);
virtual void Decrement() = 0;
virtual void Increment() = 0;
-79
View File
@@ -1,79 +0,0 @@
/*
Open Tracker License
Terms and Conditions
Copyright (c) 1991-2000, Be Incorporated. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice applies to all licensees
and shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF TITLE, MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
BE INCORPORATED BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of Be Incorporated shall not be
used in advertising or otherwise to promote the sale, use or other dealings in
this Software without prior written authorization from Be Incorporated.
Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks
of Be Incorporated in the United States and other countries. Other brand product
names are registered trademarks or trademarks of their respective holders.
All rights reserved.
*/
/*******************************************************************************
/
/ File: ColorTools.h
/
/ Description: Additional experimental color manipulation functions.
/
/ Copyright 2000, Be Incorporated, All Rights Reserved
/
*******************************************************************************/
#ifndef _COLOR_TOOLS_H
#define _COLOR_TOOLS_H
#include <GraphicsDefs.h>
#if B_BEOS_VERSION <= B_BEOS_VERSION_5
namespace BExperimental {
// Mix two colors together, ignoring their relative alpha channels.
// If amount is 0, the result is color1; if 255, the result is color2;
// if another value, it is somewhere in-between. The resulting alpha
// channel is mixed exactly like the other color channels.
rgb_color mix_color(rgb_color color1, rgb_color color2, uint8 amount);
// Blend two colors together, weighting by their relative alpha channels.
// The resulting color is the same as mix_color(), except that the amount
// used from color1 and color2's color channels is dependent on that color's
// alpha channel. For example, if color1.alpha is 0 and color2.alpha is
// 255, the resulting red, green, and blue values will be the same as those
// in color2, regardless of 'amount'.
rgb_color blend_color(rgb_color color1, rgb_color color2, uint8 amount);
// Return a color that is the disabled representation of 'color' when drawn
// on a solid color 'background'.
rgb_color disable_color(rgb_color color, rgb_color background);
} // namespace BExperimental
using namespace BExperimental;
#endif
#endif
+5 -2
View File
@@ -63,10 +63,10 @@ class RecursiveOutlineIterator;
} // ns BPrivate
class BField;
class BRow;
class BColumn;
class BColumnListView;
class BField;
class BRow;
enum LatchType {
B_NO_LATCH = 0,
@@ -353,6 +353,7 @@ public:
// Appearance (NEW STYLE)
void SetColor(ColumnListViewColor colorIndex,
rgb_color color);
void ResetColors();
void SetFont(ColumnListViewFont fontIndex,
const BFont* font,
uint32 mask = B_FONT_ALL);
@@ -396,12 +397,14 @@ protected:
private:
void _Init();
void _UpdateColors();
void _GetChildViewRects(const BRect& bounds,
BRect& titleRect, BRect& outlineRect,
BRect& vScrollBarRect,
BRect& hScrollBarRect);
rgb_color fColorList[B_COLOR_TOTAL];
bool fCustomColors;
BPrivate::TitleView* fTitleView;
BPrivate::OutlineView* fOutlineView;
BList fColumns;
+1 -1
View File
@@ -16,7 +16,7 @@ class BDecimalSpinner : public BAbstractSpinner {
public:
BDecimalSpinner(BRect frame, const char* name,
const char* label, BMessage* message,
uint32 resizingMode = B_FOLLOW_LEFT | B_FOLLOW_TOP,
uint32 resizingMode = B_FOLLOW_LEFT_TOP,
uint32 flags = B_WILL_DRAW | B_NAVIGABLE);
BDecimalSpinner(const char* name, const char* label,
BMessage* message,
+13 -1
View File
@@ -42,8 +42,11 @@ enum {
B_VIEW_PATTERN_BIT = 0x00020000,
B_VIEW_TRANSFORM_BIT = 0x00040000,
B_VIEW_FILL_RULE_BIT = 0x00080000,
B_VIEW_WHICH_VIEW_COLOR_BIT = 0x00100000,
B_VIEW_WHICH_LOW_COLOR_BIT = 0x00200000,
B_VIEW_WHICH_HIGH_COLOR_BIT = 0x00400000,
B_VIEW_ALL_BITS = 0x000fffff,
B_VIEW_ALL_BITS = 0x00ffffff,
// these used for archiving only
B_VIEW_RESIZE_BIT = 0x00001000,
@@ -107,6 +110,15 @@ class ViewState {
// This one is not affected by pop state/push state
rgb_color view_color;
color_which which_view_color;
float which_view_color_tint;
// these are cached values
color_which which_low_color;
float which_low_color_tint;
color_which which_high_color;
float which_high_color_tint;
::pattern pattern;
+3 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2011, Haiku, Inc. All rights reserved.
* Copyright 2011-2016, Haiku, Inc. All rights reserved.
* Copyright 2001-2003 Dr. Zoidberg Enterprises. All rights reserved.
*/
#ifndef ZOIDBERG_GARGOYLE_MAIL_UTIL_H
@@ -102,5 +102,7 @@ void extract_address_name(BString &address);
void get_address_list(BList &list, const char *string,
void (*cleanupFunc)(BString &) = NULL);
status_t CopyMailFolderAttributes(const char* targetPath);
#endif /* ZOIDBERG_GARGOYLE_MAIL_UTIL_H */
+9 -5
View File
@@ -46,6 +46,7 @@ public:
void SetAcceptedFormat(
const media_format& format);
const media_format& AcceptedFormat() const;
virtual status_t Start(bool force = false);
virtual status_t Stop(bool force = false);
@@ -66,13 +67,17 @@ public:
const media_format& Format() const;
const media_output& MediaOutput() const;
const media_input& MediaInput() const;
protected:
// Get the producer node source
const media_source& MediaSource() const;
// This is the our own input
const media_input& MediaInput() const;
virtual void BufferReceived(void* buffer, size_t size,
const media_header& header);
status_t SetUpConnection(media_source outputSource);
private:
status_t _Connect(const media_node& mediaNode,
@@ -98,10 +103,9 @@ private:
NotifyFunc fNotifyHook;
media_node fOutputNode;
media_output fOutput;
media_source fOutputSource;
BMediaRecorderNode* fNode;
media_input fInput;
void* fBufferCookie;
uint32 fPadding[32];
+55 -52
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2014, Dario Casalinuovo
* Copyright 2014-2016, Dario Casalinuovo
* Copyright 1999, Be Incorporated
* All Rights Reserved.
* This file may be used under the terms of the Be Sample Code License.
@@ -20,44 +20,46 @@ class BMediaRecorder;
class BMediaRecorderNode : public BMediaEventLooper,
public BBufferConsumer {
public:
BMediaRecorderNode(const char* name,
BMediaRecorder* recorder,
media_type type
= B_MEDIA_UNKNOWN_TYPE);
BMediaRecorderNode(const char* name,
BMediaRecorder* recorder,
media_type type
= B_MEDIA_UNKNOWN_TYPE);
// TODO these are not thread safe; we should fix that...
void SetAcceptedFormat(const media_format& format);
void SetAcceptedFormat(const media_format& format);
const media_format& AcceptedFormat() const;
status_t GetInput(media_input* outInput);
void GetInput(media_input* input);
void SetDataEnabled(bool enabled);
void SetDataEnabled(bool enabled);
void ActivateInternalConnect(bool connectMode);
protected:
virtual BMediaAddOn* AddOn(int32* id) const;
virtual BMediaAddOn* AddOn(int32* id) const;
virtual void NodeRegistered();
virtual void NodeRegistered();
virtual void SetRunMode(run_mode mode);
virtual void SetRunMode(run_mode mode);
virtual void HandleEvent(const media_timed_event* event,
bigtime_t lateness,
bool realTimeEvent);
virtual void HandleEvent(const media_timed_event* event,
bigtime_t lateness,
bool realTimeEvent);
virtual void Start(bigtime_t performanceTime);
virtual void Start(bigtime_t performanceTime);
virtual void Stop(bigtime_t performanceTime,
bool immediate);
virtual void Stop(bigtime_t performanceTime,
bool immediate);
virtual void Seek(bigtime_t mediaTime,
bigtime_t performanceTime);
virtual void Seek(bigtime_t mediaTime,
bigtime_t performanceTime);
virtual void TimeWarp(bigtime_t realTime,
bigtime_t performanceTime);
virtual void TimeWarp(bigtime_t realTime,
bigtime_t performanceTime);
virtual status_t HandleMessage(int32 message,
const void* data,
size_t size);
virtual status_t HandleMessage(int32 message,
const void* data,
size_t size);
// Someone, probably the producer, is asking you about
// this format. Give your honest opinion, possibly
@@ -65,46 +67,47 @@ protected:
// the format, since he's synchronously waiting for your
// reply.
virtual status_t AcceptFormat(const media_destination& dest,
media_format* format);
virtual status_t AcceptFormat(const media_destination& dest,
media_format* format);
virtual status_t GetNextInput(int32* cookie,
media_input* outInput);
virtual status_t GetNextInput(int32* cookie,
media_input* outInput);
virtual void DisposeInputCookie(int32 cookie);
virtual void DisposeInputCookie(int32 cookie);
virtual void BufferReceived(BBuffer* buffer);
virtual void BufferReceived(BBuffer* buffer);
virtual void ProducerDataStatus(
const media_destination& destination,
int32 status,
bigtime_t performanceTime);
virtual void ProducerDataStatus(
const media_destination& destination,
int32 status,
bigtime_t performanceTime);
virtual status_t GetLatencyFor(const media_destination& destination,
bigtime_t* outLatency,
media_node_id* outTimesource);
virtual status_t GetLatencyFor(const media_destination& destination,
bigtime_t* outLatency,
media_node_id* outTimesource);
virtual status_t Connected(const media_source& producer,
const media_destination& where,
const media_format& format,
media_input* outInput);
virtual status_t Connected(const media_source& producer,
const media_destination& where,
const media_format& format,
media_input* outInput);
virtual void Disconnected(const media_source& producer,
const media_destination& where);
virtual void Disconnected(const media_source& producer,
const media_destination& where);
virtual status_t FormatChanged(const media_source& producer,
const media_destination& consumer,
int32 tag,
const media_format& format);
virtual status_t FormatChanged(const media_source& producer,
const media_destination& consumer,
int32 tag,
const media_format& format);
protected:
virtual ~BMediaRecorderNode();
virtual ~BMediaRecorderNode();
BMediaRecorder* fRecorder;
media_format fOKFormat;
media_input fInput;
BString fName;
BMediaRecorder* fRecorder;
media_format fOKFormat;
media_input fInput;
BString fName;
bool fConnectMode;
};
}
@@ -0,0 +1,24 @@
/*
* Copyright 2016 Haiku Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef ATTRIBUTE_UTILITIES_H
#define ATTRIBUTE_UTILITIES_H
#include <SupportDefs.h>
class BNode;
namespace BPrivate {
status_t CopyAttributes(BNode& source, BNode& destination);
} // namespace BPrivate
#endif // ATTRIBUTE_UTILITIES_H
+1 -2
View File
@@ -26,8 +26,7 @@ namespace BPrivate {
class BCalendarView : public BView, public BInvoker {
public:
BCalendarView(BRect frame, const char* name,
uint32 resizeMask = B_FOLLOW_LEFT
| B_FOLLOW_TOP,
uint32 resizeMask = B_FOLLOW_LEFT_TOP,
uint32 flags = B_WILL_DRAW | B_FRAME_EVENTS
| B_NAVIGABLE);