Commit Graph

7319 Commits

Author SHA1 Message Date
Pawel Dziepak b3e4c67739 vm: implement B_RANDOMIZED_ANY_ADDRESS address specification
Randomized equivalent of B_ANY_ADDRESS. When a free space is found (as in
B_ANY_ADDRESS) the base adress is then randomized using _RandomizeAddress
pretty much like it is done in B_RANDOMIZED_BASE_ADDRESS.
2013-04-04 15:16:21 +02:00
Pawel Dziepak f9bab525f6 vm: implement B_RANDOMIZED_BASE_ADDRESS address specification
B_RAND_BASE_ADDRESS is basically B_BASE_ADDRESS with non-deterministic created
area's base address.

Initial start address is randomized and then the algorithm looks for a large
enough free space in the interval [randomized start, end]. If it fails then
the search is repeated in the interval [original start, randomized start]. In
case it also fails the algorithm falls back to B_ANY_ADDRESS
(B_RANDOMIZED_ANY_ADDRESS when it is implemented) just like B_BASE_ADDRESS does.

Randomization range is limited by kMaxRandomize and kMaxInitialRandomize.
2013-04-04 15:16:21 +02:00
Pawel Dziepak 3b4269ecf5 arch: randomize initial user stack pointer
Inside the page randomization of initial user stack pointer is not only a part
of ASLR implementation but also a performance improvement that helps
eliminating aligned 64 kB data access.

Minimal user stack size is increased to 8 kB in order to ensure that regardless
of initial stack pointer value there is still enough space on stack.
2013-04-04 15:16:20 +02:00
Ingo Weinhold a8b832bf46 BSolverRepository::AddPackage(): Add optional return parameter
... returning the added BSolverPackage object.
2013-04-03 19:06:47 +02:00
Ingo Weinhold 65502bbe88 BSolver: Add VerifyInstallation()
... and implement it in LibsolvSolver.
2013-04-03 18:42:20 +02:00
Ingo Weinhold 07a4d4e370 BSolverRepository: Add SetPriority() 2013-04-03 15:57:16 +00:00
Ingo Weinhold 1a4d020daf Flesh out the package kit solver API quite a bit more
* Reorganize things a bit:
  - BSolver is now an abstract base class.
  - A libsolv based implementation, LibsolvSolver, lives in a new
    add-on, which is loaded lazily.
  - Get rid of libpackage_solver. Save for LibsolvSolver everything
    is moved to libpackage.
  - This is a nicer solution for the cyclic dependency caused by
    libsolv (libsolvext to be precise) using the package kit for
    reading repositories and package files.
* Add a solver result data structure and and an accessor the solver.
* Add problem reporting support to the solver. There aren't data
  structures for the problem solutions yet and support for selecting
  solutions and re-solving is missing as well.
2013-04-03 02:15:57 +00:00
Ingo Weinhold a3dd6caf55 Add public package version parsing API
* BPackageVersion: Add respective constructor and SetTo().
* BPackageInfo: Add static ParseVersionString() utility method. It's
  only there because the parser lives in the BPackageInfo
  implementation.
2013-04-03 02:06:26 +00:00
Ingo Weinhold 7c29395824 Add some missing build headers 2013-04-02 17:06:56 +00:00
Michael Lotz a9abcc37cd Rework initial auto joining and add big TODOs.
* If we have a configured network, then we always try to connect to it
  as soon as the interface has been brought up.
* If we don't have a configured network and are auto configuring, we
  use the AutoconfigLooper to also do initial auto joins.
* Before issuing auto joins we need to wait for scan results to come
  in, so we watch for corresponding messages.

For now auto joining is a one shot attempt as the infrastructure to
properly tell reasons for scans apart is not yet there.
2013-04-02 04:59:44 +02:00
Ingo Weinhold dfb5fa8ba3 Add convenience methods BPackageInfo::ReadFromPackageFile() 2013-04-01 23:18:16 +00:00
Ingo Weinhold df65c3118a Add BNoErrorOutput to package kit 2013-04-01 23:17:25 +00:00
Ingo Weinhold 0816749e41 package_repo: Removes dependency to package
* Move StandardErrorOutput to libpackage and into proper namespace to
  avoid "package_repo" having to reuse the "package" source file.
