forked from chromiumembedded/java-cef
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for getScreenInfo() which is required to support retina.
- Loading branch information
Showing
11 changed files
with
277 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/sh | ||
# Based on build instructions at https://bitbucket.org/chromiumembedded/java-cef/wiki/BranchesAndBuilding | ||
# Based on bundle structure described here https://bitbucket.org/chromiumembedded/java-cef/issues/109/linux-mac-fix-discovery-of-icudtldat | ||
|
||
set -e | ||
if [ ! -d jcef_build ]; then | ||
mkdir jcef_build | ||
fi | ||
cd jcef_build | ||
cmake -G "Xcode" -DPROJECT_ARCH="x86_64" .. | ||
|
||
if [ "$1" == "clean" ]; then | ||
xcodebuild -project jcef.xcodeproj -configuration Release clean | ||
fi | ||
xcodebuild -project jcef.xcodeproj -configuration Release | ||
cd native/Release | ||
CEFROOT=~/.codenameone/cef | ||
if [ -d $CEFROOT ]; then | ||
echo "$CEFROOT already exists.\n" | ||
exit 1 | ||
fi | ||
|
||
mkdir $CEFROOT | ||
if [ ! -d $CEFROOT/macos64 ]; then | ||
mkdir $CEFROOT/macos64; | ||
fi | ||
cp -r "jcef_app.app/Contents/Frameworks/Chromium Embedded Framework.framework" $CEFROOT/macos64/ | ||
cp -r "jcef Helper.app" $CEFROOT/macos64/ | ||
cp -r "jcef Helper (GPU).app" $CEFROOT/macos64/ | ||
cp -r "jcef Helper (Plugin).app" $CEFROOT/macos64/ | ||
cp -r "jcef Helper (Renderer).app" $CEFROOT/macos64/ | ||
cp *.dylib $CEFROOT/macos64/ | ||
cp *.jar $CEFROOT/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
* To change this license header, choose License Headers in Project Properties. | ||
* To change this template file, choose Tools | Templates | ||
* and open the template in the editor. | ||
*/ | ||
package org.cef.handler; | ||
|
||
import java.awt.Rectangle; | ||
|
||
/** | ||
* | ||
* @author shannah | ||
*/ | ||
public class CefScreenInfo { | ||
public double device_scale_factor; | ||
public int depth; | ||
public int depth_per_component; | ||
public boolean is_monochrome; | ||
public int x, y, width, height; | ||
public int available_x, available_y, available_width, available_height; | ||
|
||
|
||
public void Set(double device_scale_factor, | ||
int depth, | ||
int depth_per_component, | ||
boolean is_monochrome, | ||
Rectangle rect, | ||
Rectangle availableRect) { | ||
this.device_scale_factor = device_scale_factor; | ||
this.depth= depth; | ||
this.depth_per_component = depth_per_component; | ||
this.is_monochrome = is_monochrome; | ||
this.x = rect.x; | ||
this.y = rect.y; | ||
this.width = rect.width; | ||
this.height = rect.height; | ||
this.available_x = availableRect.x; | ||
this.available_y = availableRect.y; | ||
this.available_width = availableRect.width; | ||
this.available_height = availableRect.height; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters