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

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

本文整理了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

  1. @Override
  2. void redrawWidget (int x, int y, int width, int height, boolean redrawAll, boolean all, boolean trim) {
  3. super.redrawWidget (x, y, width, height, redrawAll, all, trim);
  4. if (!gtk_widget_get_realized (handle)) return;
  5. if (!trim) return;
  6. int /*long*/ topHandle = topHandle (), paintHandle = paintHandle ();
  7. if (topHandle == paintHandle) return;
  8. int /*long*/ window = gtk_widget_get_window (topHandle);
  9. GdkRectangle rect = new GdkRectangle ();
  10. if (redrawAll) {
  11. GtkAllocation allocation = new GtkAllocation ();
  12. OS.gtk_widget_get_allocation (topHandle, allocation);
  13. rect.width = allocation.width;
  14. rect.height = allocation.height;
  15. } else {
  16. int [] destX = new int [1], destY = new int [1];
  17. OS.gtk_widget_translate_coordinates (paintHandle, topHandle, x, y, destX, destY);
  18. rect.x = destX [0];
  19. rect.y = destY [0];
  20. rect.width = Math.max (0, width);
  21. rect.height = Math.max (0, height);
  22. }
  23. OS.gdk_window_invalidate_rect (window, rect, all);
  24. }

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

  1. @Override
  2. void redrawWidget (int x, int y, int width, int height, boolean redrawAll, boolean all, boolean trim) {
  3. super.redrawWidget (x, y, width, height, redrawAll, all, trim);
  4. if (!gtk_widget_get_realized (handle)) return;
  5. if (!trim) return;
  6. long /*int*/ topHandle = topHandle (), paintHandle = paintHandle ();
  7. if (topHandle == paintHandle) return;
  8. long /*int*/ window = gtk_widget_get_window (topHandle);
  9. GdkRectangle rect = new GdkRectangle ();
  10. if (redrawAll) {
  11. GtkAllocation allocation = new GtkAllocation ();
  12. OS.gtk_widget_get_allocation (topHandle, allocation);
  13. rect.width = allocation.width;
  14. rect.height = allocation.height;
  15. } else {
  16. int [] destX = new int [1], destY = new int [1];
  17. OS.gtk_widget_translate_coordinates (paintHandle, topHandle, x, y, destX, destY);
  18. rect.x = destX [0];
  19. rect.y = destY [0];
  20. rect.width = Math.max (0, width);
  21. rect.height = Math.max (0, height);
  22. }
  23. OS.gdk_window_invalidate_rect (window, rect, all);
  24. }

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

  1. @Override
  2. void redrawWidget (int x, int y, int width, int height, boolean redrawAll, boolean all, boolean trim) {
  3. super.redrawWidget (x, y, width, height, redrawAll, all, trim);
  4. if (!gtk_widget_get_realized (handle)) return;
  5. if (!trim) return;
  6. int /*long*/ topHandle = topHandle (), paintHandle = paintHandle ();
  7. if (topHandle == paintHandle) return;
  8. int /*long*/ window = gtk_widget_get_window (topHandle);
  9. GdkRectangle rect = new GdkRectangle ();
  10. if (redrawAll) {
  11. GtkAllocation allocation = new GtkAllocation ();
  12. OS.gtk_widget_get_allocation (topHandle, allocation);
  13. rect.width = allocation.width;
  14. rect.height = allocation.height;
  15. } else {
  16. int [] destX = new int [1], destY = new int [1];
  17. OS.gtk_widget_translate_coordinates (paintHandle, topHandle, x, y, destX, destY);
  18. rect.x = destX [0];
  19. rect.y = destY [0];
  20. rect.width = Math.max (0, width);
  21. rect.height = Math.max (0, height);
  22. }
  23. OS.gdk_window_invalidate_rect (window, rect, all);
  24. }

相关文章

Scrollable类方法