Author: rmottola
Date: Wed Oct 28 02:39:07 2015
New Revision: 39100

URL: http://svn.gna.org/viewcvs/gnustep?rev=39100&view=rev
Log:
Primitive presentationOptions implementation

Modified:
    libs/gui/trunk/ChangeLog
    libs/gui/trunk/Headers/AppKit/NSApplication.h
    libs/gui/trunk/Source/NSApplication.m

Modified: libs/gui/trunk/ChangeLog
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/gui/trunk/ChangeLog?rev=39100&r1=39099&r2=39100&view=diff
==============================================================================
--- libs/gui/trunk/ChangeLog    (original)
+++ libs/gui/trunk/ChangeLog    Wed Oct 28 02:39:07 2015
@@ -1,3 +1,9 @@
+2015-10-28 Riccardo Mottola <[email protected]>
+
+       * Headers/AppKit/NSApplication.h
+       * Source/NSApplication.m
+       Primitive presentationOptions implementation.
+
 2015-10-28 Riccardo Mottola <[email protected]>
 
        * Headers/AppKit/NSScrollView.h

Modified: libs/gui/trunk/Headers/AppKit/NSApplication.h
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/gui/trunk/Headers/AppKit/NSApplication.h?rev=39100&r1=39099&r2=39100&view=diff
==============================================================================
--- libs/gui/trunk/Headers/AppKit/NSApplication.h       (original)
+++ libs/gui/trunk/Headers/AppKit/NSApplication.h       Wed Oct 28 02:39:07 2015
@@ -3,7 +3,7 @@
 
    The one and only application class
 
-   Copyright (C) 1996,1999 Free Software Foundation, Inc.
+   Copyright (C) 1996-2105 Free Software Foundation, Inc.
 
    Author:  Scott Christley <[email protected]>
    Date: 1996
@@ -149,6 +149,27 @@
 typedef NSUInteger NSApplicationPrintReply;
 #endif
 
+
+#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
+typedef enum _NSApplicationPresentationOptions
+{
+  NSApplicationPresentationDefault                    = 0,
+  NSApplicationPresentationAutoHideDock               = (1 <<  0),
+  NSApplicationPresentationHideDock                   = (1 <<  1),
+  NSApplicationPresentationAutoHideMenuBar            = (1 <<  2),
+  NSApplicationPresentationHideMenuBar                = (1 <<  3),
+  NSApplicationPresentationDisableAppleMenu           = (1 <<  4),
+  NSApplicationPresentationDisableProcessSwitching    = (1 <<  5),
+  NSApplicationPresentationDisableForceQuit           = (1 <<  6),
+  NSApplicationPresentationDisableSessionTermination  = (1 <<  7),
+  NSApplicationPresentationDisableHideApplication     = (1 <<  8),
+  NSApplicationPresentationDisableMenuBarTransparency = (1 <<  9),
+  NSApplicationPresentationFullScreen                 = (1 << 10),
+  NSApplicationPresentationAutoHideToolbar            = (1 << 11)
+} NSApplicationPresentationOptions;
+  
+#endif
+  
 APPKIT_EXPORT NSString *NSModalPanelRunLoopMode;
 APPKIT_EXPORT NSString *NSEventTrackingRunLoopMode;
 
@@ -177,6 +198,7 @@
   NSWindow             *_hidden_key;
   NSWindow              *_hidden_main;
   GSInfoPanel           *_infoPanel;
+  NSApplicationPresentationOptions _presentationOptions;
 
   /* This autorelease pool should only be created and used by -run, with
      a single exception (which is why it is stored here as an ivar): the
@@ -396,6 +418,12 @@
  */
 - (void) cancelUserAttentionRequest: (NSInteger)request;
 - (NSInteger) requestUserAttention: (NSRequestUserAttentionType)requestType;
+#endif
+
+#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
+- (NSApplicationPresentationOptions) currentPresentationOptions;
+- (NSApplicationPresentationOptions) presentationOptions;
+- (void)setPresentationOptions: (NSApplicationPresentationOptions)options;
 #endif
 
 @end

Modified: libs/gui/trunk/Source/NSApplication.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/gui/trunk/Source/NSApplication.m?rev=39100&r1=39099&r2=39100&view=diff
==============================================================================
--- libs/gui/trunk/Source/NSApplication.m       (original)
+++ libs/gui/trunk/Source/NSApplication.m       Wed Oct 28 02:39:07 2015
@@ -2,7 +2,7 @@
 
    <abstract>The one and only application class.</abstract>
 
-   Copyright (C) 1996,1999 Free Software Foundation, Inc.
+   Copyright (C) 1996-2015 Free Software Foundation, Inc.
 
    Author: Scott Christley <[email protected]>
    Date: 1996
@@ -3698,6 +3698,25 @@
   return 0;
 }
 
+- (NSApplicationPresentationOptions) currentPresentationOptions
+{
+  return _presentationOptions;
+}
+
+- (NSApplicationPresentationOptions) presentationOptions
+{
+  return _presentationOptions;
+}
+
+/**
+ * Currently unimplemented and unused in GNUstep, it could be extended to 
handle
+ * special GNUstep needs too
+ */
+- (void)setPresentationOptions: (NSApplicationPresentationOptions)options
+{
+  _presentationOptions = options;
+}
+
 /*
  * NSCoding protocol
  */


_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs

Reply via email to