* package_repo: Fix incorrect includes of "package.h".
2013-04-01 23:06:33 +00:00
Ingo Weinhold 479ca8169c Beginnings of the PackageKit dependency solver
Not functional (or tested) yet. The libsolv setup for a somewhat
simplified installation case should be more or less complete, though.
The solution conversion to to-be-created Haiku data structures and the
handling of problems is still missing, though.
2013-04-01 00:25:37 +00:00
Michael Lotz 6de478363e Add BMessenger::SetTo() to reinitialize a BMessenger.
This allows to reuse BMessenger objects for different targets, or to
recheck validity after initial creation. With that one can use the same
BMessenger after launching an application that was previously not found
valid for example.
2013-03-31 20:16:04 +02:00
Alex Smith 5e0c3db286 Account for the physical map area in the kernel VM space. Fixes #9547.
The physical memory map area was not included in the kernel virtual
address space range (it was below KERNEL_BASE). This caused problems
if an I/O operation took place on physical memory mapped there (the
bad address error seen in #9547 was occurring in lock_memory_etc()).
Changed KERNEL_BASE and KERNEL_SIZE to cover the area and add a null
area that covers all of it. Also changed X86VMTranslationMap64Bit to
handle large pages in Query(), as the physical map area uses large
pages.
2013-03-22 18:30:01 +00:00
Axel Dörfler 928001cea9 Further tuned AMD CPU identifier parsing.
* Thanks to a list of 1384 entries with AMD CPU identifiers from Alex.
2013-03-22 09:37:47 +01:00
Axel Dörfler df4d35e837 Added a parse_amd() for CPU identification.
* This parses the reported CPU name, and tries to translate it to a normal
  and concise identifier.
* For example, it will translate "AMD FX(tm)-8320 Eight-core Processor" into
  "FX™ 8320" or "Dual Core AMD Opteron(tm) Processor 275 HE" into
  "Opteron™ 275 HE".
* This means we can remove AMD strings for those models for which this
  function produces useful results.
2013-03-20 21:04:23 +01:00
Alexander von Gluck IV 190423a656 cpu_type: Add model 2 AMD FX CPU 2013-03-20 13:15:28 -05:00
John Scipione ab21cedcce Remove docs and refactor style of TextView class.
* Make pointer style consistent, const char* name instead of const char *name.
* Lots of parameter renaming.
* in parameters don't get anything special, just font, or length instead of
  inFont, inLength.
* out parameters get a leading _ so *outWidth becomes *_width for example.
* We don't detail private function in the Haiku book and this class has a bunch
  so keep the documentation in the file but use regular comments instead.
* Normalize the parameter names between cpp file and header.
* Some minor whitespace fixes.

No functional change intended.
2013-03-16 17:05:09 -04:00
Pawel Dziepak 7f61e6e4e5 Merge branch 'nfs4'
Conflicts:
	build/jam/HaikuImage
2013-03-11 13:00:55 +01:00
Michael Lotz 4a0460a9bc Add generic unlock key setting and removal.
* Replace {Set|Remove}MasterKey() by generic {Set|Remove}UnlockKey()
  that works on a keyring.
* Implement {Set|Remove}MasterUnlockKey() on top of that.
* Rename the commands and constants accrodingly.
* Implement setting and removing keyring unlock keys.
2013-03-05 11:04:57 -05:00
Michael Lotz d4d6d12393 Don't require a key when creating a new keyring.
There will be key setting/removal functions so the step of adding the
keyring and setting a key on it can be done individually.
2013-03-05 11:04:53 -05:00
Michael Lotz 8775bd129d Remove old TODO as we don't support multiple instances for now.
As there aren't any more generic meta data containers inside BKey,
there's no real way to distinguish different instances with the same
identifiers. This may be added later, for example the same index system
as used in BMessage could apply.
2013-03-05 11:04:51 -05:00
Michael Lotz f8ccc32326 Remove the API part of the concept of apps per key.
The application access concept is on the keyring level only for now.
Generally it probably would get pretty complicated and therefore harder
to use when application access needs to be granted on a per key basis.
2013-03-05 11:04:33 -05:00
Michael Lotz c8ae843f3d Rename keyring "access/revoke" to "unlock/lock".
The unlock/lock concept just seems easier to grasp and is used in
various similar tools as well.
2013-03-05 11:04:30 -05:00
Michael Lotz 64ca113fe0 Add keyring specific versions of the *Application() methods. 2013-03-05 11:04:10 -05:00
Michael Lotz 51ab46a83c Remove the purpose argument from all GetKey() variants.
The type is relevant and required as it determines the type of the
handed in key. The purpose however isn't actually needed and rather
inconvenient to get by depending on the situation.
2013-03-05 11:04:08 -05:00
Michael Lotz 94f897deea Make Flatten/Unflatten public and remove IsRegistered().
The BKey doesn't know anything about the keyring concept, so the
registered info isn't really useful. May be re-added later with
keyring info as well.
2013-03-05 11:04:02 -05:00
Michael Lotz 5d4a0da455 Remove unneeded master access revoke command.
Revoking master access currently simply means to revoke access
to the default keyring.
2013-03-05 11:00:03 -05:00
Michael Lotz d962e21058 Add B_KEY_PURPOSE_KEYRING for keyring keys. 2013-03-05 10:59:57 -05:00
Michael Lotz c494c06109 Add B*Key::PrintToStream() method for debugging convenience. 2013-03-05 10:59:51 -05:00
Michael Lotz 005a15bbcd Move keystore message constants and use a messenger.
* The keystore backend will (at least for the time being) reside in a
  separate server. This one can be reached via normal messaging, so use
  a BMessenger for sending key messages.
* Move the message constants from RegistrarDefs.h into a new
  KeyStoreDefs.h that also contains the server signature.
* Update the message constants to reflect the new situation.
2013-03-05 10:59:47 -05:00
Michael Lotz 1c3996496b Implement all KeyStore methods except for password generation.
* Add all relevant message constants.
* Implement the messaging to send/retrieve key info.
* Implement _Flatten/_Unflatten for sending flat BKey objects.
* Remove application list from BKey, the key can't only differ by
  allowed applications as the identifiers would still collide, so the
  comparison isn't needed to uniquely identify the key. The applications
  can be enumerated via the BKeyStore instead.
2013-03-05 10:59:46 -05:00
Michael Lotz b73982892d Rename [Un]Register* functions to Add/Remove*. 2013-03-05 10:59:44 -05:00
Michael Lotz dc1acef865 Flesh out the API and implement stubs.
* Modified the API greatly to be based on BKey* instead of BPassword*.
* Added BKeyPurpose and used it instead of BKeyType. It is supposed to
  indicate the purpose of a key so that an app can look up keys on a
  more granular level. The BKeyType on the other hand actually
  identifies the type (i.e. subclass of BKey) so an app knows how to
  handle a given key or may only enumerate/use keys it is compatible
  with.
* Made everything based on a raw data buffer for now, only BPasswordKey
  is implemented yet which stores the (0 terminated) string into that
  data buffer.
* Removed the additional data BMessage as I don't yet see where it fits
  in. While I could imagine adding meta data to a key may be nice it
  might be an interoperability concern when keys are shared by
  different apps.
* Moved the app functions to the keystore as per the TODO, but not sure
  how to actually implement them.
2013-03-05 10:59:43 -05:00
Michael Lotz 3b3884d9ee KeyStore and Key interface/stubs draft per Axel Dörfler.
A draft API and (mostly) stubs to back it up. Initial import of yet
unmodified sources.
2013-03-05 10:59:41 -05:00
Tri-Edge AI 49126a0e9b Added ResourceEdit and modified BColumnListView, BRow and BMenu.
Signed-off-by: Matt Madia <mattmadia@gmail.com>
2013-02-27 22:08:46 -05:00
John Scipione 5dd0761042 Move BVolumeRoster docs to Haiku Book.
With this commit every class in the storage kit is now documented
in the Haiku book!

Thanks to Ingo, Axel, Vincent Dominguez, Tyler Dauwalder, and
everyone who helped document these classes.
2013-02-22 18:11:14 -05:00
John Scipione 9d5f5318a5 Move BVolume docs to the Haiku book 2013-02-21 20:15:53 -05:00
John Scipione 434716ced8 Add BSymLink class docs to Haiku Book 2013-02-20 16:20:53 -05:00
John Scipione 6d5fae2a5a Move resources docs to Haiku Book
* Remove docs from Resources.cpp (leaving the brief description).
* Reformat Resources.h to style it like so many other header files.
* There is one not-entirely style based change. I renamed the outSize
  parameter or the LoadResource method to _size as is our convention for out
  parameters.
2013-02-18 18:14:10 -05:00
John Scipione 0a9ac70aea Move BQuery docs into Haiku Book.
... removing the docs from the .cpp and .h files and cleaning up as usual.
2013-02-14 19:36:33 -05:00
John Scipione 66e9410806 Switch about window to current workspace if hidden. 2013-02-11 21:25:51 -05:00
John Scipione 9f7ac4312a Add methods to get and set the name, version, and icon 2013-02-11 21:17:57 -05:00
Hamish Morrison 2675e31a0c BUrlRequest: fix various issues
* Remove unused headers interface from BUrlProtocol
* Change confusing function names
* Style fixes and whitespace cleanup
2013-02-10 20:46:24 +00:00
Hamish Morrison 64a1f5a020 NetworkCookieJar: various small fixes and updated tests 2013-02-09 17:10:10 +00:00
Hamish Morrison c8bc218363 NetworkCookie: fix domain/path matching, and validity checks 2013-02-09 17:10:05 +00:00
Hamish Morrison 33462ef54a NetworkCookie: bring SetCookie parsing in line with RFC 6265 2013-02-09 17:09:53 +00:00
Hamish Morrison 2db5d2bc95 NetworkCookie: remove unused cookie attributes and add HttpOnly 2013-02-09 16:09:34 +00:00
Hamish Morrison 05f42aaba4 NetworkCookie: set the default path according to RFC 6265 2013-02-09 16:02:15 +00:00
John Scipione 4c064a8451 Move documentation from Path.cpp to Path.dox
And clean it up a bit. Kept brief description in source.
* Also added Axel to authors in Path.dox and Path.cpp because his name
  appears in git blame as working on the docs and code for the file.
  I hope he doesn't mind.
2013-02-09 00:39:53 -05:00
John Scipione fc9827011d Moved NodeMonitor docs to Haiku Book. 2013-02-08 20:39:35 -05:00
John Scipione 81c42a7685 Move documentation from NodeInfo into the API docs.
* Delete the docs from NodeInfo.cpp and NodeInfo.h
* I snuck a couple of style fixes into NodeInfo.cpp
* I had to make a small modification to MimeType.dox to prevent it
  from overriding the docs of one of the methods in NodeInfo.dox.
2013-02-07 23:17:01 -05:00
Niels Sascha Reedijk f00edeb7e3 Automatically pick port 443 for HTTPS 2013-02-07 18:06:45 +00:00
Niels Sascha Reedijk 4e607e1aae Enable HTTPS connections.
Using more modern network classes:
 * BNetworkAddress instead of BNetAddress
 * BSocket and BSecureSocket instead of BNetEndpoint
2013-02-07 18:06:02 +00:00
Niels Sascha Reedijk d1b6afe678 Re-enable the services kit from GSOC 2010
* Use a public domain MD5 implementation when the OpenSSL one is not available
 * No functional changes
2013-02-07 18:05:38 +00:00
Axel Dörfler 0b319bd6f3 Minor cleanup. 2013-02-05 00:22:52 +01:00
Axel Dörfler 443522551e Fixed design issues in BPartitionParameterEditor.
* The user of an editor needed knowledge about the editor in order to make
  use of it.
* Furthermore, the BPartitionParameterEditor exposed type specific
  functionality that it shouldn't know anything about, either.
* We may now define a number of known parameters per editor type; right now
  there is only "type" as it's needed by DriveSetup.
* Adapted all disk systems, and DriveSetup to the new API.
* Renamed CreateParamsPanel, and InitializeParamsPanel to *ParametersPanel
  in DriveSetup.
* They now share a common base class AbstractParametersPanel.
2013-02-02 01:13:19 +01:00
Bill Randle 7d9c1f30f1 radeon_hd: Add Northern Island registers 2013-01-29 12:29:06 -06:00
Bill Randle 7aedc8b3e1 edid_raw: Correct missing bitfield
* edid1_detailed_timing_raw was missing
  a field which threw off the sync bits.
* The result was the monitor will receive
  a different sync polarity than it requested.
  Most monitors handle this, but it is still
  a bug
2013-01-27 12:18:49 -06:00
Axel Dörfler 7f33c9cda3 Lost the "EFI" in front of "GUID Partition Map" name.
* This is how other systems refer to it as well, and is shorter, too.
2013-01-24 01:15:26 +01:00
John Scipione 75dde2cf73 Fix some pedantic style issues in Font.h 2013-01-15 23:32:38 -05:00
Przemysław Buczkowski dc871e324d TextView:Cmd/Ctrl-Home/End Shift-selection support
Fixes #6859

Signed-off-by: Siarzhuk Zharski <zharik@gmx.li>
2013-01-14 21:10:21 +01:00
Fredrik Modéen 34dad10384 Adding debug file to bluetooth.
* more changes will come.
2013-01-12 20:01:28 +01:00
Landon Fuller 524bb6d3ec Restore FTS_WHITEOUT, guard it with __HAIKU__.
As per Jérôme Duval's code review in issue #9337.
2013-01-11 00:26:48 +01:00
Landon Fuller 4b5a13ab81 Add Haiku support.
This replaces the use of a few BSD-specific functions, as well
as the direct references to _open/_close et-al.

BFS doesn't support the FTS_NOSTAT directory link count optimization,
and no statfs() function is available, so we simply turn that off.
2013-01-11 00:26:48 +01:00
Landon Fuller 7de6d45ca2 Drop in unmodified fts/ftw implementations from FreeBSD HEAD (r245067). 2013-01-11 00:26:47 +01:00
Alexander von Gluck IV a2b448a0c1 intel_extreme: Mark IvyBridge as having a PCH
* Modesetting now works on IvyBridge
* Preferred mode needs work though as my chipset
  defaults to 1024x768 vs 1366x768
2012-12-29 00:09:00 +00:00
Jérôme Duval ef769e5e87 add declaration of sa_family_t in sys/socket.h
* added missing declaration of sa_family_t in sys/socket.h, this fixes #8731
  thanks to Anarchos for the patch.
* fixed the build of the command ftp
2012-12-28 22:28:13 +01:00
Hamish Morrison d1f280c805 Add support for pthread_attr_get/setguardsize()
* Added the aforementioned functions.
* create_area_etc() now takes a guard size parameter.
* The thread_info::stack_base/end range now refers to the usable range
  only.
2012-12-28 18:02:58 +00:00
Jérôme Duval 00e7904406 include string.h for FD_ZERO in sys/select.h
* sys/select.h was not self contained before, this fixes #9327
* index is defined as a function in string.h, fixed resulting name
  collision in glut_shapes.c
2012-12-28 18:30:03 +01:00
Alexander von Gluck IV 660ca29ee0 intel_extreme: Add IvyBridge PCIID's
* This needs testing and likely some IvyBridge
  fixups
2012-12-26 11:01:43 -06:00
John Scipione 4b831faef7 Revert "Rename header params to match BeBook. No implementation."
This reverts commit 67f773ec1d.

The convention is to use leading underscores to indicate out
parameters.
2012-12-24 17:03:46 -05:00
John Scipione 67f773ec1d Rename header params to match BeBook. No implementation. 2012-12-24 16:31:30 -05:00
John Scipione e9191cc2d1 Add BFile documentation to the Haiku Book.
Remove the documentation from the cpp file also. Keep the brief
description as a regular comment though.
2012-12-22 15:01:17 -05:00
John Scipione 78c12508e3 Rename the bounds parameter of the BDragger class to frame matching the BeBook 2012-12-21 21:24:46 -05:00
John Scipione aabb148183 Rename the resizingMask parameter of the BDragger constructor to resizingMode matching the BeBook. 2012-12-21 21:22:54 -05:00
John Scipione bc22b037c4 Style fixes to DirectWindow.h, no functional change 2012-12-21 19:18:45 -05:00
Alex Smith 6c6fcaf95b Some build fixes for DEBUG=1. 2012-12-20 19:22:16 +00:00
Rene Gollent 55751d083a Move Tokenizer/Token into ExpressionParser's namespace. 2012-12-18 21:31:43 -05:00
Fredrik Holmqvist 92d766df7c Pass a handle to evaluate_object as start point. 2012-12-15 14:10:11 +01:00
Michael Lotz fd6e3a11e2 Use the existing ARM MMU definitions and remove duplicates. 2012-12-04 23:38:06 +01:00
Michael Lotz 50c463f4f1 Header cleanup, rename macros for more consistency. 2012-12-04 23:38:03 +01:00
Axel Dörfler 332cc6bc3b 64 bit fixes for libmedia.so, ActivityMonitor, and Sudoku.
* Alex, I feel your pain :-)
2012-11-30 13:16:38 +01:00
Axel Dörfler ed80f189ce Applied an updated patch by looncraz to enable hardware cursor.
I made the following changes to the original patch:
 * Add const to the cursor setting functions.
 * Removed the legacy cursor copying code.
 * Minor coding style cleanup.
2012-11-28 22:33:08 +01:00
Michael Lotz 57e6aff3f7 Add debug helpers that communicate information via the LED.
Blink patterns and delay mechanisms allow for "easier" debugging using
just the onboard LED on the raspberry pi.
2012-11-27 20:58:31 +01:00
Michael Lotz 4818400fcf Add BCM2708 mailbox definitions and implementation.
The mailbox is used to communicate with the VideoCore on the rPi for
various tasks. First it will be used to configure the framebuffer.
2012-11-27 20:58:30 +01:00
André Hentschel a8fe6dad7e Fix header protection for the beagle board 2012-11-26 17:59:53 +01:00
Alex Smith afd0470932 Disable DEBUG in x86emu Jamfile rather than in x86emui.h. 2012-11-26 15:17:47 +00:00
Oliver Tappe 52cdfde04b Fix relying on order of static object destruction in Locale Kit.
* use only a single static object (MutableLocaleRoster) instead of
  two, which avoids any problems if the order of static object
  destruction would destroy RosterData before MutableLocaleRoster
* rename BPrivate::RosterData to BPrivate::LocaleRosterData and move
  it into a header and implementation file of its own
This should hopefully fix problems encountered with a clang-compiled
Locale Kit.
2012-11-26 01:19:27 +01:00
Rene Gollent e03ee8ba35 Add missing include. 2012-11-23 10:55:50 -05:00
Ithamar R. Adema 53a59cd99a Fix minor typo 2012-11-22 22:58:24 +01:00
Ithamar R. Adema 39b546702c ARM: fixup header comment 2012-11-22 00:00:16 +01:00
Alex Smith b0f9ebaca5 Don't compile in x86emu debug code for builds with DEBUG set. 2012-11-18 22:51:54 +00:00
Alex Smith 5196d5dad0 Merge branch 'master' into x86_64
Conflicts:
	build/jam/HaikuImage
	src/add-ons/kernel/generic/Jamfile
2012-11-18 19:18:00 +00:00
Yongcong Du 0a0af8957e acpi: export read_bit_register and write_bit_register
acpi cpuidle needs such acpi functions

Signed-off-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2012-11-18 17:39:20 +01:00
Yongcong Du 71d9d375b8 cpuidle: move generic cpuidle to generic
After this change, low level cpuidle drivers load the generic cpuidle
module if they can support the underlying platform.

change the intel cpuidle driver accordingly, now it's loaded by acpi
bus manager during boot, although it doesn't depend on acpi

Signed-off-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2012-11-18 17:39:19 +01:00
Yongcong Du 57311e7bb7 acpi: add ACPI_ALLOCATE_LOCAL_BUFFER to ACPI.h
Signed-off-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2012-11-18 17:39:19 +01:00
Yongcong Du e467ba95b0 cpuidle: add stats reporting support
Signed-off-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2012-11-18 17:39:19 +01:00
Yongcong Du 66b0c86ae4 cpuidle: rename CpuidleStats to CpuidleStat
Signed-off-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2012-11-18 17:39:18 +01:00
Yongcong Du 2195811a84 idle: introduce cpuidle generic module
This module will load the various lowlevel cpuidle modules' implementations
during initialiation. If it finds one available module, it will change
the global gCpuIdleFunc as its own better one.

When idle, cpuidle module will select the best cstate and enter it by
calling the lowlevel module's implementation.

Signed-off-by: Yongcong Du <ycdu.vmcore@gmail.com>
Signed-off-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2012-11-18 17:39:17 +01:00
Alex Smith 11c9f9a1d6 Merge branch 'master' into x86_64
Conflicts:
	build/jam/FloppyBootImage
	build/jam/OptionalBuildFeatures
	build/jam/OptionalPackages
	headers/private/shared/cpu_type.h
	src/bin/ps.c
	src/bin/sysinfo.cpp
	src/kits/tracker/PoseView.cpp
	src/preferences/appearance/DecorSettingsView.cpp
	src/preferences/virtualmemory/Settings.cpp
	src/servers/input/AddOnManager.cpp
	src/servers/input/InputServer.cpp
	src/servers/input/InputServerMethod.cpp
	src/system/boot/Jamfile
	src/system/boot/platform/raspberrypi_arm/mmu.cpp
	src/system/boot/platform/u-boot/arch/arm/Jamfile
	src/system/kernel/arch/x86/arch_cpu.cpp
	src/system/kernel/arch/x86/arch_thread.cpp
	src/system/kernel/cache/block_cache.cpp
	src/system/kernel/vm/VMAnonymousCache.cpp
