Blame gladeui/glade-property-class.h

Packit 1e8aac
#ifndef __GLADE_PROPERTY_CLASS_H__
Packit 1e8aac
#define __GLADE_PROPERTY_CLASS_H__
Packit 1e8aac
Packit 1e8aac
#include <glib.h>
Packit 1e8aac
#include <glib-object.h>
Packit 1e8aac
#include <gtk/gtk.h>
Packit 1e8aac
Packit 1e8aac
#include <gladeui/glade-xml-utils.h>
Packit 1e8aac
Packit 1e8aac
G_BEGIN_DECLS
Packit 1e8aac
Packit 1e8aac
/* The GladePropertyClass structure parameters of a GladeProperty.
Packit 1e8aac
 * All entries in the GladeEditor are GladeProperties (except signals)
Packit 1e8aac
 * All GladeProperties are associated with a GParamSpec.
Packit 1e8aac
 */
Packit 1e8aac
#define GLADE_PROPERTY_CLASS(gpc)     ((GladePropertyClass *) gpc)
Packit 1e8aac
#define GLADE_IS_PROPERTY_CLASS(gpc)  (gpc != NULL)
Packit 1e8aac
Packit 1e8aac
Packit 1e8aac
/**
Packit 1e8aac
 * GLADE_PROPERTY_CLASS_IS_TYPE:
Packit 1e8aac
 * gpc: A #GladePropertyClass
Packit 1e8aac
 * type: The #GladeEditorPageType to query
Packit 1e8aac
 *
Packit 1e8aac
 * Checks if @gpc is good to be loaded as @type
Packit 1e8aac
 */
Packit 1e8aac
#define GLADE_PROPERTY_CLASS_IS_TYPE(gpc, type)				\
Packit 1e8aac
  (((type) == GLADE_PAGE_GENERAL &&					\
Packit 1e8aac
    !glade_property_class_common (gpc) &&				\
Packit 1e8aac
    !glade_property_class_get_is_packing (gpc) &&			\
Packit 1e8aac
    !glade_property_class_atk (gpc)) ||					\
Packit 1e8aac
   ((type) == GLADE_PAGE_COMMON  && glade_property_class_common (gpc))    || \
Packit 1e8aac
   ((type) == GLADE_PAGE_PACKING && glade_property_class_get_is_packing (gpc))   || \
Packit 1e8aac
   ((type) == GLADE_PAGE_ATK     && glade_property_class_atk (gpc))       || \
Packit 1e8aac
   ((type) == GLADE_PAGE_QUERY   && glade_property_class_query (gpc)))
Packit 1e8aac
Packit 1e8aac
/**
Packit 1e8aac
 * GPC_VERSION_CHECK:
Packit 1e8aac
 * @klass: A #GladePropertyClass
Packit 1e8aac
 * @major_version: The major version to check
Packit 1e8aac
 * @minor_version: The minor version to check
Packit 1e8aac
 *
Packit 1e8aac
 * Evaluates to %TRUE if @klass is available in its owning library version-@major_verion.@minor_version.
Packit 1e8aac
 *
Packit 1e8aac
 */
Packit 1e8aac
#define GPC_VERSION_CHECK(klass, major_version, minor_version)		\
Packit 1e8aac
  ((glade_property_class_since_major (GLADE_PROPERTY_CLASS (klass)) == major_version) ? \
Packit 1e8aac
   (glade_property_class_since_minor (GLADE_PROPERTY_CLASS (klass)) <= minor_version) : \
Packit 1e8aac
   (glade_property_class_since_major (GLADE_PROPERTY_CLASS (klass)) <= major_version))
Packit 1e8aac
Packit 1e8aac
Packit 1e8aac
#define GPC_OBJECT_DELIMITER ", "
Packit 1e8aac
#define GPC_PROPERTY_NAMELEN 512  /* Enough space for a property name I think */
Packit 1e8aac
Packit 1e8aac
typedef struct _GladePropertyClass GladePropertyClass;
Packit 1e8aac
Packit 1e8aac
Packit 1e8aac
GladePropertyClass   *glade_property_class_new                     (GladeWidgetAdaptor  *adaptor,
Packit 1e8aac
								    const gchar         *id);
Packit 1e8aac
GladePropertyClass   *glade_property_class_new_from_spec           (GladeWidgetAdaptor  *adaptor,
Packit 1e8aac
								    GParamSpec          *spec);
