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

x33g5p2x  于2022-01-29 转载在 其他  
字(5.3k)|赞(0)|评价(0)|浏览(217)

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

Table.gtk_widget_get_window介绍

暂无

代码示例

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

  1. int getHeaderHeightInPixels () {
  2. checkWidget ();
  3. if (!OS.gtk_tree_view_get_headers_visible (handle)) return 0;
  4. if (columnCount > 0) {
  5. GtkRequisition requisition = new GtkRequisition ();
  6. int height = 0;
  7. for (int i=0; i<columnCount; i++) {
  8. long /*int*/ buttonHandle = columns [i].buttonHandle;
  9. if (buttonHandle != 0) {
  10. gtk_widget_get_preferred_size (buttonHandle, requisition);
  11. height = Math.max (height, requisition.height);
  12. }
  13. }
  14. return height;
  15. }
  16. OS.gtk_widget_realize (handle);
  17. long /*int*/ fixedWindow = gtk_widget_get_window (fixedHandle);
  18. long /*int*/ binWindow = OS.gtk_tree_view_get_bin_window (handle);
  19. int [] binY = new int [1];
  20. OS.gdk_window_get_origin (binWindow, null, binY);
  21. int [] fixedY = new int [1];
  22. OS.gdk_window_get_origin (fixedWindow, null, fixedY);
  23. return binY [0] - fixedY [0];
  24. }

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

  1. int getHeaderHeightInPixels () {
  2. checkWidget ();
  3. if (!OS.gtk_tree_view_get_headers_visible (handle)) return 0;
  4. if (columnCount > 0) {
  5. GtkRequisition requisition = new GtkRequisition ();
  6. int height = 0;
  7. for (int i=0; i<columnCount; i++) {
  8. int /*long*/ buttonHandle = columns [i].buttonHandle;
  9. if (buttonHandle != 0) {
  10. gtk_widget_get_preferred_size (buttonHandle, requisition);
  11. height = Math.max (height, requisition.height);
  12. }
  13. }
  14. return height;
  15. }
  16. OS.gtk_widget_realize (handle);
  17. int /*long*/ fixedWindow = gtk_widget_get_window (fixedHandle);
  18. int /*long*/ binWindow = OS.gtk_tree_view_get_bin_window (handle);
  19. int [] binY = new int [1];
  20. OS.gdk_window_get_origin (binWindow, null, binY);
  21. int [] fixedY = new int [1];
  22. OS.gdk_window_get_origin (fixedWindow, null, fixedY);
  23. return binY [0] - fixedY [0];
  24. }

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

  1. int getHeaderHeightInPixels () {
  2. checkWidget ();
  3. if (!OS.gtk_tree_view_get_headers_visible (handle)) return 0;
  4. if (columnCount > 0) {
  5. GtkRequisition requisition = new GtkRequisition ();
  6. int height = 0;
  7. for (int i=0; i<columnCount; i++) {
  8. int /*long*/ buttonHandle = columns [i].buttonHandle;
  9. if (buttonHandle != 0) {
  10. gtk_widget_get_preferred_size (buttonHandle, requisition);
  11. height = Math.max (height, requisition.height);
  12. }
  13. }
  14. return height;
  15. }
  16. OS.gtk_widget_realize (handle);
  17. int /*long*/ fixedWindow = gtk_widget_get_window (fixedHandle);
  18. int /*long*/ binWindow = OS.gtk_tree_view_get_bin_window (handle);
  19. int [] binY = new int [1];
  20. OS.gdk_window_get_origin (binWindow, null, binY);
  21. int [] fixedY = new int [1];
  22. OS.gdk_window_get_origin (fixedWindow, null, fixedY);
  23. return binY [0] - fixedY [0];
  24. }

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

  1. @Override
  2. Rectangle getClientAreaInPixels () {
  3. checkWidget ();
  4. forceResize ();
  5. OS.gtk_widget_realize (handle);
  6. long /*int*/ fixedWindow = gtk_widget_get_window (fixedHandle);
  7. long /*int*/ binWindow = OS.gtk_tree_view_get_bin_window (handle);
  8. int [] binX = new int [1], binY = new int [1];
  9. OS.gdk_window_get_origin (binWindow, binX, binY);
  10. int [] fixedX = new int [1], fixedY = new int [1];
  11. OS.gdk_window_get_origin (fixedWindow, fixedX, fixedY);
  12. long /*int*/ clientHandle = clientHandle ();
  13. GtkAllocation allocation = new GtkAllocation ();
  14. OS.gtk_widget_get_allocation (clientHandle, allocation);
  15. int width = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width;
  16. int height = (state & ZERO_HEIGHT) != 0 ? 0 : allocation.height;
  17. Rectangle rect = new Rectangle (fixedX [0] - binX [0], fixedY [0] - binY [0], width, height);
  18. if (getHeaderVisible() && OS.GTK_VERSION > OS.VERSION(3, 9, 0)) {
  19. rect.y += getHeaderHeightInPixels();
  20. }
  21. return rect;
  22. }

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

  1. @Override
  2. Rectangle getClientAreaInPixels () {
  3. checkWidget ();
  4. forceResize ();
  5. OS.gtk_widget_realize (handle);
  6. int /*long*/ fixedWindow = gtk_widget_get_window (fixedHandle);
  7. int /*long*/ binWindow = OS.gtk_tree_view_get_bin_window (handle);
  8. int [] binX = new int [1], binY = new int [1];
  9. OS.gdk_window_get_origin (binWindow, binX, binY);
  10. int [] fixedX = new int [1], fixedY = new int [1];
  11. OS.gdk_window_get_origin (fixedWindow, fixedX, fixedY);
  12. int /*long*/ clientHandle = clientHandle ();
  13. GtkAllocation allocation = new GtkAllocation ();
  14. OS.gtk_widget_get_allocation (clientHandle, allocation);
  15. int width = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width;
  16. int height = (state & ZERO_HEIGHT) != 0 ? 0 : allocation.height;
  17. Rectangle rect = new Rectangle (fixedX [0] - binX [0], fixedY [0] - binY [0], width, height);
  18. if (getHeaderVisible() && OS.GTK_VERSION > OS.VERSION(3, 9, 0)) {
  19. rect.y += getHeaderHeightInPixels();
  20. }
  21. return rect;
  22. }

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

  1. @Override
  2. Rectangle getClientAreaInPixels () {
  3. checkWidget ();
  4. forceResize ();
  5. OS.gtk_widget_realize (handle);
  6. int /*long*/ fixedWindow = gtk_widget_get_window (fixedHandle);
  7. int /*long*/ binWindow = OS.gtk_tree_view_get_bin_window (handle);
  8. int [] binX = new int [1], binY = new int [1];
  9. OS.gdk_window_get_origin (binWindow, binX, binY);
  10. int [] fixedX = new int [1], fixedY = new int [1];
  11. OS.gdk_window_get_origin (fixedWindow, fixedX, fixedY);
  12. int /*long*/ clientHandle = clientHandle ();
  13. GtkAllocation allocation = new GtkAllocation ();
  14. OS.gtk_widget_get_allocation (clientHandle, allocation);
  15. int width = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width;
  16. int height = (state & ZERO_HEIGHT) != 0 ? 0 : allocation.height;
  17. Rectangle rect = new Rectangle (fixedX [0] - binX [0], fixedY [0] - binY [0], width, height);
  18. if (getHeaderVisible() && OS.GTK_VERSION > OS.VERSION(3, 9, 0)) {
  19. rect.y += getHeaderHeightInPixels();
  20. }
  21. return rect;
  22. }

相关文章

Table类方法