2012-11-18 14:02:07 +00:00
Alexander von Gluck IV c5324f71f6 GLUT: Fix mistake in header license
* We felt that me adding this didn't really
   properly communicate the spirit of the
   email approval. You really can't just
   'change' a license from MIT without author
   approval... so this is superfluous.
2012-11-16 13:07:11 -06:00
Ithamar R. Adema 63fe8ecdd9 wchar.h: fix header comment style.
Comment uses C++ style, while it can be compiled in a C-only environment. This
broke the ICU cross compilation (done for ARM).
2012-11-16 03:04:26 +01:00
Alexander von Gluck IV c3eddfc068 GLUT: Relicense Mark Kilgard's GLUT components
* A copy of the email approving this change is
  in the LICENSE.txt file
* This clears up several concerns
* We now have permission to clean / update GLUT
  code and redistrubute its binaries.
* We have to ensure all of Mark's work is *not*
  GPL licensed as per his wishes.
2012-11-15 17:31:39 -06:00
Joseph R. Prostko caddc641c1 Changes to allow Haiku source to build with GCC 4.7
* GCC 4.7 is more picky than GCC 4.6, so have to make changes accordingly
* Changes include addressing issues with scoping, redeclaration, etc.
Thanks Rene and Ingo for your input on these changes
2012-11-15 17:59:19 -05:00
Ithamar R. Adema 344b3218d4 ARM/u-boot: Add support for FDTs passed in the uImage
Since we're using multi-part uImage format, we can add the FDT as
a seperate "blob" in the uImage, if the used U-Boot version is not
"FDT enabled".

This is used for example for our Verdex target. Currently I've got
a local hack in the platform/u-boot/Jamfile, looking into pulling
in the FDT files and a proper Jam setup to do that properly...
2012-11-13 12:27:11 +01:00
Ithamar R. Adema 1df5784a22 ARM: Add ARM architecture detection to generic bootloader ARM code.
This detects everything up to ARMv6 right now. Need to check more
recent ARM ARMs for ARMv7 detection.

The detected details get passed on to the kernel, which can use
the pre-detected info for selecting right pagetable format and such.

Copyright removal of Axel done after agreement with Axel @ BeGeistert
that for files that were copy/pasted from x86 arch and then fully
replaced the implementation, removal of original copyright holder is
allowed, since their actual code is gone ;)
2012-11-13 12:04:35 +01:00
John Scipione 96a5a088ba Add the authors back to AboutWindow.h, also use <> style for email addresses 2012-11-13 00:28:06 -05:00
John Scipione c73d4b3dc2 Move AboutPosition() method up. 2012-11-12 23:57:31 -05:00
John Scipione d156f97655 Get rid of the _Init() method in BAboutWindow, just the single constructor body. 2012-11-12 23:57:31 -05:00
John Scipione 97a814061e Instead of destroying the BAboutWindow object on close, Hide() it, then on the destructor of the calling window call Quit() explicitly to destroy it. 2012-11-12 23:57:30 -05:00
John Scipione 12a9a71db6 Use a quit bool in B_ABOUT_REQUESTED to indicate that the about window has quit instead of using kAboutWindowClosed message. This prevents message signature clashes. 2012-11-12 23:57:27 -05:00
John Scipione 3fdab58446 Set the about window object to NULL on close or quit.
Pass the BHandler object that opened the about window to BAboutWindow.
When the window closes, send a kAboutWindowClosed message back to the
handler. This allows the handler to set the variable to NULL.

