org.eclipse.swt.widgets.Scrollable.gtk_widget_get_realized()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(3.0k)|赞(0)|评价(0)|浏览(112)

本文整理了Java中org.eclipse.swt.widgets.Scrollable.gtk_widget_get_realized()方法的一些代码示例,展示了Scrollable.gtk_widget_get_realized()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Scrollable.gtk_widget_get_realized()方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Scrollable
类名称:Scrollable
方法名:gtk_widget_get_realized

Scrollable.gtk_widget_get_realized介绍

暂无

代码示例

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

@Override
void redrawWidget (int x, int y, int width, int height, boolean redrawAll, boolean all, boolean trim) {
  super.redrawWidget (x, y, width, height, redrawAll, all, trim);
  if (!gtk_widget_get_realized (handle)) return;
  if (!trim) return;
  int /*long*/ topHandle = topHandle (), paintHandle = paintHandle ();
  if (topHandle == paintHandle) return;
  int /*long*/ window = gtk_widget_get_window (topHandle);
  GdkRectangle rect = new GdkRectangle ();
  if (redrawAll) {
    GtkAllocation allocation = new GtkAllocation ();
    OS.gtk_widget_get_allocation (topHandle, allocation);
    rect.width = allocation.width;
    rect.height = allocation.height;
  } else {
    int [] destX = new int [1], destY = new int [1];
    OS.gtk_widget_translate_coordinates (paintHandle, topHandle, x, y, destX, destY);
    rect.x = destX [0];
    rect.y = destY [0];
    rect.width = Math.max (0, width);
    rect.height = Math.max (0, height);
  }
  OS.gdk_window_invalidate_rect (window, rect, all);
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

@Override
void redrawWidget (int x, int y, int width, int height, boolean redrawAll, boolean all, boolean trim) {
  super.redrawWidget (x, y, width, height, redrawAll, all, trim);
  if (!gtk_widget_get_realized (handle)) return;
  if (!trim) return;
  long /*int*/ topHandle = topHandle (), paintHandle = paintHandle ();
  if (topHandle == paintHandle) return;
  long /*int*/ window = gtk_widget_get_window (topHandle);
  GdkRectangle rect = new GdkRectangle ();
  if (redrawAll) {
    GtkAllocation allocation = new GtkAllocation ();
    OS.gtk_widget_get_allocation (topHandle, allocation);
    rect.width = allocation.width;
    rect.height = allocation.height;
  } else {
    int [] destX = new int [1], destY = new int [1];
    OS.gtk_widget_translate_coordinates (paintHandle, topHandle, x, y, destX, destY);
    rect.x = destX [0];
    rect.y = destY [0];
    rect.width = Math.max (0, width);
    rect.height = Math.max (0, height);
  }
  OS.gdk_window_invalidate_rect (window, rect, all);
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

@Override
void redrawWidget (int x, int y, int width, int height, boolean redrawAll, boolean all, boolean trim) {
  super.redrawWidget (x, y, width, height, redrawAll, all, trim);
  if (!gtk_widget_get_realized (handle)) return;
  if (!trim) return;
  int /*long*/ topHandle = topHandle (), paintHandle = paintHandle ();
  if (topHandle == paintHandle) return;
  int /*long*/ window = gtk_widget_get_window (topHandle);
  GdkRectangle rect = new GdkRectangle ();
  if (redrawAll) {
    GtkAllocation allocation = new GtkAllocation ();
    OS.gtk_widget_get_allocation (topHandle, allocation);
    rect.width = allocation.width;
    rect.height = allocation.height;
  } else {
    int [] destX = new int [1], destY = new int [1];
    OS.gtk_widget_translate_coordinates (paintHandle, topHandle, x, y, destX, destY);
    rect.x = destX [0];
    rect.y = destY [0];
    rect.width = Math.max (0, width);
    rect.height = Math.max (0, height);
  }
  OS.gdk_window_invalidate_rect (window, rect, all);
}

相关文章

Scrollable类方法