Merge remote-tracking branch 'remotes/haiku/master' into package-management
This commit is contained in:
commit
4387d6b33f
@ -52,10 +52,10 @@
|
||||
|
||||
|
||||
/*!
|
||||
\fn BGroupLayout::BGroupLayout(enum orientation orientation, float spacing)
|
||||
\fn BGroupLayout::BGroupLayout(orientation orientation, float spacing)
|
||||
\brief Creates a new BGroupLayout.
|
||||
|
||||
\param orientation The #orientation of this BGroupLayout.
|
||||
\param orientation The orientation of this BGroupLayout.
|
||||
\param spacing The spacing between BLayoutItems in this BGroupLayout.
|
||||
*/
|
||||
|
||||
@ -95,7 +95,7 @@
|
||||
|
||||
|
||||
/*!
|
||||
\fn void BGroupLayout::SetOrientation(enum orientation orientation)
|
||||
\fn void BGroupLayout::SetOrientation(orientation orientation)
|
||||
\brief Set the #orientation of this BGroupLayout.
|
||||
\param orientation The new #orientation of this BGroupLayout.
|
||||
*/
|
||||
|
@ -528,10 +528,12 @@ topLayout->AddItem(nestedLayoutWithView);
|
||||
|
||||
|
||||
/*!
|
||||
\fn void BLayout::LayoutInvalidated() = 0
|
||||
\fn void BLayout::LayoutInvalidated(bool children)
|
||||
|
||||
Hook method called when this layout becomes invalid. This is a good place
|
||||
to clear any caches your object might hold.
|
||||
|
||||
\param children Whether or not child layouts have also been invalidated.
|
||||
*/
|
||||
|
||||
|
||||
|
@ -64,8 +64,7 @@
|
||||
|
||||
/*!
|
||||
\fn BLayoutBuilder::Group<ParentBuilder>::Group(BWindow *window,
|
||||
enum orientation orientation=B_HORIZONTAL,
|
||||
float spacing=B_USE_DEFAULT_SPACING)
|
||||
orientation orientation, float spacing)
|
||||
\brief Creates a new BGroupLayout, and attaches it to a BWindow.
|
||||
|
||||
\note The top BView* in \a window has its ViewColor set to
|
||||
@ -98,8 +97,7 @@
|
||||
|
||||
/*!
|
||||
\fn BLayoutBuilder::Group<ParentBuilder>::Group(
|
||||
enum orientation orientation=B_HORIZONTAL,
|
||||
float spacing=B_USE_DEFAULT_SPACING)
|
||||
orientation orientation, float spacing)
|
||||
\brief Creates a new BGroupView and targets it.
|
||||
|
||||
Methods called on this builder will be directed to the new BGroupView's
|
||||
@ -178,8 +176,7 @@
|
||||
|
||||
/*!
|
||||
\fn GroupBuilder BLayoutBuilder::Group<ParentBuilder>::AddGroup(
|
||||
enum orientation orientation, float spacing=B_USE_DEFAULT_SPACING,
|
||||
float weight=1.0f)
|
||||
orientation orientation, float spacing, float weight)
|
||||
\brief Construct and add a viewless BGroupLayout, then return a GroupBuilder
|
||||
representing the newly added layout.
|
||||
|
||||
@ -264,8 +261,7 @@
|
||||
|
||||
/*!
|
||||
\fn SplitBuilder BLayoutBuilder::Group<ParentBuilder>::AddSplit(
|
||||
enum orientation orientation, float spacing=B_USE_DEFAULT_SPACING,
|
||||
float weight=1.0f)
|
||||
orientation orientation, float spacing, float weight)
|
||||
|
||||
\brief Create and add a new BSplitView with a weight of \c weight, then
|
||||
return a SplitBuilder representing the new BSplitView.
|
||||
|
@ -147,7 +147,7 @@ public:
|
||||
= B_ALIGN_HORIZONTAL_UNSET,
|
||||
int32 columnCount = 1, int32 rowCount = 1);
|
||||
|
||||
inline GroupBuilder AddGroup(enum orientation orientation,
|
||||
inline GroupBuilder AddGroup(orientation orientation,
|
||||
float spacing, int32 column, int32 row,
|
||||
int32 columnCount = 1, int32 rowCount = 1);
|
||||
inline GroupBuilder AddGroup(BGroupView* groupView, int32 column,
|
||||
@ -168,7 +168,7 @@ public:
|
||||
int32 column, int32 row,
|
||||
int32 columnCount = 1, int32 rowCount = 1);
|
||||
|
||||
inline SplitBuilder AddSplit(enum orientation orientation,
|
||||
inline SplitBuilder AddSplit(orientation orientation,
|
||||
float spacing, int32 column, int32 row,
|
||||
int32 columnCount = 1, int32 rowCount = 1);
|
||||
inline SplitBuilder AddSplit(BSplitView* splitView, int32 column,
|
||||
@ -197,8 +197,7 @@ public:
|
||||
typedef Split<ThisBuilder> SplitBuilder;
|
||||
|
||||
public:
|
||||
inline Split(enum orientation orientation
|
||||
= B_HORIZONTAL,
|
||||
inline Split(orientation orientation = B_HORIZONTAL,
|
||||
float spacing = 0.0f);
|
||||
inline Split(BSplitView* view);
|
||||
|
||||
@ -211,7 +210,7 @@ public:
|
||||
inline ThisBuilder& Add(BLayoutItem* item);
|
||||
inline ThisBuilder& Add(BLayoutItem* item, float weight);
|
||||
|
||||
inline GroupBuilder AddGroup(enum orientation orientation,
|
||||
inline GroupBuilder AddGroup(orientation orientation,
|
||||
float spacing = 0.0f, float weight = 1.0f);
|
||||
inline GroupBuilder AddGroup(BGroupView* groupView,
|
||||
float weight = 1.0f);
|
||||
@ -226,7 +225,7 @@ public:
|
||||
inline GridBuilder AddGrid(BGridLayout* gridLayout,
|
||||
float weight = 1.0f);
|
||||
|
||||
inline SplitBuilder AddSplit(enum orientation orientation,
|
||||
inline SplitBuilder AddSplit(orientation orientation,
|
||||
float spacing = 0.0f, float weight = 1.0f);
|
||||
inline SplitBuilder AddSplit(BSplitView* splitView,
|
||||
float weight = 1.0f);
|
||||
|
@ -67,7 +67,7 @@
|
||||
|
||||
|
||||
/*!
|
||||
\fn void DrawItem(BView* owner, BRect frame, bool complete)
|
||||
\fn void BListItem::DrawItem(BView* owner, BRect frame, bool complete)
|
||||
\brief Hook method called when the item is drawn.
|
||||
|
||||
\param owner The view that the list item is a child of.
|
||||
|
@ -267,17 +267,6 @@
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn void BListView::KeyUp(const char* bytes, int32 numBytes)
|
||||
\brief Hook method that is called when a keyboard key is released.
|
||||
|
||||
\param bytes The \a bytes representing the keys released.
|
||||
\param numBytes The size of \a bytes.
|
||||
|
||||
\see BView::KeyUp()
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn void BListView::MouseDown(BPoint point)
|
||||
\brief Hook method that is called when a mouse button is pushed down while
|
||||
@ -475,7 +464,7 @@
|
||||
|
||||
/*!
|
||||
\fn bool BListView::AddList(BList* list)
|
||||
\fn Add a \a list of list items to the end of the list view.
|
||||
\brief Add a \a list of list items to the end of the list view.
|
||||
|
||||
\param list The \a list of list items to add.
|
||||
|
||||
@ -698,7 +687,7 @@
|
||||
|
||||
|
||||
/*!
|
||||
\fn void BListView::DoForEach(bool (*func)(BListItem*))
|
||||
\fn void BListView::DoForEach(bool (*func)(BListItem* item))
|
||||
\brief Calls the specified function on each item in the list.
|
||||
|
||||
The \a func is called on the items in order starting with the item at index 0
|
||||
@ -712,7 +701,8 @@
|
||||
|
||||
|
||||
/*!
|
||||
\fn void BListView::DoForEach(bool (*func)(BListItem*, void*), void* arg)
|
||||
\fn void BListView::DoForEach(bool (*func)(BListItem* item, void* arg),
|
||||
void* arg)
|
||||
\brief Calls the specified function on each item in the list.
|
||||
|
||||
The \a func is called on the items in order starting with the item at index 0
|
||||
@ -723,6 +713,7 @@
|
||||
as the second argument.
|
||||
|
||||
\param func The function to call on each item.
|
||||
\param arg The second argument of the function.
|
||||
*/
|
||||
|
||||
|
||||
|
@ -398,7 +398,8 @@
|
||||
set in the BTextView with the font and color formats set by \a runs.
|
||||
|
||||
\param text The text to set.
|
||||
\param runs The text styling to set, can be \c NULL.
|
||||
\param runs Set the font and color formats of the new text if provided. Only
|
||||
applies if the BTextView permits multiple character formats.
|
||||
*/
|
||||
|
||||
|
||||
@ -413,8 +414,9 @@
|
||||
to 0 to clear the text from the BTextView.
|
||||
|
||||
\param text The text to set.
|
||||
\param length The number of bytes of text to set.
|
||||
\param runs The text styling to use, can be \c NULL.
|
||||
\param length The maximum number of bytes of \a text to use.
|
||||
\param runs Set the font and color formats of the new text if provided. Only
|
||||
applies if the BTextView permits multiple character formats.
|
||||
*/
|
||||
|
||||
|
||||
@ -428,7 +430,8 @@
|
||||
\param file The file to set the text from.
|
||||
\param offset The position in the file to start reading text.
|
||||
\param length The number of bytes of text to read from the file.
|
||||
\param runs The text styling to use, can be \c NULL.
|
||||
\param runs Set the font and color formats of the new text if provided. Only
|
||||
applies if the BTextView permits multiple character formats.
|
||||
*/
|
||||
|
||||
|
||||
@ -489,25 +492,6 @@
|
||||
*/
|
||||
|
||||
|
||||
//! @{
|
||||
|
||||
|
||||
/*!
|
||||
\fn void BTextView::SetText(const char* text, const text_run_array* runs)
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn void BTextView::SetText(const char* text, int32 length,
|
||||
const text_run_array* runs)
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn void BTextView::SetText(BFile* file, int32 offset, int32 length,
|
||||
const text_run_array* runs)
|
||||
*/
|
||||
|
||||
//! @}
|
||||
|
||||
|
||||
|
@ -56,7 +56,7 @@
|
||||
|
||||
/*!
|
||||
\fn void BTwoDimensionalLayout::AlignLayoutWith(
|
||||
BTwoDimensionalLayout* other, enum orientation orientation)
|
||||
BTwoDimensionalLayout* other, orientation orientation)
|
||||
\brief Align the BLayoutItem's in the specified \a orientation within
|
||||
two or more BTwoDimensionalLayout's.
|
||||
|
||||
@ -114,7 +114,7 @@
|
||||
|
||||
|
||||
/*!
|
||||
\fn void BTwoDimensionalLayout::PrepareItems(enum orientation orientation)
|
||||
\fn void BTwoDimensionalLayout::PrepareItems(orientation orientation)
|
||||
\brief Prepare the BLayoutItem in this BTwoDimensionalLayout subclass
|
||||
for layout within a certain \a orientation.
|
||||
|
||||
@ -158,8 +158,8 @@
|
||||
|
||||
|
||||
/*!
|
||||
\fn void BTwoDimensionalLayout::GetColumnRowConstraints(enum orientation
|
||||
orientation, int32 index, ColumnRowConstraints* constraints)
|
||||
\fn void BTwoDimensionalLayout::GetColumnRowConstraints(
|
||||
orientation orientation, int32 index, ColumnRowConstraints* constraints)
|
||||
\brief Fill in the ColumnRowConstraints for a certain column or row in
|
||||
the BTwoDimensionalLayout.
|
||||
|
||||
|
@ -40,7 +40,7 @@
|
||||
So, let's review the BGroupLayout constructor:
|
||||
|
||||
\code
|
||||
BGroupLayout(enum orientation orientation, float spacing = B_USE_DEFAULT_SPACING)
|
||||
BGroupLayout(orientation orientation, float spacing = B_USE_DEFAULT_SPACING)
|
||||
\endcode
|
||||
|
||||
Because we only have one item in this layout, \c orientation and \c spacing
|
||||
|
@ -324,6 +324,7 @@ struct pci_module_info {
|
||||
#define PCI_ata 0x05 /* ATA controller with ADMA interface */
|
||||
#define PCI_sata 0x06 /* Serial ATA controller */
|
||||
#define PCI_sas 0x07 /* Serial Attached SCSI controller */
|
||||
#define PCI_nvm 0x08 /* NVM Express controller */
|
||||
#define PCI_mass_storage_other 0x80 /* other mass storage controller */
|
||||
|
||||
/* ---
|
||||
@ -335,6 +336,15 @@ struct pci_module_info {
|
||||
#define PCI_sata_other 0x00 /* vendor specific interface */
|
||||
#define PCI_sata_ahci 0x01 /* AHCI interface */
|
||||
|
||||
/* ---
|
||||
values of the class_api field for
|
||||
class_base = 0x01 (mass storage)
|
||||
class_sub = 0x08 (NVM Express controller)
|
||||
--- */
|
||||
|
||||
#define PCI_nvm_other 0x00 /* vendor specific interface */
|
||||
#define PCI_nvm_hci 0x01 /* NVMHCI interface 1.0 */
|
||||
#define PCI_nvm_hci_enterprise 0x02 /* NVMHCI enterprise */
|
||||
|
||||
/* ---
|
||||
values for the class_sub field for class_base = 0x02 (network)
|
||||
@ -345,6 +355,8 @@ struct pci_module_info {
|
||||
#define PCI_fddi 0x02 /* FDDI controller */
|
||||
#define PCI_atm 0x03 /* ATM controller */
|
||||
#define PCI_isdn 0x04 /* ISDN controller */
|
||||
#define PCI_worldfip 0x05 /* WorldFip controller */
|
||||
#define PCI_picmg 0x06 /* PICMG controller */
|
||||
#define PCI_network_other 0x80 /* other network controller */
|
||||
|
||||
|
||||
@ -405,6 +417,8 @@ struct pci_module_info {
|
||||
#define PCI_parallel 0x01 /* parallel port */
|
||||
#define PCI_multiport_serial 0x02 /* multiport serial controller */
|
||||
#define PCI_modem 0x03 /* modem */
|
||||
#define PCI_gpib 0x04 /* GPIB controller */
|
||||
#define PCI_smart_card 0x05 /* Smard Card controller */
|
||||
#define PCI_simple_communications_other 0x80 /* other communications device */
|
||||
|
||||
/* ---
|
||||
@ -439,6 +453,8 @@ struct pci_module_info {
|
||||
#define PCI_timer 0x02 /* timers */
|
||||
#define PCI_rtc 0x03 /* real time clock */
|
||||
#define PCI_generic_hot_plug 0x04 /* generic PCI hot-plug controller */
|
||||
#define PCI_sd_host 0x05 /* SD Host controller */
|
||||
#define PCI_iommu 0x06 /* IOMMU */
|
||||
#define PCI_system_peripheral_other 0x80 /* other generic system peripheral */
|
||||
|
||||
/* ---
|
||||
@ -644,6 +660,8 @@ struct pci_module_info {
|
||||
|
||||
#define PCI_address_io_mask 0xFFFFFFFC /* mask to get i/o space base address */
|
||||
|
||||
#define PCI_range_memory_mask 0xFFFFFFF0 /* mask to get memory ranges */
|
||||
|
||||
|
||||
/* ---
|
||||
masks for flags in expansion rom base address registers
|
||||
@ -686,7 +704,7 @@ struct pci_module_info {
|
||||
#define PCI_cap_id_msi 0x05 /* Message signalled interrupt */
|
||||
#define PCI_cap_id_chswp 0x06 /* Compact PCI HotSwap */
|
||||
#define PCI_cap_id_pcix 0x07 /* PCI-X */
|
||||
#define PCI_cap_id_ldt 0x08
|
||||
#define PCI_cap_id_ht 0x08 /* HyperTransport */
|
||||
#define PCI_cap_id_vendspec 0x09
|
||||
#define PCI_cap_id_debugport 0x0a
|
||||
#define PCI_cap_id_cpci_rsrcctl 0x0b
|
||||
@ -773,6 +791,53 @@ struct pci_module_info {
|
||||
#define PCI_msi_control_mmc_16 0x0008
|
||||
#define PCI_msi_control_mmc_32 0x000a
|
||||
|
||||
/** MSI-X registers **/
|
||||
#define PCI_msix_control 0x02
|
||||
#define PCI_msix_table 0x04
|
||||
#define PCI_msix_pba 0x08
|
||||
|
||||
#define PCI_msix_control_table_size 0x07ff
|
||||
#define PCI_msix_control_function_mask 0x4000
|
||||
#define PCI_msix_control_enable 0x8000
|
||||
#define PCI_msix_bir_mask 0x0007
|
||||
#define PCI_msix_bir_0 0x10
|
||||
#define PCI_msix_bir_1 0x14
|
||||
#define PCI_msix_bir_2 0x18
|
||||
#define PCI_msix_bir_3 0x1c
|
||||
#define PCI_msix_bir_4 0x20
|
||||
#define PCI_msix_bir_5 0x24
|
||||
#define PCI_msix_offset_mask 0xfff8
|
||||
|
||||
#define PCI_msix_vctrl_mask 0x0001
|
||||
|
||||
/** HyperTransport registers **/
|
||||
#define PCI_ht_command 0x02
|
||||
#define PCI_ht_msi_address_low 0x04
|
||||
#define PCI_ht_msi_address_high 0x08
|
||||
|
||||
#define PCI_ht_command_cap_mask_3_bits 0xe000
|
||||
#define PCI_ht_command_cap_mask_5_bits 0xf800
|
||||
#define PCI_ht_command_cap_slave 0x0000
|
||||
#define PCI_ht_command_cap_host 0x2000
|
||||
#define PCI_ht_command_cap_switch 0x4000
|
||||
#define PCI_ht_command_cap_interrupt 0x8000
|
||||
#define PCI_ht_command_cap_revision_id 0x8800
|
||||
#define PCI_ht_command_cap_unit_id_clumping 0x9000
|
||||
#define PCI_ht_command_cap_ext_config_space 0x9800
|
||||
#define PCI_ht_command_cap_address_mapping 0xa000
|
||||
#define PCI_ht_command_cap_msi_mapping 0xa800
|
||||
#define PCI_ht_command_cap_direct_route 0xb000
|
||||
#define PCI_ht_command_cap_vcset 0xb800
|
||||
#define PCI_ht_command_cap_retry_mode 0xc000
|
||||
#define PCI_ht_command_cap_x86_encoding 0xc800
|
||||
#define PCI_ht_command_cap_gen3 0xd000
|
||||
#define PCI_ht_command_cap_fle 0xd800
|
||||
#define PCI_ht_command_cap_pm 0xe000
|
||||
#define PCI_ht_command_cap_high_node_count 0xe800
|
||||
|
||||
#define PCI_ht_command_msi_enable 0x0001
|
||||
#define PCI_ht_command_msi_fixed 0x0002
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -35,6 +35,33 @@ typedef struct pci_x86_module_info {
|
||||
uint8 bus, /* bus number */
|
||||
uint8 device, /* device # on bus */
|
||||
uint8 function); /* function # in device */
|
||||
|
||||
uint8 (*get_msix_count)(
|
||||
uint8 bus, /* bus number */
|
||||
uint8 device, /* device # on bus */
|
||||
uint8 function); /* function # in device */
|
||||
|
||||
status_t (*configure_msix)(
|
||||
uint8 bus, /* bus number */
|
||||
uint8 device, /* device # on bus */
|
||||
uint8 function, /* function # in device */
|
||||
uint8 count, /* count of vectors desired */
|
||||
uint8 *startVector); /* first configured vector */
|
||||
status_t (*unconfigure_msix)(
|
||||
uint8 bus, /* bus number */
|
||||
uint8 device, /* device # on bus */
|
||||
uint8 function); /* function # in device */
|
||||
|
||||
status_t (*enable_msix)(
|
||||
uint8 bus, /* bus number */
|
||||
uint8 device, /* device # on bus */
|
||||
uint8 function); /* function # in device */
|
||||
status_t (*disable_msix)(
|
||||
uint8 bus, /* bus number */
|
||||
uint8 device, /* device # on bus */
|
||||
uint8 function); /* function # in device */
|
||||
|
||||
|
||||
} pci_x86_module_info;
|
||||
|
||||
#define B_PCI_X86_MODULE_NAME "bus_managers/pci/x86/v1"
|
||||
|
@ -19,14 +19,14 @@ public:
|
||||
uint32 flags = B_WILL_DRAW);
|
||||
BChannelSlider(BRect area, const char* name,
|
||||
const char* label, BMessage* message,
|
||||
enum orientation orientation,
|
||||
orientation orientation,
|
||||
int32 channels = 1,
|
||||
uint32 resizeMode
|
||||
= B_FOLLOW_LEFT | B_FOLLOW_TOP,
|
||||
uint32 flags = B_WILL_DRAW);
|
||||
BChannelSlider(const char* name,
|
||||
const char* label, BMessage* message,
|
||||
enum orientation orientation,
|
||||
orientation orientation,
|
||||
int32 channels = 1,
|
||||
uint32 flags = B_WILL_DRAW);
|
||||
BChannelSlider(BMessage* archive);
|
||||
@ -67,7 +67,7 @@ public:
|
||||
virtual void SetEnabled(bool on);
|
||||
|
||||
virtual orientation Orientation() const;
|
||||
void SetOrientation(enum orientation orientation);
|
||||
void SetOrientation(orientation orientation);
|
||||
|
||||
virtual int32 MaxChannelCount() const;
|
||||
virtual bool SupportsIndividualLimits() const;
|
||||
|
@ -119,16 +119,14 @@ public:
|
||||
const rgb_color& base,
|
||||
uint32 flags = 0,
|
||||
uint32 borders = B_ALL_BORDERS,
|
||||
enum orientation orientation
|
||||
= B_HORIZONTAL);
|
||||
orientation orientation = B_HORIZONTAL);
|
||||
/*virtual*/ void DrawButtonBackground(BView* view, BRect& rect,
|
||||
const BRect& updateRect,
|
||||
float radius,
|
||||
const rgb_color& base,
|
||||
uint32 flags = 0,
|
||||
uint32 borders = B_ALL_BORDERS,
|
||||
enum orientation orientation
|
||||
= B_HORIZONTAL);
|
||||
orientation orientation = B_HORIZONTAL);
|
||||
/*virtual*/ void DrawButtonBackground(BView* view, BRect& rect,
|
||||
const BRect& updateRect,
|
||||
float leftTopRadius,
|
||||
@ -138,8 +136,7 @@ public:
|
||||
const rgb_color& base,
|
||||
uint32 flags = 0,
|
||||
uint32 borders = B_ALL_BORDERS,
|
||||
enum orientation orientation
|
||||
= B_HORIZONTAL);
|
||||
orientation orientation = B_HORIZONTAL);
|
||||
|
||||
virtual void DrawMenuBarBackground(BView* view, BRect& rect,
|
||||
const BRect& updateRect,
|
||||
@ -222,11 +219,11 @@ public:
|
||||
BRect& rect1, BRect& rect2,
|
||||
const BRect& updateRect,
|
||||
const rgb_color& base, uint32 flags,
|
||||
enum orientation orientation);
|
||||
orientation orientation);
|
||||
virtual void DrawScrollBarBackground(BView* view,
|
||||
BRect& rect, const BRect& updateRect,
|
||||
const rgb_color& base, uint32 flags,
|
||||
enum orientation orientation);
|
||||
orientation orientation);
|
||||
|
||||
/*virtual*/ void DrawScrollViewFrame(BView* view,
|
||||
BRect& rect, const BRect& updateRect,
|
||||
@ -251,32 +248,32 @@ public:
|
||||
rgb_color leftFillColor,
|
||||
rgb_color rightFillColor,
|
||||
float sliderScale, uint32 flags,
|
||||
enum orientation orientation);
|
||||
orientation orientation);
|
||||
virtual void DrawSliderBar(BView* view, BRect rect,
|
||||
const BRect& updateRect,
|
||||
const rgb_color& base, rgb_color fillColor,
|
||||
uint32 flags, enum orientation orientation);
|
||||
uint32 flags, orientation orientation);
|
||||
|
||||
virtual void DrawSliderThumb(BView* view, BRect& rect,
|
||||
const BRect& updateRect,
|
||||
const rgb_color& base, uint32 flags,
|
||||
enum orientation orientation);
|
||||
orientation orientation);
|
||||
|
||||
/*virtual*/ void DrawSliderTriangle(BView* view, BRect& rect,
|
||||
const BRect& updateRect,
|
||||
const rgb_color& base, uint32 flags,
|
||||
enum orientation orientation);
|
||||
orientation orientation);
|
||||
virtual void DrawSliderTriangle(BView* view, BRect& rect,
|
||||
const BRect& updateRect,
|
||||
const rgb_color& base,
|
||||
const rgb_color& fill, uint32 flags,
|
||||
enum orientation orientation);
|
||||
orientation orientation);
|
||||
|
||||
virtual void DrawSliderHashMarks(BView* view, BRect& rect,
|
||||
const BRect& updateRect,
|
||||
const rgb_color& base, int32 count,
|
||||
hash_mark_location location,
|
||||
uint32 flags, enum orientation orientation);
|
||||
uint32 flags, orientation orientation);
|
||||
|
||||
virtual void DrawActiveTab(BView* view, BRect& rect,
|
||||
const BRect& updateRect,
|
||||
@ -291,7 +288,7 @@ public:
|
||||
/*virtual*/ void DrawSplitter(BView* view, BRect& rect,
|
||||
const BRect& updateRect,
|
||||
const rgb_color& base,
|
||||
enum orientation orientation,
|
||||
orientation orientation,
|
||||
uint32 flags = 0,
|
||||
uint32 borders = B_ALL_BORDERS);
|
||||
|
||||
@ -381,8 +378,7 @@ protected:
|
||||
const rgb_color& base,
|
||||
uint32 flags = 0,
|
||||
uint32 borders = B_ALL_BORDERS,
|
||||
enum orientation orientation
|
||||
= B_HORIZONTAL);
|
||||
orientation orientation = B_HORIZONTAL);
|
||||
|
||||
void _DrawMenuFieldBackgroundOutside(BView* view,
|
||||
BRect& rect, const BRect& updateRect,
|
||||
@ -503,7 +499,7 @@ protected:
|
||||
const rgb_color& fillShadowColor,
|
||||
float leftInset, float topInset,
|
||||
float rightInset, float bottomInset,
|
||||
enum orientation orientation);
|
||||
orientation orientation);
|
||||
|
||||
// Border color methods
|
||||
rgb_color _EdgeLightColor(const rgb_color& base,
|
||||
@ -530,33 +526,28 @@ protected:
|
||||
void _FillGradient(BView* view, const BRect& rect,
|
||||
const rgb_color& base, float topTint,
|
||||
float bottomTint,
|
||||
enum orientation orientation
|
||||
= B_HORIZONTAL);
|
||||
orientation orientation = B_HORIZONTAL);
|
||||
|
||||
void _FillGlossyGradient(BView* view,
|
||||
const BRect& rect, const rgb_color& base,
|
||||
float topTint, float middle1Tint,
|
||||
float middle2Tint, float bottomTint,
|
||||
enum orientation orientation
|
||||
= B_HORIZONTAL);
|
||||
orientation orientation = B_HORIZONTAL);
|
||||
|
||||
void _MakeGradient(BGradientLinear& gradient,
|
||||
const BRect& rect, const rgb_color& base,
|
||||
float topTint, float bottomTint,
|
||||
enum orientation orientation
|
||||
= B_HORIZONTAL) const;
|
||||
orientation orientation = B_HORIZONTAL) const;
|
||||
|
||||
void _MakeGlossyGradient(BGradientLinear& gradient,
|
||||
const BRect& rect, const rgb_color& base,
|
||||
float topTint, float middle1Tint,
|
||||
float middle2Tint, float bottomTint,
|
||||
enum orientation orientation
|
||||
= B_HORIZONTAL) const;
|
||||
orientation orientation = B_HORIZONTAL) const;
|
||||
|
||||
void _MakeButtonGradient(BGradientLinear& gradient,
|
||||
BRect& rect, const rgb_color& base,
|
||||
uint32 flags, enum orientation orientation
|
||||
= B_HORIZONTAL) const;
|
||||
uint32 flags, orientation orientation = B_HORIZONTAL) const;
|
||||
|
||||
bool _RadioButtonAndCheckBoxMarkColor(
|
||||
const rgb_color& base, rgb_color& color,
|
||||
|
@ -80,7 +80,7 @@ protected:
|
||||
virtual int32 InternalCountColumns();
|
||||
virtual int32 InternalCountRows();
|
||||
virtual void GetColumnRowConstraints(
|
||||
enum orientation orientation,
|
||||
orientation orientation,
|
||||
int32 index,
|
||||
ColumnRowConstraints* constraints);
|
||||
virtual void GetItemDimensions(BLayoutItem* item,
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
class BGroupLayout : public BTwoDimensionalLayout {
|
||||
public:
|
||||
BGroupLayout(enum orientation orientation,
|
||||
BGroupLayout(orientation orientation,
|
||||
float spacing = B_USE_DEFAULT_SPACING);
|
||||
BGroupLayout(BMessage* from);
|
||||
virtual ~BGroupLayout();
|
||||
@ -18,7 +18,7 @@ public:
|
||||
void SetSpacing(float spacing);
|
||||
|
||||
orientation Orientation() const;
|
||||
void SetOrientation(enum orientation orientation);
|
||||
void SetOrientation(orientation orientation);
|
||||
|
||||
float ItemWeight(int32 index) const;
|
||||
void SetItemWeight(int32 index, float weight);
|
||||
@ -51,12 +51,12 @@ protected:
|
||||
virtual bool ItemAdded(BLayoutItem* item, int32 atIndex);
|
||||
virtual void ItemRemoved(BLayoutItem* item, int32 fromIndex);
|
||||
|
||||
virtual void PrepareItems(enum orientation orientation);
|
||||
virtual void PrepareItems(orientation orientation);
|
||||
|
||||
virtual int32 InternalCountColumns();
|
||||
virtual int32 InternalCountRows();
|
||||
virtual void GetColumnRowConstraints(
|
||||
enum orientation orientation,
|
||||
orientation orientation,
|
||||
int32 index,
|
||||
ColumnRowConstraints* constraints);
|
||||
virtual void GetItemDimensions(BLayoutItem* item,
|
||||
|
@ -12,7 +12,7 @@
|
||||
class BGroupLayoutBuilder {
|
||||
public:
|
||||
BGroupLayoutBuilder(
|
||||
enum orientation orientation = B_HORIZONTAL,
|
||||
orientation orientation = B_HORIZONTAL,
|
||||
float spacing = B_USE_DEFAULT_SPACING);
|
||||
BGroupLayoutBuilder(BGroupLayout* layout);
|
||||
BGroupLayoutBuilder(BGroupView* view);
|
||||
@ -28,7 +28,7 @@ public:
|
||||
BGroupLayoutBuilder& Add(BLayoutItem* item);
|
||||
BGroupLayoutBuilder& Add(BLayoutItem* item, float weight);
|
||||
|
||||
BGroupLayoutBuilder& AddGroup(enum orientation orientation,
|
||||
BGroupLayoutBuilder& AddGroup(orientation orientation,
|
||||
float spacing = B_USE_DEFAULT_SPACING,
|
||||
float weight = 1.0f);
|
||||
BGroupLayoutBuilder& End();
|
||||
|
@ -13,10 +13,10 @@
|
||||
class BGroupView : public BView {
|
||||
public:
|
||||
BGroupView(
|
||||
enum orientation orientation = B_HORIZONTAL,
|
||||
orientation orientation = B_HORIZONTAL,
|
||||
float spacing = B_USE_DEFAULT_SPACING);
|
||||
BGroupView(const char* name,
|
||||
enum orientation orientation = B_HORIZONTAL,
|
||||
orientation orientation = B_HORIZONTAL,
|
||||
float spacing = B_USE_DEFAULT_SPACING);
|
||||
BGroupView(BMessage* from);
|
||||
virtual ~BGroupView();
|
||||
|
@ -55,14 +55,13 @@ public:
|
||||
typedef Split<ThisBuilder> SplitBuilder;
|
||||
|
||||
public:
|
||||
inline Group(enum orientation orientation
|
||||
= B_HORIZONTAL,
|
||||
inline Group(orientation orientation = B_HORIZONTAL,
|
||||
float spacing = B_USE_DEFAULT_SPACING);
|
||||
inline Group(BWindow* window,
|
||||
enum orientation orientation = B_HORIZONTAL,
|
||||
orientation orientation = B_HORIZONTAL,
|
||||
float spacing = B_USE_DEFAULT_SPACING);
|
||||
inline Group(BView* view,
|
||||
enum orientation orientation = B_HORIZONTAL,
|
||||
orientation orientation = B_HORIZONTAL,
|
||||
float spacing = B_USE_DEFAULT_SPACING);
|
||||
inline Group(BGroupLayout* layout);
|
||||
inline Group(BGroupView* view);
|
||||
@ -77,7 +76,7 @@ public:
|
||||
inline ThisBuilder& Add(BLayoutItem* item);
|
||||
inline ThisBuilder& Add(BLayoutItem* item, float weight);
|
||||
|
||||
inline GroupBuilder AddGroup(enum orientation orientation,
|
||||
inline GroupBuilder AddGroup(orientation orientation,
|
||||
float spacing = B_USE_DEFAULT_SPACING,
|
||||
float weight = 1.0f);
|
||||
inline GroupBuilder AddGroup(BGroupView* groupView,
|
||||
@ -94,7 +93,7 @@ public:
|
||||
inline GridBuilder AddGrid(BGridView* gridView,
|
||||
float weight = 1.0f);
|
||||
|
||||
inline SplitBuilder AddSplit(enum orientation orientation,
|
||||
inline SplitBuilder AddSplit(orientation orientation,
|
||||
float spacing = B_USE_DEFAULT_SPACING,
|
||||
float weight = 1.0f);
|
||||
inline SplitBuilder AddSplit(BSplitView* splitView,
|
||||
@ -165,7 +164,7 @@ public:
|
||||
int32 textColumnCount = 1,
|
||||
int32 rowCount = 1);
|
||||
|
||||
inline GroupBuilder AddGroup(enum orientation orientation,
|
||||
inline GroupBuilder AddGroup(orientation orientation,
|
||||
float spacing, int32 column, int32 row,
|
||||
int32 columnCount = 1, int32 rowCount = 1);
|
||||
inline GroupBuilder AddGroup(BGroupView* groupView, int32 column,
|
||||
@ -186,7 +185,7 @@ public:
|
||||
int32 column, int32 row,
|
||||
int32 columnCount = 1, int32 rowCount = 1);
|
||||
|
||||
inline SplitBuilder AddSplit(enum orientation orientation,
|
||||
inline SplitBuilder AddSplit(orientation orientation,
|
||||
float spacing, int32 column, int32 row,
|
||||
int32 columnCount = 1, int32 rowCount = 1);
|
||||
inline SplitBuilder AddSplit(BSplitView* splitView, int32 column,
|
||||
@ -225,8 +224,7 @@ public:
|
||||
typedef Split<ThisBuilder> SplitBuilder;
|
||||
|
||||
public:
|
||||
inline Split(enum orientation orientation
|
||||
= B_HORIZONTAL,
|
||||
inline Split(orientation orientation = B_HORIZONTAL,
|
||||
float spacing = B_USE_DEFAULT_SPACING);
|
||||
inline Split(BSplitView* view);
|
||||
|
||||
@ -239,7 +237,7 @@ public:
|
||||
inline ThisBuilder& Add(BLayoutItem* item);
|
||||
inline ThisBuilder& Add(BLayoutItem* item, float weight);
|
||||
|
||||
inline GroupBuilder AddGroup(enum orientation orientation,
|
||||
inline GroupBuilder AddGroup(orientation orientation,
|
||||
float spacing = B_USE_DEFAULT_SPACING,
|
||||
float weight = 1.0f);
|
||||
inline GroupBuilder AddGroup(BGroupView* groupView,
|
||||
@ -256,7 +254,7 @@ public:
|
||||
inline GridBuilder AddGrid(BGridLayout* gridLayout,
|
||||
float weight = 1.0f);
|
||||
|
||||
inline SplitBuilder AddSplit(enum orientation orientation,
|
||||
inline SplitBuilder AddSplit(orientation orientation,
|
||||
float spacing = B_USE_DEFAULT_SPACING,
|
||||
float weight = 1.0f);
|
||||
inline SplitBuilder AddSplit(BSplitView* splitView,
|
||||
@ -358,7 +356,7 @@ Base<ParentBuilder>::End()
|
||||
|
||||
|
||||
template<typename ParentBuilder>
|
||||
Group<ParentBuilder>::Group(enum orientation orientation, float spacing)
|
||||
Group<ParentBuilder>::Group(orientation orientation, float spacing)
|
||||
:
|
||||
fLayout((new BGroupView(orientation, spacing))->GroupLayout())
|
||||
{
|
||||
@ -366,8 +364,8 @@ Group<ParentBuilder>::Group(enum orientation orientation, float spacing)
|
||||
|
||||
|
||||
template<typename ParentBuilder>
|
||||
Group<ParentBuilder>::Group(BWindow* window, enum orientation orientation,
|
||||
float spacing)
|
||||
Group<ParentBuilder>::Group(BWindow* window, orientation orientation,
|
||||
float spacing)
|
||||
:
|
||||
fLayout(new BGroupLayout(orientation, spacing))
|
||||
{
|
||||
@ -379,8 +377,8 @@ Group<ParentBuilder>::Group(BWindow* window, enum orientation orientation,
|
||||
|
||||
|
||||
template<typename ParentBuilder>
|
||||
Group<ParentBuilder>::Group(BView* view, enum orientation orientation,
|
||||
float spacing)
|
||||
Group<ParentBuilder>::Group(BView* view, orientation orientation,
|
||||
float spacing)
|
||||
:
|
||||
fLayout(new BGroupLayout(orientation, spacing))
|
||||
{
|
||||
@ -478,8 +476,8 @@ Group<ParentBuilder>::Add(BLayoutItem* item, float weight)
|
||||
|
||||
template<typename ParentBuilder>
|
||||
typename Group<ParentBuilder>::GroupBuilder
|
||||
Group<ParentBuilder>::AddGroup(enum orientation orientation, float spacing,
|
||||
float weight)
|
||||
Group<ParentBuilder>::AddGroup(orientation orientation, float spacing,
|
||||
float weight)
|
||||
{
|
||||
GroupBuilder builder(new BGroupLayout(orientation, spacing));
|
||||
builder.SetParent(this);
|
||||
@ -546,8 +544,8 @@ Group<ParentBuilder>::AddGrid(BGridView* gridView, float weight)
|
||||
|
||||
template<typename ParentBuilder>
|
||||
typename Group<ParentBuilder>::SplitBuilder
|
||||
Group<ParentBuilder>::AddSplit(enum orientation orientation, float spacing,
|
||||
float weight)
|
||||
Group<ParentBuilder>::AddSplit(orientation orientation, float spacing,
|
||||
float weight)
|
||||
{
|
||||
SplitBuilder builder(orientation, spacing);
|
||||
builder.SetParent(this);
|
||||
@ -800,8 +798,8 @@ Grid<ParentBuilder>::AddTextControl(BTextControl* textControl, int32 column,
|
||||
|
||||
template<typename ParentBuilder>
|
||||
typename Grid<ParentBuilder>::GroupBuilder
|
||||
Grid<ParentBuilder>::AddGroup(enum orientation orientation, float spacing,
|
||||
int32 column, int32 row, int32 columnCount, int32 rowCount)
|
||||
Grid<ParentBuilder>::AddGroup(orientation orientation, float spacing,
|
||||
int32 column, int32 row, int32 columnCount, int32 rowCount)
|
||||
{
|
||||
GroupBuilder builder(new BGroupLayout(orientation, spacing));
|
||||
builder.SetParent(this);
|
||||
@ -860,7 +858,7 @@ Grid<ParentBuilder>::AddGrid(BGridView* gridView, int32 column, int32 row,
|
||||
|
||||
template<typename ParentBuilder>
|
||||
typename Grid<ParentBuilder>::SplitBuilder
|
||||
Grid<ParentBuilder>::AddSplit(enum orientation orientation, float spacing,
|
||||
Grid<ParentBuilder>::AddSplit(orientation orientation, float spacing,
|
||||
int32 column, int32 row, int32 columnCount, int32 rowCount)
|
||||
{
|
||||
SplitBuilder builder(orientation, spacing);
|
||||
@ -986,7 +984,7 @@ Grid<ParentBuilder>::operator BGridLayout*()
|
||||
|
||||
|
||||
template<typename ParentBuilder>
|
||||
Split<ParentBuilder>::Split(enum orientation orientation, float spacing)
|
||||
Split<ParentBuilder>::Split(orientation orientation, float spacing)
|
||||
:
|
||||
fView(new BSplitView(orientation, spacing))
|
||||
{
|
||||
@ -1065,8 +1063,8 @@ Split<ParentBuilder>::Add(BLayoutItem* item, float weight)
|
||||
|
||||
template<typename ParentBuilder>
|
||||
typename Split<ParentBuilder>::GroupBuilder
|
||||
Split<ParentBuilder>::AddGroup(enum orientation orientation, float spacing,
|
||||
float weight)
|
||||
Split<ParentBuilder>::AddGroup(orientation orientation, float spacing,
|
||||
float weight)
|
||||
{
|
||||
GroupBuilder builder(new BGroupLayout(orientation, spacing));
|
||||
builder.SetParent(this);
|
||||
@ -1133,8 +1131,8 @@ Split<ParentBuilder>::AddGrid(BGridLayout* layout, float weight)
|
||||
|
||||
template<typename ParentBuilder>
|
||||
typename Split<ParentBuilder>::SplitBuilder
|
||||
Split<ParentBuilder>::AddSplit(enum orientation orientation, float spacing,
|
||||
float weight)
|
||||
Split<ParentBuilder>::AddSplit(orientation orientation, float spacing,
|
||||
float weight)
|
||||
{
|
||||
SplitBuilder builder(orientation, spacing);
|
||||
builder.SetParent(this);
|
||||
|
@ -26,7 +26,7 @@ public:
|
||||
orientation direction);
|
||||
BScrollBar(const char* name, BView* target,
|
||||
float min, float max,
|
||||
enum orientation orientation);
|
||||
orientation orientation);
|
||||
BScrollBar(BMessage* archive);
|
||||
virtual ~BScrollBar();
|
||||
static BArchivable* Instantiate(BMessage* archive);
|
||||
@ -48,7 +48,7 @@ public:
|
||||
void SetTarget(BView *target);
|
||||
void SetTarget(const char* targetName);
|
||||
BView* Target() const;
|
||||
void SetOrientation(enum orientation orientation);
|
||||
void SetOrientation(orientation orientation);
|
||||
orientation Orientation() const;
|
||||
|
||||
// TODO: Make this a virtual method, it should be one,
|
||||
|
@ -13,34 +13,30 @@
|
||||
|
||||
class BSeparatorView : public BView {
|
||||
public:
|
||||
BSeparatorView(enum orientation orientation,
|
||||
BSeparatorView(orientation orientation,
|
||||
border_style border = B_PLAIN_BORDER);
|
||||
BSeparatorView(const char* name,
|
||||
const char* label,
|
||||
enum orientation orientation
|
||||
= B_HORIZONTAL,
|
||||
orientation orientation = B_HORIZONTAL,
|
||||
border_style border = B_FANCY_BORDER,
|
||||
const BAlignment& alignment
|
||||
= BAlignment(B_ALIGN_HORIZONTAL_CENTER,
|
||||
B_ALIGN_VERTICAL_CENTER));
|
||||
BSeparatorView(const char* name,
|
||||
BView* labelView,
|
||||
enum orientation orientation
|
||||
= B_HORIZONTAL,
|
||||
orientation orientation = B_HORIZONTAL,
|
||||
border_style border = B_FANCY_BORDER,
|
||||
const BAlignment& alignment
|
||||
= BAlignment(B_ALIGN_HORIZONTAL_CENTER,
|
||||
B_ALIGN_VERTICAL_CENTER));
|
||||
BSeparatorView(const char* label = NULL,
|
||||
enum orientation orientation
|
||||
= B_HORIZONTAL,
|
||||
orientation orientation = B_HORIZONTAL,
|
||||
border_style border = B_FANCY_BORDER,
|
||||
const BAlignment& alignment
|
||||
= BAlignment(B_ALIGN_HORIZONTAL_CENTER,
|
||||
B_ALIGN_VERTICAL_CENTER));
|
||||
BSeparatorView(BView* labelView,
|
||||
enum orientation orientation
|
||||
= B_HORIZONTAL,
|
||||
orientation orientation = B_HORIZONTAL,
|
||||
border_style border = B_FANCY_BORDER,
|
||||
const BAlignment& alignment
|
||||
= BAlignment(B_ALIGN_HORIZONTAL_CENTER,
|
||||
@ -61,7 +57,7 @@ public:
|
||||
virtual BSize MaxSize();
|
||||
virtual BSize PreferredSize();
|
||||
|
||||
void SetOrientation(enum orientation orientation);
|
||||
void SetOrientation(orientation orientation);
|
||||
void SetAlignment(const BAlignment& aligment);
|
||||
void SetBorderStyle(border_style border);
|
||||
|
||||
@ -88,7 +84,7 @@ private:
|
||||
|
||||
private:
|
||||
void _Init(const char* label, BView* labelView,
|
||||
enum orientation orientation,
|
||||
orientation orientation,
|
||||
BAlignment alignment, border_style border);
|
||||
|
||||
float _BorderSize() const;
|
||||
|
@ -10,7 +10,7 @@
|
||||
class BSplitLayoutBuilder {
|
||||
public:
|
||||
BSplitLayoutBuilder(
|
||||
enum orientation orientation = B_HORIZONTAL,
|
||||
orientation orientation = B_HORIZONTAL,
|
||||
float spacing = B_USE_DEFAULT_SPACING);
|
||||
BSplitLayoutBuilder(BSplitView* view);
|
||||
|
||||
|
@ -13,8 +13,7 @@ class BSplitLayout;
|
||||
class BSplitView : public BView {
|
||||
public:
|
||||
BSplitView(
|
||||
enum orientation orientation
|
||||
= B_HORIZONTAL,
|
||||
orientation orientation = B_HORIZONTAL,
|
||||
float spacing = B_USE_DEFAULT_SPACING);
|
||||
BSplitView(BMessage* from);
|
||||
virtual ~BSplitView();
|
||||
@ -30,7 +29,7 @@ public:
|
||||
void SetSpacing(float spacing);
|
||||
|
||||
orientation Orientation() const;
|
||||
void SetOrientation(enum orientation orientation);
|
||||
void SetOrientation(orientation orientation);
|
||||
|
||||
float SplitterSize() const;
|
||||
void SetSplitterSize(float size);
|
||||
@ -86,7 +85,7 @@ protected:
|
||||
|
||||
virtual void DrawSplitter(BRect frame,
|
||||
const BRect& updateRect,
|
||||
enum orientation orientation,
|
||||
orientation orientation,
|
||||
bool pressed);
|
||||
|
||||
private:
|
||||
@ -109,7 +108,7 @@ private:
|
||||
|
||||
static void _DrawDefaultSplitter(BView* view, BRect frame,
|
||||
const BRect& updateRect,
|
||||
enum orientation orientation,
|
||||
orientation orientation,
|
||||
bool pressed);
|
||||
|
||||
private:
|
||||
|
@ -25,7 +25,7 @@ public:
|
||||
float* bottom) const;
|
||||
|
||||
void AlignLayoutWith(BTwoDimensionalLayout* other,
|
||||
enum orientation orientation);
|
||||
orientation orientation);
|
||||
|
||||
virtual BSize BaseMinSize();
|
||||
virtual BSize BaseMaxSize();
|
||||
@ -72,14 +72,14 @@ protected:
|
||||
float* preferredHeight);
|
||||
BSize SubtractInsets(BSize size);
|
||||
|
||||
virtual void PrepareItems(enum orientation orientation);
|
||||
virtual void PrepareItems(orientation orientation);
|
||||
virtual bool HasMultiColumnItems();
|
||||
virtual bool HasMultiRowItems();
|
||||
|
||||
virtual int32 InternalCountColumns() = 0;
|
||||
virtual int32 InternalCountRows() = 0;
|
||||
virtual void GetColumnRowConstraints(
|
||||
enum orientation orientation,
|
||||
orientation orientation,
|
||||
int32 index,
|
||||
ColumnRowConstraints* constraints) = 0;
|
||||
virtual void GetItemDimensions(BLayoutItem* item,
|
||||
|
@ -62,43 +62,45 @@ enum radeon_chipset {
|
||||
RADEON_RS690,
|
||||
RADEON_RS740,
|
||||
RADEON_RV515,
|
||||
RADEON_R520, //r500, Radeon X1300-X1950
|
||||
RADEON_RV530,
|
||||
RADEON_RV560,
|
||||
RADEON_RV570,
|
||||
RADEON_R580,
|
||||
RADEON_R600, //r600, Radeon HD 2000, 3000
|
||||
RADEON_RV610,
|
||||
RADEON_RV630,
|
||||
RADEON_RV670,
|
||||
RADEON_RV620,
|
||||
RADEON_RV635,
|
||||
RADEON_RS780,
|
||||
RADEON_RS880,
|
||||
RADEON_RV770, //r700, Radeon HD 4000
|
||||
RADEON_RV730,
|
||||
RADEON_RV710,
|
||||
RADEON_RV740,
|
||||
RADEON_CEDAR, //Evergreen, Radeon HD 5000
|
||||
RADEON_REDWOOD,
|
||||
RADEON_JUNIPER,
|
||||
RADEON_CYPRESS,
|
||||
RADEON_HEMLOCK,
|
||||
RADEON_PALM, //Fusion APU (NI), Radeon HD 6000
|
||||
RADEON_SUMO,
|
||||
RADEON_SUMO2,
|
||||
RADEON_CAICOS, //Nothern Islands, Radeon HD 6000 / Low end 7000
|
||||
RADEON_TURKS,
|
||||
RADEON_BARTS,
|
||||
RADEON_CAYMAN,
|
||||
RADEON_ANTILLES,
|
||||
RADEON_CAPEVERDE, //Southern Islands, Radeon HD 7000 aka ARUBA
|
||||
RADEON_BONAIRE,
|
||||
RADEON_PITCAIRN,
|
||||
RADEON_TAHITI,
|
||||
RADEON_OLAND, //Sea Islands, Radeon HD 8000
|
||||
RADEON_HAINAN, // NO DCE?
|
||||
RADEON_CURACAO,
|
||||
RADEON_R520, //r500, DCE 1.0
|
||||
RADEON_RV530, // DCE 1.0
|
||||
RADEON_RV560, // DCE 1.0
|
||||
RADEON_RV570, // DCE 1.0
|
||||
RADEON_R580, // DCE 1.0
|
||||
RADEON_R600, //r600, DCE 2.0
|
||||
RADEON_RV610, // DCE 2.0
|
||||
RADEON_RV630, // DCE 2.0
|
||||
RADEON_RV670, // DCE 2.0
|
||||
RADEON_RV620, // DCE 3.0
|
||||
RADEON_RV635, // DCE 3.0
|
||||
RADEON_RS780, // DCE 3.0
|
||||
RADEON_RS880, // DCE 3.0
|
||||
RADEON_RV770, //r700, DCE 3.1
|
||||
RADEON_RV730, // DCE 3.2
|
||||
RADEON_RV710, // DCE 3.2
|
||||
RADEON_RV740, // DCE 3.2
|
||||
RADEON_CEDAR, //Evergreen, DCE 4.0
|
||||
RADEON_REDWOOD, // DCE 4.0
|
||||
RADEON_JUNIPER, // DCE 4.0
|
||||
RADEON_CYPRESS, // DCE 4.0
|
||||
RADEON_HEMLOCK, // DCE 4.0?
|
||||
RADEON_PALM, //Fusion APU (NI), DCE 4.1
|
||||
RADEON_SUMO, // DCE 4.1
|
||||
RADEON_SUMO2, // DCE 4.1
|
||||
RADEON_CAICOS, //Nothern Islands, DCE 5.0
|
||||
RADEON_TURKS, // DCE 5.0
|
||||
RADEON_BARTS, // DCE 5.0
|
||||
RADEON_CAYMAN, // DCE 5.0
|
||||
RADEON_ANTILLES, // DCE 5.0?
|
||||
RADEON_CAPEVERDE, //Southern Islands, DCE 6.0
|
||||
RADEON_PITCAIRN, // DCE 6.0
|
||||
RADEON_TAHITI, // DCE 6.0
|
||||
RADEON_ARUBA, // DCE 6.1 Trinity/Richland
|
||||
RADEON_OLAND, // DCE 6.4
|
||||
RADEON_HAINAN, // NO DCE
|
||||
RADEON_KAVERI, //Sea Islands, DCE 8.1
|
||||
RADEON_BONAIRE, // DCE 8.2
|
||||
RADEON_KABINI, // DCE 8.3
|
||||
};
|
||||
|
||||
|
||||
|
@ -9,4 +9,6 @@ void
|
||||
pci_read_arch_info(PCIDev *dev)
|
||||
{
|
||||
pci_read_msi_info(dev);
|
||||
pci_read_msix_info(dev);
|
||||
pci_read_ht_mapping_info(dev);
|
||||
}
|
||||
|
@ -9,6 +9,8 @@
|
||||
|
||||
typedef struct pci_arch_info {
|
||||
msi_info msi;
|
||||
msix_info msix;
|
||||
ht_mapping_info ht_mapping;
|
||||
} pci_arch_info;
|
||||
|
||||
|
||||
|
@ -42,5 +42,10 @@ pci_x86_module_info gPCIArchModule = {
|
||||
&pci_configure_msi,
|
||||
&pci_unconfigure_msi,
|
||||
&pci_enable_msi,
|
||||
&pci_disable_msi
|
||||
&pci_disable_msi,
|
||||
&pci_get_msix_count,
|
||||
&pci_configure_msix,
|
||||
&pci_unconfigure_msix,
|
||||
&pci_enable_msix,
|
||||
&pci_disable_msix
|
||||
};
|
||||
|
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright 2013, Jérôme Duval, korli@users.berlios.de.
|
||||
* Copyright 2010, Michael Lotz, mmlr@mlotz.ch. All Rights Reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
@ -14,6 +15,60 @@
|
||||
extern PCI *gPCI;
|
||||
|
||||
|
||||
static void
|
||||
pci_ht_msi_map(PCIDev *device, uint64 address)
|
||||
{
|
||||
ht_mapping_info *info = &device->arch_info.ht_mapping;
|
||||
if (!info->ht_mapping_capable)
|
||||
return;
|
||||
|
||||
bool enabled = (info->control_value & PCI_ht_command_msi_enable) != 0;
|
||||
if ((address != 0) != enabled) {
|
||||
if (enabled) {
|
||||
info->control_value &= ~PCI_ht_command_msi_enable;
|
||||
} else {
|
||||
if ((address >> 20) != (info->address_value >> 20))
|
||||
return;
|
||||
dprintf("ht msi mapping enabled\n");
|
||||
info->control_value |= PCI_ht_command_msi_enable;
|
||||
}
|
||||
gPCI->WriteConfig(device, info->capability_offset + PCI_ht_command,
|
||||
info->control_value, 2);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
pci_read_ht_mapping_info(PCIDev *device)
|
||||
{
|
||||
if (!msi_supported())
|
||||
return;
|
||||
|
||||
ht_mapping_info *info = &device->arch_info.ht_mapping;
|
||||
info->ht_mapping_capable = false;
|
||||
|
||||
uint8 offset = 0;
|
||||
if (gPCI->FindHTCapability(device, PCI_ht_command_cap_msi_mapping,
|
||||
&offset) == B_OK) {
|
||||
info->control_value = gPCI->ReadConfig(device, offset + PCI_ht_command,
|
||||
2);
|
||||
info->capability_offset = offset;
|
||||
info->ht_mapping_capable = true;
|
||||
if ((info->control_value & PCI_ht_command_msi_fixed) != 0)
|
||||
info->address_value = MSI_ADDRESS_BASE;
|
||||
else {
|
||||
info->address_value = gPCI->ReadConfig(device, offset
|
||||
+ PCI_ht_msi_address_high, 4);
|
||||
info->address_value <<= 32;
|
||||
info->address_value |= gPCI->ReadConfig(device, offset
|
||||
+ PCI_ht_msi_address_low, 4);
|
||||
}
|
||||
dprintf("found an ht msi mapping at %#" B_PRIx64 "\n",
|
||||
info->address_value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
uint8
|
||||
pci_get_msi_count(uint8 virtualBus, uint8 _device, uint8 function)
|
||||
{
|
||||
@ -163,6 +218,9 @@ pci_enable_msi(uint8 virtualBus, uint8 _device, uint8 function)
|
||||
gPCI->WriteConfig(device, info->capability_offset + PCI_msi_control, 2,
|
||||
info->control_value);
|
||||
|
||||
// enable HT msi mapping (if applicable)
|
||||
pci_ht_msi_map(device, info->address_value);
|
||||
|
||||
dprintf("msi enabled: 0x%04" B_PRIx32 "\n",
|
||||
gPCI->ReadConfig(device, info->capability_offset + PCI_msi_control, 2));
|
||||
return B_OK;
|
||||
@ -192,6 +250,9 @@ pci_disable_msi(uint8 virtualBus, uint8 _device, uint8 function)
|
||||
if (info->configured_count == 0)
|
||||
return B_NO_INIT;
|
||||
|
||||
// disable HT msi mapping (if applicable)
|
||||
pci_ht_msi_map(device, 0);
|
||||
|
||||
// disable msi generation
|
||||
info->control_value &= ~PCI_msi_control_enable;
|
||||
gPCI->WriteConfig(device, info->capability_offset + PCI_msi_control, 2,
|
||||
@ -225,3 +286,282 @@ pci_read_msi_info(PCIDev *device)
|
||||
info->data_value = 0;
|
||||
info->address_value = 0;
|
||||
}
|
||||
|
||||
|
||||
uint8
|
||||
pci_get_msix_count(uint8 virtualBus, uint8 _device, uint8 function)
|
||||
{
|
||||
if (!msi_supported())
|
||||
return 0;
|
||||
|
||||
uint8 bus;
|
||||
uint8 domain;
|
||||
if (gPCI->ResolveVirtualBus(virtualBus, &domain, &bus) != B_OK)
|
||||
return 0;
|
||||
|
||||
PCIDev *device = gPCI->FindDevice(domain, bus, _device, function);
|
||||
if (device == NULL)
|
||||
return 0;
|
||||
|
||||
msix_info *info = &device->arch_info.msix;
|
||||
if (!info->msix_capable)
|
||||
return 0;
|
||||
|
||||
return info->message_count;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
pci_configure_msix(uint8 virtualBus, uint8 _device, uint8 function,
|
||||
uint8 count, uint8 *startVector)
|
||||
{
|
||||
if (!msi_supported())
|
||||
return B_UNSUPPORTED;
|
||||
|
||||
if (count == 0 || startVector == NULL)
|
||||
return B_BAD_VALUE;
|
||||
|
||||
uint8 bus;
|
||||
uint8 domain;
|
||||
status_t result = gPCI->ResolveVirtualBus(virtualBus, &domain, &bus);
|
||||
if (result != B_OK)
|
||||
return result;
|
||||
|
||||
PCIDev *device = gPCI->FindDevice(domain, bus, _device, function);
|
||||
if (device == NULL)
|
||||
return B_ERROR;
|
||||
|
||||
msix_info *info = &device->arch_info.msix;
|
||||
if (!info->msix_capable)
|
||||
return B_UNSUPPORTED;
|
||||
|
||||
if (count > 32 || count > info->message_count) {
|
||||
return B_BAD_VALUE;
|
||||
}
|
||||
|
||||
if (info->configured_count != 0)
|
||||
return B_BUSY;
|
||||
|
||||
// map the table bar
|
||||
size_t tableSize = info->message_count * 16;
|
||||
addr_t address;
|
||||
area_id area = map_physical_memory("msi table map",
|
||||
device->info.u.h0.base_registers[info->table_bar],
|
||||
tableSize + info->table_offset,
|
||||
B_ANY_KERNEL_ADDRESS, B_READ_AREA | B_WRITE_AREA, (void**)&address);
|
||||
if (area < 0)
|
||||
return area;
|
||||
info->table_area_id = area;
|
||||
info->table_address = address + info->table_offset;
|
||||
|
||||
// and the pba bar if necessary
|
||||
if (info->table_bar != info->pba_bar) {
|
||||
area = map_physical_memory("msi pba map",
|
||||
device->info.u.h0.base_registers[info->pba_bar],
|
||||
tableSize + info->pba_offset,
|
||||
B_ANY_KERNEL_ADDRESS, B_READ_AREA | B_WRITE_AREA,
|
||||
(void**)&address);
|
||||
if (area < 0) {
|
||||
delete_area(info->table_area_id);
|
||||
info->table_area_id = -1;
|
||||
return area;
|
||||
}
|
||||
info->pba_area_id = area;
|
||||
} else
|
||||
info->pba_area_id = -1;
|
||||
info->pba_address = address + info->pba_offset;
|
||||
|
||||
result = msi_allocate_vectors(count, &info->start_vector,
|
||||
&info->address_value, &info->data_value);
|
||||
if (result != B_OK) {
|
||||
delete_area(info->pba_area_id);
|
||||
delete_area(info->table_area_id);
|
||||
info->pba_area_id = -1;
|
||||
info->table_area_id = -1;
|
||||
return result;
|
||||
}
|
||||
|
||||
// ensure the memory i/o is enabled
|
||||
gPCI->WriteConfig(device, PCI_command, 2,
|
||||
gPCI->ReadConfig(device, PCI_command, 2) | PCI_command_memory);
|
||||
|
||||
uint32 data_value = info->data_value;
|
||||
for (uint32 index = 0; index < count; index++) {
|
||||
volatile uint32 *entry = (uint32*)(info->table_address + 16 * index);
|
||||
*(entry + 3) |= PCI_msix_vctrl_mask;
|
||||
*entry++ = info->address_value & 0xffffffff;
|
||||
*entry++ = info->address_value >> 32;
|
||||
*entry++ = data_value++;
|
||||
*entry &= ~PCI_msix_vctrl_mask;
|
||||
}
|
||||
|
||||
info->configured_count = count;
|
||||
*startVector = info->start_vector;
|
||||
dprintf("msix configured for %d vectors\n", count);
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
pci_unconfigure_msix(uint8 virtualBus, uint8 _device, uint8 function)
|
||||
{
|
||||
if (!msi_supported())
|
||||
return B_UNSUPPORTED;
|
||||
|
||||
uint8 bus;
|
||||
uint8 domain;
|
||||
status_t result = gPCI->ResolveVirtualBus(virtualBus, &domain, &bus);
|
||||
if (result != B_OK)
|
||||
return result;
|
||||
|
||||
PCIDev *device = gPCI->FindDevice(domain, bus, _device, function);
|
||||
if (device == NULL)
|
||||
return B_ERROR;
|
||||
|
||||
msix_info *info = &device->arch_info.msix;
|
||||
if (!info->msix_capable)
|
||||
return B_UNSUPPORTED;
|
||||
|
||||
if (info->configured_count == 0)
|
||||
return B_NO_INIT;
|
||||
|
||||
// disable msi-x generation
|
||||
info->control_value &= ~PCI_msix_control_enable;
|
||||
gPCI->WriteConfig(device, info->capability_offset + PCI_msix_control, 2,
|
||||
info->control_value);
|
||||
|
||||
msi_free_vectors(info->configured_count, info->start_vector);
|
||||
for (uint8 index = 0; index < info->configured_count; index++) {
|
||||
volatile uint32 *entry = (uint32*)(info->table_address + 16 * index);
|
||||
if ((*(entry + 3) & PCI_msix_vctrl_mask) == 0)
|
||||
*(entry + 3) |= PCI_msix_vctrl_mask;
|
||||
}
|
||||
|
||||
if (info->pba_area_id != -1)
|
||||
delete_area(info->pba_area_id);
|
||||
if (info->table_area_id != -1)
|
||||
delete_area(info->table_area_id);
|
||||
info->pba_area_id= -1;
|
||||
info->table_area_id = -1;
|
||||
|
||||
info->configured_count = 0;
|
||||
info->address_value = 0;
|
||||
info->data_value = 0;
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
pci_enable_msix(uint8 virtualBus, uint8 _device, uint8 function)
|
||||
{
|
||||
if (!msi_supported())
|
||||
return B_UNSUPPORTED;
|
||||
|
||||
uint8 bus;
|
||||
uint8 domain;
|
||||
status_t result = gPCI->ResolveVirtualBus(virtualBus, &domain, &bus);
|
||||
if (result != B_OK)
|
||||
return result;
|
||||
|
||||
PCIDev *device = gPCI->FindDevice(domain, bus, _device, function);
|
||||
if (device == NULL)
|
||||
return B_ERROR;
|
||||
|
||||
msix_info *info = &device->arch_info.msix;
|
||||
if (!info->msix_capable)
|
||||
return B_UNSUPPORTED;
|
||||
|
||||
if (info->configured_count == 0)
|
||||
return B_NO_INIT;
|
||||
|
||||
// ensure the pinned interrupt is disabled
|
||||
gPCI->WriteConfig(device, PCI_command, 2,
|
||||
gPCI->ReadConfig(device, PCI_command, 2) | PCI_command_int_disable);
|
||||
|
||||
// enable msi-x generation
|
||||
info->control_value |= PCI_msix_control_enable;
|
||||
gPCI->WriteConfig(device, info->capability_offset + PCI_msix_control, 2,
|
||||
info->control_value);
|
||||
|
||||
// enable HT msi mapping (if applicable)
|
||||
pci_ht_msi_map(device, info->address_value);
|
||||
|
||||
dprintf("msi-x enabled: 0x%04" B_PRIx32 "\n",
|
||||
gPCI->ReadConfig(device, info->capability_offset + PCI_msix_control, 2));
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
pci_disable_msix(uint8 virtualBus, uint8 _device, uint8 function)
|
||||
{
|
||||
if (!msi_supported())
|
||||
return B_UNSUPPORTED;
|
||||
|
||||
uint8 bus;
|
||||
uint8 domain;
|
||||
status_t result = gPCI->ResolveVirtualBus(virtualBus, &domain, &bus);
|
||||
if (result != B_OK)
|
||||
return result;
|
||||
|
||||
PCIDev *device = gPCI->FindDevice(domain, bus, _device, function);
|
||||
if (device == NULL)
|
||||
return B_ERROR;
|
||||
|
||||
msix_info *info = &device->arch_info.msix;
|
||||
if (!info->msix_capable)
|
||||
return B_UNSUPPORTED;
|
||||
|
||||
if (info->configured_count == 0)
|
||||
return B_NO_INIT;
|
||||
|
||||
// disable HT msi mapping (if applicable)
|
||||
pci_ht_msi_map(device, 0);
|
||||
|
||||
// disable msi-x generation
|
||||
info->control_value &= ~PCI_msix_control_enable;
|
||||
gPCI->WriteConfig(device, info->capability_offset + PCI_msix_control, 2,
|
||||
info->control_value);
|
||||
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
pci_read_msix_info(PCIDev *device)
|
||||
{
|
||||
if (!msi_supported())
|
||||
return;
|
||||
|
||||
msix_info *info = &device->arch_info.msix;
|
||||
info->msix_capable = false;
|
||||
status_t result = gPCI->FindCapability(device->domain, device->bus,
|
||||
device->device, device->function, PCI_cap_id_msix,
|
||||
&info->capability_offset);
|
||||
if (result != B_OK)
|
||||
return;
|
||||
|
||||
info->msix_capable = true;
|
||||
info->control_value = gPCI->ReadConfig(device->domain, device->bus,
|
||||
device->device, device->function,
|
||||
info->capability_offset + PCI_msix_control, 2);
|
||||
info->message_count
|
||||
= (info->control_value & PCI_msix_control_table_size) + 1;
|
||||
info->configured_count = 0;
|
||||
info->data_value = 0;
|
||||
info->address_value = 0;
|
||||
info->table_area_id = -1;
|
||||
info->pba_area_id = -1;
|
||||
uint32 table_value = gPCI->ReadConfig(device->domain, device->bus,
|
||||
device->device, device->function,
|
||||
info->capability_offset + PCI_msix_table, 4);
|
||||
uint32 pba_value = gPCI->ReadConfig(device->domain, device->bus,
|
||||
device->device, device->function,
|
||||
info->capability_offset + PCI_msix_pba, 4);
|
||||
|
||||
info->table_bar = table_value & PCI_msix_bir_mask;
|
||||
info->table_offset = table_value & PCI_msix_offset_mask;
|
||||
info->pba_bar = pba_value & PCI_msix_bir_mask;
|
||||
info->pba_offset = pba_value & PCI_msix_offset_mask;
|
||||
}
|
||||
|
||||
|
@ -1,15 +1,21 @@
|
||||
/*
|
||||
* Copyright 2013, Jérôme Duval, korli@users.berlios.de.
|
||||
* Copyright 2010, Michael Lotz, mmlr@mlotz.ch. All Rights Reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef _PCI_x86_MSI_H
|
||||
#define _PCI_x86_MSI_H
|
||||
|
||||
#include <OS.h>
|
||||
#include <SupportDefs.h>
|
||||
|
||||
|
||||
// Message Signaled Interrupts
|
||||
|
||||
|
||||
class PCIDev;
|
||||
|
||||
// Message Signaled Interrupts
|
||||
// MSI
|
||||
typedef struct msi_info {
|
||||
bool msi_capable;
|
||||
uint8 capability_offset;
|
||||
@ -30,4 +36,46 @@ status_t pci_enable_msi(uint8 virtualBus, uint8 device, uint8 function);
|
||||
status_t pci_disable_msi(uint8 virtualBus, uint8 device, uint8 function);
|
||||
void pci_read_msi_info(PCIDev *device);
|
||||
|
||||
|
||||
// MSI-X
|
||||
typedef struct msix_info {
|
||||
bool msix_capable;
|
||||
uint8 capability_offset;
|
||||
uint8 message_count;
|
||||
uint8 table_bar;
|
||||
uint32 table_offset;
|
||||
area_id table_area_id;
|
||||
addr_t table_address;
|
||||
uint8 pba_bar;
|
||||
uint32 pba_offset;
|
||||
area_id pba_area_id;
|
||||
addr_t pba_address;
|
||||
uint8 configured_count;
|
||||
uint8 start_vector;
|
||||
uint16 control_value;
|
||||
uint16 data_value;
|
||||
uint64 address_value;
|
||||
} msix_info;
|
||||
|
||||
|
||||
uint8 pci_get_msix_count(uint8 virtualBus, uint8 _device, uint8 function);
|
||||
status_t pci_configure_msix(uint8 virtualBus, uint8 _device, uint8 function,
|
||||
uint8 count, uint8 *startVector);
|
||||
status_t pci_unconfigure_msix(uint8 virtualBus, uint8 device, uint8 function);
|
||||
status_t pci_enable_msix(uint8 virtualBus, uint8 _device, uint8 function);
|
||||
status_t pci_disable_msix(uint8 virtualBus, uint8 _device, uint8 function);
|
||||
void pci_read_msix_info(PCIDev *device);
|
||||
|
||||
// HyperTransport MSI mapping
|
||||
typedef struct ht_mapping_info {
|
||||
bool ht_mapping_capable;
|
||||
uint8 capability_offset;
|
||||
uint16 control_value;
|
||||
uint64 address_value;
|
||||
} ht_mapping_info;
|
||||
|
||||
|
||||
void pci_read_ht_mapping_info(PCIDev *device);
|
||||
|
||||
|
||||
#endif // _PCI_x86_MSI_H
|
||||
|
@ -1668,6 +1668,60 @@ PCI::FindExtendedCapability(PCIDev *device, uint16 capID, uint16 *offset)
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
PCI::FindHTCapability(uint8 domain, uint8 bus, uint8 device,
|
||||
uint8 function, uint16 capID, uint8 *offset)
|
||||
{
|
||||
uint8 capPointer;
|
||||
// consider the passed offset as the current ht capability block pointer
|
||||
// when it's non zero
|
||||
if (offset != NULL && *offset != 0) {
|
||||
capPointer = ReadConfig(domain, bus, device, function, *offset + 1,
|
||||
1);
|
||||
} else if (FindCapability(domain, bus, device, function, PCI_cap_id_ht,
|
||||
&capPointer) != B_OK) {
|
||||
FLOW("PCI:FindHTCapability ERROR %u:%u:%u capability %#02x "
|
||||
"not supported\n", bus, device, function, capID);
|
||||
return B_NAME_NOT_FOUND;
|
||||
}
|
||||
|
||||
uint16 mask = PCI_ht_command_cap_mask_5_bits;
|
||||
if (capID == PCI_ht_command_cap_slave || capID == PCI_ht_command_cap_host)
|
||||
mask = PCI_ht_command_cap_mask_3_bits;
|
||||
for (int i = 0; i < 48; i++) {
|
||||
capPointer &= ~3;
|
||||
if (capPointer == 0)
|
||||
return B_NAME_NOT_FOUND;
|
||||
|
||||
uint8 capability = ReadConfig(domain, bus, device, function,
|
||||
capPointer, 1);
|
||||
if (capability == PCI_cap_id_ht) {
|
||||
if ((ReadConfig(domain, bus, device, function,
|
||||
capPointer + PCI_ht_command, 2) & mask) == capID) {
|
||||
if (offset != NULL)
|
||||
*offset = capPointer;
|
||||
return B_OK;
|
||||
}
|
||||
}
|
||||
|
||||
capPointer = ReadConfig(domain, bus, device, function, capPointer + 1,
|
||||
1);
|
||||
}
|
||||
|
||||
TRACE_CAP("PCI:FindHTCapability ERROR %u:%u:%u capability %#04x "
|
||||
"circular list\n", bus, device, function, capID);
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
PCI::FindHTCapability(PCIDev *device, uint16 capID, uint8 *offset)
|
||||
{
|
||||
return FindHTCapability(device->domain, device->bus, device->device,
|
||||
device->function, capID, offset);
|
||||
}
|
||||
|
||||
|
||||
PCIDev *
|
||||
PCI::FindDevice(uint8 domain, uint8 bus, uint8 device, uint8 function)
|
||||
{
|
||||
|
@ -100,7 +100,12 @@ public:
|
||||
uint16 *offset = NULL);
|
||||
status_t FindExtendedCapability(PCIDev *device,
|
||||
uint16 capID, uint16 *offset = NULL);
|
||||
|
||||
status_t FindHTCapability(uint8 domain, uint8 bus,
|
||||
uint8 device, uint8 function, uint16 capID,
|
||||
uint8 *offset);
|
||||
status_t FindHTCapability(PCIDev *device,
|
||||
uint16 capID, uint8 *offset = NULL);
|
||||
|
||||
status_t ResolveVirtualBus(uint8 virtualBus, uint8 *domain,
|
||||
uint8 *bus);
|
||||
|
||||
|
@ -310,8 +310,8 @@ get_capability_name(uint8 cap_id)
|
||||
return "CompactPCIHotSwap";
|
||||
case PCI_cap_id_pcix:
|
||||
return "PCI-X";
|
||||
case PCI_cap_id_ldt:
|
||||
return "ldt";
|
||||
case PCI_cap_id_ht:
|
||||
return "HyperTransport";
|
||||
case PCI_cap_id_vendspec:
|
||||
return "vendspec";
|
||||
case PCI_cap_id_debugport:
|
||||
|
@ -160,8 +160,9 @@ const struct supported_device {
|
||||
{0x9460, 3, 1, RADEON_RV770, CHIP_STD, "Radeon HD 4890"},
|
||||
|
||||
// From here on AMD no longer used numeric identifiers
|
||||
// Marketing names can collide for different generations of cards
|
||||
// as such we should ignore them at all costs (besides the card name)
|
||||
|
||||
// Marketing Names: Radeon HD 5450 - HD 6320
|
||||
// Introduced: 2009
|
||||
// Codename: Evergreen
|
||||
// Process: 40 nm
|
||||
@ -210,7 +211,6 @@ const struct supported_device {
|
||||
{0x9644, 4, 1, RADEON_SUMO2, CHIP_APU, "Radeon HD 6410D"},
|
||||
{0x9645, 4, 1, RADEON_SUMO2, CHIP_APU, "Radeon HD SUMO2 M"},
|
||||
|
||||
// Radeon HD 6450 - HD 7670
|
||||
// Introduced: 2010
|
||||
// Codename: Nothern Islands
|
||||
// Process: 40 nm
|
||||
@ -268,11 +268,11 @@ const struct supported_device {
|
||||
// Antilles (Top, Dual GPU)
|
||||
{0x671d, 5, 0, RADEON_ANTILLES, CHIP_STD, "Radeon HD 6990"},
|
||||
|
||||
// Marketing Names: Radeon HD 7750 - HD 79xx
|
||||
|
||||
// Introduced: Late 2011
|
||||
// Codename: Southern Islands
|
||||
// Process: 28 nm
|
||||
// Cape Verde (TODO: Need to find friendly names)
|
||||
// Cape Verde
|
||||
{0x6820, 6, 0, RADEON_CAPEVERDE, CHIP_STD, "Radeon HD Verde"},
|
||||
{0x6821, 6, 0, RADEON_CAPEVERDE, CHIP_STD, "Radeon HD Verde"},
|
||||
{0x6823, 6, 0, RADEON_CAPEVERDE, CHIP_STD, "Radeon HD Verde"},
|
||||
@ -292,14 +292,7 @@ const struct supported_device {
|
||||
{0x683b, 6, 0, RADEON_CAPEVERDE, CHIP_STD, "Radeon HD Verde"},
|
||||
{0x683f, 6, 0, RADEON_CAPEVERDE, CHIP_STD, "Radeon HD 7750"},
|
||||
{0x683d, 6, 0, RADEON_CAPEVERDE, CHIP_STD, "Radeon HD 7770"},
|
||||
// Bonaire (TODO: Need to find friendly names)
|
||||
{0x6649, 6, 0, RADEON_BONAIRE, CHIP_STD, "Radeon HD Bonaire"},
|
||||
{0x6650, 6, 0, RADEON_BONAIRE, CHIP_STD, "Radeon HD Bonaire"},
|
||||
{0x6651, 6, 0, RADEON_BONAIRE, CHIP_STD, "Radeon HD Bonaire"},
|
||||
{0x6658, 6, 0, RADEON_BONAIRE, CHIP_STD, "Radeon HD Bonaire"},
|
||||
{0x665c, 6, 0, RADEON_BONAIRE, CHIP_STD, "Radeon HD 7790"},
|
||||
{0x665d, 6, 0, RADEON_BONAIRE, CHIP_STD, "Radeon HD Bonaire"},
|
||||
// Pitcairn (TODO: Need to find friendly names)
|
||||
// Pitcairn
|
||||
{0x6800, 6, 0, RADEON_PITCAIRN, CHIP_MOBILE, "Radeon HD 7970"},
|
||||
{0x6801, 6, 0, RADEON_PITCAIRN, CHIP_STD, "Radeon HD Pitcairn"},
|
||||
{0x6802, 6, 0, RADEON_PITCAIRN, CHIP_STD, "Radeon HD Pitcairn"},
|
||||
@ -309,7 +302,7 @@ const struct supported_device {
|
||||
{0x6818, 6, 0, RADEON_PITCAIRN, CHIP_STD, "Radeon HD 7870"},
|
||||
{0x6819, 6, 0, RADEON_PITCAIRN, CHIP_STD, "Radeon HD 7800"},
|
||||
{0x684c, 6, 0, RADEON_PITCAIRN, CHIP_STD, "Radeon HD Pitcairn"},
|
||||
// Tahiti (TODO: Need to find friendly names)
|
||||
// Tahiti
|
||||
{0x6780, 6, 0, RADEON_TAHITI, CHIP_STD, "Radeon HD Tahiti"},
|
||||
{0x6784, 6, 0, RADEON_TAHITI, CHIP_STD, "Radeon HD Tahiti"},
|
||||
{0x6788, 6, 0, RADEON_TAHITI, CHIP_STD, "Radeon HD Tahiti"},
|
||||
@ -320,21 +313,27 @@ const struct supported_device {
|
||||
{0x679a, 6, 0, RADEON_TAHITI, CHIP_STD, "Radeon HD 7950"},
|
||||
{0x6798, 6, 0, RADEON_TAHITI, CHIP_STD, "Radeon HD 7970"},
|
||||
{0x6799, 6, 0, RADEON_TAHITI, CHIP_STD, "Radeon HD 7990"},
|
||||
// Aruba DCE 6.1 Trinity / Richland
|
||||
// Oland DCE 6,4
|
||||
// Hainan NODCE. No display hardware, OpenCL 3D engine.
|
||||
|
||||
// Marketing Names: Radeon HD 83xx - HD 89xx
|
||||
// Introduced: Late 2013
|
||||
// Codename: Sea Islands
|
||||
// Process: 28 nm
|
||||
// Oland DCE 6,4
|
||||
// Hainan NO DCE?
|
||||
// Curacao ????
|
||||
// Kaveri DCE 8.1
|
||||
// Bonaire DCE 8.2
|
||||
{0x6649, 8, 2, RADEON_BONAIRE, CHIP_STD, "Radeon HD Bonaire"},
|
||||
{0x6650, 8, 2, RADEON_BONAIRE, CHIP_STD, "Radeon HD Bonaire"},
|
||||
{0x6651, 8, 2, RADEON_BONAIRE, CHIP_STD, "Radeon HD Bonaire"},
|
||||
{0x6658, 8, 2, RADEON_BONAIRE, CHIP_STD, "Radeon HD Bonaire"},
|
||||
{0x665c, 8, 2, RADEON_BONAIRE, CHIP_STD, "Radeon HD 7790"},
|
||||
{0x665d, 8, 2, RADEON_BONAIRE, CHIP_STD, "Radeon HD Bonaire"},
|
||||
// Kabini DCE 8.3
|
||||
|
||||
// Marketing Names: Radeon HD 9xxx - HD 9xxx
|
||||
// Introduced: 2014?
|
||||
// Codename: Volcanic Islands
|
||||
// Process: 20 nm
|
||||
|
||||
// Marketing Names: Radeon HD 9xxx - HD 9xxx
|
||||
// Introduced: 2015?
|
||||
// Codename: Pirate Islands
|
||||
// Process: ?? nm
|
||||
|
@ -30,7 +30,8 @@ enum {
|
||||
MSG_SET_STOP_FOR_CUSTOM_IMAGES = 'sfci',
|
||||
MSG_IMAGE_NAME_SELECTION_CHANGED = 'insc',
|
||||
MSG_ADD_IMAGE_NAME = 'anin',
|
||||
MSG_REMOVE_IMAGE_NAME = 'arin'
|
||||
MSG_REMOVE_IMAGE_NAME = 'arin',
|
||||
MSG_IMAGE_NAME_INPUT_CHANGED = 'inic'
|
||||
};
|
||||
|
||||
|
||||
@ -43,13 +44,6 @@ static int SortStringItems(const void* a, const void* b)
|
||||
}
|
||||
|
||||
|
||||
static bool UpdateItemState(BListItem* item, void* enabled)
|
||||
{
|
||||
item->SetEnabled((bool)enabled);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
BreakConditionConfigWindow::BreakConditionConfigWindow(::Team* team,
|
||||
UserInterfaceListener* listener, BHandler* target)
|
||||
:
|
||||
@ -57,6 +51,8 @@ BreakConditionConfigWindow::BreakConditionConfigWindow(::Team* team,
|
||||
B_AUTO_UPDATE_SIZE_LIMITS | B_CLOSE_ON_ESCAPE),
|
||||
fTeam(team),
|
||||
fListener(listener),
|
||||
fExceptionSettingsBox(NULL),
|
||||
fImageSettingsBox(NULL),
|
||||
fExceptionThrown(NULL),
|
||||
fExceptionCaught(NULL),
|
||||
fStopOnImageLoad(NULL),
|
||||
@ -65,6 +61,8 @@ BreakConditionConfigWindow::BreakConditionConfigWindow(::Team* team,
|
||||
fStopImageNameInput(NULL),
|
||||
fAddImageNameButton(NULL),
|
||||
fRemoveImageNameButton(NULL),
|
||||
fCustomImageGroup(NULL),
|
||||
fStopOnLoadEnabled(false),
|
||||
fUseCustomImages(false),
|
||||
fCloseButton(NULL),
|
||||
fTarget(target)
|
||||
@ -116,19 +114,17 @@ BreakConditionConfigWindow::MessageReceived(BMessage* message)
|
||||
|
||||
case MSG_SET_STOP_FOR_ALL_IMAGES:
|
||||
{
|
||||
fUseCustomImages = false;
|
||||
fListener->SetStopOnImageLoadRequested(
|
||||
fStopOnImageLoad->Value() == B_CONTROL_ON,
|
||||
fUseCustomImages);
|
||||
false);
|
||||
break;
|
||||
}
|
||||
|
||||
case MSG_SET_STOP_FOR_CUSTOM_IMAGES:
|
||||
{
|
||||
fUseCustomImages = true;
|
||||
fListener->SetStopOnImageLoadRequested(
|
||||
fStopOnImageLoad->Value() == B_CONTROL_ON,
|
||||
fUseCustomImages);
|
||||
true);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -142,6 +138,14 @@ BreakConditionConfigWindow::MessageReceived(BMessage* message)
|
||||
break;
|
||||
}
|
||||
|
||||
case MSG_IMAGE_NAME_INPUT_CHANGED:
|
||||
{
|
||||
BString imageName(fStopImageNameInput->Text());
|
||||
imageName.Trim();
|
||||
fAddImageNameButton->SetEnabled(!imageName.IsEmpty());
|
||||
break;
|
||||
}
|
||||
|
||||
case MSG_STOP_ON_IMAGE_LOAD:
|
||||
{
|
||||
fListener->SetStopOnImageLoadRequested(
|
||||
@ -152,13 +156,14 @@ BreakConditionConfigWindow::MessageReceived(BMessage* message)
|
||||
|
||||
case MSG_STOP_IMAGE_SETTINGS_CHANGED:
|
||||
{
|
||||
_UpdateStopImageButtons();
|
||||
_UpdateStopImageState();
|
||||
break;
|
||||
}
|
||||
|
||||
case MSG_ADD_IMAGE_NAME:
|
||||
{
|
||||
BString imageName(fStopImageNameInput->Text());
|
||||
imageName.Trim();
|
||||
AutoLocker< ::Team> teamLocker(fTeam);
|
||||
if (fTeam->StopImageNames().HasString(imageName))
|
||||
break;
|
||||
@ -268,18 +273,16 @@ BreakConditionConfigWindow::StopOnImageLoadNameRemoved(
|
||||
void
|
||||
BreakConditionConfigWindow::_Init()
|
||||
{
|
||||
BBox* exceptionSettingsBox = new BBox("exceptionBox");
|
||||
exceptionSettingsBox->SetLabel("Exceptions");
|
||||
exceptionSettingsBox->AddChild(BLayoutBuilder::Group<>()
|
||||
.AddGroup(B_VERTICAL)
|
||||
.SetInsets(B_USE_DEFAULT_SPACING)
|
||||
.Add(fExceptionThrown = new BCheckBox("exceptionThrown",
|
||||
"Stop when an exception is thrown",
|
||||
new BMessage(MSG_STOP_ON_THROWN_EXCEPTION_CHANGED)))
|
||||
.Add(fExceptionCaught = new BCheckBox("exceptionCaught",
|
||||
"Stop when an exception is caught",
|
||||
new BMessage(MSG_STOP_ON_CAUGHT_EXCEPTION_CHANGED)))
|
||||
.End()
|
||||
fExceptionSettingsBox = new BBox("exceptionBox");
|
||||
fExceptionSettingsBox->SetLabel("Exceptions");
|
||||
fExceptionSettingsBox->AddChild(BLayoutBuilder::Group<>(B_VERTICAL,
|
||||
B_USE_DEFAULT_SPACING)
|
||||
.Add(fExceptionThrown = new BCheckBox("exceptionThrown",
|
||||
"Stop when an exception is thrown",
|
||||
new BMessage(MSG_STOP_ON_THROWN_EXCEPTION_CHANGED)))
|
||||
.Add(fExceptionCaught = new BCheckBox("exceptionCaught",
|
||||
"Stop when an exception is caught",
|
||||
new BMessage(MSG_STOP_ON_CAUGHT_EXCEPTION_CHANGED)))
|
||||
.View());
|
||||
|
||||
fExceptionThrown->SetTarget(this);
|
||||
@ -289,8 +292,8 @@ BreakConditionConfigWindow::_Init()
|
||||
fExceptionCaught->SetEnabled(false);
|
||||
|
||||
|
||||
BBox* imageSettingsBox = new BBox("imageBox");
|
||||
imageSettingsBox->SetLabel("Images");
|
||||
fImageSettingsBox = new BBox("imageBox");
|
||||
fImageSettingsBox->SetLabel("Images");
|
||||
BMenu* stopImageMenu = new BMenu("stopImageTypesMenu");
|
||||
|
||||
stopImageMenu->AddItem(new BMenuItem("All",
|
||||
@ -303,26 +306,28 @@ BreakConditionConfigWindow::_Init()
|
||||
fStopImageNames->SetSelectionMessage(
|
||||
new BMessage(MSG_IMAGE_NAME_SELECTION_CHANGED));
|
||||
|
||||
imageSettingsBox->AddChild(BLayoutBuilder::Group<>()
|
||||
.AddGroup(B_VERTICAL)
|
||||
.SetInsets(B_USE_DEFAULT_SPACING)
|
||||
.Add(fStopOnImageLoad = new BCheckBox("stopOnImage",
|
||||
"Stop when an image is loaded",
|
||||
new BMessage(MSG_STOP_ON_IMAGE_LOAD)))
|
||||
.Add(fStopImageConstraints = new BMenuField(
|
||||
"stopTypes", "Types:", stopImageMenu))
|
||||
.Add(new BScrollView("stopImageScroll", fStopImageNames,
|
||||
0, false, true))
|
||||
.Add(fStopImageNameInput = new BTextControl("stopImageName",
|
||||
"Image:", NULL, NULL))
|
||||
.AddGroup(B_HORIZONTAL)
|
||||
.AddGlue()
|
||||
.Add(fAddImageNameButton = new BButton("Add",
|
||||
new BMessage(MSG_ADD_IMAGE_NAME)))
|
||||
.Add(fRemoveImageNameButton = new BButton("Remove",
|
||||
new BMessage(MSG_REMOVE_IMAGE_NAME)))
|
||||
.End()
|
||||
.End()
|
||||
fCustomImageGroup = new BGroupView();
|
||||
BLayoutBuilder::Group<>(fCustomImageGroup, B_VERTICAL, 0.0)
|
||||
.Add(new BScrollView("stopImageScroll", fStopImageNames,
|
||||
0, false, true))
|
||||
.Add(fStopImageNameInput = new BTextControl("stopImageName",
|
||||
"Image:", NULL, NULL))
|
||||
.AddGroup(B_HORIZONTAL)
|
||||
.AddGlue()
|
||||
.Add(fAddImageNameButton = new BButton("Add",
|
||||
new BMessage(MSG_ADD_IMAGE_NAME)))
|
||||
.Add(fRemoveImageNameButton = new BButton("Remove",
|
||||
new BMessage(MSG_REMOVE_IMAGE_NAME)))
|
||||
.End();
|
||||
|
||||
fImageSettingsBox->AddChild(BLayoutBuilder::Group<>(B_VERTICAL)
|
||||
.SetInsets(B_USE_DEFAULT_SPACING)
|
||||
.Add(fStopOnImageLoad = new BCheckBox("stopOnImage",
|
||||
"Stop when an image is loaded",
|
||||
new BMessage(MSG_STOP_ON_IMAGE_LOAD)))
|
||||
.Add(fStopImageConstraints = new BMenuField(
|
||||
"stopTypes", "Types:", stopImageMenu))
|
||||
.Add(fCustomImageGroup)
|
||||
.View());
|
||||
|
||||
font_height fontHeight;
|
||||
@ -333,8 +338,8 @@ BreakConditionConfigWindow::_Init()
|
||||
|
||||
BLayoutBuilder::Group<>(this, B_VERTICAL)
|
||||
.SetInsets(B_USE_DEFAULT_SPACING)
|
||||
.Add(exceptionSettingsBox)
|
||||
.Add(imageSettingsBox)
|
||||
.Add(fExceptionSettingsBox)
|
||||
.Add(fImageSettingsBox)
|
||||
.AddGroup(B_HORIZONTAL)
|
||||
.AddGlue()
|
||||
.Add(fCloseButton = new BButton("Close", new BMessage(
|
||||
@ -343,8 +348,14 @@ BreakConditionConfigWindow::_Init()
|
||||
|
||||
|
||||
fCloseButton->SetTarget(this);
|
||||
fAddImageNameButton->SetEnabled(false);
|
||||
fRemoveImageNameButton->SetEnabled(false);
|
||||
stopImageMenu->SetTargetForItems(this);
|
||||
stopImageMenu->SetLabelFromMarked(true);
|
||||
fStopImageNameInput->SetModificationMessage(
|
||||
new BMessage(MSG_IMAGE_NAME_INPUT_CHANGED));
|
||||
|
||||
fCustomImageGroup->Hide();
|
||||
|
||||
AutoLocker< ::Team> teamLocker(fTeam);
|
||||
_UpdateStopImageState();
|
||||
@ -418,9 +429,15 @@ BreakConditionConfigWindow::_UpdateExceptionState()
|
||||
void
|
||||
BreakConditionConfigWindow::_UpdateStopImageState()
|
||||
{
|
||||
bool previousStop = fStopOnLoadEnabled;
|
||||
bool previousCustomImages = fUseCustomImages && fStopOnLoadEnabled;
|
||||
|
||||
fStopOnLoadEnabled = fTeam->StopOnImageLoad();
|
||||
fStopOnImageLoad->SetValue(
|
||||
fStopOnLoadEnabled ? B_CONTROL_ON : B_CONTROL_OFF);
|
||||
fUseCustomImages = fTeam->StopImageNameListEnabled();
|
||||
fStopImageConstraints->Menu()->ItemAt(0)->SetMarked(!fUseCustomImages);
|
||||
fStopImageConstraints->Menu()->ItemAt(1)->SetMarked(fUseCustomImages);
|
||||
fStopImageConstraints->Menu()
|
||||
->ItemAt(fTeam->StopImageNameListEnabled() ? 1 : 0)->SetMarked(true);
|
||||
|
||||
fStopImageNames->MakeEmpty();
|
||||
const BStringList& imageNames = fTeam->StopImageNames();
|
||||
@ -436,20 +453,18 @@ BreakConditionConfigWindow::_UpdateStopImageState()
|
||||
itemDeleter.Detach();
|
||||
}
|
||||
|
||||
_UpdateStopImageButtons();
|
||||
_UpdateStopImageButtons(previousStop, previousCustomImages);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
BreakConditionConfigWindow::_UpdateStopImageButtons()
|
||||
BreakConditionConfigWindow::_UpdateStopImageButtons(bool previousStop,
|
||||
bool previousCustomImages)
|
||||
{
|
||||
bool stopOnImageLoad = fTeam->StopOnImageLoad();
|
||||
fStopOnImageLoad->SetValue(stopOnImageLoad ? B_CONTROL_ON : B_CONTROL_OFF);
|
||||
bool enabled = stopOnImageLoad && fUseCustomImages;
|
||||
fStopImageConstraints->SetEnabled(stopOnImageLoad);
|
||||
fAddImageNameButton->SetEnabled(enabled);
|
||||
fRemoveImageNameButton->SetEnabled(enabled
|
||||
&& fStopImageNames->CurrentSelection() >= 0);
|
||||
fStopImageNames->DoForEach(UpdateItemState, (void*)enabled);
|
||||
fStopImageNameInput->TextView()->MakeEditable(enabled);
|
||||
fStopImageConstraints->SetEnabled(fStopOnLoadEnabled);
|
||||
bool showCustomGroup = fUseCustomImages && fStopOnLoadEnabled;
|
||||
if (!previousCustomImages && showCustomGroup)
|
||||
fCustomImageGroup->Show();
|
||||
else if (previousCustomImages && !showCustomGroup)
|
||||
fCustomImageGroup->Hide();
|
||||
}
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include "types/Types.h"
|
||||
|
||||
|
||||
class BBox;
|
||||
class BButton;
|
||||
class BCheckBox;
|
||||
class BListView;
|
||||
@ -56,7 +57,8 @@ private:
|
||||
|
||||
void _UpdateExceptionState();
|
||||
void _UpdateStopImageState();
|
||||
void _UpdateStopImageButtons();
|
||||
void _UpdateStopImageButtons(bool previousStop,
|
||||
bool previousCustomImages);
|
||||
// must be called with team lock held
|
||||
|
||||
|
||||
@ -64,6 +66,8 @@ private:
|
||||
private:
|
||||
::Team* fTeam;
|
||||
UserInterfaceListener* fListener;
|
||||
BBox* fExceptionSettingsBox;
|
||||
BBox* fImageSettingsBox;
|
||||
BCheckBox* fExceptionThrown;
|
||||
BCheckBox* fExceptionCaught;
|
||||
BCheckBox* fStopOnImageLoad;
|
||||
@ -72,6 +76,8 @@ private:
|
||||
BTextControl* fStopImageNameInput;
|
||||
BButton* fAddImageNameButton;
|
||||
BButton* fRemoveImageNameButton;
|
||||
BView* fCustomImageGroup;
|
||||
bool fStopOnLoadEnabled;
|
||||
bool fUseCustomImages;
|
||||
BButton* fCloseButton;
|
||||
BHandler* fTarget;
|
||||
|
@ -902,43 +902,42 @@ SourceView::MarkerView::Draw(BRect updateRect)
|
||||
// get the lines intersecting with the update rect
|
||||
int32 minLine, maxLine;
|
||||
GetLineRange(updateRect, minLine, maxLine);
|
||||
if (minLine > maxLine)
|
||||
return;
|
||||
if (minLine <= maxLine) {
|
||||
// get the markers in that range
|
||||
SourceView::MarkerManager::MarkerList markers;
|
||||
fMarkerManager->GetMarkers(minLine, maxLine, markers);
|
||||
|
||||
// get the markers in that range
|
||||
SourceView::MarkerManager::MarkerList markers;
|
||||
fMarkerManager->GetMarkers(minLine, maxLine, markers);
|
||||
float width = Bounds().Width();
|
||||
|
||||
float width = Bounds().Width();
|
||||
AutoLocker<SourceCode> sourceLocker(fSourceCode);
|
||||
|
||||
AutoLocker<SourceCode> sourceLocker(fSourceCode);
|
||||
int32 markerIndex = 0;
|
||||
for (int32 line = minLine; line <= maxLine; line++) {
|
||||
bool drawBreakpointOptionMarker = true;
|
||||
|
||||
int32 markerIndex = 0;
|
||||
for (int32 line = minLine; line <= maxLine; line++) {
|
||||
bool drawBreakpointOptionMarker = true;
|
||||
SourceView::MarkerManager::Marker* marker;
|
||||
FillRect(LineRect(line), B_SOLID_LOW);
|
||||
while ((marker = markers.ItemAt(markerIndex)) != NULL
|
||||
&& marker->Line() == (uint32)line) {
|
||||
marker->Draw(this, LineRect(line));
|
||||
drawBreakpointOptionMarker = false;
|
||||
markerIndex++;
|
||||
}
|
||||
|
||||
SourceView::MarkerManager::Marker* marker;
|
||||
FillRect(LineRect(line), B_SOLID_LOW);
|
||||
while ((marker = markers.ItemAt(markerIndex)) != NULL
|
||||
&& marker->Line() == (uint32)line) {
|
||||
marker->Draw(this, LineRect(line));
|
||||
drawBreakpointOptionMarker = false;
|
||||
markerIndex++;
|
||||
if (!drawBreakpointOptionMarker)
|
||||
continue;
|
||||
|
||||
SourceLocation statementStart, statementEnd;
|
||||
if (!fSourceCode->GetStatementLocationRange(SourceLocation(line),
|
||||
statementStart, statementEnd)
|
||||
|| statementStart.Line() != line) {
|
||||
continue;
|
||||
}
|
||||
|
||||
float y = ((float)line + 0.5f) * fFontInfo->lineHeight;
|
||||
SetHighColor(fBreakpointOptionMarker);
|
||||
FillEllipse(BPoint(width - 8, y), 2, 2);
|
||||
}
|
||||
|
||||
if (!drawBreakpointOptionMarker)
|
||||
continue;
|
||||
|
||||
SourceLocation statementStart, statementEnd;
|
||||
if (!fSourceCode->GetStatementLocationRange(SourceLocation(line),
|
||||
statementStart, statementEnd)
|
||||
|| statementStart.Line() != line) {
|
||||
continue;
|
||||
}
|
||||
|
||||
float y = ((float)line + 0.5f) * fFontInfo->lineHeight;
|
||||
SetHighColor(fBreakpointOptionMarker);
|
||||
FillEllipse(BPoint(width - 8, y), 2, 2);
|
||||
}
|
||||
|
||||
float y = (maxLine + 1) * fFontInfo->lineHeight;
|
||||
@ -1154,6 +1153,7 @@ SourceView::TextView::Draw(BRect updateRect)
|
||||
|
||||
y = (maxLine + 1) * fFontInfo->lineHeight;
|
||||
if (y < updateRect.bottom) {
|
||||
SetLowColor(ui_color(B_DOCUMENT_BACKGROUND_COLOR));
|
||||
FillRect(BRect(0.0, y, Bounds().right, updateRect.bottom),
|
||||
B_SOLID_LOW);
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright 2009-2012, Ingo Weinhold, ingo_weinhold@gmx.de.
|
||||
* Copyright 2013, Rene Gollent, rene@gollent.com.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
@ -121,6 +122,11 @@ ValueLoader::LoadValue(ValueLocation* location, type_code valueType,
|
||||
uint32 bytesToRead = piece.size;
|
||||
uint32 bitSize = piece.bitSize;
|
||||
uint8 bitOffset = piece.bitOffset;
|
||||
// TODO: the offset's ordinal position and direction aren't
|
||||
// specified by DWARF, and simply follow the target language.
|
||||
// To handle non C/C++ languages properly, the corresponding
|
||||
// SourceLanguage will need to be passed in and extended to
|
||||
// return the relevant information.
|
||||
|
||||
switch (piece.type) {
|
||||
case VALUE_PIECE_LOCATION_INVALID:
|
||||
@ -178,8 +184,10 @@ ValueLoader::LoadValue(ValueLocation* location, type_code valueType,
|
||||
if (registerValue.Size() < bytesToRead)
|
||||
return B_ENTRY_NOT_FOUND;
|
||||
|
||||
if (!bigEndian)
|
||||
if (!bigEndian) {
|
||||
registerValue.SwapEndianess();
|
||||
bitOffset = registerValue.Size() * 8 - bitOffset - bitSize;
|
||||
}
|
||||
valueBuffer.AddBits(registerValue.Bytes(), bitSize, bitOffset);
|
||||
break;
|
||||
}
|
||||
|
@ -1156,7 +1156,8 @@ void
|
||||
TermView::AttachedToWindow()
|
||||
{
|
||||
fMouseButtons = 0;
|
||||
fModifiers = modifiers();
|
||||
|
||||
_UpdateModifiers();
|
||||
|
||||
// update the terminal size because it may have changed while the TermView
|
||||
// was detached from the window. On such conditions FrameResized was not
|
||||
@ -1380,14 +1381,9 @@ TermView::WindowActivated(bool active)
|
||||
_Deactivate();
|
||||
}
|
||||
|
||||
fActiveState->WindowActivated(active);
|
||||
_UpdateModifiers();
|
||||
|
||||
if (active) {
|
||||
int32 oldModifiers = fModifiers;
|
||||
fModifiers = modifiers();
|
||||
if (fModifiers != oldModifiers)
|
||||
fActiveState->ModifiersChanged(oldModifiers, fModifiers);
|
||||
}
|
||||
fActiveState->WindowActivated(active);
|
||||
}
|
||||
|
||||
|
||||
@ -1409,6 +1405,8 @@ TermView::MakeFocus(bool focusState)
|
||||
void
|
||||
TermView::KeyDown(const char *bytes, int32 numBytes)
|
||||
{
|
||||
_UpdateModifiers();
|
||||
|
||||
fActiveState->KeyDown(bytes, numBytes);
|
||||
}
|
||||
|
||||
@ -1601,10 +1599,7 @@ TermView::MessageReceived(BMessage *msg)
|
||||
|
||||
case B_MODIFIERS_CHANGED:
|
||||
{
|
||||
int32 oldModifiers = fModifiers;
|
||||
fModifiers = msg->GetInt32("modifiers", 0);
|
||||
if (fModifiers != oldModifiers)
|
||||
fActiveState->ModifiersChanged(oldModifiers, fModifiers);
|
||||
_UpdateModifiers();
|
||||
break;
|
||||
}
|
||||
|
||||
@ -2376,6 +2371,8 @@ TermView::MouseDown(BPoint where)
|
||||
if (!IsFocus())
|
||||
MakeFocus();
|
||||
|
||||
_UpdateModifiers();
|
||||
|
||||
BMessage* currentMessage = Window()->CurrentMessage();
|
||||
int32 buttons = currentMessage->GetInt32("buttons", 0);
|
||||
|
||||
@ -2389,6 +2386,8 @@ TermView::MouseDown(BPoint where)
|
||||
void
|
||||
TermView::MouseMoved(BPoint where, uint32 transit, const BMessage *message)
|
||||
{
|
||||
_UpdateModifiers();
|
||||
|
||||
fActiveState->MouseMoved(where, transit, message, fModifiers);
|
||||
}
|
||||
|
||||
@ -2396,6 +2395,8 @@ TermView::MouseMoved(BPoint where, uint32 transit, const BMessage *message)
|
||||
void
|
||||
TermView::MouseUp(BPoint where)
|
||||
{
|
||||
_UpdateModifiers();
|
||||
|
||||
int32 buttons = Window()->CurrentMessage()->GetInt32("buttons", 0);
|
||||
|
||||
fActiveState->MouseUp(where, buttons);
|
||||
@ -2975,6 +2976,19 @@ TermView::_CancelInputMethod()
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TermView::_UpdateModifiers()
|
||||
{
|
||||
// TODO: This method is a general work-around for missing or out-of-order
|
||||
// B_MODIFIERS_CHANGED messages. This should really be fixed where it is
|
||||
// broken (app server?).
|
||||
int32 oldModifiers = fModifiers;
|
||||
fModifiers = modifiers();
|
||||
if (fModifiers != oldModifiers && fActiveState != NULL)
|
||||
fActiveState->ModifiersChanged(oldModifiers, fModifiers);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TermView::_NextState(State* state)
|
||||
{
|
||||
|
@ -251,6 +251,8 @@ private:
|
||||
void _HandleInputMethodLocationRequest();
|
||||
void _CancelInputMethod();
|
||||
|
||||
void _UpdateModifiers();
|
||||
|
||||
void _NextState(State* state);
|
||||
|
||||
private:
|
||||
|
@ -686,13 +686,13 @@ dump_cpus(system_info *info)
|
||||
static void
|
||||
dump_mem(system_info *info)
|
||||
{
|
||||
printf("%10" B_PRIu32 " bytes free (used/max %10" B_PRIu32 " / %10"
|
||||
B_PRIu32 ")\n",
|
||||
B_PAGE_SIZE * (uint32)(info->max_pages - info->used_pages),
|
||||
B_PAGE_SIZE * (uint32)info->used_pages,
|
||||
B_PAGE_SIZE * (uint32)info->max_pages);
|
||||
printf(" (cached %10" B_PRIu32 ")\n",
|
||||
B_PAGE_SIZE * (uint32)info->cached_pages);
|
||||
printf("%10" B_PRIu64 " bytes free (used/max %10" B_PRIu64 " / %10"
|
||||
B_PRIu64 ")\n",
|
||||
B_PAGE_SIZE * (uint64)(info->max_pages - info->used_pages),
|
||||
B_PAGE_SIZE * (uint64)info->used_pages,
|
||||
B_PAGE_SIZE * (uint64)info->max_pages);
|
||||
printf(" (cached %10" B_PRIu64 ")\n",
|
||||
B_PAGE_SIZE * (uint64)info->cached_pages);
|
||||
}
|
||||
|
||||
|
||||
|
@ -83,7 +83,7 @@ BChannelSlider::BChannelSlider(BRect area, const char* name, const char* label,
|
||||
|
||||
|
||||
BChannelSlider::BChannelSlider(BRect area, const char* name, const char* label,
|
||||
BMessage* model, enum orientation orientation, int32 channels,
|
||||
BMessage* model, orientation orientation, int32 channels,
|
||||
uint32 resizeMode, uint32 flags)
|
||||
: BChannelControl(area, name, label, model, channels, resizeMode, flags)
|
||||
|
||||
@ -94,7 +94,7 @@ BChannelSlider::BChannelSlider(BRect area, const char* name, const char* label,
|
||||
|
||||
|
||||
BChannelSlider::BChannelSlider(const char* name, const char* label,
|
||||
BMessage* model, enum orientation orientation, int32 channels,
|
||||
BMessage* model, orientation orientation, int32 channels,
|
||||
uint32 flags)
|
||||
: BChannelControl(name, label, model, channels, flags)
|
||||
|
||||
@ -502,7 +502,7 @@ BChannelSlider::Orientation() const
|
||||
|
||||
|
||||
void
|
||||
BChannelSlider::SetOrientation(enum orientation orientation)
|
||||
BChannelSlider::SetOrientation(orientation orientation)
|
||||
{
|
||||
bool isVertical = orientation == B_VERTICAL;
|
||||
if (isVertical != fIsVertical) {
|
||||
|
@ -143,7 +143,7 @@ BControlLook::DrawButtonFrame(BView* view, BRect& rect,
|
||||
void
|
||||
BControlLook::DrawButtonBackground(BView* view, BRect& rect,
|
||||
const BRect& updateRect, const rgb_color& base, uint32 flags,
|
||||
uint32 borders, enum orientation orientation)
|
||||
uint32 borders, orientation orientation)
|
||||
{
|
||||
_DrawButtonBackground(view, rect, updateRect, 0.0f, 0.0f, 0.0f, 0.0f,
|
||||
base, flags, borders, orientation);
|
||||
@ -153,7 +153,7 @@ BControlLook::DrawButtonBackground(BView* view, BRect& rect,
|
||||
void
|
||||
BControlLook::DrawButtonBackground(BView* view, BRect& rect,
|
||||
const BRect& updateRect, float radius, const rgb_color& base, uint32 flags,
|
||||
uint32 borders, enum orientation orientation)
|
||||
uint32 borders, orientation orientation)
|
||||
{
|
||||
_DrawButtonBackground(view, rect, updateRect, radius, radius, radius,
|
||||
radius, base, flags, borders, orientation);
|
||||
@ -164,7 +164,7 @@ void
|
||||
BControlLook::DrawButtonBackground(BView* view, BRect& rect,
|
||||
const BRect& updateRect, float leftTopRadius, float rightTopRadius,
|
||||
float leftBottomRadius, float rightBottomRadius, const rgb_color& base,
|
||||
uint32 flags, uint32 borders, enum orientation orientation)
|
||||
uint32 flags, uint32 borders, orientation orientation)
|
||||
{
|
||||
_DrawButtonBackground(view, rect, updateRect, leftTopRadius,
|
||||
rightTopRadius, leftBottomRadius, rightBottomRadius, base, flags,
|
||||
@ -553,7 +553,7 @@ BControlLook::DrawRadioButton(BView* view, BRect& rect, const BRect& updateRect,
|
||||
void
|
||||
BControlLook::DrawScrollBarBackground(BView* view, BRect& rect1, BRect& rect2,
|
||||
const BRect& updateRect, const rgb_color& base, uint32 flags,
|
||||
enum orientation orientation)
|
||||
orientation orientation)
|
||||
{
|
||||
DrawScrollBarBackground(view, rect1, updateRect, base, flags, orientation);
|
||||
DrawScrollBarBackground(view, rect2, updateRect, base, flags, orientation);
|
||||
@ -563,7 +563,7 @@ BControlLook::DrawScrollBarBackground(BView* view, BRect& rect1, BRect& rect2,
|
||||
void
|
||||
BControlLook::DrawScrollBarBackground(BView* view, BRect& rect,
|
||||
const BRect& updateRect, const rgb_color& base, uint32 flags,
|
||||
enum orientation orientation)
|
||||
orientation orientation)
|
||||
{
|
||||
if (!rect.IsValid() || !rect.Intersects(updateRect))
|
||||
return;
|
||||
@ -818,7 +818,7 @@ BControlLook::SliderBarColor(const rgb_color& base)
|
||||
void
|
||||
BControlLook::DrawSliderBar(BView* view, BRect rect, const BRect& updateRect,
|
||||
const rgb_color& base, rgb_color leftFillColor, rgb_color rightFillColor,
|
||||
float sliderScale, uint32 flags, enum orientation orientation)
|
||||
float sliderScale, uint32 flags, orientation orientation)
|
||||
{
|
||||
if (!rect.IsValid() || !rect.Intersects(updateRect))
|
||||
return;
|
||||
@ -875,7 +875,7 @@ BControlLook::DrawSliderBar(BView* view, BRect rect, const BRect& updateRect,
|
||||
void
|
||||
BControlLook::DrawSliderBar(BView* view, BRect rect, const BRect& updateRect,
|
||||
const rgb_color& base, rgb_color fillColor, uint32 flags,
|
||||
enum orientation orientation)
|
||||
orientation orientation)
|
||||
{
|
||||
if (!rect.IsValid() || !rect.Intersects(updateRect))
|
||||
return;
|
||||
@ -1021,7 +1021,7 @@ BControlLook::DrawSliderBar(BView* view, BRect rect, const BRect& updateRect,
|
||||
|
||||
void
|
||||
BControlLook::DrawSliderThumb(BView* view, BRect& rect, const BRect& updateRect,
|
||||
const rgb_color& base, uint32 flags, enum orientation orientation)
|
||||
const rgb_color& base, uint32 flags, orientation orientation)
|
||||
{
|
||||
if (!rect.IsValid() || !rect.Intersects(updateRect))
|
||||
return;
|
||||
@ -1106,7 +1106,7 @@ BControlLook::DrawSliderThumb(BView* view, BRect& rect, const BRect& updateRect,
|
||||
void
|
||||
BControlLook::DrawSliderTriangle(BView* view, BRect& rect,
|
||||
const BRect& updateRect, const rgb_color& base, uint32 flags,
|
||||
enum orientation orientation)
|
||||
orientation orientation)
|
||||
{
|
||||
DrawSliderTriangle(view, rect, updateRect, base, base, flags, orientation);
|
||||
}
|
||||
@ -1115,7 +1115,7 @@ BControlLook::DrawSliderTriangle(BView* view, BRect& rect,
|
||||
void
|
||||
BControlLook::DrawSliderTriangle(BView* view, BRect& rect,
|
||||
const BRect& updateRect, const rgb_color& base, const rgb_color& fill,
|
||||
uint32 flags, enum orientation orientation)
|
||||
uint32 flags, orientation orientation)
|
||||
{
|
||||
if (!rect.IsValid() || !rect.Intersects(updateRect))
|
||||
return;
|
||||
@ -1234,7 +1234,7 @@ BControlLook::DrawSliderTriangle(BView* view, BRect& rect,
|
||||
void
|
||||
BControlLook::DrawSliderHashMarks(BView* view, BRect& rect,
|
||||
const BRect& updateRect, const rgb_color& base, int32 count,
|
||||
hash_mark_location location, uint32 flags, enum orientation orientation)
|
||||
hash_mark_location location, uint32 flags, orientation orientation)
|
||||
{
|
||||
if (!rect.IsValid() || !rect.Intersects(updateRect))
|
||||
return;
|
||||
@ -1482,7 +1482,7 @@ BControlLook::DrawInactiveTab(BView* view, BRect& rect, const BRect& updateRect,
|
||||
|
||||
void
|
||||
BControlLook::DrawSplitter(BView* view, BRect& rect, const BRect& updateRect,
|
||||
const rgb_color& base, enum orientation orientation, uint32 flags,
|
||||
const rgb_color& base, orientation orientation, uint32 flags,
|
||||
uint32 borders)
|
||||
{
|
||||
if (!rect.IsValid() || !rect.Intersects(updateRect))
|
||||
@ -2180,7 +2180,7 @@ void
|
||||
BControlLook::_DrawButtonBackground(BView* view, BRect& rect,
|
||||
const BRect& updateRect, float leftTopRadius, float rightTopRadius,
|
||||
float leftBottomRadius, float rightBottomRadius, const rgb_color& base,
|
||||
uint32 flags, uint32 borders, enum orientation orientation)
|
||||
uint32 flags, uint32 borders, orientation orientation)
|
||||
{
|
||||
if (!rect.IsValid() || !rect.Intersects(updateRect))
|
||||
return;
|
||||
@ -2886,7 +2886,7 @@ BControlLook::_DrawRoundBarCorner(BView* view, BRect& rect,
|
||||
const rgb_color& frameLightColor, const rgb_color& frameShadowColor,
|
||||
const rgb_color& fillLightColor, const rgb_color& fillShadowColor,
|
||||
float leftInset, float topInset, float rightInset, float bottomInset,
|
||||
enum orientation orientation)
|
||||
orientation orientation)
|
||||
{
|
||||
if (!rect.IsValid() || !rect.Intersects(updateRect))
|
||||
return;
|
||||
@ -3102,7 +3102,7 @@ BControlLook::_BevelShadowColor(const rgb_color& base, uint32 flags)
|
||||
void
|
||||
BControlLook::_FillGradient(BView* view, const BRect& rect,
|
||||
const rgb_color& base, float topTint, float bottomTint,
|
||||
enum orientation orientation)
|
||||
orientation orientation)
|
||||
{
|
||||
BGradientLinear gradient;
|
||||
_MakeGradient(gradient, rect, base, topTint, bottomTint, orientation);
|
||||
@ -3113,7 +3113,7 @@ BControlLook::_FillGradient(BView* view, const BRect& rect,
|
||||
void
|
||||
BControlLook::_FillGlossyGradient(BView* view, const BRect& rect,
|
||||
const rgb_color& base, float topTint, float middle1Tint,
|
||||
float middle2Tint, float bottomTint, enum orientation orientation)
|
||||
float middle2Tint, float bottomTint, orientation orientation)
|
||||
{
|
||||
BGradientLinear gradient;
|
||||
_MakeGlossyGradient(gradient, rect, base, topTint, middle1Tint,
|
||||
@ -3125,7 +3125,7 @@ BControlLook::_FillGlossyGradient(BView* view, const BRect& rect,
|
||||
void
|
||||
BControlLook::_MakeGradient(BGradientLinear& gradient, const BRect& rect,
|
||||
const rgb_color& base, float topTint, float bottomTint,
|
||||
enum orientation orientation) const
|
||||
orientation orientation) const
|
||||
{
|
||||
gradient.AddColor(tint_color(base, topTint), 0);
|
||||
gradient.AddColor(tint_color(base, bottomTint), 255);
|
||||
@ -3141,7 +3141,7 @@ void
|
||||
BControlLook::_MakeGlossyGradient(BGradientLinear& gradient, const BRect& rect,
|
||||
const rgb_color& base, float topTint, float middle1Tint,
|
||||
float middle2Tint, float bottomTint,
|
||||
enum orientation orientation) const
|
||||
orientation orientation) const
|
||||
{
|
||||
gradient.AddColor(tint_color(base, topTint), 0);
|
||||
gradient.AddColor(tint_color(base, middle1Tint), 132);
|
||||
@ -3157,7 +3157,7 @@ BControlLook::_MakeGlossyGradient(BGradientLinear& gradient, const BRect& rect,
|
||||
|
||||
void
|
||||
BControlLook::_MakeButtonGradient(BGradientLinear& gradient, BRect& rect,
|
||||
const rgb_color& base, uint32 flags, enum orientation orientation) const
|
||||
const rgb_color& base, uint32 flags, orientation orientation) const
|
||||
{
|
||||
float topTint = 0.49;
|
||||
float middleTint1 = 0.62;
|
||||
|
@ -665,7 +665,7 @@ BGridLayout::InternalCountRows()
|
||||
|
||||
|
||||
void
|
||||
BGridLayout::GetColumnRowConstraints(enum orientation orientation, int32 index,
|
||||
BGridLayout::GetColumnRowConstraints(orientation orientation, int32 index,
|
||||
ColumnRowConstraints* constraints)
|
||||
{
|
||||
if (orientation == B_HORIZONTAL) {
|
||||
|
@ -33,7 +33,7 @@ struct BGroupLayout::ItemLayoutData {
|
||||
};
|
||||
|
||||
|
||||
BGroupLayout::BGroupLayout(enum orientation orientation, float spacing)
|
||||
BGroupLayout::BGroupLayout(orientation orientation, float spacing)
|
||||
:
|
||||
BTwoDimensionalLayout(),
|
||||
fOrientation(orientation)
|
||||
@ -85,7 +85,7 @@ BGroupLayout::Orientation() const
|
||||
|
||||
|
||||
void
|
||||
BGroupLayout::SetOrientation(enum orientation orientation)
|
||||
BGroupLayout::SetOrientation(orientation orientation)
|
||||
{
|
||||
if (orientation != fOrientation) {
|
||||
fOrientation = orientation;
|
||||
@ -262,7 +262,7 @@ BGroupLayout::ItemRemoved(BLayoutItem* item, int32 fromIndex)
|
||||
|
||||
|
||||
void
|
||||
BGroupLayout::PrepareItems(enum orientation orientation)
|
||||
BGroupLayout::PrepareItems(orientation orientation)
|
||||
{
|
||||
// filter the visible items
|
||||
fVisibleItems.MakeEmpty();
|
||||
@ -290,7 +290,7 @@ BGroupLayout::InternalCountRows()
|
||||
|
||||
|
||||
void
|
||||
BGroupLayout::GetColumnRowConstraints(enum orientation orientation, int32 index,
|
||||
BGroupLayout::GetColumnRowConstraints(orientation orientation, int32 index,
|
||||
ColumnRowConstraints* constraints)
|
||||
{
|
||||
if (index >= 0 && index < fVisibleItems.CountItems()) {
|
||||
|
@ -14,7 +14,7 @@ using std::nothrow;
|
||||
|
||||
|
||||
// constructor
|
||||
BGroupLayoutBuilder::BGroupLayoutBuilder(enum orientation orientation,
|
||||
BGroupLayoutBuilder::BGroupLayoutBuilder(orientation orientation,
|
||||
float spacing)
|
||||
: fRootLayout((new BGroupView(orientation, spacing))->GroupLayout())
|
||||
{
|
||||
@ -118,8 +118,8 @@ BGroupLayoutBuilder::Add(BLayoutItem* item, float weight)
|
||||
|
||||
// AddGroup
|
||||
BGroupLayoutBuilder&
|
||||
BGroupLayoutBuilder::AddGroup(enum orientation orientation,
|
||||
float spacing, float weight)
|
||||
BGroupLayoutBuilder::AddGroup(orientation orientation, float spacing,
|
||||
float weight)
|
||||
{
|
||||
if (BGroupLayout* layout = TopLayout()) {
|
||||
BGroupView* group = new(nothrow) BGroupView(orientation, spacing);
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include <GroupView.h>
|
||||
|
||||
|
||||
BGroupView::BGroupView(enum orientation orientation, float spacing)
|
||||
BGroupView::BGroupView(orientation orientation, float spacing)
|
||||
:
|
||||
BView(NULL, 0, new BGroupLayout(orientation, spacing))
|
||||
{
|
||||
@ -16,8 +16,8 @@ BGroupView::BGroupView(enum orientation orientation, float spacing)
|
||||
}
|
||||
|
||||
|
||||
BGroupView::BGroupView(const char* name, enum orientation orientation,
|
||||
float spacing)
|
||||
BGroupView::BGroupView(const char* name, orientation orientation,
|
||||
float spacing)
|
||||
:
|
||||
BView(name, 0, new BGroupLayout(orientation, spacing))
|
||||
{
|
||||
|
@ -595,7 +595,7 @@ BScrollBar::Target() const
|
||||
|
||||
|
||||
void
|
||||
BScrollBar::SetOrientation(enum orientation orientation)
|
||||
BScrollBar::SetOrientation(orientation orientation)
|
||||
{
|
||||
if (fOrientation == orientation)
|
||||
return;
|
||||
|
@ -24,8 +24,7 @@ static const float kMinBorderLength = 5.0f;
|
||||
// TODO: More testing, especially archiving.
|
||||
|
||||
|
||||
BSeparatorView::BSeparatorView(enum orientation orientation,
|
||||
border_style border)
|
||||
BSeparatorView::BSeparatorView(orientation orientation, border_style border)
|
||||
:
|
||||
BView(NULL, B_WILL_DRAW | B_FULL_UPDATE_ON_RESIZE)
|
||||
{
|
||||
@ -35,7 +34,7 @@ BSeparatorView::BSeparatorView(enum orientation orientation,
|
||||
|
||||
|
||||
BSeparatorView::BSeparatorView(const char* name, const char* label,
|
||||
enum orientation orientation, border_style border,
|
||||
orientation orientation, border_style border,
|
||||
const BAlignment& alignment)
|
||||
:
|
||||
BView(name, B_WILL_DRAW | B_FULL_UPDATE_ON_RESIZE)
|
||||
@ -45,7 +44,7 @@ BSeparatorView::BSeparatorView(const char* name, const char* label,
|
||||
|
||||
|
||||
BSeparatorView::BSeparatorView(const char* name, BView* labelView,
|
||||
enum orientation orientation, border_style border,
|
||||
orientation orientation, border_style border,
|
||||
const BAlignment& alignment)
|
||||
:
|
||||
BView(name, B_WILL_DRAW | B_FULL_UPDATE_ON_RESIZE)
|
||||
@ -55,7 +54,7 @@ BSeparatorView::BSeparatorView(const char* name, BView* labelView,
|
||||
|
||||
|
||||
BSeparatorView::BSeparatorView(const char* label,
|
||||
enum orientation orientation, border_style border,
|
||||
orientation orientation, border_style border,
|
||||
const BAlignment& alignment)
|
||||
:
|
||||
BView("", B_WILL_DRAW | B_FULL_UPDATE_ON_RESIZE)
|
||||
@ -65,7 +64,7 @@ BSeparatorView::BSeparatorView(const char* label,
|
||||
|
||||
|
||||
BSeparatorView::BSeparatorView(BView* labelView,
|
||||
enum orientation orientation, border_style border,
|
||||
orientation orientation, border_style border,
|
||||
const BAlignment& alignment)
|
||||
:
|
||||
BView("", B_WILL_DRAW | B_FULL_UPDATE_ON_RESIZE)
|
||||
@ -331,7 +330,7 @@ BSeparatorView::PreferredSize()
|
||||
|
||||
|
||||
void
|
||||
BSeparatorView::SetOrientation(enum orientation orientation)
|
||||
BSeparatorView::SetOrientation(orientation orientation)
|
||||
{
|
||||
if (orientation == fOrientation)
|
||||
return;
|
||||
@ -437,7 +436,7 @@ BSeparatorView::DoLayout()
|
||||
|
||||
void
|
||||
BSeparatorView::_Init(const char* label, BView* labelView,
|
||||
enum orientation orientation, BAlignment alignment, border_style border)
|
||||
orientation orientation, BAlignment alignment, border_style border)
|
||||
{
|
||||
fLabel = "";
|
||||
fLabelView = NULL;
|
||||
|
@ -153,8 +153,7 @@ private:
|
||||
// #pragma mark -
|
||||
|
||||
|
||||
BSplitLayout::BSplitLayout(enum orientation orientation,
|
||||
float spacing)
|
||||
BSplitLayout::BSplitLayout(orientation orientation, float spacing)
|
||||
:
|
||||
fOrientation(orientation),
|
||||
fLeftInset(0),
|
||||
@ -319,7 +318,7 @@ BSplitLayout::Orientation() const
|
||||
|
||||
|
||||
void
|
||||
BSplitLayout::SetOrientation(enum orientation orientation)
|
||||
BSplitLayout::SetOrientation(orientation orientation)
|
||||
{
|
||||
if (orientation != fOrientation) {
|
||||
fOrientation = orientation;
|
||||
|
@ -23,7 +23,7 @@ using BPrivate::Layout::LayoutInfo;
|
||||
|
||||
class BSplitLayout : public BAbstractLayout {
|
||||
public:
|
||||
BSplitLayout(enum orientation orientation,
|
||||
BSplitLayout(orientation orientation,
|
||||
float spacing = 0.0f);
|
||||
BSplitLayout(BMessage* from);
|
||||
virtual ~BSplitLayout();
|
||||
@ -37,7 +37,7 @@ public:
|
||||
void SetSpacing(float spacing);
|
||||
|
||||
orientation Orientation() const;
|
||||
void SetOrientation(enum orientation orientation);
|
||||
void SetOrientation(orientation orientation);
|
||||
|
||||
float SplitterSize() const;
|
||||
void SetSplitterSize(float size);
|
||||
|
@ -12,7 +12,7 @@ using std::nothrow;
|
||||
|
||||
|
||||
// constructor
|
||||
BSplitLayoutBuilder::BSplitLayoutBuilder(enum orientation orientation,
|
||||
BSplitLayoutBuilder::BSplitLayoutBuilder(orientation orientation,
|
||||
float spacing)
|
||||
: fView(new BSplitView(orientation, spacing))
|
||||
{
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "SplitLayout.h"
|
||||
|
||||
|
||||
BSplitView::BSplitView(enum orientation orientation, float spacing)
|
||||
BSplitView::BSplitView(orientation orientation, float spacing)
|
||||
:
|
||||
BView(NULL,
|
||||
B_WILL_DRAW | B_FULL_UPDATE_ON_RESIZE | B_INVALIDATE_AFTER_LAYOUT,
|
||||
@ -97,7 +97,7 @@ BSplitView::Orientation() const
|
||||
|
||||
|
||||
void
|
||||
BSplitView::SetOrientation(enum orientation orientation)
|
||||
BSplitView::SetOrientation(orientation orientation)
|
||||
{
|
||||
fSplitLayout->SetOrientation(orientation);
|
||||
}
|
||||
@ -358,7 +358,7 @@ BSplitView::Instantiate(BMessage* from)
|
||||
|
||||
void
|
||||
BSplitView::DrawSplitter(BRect frame, const BRect& updateRect,
|
||||
enum orientation orientation, bool pressed)
|
||||
orientation orientation, bool pressed)
|
||||
{
|
||||
_DrawDefaultSplitter(this, frame, updateRect, orientation, pressed);
|
||||
}
|
||||
@ -366,7 +366,7 @@ BSplitView::DrawSplitter(BRect frame, const BRect& updateRect,
|
||||
|
||||
void
|
||||
BSplitView::_DrawDefaultSplitter(BView* view, BRect frame,
|
||||
const BRect& updateRect, enum orientation orientation, bool pressed)
|
||||
const BRect& updateRect, orientation orientation, bool pressed)
|
||||
{
|
||||
uint32 flags = pressed ? BControlLook::B_ACTIVATED : 0;
|
||||
be_control_look->DrawSplitter(view, frame, updateRect, view->ViewColor(),
|
||||
|
@ -56,7 +56,7 @@
|
||||
// CompoundLayouter
|
||||
class BTwoDimensionalLayout::CompoundLayouter : public BReferenceable {
|
||||
public:
|
||||
CompoundLayouter(enum orientation orientation);
|
||||
CompoundLayouter(orientation orientation);
|
||||
virtual ~CompoundLayouter();
|
||||
|
||||
orientation Orientation();
|
||||
@ -167,7 +167,7 @@ public:
|
||||
float* preferredHeight);
|
||||
|
||||
void AlignWith(LocalLayouter* other,
|
||||
enum orientation orientation);
|
||||
orientation orientation);
|
||||
|
||||
// Archiving stuff
|
||||
status_t AddAlignedLayoutsToArchive(BArchiver* archiver);
|
||||
@ -203,7 +203,7 @@ public:
|
||||
|
||||
void SetCompoundLayouter(
|
||||
CompoundLayouter* compoundLayouter,
|
||||
enum orientation orientation);
|
||||
orientation orientation);
|
||||
|
||||
void InternalInvalidateLayout(
|
||||
CompoundLayouter* compoundLayouter);
|
||||
@ -336,7 +336,7 @@ BTwoDimensionalLayout::GetInsets(float* left, float* top, float* right,
|
||||
|
||||
void
|
||||
BTwoDimensionalLayout::AlignLayoutWith(BTwoDimensionalLayout* other,
|
||||
enum orientation orientation)
|
||||
orientation orientation)
|
||||
{
|
||||
if (!other || other == this)
|
||||
return;
|
||||
@ -573,7 +573,7 @@ BTwoDimensionalLayout::SubtractInsets(BSize size)
|
||||
|
||||
|
||||
void
|
||||
BTwoDimensionalLayout::PrepareItems(enum orientation orientation)
|
||||
BTwoDimensionalLayout::PrepareItems(orientation orientation)
|
||||
{
|
||||
}
|
||||
|
||||
@ -603,7 +603,7 @@ BTwoDimensionalLayout::_ValidateMinMax()
|
||||
|
||||
|
||||
BTwoDimensionalLayout::CompoundLayouter::CompoundLayouter(
|
||||
enum orientation orientation)
|
||||
orientation orientation)
|
||||
:
|
||||
fLayouter(NULL),
|
||||
fLayoutInfo(NULL),
|
||||
@ -1154,7 +1154,7 @@ BTwoDimensionalLayout::LocalLayouter::InternalGetHeightForWidth(float width,
|
||||
|
||||
void
|
||||
BTwoDimensionalLayout::LocalLayouter::AlignWith(LocalLayouter* other,
|
||||
enum orientation orientation)
|
||||
orientation orientation)
|
||||
{
|
||||
if (orientation == B_HORIZONTAL)
|
||||
other->fHLayouter->AbsorbCompoundLayouter(fHLayouter);
|
||||
@ -1365,7 +1365,7 @@ BTwoDimensionalLayout::LocalLayouter::SetHeightForWidthConstraintsAdded(
|
||||
|
||||
void
|
||||
BTwoDimensionalLayout::LocalLayouter::SetCompoundLayouter(
|
||||
CompoundLayouter* compoundLayouter, enum orientation orientation)
|
||||
CompoundLayouter* compoundLayouter, orientation orientation)
|
||||
{
|
||||
CompoundLayouter* oldCompoundLayouter;
|
||||
if (orientation == B_HORIZONTAL) {
|
||||
|
@ -127,8 +127,8 @@ private:
|
||||
uint32 fMagic3;
|
||||
};
|
||||
|
||||
static TracingMetaData sDummyTracingMetaData;
|
||||
static TracingMetaData* sTracingMetaData = &sDummyTracingMetaData;
|
||||
static TracingMetaData sFallbackTracingMetaData;
|
||||
static TracingMetaData* sTracingMetaData = &sFallbackTracingMetaData;
|
||||
static bool sTracingDataRecovered = false;
|
||||
|
||||
|
||||
@ -525,7 +525,15 @@ TracingMetaData::_CreateMetaDataArea(bool findPrevious, area_id& _area,
|
||||
delete_area(area);
|
||||
}
|
||||
|
||||
return B_ENTRY_NOT_FOUND;
|
||||
if (findPrevious)
|
||||
return B_ENTRY_NOT_FOUND;
|
||||
|
||||
// We could allocate any of the standard locations. Instead of failing
|
||||
// entirely, we use the static meta data. The tracing buffer won't be
|
||||
// reattachable in the next session, but at least we can use it in this
|
||||
// session.
|
||||
_metaData = &sFallbackTracingMetaData;
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
|
||||
@ -1786,7 +1794,8 @@ tracing_init(void)
|
||||
#if ENABLE_TRACING
|
||||
status_t result = TracingMetaData::Create(sTracingMetaData);
|
||||
if (result != B_OK) {
|
||||
sTracingMetaData = &sDummyTracingMetaData;
|
||||
memset(&sFallbackTracingMetaData, 0, sizeof(sFallbackTracingMetaData));
|
||||
sTracingMetaData = &sFallbackTracingMetaData;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -457,7 +457,7 @@ reserve_io_interrupt_vectors(long count, long startVector)
|
||||
}
|
||||
|
||||
|
||||
/*! Allocate \a count contigous interrupt vectors. The vectors are allocated
|
||||
/*! Allocate \a count contiguous interrupt vectors. The vectors are allocated
|
||||
as available so that they do not overlap with any other reserved vector.
|
||||
The first vector to be used is returned in \a startVector on success.
|
||||
*/
|
||||
|
@ -511,7 +511,7 @@ MultiAddressSpaceLocker::AddAreaCacheAndLock(area_id areaID,
|
||||
VMArea* firstArea = cache->areas;
|
||||
for (VMArea* current = firstArea; current;
|
||||
current = current->cache_next) {
|
||||
error = AddArea(current->id,
|
||||
error = AddArea(current,
|
||||
current == area ? writeLockThisOne : writeLockOthers);
|
||||
if (error != B_OK) {
|
||||
vm_area_put_locked_cache(cache);
|
||||
@ -569,5 +569,3 @@ MultiAddressSpaceLocker::AddAreaCacheAndLock(area_id areaID,
|
||||
memcpy(fItems, originalItems, fCount * sizeof(lock_item));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -91,6 +91,8 @@ public:
|
||||
VMAddressSpace** _space = NULL);
|
||||
inline status_t AddArea(area_id area, bool writeLock,
|
||||
VMAddressSpace** _space = NULL);
|
||||
inline status_t AddArea(VMArea* area, bool writeLock,
|
||||
VMAddressSpace** _space = NULL);
|
||||
|
||||
status_t AddAreaCacheAndLock(area_id areaID,
|
||||
bool writeLockThisOne, bool writeLockOthers,
|
||||
@ -139,4 +141,13 @@ MultiAddressSpaceLocker::AddArea(area_id area, bool writeLock,
|
||||
}
|
||||
|
||||
|
||||
inline status_t
|
||||
MultiAddressSpaceLocker::AddArea(VMArea* area, bool writeLock,
|
||||
VMAddressSpace** _space)
|
||||
{
|
||||
area->address_space->Get();
|
||||
return _AddAddressSpace(area->address_space, writeLock, _space);
|
||||
}
|
||||
|
||||
|
||||
#endif // VM_ADDRESS_SPACE_LOCKING_H
|
||||
|
@ -3887,7 +3887,7 @@ vm_page_allocate_page_run(uint32 flags, page_num_t length,
|
||||
dprintf("vm_page_allocate_page_run(): Failed to allocate run of "
|
||||
"length %" B_PRIuPHYSADDR " (%" B_PRIuPHYSADDR " %"
|
||||
B_PRIuPHYSADDR ") in second iteration (align: %" B_PRIuPHYSADDR
|
||||
" boundary: %" B_PRIuPHYSADDR ") !", length, requestedStart,
|
||||
" boundary: %" B_PRIuPHYSADDR ")!\n", length, requestedStart,
|
||||
end, restrictions->alignment, restrictions->boundary);
|
||||
|
||||
freeClearQueueLocker.Unlock();
|
||||
|
Loading…
Reference in New Issue
Block a user