Implement the new about dialog constructor in all apps that use it.
Remove the old constructor. This now works reliably for all cases I
tested without crashing and does the right thing on close. The setup
and teardown is a bit more complicated than I wanted though.
Unfortunately this seems to be necessary when not using a BAlert.

Fetching the app icon does not work reliably yet. This is because for
replicants the app may not be running. I may have to pass the icon in
instead of grabbing it from the signature.
2012-11-12 23:57:26 -05:00
John Scipione 5b0cd98792 WIP: Create the about dialog once, hide and show, Quit() when object is destroyed. 2012-11-12 23:57:25 -05:00
John Scipione 0046f44436 Modify about window to take an app signature.
* Grabs the app icon and version from the resource file.
* Allow you to specify the copyright holder instead of hardcoding
  "Haiku, Inc."
* Support multiple extra copyright fields.
* Modify BAlert to take a custom icon.
* Set the custom icon of the BAlert to the app icon.
* Also set the app version.

* Convert BAboutWindow to derive from BWindow
* Place a 128x128 icon and fill out a scrolling BTextView
  with options such as authors, version history, copyright,
  license, etc. Still needs some work but is coming along.

* Add the word Version to the version line, i8n'ed of course,
  and tweak the info box and default sizes.
2012-11-12 23:57:24 -05:00
John Scipione fcfe60b02e Renamed BMenuScrollView to TScrollArrowView and moved it into Deskbar
Also gave the Up Arrow and Down Arrow a scroll arrow. The up arrow works
but the down arrow doesn't because the sibling menu is stealing the
MouseDown event."
2012-11-12 22:03:18 -05:00
John Scipione afa1c29104 Tweaks, remove dead code. Menu and Menubar are stock again. 2012-11-12 22:03:18 -05:00
John Scipione 7ee3b479d1 Make the MenuScrollView a fixed size...
instead of trying to make it follow fExpando just make it a fixed
size on creation. It is invisible and extends to the bottom of the
screen. fExpando grows inside it, and the window follows fExpando.
When the window grows taller than the screenframe the arrows are
added. You can scroll with the mouse wheel, but I haven't yet gotten
scrolling to work from clicking. Deskbar still crashes when going
from Mini mode to vertical expando mode. I have no idea why.
2012-11-12 22:03:17 -05:00
John Scipione 49ff476d13 Make ScrollMenu not rely on Menu.cpp
Rename ScrollMenu.cpp to MenuScrollView.cpp

Half step towards making this class work as part of Deskbar without
extending any other classes. Scrolling works both with mouse and
scroll wheel. Redraws on scroll, need to make that work better.
Also need to move classes out of the Interface Kit and into Deskbar.
2012-11-12 22:03:17 -05:00
John Scipione cb55ef9fb5 WIP: Created a BScrollMenu class that works like BMenuWindow but works on a view instead of a window. Use this to implement a scrollable BarMenuBar in Deskbar. The basics work but there are issues still with sizing and other issues.
Modify the ScrollMenu class to use the layout kit by adding a constructor that doesn't take a view.

Get the BScrollMenu class to follow the size of the BMenu it is a parent of. Adjust the scrollers to appear in the right places. This is a WIP but it works in Deskbar, next step is to integrate this directly into BMenu with the scrollers as children of the menu instead of as children of the BScroller class.

Rebase changes on top of master

Deskbar scrolling works for the most part, just need to fix the
bottom arrow and clean up a bit.
2012-11-12 22:03:16 -05:00
Axel Dörfler b20073726a Added BEntry::Name() method.
* GetName() is a bad API, and should be deprecated.
2012-11-12 23:56:23 +01:00
Axel Dörfler a2f6e5ac9c Added missing BMessage::{Get|Set}String() methods.
* Forgot to add those before accidentally.
2012-11-12 23:56:14 +01:00
Ithamar R. Adema 36b41db7aa Merge common ARM CPU/MMU code
This is to make sure all ARM platforms will benefit from planned work on this
MMU/CPU code. The less code duplicated, the better.

Compile-tested for all supported ARM platforms
2012-11-10 03:03:24 +01:00
Ithamar R. Adema f86b582848 ARM: Cleanup of port support code.
This also implements the fault handler correctly now, and cleans up the
exception handling. Seems a lot more stable now, no unexpected panics or
faults happening anymore.
2012-11-07 16:24:22 +01:00
Axel Dörfler 17ad59afd3 Added BLayoutBuilder::{Group|Grid}::SetExplicitAlignment(). 2012-11-05 12:50:04 +01:00
Axel Dörfler 9e42a44cad Added BPath::IsAbsolute() method. 2012-11-05 12:50:03 +01:00
Axel Dörfler 09d87d9151 The text control is now more flexible with its layout items.
* Before, you had to have both, the text view layout item, and the label
  layout item or else nothing would ever be visible.
