Example #1
0
JNIEXPORT jint JNICALL
Java_org_gnome_gtk_GtkIconView_gtk_1icon_1view_1get_1item_1orientation
(
	JNIEnv* env,
	jclass cls,
	jlong _self
)
{
	GtkOrientation result;
	jint _result;
	GtkIconView* self;

	// convert parameter self
	self = (GtkIconView*) _self;

	// call function
	result = gtk_icon_view_get_item_orientation(self);

	// cleanup parameter self

	// translate return value to JNI type
	_result = (jint) result;

	// and finally
	return _result;
}
Example #2
0
/* test that g_object_new keeps the provided area */
static void
test_iconview_object_new (void)
{
    GtkWidget *view;
    GtkCellArea *area;

    area = gtk_cell_area_box_new ();
    gtk_orientable_set_orientation (GTK_ORIENTABLE (area), GTK_ORIENTATION_HORIZONTAL);
    view = g_object_new (GTK_TYPE_ICON_VIEW, "cell-area", area, NULL);
    g_assert (gtk_cell_layout_get_area (GTK_CELL_LAYOUT (view)) == area);
    g_assert (gtk_orientable_get_orientation (GTK_ORIENTABLE (area)) == gtk_icon_view_get_item_orientation (GTK_ICON_VIEW (view)));

    g_object_ref_sink (view);
    g_object_unref (view);
}
Example #3
0
/* test that we have a cell area after new() */
static void
test_iconview_new (void)
{
    GtkWidget *view;
    GtkCellArea *area;

    view = gtk_icon_view_new ();

    area = gtk_cell_layout_get_area (GTK_CELL_LAYOUT (view));
    g_assert (GTK_IS_CELL_AREA_BOX (area));
    g_assert (gtk_orientable_get_orientation (GTK_ORIENTABLE (area)) == gtk_icon_view_get_item_orientation (GTK_ICON_VIEW (view)));

    g_object_ref_sink (view);
    g_object_unref (view);
}