@Override void draw(Theme theme, GC gc, Rectangle bounds) { int /*long*/ toolbarHandle = theme.toolbarHandle; int /*long*/ gtkStyle = gtk_widget_get_style (toolbarHandle); int /*long*/ drawable = gc.getGCData().drawable; theme.transferClipping(gc, gtkStyle); int x = bounds.x, y = bounds.y, width = bounds.width, height = bounds.height; byte[] detail = Converter.wcsToMbcs(null, "toolbar", true); gtk_render_box (gtkStyle, drawable, getStateType(DrawData.WIDGET_WHOLE), OS.GTK_SHADOW_NONE, null, toolbarHandle, detail, x, y, width, height); if (clientArea != null) { clientArea.x = bounds.x; clientArea.y = bounds.y; clientArea.width = bounds.width; clientArea.height = bounds.height; } }
@Override void draw(Theme theme, GC gc, Rectangle bounds) { int /*long*/ toolbarHandle = theme.toolbarHandle; int /*long*/ gtkStyle = gtk_widget_get_style (toolbarHandle); int /*long*/ drawable = gc.getGCData().drawable; theme.transferClipping(gc, gtkStyle); int x = bounds.x, y = bounds.y, width = bounds.width, height = bounds.height; byte[] detail = Converter.wcsToMbcs(null, "toolbar", true); gtk_render_box (gtkStyle, drawable, getStateType(DrawData.WIDGET_WHOLE), OS.GTK_SHADOW_NONE, null, toolbarHandle, detail, x, y, width, height); if (clientArea != null) { clientArea.x = bounds.x; clientArea.y = bounds.y; clientArea.width = bounds.width; clientArea.height = bounds.height; } }
@Override void draw(Theme theme, GC gc, Rectangle bounds) { long /*int*/ toolbarHandle = theme.toolbarHandle; long /*int*/ gtkStyle = gtk_widget_get_style (toolbarHandle); long /*int*/ drawable = gc.getGCData().drawable; theme.transferClipping(gc, gtkStyle); int x = bounds.x, y = bounds.y, width = bounds.width, height = bounds.height; byte[] detail = Converter.wcsToMbcs(null, "toolbar", true); gtk_render_box (gtkStyle, drawable, getStateType(DrawData.WIDGET_WHOLE), OS.GTK_SHADOW_NONE, null, toolbarHandle, detail, x, y, width, height); if (clientArea != null) { clientArea.x = bounds.x; clientArea.y = bounds.y; clientArea.width = bounds.width; clientArea.height = bounds.height; } }
@Override void draw(Theme theme, GC gc, Rectangle bounds) { long /*int*/ notebookHandle = theme.notebookHandle; long /*int*/ gtkStyle = gtk_widget_get_style (notebookHandle); long /*int*/ drawable = OS.GTK3 ? gc.getGCData().cairo : gc.getGCData().drawable; theme.transferClipping(gc, gtkStyle); int x = bounds.x, y = bounds.y, width = bounds.width, height = bounds.height; height -= tabsHeight; int gap_x = selectedX, gap_width = selectedWidth, gap_side = OS.GTK_POS_TOP; if ((style & SWT.BOTTOM) != 0) { gap_side = OS.GTK_POS_BOTTOM; } else { y += tabsHeight; } byte[] detail = Converter.wcsToMbcs(null, "notebook", true); gtk_render_frame_gap (gtkStyle, drawable, getStateType(DrawData.WIDGET_WHOLE), OS.GTK_SHADOW_OUT, null, notebookHandle, detail, x, y, width, height, gap_side, gap_x, gap_width); if (tabsArea != null) { tabsArea.x = bounds.x; tabsArea.y = bounds.y; tabsArea.width = bounds.width; tabsArea.height = tabsHeight; if ((style & SWT.BOTTOM) != 0) { tabsArea.y += bounds.height - tabsHeight; } } }
@Override void draw(Theme theme, GC gc, Rectangle bounds) { int /*long*/ notebookHandle = theme.notebookHandle; int /*long*/ gtkStyle = gtk_widget_get_style (notebookHandle); int /*long*/ drawable = OS.GTK3 ? gc.getGCData().cairo : gc.getGCData().drawable; theme.transferClipping(gc, gtkStyle); int x = bounds.x, y = bounds.y, width = bounds.width, height = bounds.height; height -= tabsHeight; int gap_x = selectedX, gap_width = selectedWidth, gap_side = OS.GTK_POS_TOP; if ((style & SWT.BOTTOM) != 0) { gap_side = OS.GTK_POS_BOTTOM; } else { y += tabsHeight; } byte[] detail = Converter.wcsToMbcs(null, "notebook", true); gtk_render_frame_gap (gtkStyle, drawable, getStateType(DrawData.WIDGET_WHOLE), OS.GTK_SHADOW_OUT, null, notebookHandle, detail, x, y, width, height, gap_side, gap_x, gap_width); if (tabsArea != null) { tabsArea.x = bounds.x; tabsArea.y = bounds.y; tabsArea.width = bounds.width; tabsArea.height = tabsHeight; if ((style & SWT.BOTTOM) != 0) { tabsArea.y += bounds.height - tabsHeight; } } }
@Override void draw(Theme theme, GC gc, Rectangle bounds) { int /*long*/ progressHandle = theme.progressHandle; int /*long*/ gtkStyle = gtk_widget_get_style (progressHandle); int /*long*/ drawable = gc.getGCData().drawable; theme.transferClipping(gc, gtkStyle); byte[] detail = Converter.wcsToMbcs(null, "trough", true); int x = bounds.x, y = bounds.y, width = bounds.width, height = bounds.height; gtk_render_box (gtkStyle, drawable, getStateType(DrawData.WIDGET_WHOLE), OS.GTK_SHADOW_IN, null, progressHandle, detail, x, y, width, height); int xthichness = OS.gtk_style_get_xthickness(gtkStyle); int ythichness = OS.gtk_style_get_ythickness(gtkStyle); if ((style & SWT.VERTICAL) != 0) { gtk_orientable_set_orientation (progressHandle, OS.GTK_PROGRESS_BOTTOM_TO_TOP); x += xthichness; width -= xthichness * 2; height -= ythichness * 2; height *= selection / (float)Math.max(1, (maximum - minimum)); y += bounds.height - ythichness - height; } else { gtk_orientable_set_orientation (progressHandle, OS.GTK_PROGRESS_LEFT_TO_RIGHT); x += xthichness; y += ythichness; width -= xthichness * 2; height -= ythichness * 2; width *= selection / (float)Math.max(1, maximum - minimum); } detail = Converter.wcsToMbcs(null, "bar", true); gtk_render_box (gtkStyle, drawable, OS.GTK_STATE_PRELIGHT, OS.GTK_SHADOW_OUT, null, progressHandle, detail, x, y, width, height); }
@Override void draw(Theme theme, GC gc, Rectangle bounds) { long /*int*/ progressHandle = theme.progressHandle; long /*int*/ gtkStyle = gtk_widget_get_style (progressHandle); long /*int*/ drawable = gc.getGCData().drawable; theme.transferClipping(gc, gtkStyle); byte[] detail = Converter.wcsToMbcs(null, "trough", true); int x = bounds.x, y = bounds.y, width = bounds.width, height = bounds.height; gtk_render_box (gtkStyle, drawable, getStateType(DrawData.WIDGET_WHOLE), OS.GTK_SHADOW_IN, null, progressHandle, detail, x, y, width, height); int xthichness = OS.gtk_style_get_xthickness(gtkStyle); int ythichness = OS.gtk_style_get_ythickness(gtkStyle); if ((style & SWT.VERTICAL) != 0) { gtk_orientable_set_orientation (progressHandle, OS.GTK_PROGRESS_BOTTOM_TO_TOP); x += xthichness; width -= xthichness * 2; height -= ythichness * 2; height *= selection / (float)Math.max(1, (maximum - minimum)); y += bounds.height - ythichness - height; } else { gtk_orientable_set_orientation (progressHandle, OS.GTK_PROGRESS_LEFT_TO_RIGHT); x += xthichness; y += ythichness; width -= xthichness * 2; height -= ythichness * 2; width *= selection / (float)Math.max(1, maximum - minimum); } detail = Converter.wcsToMbcs(null, "bar", true); gtk_render_box (gtkStyle, drawable, OS.GTK_STATE_PRELIGHT, OS.GTK_SHADOW_OUT, null, progressHandle, detail, x, y, width, height); }
@Override void draw(Theme theme, GC gc, Rectangle bounds) { int /*long*/ notebookHandle = theme.notebookHandle; int /*long*/ gtkStyle = gtk_widget_get_style (notebookHandle); int /*long*/ drawable = OS.GTK3 ? gc.getGCData().cairo : gc.getGCData().drawable; theme.transferClipping(gc, gtkStyle); int x = bounds.x, y = bounds.y, width = bounds.width, height = bounds.height; height -= tabsHeight; int gap_x = selectedX, gap_width = selectedWidth, gap_side = OS.GTK_POS_TOP; if ((style & SWT.BOTTOM) != 0) { gap_side = OS.GTK_POS_BOTTOM; } else { y += tabsHeight; } byte[] detail = Converter.wcsToMbcs(null, "notebook", true); gtk_render_frame_gap (gtkStyle, drawable, getStateType(DrawData.WIDGET_WHOLE), OS.GTK_SHADOW_OUT, null, notebookHandle, detail, x, y, width, height, gap_side, gap_x, gap_width); if (tabsArea != null) { tabsArea.x = bounds.x; tabsArea.y = bounds.y; tabsArea.width = bounds.width; tabsArea.height = tabsHeight; if ((style & SWT.BOTTOM) != 0) { tabsArea.y += bounds.height - tabsHeight; } } }
@Override void draw(Theme theme, GC gc, Rectangle bounds) { int /*long*/ progressHandle = theme.progressHandle; int /*long*/ gtkStyle = gtk_widget_get_style (progressHandle); int /*long*/ drawable = gc.getGCData().drawable; theme.transferClipping(gc, gtkStyle); byte[] detail = Converter.wcsToMbcs(null, "trough", true); int x = bounds.x, y = bounds.y, width = bounds.width, height = bounds.height; gtk_render_box (gtkStyle, drawable, getStateType(DrawData.WIDGET_WHOLE), OS.GTK_SHADOW_IN, null, progressHandle, detail, x, y, width, height); int xthichness = OS.gtk_style_get_xthickness(gtkStyle); int ythichness = OS.gtk_style_get_ythickness(gtkStyle); if ((style & SWT.VERTICAL) != 0) { gtk_orientable_set_orientation (progressHandle, OS.GTK_PROGRESS_BOTTOM_TO_TOP); x += xthichness; width -= xthichness * 2; height -= ythichness * 2; height *= selection / (float)Math.max(1, (maximum - minimum)); y += bounds.height - ythichness - height; } else { gtk_orientable_set_orientation (progressHandle, OS.GTK_PROGRESS_LEFT_TO_RIGHT); x += xthichness; y += ythichness; width -= xthichness * 2; height -= ythichness * 2; width *= selection / (float)Math.max(1, maximum - minimum); } detail = Converter.wcsToMbcs(null, "bar", true); gtk_render_box (gtkStyle, drawable, OS.GTK_STATE_PRELIGHT, OS.GTK_SHADOW_OUT, null, progressHandle, detail, x, y, width, height); }
@Override void draw(Theme theme, GC gc, Rectangle bounds) { long /*int*/ treeHandle = theme.treeHandle; long /*int*/ gtkStyle = gtk_widget_get_style (treeHandle); long /*int*/ drawable = OS.GTK3 ? gc.getGCData().cairo : gc.getGCData().drawable; theme.transferClipping(gc, gtkStyle); int state_type = getStateType(DrawData.WIDGET_WHOLE); int expander_style = OS.GTK_EXPANDER_COLAPSED; if ((this.style & SWT.DOWN) != 0) expander_style = OS.GTK_EXPANDER_EXPANDED; byte[] detail = Converter.wcsToMbcs(null, "treeview", true); int expander_size = theme.getWidgetProperty(treeHandle, "expander-size"); int x = bounds.x + expander_size / 2; int y = bounds.y + expander_size / 2; if (OS.GTK3) { OS.gtk_render_expander (gtkStyle, drawable, bounds.x, bounds.y, expander_size, expander_size); } else { OS.gtk_paint_expander(gtkStyle, drawable, state_type, null, treeHandle, detail, x, y, expander_style); } }
@Override void draw(Theme theme, GC gc, Rectangle bounds) { int /*long*/ treeHandle = theme.treeHandle; int /*long*/ gtkStyle = gtk_widget_get_style (treeHandle); int /*long*/ drawable = OS.GTK3 ? gc.getGCData().cairo : gc.getGCData().drawable; theme.transferClipping(gc, gtkStyle); int state_type = getStateType(DrawData.WIDGET_WHOLE); int expander_style = OS.GTK_EXPANDER_COLAPSED; if ((this.style & SWT.DOWN) != 0) expander_style = OS.GTK_EXPANDER_EXPANDED; byte[] detail = Converter.wcsToMbcs(null, "treeview", true); int expander_size = theme.getWidgetProperty(treeHandle, "expander-size"); int x = bounds.x + expander_size / 2; int y = bounds.y + expander_size / 2; if (OS.GTK3) { OS.gtk_render_expander (gtkStyle, drawable, bounds.x, bounds.y, expander_size, expander_size); } else { OS.gtk_paint_expander(gtkStyle, drawable, state_type, null, treeHandle, detail, x, y, expander_style); } }
@Override void draw(Theme theme, GC gc, Rectangle bounds) { int /*long*/ treeHandle = theme.treeHandle; int /*long*/ gtkStyle = gtk_widget_get_style (treeHandle); int /*long*/ drawable = OS.GTK3 ? gc.getGCData().cairo : gc.getGCData().drawable; theme.transferClipping(gc, gtkStyle); int state_type = getStateType(DrawData.WIDGET_WHOLE); int expander_style = OS.GTK_EXPANDER_COLAPSED; if ((this.style & SWT.DOWN) != 0) expander_style = OS.GTK_EXPANDER_EXPANDED; byte[] detail = Converter.wcsToMbcs(null, "treeview", true); int expander_size = theme.getWidgetProperty(treeHandle, "expander-size"); int x = bounds.x + expander_size / 2; int y = bounds.y + expander_size / 2; if (OS.GTK3) { OS.gtk_render_expander (gtkStyle, drawable, bounds.x, bounds.y, expander_size, expander_size); } else { OS.gtk_paint_expander(gtkStyle, drawable, state_type, null, treeHandle, detail, x, y, expander_style); } }
@Override void draw(Theme theme, GC gc, Rectangle bounds) { int /*long*/ frameHandle = theme.frameHandle; int /*long*/ gtkStyle = gtk_widget_get_style (frameHandle); int /*long*/ drawable = OS.GTK3 ? gc.getGCData().cairo : gc.getGCData().drawable; theme.transferClipping(gc, gtkStyle); int xthickness = OS.gtk_style_get_xthickness(gtkStyle); int ythickness = OS.gtk_style_get_ythickness(gtkStyle); int x = bounds.x, y = bounds.y + headerHeight / 2, width = bounds.width, height = bounds.height - headerHeight / 2; byte[] detail = Converter.wcsToMbcs(null, "frame", true); int gap_x = xthickness + GROUP_X, gap_width = headerWidth + GROUP_PAD * 2, gap_side = OS.GTK_POS_TOP; int state_type = getStateType(DrawData.WIDGET_WHOLE); gtk_render_shadow_gap (gtkStyle, drawable, state_type, OS.GTK_SHADOW_ETCHED_IN, null, frameHandle, detail, x, y, width, height, gap_side, gap_x, gap_width); if (headerArea != null) { headerArea.x = bounds.x + gap_x + GROUP_PAD; headerArea.y = bounds.y; headerArea.width = headerWidth; headerArea.height = headerHeight; } if (clientArea != null) { clientArea.x = bounds.x + xthickness; clientArea.y = bounds.y + ythickness + headerHeight; clientArea.width = bounds.width - 2 * xthickness; clientArea.height = bounds.height - 2 * ythickness - headerHeight; } }
@Override void draw(Theme theme, GC gc, Rectangle bounds) { int /*long*/ frameHandle = theme.frameHandle; int /*long*/ gtkStyle = gtk_widget_get_style (frameHandle); int /*long*/ drawable = OS.GTK3 ? gc.getGCData().cairo : gc.getGCData().drawable; theme.transferClipping(gc, gtkStyle); int xthickness = OS.gtk_style_get_xthickness(gtkStyle); int ythickness = OS.gtk_style_get_ythickness(gtkStyle); int x = bounds.x, y = bounds.y + headerHeight / 2, width = bounds.width, height = bounds.height - headerHeight / 2; byte[] detail = Converter.wcsToMbcs(null, "frame", true); int gap_x = xthickness + GROUP_X, gap_width = headerWidth + GROUP_PAD * 2, gap_side = OS.GTK_POS_TOP; int state_type = getStateType(DrawData.WIDGET_WHOLE); gtk_render_shadow_gap (gtkStyle, drawable, state_type, OS.GTK_SHADOW_ETCHED_IN, null, frameHandle, detail, x, y, width, height, gap_side, gap_x, gap_width); if (headerArea != null) { headerArea.x = bounds.x + gap_x + GROUP_PAD; headerArea.y = bounds.y; headerArea.width = headerWidth; headerArea.height = headerHeight; } if (clientArea != null) { clientArea.x = bounds.x + xthickness; clientArea.y = bounds.y + ythickness + headerHeight; clientArea.width = bounds.width - 2 * xthickness; clientArea.height = bounds.height - 2 * ythickness - headerHeight; } }
@Override void draw(Theme theme, GC gc, Rectangle bounds) { long /*int*/ frameHandle = theme.frameHandle; long /*int*/ gtkStyle = gtk_widget_get_style (frameHandle); long /*int*/ drawable = OS.GTK3 ? gc.getGCData().cairo : gc.getGCData().drawable; theme.transferClipping(gc, gtkStyle); int xthickness = OS.gtk_style_get_xthickness(gtkStyle); int ythickness = OS.gtk_style_get_ythickness(gtkStyle); int x = bounds.x, y = bounds.y + headerHeight / 2, width = bounds.width, height = bounds.height - headerHeight / 2; byte[] detail = Converter.wcsToMbcs(null, "frame", true); int gap_x = xthickness + GROUP_X, gap_width = headerWidth + GROUP_PAD * 2, gap_side = OS.GTK_POS_TOP; int state_type = getStateType(DrawData.WIDGET_WHOLE); gtk_render_shadow_gap (gtkStyle, drawable, state_type, OS.GTK_SHADOW_ETCHED_IN, null, frameHandle, detail, x, y, width, height, gap_side, gap_x, gap_width); if (headerArea != null) { headerArea.x = bounds.x + gap_x + GROUP_PAD; headerArea.y = bounds.y; headerArea.width = headerWidth; headerArea.height = headerHeight; } if (clientArea != null) { clientArea.x = bounds.x + xthickness; clientArea.y = bounds.y + ythickness + headerHeight; clientArea.width = bounds.width - 2 * xthickness; clientArea.height = bounds.height - 2 * ythickness - headerHeight; } }
int /*long*/ gtkStyle = gtk_widget_get_style (notebookHandle); int /*long*/ drawable = OS.GTK3 ? gc.getGCData().cairo : gc.getGCData().drawable; theme.transferClipping(gc, gtkStyle); int x = bounds.x, y = bounds.y, width = bounds.width, height = bounds.height; if ((state[DrawData.WIDGET_WHOLE] & DrawData.SELECTED) == 0) {
int /*long*/ gtkStyle = gtk_widget_get_style (notebookHandle); int /*long*/ drawable = OS.GTK3 ? gc.getGCData().cairo : gc.getGCData().drawable; theme.transferClipping(gc, gtkStyle); int x = bounds.x, y = bounds.y, width = bounds.width, height = bounds.height; if ((state[DrawData.WIDGET_WHOLE] & DrawData.SELECTED) == 0) {
int /*long*/ gtkStyle = gtk_widget_get_style(widget); int /*long*/ drawable = gc.getGCData().drawable; theme.transferClipping (gc, gtkStyle); byte[] buffer = Converter.wcsToMbcs(null, text, true); int /*long*/ layout = OS.gtk_widget_create_pango_layout(widget, buffer);
long /*int*/ gtkStyle = gtk_widget_get_style(widget); long /*int*/ drawable = gc.getGCData().drawable; theme.transferClipping (gc, gtkStyle); byte[] buffer = Converter.wcsToMbcs(null, text, true); long /*int*/ layout = OS.gtk_widget_create_pango_layout(widget, buffer);
theme.transferClipping(gc, gtkStyle); int /*long*/ rendered = OS.gtk_style_render_icon(gtkStyle, source, OS.GTK_TEXT_DIR_NONE, state_type, -1, buttonHandle, null); OS.g_object_unref(pixbuf);