grim/guifications3

moved gflib-gtk to the new cmake module
cmake
2010-12-15, Gary Kramlich
b6418db658c1
moved gflib-gtk to the new cmake module
/*
* Guifications - The end-all, be-all notification framework
* Copyright (C) 2003-2009 Gary Kramlich <grim@reaperworld.com>
*
* 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 3 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, see <http://www.gnu.org/licenses/>.
*/
#ifndef GF_TYPE_H
#define GF_TYPE_H
#include <glib.h>
#include <glib-object.h>
#define GF_TYPE_TYPE_QUERY_CONTEXT (gf_type_query_context_get_type())
#define GF_TYPE_QUERY_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GF_TYPE_TYPE_QUERY_CONTEXT, GfTypeQueryContext))
#define GF_TYPE_QUERY_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GF_TYPE_TYPE_QUERY_CONTEXT, GfTypeQueryContextClass))
#define GF_IS_TYPE_QUERY_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GF_TYPE_TYPE_QUERY_CONTEXT))
#define GF_IS_TYPE_QUERY_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GF_TYPE_TYPE_QUERY_CONTEXT))
#define GF_TYPE_QUERY_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GF_TYPE_TYPE_QUERY_CONTEXT, GfTypeQueryContextClass))
typedef struct _GfTypeQueryContext GfTypeQueryContext;
typedef struct _GfTypeQueryContextClass GfTypeQueryContextClass;
typedef struct _GfTypeQuery GfTypeQuery;
/**
* GfTypeQueryContext:
*
* A class that allows digging through the types in the type system.
*/
struct _GfTypeQueryContext {
/*< private >*/
GObject parent;
};
struct _GfTypeQueryContextClass {
GObjectClass parent;
void (*query)(GfTypeQueryContext *ctx, GType type);
void (*_gf_reserved_1)(void);
void (*_gf_reserved_2)(void);
void (*_gf_reserved_3)(void);
void (*_gf_reserved_4)(void);
};
/**
* GfTypeQuery:
* @start_object: A function to call when an object is first reached.
* @end_object: A function to call when finished with an object.
* @param: A function thats called when a param is reached.
* @signal: A function to call when a signal is found.
*
* A simple structure for functions to call during a call to
* #gf_type_query_context_query.
*/
struct _GfTypeQuery {
void (*start_object)(GfTypeQueryContext *ctx, const GTypeQuery *query, gpointer data);
void (*end_object)(GfTypeQueryContext *ctx, const GTypeQuery *query, gpointer data);
void (*param)(GfTypeQueryContext *ctx, const GParamSpec *pspec, gpointer data);
void (*signal)(GfTypeQueryContext *ctx, const GSignalQuery *query, gpointer data);
};
G_BEGIN_DECLS
GType gf_type_query_context_get_type(void);
GfTypeQueryContext *gf_type_query_context_new(GfTypeQuery *query, gboolean recursive, gpointer data, GDestroyNotify destroy_notify);
void gf_type_query_context_run(GfTypeQueryContext *ctx, GType type);
GfTypeQuery *gf_type_query_context_get_query(const GfTypeQueryContext *ctx);
gboolean gf_type_query_context_is_recursive(const GfTypeQueryContext *ctx);
void gf_type_query_context_set_recursive(GfTypeQueryContext *ctx, gboolean recursive);
gpointer gf_type_query_context_get_user_data(const GfTypeQueryContext *ctx);
GDestroyNotify gf_type_query_context_get_destroy_notify(const GfTypeQueryContext *ctx);
GType *gf_type_children(GType type, guint *n_children);
GType *gf_type_concrete_children(GType type, guint *n_children);
GType *gf_type_interface_implementors(GType type, guint *n_children);
G_END_DECLS
#endif /* GF_TYPE_H */