Commit Graph

2755 Commits

Author SHA1 Message Date
Axel Dörfler 79f73dbc56 * vm_page::offset is now called cache_offset and is now an uint32 instead of off_t;
this saves 4 bytes per page. To compensate the loss of bytes, the offset is now
  stored in page size units, that's enough to address 2^44 or 16 TB (which is now
  the maximal supported file size!).
* Renamed vm_page::ppn to physical_page_number.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15637 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-21 12:38:31 +00:00
Stephan Aßmus 1f0a4ee8c7 removed unused stuff from Painter and DrawingEngine, fixed the deadlock when trying to use the (20 times faster) DrawingEngine version of StringWidth, the font is now usually ignored when taking on a DrawState in Painter... should add a little speed overall
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15628 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-20 22:39:54 +00:00
Stefano Ceccherini d69c048704 No longer needed
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15619 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-20 22:13:31 +00:00
Axel Dörfler 35cf51550c Replaced arch/thread_struct.h with arch/thread_types.h, and renamed
arch/*/thread_struct.h to arch_thread_types.h, so that it can directly
be included without having to specify the architecure.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15616 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-20 16:07:27 +00:00
Axel Dörfler d608540b67 Separated vm_address_space.h from vm.h.
Some more cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15614 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-20 15:54:45 +00:00
Stefano Ceccherini 700b38edc4 Started porting WindowScreen to haiku
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15612 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-20 14:31:26 +00:00
Axel Dörfler 96e01a27bf * Merged vm_virtual_map with vm_address_space - there was no reason to have
them apart (this even saves a pointer from vm_virtual_map to its address space)
* aspace -> address_space
* vm_create_address_space() did not check if creating the semaphore succeeded
* Removed team::kaspace - was not really needed (introduced a new vm_kernel_address_space()
  function that doesn't grab a reference to the address space)
* Removed vm_address_space::name - it was just a copy of the team name, anyway,
  and there is always only one address space per team
* Removed aspace_id - the address space is now using the team_id
* Some cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15609 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-20 13:29:11 +00:00
Waldemar Kornewald ce823541ec Removed #ifdef __cplusplus from networking headers. The check is already done in cdefs.h (__BEGIN_DECLS) which I committed yesterday.
Committed libnetwork.so. I actually wanted to port BSD's libc/net resolver, but that one uses too many unsupported functions, so I basically merged libbind.so and libsocket.so into one library.

Moved the libbind.so sources to libnetwork/dns.

Cleaned up native part of libbind.so a little bit more. Though, the ugly hack remains. We nbetter pthread/mutex support. Added TODO that we also shousctl() into the kernel and libroot.so.

Improved DEVNOTES a little bit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15605 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-20 10:54:58 +00:00
Axel Dörfler 9d845483cf Got rid of two ToDo-items: instead of clearing the PAGE_MODIFIED flag after having
written the page, we now do it before, so that it cannot lose any changed data
anymore; it doesn't matter if the page is written to while writing it back, the
worst thing that can happen is that we write the same page twice. Also, we don't
rely on the PAGE_MODIFIED bit anymore, we now check all mappings of that page
to find all modified pages, no matter how far the (currently disabled) page
daemon had come.
Also, destroying an area will now result in writing back changed pages - this
is only really important for memory mapped files, though, and should probably
be avoided for other vm_store types.
Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15597 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-19 23:01:11 +00:00
Jérôme Duval 37a84232bb fix build for echo drivers, added cs_timer.h from pcmcia-cs
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15591 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-19 18:57:29 +00:00
Waldemar Kornewald 8c85eedc66 Moved the needed headers from private to posix folder. This should hopefully fix the build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15590 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-19 17:42:05 +00:00
Ingo Weinhold 4c62b0919f Pulled platform independent part of the BIOS boot menu out into
platform/generic/...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15587 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-19 13:35:01 +00:00
Waldemar Kornewald f7a223fa1b Removed unneeded libbind files (were never compiled, anyway).
Moved some headers around and cleaned them up.

Fixed threading code in libbind.so. Don't know why I hadn't noticed this before. Now it is reliable, but uses an even uglier hack.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15585 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-19 13:26:54 +00:00
Axel Dörfler 39cc80346c * Implemented automatic font_directory creation for font_mappings.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15584 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-19 12:02:17 +00:00
Stefano Ceccherini 70da1fab92 Haiku doesn't have byteorder.h
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15582 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-19 10:52:48 +00:00
Axel Dörfler 1bd3bb1d58 * Added fallback mappings for the default fonts - since we don't save the
mappings yet, that's a good way to test this functionality.
* Turns out the directory of the mappings must be known already - they
  should be added automatically, but I've added them manually for now
  (which is okay for the default system directory).
* Having more than one style with the same family in the mappings didn't
  work as planned - it now does.
* On my current system, time spend in the font manager constructor went
  down from 1.5 secs to around 12000 usecs (and I have only a moderate
  number of fonts installed, or so I thought - looks like the mappings
  were a good idea :-)) - and that directly cuts down the boot time.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15580 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-19 01:01:04 +00:00
Waldemar Kornewald 5352d6baaa Updated DEVNOTES. It's finally complete, now.
Fixed headers:
- added checks for C++
- removed _REENTRANT checks


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15572 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-17 11:58:39 +00:00
Waldemar Kornewald c544064d35 Updated BIND resolver library (libbind.so) to version 9.3.1.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15570 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-16 22:38:13 +00:00
Jérôme Duval f6486d9d01 added some more headers from pcmcia-cs
fixed the build for non haiku platforms


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15569 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-16 19:06:45 +00:00
Axel Dörfler d0d37bdfd1 * vfs_init() is now called later in the startup sequence - since no core kernel
service depends on it, it doesn't make any sense to call it that early in the
  game.
* The VFS now has a low memory handler for vnodes as well. If there is enough
  memory left, it won't free any vnodes anymore.
* Potential crashing bug fix: some functions did not check if the FD passed
  in belonged to the right type; they just assumed it had a valid vnode, but
  it could have had a mount structure associated as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15566 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-16 16:11:36 +00:00
Axel Dörfler 7d7f4675bb * Added some cpuid eax == 1 feature definitions to arch_cpu.h
* Renamed IA32_MTR_WRITE_COMBINED to IA32_MTR_WRITE_COMBINING.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15559 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-16 12:25:49 +00:00
Axel Dörfler 348c7214f5 Improved processor identification for some VIA C3 models.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15558 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-16 11:55:01 +00:00
Axel Dörfler 1534aa236c Added new function vm_low_memory_state() that returns the current low
memory status.
Added new B_NO_LOW_MEMORY constant for the usual case.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15551 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-15 21:30:28 +00:00
Jérôme Duval 4f9f2ee29d added a pcmcia bus raw driver compatible with R5
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15540 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-14 22:50:05 +00:00
Rudolf Cornelissen 42a631e9fa removed one more old nolonger used define for 3D.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15539 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-14 20:53:54 +00:00
Rudolf Cornelissen 3c8313fd87 two more command sub-defines needed for DMA scaled blit function. Also removed some old and nolonger used PIO mode command defines.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15537 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-14 18:38:24 +00:00
Axel Dörfler e0e9a3e69f * We now support the global page feature of x86 processors that prevents
kernel TLBs from being flushed on context switch.
* new arch_cpu_user_TLB_invalidate() that now does what arch_cpu_global_TLB_invalidate()
  did before.
* arch_cpu_global_TLB_invalidate() will now flush all TLBs, even those from the
  kernel.
* some cleanups.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15535 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-14 17:07:37 +00:00
Axel Dörfler 484c80abd0 * Added missing prototypes for get_eflags() and set_eflags() to arch_system_info.h
* The boot loader now checks the CPU for the cpuid and rdtsc features, which we
  currently both rely on.
* Removed old and no longer used stage2_priv.h header


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15534 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-14 10:43:28 +00:00
Stephan Aßmus 025e63b08a added functions to quickly tell if the pattern is the solid high or low pattern
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15533 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-14 08:01:49 +00:00
Axel Dörfler 51a3c450be The short story: we now have MTRR support on Intel and AMD CPUs (the latter
has not yet been tested, though - I'll do this after this commit):
* Removed the arch_memory_type stuff from vm_area; since there are only 8 memory
  ranges on x86, it's simply overkill. The MTRR code now remembers the area ID
  and finds the MTRR that way (it could also iterate over the existing MTRRs).
* Introduced some post_modules() init functions.
* If the other x86 CPUs out there don't differ a lot, MTRR functionality might
  be put back into the kernel.
* x86_write_msr() was broken, it wrote the 64 bit number with the 32 bit words
  switched - it took me some time (and lots of #GPs) to figure that one out.
* Removed the macro read_ebp() and introduced a function x86_read_ebp()
  (it's not really a time critical call).
* Followed the Intel docs on how to change MTRRs (symmetrically on all CPUs
  with caches turned off).
* Asking for memory types will automatically change the requested length to
  a power of two - note that BeOS seems to behave in the same, although that's
  not really very clean.
* fixed MTRRs are ignored for now - we should make sure at least, though,
  that they are identical on all CPUs (or turn them off, even though I'd
  prefer the BIOS stuff to be uncacheable, which we don't enforce yet, though).



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15528 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-13 16:34:29 +00:00
Axel Dörfler d49423aea3 Added a wbinvd() macro.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15526 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-13 01:49:44 +00:00
Axel Dörfler 2ed21b8525 Some work in progress of the MTRR support. Shouldn't do any harm yet :-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15525 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-13 00:06:52 +00:00
Axel Dörfler 97ec781e94 Added (empty) memory type functions to the PPC port.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15521 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-12 17:13:15 +00:00
Axel Dörfler 7c0a93573b Preparation for MTRR support, code is completely untested, though.
The CPU specific MTRR code will be in modules.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15520 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-12 17:04:36 +00:00
Axel Dörfler b53cc465d6 Moved declaration of gBootDevice into its own header.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15518 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-12 16:06:33 +00:00
Axel Dörfler 1b974d07ee You can now test if there are more messages waiting in the link.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15512 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-12 13:45:09 +00:00
Waldemar Kornewald a7c861ab5a Preparing for libnetwork.so.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15502 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-11 20:25:44 +00:00
Waldemar Kornewald aa782b3ed6 Minor modification to net_stack_driver's header.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15499 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-11 20:09:13 +00:00
Ingo Weinhold cbe35e2031 GCC 4 fix.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15494 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-11 16:22:51 +00:00
Ingo Weinhold 2fee50849c GCC 4 fix.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15490 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-11 13:53:26 +00:00
Ingo Weinhold ff29286ffd Ouch, those should have been gone since the activation of new build
system.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15481 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-10 23:39:30 +00:00
Ingo Weinhold fe14a904a8 * Implemented [sig]{set,long}jmp() for PPC. No idea, if it is any good,
but it compiles at least. :-)
* Pulled the architecture specific part out of <posix/setjmp.h> into
  <posix/arch/<arch>/arch_setjmp.h>.
* Moved setjmp_save_sigs.c from the x86 specific implementation into a
  "generic" sibling directory, since it is reusable (and actually used
  by the PPC implementation).
* Added generic/longjmp_return.c containing a function __longjmp_return,
  which is invoked at the end of siglongjmp(), resetting the signal mask
  and validating the return value. It is used by the PPC implementation,
  and should also be used by the x86 implementation, but I'll leave that
  to someone who's motivated enough to also test it. :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15479 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-10 22:56:52 +00:00
Axel Dörfler 71b550889e Moved dw_sync_data to a private header DirectWindowPrivate.h and renamed it to direct_window_sync_data.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15469 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-10 15:36:38 +00:00
Axel Dörfler ab6a6bed3a * Renamed direct window commands
* Removed unused cruft from ServerProtocol.h


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15468 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-10 15:23:02 +00:00
Axel Dörfler fc70d6db87 * Renamed AS_LAYER_INVAL_{REGION|RECT} to *_INVALIDATE_*.
* Removed unused AS_LAYER_INVALIDATE.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15467 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-10 15:12:28 +00:00
Stephan Aßmus 7be34d3eb2 * removed CopyRegionList, as it made no sense
* finally nailed that much hated bug where the
  wrong background underneath the cursor was restored.
  I always looked for this in the wrong place -
  of course, you cannot blit regions on top
  of the cursor and expect the backup of the
  background to be magically valid still... ;-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15461 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-10 10:42:26 +00:00
Axel Dörfler 463e791c29 Added new window flag B_SAME_POSITION_IN_ALL_WORKSPACES.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15433 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-09 13:07:47 +00:00
Rudolf Cornelissen 224b9020ab added some defines for SCREEN_TO_SCREEN_SCALED_FILTERED_BLIT (in progress).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15425 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-08 20:03:36 +00:00
Axel Dörfler e83820ed57 Merged app_server_new_clipping branch changes r15290 to 15418 back into trunk.
Also fixed Jamfile for the test environment.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15419 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-08 12:41:19 +00:00
Ingo Weinhold c729b01278 The <arch_config.h> header is needed in <syscalls.h>, since we're using
the atomic functions related macros.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15404 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-07 23:11:02 +00:00
Axel Dörfler aa110a00e0 AttachedToWindow() could be called twice in case new views were added during
AttachedToWindow().
This fixes the double team entries in the Deskbar.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15398 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-07 18:04:43 +00:00
Axel Dörfler 715476b7ef The resize code now works correctly, finally - it temporarily did harm ;)
The BViews must be resized directly after every change in the window size - we
cannot wait until B_WINDOW_RESIZED, since subsequent calls have wrong view
sizes, then.
B_WINDOW_RESIZED is only really useful for app_server caused window resizing.
Added TODO to SetLook(): it may change the window size as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15385 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-06 23:15:48 +00:00
Axel Dörfler ac4fe990c9 * The client views are now automatically resized on B_WINDOW_RESIZED as they are in the
server.
  This saves overhead on both sides, the server doesn't need to build the update message
  for the client, and the client doesn't have to unflatten and parse another message.
* This code is actually needed for the new clipping code in the app_server, but shouldn't
  do much harm for the old app_server, either.
* Also disabled getting the bounds from the server, as that is just never needed (and would
  also break the code).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15353 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-06 01:22:02 +00:00
Stefano Ceccherini a410e190a4 Added rect_contains()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15298 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-03 14:12:10 +00:00
Axel Dörfler c072e9f1f5 * BWindow::AddToSubset()/RemoveFromSubset() no longer send their team ID; this
is known by the server, anyway.
* B_MODAL_SUBSET_WINDOW_FEEL now also works as expected.
* Renamed AS_REM_FROM_SUBSET to AS_REMOVE_FROM_SUBSET.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15285 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-02 16:07:02 +00:00
Axel Dörfler 85f8bb71c7 * You can now change the look of a window on the fly.
* renamed some Decorator functions like GetLook() to Look().
* renamed _look to fLook and _flags to fFlags.
* removed the feel from decorators - they don't need to know
  or care about the feel.
* the DefaultDecorator didn't allow resizing of modal windows.
* DefaultDecorator::SetTitle() no longer clears the passed
  in updateRegion, it just fills it (so that you can call
  more than one of these methods after the other, and still
  get a correct update region).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15266 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-01 14:56:01 +00:00
Stefano Ceccherini 17adbf1f0c Misc style changes
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15243 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-30 17:56:56 +00:00
Rudolf Cornelissen b0994d7e75 added field for primary card's name in shared_info.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15186 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-27 10:32:40 +00:00
Axel Dörfler 3f5eacff02 Quick and dirty hack to let those font rendering problems disappear - I don't really
know what's going on, but this appears to fix it. And since we'll get a new glyph
layout backend sooner or later, I don't want to mess with that stuff again.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15176 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-26 22:26:50 +00:00
Axel Dörfler 26b02ddc80 The input_server is now notified when the screen resolution is changed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15165 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-26 16:22:06 +00:00
Rudolf Cornelissen a40e885b9d added field for primary card's name in shared_info.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15157 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-25 21:57:56 +00:00
Axel Dörfler c3b8f9f69a Added a very simple "code_to_name" utility that will print out the name of
an app_server code. It's always up-to-date as it just reads the header
directly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15148 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-25 14:53:34 +00:00
Rudolf Cornelissen e3c42851f7 moved a define to shared_info for logging update.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15120 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-24 15:18:30 +00:00
Rudolf Cornelissen 36e7feca38 updated shared_info for logging update.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15117 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-24 15:06:27 +00:00
Axel Dörfler 45d4256f2d Added a BTokenSpace::SetToken() to assign a specific token.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15111 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-24 13:00:06 +00:00
Rudolf Cornelissen 3ea52afce9 added dpms_flags to shared info.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15107 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-24 12:16:28 +00:00
Rudolf Cornelissen 88489db7f9 added useable INT flag to shared_info.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15105 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-24 11:20:50 +00:00
Axel Dörfler f97761575a * GetPreferredSize() now accepts NULL arguments for "width" and "height"
* use GetFontHeight() instead of: BFont font; GetFont(&font); font.GetHeight(...)
* fixed odd unarchiving of the alignment.
* cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15090 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-23 17:28:18 +00:00
Axel Dörfler 6450b76dd4 Next big step in the event handling:
* RootLayer's mouse event processing is now at its minimum - the
  EventDispatcher handles them now. As a result, a window will now
  get only one message per event.
* RootLayer adds "_view_token" to mouse moved messages that specify
  the view currently under the cursor.
* There is now a mouse event layer in RootLayer that gets preferred
  when it's set - this is now used for the window moving instead of
  the previous mechanism.
* changed the previous DistributeMessage() to an UnpackMessage()
  method following Adi's suggestion.
* caveat: some things might be functionally broken in RootLayer now
  because of removing the mouse notification stuff.
* "be:transit" handling is now done completely client side by
  BWindow::_SanitizeMessage(() (similar to what the input_server does).
  This should also make the mechanism pretty robust, since every
  B_MOUSE_MOVED message can now trigger the view transit (in case a
  message is lost). B_WINDOW_ACTIVATED messages should be generated
  client side as well.
* renamed AS_LAYER_GET_MOUSE_COORDS to AS_GET_MOUSE as it's not a
  layer specific command, and also gets the mouse buttons.
* B_MOUSE_* messages from the up server now contain only a "screen_where"
  field; "where" (in window's coordinates) and "be:view_where" are
  added in BMessage::_SanitizeMessage().
* messages that don't have a valid target in the looper are now
  dropped instead of being sent to the looper - this should be done
  in BLooper as well, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15087 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-23 15:17:58 +00:00
Axel Dörfler b095201503 * changed the way a message is forwarded to the focus view (instead of adding
a suspend focus field to the message, there is now a "feed focus" field in
  case the message should be forwarded).
* added a comment to the BPoint version of _FindView() (since it's broken)
* _DistributeMessage() is now called after _DetermineTarget() - so that it
  can prevent sending the message twice to the focus view.
* removed BWindow::DoUpdate() as it's no longer used.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15066 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-22 12:49:35 +00:00
Michael Lotz 85b31e1b69 Removing Message2 and Message3. They did not proof to be good enough so they don't need to take up space either.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15062 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-21 18:47:51 +00:00
Axel Dörfler 14d02d22f6 Huge cleanup and fixes:
* attachView() is now called _CreateSelf() and creates the app_server
  view counterpart for itself, and no longer for a child view.
* removed superfluous deleteView().
* moved drawing from BWindow::DoUpdate() to BView::_Draw().
* made the recursive hook call functions consistent.
* fixed BWindow::DispatchMessage() to send public messages to the intended
  target (instead of always handling them itself directly).
* DispatchMessage() no longer eats unmapped key events that were targeted
  at the window directly.
* B_KEY_DOWN and B_KEY_UP events are now send to the target view as well
  (this couldn't work before as BMessages were broken with B_PREFERRED_TOKEN).
* the default button is now correctly targeted by BWindow::_DetermineTarget()
  (previously, the enter key was hacked to get through via _HandleKeyDown()).
* removing a view now also makes sure it won't have focus any longer.
* also, the DetachedFromWindow() hooks are now called first, so that any
  changes made there cannot mess up our window anymore.
* removed BView::SetPattern(); _UpdatePattern() now does its job.
* renamend private methods to match our preferred style.
* removed unused methods and variables.
* more consistent naming overall.
* removed _PR3_COMPATIBLE_ stuff - there is definitely no need for us to be
  compatible to that one.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15060 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-21 16:58:36 +00:00
Axel Dörfler 3cace414ad Removed run_task(), as it's not really needed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15057 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-21 12:35:30 +00:00
Axel Dörfler e489029756 * made the dano and r5 message more similar to use (naming).
* coding style changes to structure naming.
* but no bug fixes yet...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15055 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-20 22:24:03 +00:00
Rudolf Cornelissen 551528038f added registerdefine for laptop backlight conttrol.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15053 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-20 20:47:47 +00:00
Axel Dörfler 4ceb1e519c * reverted Adi's premature changes to BWindow and restored _DetermineTarget() and
task_looper() again.
* removed BMessenger::fPreferred - whenever you had to specify "usePreferred" separately,
  you don't have to do that anymore - use B_PREFERRED_TOKEN instead.
* fixed BTokenSpace::GetToken() semantics: it will no longer touch the "object" argument
  in case of failure.
* Introduced a BWindow::_DistributeMessage() that will be part of the event dispatcher
  counterpart to the app_server (the other will be _DetermineTarget()).
* Made it easier to use Michael's Message4 implementation: just add the following line
  to your UserBuildConfig:
	AppendToConfigVar DEFINES : HAIKU_TOP src : USING_MESSAGE4 : global ;
* Introduced ServerWindow::HandlerMessenger() and FocusMessenger() - the first will
  target the client handler, while the other will target the preferred handler of the
  client looper (usually the view having focus).
* Fixed dano message unflattening in the Message4 code.
* Changed BMessage::PrintToStream() to no longer use macros in the Message4 implementation.
* I hope that's all - it's a huge change, but it's all connected.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15046 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-20 16:24:23 +00:00
Stephan Aßmus b223f78041 fixes origin and scale handling, it behaves mostly like R5 now (it is used for drawing only, yes not mouse coords or anything else). Also fixes offscreen layers clipping rebuilding when the user defined clipping is added or changed
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15040 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-20 15:10:18 +00:00
Adi Oanca ace01f864b Removed BWindow::_DetermineTarget(). BWindow's task_looper() just calls BLooper's one. Took Message4 stuff from BWindow's task_looper() and put it in BLooper::task_looper() - guess this is wanted...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15037 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-19 21:44:51 +00:00
Rudolf Cornelissen 58e201cb00 added new registerdefines for LVDS/TMDS distinction code.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15031 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-19 13:50:34 +00:00
Axel Dörfler d081112cb7 * removed tokens are no longer put on a stack and reused - every token is only
used once now. If tokens were reused, you could eventually target the wrong
  (but valid again) messenger.
* removed unused stuff (like GetList()).
* some cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15028 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-19 00:46:44 +00:00
Ingo Weinhold 29306dbe81 Host platform gcc 4 fixes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15026 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-18 22:29:31 +00:00
Axel Dörfler f759822327 * the new input event dispatcher is now actually used, although it doesn't
distribute any messages to the clients yet.
* removed the working thread from RootLayer - for now, its event handlers are
  still called using input filters in the new event dispatcher, though (to
  get things started).
* ServerApp is now using a BMessenger to identify its client, and no longer
  stores the port/token separately.
* the input_server handshake is a bit simpler now, as it can now just reply
  to the app_server message, removed unused code from ServerProtocol.h
* calmed down the MultiLocker (it always printed thread statistics on startup,
  because it's compiled in debug mode).
* removed the cursor thread stuff from AppServer.cpp
* the new event dispatcher now uses a cursor thread when supported (only in
  native mode, not in the test environment), although it improves cursor
  movement under Qemu, the effect is not as good as expected - this might
  need some more investigations (might just be a thread priority problem).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15012 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-18 11:30:06 +00:00
Ingo Weinhold 65f512e089 Fixed gcc 4 build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15010 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-17 22:53:30 +00:00
Axel Dörfler 740ccdc27e Cleanup, added license.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15008 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-17 20:19:27 +00:00
Rudolf Cornelissen 44906a1b98 added two more reg defines for DMA init code NV47. Completed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15004 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-17 18:38:41 +00:00
Rudolf Cornelissen 7514b6b4dc updated register defines to support extended acc engine init stuff.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15002 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-17 16:33:28 +00:00
Rudolf Cornelissen 44e343dc48 updated engine DMA acc init code, part 3 (in progress).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14991 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-17 14:58:52 +00:00
Rudolf Cornelissen efb60a4ef5 updating DMA acceleration code for NV41, 43, 44. Adding code for NV47: sync to XF86, in progress (acc might be broken now..)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14985 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-17 13:00:33 +00:00
Axel Dörfler 128ddaa3e3 Some work on the input_server:
* Rewrote event handling: instead of writing every single device message to
  the event port, they are just queued in a list, and the event loop is only
  notified if necessary (ie. if a notification has been sent already, new
  events are just queued up until the input_server found the time to process
  them).
* This also fixed a big memory leak: every message processed by EnqueueDeviceMessage()
  (IOW every key or mouse event) was leaked!
* no longer abuses gInputMethodListLocker to lock the method event queue
  (it now uses the standard event queue lock).
* removed the completely superfluous, weird and decelerating event caching mechanism
* tried to find a better distribution of work between _SanitizeEvents(),
  _MethodizeEvents(), and _DispatchEvents().
* HandleSetMousePosition() now only does what it's supposed to do (this currently
  causes the mouse to jump at the start, though).
* now uses the "Message4" for message sending if available.
* fixed "kb_mouse_settings.h" to include all headers it needs.
* some more cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14966 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-16 17:25:58 +00:00
Axel Dörfler 1ba67cc8c6 * almost rewrote BMessageQueue; simplified code, removed over-extensive documentation,
cleanup.
* made BMessageQueue::IsLocked() const - the non-const version is still provided
  for binary compatibility.
* Both BMessageQueue::FindMessage() versions are now thread safe, the queue's BLocker
  is now mutable to allow for this.
* renamed BMessage::link to fQueueLink as the "Message4" implementation uses it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14955 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-16 13:01:59 +00:00
Stephan Aßmus f4cee9d5f5 fix the FBC problem, as Ingo pointed out, derived classes contain slots for all virtuals defined in the base class, therefor, it is ok to just define WindowActivated for BScrollBar. The only problem is that BScrollBar::WindowActivated() cannot be called from apps having overridden WindowActivated() in a BScrollBar subclass of their own.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14953 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-15 23:46:02 +00:00
Axel Dörfler 6c17d02551 * Introduced a new handshake between input_server and app_server, and some
temporary handling code in the app_server.
* RootLayer no longer creates the input_server messaging port - this is now
  the responsibility of the input_server.
* Moved AS_CREATE_[OFFSCREEN_]WINDOW from ServerApp::_MessageLooper() to
  _DispatchMessage().
* The RootLayer thread is now started as soon as the input_server is there.
* removed or disabled any input_server stuff in the AppServer class.
* removed old message commmands to the app_server.
* Removed the R5_CURSOR_COMM and HAIKU_APPSERVER_COMM definitions: the
  input_server is now automatically built correctly depending on the target.
* InputServer::EventLoop() plays now safe and checks for error conditions.
* InputServer::EnqueueDeviceMessage() seems to leak memory, added TODO about
  this.
* InputServer event loop messaging uses ports for inner-app communication - why?
* The InputServer event loop thread is no longer killed on exit, it just quits
  when its port is gone.
* Minor cleanup in input_server.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14949 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-15 19:59:53 +00:00
Axel Dörfler 44534147b1 "#ifdef __HAIKU__" is no longer needed with the new build system.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14945 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-15 13:47:48 +00:00
Axel Dörfler 9a1d68e4aa * rewrote ColorControl.h
* removed unused stuff.
* shuffled methods around in the source, so that you don't have to jump so far
  when working at a specific thing (ie. all draw functions are grouped together, ...)
* ResizeToPreferred() should now work as expected.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14934 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-15 02:45:19 +00:00
Stephan Aßmus 034104bc0f * fix invalidation of changed items
* fix deselecting items
* fix selection with the mouse and also holding down modifiers
* fix some more stuff I have already forgotten
* applied coding style in most places
* renamed private functions to be consistent

needs more work though, some stuff can definitely be
removed, some needs to be added


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14932 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-15 01:36:10 +00:00
Stephan Aßmus db3c2e1e8e * drawing is on the road to perfection
* uses another virtual to implement WindowActivated() and draw itself in
  disabled look just like in R5
* fixed _ButtonRectFor() off by one errors
* tiny problems remain when clicking on the ScrollBar (it is shifted)
* the _ValueFor() might not be perfect


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14929 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-15 00:23:03 +00:00
Axel Dörfler f375b21da5 Forgot to remove IPoint.h - it's no longer needed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14926 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-14 19:48:16 +00:00
Axel Dörfler be05d56c7e * the app_server now uses a global token space - this should later be changed to
have different token spaces depending on the scope of its objects.
* removed TokenHandler - we're now using BTokenSpace instead.
* removed unused IPoint.cpp - if we ever need it again, it can still easily be
  resurrected from the dead.
* some cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14925 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-14 19:46:20 +00:00
Michael Pfeiffer 4a6c604ad4 Clean up.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14924 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-14 19:08:35 +00:00
Axel Dörfler 614de12d9c * the decorator knows best which region to update when changing the title, so
it must now fill the updateRegion parameter of SetTitle().
* WinBorder::SetName() is now greatly simplified and achieves better results
  due to that.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14923 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-14 18:16:01 +00:00
Axel Dörfler 02e5c93fd6 Rewrote FilePanel.h, cleanup.
Removed public functions run_open_panel() and run_save_panel() - they are deprecated
now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14917 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-14 15:53:46 +00:00
Axel Dörfler b66d753712 * Prepared the BScreen and BPrivateScreen class to be used with multiple monitors.
* BPrivateScreen now buffers its frame for 0.1 seconds (so that calling it several
  times in a row is both consistent and cheap).
* Added GetFrameBufferConfig() call to the HW interface (and implemented it).
* Added server commands AS_VALID_SCREEN_ID, AS_GET_NEXT_SCREEN_ID, and
  AS_GET_FRAME_BUFFER_CONFIG.
* BPrivateScreen::BaseAddress() and BPrivateScreen::BytesPerRow() are now working.
* minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14915 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-14 14:36:12 +00:00
Axel Dörfler d9525baaf5 * Forgot to update Screen.h with the last commit...
* Introduced and implemented AS_GET_SCREEN_ID_FROM_WINDOW - it only returns B_MAIN_SCREEN_ID,
  though.
* renamed ServerWindow::fHandlerToken to fClientToken.
* The BScreen(BWindow *) constructor now really asks the server for the screen ID.
* ServerApp::fWindowList is now a BObjectList.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14910 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-14 12:08:21 +00:00
Axel Dörfler a817d6ad5a * (tried to) implemented RootLayer::ResizeBy() and activated AS_SET_SCREEN_MODE again;
it works in the test environment, but I haven't yet tested it on real hardware.
* moved PrivateScreen.h to src/kits/interface/ - it's not used outside of that one.
* moved reading the color map from the BPrivateScreen constructor to the ColorMap()
  method.
* improved/cleaned server/client communication for the screen stuff a tiny bit.
* fixed the GetBitmap() method I implemented yesterday.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14908 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-14 11:01:02 +00:00
Axel Dörfler 8bd2c11fc4 Moved the declaration of roundf() to HaikuBuildCompatibility.h - it's missing from
math.h but exported by libroot.so.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14903 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-13 19:43:42 +00:00
Axel Dörfler d2f25ec7a5 That work-around for R5 build targets should no longer be necessary.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14902 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-13 17:54:18 +00:00
Axel Dörfler 8b794301de Changed the way the app_server is built:
* no more libappserver.so - this breaks the "Appearance" application, but that
  has to be fixed some day later.
* the drawing stuff is now built in its own directory as libasdrawing.a.
* TEST_MODE defaults to "0" if not defined yet - it's overridden in the test
  build now, not in the main build.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14896 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-13 15:40:21 +00:00
Axel Dörfler 4e766dd482 * header cleanup, but there is still a lot more to do...
* added round(), roundf(), and roundl() implementations.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14891 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-13 13:22:47 +00:00
Axel Dörfler 6065411b88 ualarm()'s arguments are actually useconds_t, too.
Fixed implementation of ualarm() to support larger values.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14890 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-13 13:20:25 +00:00
Axel Dörfler ec068e96bb No longer needed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14889 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-13 13:06:56 +00:00
Axel Dörfler b22f48cc07 Fixed alarm(), ualarm(), and sleep() return codes - "uint" is not a POSIX type.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14888 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-13 13:06:08 +00:00
Axel Dörfler 71c6382f33 useconds_t and suseconds_t are now long long ints.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14887 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-13 13:05:26 +00:00
Michael Lotz cf10934e5f Introducing Message4. The changes to the related sources are ifdefed with USING_MESSAGE4 which is defined in Message4.h. To use Message4 the Message4.cpp, Message4.h, MessageUtils4.cpp, MessageUtils4.h and MessagePrivate4.h have to be linked to their counterparts without 4 suffix. Then MessageBody.cpp and MessageField.cpp have to be commented out in the app kit Jamfile and r5_message.cpp has to be added. There remain some bugs to be found. Feel free to change that.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14882 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-13 11:31:07 +00:00
Ingo Weinhold 758b1d0e05 Fixes that make Haiku build with gcc 4. Mainly out of the following
categories:
* Missing includes (like <stdlib.h> and <string.h>).
* Linking against $(TARGET_LIBSTDC++) instead of libstdc++.r4.so.
* Local variables shadowing parameters.
* Default parameters in function definitions (as opposed to function
  declarations).
* All C++ stuff (nothrow, map, set, vector, min, max,...) must be imported
  explicitly from the std:: namespace now.
* "new (sometype)[...]" must read "new sometype[...]", even if sometype is
  something like "const char *".
* __FUNCTION__ is no longer a string literal (but a string expression), i.e.
  'printf(__FUNCTION__ ": ...\n")' is invalid code.
* A type cast results in a non-lvalue. E.g. "(char *)buffer += bytes"
  is an invalid expression.
* "friend class SomeClass" only works when SomeClass is known before.
  Otherwise the an inner class with that name is considered as friend.
  gcc 4 is much pickier about scopes.
* gcc 4 is generally stricter with respect to type conversions in C.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14878 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-12 23:27:14 +00:00
Axel Dörfler 292d5ced0e * Rewrote shortkey handling - it now actually works as expected.
* Some work on _DetermineTarget(), more to come.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14869 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-12 16:13:06 +00:00
Axel Dörfler d6f43ca72c Looks like Dano headers aren't perfect. I hope this solution is at least a tiny
bit like Ingo would have done it :)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14857 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-11 15:50:47 +00:00
Axel Dörfler 2b7b3ade5c Added more or less empty "begin/end transaction" handling in ServerWindow.
Right now, only the updates are disabled as a start. I am not sure what else
we can do here, but there probably is something :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14855 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-11 14:25:12 +00:00
Axel Dörfler c12196d47b * Removing fonts now works as expected.
* removing a font family or style now always goes through the font manager.
* removed FreeType "cache" remains (it wasn't used, anyway, and won't be used
  by us).
* renamed SharedObject to ReferenceCounting as that's what it does.
* the default fonts weren't deleted on shutdown.
* added temporary work-around for waiting until a newly created entry is complete
  (just waits a moment...) - this will be fixed once Haiku supports this in a
  better way.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14833 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-10 17:32:35 +00:00
Rudolf Cornelissen 53ea108855 added custom TV_PRIMARY flag
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14830 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-10 16:38:25 +00:00
Axel Dörfler d5f377d66c * BinaryInsertUnique() didn't work at all.
* both, BinaryInsert() and BinaryInsertUnique() now propagate the result of
  the AddItem() call - which could fail because of low memory.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14825 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-10 15:31:18 +00:00
Axel Dörfler 2522a90fd1 Even more font stuff:
* the node monitor is now working - fonts can only be added yet, though
* deleting a FontFamily did not work before, as the last style to be
  removed tried to delete the family again.
* "luckily", FontFamilies and FontStyles were not deleted at all before.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14824 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-10 14:52:26 +00:00
Axel Dörfler 174b20a89a Adds the concept of owning the table entries - before, they were always owned,
now it defaults to not-owning.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14823 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-10 14:49:24 +00:00
Axel Dörfler 90dfa70739 * ServerFont now also adopts the FontStyle's face and direction on
construction.
* ServerFont::SetStyle() now adopts the style's face and direction, too.
* Started a more sane handling of ServerFont::SetFace() (at least there's
  a to-do comment :-)).
* Minor cleanup (GetStyle() -> Style(), GetFamily() -> Family(),
  GetPath() -> Path()).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14809 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-09 20:10:40 +00:00
Axel Dörfler 974dd00c85 The font manager now has default fonts for bold/fixed as well - these are now used
in the DesktopSettings as defaults, too (but can be changed there).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14804 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-09 19:16:25 +00:00
Axel Dörfler d0a688ee92 Introduced and implemented new font command AS_GET_DEFAULT_SYSTEM_FONT that returns
the default fonts of the app_server.
Moved some font command implementations around to group them a bit better.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14800 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-09 18:34:48 +00:00
Axel Dörfler f46e077c5f Changed the meaning of the second parameter in AttachString(): it's now the maximum
length, not the length of the string.
Introduced a maximal string length that may be sent at once.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14799 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-09 18:28:13 +00:00
Ingo Weinhold 88ccb61ad5 Removed GCC headers float.h and varargs.h. Fixed limits.h.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14798 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-09 18:01:16 +00:00
Stephan Aßmus 2b97fe884d now updates BView::PenLocation() correctly after DrawString(), stuff like DrawChar('a') is working nicely now, for rotated text much better then in BeOS in fact because of subpixel precision in pen location
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14794 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-09 16:55:08 +00:00
Axel Dörfler 5e4d267b5e The FontStyles are already deleted when deconstructing the family list - the
styles hash table shouldn't try to delete them again.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14780 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-08 19:04:01 +00:00
Axel Dörfler ec9b3f7ca1 The font manager now utilizes a hash table to look up fonts by ID.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14777 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-08 16:49:33 +00:00
Jérôme Duval e970946333 EHOSTDOWN not needed for Haiku
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14761 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 20:09:10 +00:00
Ingo Weinhold 64c51217b2 Fixed header guard name.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14759 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 18:17:21 +00:00
Axel Dörfler 5f931929f7 Accidently forgot to commit these files. They should have been part of r14751.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14756 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 17:33:24 +00:00
Axel Dörfler 862542af1b This fixes the build under Dano/Zeta using the libbe_test target (and maybe others).
As a result, the app_server test environment can be run in Dano/Zeta, but doesn't
yet work correctly (no mouse messages or keyboard input).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14752 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 16:51:33 +00:00
Axel Dörfler e37155c670 * The font list is now cached client-side. The app_server is only queried for
updates.
* Optimized retrieving the font list from the server.
* This greatly simplifies the app_server communication for getting the font
  list as well - there are now only 2 commands instead of 6.
* Moved extra font flags creation from ServerApp to FontStyle::Flags().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14751 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 16:19:40 +00:00
Axel Dörfler 41572514dd * Added BString version of LinkReceiver::ReadString().
* adopted this method for ServerLink as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14750 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 16:14:05 +00:00
Ingo Weinhold ca9e5772c3 * Reintroduced third LinkAgainst parameter <mapLibs>, defaulting to true.
Library names are now mapped for all targets but "host" (not only for
  "haiku") -- added one more level of indirection to achieve that.
  (TARGET_LIBRARY_NAME_MAP -> *_LIBRARY_NAME_MAP_*).
* Renamed build/HaikuBuildCompatibility.h to BeOSBuildCompatibility.h
  (auto-included when compiling something that uses the Be API for platform
  "host" on anon-BeOS platform), and introduced build/HaikuBuildCompatibility.h,
  which can be included when compiling something that can be built for both,
  Haiku and BeOS compatible platforms.
* Introduced libhaikucompat.a, a library that adds a few functions existing
  under Haiku, but not under BeOS.
* New rule AddSubDirSupportedPlatforms.
* Renamed libopenbeos.so to libbe_haiku.so.
* Introduced new target platform "libbe_test", which is basically equivalent
  to a BeOS compatible host platform target, with the exception, that instead
  of the host platform's libbe.so a special build of Haiku's libbe.so
  (libbe_haiku.so (formerly known as libopenbeos.so)) is used. Furthermore
  Haiku's public app, interface, storage, and support kit headers are used
  when compiling. This replaces the less nice way in which the test app server
  and applications for this test environment were built.
  When building for platform "libbe_test", the library name "be" is
  autotranslated to "libbe_haiku.so". Thus most applications don't need
  special fiddling when them building them for the app server test environment;
  usually an "AddSubDirSupportedPlatforms libbe_test ;" will suffice.
* Reduced the dependencies of <syscalls.h> and fixed problems caused by this
  (e.g. source files not including the needed headers directly).



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14749 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 16:07:25 +00:00
Axel Dörfler 6efb3f085f Added statvfs.h header and implemented statvfs() and fstatvfs() - both untested, though.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14746 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 13:47:55 +00:00
Axel Dörfler 42b5ae7db9 BFont::_GetExtraFlags() no longer returns a status value, but fills in default
values in case the server communication failed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14742 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 11:08:27 +00:00
Axel Dörfler b2cc345461 More font work:
* Simplified server communication a bit: instead of separate queries for font
  direction, "is fixed", ... there is now a private extra flags field that is
  filled on demand.
* The server command names now describe what the command does, and are not simply
  named after the BFont method (AS_SET_FAMILY_AND_STYLE vs. AS_GET_FAMILY_AND_STYLE_IDS).
* Replaced B_SET_SYSFONT_{PLAIN|BOLD|FIXED} with a single B_GET_SYSTEM_FONTS.
* Rewrote Font.h and added our license.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14741 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 11:02:39 +00:00
Stephan Aßmus 4f34cedfba also contains code and ideas from Stefano
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14737 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 01:33:09 +00:00
Stephan Aßmus 5083a8d56d stunning improvements to drawing, completely removed flickering, only minor visual problems remain, maybe needs testing with regard to targeted views being removed or the scrollbar being removed etc
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14736 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 01:26:13 +00:00
Stephan Aßmus 0118ad76e1 * Painter uses the line_cap and join_mode settings of DrawState
* Painter implements DrawShape for stroking and filling BShape data
* Painter uses clipping to avoid problems with huge coordinates, the R5 app_server can be crashed by this.
  -> this should be added to more places as well like text rendering
* DrawingEngine uses the Painter to draw BShape data


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14735 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 01:23:40 +00:00
Stephan Aßmus c325acedde just a bit of clean up and added const where appropriate
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14732 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 01:16:50 +00:00
Axel Dörfler 86ad4b9c5e First steps into on-demand font scanning. When you've installed lots of fonts, this
will speed up launching the app_server considerably (once it's done).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14720 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-06 18:58:09 +00:00
Stephan Aßmus 5ac57aebfb improved look and applied style guide, fixed redrawing in BWindows with synchronous controls, it wouldn't have mattered if Haiku didn't have anti-aliasing, override B_RETURN on keydown to disallow turning the control off
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14715 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-05 16:46:36 +00:00
Stephan Aßmus e7869c4c74 renamed DisplayDriverPainter to DrawingEngine, removed tons of duplicated code, and - guess what - found some bugs while doing so... but nothing critical. This patch removes the former DisplayDriver API from libappserver.so, which I think breaks Decorator plug-ins for now
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14707 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-04 18:22:22 +00:00
Axel Dörfler 4d18991268 Added a image_debug_lookup_user_symbol_address() that one day may find symbol names
in user images - right now, it only finds the image name and base address.
Fixed "images" debugger command - it actually acquired a mutex to dump the images...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14705 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-04 17:25:58 +00:00
Jérôme Duval d05775b3bd added seteuid and setegid
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14701 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-04 16:38:40 +00:00
Jérôme Duval 0680eec72c added two missing functions : seekdir and telldir
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14699 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-04 16:13:13 +00:00