Packit 1e8aac
GladePropertyClass   *glade_property_class_new_from_spec_full      (GladeWidgetAdaptor  *adaptor,
Packit 1e8aac
								    GParamSpec          *spec,
Packit 1e8aac
								    gboolean             need_handle);
Packit 1e8aac
GladePropertyClass   *glade_property_class_clone                   (GladePropertyClass  *property_class,
Packit 1e8aac
								    gboolean             reset_version);
Packit 1e8aac
void                  glade_property_class_free                    (GladePropertyClass  *property_class);
Packit 1e8aac
Packit 1e8aac
void                  glade_property_class_set_adaptor             (GladePropertyClass  *property_class,
Packit 1e8aac
								    GladeWidgetAdaptor  *adaptor);
Packit 1e8aac
GladeWidgetAdaptor   *glade_property_class_get_adaptor             (GladePropertyClass  *property_class);
Packit 1e8aac
void                  glade_property_class_set_pspec               (GladePropertyClass  *property_class,
Packit 1e8aac
								    GParamSpec          *pspec);
Packit 1e8aac
GParamSpec           *glade_property_class_get_pspec               (GladePropertyClass  *property_class);
Packit 1e8aac
void                  glade_property_class_set_is_packing          (GladePropertyClass  *property_class,
Packit 1e8aac
								    gboolean             is_packing);
Packit 1e8aac
gboolean              glade_property_class_get_is_packing          (GladePropertyClass  *property_class);
Packit 1e8aac
gboolean              glade_property_class_save                    (GladePropertyClass  *property_class);
Packit 1e8aac
gboolean              glade_property_class_save_always             (GladePropertyClass  *property_class);
Packit 1e8aac
gboolean              glade_property_class_is_visible              (GladePropertyClass  *property_class);
Packit 1e8aac
gboolean              glade_property_class_is_object               (GladePropertyClass  *property_class);
Packit 1e8aac
void                  glade_property_class_set_virtual             (GladePropertyClass  *property_class,
Packit 1e8aac
								    gboolean             value);
Packit 1e8aac
gboolean              glade_property_class_get_virtual             (GladePropertyClass  *property_class);
Packit 1e8aac
void                  glade_property_class_set_ignore              (GladePropertyClass  *property_class,
Packit 1e8aac
								    gboolean             ignore);
Packit 1e8aac
gboolean              glade_property_class_get_ignore              (GladePropertyClass  *property_class);
Packit 1e8aac
void                  glade_property_class_set_name                (GladePropertyClass  *property_class,
Packit 1e8aac
								    const gchar         *name);
Packit 1e8aac
G_CONST_RETURN gchar *glade_property_class_get_name                (GladePropertyClass  *property_class);
Packit 1e8aac
void                  glade_property_class_set_tooltip             (GladePropertyClass  *property_class,
Packit 1e8aac
								    const gchar         *tooltip);
Packit 1e8aac
G_CONST_RETURN gchar *glade_property_class_get_tooltip             (GladePropertyClass  *property_class);
Packit 1e8aac
G_CONST_RETURN gchar *glade_property_class_id                      (GladePropertyClass  *property_class);
Packit 1e8aac
gboolean              glade_property_class_themed_icon             (GladePropertyClass  *property_class);
Packit 1e8aac
void                  glade_property_class_set_construct_only      (GladePropertyClass  *property_class,
Packit 1e8aac
								    gboolean             construct_only);
