Commit Graph

3445 Commits

Author SHA1 Message Date
Stefano Ceccherini
7c42f05d49 moved kZombieColor to ZombieReplicantView.h
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21456 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-18 13:37:42 +00:00
Stefano Ceccherini
fab61b6237 Moved TextInput.h to src/kits/interface as it's only used there.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21455 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-18 13:31:46 +00:00
Stefano Ceccherini
a24a5156f9 splitted SetActiveState() into 2 methods, since it was very messy
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21454 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-18 13:15:58 +00:00
Stefano Ceccherini
6a45488dd9 Used exceptions to handle errors on InitData(). I hope I didn't made
stupid errors, since I don't use exceptions usually. Feel free to beat 
me on this. Moved uninitialization to _DisposeData(). Corrected some 
styling issues pointed out by axel. Used fprintf instead of printf.
Turned off debugging.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21450 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-18 09:53:36 +00:00
Jérôme Duval
f5390ac494 added atomic*64() for BeOS build
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21440 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-17 17:04:29 +00:00
Jérôme Duval
913f680ea2 followed Ingo's suggestion and introduced HAIKU_HOST_PLATFORM_64_BIT macro
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21431 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-17 11:51:49 +00:00
Jérôme Duval
a3ca7ebc40 x86_64 changes :
added atomic*64() functions
use int32 instead of long


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21430 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-17 10:50:18 +00:00
Ingo Weinhold
8000c5e973 * Added layout-friendly constructor.
* Fixed invalidation in FrameResized().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21427 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-17 01:17:49 +00:00
Ingo Weinhold
4fa167e12d * Added layout-related methods (Min/Max/PreferredSize(), InvalidateLayout(),
DoLayout()).
* Don't resize the view and the window anymore, when fResizeToFit is not
  set.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21426 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-17 01:15:05 +00:00
Ingo Weinhold
cb968676d9 Defined B_SIZE_UNSET to -2. -1 is actually a valid size, meaning 0 pixels.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21424 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-17 01:10:12 +00:00
Jérôme Duval
de050c6029 incorporated savage driver sources from Gerald Zajac. I hope it's the good place for this.
fixed warnings and code style. Please, from now on, provide *patches* to this version.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21421 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-15 21:02:08 +00:00
Stefano Ceccherini
8b7987023f Implemented needed methods to be able to clone the accelerant.
Implemented SetIndexedColors hook, although not really correct.
I don't know why the driver's 8 bit mode were disabled. They seem to 
work fine. I had to enable at least 640x480x8 to be able to test 
WindowScreen. There are some TODOs in the code. I'll look into them 
later.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21410 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-14 14:41:45 +00:00
Ryan Leavengood
b2a409507e Adding the header.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21403 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-13 02:36:18 +00:00
Ryan Leavengood
2660d61ad6 As I said I would:
1. Deleted headers/shared/
2. Added a Jamfile to src/shared to build it into a static library libshared.a.
3. Removed my changes in the build/jam directory.
4. Have ShowImage include libshared.a.

