Commit Graph

2692 Commits

Author SHA1 Message Date
John Scipione
2446f53bc8 BListView: Impliment autoscroll
BeOS had a feature where you could click on a list and while holding
down the mouse button scroll through the list items selecting them
as you went. I implemented the same feature on Haiku.

Did the work in separate thread which makes sure that the mouse
is held down the whole time even if you leave the view.

Thanks Diver for bringing this feature to my attention.
2016-08-18 16:36:46 -07:00
John Scipione
9dfd244e92 BListView: Style fixes
* Rename kDoubleClickTresh to kDoubleClickThreshold
  and use floating point in rval
* Pointer (*) goes with type for property var
* Use {}'s for multi-line if conditional
* rename point to where (consistent with header and rest of IK)
* Explicitly compare with 0 for bitwise operator statements
* Rename InitiateDrag() params
2016-08-18 16:36:28 -07:00
Adrien Destugues
c2ddcb7957 elf.h: also define SELFMAG
- Used by distcc when it detects elf.h.
2016-08-07 13:39:27 +02:00
Adrien Destugues
8efb6db7b9 elf.h: rename ELF_MAGIC to ELFMAG
- This is how it is named in other versions of elf.h (Linux, glibc, possibly more)
- ELF_MAGIC is used by libelf for the same thing, and the defines conflicts,
  breaking libelf build on Haiku.
2016-08-06 20:32:47 +02:00
John Scipione
81364c9d82 BColorMenuItem: add custom color menufield
http://insightfactory.tumblr.com/image/142366356207

* Make the color box a rectangle with proportions of golden ratio.
* Override GetContentSize() to make menu item area larger.
* Label should never truncate since I make sure there is enough room.
* Draw the label using BMenuItem parent class
* Carefully adjust the spacing so that there is an attractive amount of
  padding between the checkmark and color box and the color box and label.

Add _AddMenu method to BMenuField that adds BColorMenuItem as its
base menu item. This shows the BColorMenuItem in the closed state.

Create BPrivate::MenuItemPrivate

Add a SetSubmenu() method to MenuItemPrivate that gives you
the ability to add a submenu after creating the object. This
method should be public

Skip disabled items

Color gets updated even if you select an item in a submenu
2016-07-31 19:42:39 -07:00
John Scipione
dcecaf60ad BMenu: Remove _ from protected method _DrawItems 2016-07-31 19:42:39 -07:00
John Scipione
61dfdec415 BMenu and friends: style fixes
BMenuBar: style fix: msg => message

MenuPrivate: style fixes

MenuItem: 80 char limit style fix

MenuBar: tiny style fix

Menu: tiny style fix, indentation

Menu: Small refactor

Implement _SetIgnoreHidden() in header
Change on to ignoreHidden
Change on in _SetStickyMode to sticky

_BMCItem_: tiny whitespace style fix

Menu: style fixes, rename msgr => messenger

BMenu: style fix, pointer != NULL

BMenu::Archive rename ret to status

Also check pointer against NULL explicitly

BMenuItem style fixes: rename abbreviation, pointer style
2016-07-31 19:42:39 -07:00
Augustin Cavalier
2381f8276a be_apps/ServicesDaemon: Remove.
The last reference to the Services Daemon, which was removed from the
tree a while back (the launch_daemon has supplanted it).
2016-07-29 18:41:30 -04:00
Augustin Cavalier
a3e794ae45 be_apps/Deskbar: Remove.
The only file in here was Deskbar.h, which just included the "real"
Deskbar.h. Considering nothing in-tree cares about this, and only
a small number of applications at HaikuArchives do, and that Haiku already
broke BeOS source compatibility in lots of other ways, let's just remove
this deprecated cruft.
2016-07-29 18:41:30 -04:00
Dario Casalinuovo
4dd09daff7 Streaming: Use const reference in place of copying
* Thanks to Markus for reporting.
2016-06-25 01:13:10 +02:00
Dario Casalinuovo
0ba82236bd Streaming: Remove any pointer BUrl argument
* There's no need to pass BUrl by pointer, this is
potentially dangerous and leaky without any advantage,
copying is definitely safer.
2016-06-24 19:00:38 +02:00
Mark Hellegers
e1c98ceaf7 Add support for TLS SNI
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2016-06-20 19:42:24 -04:00
Andrew Lindesay
fa2dd9c45f BPackageInfo::Parser: Validate URL strings.
Fixes #12710.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
I fixed the modifications to the Jamfiles in src/bin, they were all wrong
in the patch.
2016-06-18 18:40:07 -04:00
Mark Hellegers
ac315db012 locale: Fix 24 hour format for DateTimeFormats.
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
Fixes #12575. I checked with PulkoMandy on IRC before merging this,
and fixed some whitespace violations of the coding style.
2016-06-18 18:09:56 -04:00
Ingo Weinhold
c60453fd79 Core dump: Add symbols for commpage to core file 2016-05-22 22:10:48 +02:00
Augustin Cavalier
f0a5e33a55 HttpAuthentication: Add explicit copy & assignment constructors.
So that we don't copy the BLocker. Fixes part of the build.
2016-05-13 16:49:52 -04:00
Augustin Cavalier
69b8f7f1f4 BLocker: Make copy constructor & assignment operator private.
On suggestion of Axel.
2016-05-13 16:23:08 -04:00
Dario Casalinuovo
6d63bc5e60 launch_media_server: Use BLaunchRoster::Start
* Remove SyncToServices and the related code from BMediaRoster.
2016-05-07 22:22:55 +02:00
Jérôme Duval
c9dba74273 Added some support for GCC 7. 2016-05-05 18:20:26 +02:00
John Scipione
3490eda827 ControlLook: Rename border param to borderStyle
border vs. borders is confusing.

BTabView: Rename border param to borderStyle

BTabView docs: rename border param to borderStyle

enumerate border styles in docs
2016-04-29 14:31:05 -07:00
Ingo Weinhold
a0c364c70d Core file images note: Add text delta field 2016-04-29 22:32:15 +02:00
Rene Gollent
c9dd7d0ddf libbnetapi: Extend socket classes.
B{Abstract,Datagram,Secure}Socket:
- Add functionality to listen for and accept new connections, thus allowing
  one to use the socket classes for server functionality as well.

BSecureSocket:
- Adjust to take into account differences between how SSL needs to be called
  when accepting an incoming connection vs initiating an outbound one.
  The handshake on the accepted connection stills fails for unknown reasons
  at the moment though.

Note that these changes break the ABI, and thus any packages making use of
them directly will need a rebuild.
2016-04-28 22:30:40 -04:00
John Scipione
22097d7aee Style fixes to BPeropertyInfo class 2016-04-27 11:10:34 -07:00
Ingo Weinhold
5cde7a856d Add symbol and string table addresses to core file 2016-04-27 02:16:54 +02:00
Ingo Weinhold
82185a52e2 Future proofing core file format
* The Haiku specific notes contain a structure size field, now.
* Change the type of the count and size fields in the Haiku specific
  notes to uint32 also for 64 bit ELF. The size field for a note is a
  uint32 anyway.
2016-04-27 00:55:23 +02:00
Ingo Weinhold
467fe4ca0c kernel: Add core dump facility
* Add function core_dump_write_core_file(). It writes a core file for
  the current thread's team. The file format is similar to that of
  other OSs (i.e. ELF with PT_LOAD segments and a PT_NOTE segment), but
  most of the notes are Haiku specific (infos for team, areas, images,
  threads). More data will probably need to be added.
* Add team flag TEAM_FLAG_DUMP_CORE, thread flag
  THREAD_FLAGS_TRAP_FOR_CORE_DUMP, and Team property coreDumpCondition,
  a condition variable available while a core dump is progress. A
  thread that finds its flag THREAD_FLAGS_TRAP_FOR_CORE_DUMP set before
  exiting the kernel to userland calls core_dump_trap_thread(), which
  blocks on the condition variable until the core dump has finished. We
  need the team's threads to stop so we can get their CPU state (and
  have a generally unchanging team state while writing the core file).
* Add user debugger message B_DEBUG_WRITE_CORE_FILE. It causes
  core_dump_write_core_file() to be called for the team.
* Dumping core as an immediate effect of a terminal signal has not been
  implemented yet, but that should be fairly straight forward.
2016-04-24 18:22:14 +02:00
Dario Casalinuovo
76889670db shutdown_media_server: Finalize rework of synchronization
* When the user isn't requesting a custom notification, it will
be a BMediaRoster job to do it.
* Reintroduce BMediaRoster::SyncToServices, this time based on local
message passing rather than a global semaphore.
* SyncToServices is used in launch_media_server to make the process
more launch_daemon safe and faster in the average case.
* It was an error to add notifications in the media_server.
* Fixes #12717.
2016-04-21 19:02:27 +02:00
Dario Casalinuovo
11c7bd86e2 Replace synchronization semaphore with async messages
* Remove SyncToServices, I will probably readd it in future
but this time using a local synchronization service more than
relying on the media_server to release the semaphore.
* Due to some discussions today in mailing list I decided
to step back and retry the initial way to notify media rosters
about media services status. It is woking by using two different
notifications for reconnecting to the media_server and notifying
the local subscribers.
* This speed up the media services restart.
* Sorry for the noise and very thanks for reviewing my code to
everyone.
2016-04-05 00:41:20 +02:00
Dario Casalinuovo
53c3fa5137 Introduce functionality for syncing with the media services
* The global synchro semaphore is provided with the purpose of
being used to avoid threads lock up when the media_server is in
an undefined state. There's still room for improvements.
* BMediaRoster::SyncToServices lock up on a semaphore until
the multi_audio correctly connected to the mixer.
2016-04-04 01:27:09 +02:00
Axel Dörfler
6f7fc2204b NodeMonitor: Added B_WATCH_CHILDREN flag.
* Added a directory argument for notify_{stat/attribute}_changed().
* This allows to watch only a directory, and get the notifications for
  all of its files, not just add/remove entry notifications.
2016-03-28 14:31:27 +02:00
Adrien Destugues
97dfeb9670 Make some headers C89 safe again
- Allows to use FindDirectory.h in C89 sourcecode (no C++ style comments
  allowed)
2016-03-27 16:58:38 +02:00
Dario Casalinuovo
8c7679851f Move MediaIO in it's own header 2016-03-25 22:44:56 +01:00
Dario Casalinuovo
b777602827 MediaFile: Rework to support BUrl sources 2016-03-25 22:19:47 +01:00
Dario Casalinuovo
7b79e0694e Add prototype BMediaIO interface 2016-03-25 21:54:24 +01:00
John Scipione
8be1a5f082 Slider: Style fixes
Pointer style
Newlines
Indentation
Compare against NULL or 0 explicitly
use single floating point precision for float literals (i.e. use 0.0f)
2016-03-22 12:00:36 -07:00
Julian Harnath
310238937c Network Kit: add BNetworkDevice::Control
* Allows to do an arbitrary ioctl on the network device

* For ifreq and ieee80211req requests
2016-03-15 21:59:03 +01:00
John Scipione
53f75ce5d6 BColorControl: Remove fOffscreenView pointer
...and rename fBitmap to fOffscreenBitmap to make it more clear what it is.

We don't need to save a pointer to both the offscreen bitmap and
the offscreen view, just the bitmap. We can access the view by calling
fOffscreenBitmap->ChildAt((int32)0). This gives us back a _reserved private
variable slot.

In the (unlikely) case that _InitData() is called with offscreen = false but
the fOffscreenBitmap is not NULL, delete fOffscreenBitmap before
setting it to NULL so that memory is not leaked.
2016-03-12 19:14:26 -08:00
Augustin Cavalier
80bc632afd BStatusBar: Restore the old blue-ish color from before the Set*Color changes. 2016-03-07 16:08:00 -05:00
Adrien Destugues
a5a3b2d9a3 Bluetooth: fix thread safety issue.
Fixes #11428.
2016-02-14 14:07:21 +01:00
Dario Casalinuovo
138a802617 BMediaEventLooper: Use enqueue_time in a different shape
* This is the only solution that allowed to use the best
of both ways to do this calculus. I've also tested it
with a modified sound player that snoozed every time
the buffer should be handled, and found that neither
of the lateness calculus I tested (including enqueue_time)
really solve all problems. That's why I've tried to find
an average solution. There's still room for improvements
eventually.
2016-02-03 13:25:13 +01:00
Axel Dörfler
de4b1dede1 BMailProtocol: Removed delete/append methods.
* The mail system is file based which makes these methods pretty much
  superfluous.
2016-01-26 16:01:03 +01:00
Axel Dörfler
8180539313 IMAP: setting flags, and body fetching works now.
* The direct methods in BMailProtocol now forward the request to the
  looper; it's no longer the mail_daemon's responsibility to know
  anything about that protocol.