Packit 1e8aac
gboolean              glade_property_class_get_construct_only      (GladePropertyClass  *property_class);
Packit 1e8aac
G_CONST_RETURN GValue *glade_property_class_get_default            (GladePropertyClass  *property_class);
Packit 1e8aac
G_CONST_RETURN GValue *glade_property_class_get_original_default   (GladePropertyClass  *property_class);
Packit 1e8aac
gboolean              glade_property_class_translatable            (GladePropertyClass  *property_class);
Packit 1e8aac
gboolean              glade_property_class_needs_sync              (GladePropertyClass  *property_class);
Packit 1e8aac
Packit 1e8aac
gboolean              glade_property_class_query                   (GladePropertyClass  *property_class);
Packit 1e8aac
gboolean              glade_property_class_atk                     (GladePropertyClass  *property_class);
Packit 1e8aac
gboolean              glade_property_class_common                  (GladePropertyClass  *property_class);
Packit 1e8aac
gboolean              glade_property_class_parentless_widget       (GladePropertyClass  *property_class);
Packit 1e8aac
gboolean              glade_property_class_optional                (GladePropertyClass  *property_class);
Packit 1e8aac
gboolean              glade_property_class_optional_default        (GladePropertyClass  *property_class);
Packit 1e8aac
gboolean              glade_property_class_multiline               (GladePropertyClass  *property_class);
Packit 1e8aac
gboolean              glade_property_class_stock                   (GladePropertyClass  *property_class);
Packit 1e8aac
gboolean              glade_property_class_stock_icon              (GladePropertyClass  *property_class);
Packit 1e8aac
gboolean              glade_property_class_transfer_on_paste       (GladePropertyClass  *property_class);
Packit 1e8aac
gboolean              glade_property_class_custom_layout           (GladePropertyClass  *property_class);
Packit 1e8aac
gdouble               glade_property_class_weight                  (GladePropertyClass  *property_class);
Packit 1e8aac
Packit 1e8aac
G_CONST_RETURN gchar *glade_property_class_create_type             (GladePropertyClass  *property_class);
Packit 1e8aac
Packit 1e8aac
guint16               glade_property_class_since_major             (GladePropertyClass  *property_class);
Packit 1e8aac
guint16               glade_property_class_since_minor             (GladePropertyClass  *property_class);
Packit 1e8aac
gboolean              glade_property_class_deprecated              (GladePropertyClass  *property_class);
Packit 1e8aac
Packit 1e8aac
GValue             *glade_property_class_make_gvalue_from_string (GladePropertyClass  *property_class,
Packit 1e8aac
								  const gchar         *string,
Packit 1e8aac
								  GladeProject        *project);
Packit 1e8aac
Packit 1e8aac
gchar              *glade_property_class_make_string_from_gvalue (GladePropertyClass  *property_class,
Packit 1e8aac
								  const GValue        *value);
Packit 1e8aac
Packit 1e8aac
GValue             *glade_property_class_make_gvalue_from_vl     (GladePropertyClass  *property_class,
Packit 1e8aac
								  va_list              vl);
Packit 1e8aac
Packit 1e8aac
void                glade_property_class_set_vl_from_gvalue      (GladePropertyClass  *klass,
Packit 1e8aac
								  GValue              *value,
Packit 1e8aac
								  va_list              vl);
Packit 1e8aac
Packit 1e8aac
GValue             *glade_property_class_make_gvalue             (GladePropertyClass  *klass,
Packit 1e8aac
								  ...);
Packit 1e8aac
Packit 1e8aac
void                glade_property_class_get_from_gvalue         (GladePropertyClass  *klass,
Packit 1e8aac
								  GValue              *value,
Packit 1e8aac
								  ...);
Packit 1e8aac
Packit 1e8aac
gboolean            glade_property_class_update_from_node        (GladeXmlNode        *node,
Packit 1e8aac
								  GType                object_type,
Packit 1e8aac
								  GladePropertyClass **property_class,
Packit 1e8aac
								  const gchar         *domain);
Packit 1e8aac
Packit 1e8aac
GtkAdjustment      *glade_property_class_make_adjustment         (GladePropertyClass *property_class);
Packit 1e8aac
Packit 1e8aac
gboolean            glade_property_class_match                   (GladePropertyClass *klass,
Packit 1e8aac
								  GladePropertyClass *comp);
Packit 1e8aac
Packit 1e8aac
gboolean            glade_property_class_void_value              (GladePropertyClass *klass,
Packit 1e8aac
								  GValue             *value);
Packit 1e8aac
Packit 1e8aac
gint                glade_property_class_compare                 (GladePropertyClass *klass,
Packit 1e8aac
								  const GValue       *value1,
Packit 1e8aac
								  const GValue       *value2);
Packit 1e8aac
Packit 1e8aac
GValue             *glade_property_class_get_default_from_spec   (GParamSpec *spec);
Packit 1e8aac
Packit 1e8aac
void                glade_property_class_set_weights             (GList **properties, GType parent);
Packit 1e8aac
Packit 1e8aac
void                glade_property_class_load_defaults_from_spec (GladePropertyClass *property_class);
Packit 1e8aac
Packit 1e8aac
G_END_DECLS
Packit 1e8aac
Packit 1e8aac
#endif /* __GLADE_PROPERTY_CLASS_H__ */