Commit Graph

7266 Commits

Author SHA1 Message Date
John Scipione
d9acbaf0dc ScreenSaver: Timeout if window won't lock. Fixes #4260.
If we fail to lock the window in the kInitialTickRate time, quit the thread.
We were deadlocking causing #4260 because you could open several
threads by moving through the screen saver list quickly all trying to lock
the same window at the same time, classic deadlock.
2013-09-02 19:44:45 -04:00
John Scipione
fa3651781a ScreenSaverRunner: Style fixes
Also update copyright info, add myself to authors list alphabetically.
2013-09-02 19:44:42 -04:00
John Scipione
8bcc3722ba MediaTrack: Style fixes 2013-08-31 15:40:18 -04:00
Jérôme Duval
8d2bf6953e random: add a Virtio RNG module
* The default module is replaced by the Virtio RNG module when found.
* This can have the undesired effect of rendering /dev/urandom slow.
* Tested with the following QEmu command line option:
-device virtio-rng-pci,rng=rng0 -object rng-random,filename=/dev/random,id=rng0
* moved random.h to private/drivers headers.
2013-08-29 18:47:48 +02:00
Adrien Destugues
2ec188b903 Fix thread safety issue in chunked http transfers.
* The use of a static variable for storing the chunk size made it shared between all instances of BUrlProtoclHttp.
* Inline the function at the single place where it is used, and allocate the variable on the stack instead.

