Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

Platforms to show: All Mac Windows Linux Cross-Platform

GetSystemUIModeMBS as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
global method System MBS MacOSX Plugin 2.8 Yes No No Yes, macOS only No
Function: Returns the current Mac OS X System UI Mode for your application.
Notes:
Returns -1 on any error.
See SetSystemUIModeMBS for more details.
Please use presentationOptions in NSApplicationMBS for Cocoa applications.

Feedback, Comments & Corrections

GetSystemUIModeOptionsMBS as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
global method System MBS MacOSX Plugin 2.8 Yes No No Yes, macOS only No
Function: Returns the current Mac OS X System UI Mode options for your application.
Notes:
Returns -1 on any error.
See SetSystemUIModeMBS for more details.
Please use presentationOptions in NSApplicationMBS for Cocoa applications.

Feedback, Comments & Corrections

SetSystemUIModeMBS(mode as Integer, Options as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
global method System MBS MacOSX Plugin 2.8 Yes No No Yes, macOS only No
Function: Sets the current System UI mode for your application.
Notes:
Details from Apple's documentation:

Sets the presentation mode for system-provided user interface elements.

The presentation mode of an application determines which system-provided user interface elements are visible on thes screen. When the frontmost application changes its presentation mode, a kEventAppSystemUIModeChanged Carbon event is sent to all applications that have registered for the event. This event is also sent when an application is activated; it contains the newly active application's presentation mode.

Note that the system UI mode is a per-process state. Switching from a process that is suppressing system UI to another processthat is not will cause system UI elements to become visible automatically. Switching back to the first process will suppress system UI elements again.

The modes available:
kUIModeNormal0In this mode, all standard system UI elements are visible.
kUIModeContentSuppressed1In this mode, system UI elements which cover the "content area" of the screen (the area other than the menubar) are hidden. However, these elements may automatically show themselves in response to mouse movements or other user activity; specifically, the Dock will still show itself automatically when the mouse moves into the Dock's auto-show region.
kUIModeContentHidden2In this mode, system UI elements which cover the "content area" of the screen (the area other than the menubar) are hidden. Unlike kUIModeContentSuppressed, most UI elements will not automatically show themselves in this mode.
kUIModeAllHidden3In this mode, all system UI elements, including the menubar, are hidden. Most system UI elements will not automatically show themselves in this mode. The application may request that the menubar automatically show itself while in this mode by passing the kUIOptionAutoShowMenuBar flag to SetSystemUIMode.

The options which you can combine:
kUIOptionAutoShowMenuBar1Requests that the menubar automatically show itself when the user moves the mouse into the screen area that would ordinarily be occupied by the menubar. Only valid with kUIModeAllHidden.
kUIOptionAnimateMenuBar2Requests that the menubar animate on or offscreen, if the UIMode is also being changed such that the menubar will change visibility. Unlike other UI options, this option is not stored and only affects the behavior of this call to SetSystemUIMode. Valid for all modes. Available in Mac OS X 10.7 and later.
kUIOptionDisableAppleMenu4Disables all items in the Apple menu. Valid for all modes.
kUIOptionDisableProcessSwitch8The active application may not be changed while this process is active. Currently disables the Command-Tab and Command-Shift-Tab key sequences to switch the active process, and the global window rotation key sequence selected by the user in the Keyboard preference pane. SetFrontProcess may still be used to explicitly switch the active process. Only valid with modes other than kUIModeNormal.
kUIOptionDisableForceQuit16The Force Quit window may not be displayed while this process is active. Currently disables the Command-Option-Escape key sequence to open the Force Quit window and the Force Quit menu item in the Apple menu. Only valid with modes other than kUIModeNormal.
kUIOptionDisableSessionTerminate32The current login session may not be terminated while this process is active. Currently disables the Power key and the Restart, Shut Down, and Log Out menu items in the Apple menu. Only valid with modes other than kUIModeNormal.

Please use presentationOptions in NSApplicationMBS for Cocoa applications.

Some examples using this method:

Some FAQ entries about this method:

Feedback, Comments & Corrections

The items on this page are in the following plugins: MBS MacOSX Plugin.




Links
MBS Xojo Chart Plugins