summaryrefslogtreecommitdiff
path: root/gobject
diff options
context:
space:
mode:
authorTim Janik <timj@gtk.org>2001-11-14 03:02:22 +0000
committerTim Janik <timj@src.gnome.org>2001-11-14 03:02:22 +0000
commit35bf561f5fb29e5053077986b4a7c3b00ea9b4b9 (patch)
tree3add72388d8f19bd5548cc1226ef6e8d2704e972 /gobject
parente5c99d932f79b11f35f0d604ef4ad8b4e4d0a7ba (diff)
add API for chaining: g_signal_chain_from_overridden() and
Tue Nov 13 23:18:10 2001 Tim Janik <timj@gtk.org> * gsignal.[hc]: add API for chaining: g_signal_chain_from_overridden() and g_signal_override_class_closure(), implementation yet to come. * gtype.[hc], Makefile.am: provide G_LOG_DOMAIN as compile flag. * gparam.[hc]: s/g_param_get/g_param_spec_get/ for get_nick, get_name and get_blurb, to be consistent with the rest of the g_param_spec_*() functions. * gparamspecs.[hc]: got rid of bogus GClosure paramspec. G_TYPE_CLOSURE is a boxed type already.
Diffstat (limited to 'gobject')
-rw-r--r--gobject/ChangeLog15
-rw-r--r--gobject/Makefile.am2
-rw-r--r--gobject/gboxed.h6
-rw-r--r--gobject/gclosure.h1
-rw-r--r--gobject/glib-genmarshal.c11
-rw-r--r--gobject/gparam.c6
-rw-r--r--gobject/gparam.h6
-rw-r--r--gobject/gparamspecs.c72
-rw-r--r--gobject/gparamspecs.h11
-rw-r--r--gobject/gsignal.c14
-rw-r--r--gobject/gsignal.h9
-rw-r--r--gobject/gtype.c4
-rw-r--r--gobject/gtype.h4
13 files changed, 52 insertions, 109 deletions
diff --git a/gobject/ChangeLog b/gobject/ChangeLog
index c1040e014..67d2d5743 100644
--- a/gobject/ChangeLog
+++ b/gobject/ChangeLog
@@ -1,3 +1,18 @@
+Tue Nov 13 23:18:10 2001 Tim Janik <timj@gtk.org>
+
+ * gsignal.[hc]: add API for chaining:
+ g_signal_chain_from_overridden() and g_signal_override_class_closure(),
+ implementation yet to come.
+
+ * gtype.[hc], Makefile.am: provide G_LOG_DOMAIN as compile flag.
+
+ * gparam.[hc]: s/g_param_get/g_param_spec_get/ for get_nick,
+ get_name and get_blurb, to be consistent with the rest of the
+ g_param_spec_*() functions.
+
+ * gparamspecs.[hc]: got rid of bogus GClosure paramspec.
+ G_TYPE_CLOSURE is a boxed type already.
+
Tue Nov 13 22:16:41 2001 Tim Janik <timj@gtk.org>
* gtype.[hc]: API cleanups.
diff --git a/gobject/Makefile.am b/gobject/Makefile.am
index 438d741c5..63bdccbc5 100644
--- a/gobject/Makefile.am
+++ b/gobject/Makefile.am
@@ -4,7 +4,7 @@
## Process this file with automake to produce Makefile.in
INCLUDES = @STRIP_BEGIN@ \
- -DG_LOG_DOMAIN=g_log_domain_gruntime \
+ -DG_LOG_DOMAIN=\"GLib-GObject\" \
-I$(top_srcdir) \
-I$(top_srcdir)/glib \
-I$(top_builddir) \
diff --git a/gobject/gboxed.h b/gobject/gboxed.h
index 5b9f63bc1..e29d95ac5 100644
--- a/gobject/gboxed.h
+++ b/gobject/gboxed.h
@@ -39,9 +39,9 @@ gpointer g_boxed_copy (GType boxed_type,
void g_boxed_free (GType boxed_type,
gpointer boxed);
void g_value_set_boxed (GValue *value,
- gconstpointer boxed);
+ gconstpointer v_boxed);
void g_value_set_static_boxed (GValue *value,
- gconstpointer boxed);
+ gconstpointer v_boxed);
gpointer g_value_get_boxed (const GValue *value);
gpointer g_value_dup_boxed (const GValue *value);
@@ -54,7 +54,7 @@ GType g_boxed_type_register_static (const gchar *name,
/* --- marshaller specific --- */
void g_value_set_boxed_take_ownership (GValue *value,
- gconstpointer boxed);
+ gconstpointer v_boxed);
diff --git a/gobject/gclosure.h b/gobject/gclosure.h
index dd9af6568..d188d0570 100644
--- a/gobject/gclosure.h
+++ b/gobject/gclosure.h
@@ -143,7 +143,6 @@ void g_closure_invoke (GClosure *closure,
const GValue *param_values,
gpointer invocation_hint);
-
/* FIXME:
OK: data_object::destroy -> closure_invalidate();
MIS: closure_invalidate() -> disconnect(closure);
diff --git a/gobject/glib-genmarshal.c b/gobject/glib-genmarshal.c
index 2b4996351..aad4b5c59 100644
--- a/gobject/glib-genmarshal.c
+++ b/gobject/glib-genmarshal.c
@@ -16,15 +16,10 @@
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
-#include "config.h"
-
-
-/* ok, this is a bit hackish, have to provide gruntime log domain as
- * we don't link against -lgruntime
- */
-char *g_log_domain_gruntime = "GLib-Genmarshal";
-
+#undef G_LOG_DOMAIN
+#define G_LOG_DOMAIN "GLib-Genmarshal"
#include <glib.h>
+#include "config.h"
#include <stdio.h>
#include <stdlib.h>
diff --git a/gobject/gparam.c b/gobject/gparam.c
index 18721eb3c..27ac03db9 100644
--- a/gobject/gparam.c
+++ b/gobject/gparam.c
@@ -235,7 +235,7 @@ g_param_spec_sink (GParamSpec *pspec)
}
G_CONST_RETURN gchar*
-g_param_get_name (GParamSpec *pspec)
+g_param_spec_get_name (GParamSpec *pspec)
{
g_return_val_if_fail (G_IS_PARAM_SPEC (pspec), NULL);
@@ -243,7 +243,7 @@ g_param_get_name (GParamSpec *pspec)
}
G_CONST_RETURN gchar*
-g_param_get_nick (GParamSpec *pspec)
+g_param_spec_get_nick (GParamSpec *pspec)
{
g_return_val_if_fail (G_IS_PARAM_SPEC (pspec), NULL);
@@ -251,7 +251,7 @@ g_param_get_nick (GParamSpec *pspec)
}
G_CONST_RETURN gchar*
-g_param_get_blurb (GParamSpec *pspec)
+g_param_spec_get_blurb (GParamSpec *pspec)
{
g_return_val_if_fail (G_IS_PARAM_SPEC (pspec), NULL);
diff --git a/gobject/gparam.h b/gobject/gparam.h
index 4ac8286e5..6ed1c00c9 100644
--- a/gobject/gparam.h
+++ b/gobject/gparam.h
@@ -131,9 +131,9 @@ gboolean g_param_value_convert (GParamSpec *pspec,
gint g_param_values_cmp (GParamSpec *pspec,
const GValue *value1,
const GValue *value2);
-G_CONST_RETURN gchar* g_param_get_name (GParamSpec *pspec);
-G_CONST_RETURN gchar* g_param_get_nick (GParamSpec *pspec);
-G_CONST_RETURN gchar* g_param_get_blurb (GParamSpec *pspec);
+G_CONST_RETURN gchar* g_param_spec_get_name (GParamSpec *pspec);
+G_CONST_RETURN gchar* g_param_spec_get_nick (GParamSpec *pspec);
+G_CONST_RETURN gchar* g_param_spec_get_blurb (GParamSpec *pspec);
void g_value_set_param (GValue *value,
GParamSpec *param);
GParamSpec* g_value_get_param (const GValue *value);
diff --git a/gobject/gparamspecs.c b/gobject/gparamspecs.c
index f15727834..eda227338 100644
--- a/gobject/gparamspecs.c
+++ b/gobject/gparamspecs.c
@@ -774,45 +774,6 @@ param_pointer_values_cmp (GParamSpec *pspec,
}
static void
-param_closure_init (GParamSpec *pspec)
-{
- /* GParamSpecClosure *cspec = G_PARAM_SPEC_CLOSURE (pspec); */
-}
-
-static void
-param_closure_set_default (GParamSpec *pspec,
- GValue *value)
-{
- value->data[0].v_pointer = NULL;
-}
-
-static gboolean
-param_closure_validate (GParamSpec *pspec,
- GValue *value)
-{
- /* GParamSpecClosure *cspec = G_PARAM_SPEC_CLOSURE (pspec); */
- /* GClosure *closure = value->data[0].v_pointer; */
- guint changed = 0;
-
- /* we don't actually have necessary means to ensure closure validity */
-
- return changed;
-}
-
-static gint
-param_closure_values_cmp (GParamSpec *pspec,
- const GValue *value1,
- const GValue *value2)
-{
- guint8 *p1 = value1->data[0].v_pointer;
- guint8 *p2 = value2->data[0].v_pointer;
-
- /* not much to compare here, try to at least provide stable lesser/greater result */
-
- return p1 < p2 ? -1 : p1 > p2;
-}
-
-static void
param_value_array_init (GParamSpec *pspec)
{
GParamSpecValueArray *aspec = G_PARAM_SPEC_VALUE_ARRAY (pspec);
@@ -1326,23 +1287,6 @@ g_param_spec_types_init (void) /* sync with gtype.c */
g_assert (type == G_TYPE_PARAM_VALUE_ARRAY);
}
- /* G_TYPE_PARAM_CLOSURE
- */
- {
- static const GParamSpecTypeInfo pspec_info = {
- sizeof (GParamSpecClosure), /* instance_size */
- 0, /* n_preallocs */
- param_closure_init, /* instance_init */
- G_TYPE_CLOSURE, /* value_type */
- NULL, /* finalize */
- param_closure_set_default, /* value_set_default */
- param_closure_validate, /* value_validate */
- param_closure_values_cmp, /* values_cmp */
- };
- type = g_param_type_register_static ("GParamClosure", &pspec_info);
- g_assert (type == G_TYPE_PARAM_CLOSURE);
- }
-
/* G_TYPE_PARAM_OBJECT
*/
{
@@ -1829,22 +1773,6 @@ g_param_spec_value_array (const gchar *name,
}
GParamSpec*
-g_param_spec_closure (const gchar *name,
- const gchar *nick,
- const gchar *blurb,
- GParamFlags flags)
-{
- GParamSpecClosure *cspec;
-
- cspec = g_param_spec_internal (G_TYPE_PARAM_CLOSURE,
- name,
- nick,
- blurb,
- flags);
- return G_PARAM_SPEC (cspec);
-}
-
-GParamSpec*
g_param_spec_object (const gchar *name,
const gchar *nick,
const gchar *blurb,
diff --git a/gobject/gparamspecs.h b/gobject/gparamspecs.h
index 972d918a9..98a15f678 100644
--- a/gobject/gparamspecs.h
+++ b/gobject/gparamspecs.h
@@ -68,8 +68,6 @@ G_BEGIN_DECLS
#define G_PARAM_SPEC_POINTER(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_POINTER, GParamSpecPointer))
#define G_IS_PARAM_SPEC_VALUE_ARRAY(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_VALUE_ARRAY))
#define G_PARAM_SPEC_VALUE_ARRAY(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_VALUE_ARRAY, GParamSpecValueArray))
-#define G_IS_PARAM_SPEC_CLOSURE(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_CLOSURE))
-#define G_PARAM_SPEC_CLOSURE(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_CLOSURE, GParamSpecClosure))
#define G_IS_PARAM_SPEC_OBJECT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_OBJECT))
#define G_PARAM_SPEC_OBJECT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_OBJECT, GParamSpecObject))
@@ -94,7 +92,6 @@ typedef struct _GParamSpecParam GParamSpecParam;
typedef struct _GParamSpecBoxed GParamSpecBoxed;
typedef struct _GParamSpecPointer GParamSpecPointer;
typedef struct _GParamSpecValueArray GParamSpecValueArray;
-typedef struct _GParamSpecClosure GParamSpecClosure;
typedef struct _GParamSpecObject GParamSpecObject;
struct _GParamSpecChar
@@ -234,10 +231,6 @@ struct _GParamSpecValueArray
GParamSpec *element_spec;
guint fixed_n_elements;
};
-struct _GParamSpecClosure
-{
- GParamSpec parent_instance;
-};
struct _GParamSpecObject
{
GParamSpec parent_instance;
@@ -360,10 +353,6 @@ GParamSpec* g_param_spec_value_array (const gchar *name,
const gchar *blurb,
GParamSpec *element_spec,
GParamFlags flags);
-GParamSpec* g_param_spec_closure (const gchar *name,
- const gchar *nick,
- const gchar *blurb,
- GParamFlags flags);
GParamSpec* g_param_spec_object (const gchar *name,
const gchar *nick,
const gchar *blurb,
diff --git a/gobject/gsignal.c b/gobject/gsignal.c
index 9f795fa78..fdd8437f1 100644
--- a/gobject/gsignal.c
+++ b/gobject/gsignal.c
@@ -1279,6 +1279,20 @@ signal_destroy_R (SignalNode *signal_node)
SIGNAL_LOCK ();
}
+void
+g_signal_override_class_closure (guint signal_id,
+ GType instance_type,
+ GClosure *class_closure)
+{
+}
+
+void
+g_signal_chain_from_overridden (const GValue *instance_and_params,
+ guint signal_id,
+ GValue *return_value)
+{
+}
+
gulong
g_signal_connect_closure_by_id (gpointer instance,
guint signal_id,
diff --git a/gobject/gsignal.h b/gobject/gsignal.h
index e1ef7c2a7..a37d550ee 100644
--- a/gobject/gsignal.h
+++ b/gobject/gsignal.h
@@ -224,6 +224,15 @@ guint g_signal_handlers_disconnect_matched (gpointer instance,
gpointer data);
+/* --- chaining for language bindings --- */
+void g_signal_override_class_closure (guint signal_id,
+ GType instance_type,
+ GClosure *class_closure);
+void g_signal_chain_from_overridden (const GValue *instance_and_params,
+ guint signal_id,
+ GValue *return_value);
+
+
/* --- convenience --- */
#define g_signal_connect(instance, detailed_signal, c_handler, data) \
g_signal_connect_data ((instance), (detailed_signal), (c_handler), (data), NULL, 0)
diff --git a/gobject/gtype.c b/gobject/gtype.c
index e70528488..abe2e399b 100644
--- a/gobject/gtype.c
+++ b/gobject/gtype.c
@@ -251,10 +251,6 @@ static GQuark static_quark_dependants_array = 0;
GTypeDebugFlags _g_type_debug_flags = 0;
-/* --- externs --- */
-const char *g_log_domain_gruntime = "GRuntime";
-
-
/* --- type nodes --- */
static GHashTable *static_type_nodes_ht = NULL;
static GType *static_branch_seqnos = NULL;
diff --git a/gobject/gtype.h b/gobject/gtype.h
index 2253ea130..0ae6475cb 100644
--- a/gobject/gtype.h
+++ b/gobject/gtype.h
@@ -19,7 +19,6 @@
#ifndef __G_TYPE_H__
#define __G_TYPE_H__
-extern const char *g_log_domain_gruntime;
#include <glib.h>
G_BEGIN_DECLS
@@ -93,8 +92,7 @@ typedef enum /*< skip >*/
G_TYPE_PARAM_BOXED = G_TYPE_DERIVE_ID (G_TYPE_PARAM, 17),
G_TYPE_PARAM_POINTER = G_TYPE_DERIVE_ID (G_TYPE_PARAM, 18),
G_TYPE_PARAM_VALUE_ARRAY = G_TYPE_DERIVE_ID (G_TYPE_PARAM, 19),
- G_TYPE_PARAM_CLOSURE = G_TYPE_DERIVE_ID (G_TYPE_PARAM, 20),
- G_TYPE_PARAM_OBJECT = G_TYPE_DERIVE_ID (G_TYPE_PARAM, 21)
+ G_TYPE_PARAM_OBJECT = G_TYPE_DERIVE_ID (G_TYPE_PARAM, 20)
} GTypeFundamentals;