I forgot to add AboutWindow.h to headers/private/shared. I will do that next.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21402 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-13 02:35:29 +00:00
Stefano Ceccherini
37ddfd14ab Shortcut characters are aligned even if there's a submenu, like
discussed in the thread in haiku-development. I added a fSubmenus member 
to BMenu, to be able to tell from BMenuItem if there are other items 
with a submenu (maintained in BMenuItem::SetSuper()). If you don't like 
this solution, let's just revert.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21395 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-12 12:28:06 +00:00
Stefano Ceccherini
fbe2f227ca Some work on menu layouts:
- Menus are generally a bit wider (BeIDE ones didn't look nice)
- The modifiers bitmap are drawn more centered vertically
- Splitted BMenu::ComputeLayout() into three methods
- Various minor changes.
The menuitems still don't look nice with bigger font sizes, but we'll 
try to fix this...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21394 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-12 09:10:08 +00:00
Ryan Leavengood
5a1210fbef Moved the BAboutWindow implementation to the shared source directory, which
despite being talked about repeatedly, does not currently exist.

Adding this required adding some new Jam rules to deal with this shared source
directory and headers. I had some fun figuring this out. Despite writing
articles about Jam in the Haiku newsletter a few years ago I still find Jam to
be a PITA at times.

But my solution seems to work pretty well. Basically you just call the rule
UseSharedSource and pass the name of the shared source file you want to use.
This rule sets up the header directories and the right Jam variables for the
source file. You then add the source file to the source list in the Application
rule like any other source file.

I also made the authors list sent to the about window constructor null
terminated instead of passing the size of the array, as suggested by Hugo.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21391 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-12 03:54:07 +00:00
Ryan Leavengood
a8a83855b0 Initial implementation of the common BAboutWindow class. Of course I just
realized that calling it a window may not be strictly correct since it isn't a
decendent of BWindow, but just uses a BAlert. Oh well, it can be changed if
need be.

I'm also checking in the first use of it, in ShowImage. Since ShowImage can
still be compiled for R5 I've added a #ifdef around the new BAboutWindow
related code.

I'm open for suggestions for the interface for this class, well mostly the
constructor. I'm not a big fan of having to specify the number of authors.

For now I'm making the header private, but I don't think it would be a big deal
to expose it publically.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21389 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-11 00:14:32 +00:00
Ingo Weinhold
9eae7400a4 Implemented layout-friendly constructors. Also added MaxSize(), though it
only invokes the BView version. Didn't know what to do with MinSize() and
PreferredSize(). ATM they return fixed, hard-coded values. It might make
sense to compute something depending on the font size, for instance.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21380 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-10 16:52:42 +00:00
Jérôme Duval
53fa6fbc76 updated libpng to 1.2.18, thanks Fredrik!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21367 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-09 10:59:46 +00:00
Ingo Weinhold
c594b2f5f2 Added layout-friendly constructors and implemented Min/Max/PreferredSize().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21365 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-09 10:52:36 +00:00
Ingo Weinhold
6bef4a07d6 * Added default value for message in two arguments constructor.
* Removed resizing to minimum height in layout-friendly constructors.
* Cache preferred size.
* Implemented all of Min/Max/PreferredSize().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21364 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-09 10:51:15 +00:00
Ingo Weinhold
a2c9eeee87 Added layout-friendly constructor.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21363 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-09 10:47:05 +00:00
Ingo Weinhold
caf8aba2c9 * Added layout-friendly constructors and implemented Min/Max/PreferredSize(),
and DoLayout(). When the B_SUPPORTS_LAYOUT view flag is set (as is by
  default when using one of the new constructors) the BBox completely manages
  one true child (the first child that is not the label view).
* Centralized the layout related computation in new method
  _ValidateLayoutData(). The computed infos are cached in a new private
  LayoutData structure.
* GetPreferredSize() was broken in several respects. It does now return the
  same result as PreferredSize(). If B_SUPPORTS_LAYOUT is not set, these are
  the sums of the insets induces by the frame and the label. I.e. those values
  can for instance be added to the child's preferred size to compute the
  preferred size of the compound.

Not sure, if the Haiku-only TopBorderOffset() and InnerFrame() functions still
make sense. With layout management they're actually superfluous.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21356 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-08 23:40:16 +00:00
Ingo Weinhold
d432839022 * Set the _RESIZE_MASK_ macro to 0xffff. It was the bitwise inverse of the
disjunction of all view flags before, and the new layout related flags were
  missing. I suppose there was not striking reason for previous method.
* Made InvalidateLayout() virtual. When implementing layout management
  directly in a derived class instead of a separate BLayout, one needs to
  override it to know when to discard cashed layout infos.
* Added a ResizeTo(BSize) method.
* Avoided ugly multi-line strings in PrintToStream().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21355 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-08 23:24:38 +00:00
Ingo Weinhold
ea2dcf71dc Added BSize::Set(). BPoint and BRect feature a similar method.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21354 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-08 23:16:20 +00:00
Ingo Weinhold
dd5ac13b5f * Added FixSizeConstraints() functions, which adjust the elements of a (min,
max, preferred) size triple so that they are compatible with each other.
* Implemented AlignInFrame(BView*, BRect).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21353 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-08 23:14:48 +00:00
Jérôme Duval
0c74b7418a forgot this one (part of mesa 6.5.3)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21352 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-08 23:02:21 +00:00
Jérôme Duval
428d4d161b updated mesa to 6.5.3
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21351 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-08 23:00:44 +00:00
Ingo Weinhold
3111f163b5 Fixed libbe_test build of app server:
* Added <safemode.h> headers.
* Added a failing _kern_get_safemode_option() to libhaikucompat.a.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21340 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-06 19:29:41 +00:00
Stefano Ceccherini
3616859a05 Changed the interaction between BMenuFrame, BMenuScroller and
BMenuWindow. BMenuScroller now is just the scroller button, and it's a 
child of BMenuWindow. This simplifies attaching/detaching the 
scrollers, and it's also a bit cleaner. 
The lower scroller wasn't shown anymore for some reason, and this commit also fixes this problem.
A drawing bug shows up now, though: when scrolling the menu UP, some 
spurious lines are drawn over the menu. I wonder if this is an 
app_server bug or what.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21326 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-05 10:20:06 +00:00
Axel Dörfler
7aced0c776 * The second open will now fail, too, in case the hardware could not be initialized
correctly.
* Got rid of this superfluous cookie stuff - either the VFS behaves correctly, or
  we're screwed anyway.
* Made adding debugger commands optional depending on if DEBUG_COMMANDS is defined
  or not.
* Minor other cleanup.  


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21322 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-04 16:04:05 +00:00
Axel Dörfler
3bac9ea19a * Work in progress to support the i965 chipset as well; still works on i865, but
doesn't work on i965 yet.
* B_GET_DISPLAY_MODE now returns the mode actually configured in the chip instead
  of the last mode set; while this isn't really necessary, it allows to check what
  mode was used during startup.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21321 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-04 15:32:01 +00:00
Axel Dörfler
b2ed0e7acf Implemented "fail_safe_video_mode" boot option; if you're using it, the app_server
will not load any graphics driver (other than VESA).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21310 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-03 20:20:19 +00:00
Axel Dörfler
288e17885a Implemented B_CLOSE_ON_ESCAPE as mentioned on the mailing list.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21308 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-03 19:23:03 +00:00
Marcus Overhagen
9e448b6224 cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21299 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-02 23:16:54 +00:00
Marcus Overhagen
1d18292953 Moved creating and destroying of Reader and Decoder plugins into the PluginManager class.
Removed deferred initialization from BMediaDecoder. 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21296 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-02 20:00:48 +00:00
Stephan Aßmus
d7a45ca813 * came across one app in the repo that used these color constants
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21270 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-29 19:38:53 +00:00
Ingo Weinhold
eedc15536c Added driver settings support to the FS shell.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21233 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-25 05:07:34 +00:00
Hugo Santos
77bf99deb0 fixed the way accept() works in regards to the cookie pointer. It is no longer visible to userspace, we pass the fd instead. Also renamed kernel's shutdown() to system_shutdown as it collides with Posix's shutdown().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21223 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-23 19:56:40 +00:00
Hugo Santos
969885b848 loop: no longer requires a reader thread, it delivers directly to the device's receive queue
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21215 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-23 07:56:15 +00:00
Hugo Santos
a1deb55ef5 net_interface_private: added receive queue and splited device reading from packet processing. Delivering to self no longer is executed in the sender's context, which had some problems with TCP's locking.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21214 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-23 07:55:54 +00:00
Hugo Santos
d3d38faf41 net_buffer: prevent modules from messing with metadata too much
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21211 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-23 03:48:57 +00:00
Hugo Santos
79a0d25245 net_buffer: preparing for better metadata management
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21210 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-23 03:48:23 +00:00
Michael Pfeiffer
a637368987 Clean up.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21183 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-20 19:55:22 +00:00
Michael Pfeiffer
e4ee835fc2 Fixed bug #1231. Update text rectangle when view is resized.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21182 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-20 19:48:33 +00:00
Ingo Weinhold
bdf8a2e1e7 Added Haiku revision number to the kernel (same mechanism as used for
libroot). It's available in the kernel through the private
get_haiku_revision() and added to the kernel syslog output.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21173 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-19 15:36:32 +00:00
Ingo Weinhold
6dcd0ccf23 Patch by Morgan Howe (slightly modified): Several changes to support
building on Mac OS X (Darwin). A problem with makebootable remains.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21165 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-18 15:59:04 +00:00
Axel Dörfler
8ca5764554 * Implemented APM generic syscall API to query the current power status.
* PowerStatus is now using this API when compiled for Haiku.
* Note, I'm not sure why yet, but running PowerStatus in the background
  crashes at least my laptop after some time.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21154 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-16 15:22:23 +00:00
Ingo Weinhold
476d4befd7 Added IsLayoutValid().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21141 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-15 15:38:26 +00:00