< prev index next >

modules/javafx.graphics/src/main/native-glass/mac/GlassScreen.m

Print this page
rev 10048 : 8166564: @native for mac builds
Reviewed-by: kcr


   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 #import "common.h"
  27 #import "com_sun_glass_ui_Screen.h"
  28 
  29 #import "GlassMacros.h"
  30 #import "GlassScreen.h"
  31 #import "GlassTimer.h"
  32 
  33 //#define VERBOSE
  34 #ifndef VERBOSE
  35     #define LOG(MSG, ...)
  36 #else
  37     #define LOG(MSG, ...) GLASS_LOG(MSG, ## __VA_ARGS__);
  38 #endif
  39 
  40 #define MAX_DISPLAY_COUNT 1024
  41 
  42 NSSize maxScreenDimensions;
  43 
  44 CGFloat GetScreenScaleFactor(NSScreen *screen)
  45 {
  46     if ([screen respondsToSelector:@selector(backingScaleFactor)]) {
  47         return [screen backingScaleFactor];




   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 #import "common.h"

  27 
  28 #import "GlassMacros.h"
  29 #import "GlassScreen.h"
  30 #import "GlassTimer.h"
  31 
  32 //#define VERBOSE
  33 #ifndef VERBOSE
  34     #define LOG(MSG, ...)
  35 #else
  36     #define LOG(MSG, ...) GLASS_LOG(MSG, ## __VA_ARGS__);
  37 #endif
  38 
  39 #define MAX_DISPLAY_COUNT 1024
  40 
  41 NSSize maxScreenDimensions;
  42 
  43 CGFloat GetScreenScaleFactor(NSScreen *screen)
  44 {
  45     if ([screen respondsToSelector:@selector(backingScaleFactor)]) {
  46         return [screen backingScaleFactor];


< prev index next >