Commit 9bfd8ea7 authored by Christian Persch's avatar Christian Persch

Remove gucharmap-types.h again.

svn path=/trunk/; revision=1720
parent d42e807d
......@@ -94,7 +94,6 @@ libgucharmapinclude_HEADERS = \
gucharmap.h \
gucharmap-script-chapters-model.h \
gucharmap-script-codepoint-list.h \
gucharmap-types.h \
gucharmap-unicode-info.h \
$(NULL)
......
......@@ -19,10 +19,12 @@
#include <config.h>
#include <glib/gi18n-lib.h>
#include "gucharmap-block-chapters-model.h"
#include "unicode-blocks.h"
#include "gucharmap.h"
#include "gucharmap-private.h"
#include "unicode-blocks.h"
enum
{
BLOCK_CHAPTERS_MODEL_ID = 0,
......@@ -84,12 +86,15 @@ get_codepoint_list (GucharmapChaptersModel *chapters,
}
static G_CONST_RETURN GucharmapCodepointList *
get_book_codepoint_list (GucharmapChaptersModel *chapters)
get_book_codepoint_list (GucharmapChaptersModel *model)
{
if (chapters->book_list == NULL)
chapters->book_list = gucharmap_codepoint_list_new (0, UNICHAR_MAX);
GucharmapChaptersModelPrivate *model_priv = model->priv;
if (model_priv->book_list == NULL) {
model_priv->book_list = gucharmap_codepoint_list_new (0, UNICHAR_MAX);
}
return chapters->book_list;
return model_priv->book_list;
}
/* XXX linear search */
......
......@@ -26,7 +26,6 @@
#ifndef GUCHARMAP_BLOCK_CHAPTERS_MODEL_H
#define GUCHARMAP_BLOCK_CHAPTERS_MODEL_H
#include <gucharmap/gucharmap-types.h>
#include <gucharmap/gucharmap-chapters-model.h>
G_BEGIN_DECLS
......@@ -38,6 +37,19 @@ G_BEGIN_DECLS
#define GUCHARMAP_IS_BLOCK_CHAPTERS_MODEL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GUCHARMAP_TYPE_BLOCK_CHAPTERS_MODEL))
#define GUCHARMAP_BLOCK_CHAPTERS_MODEL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GUCHARMAP_TYPE_BLOCK_CHAPTERS_MODEL, GucharmapBlockChaptersModelClass))
typedef struct _GucharmapBlockChaptersModel GucharmapBlockChaptersModel;
typedef struct _GucharmapBlockChaptersModelClass GucharmapBlockChaptersModelClass;
struct _GucharmapBlockChaptersModel
{
GucharmapChaptersModel parent;
};
struct _GucharmapBlockChaptersModelClass
{
GucharmapChaptersModelClass parent_class;
};
GType gucharmap_block_chapters_model_get_type (void);
GucharmapChaptersModel* gucharmap_block_chapters_model_new (void);
......
......@@ -21,9 +21,9 @@
#include <string.h>
#include "gucharmap-chapters-model.h"
#include "gucharmap-marshal.h"
#include "gucharmap.h"
#include "gucharmap-private.h"
#include "gucharmap-marshal.h"
G_DEFINE_TYPE (GucharmapChaptersModel, gucharmap_chapters_model, GTK_TYPE_LIST_STORE)
......@@ -35,29 +35,33 @@ default_get_codepoint_list (GucharmapChaptersModel *chapters,
}
static void
gucharmap_chapters_model_init (GucharmapChaptersModel *chapters)
gucharmap_chapters_model_init (GucharmapChaptersModel *model)
{
model->priv = G_TYPE_INSTANCE_GET_PRIVATE (model, GUCHARMAP_TYPE_CHAPTERS_MODEL, GucharmapChaptersModelPrivate);
}
static void
gucharmap_chapters_model_finalize (GObject *object)
{
GucharmapChaptersModel *chapters = GUCHARMAP_CHAPTERS_MODEL (object);
GucharmapChaptersModel *model = GUCHARMAP_CHAPTERS_MODEL (object);
GucharmapChaptersModelPrivate *priv = model->priv;
if (chapters->book_list)
g_object_unref (chapters->book_list);
if (priv->book_list)
g_object_unref (priv->book_list);
G_OBJECT_CLASS (gucharmap_chapters_model_parent_class)->finalize (object);
}
static void
gucharmap_chapters_model_class_init (GucharmapChaptersModelClass *clazz)
gucharmap_chapters_model_class_init (GucharmapChaptersModelClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (clazz);
GObjectClass *object_class = G_OBJECT_CLASS (klass);
g_type_class_add_private (object_class, sizeof (GucharmapChaptersModelPrivate));
object_class->finalize = gucharmap_chapters_model_finalize;
clazz->get_codepoint_list = default_get_codepoint_list;
klass->get_codepoint_list = default_get_codepoint_list;
}
/**
......
......@@ -25,7 +25,7 @@
#define GUCHARMAP_CHAPTERS_MODEL_H
#include <gtk/gtkliststore.h>
#include <gucharmap/gucharmap-types.h>
#include <gucharmap/gucharmap-codepoint-list.h>
G_BEGIN_DECLS
......@@ -34,11 +34,37 @@ G_BEGIN_DECLS
#define GUCHARMAP_TYPE_CHAPTERS_MODEL (gucharmap_chapters_model_get_type ())
#define GUCHARMAP_CHAPTERS_MODEL(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GUCHARMAP_TYPE_CHAPTERS_MODEL, GucharmapChaptersModel))
#define GUCHARMAP_CHAPTERS_MODEL_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GUCHARMAP_TYPE_CHAPTERS_MODEL, GucharmapChaptersModelClass))
#define GUCHARMAP_CHAPTERS_MODEL_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GUCHARMAP_TYPE_CHAPTERS_MODEL, GucharmapChaptersModelClass))
#define GUCHARMAP_IS_CHAPTERS_MODEL(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GUCHARMAP_TYPE_CHAPTERS_MODEL))
#define GUCHARMAP_IS_CHAPTERS_MODEL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GUCHARMAP_TYPE_CHAPTERS_MODEL))
#define GUCHARMAP_CHAPTERS_MODEL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GUCHARMAP_TYPE_CHAPTERS_MODEL, GucharmapChaptersModelClass))
typedef struct _GucharmapChaptersModel GucharmapChaptersModel;
typedef struct _GucharmapChaptersModelPrivate GucharmapChaptersModelPrivate;
typedef struct _GucharmapChaptersModelClass GucharmapChaptersModelClass;
struct _GucharmapChaptersModel
{
GtkListStore parent_instance;
/*< protected >*/
GucharmapChaptersModelPrivate *priv;
};
struct _GucharmapChaptersModelClass
{
GtkListStoreClass parent_class;
const char *title;
gboolean (* character_to_iter) (GucharmapChaptersModel *chapters,
gunichar wc,
GtkTreeIter *iter);
GucharmapCodepointList * (* get_codepoint_list) (GucharmapChaptersModel *chapters,
GtkTreeIter *iter);
G_CONST_RETURN GucharmapCodepointList * (* get_book_codepoint_list) (GucharmapChaptersModel *chapters);
};
typedef enum
{
GUCHARMAP_CHAPTERS_SCRIPT = 0,
......
......@@ -19,9 +19,10 @@
#include <config.h>
#include <string.h>
#include <gtk/gtk.h>
#include "gucharmap-unicode-info.h"
#include "gucharmap-chapters-view.h"
#include "gucharmap.h"
#include "gucharmap-private.h"
#include "unicode-blocks.h"
struct _GucharmapChaptersViewPrivate {
......
......@@ -26,7 +26,7 @@
#define GUCHARMAP_CHAPTERS_VIEW_H
#include <gtk/gtktreeview.h>
#include <gucharmap/gucharmap-types.h>
#include <gucharmap/gucharmap-chapters-model.h>
G_BEGIN_DECLS
......
......@@ -24,10 +24,10 @@
#define GUCHARMAP_CHARMAP_H
#include <gtk/gtk.h>
#include <gucharmap/gucharmap-types.h>
#include <gucharmap/gucharmap-chartable.h>
#include <gucharmap/gucharmap-chapters-model.h>
#include <gucharmap/gucharmap-chapters-view.h>
#include <gucharmap/gucharmap-chartable.h>
G_BEGIN_DECLS
......
......@@ -22,7 +22,7 @@
#define GUCHARMAP_CHARTABLE_ACCESSIBLE_H
#include <gtk/gtkaccessible.h>
#include <gucharmap/gucharmap-types.h>
#include "gucharmap-chartable.h"
G_BEGIN_DECLS
......
......@@ -21,7 +21,8 @@
#define GUCHARMAP_CHARTABLE_CELL_ACCESSIBLE_H
#include <atk/atk.h>
#include <gucharmap/gucharmap-types.h>
#include "gucharmap-chartable.h"
G_BEGIN_DECLS
......@@ -35,6 +36,22 @@ G_BEGIN_DECLS
typedef struct _GucharmapChartableCellAccessible GucharmapChartableCellAccessible;
typedef struct _GucharmapChartableCellAccessibleClass GucharmapChartableCellAccessibleClass;
struct _GucharmapChartableCellAccessible
{
AtkObject parent;
GtkWidget *widget;
int index;
AtkStateSet *state_set;
gchar *activate_description;
guint action_idle_handler;
};
struct _GucharmapChartableCellAccessibleClass
{
AtkObjectClass parent_class;
};
GType gucharmap_chartable_cell_accessible_get_type (void);
AtkObject* gucharmap_chartable_cell_accessible_new (void);
......
......@@ -25,7 +25,7 @@
#define GUCHARMAP_CHARTABLE_H
#include <gtk/gtkdrawingarea.h>
#include <gucharmap/gucharmap-types.h>
#include <gucharmap/gucharmap-codepoint-list.h>
G_BEGIN_DECLS
......
......@@ -18,7 +18,8 @@
#include <config.h>
#include <glib.h>
#include "gucharmap-codepoint-list.h"
#include "gucharmap.h"
#include "gucharmap-private.h"
typedef struct _DefaultCodepointListPrivate DefaultCodepointListPrivate;
......
......@@ -24,7 +24,6 @@
#define GUCHARMAP_CODEPOINT_LIST_H
#include <glib-object.h>
#include <gucharmap/gucharmap-types.h>
G_BEGIN_DECLS
......@@ -35,8 +34,8 @@ G_BEGIN_DECLS
#define GUCHARMAP_IS_CODEPOINT_LIST_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GUCHARMAP_TYPE_CODEPOINT_LIST))
#define GUCHARMAP_CODEPOINT_LIST_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GUCHARMAP_TYPE_CODEPOINT_LIST, GucharmapCodepointListClass))
typedef struct _GucharmapScriptCodepointList GucharmapScriptCodepointList;
typedef struct _GucharmapScriptCodepointListClass GucharmapScriptCodepointListClass;
typedef struct _GucharmapCodepointList GucharmapCodepointList;
typedef struct _GucharmapCodepointListClass GucharmapCodepointListClass;
struct _GucharmapCodepointList
{
......
......@@ -20,6 +20,7 @@
#include <glib/gi18n-lib.h>
#include "gucharmap.h"
#include "gucharmap-private.h"
G_GNUC_INTERNAL void
......
......@@ -20,6 +20,7 @@
#define GUCHARMAP_PRINT_OPERATION_H
#include <gtk/gtkprintoperation.h>
#include <gucharmap/gucharmap.h>
G_BEGIN_DECLS
......
......@@ -19,9 +19,6 @@
#include <gtk/gtk.h>
#include "gucharmap.h"
#include "gucharmap-types.h"
#define I_(string) g_intern_static_string (string)
/* The last unicode character we support */
......@@ -32,39 +29,10 @@ G_GNUC_INTERNAL void _gucharmap_intl_ensure_initialized (void);
G_GNUC_INTERNAL gboolean _gucharmap_unicode_has_nameslist_entry (gunichar uc);
struct _GucharmapChaptersModel
{
GtkListStore parent_instance;
/*< protected >*/
struct _GucharmapChaptersModelPrivate {
GucharmapCodepointList *book_list;
};
struct _GucharmapChaptersModelClass
{
GtkListStoreClass parent_class;
const char *title;
gboolean (* character_to_iter) (GucharmapChaptersModel *chapters,
gunichar wc,
GtkTreeIter *iter);
GucharmapCodepointList * (* get_codepoint_list) (GucharmapChaptersModel *chapters,
GtkTreeIter *iter);
G_CONST_RETURN GucharmapCodepointList * (* get_book_codepoint_list) (GucharmapChaptersModel *chapters);
};
struct _GucharmapBlockChaptersModel
{
GucharmapChaptersModel parent;
};
struct _GucharmapBlockChaptersModelClass
{
GucharmapChaptersModelClass parent_class;
};
struct _GucharmapChartablePrivate {
/* scrollable implementation */
GtkAdjustment *vadjustment;
......@@ -112,24 +80,6 @@ struct _GucharmapChartablePrivate {
guint zoom_mode_enabled : 1;
};
struct _GucharmapChartableCellAccessible
{
AtkObject parent;
GtkWidget *widget;
int index;
AtkStateSet *state_set;
gchar *activate_description;
guint action_idle_handler;
};
struct _GucharmapChartableCellAccessibleClass
{
AtkObjectClass parent_class;
};
gint _gucharmap_chartable_cell_column (GucharmapChartable *chartable,
guint cell);
gint _gucharmap_chartable_column_width (GucharmapChartable *chartable,
......@@ -142,38 +92,3 @@ gint _gucharmap_chartable_y_offset (GucharmapChartable *chartable,
gint row);
void _gucharmap_chartable_redraw (GucharmapChartable *chartable,
gboolean move_zoom);
struct _GucharmapScriptChaptersModel
{
GucharmapChaptersModel parent;
};
struct _GucharmapScriptChaptersModelClass
{
GucharmapChaptersModelClass parent_class;
};
struct _GucharmapScriptCodepointList
{
GucharmapCodepointList parent;
};
struct _GucharmapScriptCodepointListClass
{
GucharmapCodepointListClass parent_class;
};
struct _GucharmapFontCodepointList
{
GucharmapCodepointList parent;
PangoCoverage *coverage;
};
struct _GucharmapFontCodepointListClass
{
GucharmapCodepointListClass parent_class;
};
......@@ -23,9 +23,8 @@
#include <gtk/gtk.h>
#include <stdlib.h>
#include <string.h>
#include "gucharmap-unicode-info.h"
#include "gucharmap-script-chapters-model.h"
#include "gucharmap-script-codepoint-list.h"
#include "gucharmap.h"
#include "gucharmap-private.h"
static void
......@@ -97,15 +96,17 @@ append_script (GtkTreeModel *model,
static G_CONST_RETURN GucharmapCodepointList *
get_book_codepoint_list (GucharmapChaptersModel *chapters)
{
if (chapters->book_list == NULL)
GucharmapChaptersModelPrivate *priv = chapters->priv;
if (priv->book_list == NULL)
{
GtkTreeModel *model = GTK_TREE_MODEL (chapters);
chapters->book_list = gucharmap_script_codepoint_list_new ();
gtk_tree_model_foreach (model, (GtkTreeModelForeachFunc) append_script, chapters->book_list);
priv->book_list = gucharmap_script_codepoint_list_new ();
gtk_tree_model_foreach (model, (GtkTreeModelForeachFunc) append_script, priv->book_list);
}
return chapters->book_list;
return priv->book_list;
}
static gboolean
......
......@@ -24,7 +24,6 @@
#ifndef GUCHARMAP_SCRIPT_CHAPTERS_MODEL_H
#define GUCHARMAP_SCRIPT_CHAPTERS_MODEL_H
#include <gucharmap/gucharmap-types.h>
#include <gucharmap/gucharmap-chapters-model.h>
G_BEGIN_DECLS
......@@ -36,6 +35,19 @@ G_BEGIN_DECLS
#define GUCHARMAP_IS_SCRIPT_CHAPTERS_MODEL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GUCHARMAP_TYPE_SCRIPT_CHAPTERS_MODEL))
#define GUCHARMAP_SCRIPT_CHAPTERS_MODEL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GUCHARMAP_TYPE_SCRIPT_CHAPTERS_MODEL, GucharmapScriptChaptersModelClass))
typedef struct _GucharmapScriptChaptersModel GucharmapScriptChaptersModel;
typedef struct _GucharmapScriptChaptersModelClass GucharmapScriptChaptersModelClass;
struct _GucharmapScriptChaptersModel
{
GucharmapChaptersModel parent;
};
struct _GucharmapScriptChaptersModelClass
{
GucharmapChaptersModelClass parent_class;
};
GType gucharmap_script_chapters_model_get_type (void);
GucharmapChaptersModel* gucharmap_script_chapters_model_new (void);
......
......@@ -19,8 +19,10 @@
#include <config.h>
#include <glib.h>
#include <string.h>
#include "gucharmap-script-codepoint-list.h"
#include "gucharmap.h"
#include "gucharmap-private.h"
#include "unicode-scripts.h"
typedef struct
......
......@@ -25,9 +25,8 @@
#include <glib-object.h>
#include <glib.h>
#include <gucharmap/gucharmap-types.h>
#include <gucharmap/gucharmap-codepoint-list.h>
#include <gucharmap/gucharmap-unicode-info.h>
G_BEGIN_DECLS
......@@ -38,6 +37,19 @@ G_BEGIN_DECLS
#define GUCHARMAP_IS_SCRIPT_CODEPOINT_LIST_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GUCHARMAP_TYPE_SCRIPT_CODEPOINT_LIST))
#define GUCHARMAP_SCRIPT_CODEPOINT_LIST_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GUCHARMAP_TYPE_SCRIPT_CODEPOINT_LIST, GucharmapScriptCodepointListClass))
typedef struct _GucharmapScriptCodepointList GucharmapScriptCodepointList;
typedef struct _GucharmapScriptCodepointListClass GucharmapScriptCodepointListClass;
struct _GucharmapScriptCodepointList
{
GucharmapCodepointList parent;
};
struct _GucharmapScriptCodepointListClass
{
GucharmapCodepointListClass parent_class;
};
GType gucharmap_script_codepoint_list_get_type (void);
GucharmapCodepointList * gucharmap_script_codepoint_list_new (void);
gboolean gucharmap_script_codepoint_list_set_script (GucharmapScriptCodepointList *list,
......
/*
* Copyright © 2004 Noah Levitt
* Copyright © 2007 Christian Persch
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program 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
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place, Suite 330, Boston, MA 02110-1301 USA
*/
#if !defined (__GUCHARMAP_GUCHARMAP_H_INSIDE__) && !defined (GUCHARMAP_COMPILATION)
#error "Only <gucharmap/gucharmap.h> can be included directly."
#endif
#ifndef GUCHARMAP_TYPES_H
#define GUCHARMAP_TYPES_H
typedef struct _GucharmapScriptChaptersModel GucharmapScriptChaptersModel;
typedef struct _GucharmapScriptChaptersModelClass GucharmapScriptChaptersModelClass;
typedef struct _GucharmapCodepointList GucharmapCodepointList;
typedef struct _GucharmapCodepointListClass GucharmapCodepointListClass;
typedef struct _GucharmapChaptersModel GucharmapChaptersModel;
typedef struct _GucharmapChaptersModelClass GucharmapChaptersModelClass;
typedef struct _GucharmapBlockChaptersModel GucharmapBlockChaptersModel;
typedef struct _GucharmapBlockChaptersModelClass GucharmapBlockChaptersModelClass;
#endif /* GUCHARMAP_TYPES_H */
......@@ -20,7 +20,8 @@
#include <gtk/gtk.h>
#include <string.h>
#include "gucharmap-unicode-info.h"
#include "gucharmap.h"
#include "gucharmap-private.h"
#include "unicode-names.h"
......
......@@ -31,8 +31,6 @@
(GUCHARMAP_VERSION_MAJOR == (major) && GUCHARMAP_VERSION_MINOR > (minor)) || \
(GUCHARMAP_VERSION_MAJOR == (major) && GUCHARMAP_VERSION_MINOR == (minor) && GUCHARMAP_VERSION_MICRO >= (micro)))
#include <gucharmap/gucharmap-types.h>
#include <gucharmap/gucharmap-block-chapters-model.h>
#include <gucharmap/gucharmap-chapters-model.h>
#include <gucharmap/gucharmap-charmap.h>
......@@ -40,8 +38,8 @@
#include <gucharmap/gucharmap-codepoint-list.h>
#include <gucharmap/gucharmap-script-chapters-model.h>
#include <gucharmap/gucharmap-script-codepoint-list.h>
#include <gucharmap/gucharmap-unicode-info.h>
#include <gucharmap/gucharmap-type-builtins.h>
#include <gucharmap/gucharmap-unicode-info.h>
#undef __GUCHARMAP_GUCHARMAP_H_INSIDE__
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment