Commit 1bca6349 authored by Tristan Van Berkom's avatar Tristan Van Berkom

Mass rename GtkCellAreaIter --> GtkCellAreaContext

parent bef95590
......@@ -170,8 +170,8 @@ gtk_public_h_sources = \
gtkcalendar.h \
gtkcellarea.h \
gtkcellareabox.h \
gtkcellareaboxiter.h \
gtkcellareaiter.h \
gtkcellareaboxcontext.h \
gtkcellareacontext.h \
gtkcelleditable.h \
gtkcelllayout.h \
gtkcellrenderer.h \
......@@ -436,8 +436,8 @@ gtk_base_c_sources = \
gtkcalendar.c \
gtkcellarea.c \
gtkcellareabox.c \
gtkcellareaboxiter.c \
gtkcellareaiter.c \
gtkcellareaboxcontext.c \
gtkcellareacontext.c \
gtkcelleditable.c \
gtkcelllayout.c \
gtkcellrenderer.c \
......
......@@ -54,7 +54,7 @@
#include <gtk/gtkcalendar.h>
#include <gtk/gtkcellarea.h>
#include <gtk/gtkcellareabox.h>
#include <gtk/gtkcellareaiter.h>
#include <gtk/gtkcellareacontext.h>
#include <gtk/gtkcelleditable.h>
#include <gtk/gtkcelllayout.h>
#include <gtk/gtkcellrenderer.h>
......
......@@ -30,7 +30,7 @@
#include "gtkintl.h"
#include "gtkcelllayout.h"
#include "gtkcellarea.h"
#include "gtkcellareaiter.h"
#include "gtkcellareacontext.h"
#include "gtkmarshalers.h"
#include "gtkprivate.h"
......@@ -51,26 +51,26 @@ static void gtk_cell_area_get_property (GObject
/* GtkCellAreaClass */
static gint gtk_cell_area_real_event (GtkCellArea *area,
GtkCellAreaIter *iter,
GtkCellAreaContext *context,
GtkWidget *widget,
GdkEvent *event,
const GdkRectangle *cell_area,
GtkCellRendererState flags);
static void gtk_cell_area_real_get_preferred_height_for_width (GtkCellArea *area,
GtkCellAreaIter *iter,
GtkCellAreaContext *context,
GtkWidget *widget,
gint width,
gint *minimum_height,
gint *natural_height);
static void gtk_cell_area_real_get_preferred_width_for_height (GtkCellArea *area,
GtkCellAreaIter *iter,
GtkCellAreaContext *context,
GtkWidget *widget,
gint height,
gint *minimum_width,
gint *natural_width);
static gboolean gtk_cell_area_real_can_focus (GtkCellArea *area);
static gboolean gtk_cell_area_real_activate (GtkCellArea *area,
GtkCellAreaIter *iter,
GtkCellAreaContext *context,
GtkWidget *widget,
const GdkRectangle *cell_area,
GtkCellRendererState flags);
......@@ -274,7 +274,7 @@ gtk_cell_area_class_init (GtkCellAreaClass *class)
class->render = NULL;
/* geometry */
class->create_iter = NULL;
class->create_context = NULL;
class->get_request_mode = NULL;
class->get_preferred_width = NULL;
class->get_preferred_height = NULL;
......@@ -610,7 +610,7 @@ gtk_cell_area_get_property (GObject *object,
*************************************************************/
static gint
gtk_cell_area_real_event (GtkCellArea *area,
GtkCellAreaIter *iter,
GtkCellAreaContext *context,
GtkWidget *widget,
GdkEvent *event,
const GdkRectangle *cell_area,
......@@ -635,26 +635,26 @@ gtk_cell_area_real_event (GtkCellArea *area,
static void
gtk_cell_area_real_get_preferred_height_for_width (GtkCellArea *area,
GtkCellAreaIter *iter,
GtkCellAreaContext *context,
GtkWidget *widget,
gint width,
gint *minimum_height,
gint *natural_height)
{
/* If the area doesnt do height-for-width, fallback on base preferred height */
GTK_CELL_AREA_GET_CLASS (area)->get_preferred_width (area, iter, widget, minimum_height, natural_height);
GTK_CELL_AREA_GET_CLASS (area)->get_preferred_width (area, context, widget, minimum_height, natural_height);
}
static void
gtk_cell_area_real_get_preferred_width_for_height (GtkCellArea *area,
GtkCellAreaIter *iter,
GtkCellAreaContext *context,
GtkWidget *widget,
gint height,
gint *minimum_width,
gint *natural_width)
{
/* If the area doesnt do width-for-height, fallback on base preferred width */
GTK_CELL_AREA_GET_CLASS (area)->get_preferred_width (area, iter, widget, minimum_width, natural_width);
GTK_CELL_AREA_GET_CLASS (area)->get_preferred_width (area, context, widget, minimum_width, natural_width);
}
static void
......@@ -684,7 +684,7 @@ gtk_cell_area_real_can_focus (GtkCellArea *area)
static gboolean
gtk_cell_area_real_activate (GtkCellArea *area,
GtkCellAreaIter *iter,
GtkCellAreaContext *context,
GtkWidget *widget,
const GdkRectangle *cell_area,
GtkCellRendererState flags)
......@@ -696,7 +696,7 @@ gtk_cell_area_real_activate (GtkCellArea *area,
{
/* Get the allocation of the focused cell.
*/
gtk_cell_area_get_cell_allocation (area, iter, widget, priv->focus_cell,
gtk_cell_area_get_cell_allocation (area, context, widget, priv->focus_cell,
cell_area, &background_area);
/* Activate or Edit the currently focused cell
......@@ -980,7 +980,7 @@ gtk_cell_area_forall (GtkCellArea *area,
/**
* gtk_cell_area_get_cell_allocation:
* @area: a #GtkCellArea
* @iter: the #GtkCellAreaIter used to hold sizes for @area.
* @context: the #GtkCellAreaContext used to hold sizes for @area.
* @widget: the #GtkWidget that @area is rendering on
* @renderer: the #GtkCellRenderer to get the allocation for
* @cell_area: the whole allocated area for @area in @widget
......@@ -992,7 +992,7 @@ gtk_cell_area_forall (GtkCellArea *area,
*/
void
gtk_cell_area_get_cell_allocation (GtkCellArea *area,
GtkCellAreaIter *iter,
GtkCellAreaContext *context,
GtkWidget *widget,
GtkCellRenderer *renderer,
const GdkRectangle *cell_area,
......@@ -1001,7 +1001,7 @@ gtk_cell_area_get_cell_allocation (GtkCellArea *area,
GtkCellAreaClass *class;
g_return_if_fail (GTK_IS_CELL_AREA (area));
g_return_if_fail (GTK_IS_CELL_AREA_ITER (iter));
g_return_if_fail (GTK_IS_CELL_AREA_CONTEXT (context));
g_return_if_fail (GTK_IS_WIDGET (widget));
g_return_if_fail (GTK_IS_CELL_RENDERER (renderer));
g_return_if_fail (cell_area != NULL);
......@@ -1010,7 +1010,7 @@ gtk_cell_area_get_cell_allocation (GtkCellArea *area,
class = GTK_CELL_AREA_GET_CLASS (area);
if (class->get_cell_allocation)
class->get_cell_allocation (area, iter, widget, renderer, cell_area, allocation);
class->get_cell_allocation (area, context, widget, renderer, cell_area, allocation);
else
g_warning ("GtkCellAreaClass::get_cell_allocation not implemented for `%s'",
g_type_name (G_TYPE_FROM_INSTANCE (area)));
......@@ -1018,7 +1018,7 @@ gtk_cell_area_get_cell_allocation (GtkCellArea *area,
gint
gtk_cell_area_event (GtkCellArea *area,
GtkCellAreaIter *iter,
GtkCellAreaContext *context,
GtkWidget *widget,
GdkEvent *event,
const GdkRectangle *cell_area,
......@@ -1027,7 +1027,7 @@ gtk_cell_area_event (GtkCellArea *area,
GtkCellAreaClass *class;
g_return_val_if_fail (GTK_IS_CELL_AREA (area), 0);
g_return_val_if_fail (GTK_IS_CELL_AREA_ITER (iter), 0);
g_return_val_if_fail (GTK_IS_CELL_AREA_CONTEXT (context), 0);
g_return_val_if_fail (GTK_IS_WIDGET (widget), 0);
g_return_val_if_fail (event != NULL, 0);
g_return_val_if_fail (cell_area != NULL, 0);
......@@ -1035,7 +1035,7 @@ gtk_cell_area_event (GtkCellArea *area,
class = GTK_CELL_AREA_GET_CLASS (area);
if (class->event)
return class->event (area, iter, widget, event, cell_area, flags);
return class->event (area, context, widget, event, cell_area, flags);
g_warning ("GtkCellAreaClass::event not implemented for `%s'",
g_type_name (G_TYPE_FROM_INSTANCE (area)));
......@@ -1044,7 +1044,7 @@ gtk_cell_area_event (GtkCellArea *area,
void
gtk_cell_area_render (GtkCellArea *area,
GtkCellAreaIter *iter,
GtkCellAreaContext *context,
GtkWidget *widget,
cairo_t *cr,
const GdkRectangle *background_area,
......@@ -1055,7 +1055,7 @@ gtk_cell_area_render (GtkCellArea *area,
GtkCellAreaClass *class;
g_return_if_fail (GTK_IS_CELL_AREA (area));
g_return_if_fail (GTK_IS_CELL_AREA_ITER (iter));
g_return_if_fail (GTK_IS_CELL_AREA_CONTEXT (context));
g_return_if_fail (GTK_IS_WIDGET (widget));
g_return_if_fail (cr != NULL);
g_return_if_fail (background_area != NULL);
......@@ -1064,7 +1064,7 @@ gtk_cell_area_render (GtkCellArea *area,
class = GTK_CELL_AREA_GET_CLASS (area);
if (class->render)
class->render (area, iter, widget, cr, background_area, cell_area, flags, paint_focus);
class->render (area, context, widget, cr, background_area, cell_area, flags, paint_focus);
else
g_warning ("GtkCellAreaClass::render not implemented for `%s'",
g_type_name (G_TYPE_FROM_INSTANCE (area)));
......@@ -1102,8 +1102,8 @@ gtk_cell_area_get_style_detail (GtkCellArea *area)
/*************************************************************
* API: Geometry *
*************************************************************/
GtkCellAreaIter *
gtk_cell_area_create_iter (GtkCellArea *area)
GtkCellAreaContext *
gtk_cell_area_create_context (GtkCellArea *area)
{
GtkCellAreaClass *class;
......@@ -1111,10 +1111,10 @@ gtk_cell_area_create_iter (GtkCellArea *area)
class = GTK_CELL_AREA_GET_CLASS (area);
if (class->create_iter)
return class->create_iter (area);
if (class->create_context)
return class->create_context (area);
g_warning ("GtkCellAreaClass::create_iter not implemented for `%s'",
g_warning ("GtkCellAreaClass::create_context not implemented for `%s'",
g_type_name (G_TYPE_FROM_INSTANCE (area)));
return NULL;
......@@ -1142,7 +1142,7 @@ gtk_cell_area_get_request_mode (GtkCellArea *area)
void
gtk_cell_area_get_preferred_width (GtkCellArea *area,
GtkCellAreaIter *iter,
GtkCellAreaContext *context,
GtkWidget *widget,
gint *minimum_size,
gint *natural_size)
......@@ -1155,7 +1155,7 @@ gtk_cell_area_get_preferred_width (GtkCellArea *area,
class = GTK_CELL_AREA_GET_CLASS (area);
if (class->get_preferred_width)
class->get_preferred_width (area, iter, widget, minimum_size, natural_size);
class->get_preferred_width (area, context, widget, minimum_size, natural_size);
else
g_warning ("GtkCellAreaClass::get_preferred_width not implemented for `%s'",
g_type_name (G_TYPE_FROM_INSTANCE (area)));
......@@ -1163,7 +1163,7 @@ gtk_cell_area_get_preferred_width (GtkCellArea *area,
void
gtk_cell_area_get_preferred_height_for_width (GtkCellArea *area,
GtkCellAreaIter *iter,
GtkCellAreaContext *context,
GtkWidget *widget,
gint width,
gint *minimum_height,
......@@ -1175,12 +1175,12 @@ gtk_cell_area_get_preferred_height_for_width (GtkCellArea *area,
g_return_if_fail (GTK_IS_WIDGET (widget));
class = GTK_CELL_AREA_GET_CLASS (area);
class->get_preferred_height_for_width (area, iter, widget, width, minimum_height, natural_height);
class->get_preferred_height_for_width (area, context, widget, width, minimum_height, natural_height);
}
void
gtk_cell_area_get_preferred_height (GtkCellArea *area,
GtkCellAreaIter *iter,
GtkCellAreaContext *context,
GtkWidget *widget,
gint *minimum_size,
gint *natural_size)
......@@ -1193,7 +1193,7 @@ gtk_cell_area_get_preferred_height (GtkCellArea *area,
class = GTK_CELL_AREA_GET_CLASS (area);
if (class->get_preferred_height)
class->get_preferred_height (area, iter, widget, minimum_size, natural_size);
class->get_preferred_height (area, context, widget, minimum_size, natural_size);
else
g_warning ("GtkCellAreaClass::get_preferred_height not implemented for `%s'",
g_type_name (G_TYPE_FROM_INSTANCE (area)));
......@@ -1201,7 +1201,7 @@ gtk_cell_area_get_preferred_height (GtkCellArea *area,
void
gtk_cell_area_get_preferred_width_for_height (GtkCellArea *area,
GtkCellAreaIter *iter,
GtkCellAreaContext *context,
GtkWidget *widget,
gint height,
gint *minimum_width,
......@@ -1213,7 +1213,7 @@ gtk_cell_area_get_preferred_width_for_height (GtkCellArea *area,
g_return_if_fail (GTK_IS_WIDGET (widget));
class = GTK_CELL_AREA_GET_CLASS (area);
class->get_preferred_width_for_height (area, iter, widget, height, minimum_width, natural_width);
class->get_preferred_width_for_height (area, context, widget, height, minimum_width, natural_width);
}
/*************************************************************
......@@ -1849,7 +1849,7 @@ gtk_cell_area_focus (GtkCellArea *area,
/**
* gtk_cell_area_activate:
* @area: a #GtkCellArea
* @iter: the #GtkCellAreaIter in context with the current row data
* @context: the #GtkCellAreaContext in context with the current row data
* @widget: the #GtkWidget that @area is rendering on
* @cell_area: the size and location of @area relative to @widget's allocation
* @flags: the #GtkCellRendererState flags for @area for this row of data.
......@@ -1862,14 +1862,14 @@ gtk_cell_area_focus (GtkCellArea *area,
*/
gboolean
gtk_cell_area_activate (GtkCellArea *area,
GtkCellAreaIter *iter,
GtkCellAreaContext *context,
GtkWidget *widget,
const GdkRectangle *cell_area,
GtkCellRendererState flags)
{
g_return_val_if_fail (GTK_IS_CELL_AREA (area), FALSE);
return GTK_CELL_AREA_GET_CLASS (area)->activate (area, iter, widget, cell_area, flags);
return GTK_CELL_AREA_GET_CLASS (area)->activate (area, context, widget, cell_area, flags);
}
......
......@@ -44,7 +44,7 @@ G_BEGIN_DECLS
typedef struct _GtkCellArea GtkCellArea;
typedef struct _GtkCellAreaClass GtkCellAreaClass;
typedef struct _GtkCellAreaPrivate GtkCellAreaPrivate;
typedef struct _GtkCellAreaIter GtkCellAreaIter;
typedef struct _GtkCellAreaContext GtkCellAreaContext;
/**
* GtkCellCallback:
......@@ -80,19 +80,19 @@ struct _GtkCellAreaClass
GtkCellCallback callback,
gpointer callback_data);
void (* get_cell_allocation) (GtkCellArea *area,
GtkCellAreaIter *iter,
GtkCellAreaContext *context,
GtkWidget *widget,
GtkCellRenderer *renderer,
const GdkRectangle *cell_area,
GdkRectangle *allocation);
gint (* event) (GtkCellArea *area,
GtkCellAreaIter *iter,
GtkCellAreaContext *context,
GtkWidget *widget,
GdkEvent *event,
const GdkRectangle *cell_area,
GtkCellRendererState flags);
void (* render) (GtkCellArea *area,
GtkCellAreaIter *iter,
GtkCellAreaContext *context,
GtkWidget *widget,
cairo_t *cr,
const GdkRectangle *background_area,
......@@ -101,26 +101,26 @@ struct _GtkCellAreaClass
gboolean paint_focus);
/* Geometry */
GtkCellAreaIter *(* create_iter) (GtkCellArea *area);
GtkCellAreaContext *(* create_context) (GtkCellArea *area);
GtkSizeRequestMode (* get_request_mode) (GtkCellArea *area);
void (* get_preferred_width) (GtkCellArea *area,
GtkCellAreaIter *iter,
GtkCellAreaContext *context,
GtkWidget *widget,
gint *minimum_size,
gint *natural_size);
void (* get_preferred_height_for_width) (GtkCellArea *area,
GtkCellAreaIter *iter,
GtkCellAreaContext *context,
GtkWidget *widget,
gint width,
gint *minimum_height,
gint *natural_height);
void (* get_preferred_height) (GtkCellArea *area,
GtkCellAreaIter *iter,
GtkCellAreaContext *context,
GtkWidget *widget,
gint *minimum_size,
gint *natural_size);
void (* get_preferred_width_for_height) (GtkCellArea *area,
GtkCellAreaIter *iter,
GtkCellAreaContext *context,
GtkWidget *widget,
gint height,
gint *minimum_width,
......@@ -143,7 +143,7 @@ struct _GtkCellAreaClass
gboolean (* focus) (GtkCellArea *area,
GtkDirectionType direction);
gboolean (* activate) (GtkCellArea *area,
GtkCellAreaIter *iter,
GtkCellAreaContext *context,
GtkWidget *widget,
const GdkRectangle *cell_area,
GtkCellRendererState flags);
......@@ -173,19 +173,19 @@ void gtk_cell_area_forall (GtkCellArea
GtkCellCallback callback,
gpointer callback_data);
void gtk_cell_area_get_cell_allocation (GtkCellArea *area,
GtkCellAreaIter *iter,
GtkCellAreaContext *context,
GtkWidget *widget,
GtkCellRenderer *renderer,
const GdkRectangle *cell_area,
GdkRectangle *allocation);
gint gtk_cell_area_event (GtkCellArea *area,
GtkCellAreaIter *iter,
GtkCellAreaContext *context,
GtkWidget *widget,
GdkEvent *event,
const GdkRectangle *cell_area,
GtkCellRendererState flags);
void gtk_cell_area_render (GtkCellArea *area,
GtkCellAreaIter *iter,
GtkCellAreaContext *context,
GtkWidget *widget,
cairo_t *cr,
const GdkRectangle *background_area,
......@@ -197,26 +197,26 @@ void gtk_cell_area_set_style_detail (GtkCellArea
G_CONST_RETURN gchar *gtk_cell_area_get_style_detail (GtkCellArea *area);
/* Geometry */
GtkCellAreaIter *gtk_cell_area_create_iter (GtkCellArea *area);
GtkCellAreaContext *gtk_cell_area_create_context (GtkCellArea *area);
GtkSizeRequestMode gtk_cell_area_get_request_mode (GtkCellArea *area);
void gtk_cell_area_get_preferred_width (GtkCellArea *area,
GtkCellAreaIter *iter,
GtkCellAreaContext *context,
GtkWidget *widget,
gint *minimum_size,
gint *natural_size);
void gtk_cell_area_get_preferred_height_for_width (GtkCellArea *area,
GtkCellAreaIter *iter,
GtkCellAreaContext *context,
GtkWidget *widget,
gint width,
gint *minimum_height,
gint *natural_height);
void gtk_cell_area_get_preferred_height (GtkCellArea *area,
GtkCellAreaIter *iter,
GtkCellAreaContext *context,
GtkWidget *widget,
gint *minimum_size,
gint *natural_size);
void gtk_cell_area_get_preferred_width_for_height (GtkCellArea *area,
GtkCellAreaIter *iter,
GtkCellAreaContext *context,
GtkWidget *widget,
gint height,
gint *minimum_width,
......@@ -284,7 +284,7 @@ gboolean gtk_cell_area_can_focus (GtkCellArea
gboolean gtk_cell_area_focus (GtkCellArea *area,
GtkDirectionType direction);
gboolean gtk_cell_area_activate (GtkCellArea *area,
GtkCellAreaIter *iter,
GtkCellAreaContext *context,
GtkWidget *widget,
const GdkRectangle *cell_area,
GtkCellRendererState flags);
......
This diff is collapsed.
/* gtkcellareaboxcontext.h
*
* Copyright (C) 2010 Openismus GmbH
*
* Authors:
* Tristan Van Berkom <tristanvb@openismus.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
#error "Only <gtk/gtk.h> can be included directly."
#endif
#ifndef __GTK_CELL_AREA_BOX_CONTEXT_H__
#define __GTK_CELL_AREA_BOX_CONTEXT_H__
#include <gtk/gtkcellareacontext.h>
#include <gtk/gtkcellareabox.h>
#include <gtk/gtkcellrenderer.h>
#include <gtk/gtksizerequest.h>
G_BEGIN_DECLS
#define GTK_TYPE_CELL_AREA_BOX_CONTEXT (gtk_cell_area_box_context_get_type ())
#define GTK_CELL_AREA_BOX_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_CELL_AREA_BOX_CONTEXT, GtkCellAreaBoxContext))
#define GTK_CELL_AREA_BOX_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_CELL_AREA_BOX_CONTEXT, GtkCellAreaBoxContextClass))
#define GTK_IS_CELL_AREA_BOX_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_CELL_AREA_BOX_CONTEXT))
#define GTK_IS_CELL_AREA_BOX_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CELL_AREA_BOX_CONTEXT))
#define GTK_CELL_AREA_BOX_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_CELL_AREA_BOX_CONTEXT, GtkCellAreaBoxContextClass))
typedef struct _GtkCellAreaBoxContext GtkCellAreaBoxContext;
typedef struct _GtkCellAreaBoxContextClass GtkCellAreaBoxContextClass;
typedef struct _GtkCellAreaBoxContextPrivate GtkCellAreaBoxContextPrivate;
struct _GtkCellAreaBoxContext
{
GtkCellAreaContext parent_instance;
GtkCellAreaBoxContextPrivate *priv;
};
struct _GtkCellAreaBoxContextClass
{
GtkCellAreaContextClass parent_class;
};
GType gtk_cell_area_box_context_get_type (void) G_GNUC_CONST;
/* Initialize group array dimensions */
void gtk_cell_area_box_init_groups (GtkCellAreaBoxContext *box_context,
guint n_groups,
gboolean *expand_groups);
/* Update cell-group sizes */
void gtk_cell_area_box_context_push_group_width (GtkCellAreaBoxContext *box_context,
gint group_idx,
gint minimum_width,
gint natural_width);
void gtk_cell_area_box_context_push_group_height_for_width (GtkCellAreaBoxContext *box_context,
gint group_idx,
gint for_width,
gint minimum_height,
gint natural_height);
void gtk_cell_area_box_context_push_group_height (GtkCellAreaBoxContext *box_context,
gint group_idx,
gint minimum_height,
gint natural_height);
void gtk_cell_area_box_context_push_group_width_for_height (GtkCellAreaBoxContext *box_context,
gint group_idx,
gint for_height,
gint minimum_width,
gint natural_width);
/* Fetch cell-group sizes */
void gtk_cell_area_box_context_get_group_width (GtkCellAreaBoxContext *box_context,
gint group_idx,
gint *minimum_width,
gint *natural_width);
void gtk_cell_area_box_context_get_group_height_for_width (GtkCellAreaBoxContext *box_context,
gint group_idx,
gint for_width,
gint *minimum_height,
gint *natural_height);
void gtk_cell_area_box_context_get_group_height (GtkCellAreaBoxContext *box_context,
gint group_idx,
gint *minimum_height,
gint *natural_height);
void gtk_cell_area_box_context_get_group_width_for_height (GtkCellAreaBoxContext *box_context,
gint group_idx,
gint for_height,
gint *minimum_width,
gint *natural_width);
GtkRequestedSize *gtk_cell_area_box_context_get_widths (GtkCellAreaBoxContext *box_context,
gint *n_widths);
GtkRequestedSize *gtk_cell_area_box_context_get_heights (GtkCellAreaBoxContext *box_context,
gint *n_heights);
/* Private context/area interaction */
typedef struct {
gint group_idx; /* Groups containing only invisible cells are not allocated */
gint position; /* Relative group allocation position in the orientation of the box */
gint size; /* Full allocated size of the cells in this group spacing inclusive */
} GtkCellAreaBoxAllocation;
G_CONST_RETURN GtkCellAreaBoxAllocation *
gtk_cell_area_box_context_get_orientation_allocs (GtkCellAreaBoxContext *context,
gint *n_allocs);
G_END_DECLS
#endif /* __GTK_CELL_AREA_BOX_CONTEXT_H__ */
/* gtkcellareaboxiter.h
*
* Copyright (C) 2010 Openismus GmbH
*
* Authors:
* Tristan Van Berkom <tristanvb@openismus.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
#error "Only <gtk/gtk.h> can be included directly."
#endif
#ifndef __GTK_CELL_AREA_BOX_ITER_H__
#define __GTK_CELL_AREA_BOX_ITER_H__
#include <gtk/gtkcellareaiter.h>
#include <gtk/gtkcellareabox.h>
#include <gtk/gtkcellrenderer.h>
#include <gtk/gtksizerequest.h>
G_BEGIN_DECLS
#define GTK_TYPE_CELL_AREA_BOX_ITER (gtk_cell_area_box_iter_get_type ())
#define GTK_CELL_AREA_BOX_ITER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_CELL_AREA_BOX_ITER, GtkCellAreaBoxIter))
#define GTK_CELL_AREA_BOX_ITER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_CELL_AREA_BOX_ITER, GtkCellAreaBoxIterClass))
#define GTK_IS_CELL_AREA_BOX_ITER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_CELL_AREA_BOX_ITER))
#define GTK_IS_CELL_AREA_BOX_ITER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CELL_AREA_BOX_ITER))
#define GTK_CELL_AREA_BOX_ITER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_CELL_AREA_BOX_ITER, GtkCellAreaBoxIterClass))
typedef struct _GtkCellAreaBoxIter GtkCellAreaBoxIter;
typedef struct _GtkCellAreaBoxIterClass GtkCellAreaBoxIterClass;
typedef struct _GtkCellAreaBoxIterPrivate GtkCellAreaBoxIterPrivate;
struct _GtkCellAreaBoxIter
{
GtkCellAreaIter parent_instance;
GtkCellAreaBoxIterPrivate *priv;
};
struct _GtkCellAreaBoxIterClass
{
GtkCellAreaIterClass parent_class;
};
GType gtk_cell_area_box_iter_get_type (void) G_GNUC_CONST;
/* Initialize group array dimensions */
void gtk_cell_area_box_init_groups (GtkCellAreaBoxIter *box_iter,
guint n_groups,
gboolean *expand_groups);
/* Update cell-group sizes */
void gtk_cell_area_box_iter_push_group_width (GtkCellAreaBoxIter *box_iter,
gint group_idx,
gint minimum_width,
gint natural_width);
void gtk_cell_area_box_iter_push_group_height_for_width (GtkCellAreaBoxIter *box_iter,
gint group_idx,
gint for_width,
gint minimum_height,
gint natural_height);
void gtk_cell_area_box_iter_push_group_height (GtkCellAreaBoxIter *box_iter,
gint group_idx,
gint minimum_height,
gint natural_height);
void gtk_cell_area_box_iter_push_group_width_for_height (GtkCellAreaBoxIter *box_iter,
gint group_idx,
gint for_height,
gint minimum_width,
gint natural_width);
/* Fetch cell-group sizes */
void gtk_cell_area_box_iter_get_group_width (GtkCellAreaBoxIter *box_iter,
gint group_idx,
gint *minimum_width,
gint *natural_width);
void gtk_cell_area_box_iter_get_group_height_for_width (GtkCellAreaBoxIter *box_iter,
gint group_idx,
gint for_width,
gint *minimum_height,
gint *natural_height);
void gtk_cell_area_box_iter_get_group_height (GtkCellAreaBoxIter *box_iter,
gint group_idx,
gint *minimum_height,
gint *natural_height);
void gtk_cell_area_box_iter_get_group_width_for_height (GtkCellAreaBoxIter *box_iter,
gint group_idx,
gint for_height,
gint *minimum_width,
gint *natural_width);
GtkRequestedSize *gtk_cell_area_box_iter_get_widths (GtkCellAreaBoxIter *box_iter,
gint *n_widths);
GtkRequestedSize *gtk_cell_area_box_iter_get_heights (GtkCellAreaBoxIter *box_iter,
gint *n_heights);
/* Private iter/area interaction */
typedef struct {
gint group_idx; /* Groups containing only invisible cells are not allocated */
gint position; /* Relative group allocation position in the orientation of the box */
gint size; /* Full allocated size of the cells in this group spacing inclusive */
} GtkCellAreaBoxAllocation;
G_CONST_RETURN GtkCellAreaBoxAllocation *
gtk_cell_area_box_iter_get_orientation_allocs (GtkCellAreaBoxIter *iter,
gint *n_allocs);
G_END_DECLS
#endif /* __GTK_CELL_AREA_BOX_ITER_H__ */