Loading...
Searching...
No Matches
Classes | Macros | Enumerations | Variables
Roster.h File Reference

Provides the app_info struct, the BRoster class and the be_roster global. More...

Classes

struct  app_info
 Provides info for a running app. More...
 
class  BRoster
 The BRoster class lets you launch apps and keeps track of apps that are running. More...
 

Macros

#define _B_APP_INFO_RESERVED1_   (0x10000000)
 Reserved for future use, do not use.
 
#define B_ARGV_ONLY   (0x8)
 The application can't receive messages, information must be passed at launch through argv, typically from the command line.
 
#define B_BACKGROUND_APP   (0x4)
 This is intended for background executables, these are hidden from the Deskbar. They also receive less lenience when the system shuts down.
 
#define B_EXCLUSIVE_LAUNCH   (0x2)
 This will make the registrar ensure only one application with this application signature is running at any given time.
 
#define B_LAUNCH_MASK   (0x3)
 Bitwise and this with app_info::flags to get at the flags above.
 
#define B_MULTIPLE_LAUNCH   (0x1)
 There are no restrictions on how many times this application can be opened.
 
#define B_SINGLE_LAUNCH   (0x0)
 Similar to B_EXCLUSIVE_LAUNCH, with the exception that it is per file location, copying the file to a second location therefore allows the application to be started a second time.
 

Enumerations

enum  watching_request_flags {
  B_REQUEST_LAUNCHED = 0x00000001 ,
  B_REQUEST_QUIT = 0x00000002 ,
  B_REQUEST_ACTIVATED = 0x00000004
}
 

Variables

const BRosterbe_roster
 Represents the default BRoster.
 

Detailed Description

Provides the app_info struct, the BRoster class and the be_roster global.

Macro Definition Documentation

◆ B_ARGV_ONLY

#define B_ARGV_ONLY   (0x8)

The application can't receive messages, information must be passed at launch through argv, typically from the command line.

Warning
B_ARGV_ONLY Is never intended for GUI Applications. Executables marked with this flag will be killed on shutdown. BMessages are absolutely required for correct operation of GUI applications on Haiku.

Using this flag with B_EXCLUSIVE_LAUNCH and B_SINGLE_LAUNCH will prevent the application from correctly getting the messages about subsequent launch requests!

Since
BeOS R3

◆ B_BACKGROUND_APP

#define B_BACKGROUND_APP   (0x4)

This is intended for background executables, these are hidden from the Deskbar. They also receive less lenience when the system shuts down.

Since
BeOS R3

◆ B_EXCLUSIVE_LAUNCH

#define B_EXCLUSIVE_LAUNCH   (0x2)

This will make the registrar ensure only one application with this application signature is running at any given time.

Attempts to launch the same application again will result in a B_ARGV_RECEIVED or B_REFS_RECEIVED message delivered to the existing instance. The application should take care of handling these messages correctly. Applications which can't or don't want to handle this should use B_MULTIPLE_LAUNCH instead.

This flag only ensures exclusive launches when started via BRoster, launching an application in another way, for example with fork+exec will allow the application to run a second time. This should not be relied on for applications that need to run exclusively in all cases.

Since
BeOS R3

◆ B_LAUNCH_MASK

#define B_LAUNCH_MASK   (0x3)

Bitwise and this with app_info::flags to get at the flags above.

Since
BeOS R3

◆ B_MULTIPLE_LAUNCH

#define B_MULTIPLE_LAUNCH   (0x1)

There are no restrictions on how many times this application can be opened.

Since
BeOS R3

◆ B_SINGLE_LAUNCH

#define B_SINGLE_LAUNCH   (0x0)

Similar to B_EXCLUSIVE_LAUNCH, with the exception that it is per file location, copying the file to a second location therefore allows the application to be started a second time.

Attempts to launch the same application from the same path again will result in a B_ARGV_RECEIVED or B_REFS_RECEIVED message delivered to the existing instance. The application should take care of handling these messages correctly. Applications which can't or don't want to handle this should use B_MULTIPLE_LAUNCH instead.

This flag only ensures exclusive launches when started via BRoster, launching an application in another way, for example with fork+exec will allow the application to run a second time. This should not be relied on for applications that need to run exclusively in all cases.

Since
BeOS R3

Enumeration Type Documentation

◆ watching_request_flags

Enumerator
B_REQUEST_LAUNCHED 

B_SOME_APP_LAUNCHED

Since
BeOS R3
B_REQUEST_QUIT 

B_SOME_APP_QUIT

Since
BeOS R3
B_REQUEST_ACTIVATED 

B_SOME_APP_ACTIVATED

Since
BeOS R3