The whole receiving loop should be split into chunked and non-chunked variants to improve code readability.
2013-08-27 20:36:29 +02:00
Jérôme Duval
0edcbd2754 apic: serialize writes to x2apic MSR...
as required by the specifications (it isn't needed with memory mapped i/o).
2013-08-26 21:48:33 +02:00
Jérôme Duval
787773400c Added x2APIC support.
* Mostly useful for virtualization at the moment. Works in QEmu.
* Can be enabled by safemode settings/menu.
* Please note that x2APIC normally requires use of VT-d interrupt remapping feature
on real hardware, which we don't support yet.
2013-08-26 21:08:21 +02:00
John Scipione
4385f73996 Revert "Menu: check numBytes == 1 on KeyDown"
This reverts commit 44dc533861.
2013-08-25 19:40:00 -04:00
John Scipione
3dd9ff2b5d BMCMenuBar: Refactor MakeFocus()
Get rid of unused fRunner variable.

It is very basic now, it just works.

Also, renamed msg to message in MessageReceived() and
declared MakeFocus() above it (alphabetically).
2013-08-25 00:09:28 -04:00
John Scipione
8f74b98905 MenuField: Remove unused variables
fSelected and fTransition
2013-08-25 00:09:16 -04:00
John Scipione
44dc533861 Menu: check numBytes == 1 on KeyDown 2013-08-25 00:08:44 -04:00
John Scipione
cccc4076db Menu and friends: Style fixes, no functional
... changes intended.

* 80 char limit fixes
* Indentation fixes
* Braces style fixes
* Use ternary operator where appropriate
* Rename menuItem to just item and declare it once outside
  the loop
* Omit 3rd param of GetMouse() because it is default
* Rename variables eg state => focused and menu => submenu
* Indent comments below line they apply to
* Reword some comments
* Add some #pragmas
2013-08-25 00:05:02 -04:00
John Scipione
9422c92ea3 MenuField: Open the menu bar when the label is clicked
Fixes #6894

Private DrawLabel() method renamed to _DrawLabel() and rest of drawing
code moved to new private method _DrawMenuField(). These methods both
check to make sure that they are drawing in a valid rect that intersects
updateRect.

When label or menu is selected Draw a the label background in the selected
menu color matching the behavior of BeOS R5.

_DrawLabel() calls be_control_look->DrawLabel()

Update copyright year in MenuField.h
2013-08-21 04:20:58 -04:00
John Scipione
408c0ee4cd MenuField: enable/disable the menu field when...
the child menu bar or the child menu bar's menu is enabled/disabled.

This means that there is just one status we have to check, the menu
fields, and the child menus agree. This change takes practical form
in the Backgrounds preflet which disables the placement menu when
the image is set to "None", but, only the menu got disabled and not the
parent menu field so the label was erroneously still drawn as enabled.
2013-08-20 18:15:13 -04:00
Siarzhuk Zharski
743d75946f USB audio: Mixer Unit control implementation
* support of Mixer Unit control in UI implemented;
* improve SetMix/GetMix to support Mixer Unit control type;
* cleanup and improvements.
2013-08-18 14:49:44 +02:00
Siarzhuk Zharski
1a6d941d1d USB audio: Use system-wide USB_audio.h instead local one
* switching driver code to use system usb/USB_audio.h header;
* refactor USB_audio.h specification header for both USB audio specifications.
2013-08-18 14:49:06 +02:00
Siarzhuk Zharski
cf58476ccc USB OHCI: Support for isochronous transfers
Finishing and refactoring the draft, initially implemented during April-May 2012

NOTE: startingFrameNumber returned to device contains the number of the
next free frame right after the last packed of submitted data. For more
details please Look into corresponding [haiku-development] discussion
started at 03 Jul 2013.

Partially fixes #1045.
2013-08-18 14:47:33 +02:00
John Scipione
74577830da ColorControl: Implement keyboard navigation
Implements enhancement described in #9819

This feature works pretty much as it did on BeOS R5.

When you focus on the color control, the border is drawn blue and
the dot on the red ramp draws as an outline to show that it is
selected. You can push the up and down arrow keys to navigate to the
previous and next ramps respectively and can push right and left to
increment and decrement the color value of the selected ramp.

Clicking on the control no longer gives it focus.

In BeOS the left and right arrows would increment and decriment by 5,
on Haiku they increment and decrement by 1, but, by holding down the
key for a second or so the increment value increases to 5 allowing for
both course and fine adjustments.

On a technical note I split the int32 fFocusedComponent member variable
into 2 int16 member variables, fFocusedRamp and fClickedRamp. I did this
because I needed an entra variable, and can't  change the size of the
class without using up another reserved member variable slot. int16
should be more than enough for these variables as they store an index to
the currently focused or clicked on ramp (0-3). Please someone chime in
if this is not okay for FBC in some condition I didn't think about.
2013-08-17 03:40:58 -04:00
Jérôme Duval
6391a955fc PCI-x86: merge MSI-X unconfigure and disable with MSI.
* get rid of unconfigure_msix and disable_msix from the API.
2013-07-29 22:48:00 +02:00
Jérôme Duval
46f7a54d8c MSI: Use the effective APIC id of the boot CPU for the address destination.
* This should only affect systems where the CPU ids aren't sequential (mostly
non Intel).
* Fixes #9807.
2013-07-29 17:36:03 +02:00
Ingo Weinhold
5163e1c62d Revert "Introduce vnode op supports_operation(), fix devfs_io()"
This reverts commit 98a5231fe5.
2013-07-27 23:31:23 +02:00
Ingo Weinhold
98a5231fe5 Introduce vnode op supports_operation(), fix devfs_io()
devfs_io() can't fall back to calling vfs_synchronous_io(), if the
device driver doesn't support handling requests asynchronously. The
presence of the io() hook leads the VFS (do_iterative_fd_io()) to
believe that asynchronous handling is supported and set a
finished-callback on the request which calls the io() hook to start the
next chunk. Thus, instead of iterating through the request in a loop
the iteration happens recursively. For sufficiently fragmented requests
the stack may overflow (ticket #9900).

* Introduce a new vnode operation supports_operation(). It can be called
  by the VFS to determine whether a present hook is actually currently
  supported for a given vnode.
* devfs: implement the new hook and remove the fallback handling in
  devfs_io().
* vfs_request_io.cpp: use the new hook to determine whether the io()
  hook is really supported.
2013-07-27 17:45:59 +02:00
John Scipione
323523c4b9 BWindow: style fixes only, no functional change. 2013-07-26 18:36:00 -04:00
Alex Smith
271b27d5a3 x86_64: Set vector in iframe/debug state to 99 for syscalls.
Although syscalls are done through SYSCALL and therefore don't actually
have an interrupt number, set it to 99 (the syscall vector on 32-bit)
in the iframe so that a syscall frame can be identified. Also added
vector/error_code to x86_64_debug_cpu_state for Debugger to use, not
sure why I didn't put them there in the first place.
2013-07-25 20:04:25 +01:00
Jérôme Duval
f3b8787e91 virtio.h: remove trailing whitespaces. 2013-07-18 18:27:01 +02:00
Alexander von Gluck IV
ae4da1002b netserver: Add EAP defines for WPA enterprise
* Working towards #8850
2013-07-17 20:16:49 -05:00
Jérôme Duval
ed4a8e4d11 virtio: changed a bit the driver API by adding a driverCookie.
* the processing of requests in drivers is eased a bit with this change, but
this could be improved for instance by enabling a driver to dequeue items
in a service thread instead of the interrupt handler.
* made a few methods const.
2013-07-17 17:30:18 +02:00
Jérôme Duval
ea2fa87219 scsi_cmds.h: added SCSIS_ASC_CAPACITY_DATA_HAS_CHANGED
* indicates the device data capacity has changed..
2013-07-17 17:19:46 +02:00
Alexander von Gluck IV
42eed3ba69 RadeonHD: Fix incorrect name -> chipset mapping
* Put names and chipsets next to each other to
  help prevent further mismatch.
* Fix potential (but unlikely) string overflow
* CID 611140
2013-07-16 11:20:24 -05:00
Jérôme Duval
8dfd68e0f8 Virtio PCI: added support for MSI-X interrupts
* make use of MSI/MSI-X PCI x86 API
* MSI support untested because QEmu only offers MSI-X
* changed a bit the Virtio bus API by adding a queue count parameter
for the setup_interrupt() hook.
2013-07-11 20:37:37 +02:00
Jérôme Duval
8986cafc46 PCI: added some missing subclasses definitions
* also renamed the HT capability mask
2013-07-10 20:57:06 +02:00
Jérôme Duval
7164302bb6 PCI: added definitions for NVM Express storage controller subclass. 2013-07-10 20:21:33 +02:00
Jérôme Duval
25b723638d PCI: the x86 module now exports an MSI-X API. 2013-07-09 23:53:29 +02:00
Jérôme Duval
0c0f333a67 PCI: added MSI-X and HyperTransport definitions
* renamed PCI_cap_id_ldt to PCI_cap_id_ht
2013-07-09 23:53:27 +02:00
Alexander von Gluck IV
991183511b RadeonHD: Drop marketing names
* They are all over the place.. I give up
* Going off of engineering names and DCE is more accurate
* A lot of this info came from the x.org wiki
* I'd like to transition some of the engineering
  name checks to use DCE versions.. they tend to be more
  accurate and exact. (in some cases we can't, but most of
  the time we can)
2013-07-09 12:40:29 -05:00
John Scipione
e724b26f23 Remove enum elaborated type specifier
...from orientation params. Elaborated type specifiers are not needed
for C++ code and removing them makes doxygen happy. Verified working
on both gcc2h and gcc4h builds.
2013-07-08 19:29:11 -04:00
Rene Gollent
d376554674 BBox: propagate alignment from child for the...
...FULL_{VERTICAL,HORIZONTAL} case.
2013-07-03 23:41:44 -04:00
Rene Gollent
46d6e9d9ed Interface Kit: Adjust max size and default alignment...
...on controls where it makes sense:
- BRadioButton and BCheckBox now return their preferred size as their
maximum.
- BRadioButton, BCheckBox and BTextControl now use left alignment by
default, as this is the most common use case for them.
2013-07-01 11:30:49 -04:00
Alexander von Gluck IV
4ce958fcd4 RadeonHD: Cleanup, new cards
* Fix some incorrect chip codenames
* Introduce a dual gpu flag
* Add some new chipsets and document
  the next generation of chips
2013-06-29 13:18:52 -05:00
John Scipione
1e6e124cb4 BView: Style fixes only, no functional change intended
Motivated by inconsistancies found while documenting BView.

Update copyright year, alphabetize

Variable names normalized:
* pt => point
* r => rect
* p => pattern
* c => color
* msg => message
* a, b and pt0, pt1 => start, end
* r, g, b, a => red, green, blue, alpha

A couple of white spaces fixes.

A couple of !pointer => pointer == NULL fixes.

GetPreferredSize params => _width and _height to indicate out params.
2013-06-28 22:59:17 -04:00
Rene Gollent
77ea49f4f2 Adjust debug API to address some x86-64 concerns.
- The argument buffer contained in the debug_{pre,post}_syscall message structures wasn't large enough to accomodate all
arguments for some syscalls on x86-64, which could potentially have led to kernel memory corruption when using syscall
tracing via the debug API. As such, enlarge it to accomodate 64-bit platforms as well.

- Adjust TeamDebugger/SyscallInfo to discriminate the target architecture and read the arguments when trapping console
output. Gets the latter working on x86-64.
2013-06-28 18:59:38 -04:00
Jérôme Duval
b027a0a2f7 pci: change offset type to uint16 in config space API.
* The config space is larger than 255, we need to use an uint16 to access
offsets superior or equal to 256. The current API only proposes an uint8 for this.
This change switches the offset parameter to the uint16 type. Axel hinted that
the used values are the same with such a change (the doc says sign extended to 2 or
4 bytes).
I checked with GCC2 and it's indeed the case when inspecting the memory.
With GCC4, instructions are the same on function call.
* prints info about extended capabilities.
* struct pci_module_info and struct pci_device_module_info are extended with
pci_find_extended_capability().
2013-06-24 19:29:00 +02:00
Jérôme Duval
26a4510e59 pci: added pci_find_extended_capability().
* added PCI Extended Capabilities definitions.
* pci_find_capability() parameter offset is now optional.
2013-06-22 19:48:56 +02:00
Jérôme Duval
786a38f555 scsi: typo adapaters=>adapters 2013-06-18 18:39:25 +02:00
John Scipione
8b3b14fdfa BColorControl: Introduce a _PaletteFrame() method
... eliminating duplicate code.
2013-06-10 19:15:09 -04:00
John Scipione
62fec205dd BColorControl: Size text rect based on font size
* Also change kMinCellSize from a uint32 to a float so that it can be used
  with std::min() and std::max() instead of min_c() and max_c().
* Set the text controls sizes and margins based on the font size. Also rework
  _TextRectOffset() so that it will get the right spacing from by dividing the
  palette frame by 3.
* Replace bare numbers and refactor with calculation or magic constant.
* Create a private method _TextRectOffset() which calculates and
  returns the vertical text rect offset to use based on the font size.
* Replace 2.0 with new kBevelSpacing constant where appropriate.
* fPaletteFrame calculation in _LayoutView() was refactored but should
  not have changed.
2013-06-10 19:15:07 -04:00
John Scipione
1186916f06 BColorControl: Create _SetCellSize() method
...eliminating duplicated code.
2013-06-10 19:15:07 -04:00
John Scipione
0289f92063 BColorControl: Style fixes
* Update copyright in header, add my name, alphabetize.
* Rename _ColorRamp() to _DrawColorRamp().
* Rename update parameter to updateRect
2013-06-10 19:15:06 -04:00
Jérôme Duval
6e6c121b84 virtio: added several devices ids. 2013-06-07 18:00:17 +02:00
John Scipione
1c95f72222 Don't set MaxContentWidth on the menu bar of a BMenuField
Fixes #9816

It is no longer necessary, or even desirable for us to set the max
content width of the menu bar of a BMenuField now that BMenuItem
truncation and BMenuField sizing are working.

The user may, however, wish to set the max content width of the menu
bar of a BMenuField themselves like so:

menuField->MenuBar()->SetMaxContentWidth(width);

and the Interface Kit will automatically deduct the left and right
margins from the width including the space used by the drop down arrow.
2013-06-07 03:25:36 -04:00