Package org.eclipse.swt.internal.carbon

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


  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

  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

}

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

  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

TOP

Related Classes of org.eclipse.swt.internal.carbon.CGRect

Copyright © 2018 www.massapicom. 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.