forked from enlightenment/efl
Eobj: Made eobj_class_new return a const class.
Once a class is created, we are no longer allowed to touch it. SVN revision: 70260
This commit is contained in:
parent
3d245132cc
commit
3f2c369c26
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
EAPI Eobj_Op INHERIT_BASE_ID = 0;
|
EAPI Eobj_Op INHERIT_BASE_ID = 0;
|
||||||
|
|
||||||
static Eobj_Class *_my_class = NULL;
|
static const Eobj_Class *_my_class = NULL;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_prot_print(Eobj *obj, void *class_data __UNUSED__, va_list *list)
|
_prot_print(Eobj *obj, void *class_data __UNUSED__, va_list *list)
|
||||||
|
|
|
@ -13,7 +13,7 @@ typedef struct
|
||||||
EAPI const Eobj_Event_Description _SIG_A_CHANGED =
|
EAPI const Eobj_Event_Description _SIG_A_CHANGED =
|
||||||
EOBJ_EVENT_DESCRIPTION("a,changed", "i", "Called when a has changed.");
|
EOBJ_EVENT_DESCRIPTION("a,changed", "i", "Called when a has changed.");
|
||||||
|
|
||||||
static Eobj_Class *_my_class = NULL;
|
static const Eobj_Class *_my_class = NULL;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_a_set(Eobj *obj, void *class_data, va_list *list)
|
_a_set(Eobj *obj, void *class_data, va_list *list)
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
EAPI Eobj_Op COMP_BASE_ID = 0;
|
EAPI Eobj_Op COMP_BASE_ID = 0;
|
||||||
|
|
||||||
static Eobj_Class *_my_class = NULL;
|
static const Eobj_Class *_my_class = NULL;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_a_get(Eobj *obj, void *class_data __UNUSED__, va_list *list)
|
_a_get(Eobj *obj, void *class_data __UNUSED__, va_list *list)
|
||||||
|
|
|
@ -8,7 +8,7 @@ EAPI Eobj_Op SIMPLE_BASE_ID = 0;
|
||||||
EAPI const Eobj_Event_Description _SIG_A_CHANGED =
|
EAPI const Eobj_Event_Description _SIG_A_CHANGED =
|
||||||
EOBJ_EVENT_DESCRIPTION("a,changed", "i", "Called when a has changed.");
|
EOBJ_EVENT_DESCRIPTION("a,changed", "i", "Called when a has changed.");
|
||||||
|
|
||||||
static Eobj_Class *_my_class = NULL;
|
static const Eobj_Class *_my_class = NULL;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_a_set(Eobj *obj, void *class_data, va_list *list)
|
_a_set(Eobj *obj, void *class_data, va_list *list)
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
EAPI Eobj_Op MIXIN_BASE_ID = 0;
|
EAPI Eobj_Op MIXIN_BASE_ID = 0;
|
||||||
|
|
||||||
static Eobj_Class *_my_class = NULL;
|
static const Eobj_Class *_my_class = NULL;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_add_and_print_set(Eobj *obj, void *class_data __UNUSED__, va_list *list)
|
_add_and_print_set(Eobj *obj, void *class_data __UNUSED__, va_list *list)
|
||||||
|
|
|
@ -12,7 +12,7 @@ typedef struct
|
||||||
int b;
|
int b;
|
||||||
} Private_Data;
|
} Private_Data;
|
||||||
|
|
||||||
static Eobj_Class *_my_class = NULL;
|
static const Eobj_Class *_my_class = NULL;
|
||||||
|
|
||||||
static char *class_var = NULL;
|
static char *class_var = NULL;
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
static Eobj_Class *_my_class = NULL;
|
static const Eobj_Class *_my_class = NULL;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_constructor(Eobj *obj, void *class_data __UNUSED__)
|
_constructor(Eobj *obj, void *class_data __UNUSED__)
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
static Eobj_Class *_my_class = NULL;
|
static const Eobj_Class *_my_class = NULL;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_constructor(Eobj *obj, void *class_data __UNUSED__)
|
_constructor(Eobj *obj, void *class_data __UNUSED__)
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#include "simple.h"
|
#include "simple.h"
|
||||||
#include "simple4.h"
|
#include "simple4.h"
|
||||||
|
|
||||||
static Eobj_Class *_my_class = NULL;
|
static const Eobj_Class *_my_class = NULL;
|
||||||
|
|
||||||
const Eobj_Class *
|
const Eobj_Class *
|
||||||
simple4_class_get(void)
|
simple4_class_get(void)
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
static Eobj_Class *_my_class = NULL;
|
static const Eobj_Class *_my_class = NULL;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_destructor(Eobj *obj, void *class_data __UNUSED__)
|
_destructor(Eobj *obj, void *class_data __UNUSED__)
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
static Eobj_Class *_my_class = NULL;
|
static const Eobj_Class *_my_class = NULL;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_destructor(Eobj *obj, void *class_data __UNUSED__)
|
_destructor(Eobj *obj, void *class_data __UNUSED__)
|
||||||
|
|
|
@ -13,7 +13,7 @@ typedef struct
|
||||||
Evas_Object *bx;
|
Evas_Object *bx;
|
||||||
} Widget_Data;
|
} Widget_Data;
|
||||||
|
|
||||||
static Eobj_Class *_my_class = NULL;
|
static const Eobj_Class *_my_class = NULL;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_pack_end(Eobj *obj __UNUSED__, void *class_data, va_list *list)
|
_pack_end(Eobj *obj __UNUSED__, void *class_data, va_list *list)
|
||||||
|
|
|
@ -13,7 +13,7 @@ typedef struct
|
||||||
// Evas_Object *bx;
|
// Evas_Object *bx;
|
||||||
} Widget_Data;
|
} Widget_Data;
|
||||||
|
|
||||||
static Eobj_Class *_my_class = NULL;
|
static const Eobj_Class *_my_class = NULL;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_constructor(Eobj *obj, void *class_data __UNUSED__)
|
_constructor(Eobj *obj, void *class_data __UNUSED__)
|
||||||
|
|
|
@ -16,7 +16,7 @@ typedef struct
|
||||||
Evas_Object *bt;
|
Evas_Object *bt;
|
||||||
} Widget_Data;
|
} Widget_Data;
|
||||||
|
|
||||||
static Eobj_Class *_my_class = NULL;
|
static const Eobj_Class *_my_class = NULL;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_position_set(Eobj *obj, void *class_data __UNUSED__, va_list *list)
|
_position_set(Eobj *obj, void *class_data __UNUSED__, va_list *list)
|
||||||
|
|
|
@ -10,7 +10,7 @@ typedef struct
|
||||||
Evas_Object *bg;
|
Evas_Object *bg;
|
||||||
} Widget_Data;
|
} Widget_Data;
|
||||||
|
|
||||||
static Eobj_Class *_my_class = NULL;
|
static const Eobj_Class *_my_class = NULL;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
my_win_del(void *data, Evas_Object *obj, void *event_info)
|
my_win_del(void *data, Evas_Object *obj, void *event_info)
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
static Eobj_Class *_my_class = NULL;
|
static const Eobj_Class *_my_class = NULL;
|
||||||
|
|
||||||
EAPI Eobj_Op EVAS_OBJ_BASE_ID = 0;
|
EAPI Eobj_Op EVAS_OBJ_BASE_ID = 0;
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
#include "inherit.h"
|
#include "inherit.h"
|
||||||
|
|
||||||
static Eobj_Class *_my_class = NULL;
|
static const Eobj_Class *_my_class = NULL;
|
||||||
|
|
||||||
const Eobj_Class *
|
const Eobj_Class *
|
||||||
inherit_class_get(void)
|
inherit_class_get(void)
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
EAPI Eobj_Op INHERIT2_BASE_ID = 0;
|
EAPI Eobj_Op INHERIT2_BASE_ID = 0;
|
||||||
|
|
||||||
static Eobj_Class *_my_class = NULL;
|
static const Eobj_Class *_my_class = NULL;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_a_set(Eobj *obj, void *class_data __UNUSED__, va_list *list)
|
_a_set(Eobj *obj, void *class_data __UNUSED__, va_list *list)
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
static Eobj_Class *_my_class = NULL;
|
static const Eobj_Class *_my_class = NULL;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_a_set(Eobj *obj, void *class_data __UNUSED__, va_list *list)
|
_a_set(Eobj *obj, void *class_data __UNUSED__, va_list *list)
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
EAPI Eobj_Op SIMPLE_BASE_ID = 0;
|
EAPI Eobj_Op SIMPLE_BASE_ID = 0;
|
||||||
|
|
||||||
static Eobj_Class *_my_class = NULL;
|
static const Eobj_Class *_my_class = NULL;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_a_set(Eobj *obj __UNUSED__, void *class_data, va_list *list)
|
_a_set(Eobj *obj __UNUSED__, void *class_data, va_list *list)
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
EAPI Eobj_Op MIXIN_BASE_ID = 0;
|
EAPI Eobj_Op MIXIN_BASE_ID = 0;
|
||||||
|
|
||||||
static Eobj_Class *_my_class = NULL;
|
static const Eobj_Class *_my_class = NULL;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_add_and_print_set(Eobj *obj, void *class_data __UNUSED__, va_list *list)
|
_add_and_print_set(Eobj *obj, void *class_data __UNUSED__, va_list *list)
|
||||||
|
|
|
@ -12,7 +12,7 @@ typedef struct
|
||||||
int b;
|
int b;
|
||||||
} Private_Data;
|
} Private_Data;
|
||||||
|
|
||||||
static Eobj_Class *_my_class = NULL;
|
static const Eobj_Class *_my_class = NULL;
|
||||||
|
|
||||||
#define _GET_SET_FUNC(name) \
|
#define _GET_SET_FUNC(name) \
|
||||||
static void \
|
static void \
|
||||||
|
|
|
@ -14,7 +14,7 @@ typedef struct
|
||||||
EAPI const Eobj_Event_Description _SIG_A_CHANGED =
|
EAPI const Eobj_Event_Description _SIG_A_CHANGED =
|
||||||
EOBJ_EVENT_DESCRIPTION("a,changed", "i", "Called when a has changed.");
|
EOBJ_EVENT_DESCRIPTION("a,changed", "i", "Called when a has changed.");
|
||||||
|
|
||||||
static Eobj_Class *_my_class = NULL;
|
static const Eobj_Class *_my_class = NULL;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_a_set(Eobj *obj, void *class_data, va_list *list)
|
_a_set(Eobj *obj, void *class_data, va_list *list)
|
||||||
|
|
|
@ -228,7 +228,7 @@ typedef struct _Eobj_Class_Description Eobj_Class_Description;
|
||||||
* @param ... A NULL terminated list of extensions (interfaces, mixins and the classes of any composite objects).
|
* @param ... A NULL terminated list of extensions (interfaces, mixins and the classes of any composite objects).
|
||||||
* @return The new class's handle on success, or NULL otherwise.
|
* @return The new class's handle on success, or NULL otherwise.
|
||||||
*/
|
*/
|
||||||
EAPI Eobj_Class *eobj_class_new(const Eobj_Class_Description *desc, const Eobj_Class *parent, ...);
|
EAPI const Eobj_Class *eobj_class_new(const Eobj_Class_Description *desc, const Eobj_Class *parent, ...);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Sets the OP functions for a class.
|
* @brief Sets the OP functions for a class.
|
||||||
|
|
|
@ -592,7 +592,7 @@ _eobj_class_check_op_descs(const Eobj_Class *klass)
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI Eobj_Class *
|
EAPI const Eobj_Class *
|
||||||
eobj_class_new(const Eobj_Class_Description *desc, const Eobj_Class *parent, ...)
|
eobj_class_new(const Eobj_Class_Description *desc, const Eobj_Class *parent, ...)
|
||||||
{
|
{
|
||||||
Eobj_Class *klass;
|
Eobj_Class *klass;
|
||||||
|
@ -1292,7 +1292,7 @@ eobj_event_callback_forwarder_del(Eobj *obj, const Eobj_Event_Description *desc,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* EOBJ_CLASS_BASE stuff */
|
/* EOBJ_CLASS_BASE stuff */
|
||||||
static Eobj_Class *_my_class = NULL;
|
static const Eobj_Class *_my_class = NULL;
|
||||||
|
|
||||||
/* FIXME: Set proper type descriptions. */
|
/* FIXME: Set proper type descriptions. */
|
||||||
EAPI const Eobj_Event_Description _EOBJ_EV_CALLBACK_ADD =
|
EAPI const Eobj_Event_Description _EOBJ_EV_CALLBACK_ADD =
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
EAPI Eobj_Op SIMPLE_BASE_ID = 0;
|
EAPI Eobj_Op SIMPLE_BASE_ID = 0;
|
||||||
|
|
||||||
static Eobj_Class *_my_class = NULL;
|
static const Eobj_Class *_my_class = NULL;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_a_set(Eobj *obj __UNUSED__, void *class_data, va_list *list)
|
_a_set(Eobj *obj __UNUSED__, void *class_data, va_list *list)
|
||||||
|
|
Loading…
Reference in New Issue