本文整理了Java中org.eclipse.swt.graphics.Color.gtk_new()
方法的一些代码示例,展示了Color.gtk_new()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Color.gtk_new()
方法的具体详情如下:
包路径:org.eclipse.swt.graphics.Color
类名称:Color
方法名:gtk_new
[英]Invokes platform specific functionality to allocate a new color.
IMPORTANT: This method is not part of the public API for Color
. It is marked public only so that it can be shared within the packages provided by SWT. It is not available on all platforms, and should never be called from application code.
[中]
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
Color _getForeground (int index) {
int count = Math.max (1, parent.columnCount);
if (0 > index || index > count - 1) return _getForeground ();
int /*long*/ [] ptr = new int /*long*/ [1];
int modelIndex = parent.columnCount == 0 ? Tree.FIRST_COLUMN : parent.columns [index].modelIndex;
OS.gtk_tree_model_get (parent.modelHandle, handle, modelIndex + Tree.CELL_FOREGROUND, ptr, -1);
if (ptr [0] == 0) return _getForeground ();
GdkColor gdkColor = new GdkColor ();
OS.memmove (gdkColor, ptr [0], GdkColor.sizeof);
OS.gdk_color_free (ptr [0]);
return Color.gtk_new (display, gdkColor);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
Color _getBackground (int index) {
int count = Math.max (1, parent.columnCount);
if (0 > index || index > count - 1) return _getBackground ();
long /*int*/ [] ptr = new long /*int*/ [1];
int modelIndex = parent.columnCount == 0 ? Tree.FIRST_COLUMN : parent.columns [index].modelIndex;
OS.gtk_tree_model_get (parent.modelHandle, handle, modelIndex + Tree.CELL_BACKGROUND, ptr, -1);
if (ptr [0] == 0) return _getBackground ();
GdkColor gdkColor = new GdkColor ();
OS.memmove (gdkColor, ptr [0], GdkColor.sizeof);
OS.gdk_color_free (ptr [0]);
return Color.gtk_new (display, gdkColor);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
Color _getForeground (int index) {
int count = Math.max (1, parent.columnCount);
if (0 > index || index > count - 1) return _getForeground ();
int /*long*/ [] ptr = new int /*long*/ [1];
int modelIndex = parent.columnCount == 0 ? Table.FIRST_COLUMN : parent.columns [index].modelIndex;
OS.gtk_tree_model_get (parent.modelHandle, handle, modelIndex + Table.CELL_FOREGROUND, ptr, -1);
if (ptr [0] == 0) return _getForeground ();
GdkColor gdkColor = new GdkColor ();
OS.memmove (gdkColor, ptr [0], GdkColor.sizeof);
OS.gdk_color_free (ptr [0]);
return Color.gtk_new (display, gdkColor);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
Color _getBackground (int index) {
int count = Math.max (1, parent.columnCount);
if (0 > index || index > count - 1) return _getBackground ();
int /*long*/ [] ptr = new int /*long*/ [1];
int modelIndex = parent.columnCount == 0 ? Table.FIRST_COLUMN : parent.columns [index].modelIndex;
OS.gtk_tree_model_get (parent.modelHandle, handle, modelIndex + Table.CELL_BACKGROUND, ptr, -1);
if (ptr [0] == 0) return _getBackground ();
GdkColor gdkColor = new GdkColor ();
OS.memmove (gdkColor, ptr [0], GdkColor.sizeof);
OS.gdk_color_free (ptr [0]);
return Color.gtk_new (display, gdkColor);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
Color _getBackground (int index) {
int count = Math.max (1, parent.columnCount);
if (0 > index || index > count - 1) return _getBackground ();
int /*long*/ [] ptr = new int /*long*/ [1];
int modelIndex = parent.columnCount == 0 ? Table.FIRST_COLUMN : parent.columns [index].modelIndex;
OS.gtk_tree_model_get (parent.modelHandle, handle, modelIndex + Table.CELL_BACKGROUND, ptr, -1);
if (ptr [0] == 0) return _getBackground ();
GdkColor gdkColor = new GdkColor ();
OS.memmove (gdkColor, ptr [0], GdkColor.sizeof);
OS.gdk_color_free (ptr [0]);
return Color.gtk_new (display, gdkColor);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
Color _getBackground (int index) {
int count = Math.max (1, parent.columnCount);
if (0 > index || index > count - 1) return _getBackground ();
int /*long*/ [] ptr = new int /*long*/ [1];
int modelIndex = parent.columnCount == 0 ? Tree.FIRST_COLUMN : parent.columns [index].modelIndex;
OS.gtk_tree_model_get (parent.modelHandle, handle, modelIndex + Tree.CELL_BACKGROUND, ptr, -1);
if (ptr [0] == 0) return _getBackground ();
GdkColor gdkColor = new GdkColor ();
OS.memmove (gdkColor, ptr [0], GdkColor.sizeof);
OS.gdk_color_free (ptr [0]);
return Color.gtk_new (display, gdkColor);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
Color _getForeground (int index) {
int count = Math.max (1, parent.columnCount);
if (0 > index || index > count - 1) return _getForeground ();
int /*long*/ [] ptr = new int /*long*/ [1];
int modelIndex = parent.columnCount == 0 ? Tree.FIRST_COLUMN : parent.columns [index].modelIndex;
OS.gtk_tree_model_get (parent.modelHandle, handle, modelIndex + Tree.CELL_FOREGROUND, ptr, -1);
if (ptr [0] == 0) return _getForeground ();
GdkColor gdkColor = new GdkColor ();
OS.memmove (gdkColor, ptr [0], GdkColor.sizeof);
OS.gdk_color_free (ptr [0]);
return Color.gtk_new (display, gdkColor);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
Color _getBackground (int index) {
int count = Math.max (1, parent.columnCount);
if (0 > index || index > count - 1) return _getBackground ();
long /*int*/ [] ptr = new long /*int*/ [1];
int modelIndex = parent.columnCount == 0 ? Table.FIRST_COLUMN : parent.columns [index].modelIndex;
OS.gtk_tree_model_get (parent.modelHandle, handle, modelIndex + Table.CELL_BACKGROUND, ptr, -1);
if (ptr [0] == 0) return _getBackground ();
GdkColor gdkColor = new GdkColor ();
OS.memmove (gdkColor, ptr [0], GdkColor.sizeof);
OS.gdk_color_free (ptr [0]);
return Color.gtk_new (display, gdkColor);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
Color _getForeground (int index) {
int count = Math.max (1, parent.columnCount);
if (0 > index || index > count - 1) return _getForeground ();
long /*int*/ [] ptr = new long /*int*/ [1];
int modelIndex = parent.columnCount == 0 ? Table.FIRST_COLUMN : parent.columns [index].modelIndex;
OS.gtk_tree_model_get (parent.modelHandle, handle, modelIndex + Table.CELL_FOREGROUND, ptr, -1);
if (ptr [0] == 0) return _getForeground ();
GdkColor gdkColor = new GdkColor ();
OS.memmove (gdkColor, ptr [0], GdkColor.sizeof);
OS.gdk_color_free (ptr [0]);
return Color.gtk_new (display, gdkColor);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
Color _getForeground (int index) {
int count = Math.max (1, parent.columnCount);
if (0 > index || index > count - 1) return _getForeground ();
long /*int*/ [] ptr = new long /*int*/ [1];
int modelIndex = parent.columnCount == 0 ? Tree.FIRST_COLUMN : parent.columns [index].modelIndex;
OS.gtk_tree_model_get (parent.modelHandle, handle, modelIndex + Tree.CELL_FOREGROUND, ptr, -1);
if (ptr [0] == 0) return _getForeground ();
GdkColor gdkColor = new GdkColor ();
OS.memmove (gdkColor, ptr [0], GdkColor.sizeof);
OS.gdk_color_free (ptr [0]);
return Color.gtk_new (display, gdkColor);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
Color _getBackground () {
int /*long*/ [] ptr = new int /*long*/ [1];
OS.gtk_tree_model_get (parent.modelHandle, handle, Tree.BACKGROUND_COLUMN, ptr, -1);
if (ptr [0] == 0) return parent.getBackground ();
GdkColor gdkColor = new GdkColor ();
OS.memmove (gdkColor, ptr [0], GdkColor.sizeof);
OS.gdk_color_free (ptr [0]);
return Color.gtk_new (display, gdkColor);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
Color _getBackground () {
long /*int*/ [] ptr = new long /*int*/ [1];
OS.gtk_tree_model_get (parent.modelHandle, handle, Table.BACKGROUND_COLUMN, ptr, -1);
if (ptr [0] == 0) return parent.getBackground ();
GdkColor gdkColor = new GdkColor ();
OS.memmove (gdkColor, ptr [0], GdkColor.sizeof);
OS.gdk_color_free (ptr [0]);
return Color.gtk_new (display, gdkColor);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
Color _getForeground () {
long /*int*/ [] ptr = new long /*int*/ [1];
OS.gtk_tree_model_get (parent.modelHandle, handle, Table.FOREGROUND_COLUMN, ptr, -1);
if (ptr [0] == 0) return parent.getForeground ();
GdkColor gdkColor = new GdkColor ();
OS.memmove (gdkColor, ptr [0], GdkColor.sizeof);
OS.gdk_color_free (ptr [0]);
return Color.gtk_new (display, gdkColor);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
Color _getForeground () {
int /*long*/ [] ptr = new int /*long*/ [1];
OS.gtk_tree_model_get (parent.modelHandle, handle, Table.FOREGROUND_COLUMN, ptr, -1);
if (ptr [0] == 0) return parent.getForeground ();
GdkColor gdkColor = new GdkColor ();
OS.memmove (gdkColor, ptr [0], GdkColor.sizeof);
OS.gdk_color_free (ptr [0]);
return Color.gtk_new (display, gdkColor);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
Color _getForeground () {
int /*long*/ [] ptr = new int /*long*/ [1];
OS.gtk_tree_model_get (parent.modelHandle, handle, Tree.FOREGROUND_COLUMN, ptr, -1);
if (ptr [0] == 0) return parent.getForeground ();
GdkColor gdkColor = new GdkColor ();
OS.memmove (gdkColor, ptr [0], GdkColor.sizeof);
OS.gdk_color_free (ptr [0]);
return Color.gtk_new (display, gdkColor);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
Color _getForeground () {
int /*long*/ [] ptr = new int /*long*/ [1];
OS.gtk_tree_model_get (parent.modelHandle, handle, Tree.FOREGROUND_COLUMN, ptr, -1);
if (ptr [0] == 0) return parent.getForeground ();
GdkColor gdkColor = new GdkColor ();
OS.memmove (gdkColor, ptr [0], GdkColor.sizeof);
OS.gdk_color_free (ptr [0]);
return Color.gtk_new (display, gdkColor);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
Color _getBackground () {
long /*int*/ [] ptr = new long /*int*/ [1];
OS.gtk_tree_model_get (parent.modelHandle, handle, Tree.BACKGROUND_COLUMN, ptr, -1);
if (ptr [0] == 0) return parent.getBackground ();
GdkColor gdkColor = new GdkColor ();
OS.memmove (gdkColor, ptr [0], GdkColor.sizeof);
OS.gdk_color_free (ptr [0]);
return Color.gtk_new (display, gdkColor);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
Color _getForeground () {
int /*long*/ [] ptr = new int /*long*/ [1];
OS.gtk_tree_model_get (parent.modelHandle, handle, Table.FOREGROUND_COLUMN, ptr, -1);
if (ptr [0] == 0) return parent.getForeground ();
GdkColor gdkColor = new GdkColor ();
OS.memmove (gdkColor, ptr [0], GdkColor.sizeof);
OS.gdk_color_free (ptr [0]);
return Color.gtk_new (display, gdkColor);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
Color _getForeground () {
long /*int*/ [] ptr = new long /*int*/ [1];
OS.gtk_tree_model_get (parent.modelHandle, handle, Tree.FOREGROUND_COLUMN, ptr, -1);
if (ptr [0] == 0) return parent.getForeground ();
GdkColor gdkColor = new GdkColor ();
OS.memmove (gdkColor, ptr [0], GdkColor.sizeof);
OS.gdk_color_free (ptr [0]);
return Color.gtk_new (display, gdkColor);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
Color _getBackground () {
int /*long*/ [] ptr = new int /*long*/ [1];
OS.gtk_tree_model_get (parent.modelHandle, handle, Table.BACKGROUND_COLUMN, ptr, -1);
if (ptr [0] == 0) return parent.getBackground ();
GdkColor gdkColor = new GdkColor ();
OS.memmove (gdkColor, ptr [0], GdkColor.sizeof);
OS.gdk_color_free (ptr [0]);
return Color.gtk_new (display, gdkColor);
}
内容来源于网络,如有侵权,请联系作者删除!