g_object_ref_sink (priv->cell_area);
}
- gtk_cell_area_set_style_detail (priv->cell_area, "treeview");
-
priv->add_editable_signal =
g_signal_connect (priv->cell_area, "add-editable",
G_CALLBACK (gtk_tree_view_column_add_editable_callback),
return match;
}
+gboolean
+_gtk_tree_view_column_is_blank_at_pos (GtkTreeViewColumn *column,
+ GdkRectangle *cell_area,
+ GdkRectangle *background_area,
+ gint x,
+ gint y)
+{
+ GtkCellRenderer *match;
+ GdkRectangle cell_alloc, aligned_area, inner_area;
+ GtkTreeViewColumnPrivate *priv = column->priv;
+
+ match = _gtk_tree_view_column_get_cell_at_pos (column,
+ cell_area,
+ background_area,
+ x, y);
+ if (!match)
+ return FALSE;
+
+ gtk_cell_area_get_cell_allocation (priv->cell_area,
+ priv->cell_area_context,
+ priv->tree_view,
+ match,
+ cell_area,
+ &cell_alloc);
+
+ gtk_cell_area_inner_cell_area (priv->cell_area, priv->tree_view,
+ &cell_alloc, &inner_area);
+ gtk_cell_renderer_get_aligned_area (match, priv->tree_view, 0,
+ &inner_area, &aligned_area);
+
+ if (x < aligned_area.x ||
+ x > aligned_area.x + aligned_area.width ||
+ y < aligned_area.y ||
+ y > aligned_area.y + aligned_area.height)
+ return TRUE;
+
+ return FALSE;
+}
+
/* Public Functions */
* gtk_tree_view_column_set_cell_data_func:
* @tree_column: A #GtkTreeViewColumn
* @cell_renderer: A #GtkCellRenderer
- * @func: The #GtkTreeViewColumnFunc to use.
+ * @func: (allow-none): The #GtkTreeViewColumnFunc to use.
* @func_data: The user data for @func.
* @destroy: The destroy notification for @func_data
*
* gtk_tree_view_column_cell_get_size:
* @tree_column: A #GtkTreeViewColumn.
* @cell_area: (allow-none): The area a cell in the column will be allocated, or %NULL
- * @x_offset: (allow-none): location to return x offset of a cell relative to @cell_area, or %NULL
- * @y_offset: (allow-none): location to return y offset of a cell relative to @cell_area, or %NULL
- * @width: (allow-none): location to return width needed to render a cell, or %NULL
- * @height: (allow-none): location to return height needed to render a cell, or %NULL
+ * @x_offset: (out) (allow-none): location to return x offset of a cell relative to @cell_area, or %NULL
+ * @y_offset: (out) (allow-none): location to return y offset of a cell relative to @cell_area, or %NULL
+ * @width: (out) (allow-none): location to return width needed to render a cell, or %NULL
+ * @height: (out) (allow-none): location to return height needed to render a cell, or %NULL
*
* Obtains the width and height needed to render the column. This is used
* primarily by the #GtkTreeView.
* gtk_tree_view_column_cell_get_position:
* @tree_column: a #GtkTreeViewColumn
* @cell_renderer: a #GtkCellRenderer
- * @x_offset: return location for the horizontal position of @cell within
- * @tree_column, may be %NULL
- * @width: return location for the width of @cell, may be %NULL
+ * @x_offset: (out) (allow-none): return location for the horizontal
+ * position of @cell within @tree_column, may be %NULL
+ * @width: (out) (allow-none): return location for the width of @cell,
+ * may be %NULL
*
* Obtains the horizontal position and size of a cell in a column. If the
* cell is not found in the column, @start_pos and @width are not changed and