* Now you can only create the text view item, and it will still work.
* Also, no matter the order you added the layout items, they would always
  put the label on the left, and the control to the right.
* You can place the label and text view layout items anywhere now, although
  you should keep in mind that the view spans over their frame unions; IOW
  they should always adjacent to each other, but not necessarily horizontally
  and left to right.
* No longer uses a fixed label spacing, but utilizes
  BControlLook::DefaultLabelSpacing() instead.
* However, the spacing is always added to the right of the label, no matter
  how you place it in the layout. Maybe one wants to add a SetLabelTextViewGap()
  like method.
2012-11-05 12:50:02 +01:00
Axel Dörfler 6643ead593 Made the BRect::*Copy() methods const as they should have been. 2012-11-05 12:50:02 +01:00
Axel Dörfler 2267b7e7fb Added Grid::AddGlue(), and SetExplicit*Size() methods. 2012-11-05 12:50:01 +01:00
Axel Dörfler 4656e550b0 Added method SetExplicitSize() for convenience. 2012-11-05 12:50:00 +01:00
Oliver Tappe 402c3b2c09 BTextView uses cmd instead of ctrl for navigation
* Adjust BTextView to use B_COMMAND_KEY instead of B_CONTROL_KEY
  for wordwise navigation and jumping to the top and bottom.
  This requires a shortcut, which is only installed if there is
  none already (for the groups B_LEFT_ARROW/B_RIGHT_ARROW and
  B_HOME/B_END). As a result, wordwise navigation no longer works
  in Mail, for instance.
2012-11-05 09:38:23 +01:00
Oliver Tappe 0619f34b52 Add BWindow::HasShortcut() 2012-11-05 09:38:23 +01:00
Oliver Tappe 73f7af4d6c Drop "protected"-define from bsd-compatibility header
* drop "protected" from bsd-compat header sys/cdefs.h, as that define
  pollutes the global namespace and at least FreeBSD doesn't provide
  it anymore
* remove all uses of that macro from libedit, which seems to be the
  only user in our tree
2012-11-05 09:37:55 +01:00
John Scipione b5446310e9 Remove the scroll bar knobs and corresponding setting 2012-11-04 15:37:57 -05:00
François Revol 9803f86a3a libfdt: Move headers to headers/libs/libfdt
(cherry picked from my sam460ex branch)
2012-11-04 16:40:15 +01:00
Rene Gollent 6bfaef2ba6 Add basic helper class for user input prompting. 2012-11-04 09:36:14 +01:00
Fredrik Holmqvist 9b0d045c59 Update to ACPICA 20121018.
This is an update from 20120711 and A LOT has happened since then. See
    https://acpica.org/download/changes.txt for all the changes.
2012-11-03 22:46:22 +01:00
Axel Dörfler 6e50e79e54 Added Get*()/Set*() methods like the ones from KMessage. 2012-11-03 11:54:21 +01:00
John Scipione dfa8cf8c05 Change SCROLL_KNOB_* constants to B_SCROLL_KNOB_* 2012-11-02 19:08:09 -04:00
Axel Dörfler 87e7009019 Style cleanup. 2012-11-02 23:42:31 +01:00
Axel Dörfler 009fd25715 Added BMessage::Append(), and new(std::nothrow_t).
* Append() copies all fields from the specified message.
* The nothrow operator new allows you to add BMessages to a BObjectList.
2012-11-02 23:42:29 +01:00
John Scipione 4b5a6861f2 Add the scrollbar constants enum to the header.
Also make some minor tweaks in ScrollBar.cpp
2012-11-02 01:06:59 -04:00
Jerome Duval e634025c06 unistd.h: added noreturn attribute on _exit() 2012-10-27 19:50:26 +02:00
Adrien Destugues - PulkoMandy 100db087dc Allow use of c_str() on wstring. 2012-10-27 17:14:55 +02:00
Adrien Destugues - PulkoMandy 7ee53ed3bd Add tan(), tanh(), log10() to std::complex
Keep the haiku/ version of the headers in sync with buildtools
(see btrev43041)

I'm curious: why do we have a copy of these headers in haiku/ tree ?
2012-10-27 15:44:59 +02:00
czeidler 04b1c44b89 Use a tab BReference as argument in Area::Set{Left, Top, Right, Bottom}.
Using a normal pointer is dangerous when creating a new tab directly in the method call because the tab gets deleted to early.
2012-10-17 07:33:54 +00:00
Axel Dörfler adf340f0ed Style cleanup. 2012-10-08 13:59:16 +02:00
Axel Dörfler 9b9cb227c7 Consolidated and fixed device_geometry computation.
* The only implementation that would accept more than 2 TB was the one in
  scsi_disk. But even that one was limited to 63 TB.
* Now there is a new utility function devfs_compute_geometry_size() which
  does it correctly for sizes up to 2^64 which should be good enough for
  quite some time :-)
* This fixes bug #8992.
2012-10-08 13:59:16 +02:00