gridview: Export some functions privately
This will let us write tests for the tile splitting code.
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "gtkgridview.h"
|
||||
#include "gtkgridviewprivate.h"
|
||||
|
||||
#include "gtkbitset.h"
|
||||
#include "gtklistbaseprivate.h"
|
||||
@@ -386,7 +386,7 @@ gtk_grid_view_get_allocation (GtkListBase *base,
|
||||
|
||||
/* Returns the column that the given item will fall in.
|
||||
*/
|
||||
static unsigned int
|
||||
unsigned int
|
||||
gtk_grid_view_get_column_for_position (GtkListItemManager *items,
|
||||
unsigned int n_columns,
|
||||
unsigned int position)
|
||||
@@ -397,7 +397,7 @@ gtk_grid_view_get_column_for_position (GtkListItemManager *items,
|
||||
/* Determine whether a tile is contained in a single row,
|
||||
* or spans multiple rows.
|
||||
*/
|
||||
static gboolean
|
||||
gboolean
|
||||
gtk_grid_view_is_multirow_tile (GtkListItemManager *items,
|
||||
unsigned int n_columns,
|
||||
GtkListTile *tile)
|
||||
@@ -767,7 +767,7 @@ gtk_grid_view_measure (GtkWidget *widget,
|
||||
gtk_grid_view_measure_across (widget, for_size, minimum, natural);
|
||||
}
|
||||
|
||||
static void
|
||||
void
|
||||
gtk_grid_view_split_tiles_by_columns (GtkListItemManager *items,
|
||||
guint n_columns)
|
||||
{
|
||||
|
||||
40
gtk/gtkgridviewprivate.h
Normal file
40
gtk/gtkgridviewprivate.h
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright © 2023 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "gtk/gtktypes.h"
|
||||
#include "gtk/gtkenums.h"
|
||||
#include "gtk/gtkgridview.h"
|
||||
#include "gtk/gtklistitemmanagerprivate.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
unsigned int gtk_grid_view_get_column_for_position (GtkListItemManager *items,
|
||||
unsigned int n_columns,
|
||||
unsigned int position);
|
||||
|
||||
gboolean gtk_grid_view_is_multirow_tile (GtkListItemManager *items,
|
||||
unsigned int n_columns,
|
||||
GtkListTile *tile);
|
||||
|
||||
void gtk_grid_view_split_tiles_by_columns (GtkListItemManager *items,
|
||||
guint n_columns);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
Reference in New Issue
Block a user