Examples of CGRect


Examples of org.eclipse.swt.internal.carbon.CGRect

    int colorspace = OS.CGColorSpaceCreateDeviceRGB();
    if (colorspace == 0) SWT.error(SWT.ERROR_NO_HANDLES);
    int context = OS.CGBitmapContextCreate(imageData, width, height, 8, bpr, colorspace, OS.kCGImageAlphaNoneSkipFirst);
    OS.CGColorSpaceRelease(colorspace);
    if (context == 0) SWT.error(SWT.ERROR_NO_HANDLES);
    CGRect rect = new CGRect();
    rect.width = width;
    rect.height = height;
    OS.CGContextDrawImage(context, rect, imageHandle);
    OS.CGContextRelease(context);   
  }
View Full Code Here

Examples of org.eclipse.swt.internal.carbon.CGRect

  return j;
}

Rectangle getControlBounds (int control) {
  if (OS.HIVIEW) {
    CGRect rect = new CGRect ();
    OS.HIViewGetFrame (control, rect);
    Rect inset = getInset ();
    rect.x -= inset.left;
    rect.y -= inset.top;
    rect.width += inset.right + inset.left;
View Full Code Here

Examples of org.eclipse.swt.internal.carbon.CGRect

  return new Rectangle (rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top);
}

Point getControlSize (int control) {
  if (OS.HIVIEW) {
    CGRect rect = new CGRect ();
    OS.HIViewGetFrame (control, rect);
    Rect inset = getInset ();
    int width = (int) rect.width + inset.left + inset.right;
    int height = (int) rect.height + inset.top + inset.bottom;
    return new Point (width, height);
View Full Code Here

Examples of org.eclipse.swt.internal.carbon.CGRect

}

int setBounds (int control, int x, int y, int width, int height, boolean move, boolean resize, boolean events) {
  boolean sameOrigin = true, sameExtent = true;
  if (OS.HIVIEW) {
    CGRect oldBounds = new CGRect ();
    OS.HIViewGetFrame (control, oldBounds);
    Rect inset = getInset ();
    oldBounds.x -= inset.left;
    oldBounds.y -= inset.top;
    oldBounds.width += inset.left + inset.right;
    oldBounds.height += inset.top + inset.bottom;
    if (!move) {
      x = (int) oldBounds.x;
      y = (int) oldBounds.y;
    }
    if (!resize) {
      width = (int) oldBounds.width;
      height = (int) oldBounds.height;
    }
    CGRect newBounds = new CGRect ();
    newBounds.x = x + inset.left;
    newBounds.y = y + inset.top;
    newBounds.width = width - inset.right - inset.left;
    newBounds.height = height - inset.bottom - inset.top;
    sameOrigin = newBounds.x == oldBounds.x && newBounds.y == oldBounds.y;
View Full Code Here

Examples of org.eclipse.swt.internal.carbon.CGRect

  int inset = outMetric [0];
  OS.GetThemeMetric (OS.kThemeMetricEditTextFrameOutset, outMetric);
  inset += outMetric [0];
  editTextInset.left = editTextInset.top = editTextInset.right = editTextInset.bottom = (short) inset;

  CGRect cgRect = new CGRect ();
  cgRect.width = cgRect.height = 200;
  int inAttributes = OS.kHIComboBoxAutoCompletionAttribute | OS.kHIComboBoxAutoSizeListAttribute;
  OS.HIComboBoxCreate (cgRect, 0, null, 0, inAttributes, outControl);
  comboInset = computeInset (outControl [0]);
   //FIXME -
View Full Code Here

Examples of org.robovm.apple.coregraphics.CGRect

  @Override
  public void setOnscreenKeyboardVisible(boolean visible) {
    if (textfield == null) {
      //Making simple textField
      textfield = new UITextField(new CGRect(10, 10, 100, 50));
      //Setting parameters
      textfield.setKeyboardType(UIKeyboardType.Default);
      textfield.setReturnKeyType(UIReturnKeyType.Done);
      textfield.setAutocapitalizationType(UITextAutocapitalizationType.None);
      textfield.setAutocorrectionType(UITextAutocorrectionType.No);
View Full Code Here

Examples of org.robovm.apple.coregraphics.CGRect

    app.debug(tag, bounds.width() + "x" + bounds.height() + ", " + UIScreen.getMainScreen().getScale());
    this.gl20 = gl20;

    context = new EAGLContext(EAGLRenderingAPI.OpenGLES2);

    view = new GLKView(new CGRect(new CGPoint(0, 0), bounds), context) {
      @Method(selector = "touchesBegan:withEvent:")
      public void touchesBegan (@Pointer long touches, UIEvent event) {
        IOSGraphics.this.input.touchDown(touches, event);
      }
View Full Code Here

Examples of org.robovm.apple.coregraphics.CGRect

    app.debug(tag, bounds.width() + "x" + bounds.height() + ", " + UIScreen.getMainScreen().getScale());
    this.gl20 = gl20;

    context = new EAGLContext(EAGLRenderingAPI.OpenGLES2);

    view = new GLKView(new CGRect(new CGPoint(0, 0), bounds), context) {
      @Method(selector = "touchesBegan:withEvent:")
      public void touchesBegan (@Pointer long touches, UIEvent event) {
        IOSGraphics.this.input.touchDown(touches, event);
      }
View Full Code Here

Examples of org.robovm.apple.coregraphics.CGRect

  @Override
  public void setOnscreenKeyboardVisible(boolean visible) {
    if (textfield == null) {
      //Making simple textField
      textfield = new UITextField(new CGRect(10, 10, 100, 50));
      //Setting parameters
      textfield.setKeyboardType(UIKeyboardType.Default);
      textfield.setReturnKeyType(UIReturnKeyType.Done);
      textfield.setAutocapitalizationType(UITextAutocapitalizationType.None);
      textfield.setAutocorrectionType(UITextAutocorrectionType.No);
View Full Code Here

Examples of org.robovm.apple.coregraphics.CGRect

    app.debug(tag, bounds.width() + "x" + bounds.height() + ", " + UIScreen.getMainScreen().getScale());
    this.gl20 = gl20;

    context = new EAGLContext(EAGLRenderingAPI.OpenGLES2);

    view = new GLKView(new CGRect(new CGPoint(0, 0), bounds), context) {
      @Method(selector = "touchesBegan:withEvent:")
      public void touchesBegan (@Pointer long touches, UIEvent event) {
        IOSGraphics.this.input.touchDown(touches, event);
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.