* It's in desperate need of refactoring, but it doesn't hurt to add
  it to the repository as is.
2016-01-05 20:12:26 +01:00
looncraz
7f9368cae5 Set*UIColor, etc.
The inseparable changes necessary to support live color updating across the
system in a sane, safe, and performant manner.

BView gains:

HasSystemColors()
HasDefaultColors()
AdoptSystemColors()
AdoptParentColors()
AdoptViewColor(BView*)
SetViewUIColor(color_which, float tint)
SetHighUIColor(...
SetLowUIColor(...
ViewUIColor(float* tint)
HighUIColor(...
LowUIColor(...
DelayedInvalidate()

BWindow gains a simple helper method:
IsOffscreenWindow()

BMessage gains:

AddColor()
FindColor()
GetColor()
HasColor()            * allegedly this API is deprecated, but I implemented it anyway
ReplaceColor()
SetColor()

Previous private ColorTools methods are made public and moved into GraphicsDefs:

mix_color, blend_color, disable_color

These are fully compatible with BeOS dan0 R5.1 methods and are just code cleanup
of BeOS example code under the OpenTracker license.

In addition, four new colors are created:
B_LINK_TEXT_COLOR
B_LINK_HOVER_COLOR
B_LINK_ACTIVE_COLOR
B_LINK_VISITED_COLOR

These changes are documented in their proper user documentation files.

In addition, due to a history rewrite, B_FOLLOW_LEFT_TOP has been defined and
used in lieu of B_FOLLOW_TOP | B_FOLLOW_LEFT and is included in this commit.

On the app_server side, the following has changed:

Add DelayedMessage - a system by which messages can be sent at a scheduled time,
and can also be merged according to set rules.  A single thread is used to service the
message queue and multiple recipients can be set for each message.
Desktop gains the ability to add message ports to a DelayedMessage so that
said messages can target either all applications or all windows, as needed.

Desktop maintains a BMessage which is used to queue up all pending color changes
and the delayed messaging system is used to enact these changes after a short
period of time has passed.  This prevents abuse and allows the system to merge
repeated set_ui_color events into one event for client applications, improving
performance drastically.

In addition, B_COLORS_UPDATED is sent to the BApplication, which forwards the message
to each BWindow.  This is done to improve performance over having the app_server
independently informing each window.

Decorator changes are live now, which required some reworking.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2016-01-04 06:48:22 -05:00
Markus Himmel
52c0749723 BLayoutBuilder: Add support for BCardLayout
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2015-12-26 20:13:25 -05:00
Markus Himmel
5f2db70ffb Interface Kit: Add BCardView
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2015-12-26 20:13:22 -05:00
Dario Casalinuovo
ec7d3b4053 Move old launch_media_server to deprecated file 2015-12-06 15:09:12 +01:00
Dario Casalinuovo
1acc73c437 Deprecate media_realtime_init_* functions 2015-12-06 15:03:49 +01:00
Dario Casalinuovo
226be01113 media_kit: General maintainance
* Move !missing_symbols.cpp in the legacy directory.
* Move useless methods in a Deprecated.cpp file.
* SetRealtimeFlags / GetRealtimeFlags are useless, they
don't make sense nowadays.
* The symbols are anyway preserved.
2015-12-05 18:59:38 +01:00
Dario Casalinuovo
2b51499295 Initial implementation of BMediaEncoder
* People interested, please review!
* This is based on the patch from Fredrik Moden which was based on
the Oleg Krysenkov one.
* The original patch has been reworked by myself.
* Adapted the code to work with the new PluginManager API which
differently than before doesn't need to contact the media_server.
2015-12-02 16:08:06 +01:00
Dario Casalinuovo
05962bb1e1 Add a way to register loopers for quit
* BApplication can now take the job to quit a BLooper at
the application quit. It's rejecting requests from windows too.
* BMediaRoster is using now this service in conjunction with the
MediaRosterUndertaker.
* The BeBook specify that we should have a valid BApplication
before to instantiate the BMediaRoster. While in theory we should
add a debugger call when this situation happens, in pratice this
might lead to more problems. For example libraries might use the
media_kit and create a BApplication object, but they aren't
applications, this is a design problem. So I decided to replace it
with a TRACE call for the moment.
2015-11-28 16:35:03 +01:00