Enlightenment CVS committal
Author : leviathan
Project : e17
Module : proto
Dir : e17/proto/etk-perl
Modified Files:
Etk.xs EtkTypes.c EtkTypes.h README TODO typemap
Log Message:
- lots of TODO items done.
- event structs are converted now, still need to add code to pass them around
- removed unneeded functions
- added new textblock and iterator stuff
===================================================================
RCS file: /cvs/e/e17/proto/etk-perl/Etk.xs,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -3 -r1.36 -r1.37
--- Etk.xs 4 Aug 2006 17:23:01 -0000 1.36
+++ Etk.xs 4 Aug 2006 23:23:53 -0000 1.37
@@ -129,46 +129,30 @@
{
dSP;
Callback_Signal_Data *cbd = NULL;
- Etk_Event_Mouse_Up_Down *event = value;
HV *event_hv;
SV *event_rv;
cbd = data;
- if(!strcmp(cbd->signal_name, "mouse_up"))
+ if(!strcmp(cbd->signal_name, "mouse_up") || !strcmp(cbd->signal_name,
"mouse_down"))
{
- event_hv = (HV*)sv_2mortal((SV*)newHV());
- event_rv = newSViv(event->canvas.x);
- hv_store(event_hv, "canvas_x", strlen("canvas_x"), event_rv, 0);
- event_rv = newSViv(event->canvas.y);
- hv_store(event_hv, "canvas_y", strlen("canvas_y"), event_rv, 0);
- event_rv = newSViv(event->widget.x);
- hv_store(event_hv, "widget_x", strlen("widget_x"), event_rv, 0);
- event_rv = newSViv(event->widget.y);
- hv_store(event_hv, "widget_y", strlen("widget_y"), event_rv, 0);
- event_rv = newRV((SV*)event_hv);
+ Etk_Event_Mouse_Up_Down *event = value;
+ event_rv = newSVEventMouseUpDown(event);
}
- else if(!strcmp(cbd->signal_name, "row_mouse_in"))
+ else if(!strcmp(cbd->signal_name, "mouse_move"))
{
- SV *row_rv;
- HV *row_hv;
- row_rv = newRV(newSViv(0));
- sv_setref_iv(row_rv, "Etk_Tree_RowPtr", (IV) value);
- row_hv = newHV();
- hv_store(row_hv, "WIDGET", strlen("WIDGET"), row_rv, 0);
- event_rv = newRV((SV*)row_hv);
- sv_bless(event_rv, gv_stashpv("Etk::Tree::Row", FALSE));
+ Etk_Event_Mouse_Move *event = value;
+ event_rv = newSVEventMouseMove(event);
}
- else if(!strcmp(cbd->signal_name, "row_mouse_out"))
+ else if(!strcmp(cbd->signal_name, "row_mouse_in") ||
!strcmp(cbd->signal_name, "row_mouse_out"))
{
- SV *row_rv;
- HV *row_hv;
- row_rv = newRV(newSViv(0));
- sv_setref_iv(row_rv, "Etk_Tree_RowPtr", (IV) value);
- row_hv = newHV();
- hv_store(row_hv, "WIDGET", strlen("WIDGET"), row_rv, 0);
- event_rv = newRV((SV*)row_hv);
- sv_bless(event_rv, gv_stashpv("Etk::Tree::Row", FALSE));
- }
+ event_rv = newSVEtkTreeRowPtr((Etk_Tree_Row *)value);
+ }
+ else if(!strcmp(cbd->signal_name, "key_down") || !strcmp(cbd->signal_name,
"key_up"))
+ {
+ Etk_Event_Key_Up_Down *key_event = value;
+ event_rv = newSVEventKeyUpDown(key_event);
+
+ }
else
{
event_hv = (HV*)sv_2mortal((SV*)newHV());
@@ -292,8 +276,7 @@
cbd = calloc(1, sizeof(Callback_Signal_Data));
cbd->signal_name = strdup(signal_name);
cbd->object = obj;
- //cbd->perl_object = newSViv((IV)obj);
- cbd->perl_object = object;
+ cbd->perl_object = newSVsv(object);
cbd->perl_data = newSVsv(data);
cbd->perl_callback = newSVsv(callback);
@@ -503,70 +486,14 @@
-Etk_Size
-perl_hash_to_size(SV * size)
-{
- dSP;
- Etk_Size s;
-
- ENTER;
- SAVETMPS;
-
- if (SvROK(size) && SvTYPE(SvRV(size)) == SVt_PVHV)
- {
- HV * hash;
- SV ** val;
-
- hash = (HV*)SvRV(size);
-
- val = hv_fetch(hash, "w", strlen("w"), 0);
- s.w = val ? SvIV(*val) : 0;
-
- val = hv_fetch(hash, "h", strlen("h"), 0);
- s.h = val ? SvIV(*val) : 0;
-
- }
-
- PUTBACK;
- FREETMPS;
- LEAVE;
-
- return s;
-}
-
-HV *
-size_to_perl_hash(Etk_Size s)
-{
- dSP;
- HV * hv;
- SV * size;
-
- ENTER;
- SAVETMPS;
-
- hv = (HV*)sv_2mortal((SV*)newHV());
-
- size = newSViv(s.w);
- hv_store(hv, "w", strlen("w"), size, 0);
- size = newSViv(s.h);
- hv_store(hv, "h", strlen("h"), size, 0);
-
- PUTBACK;
- FREETMPS;
- LEAVE;
-
- return hv;
-}
-
MODULE = Etk PACKAGE = Etk PREFIX = etk_
INCLUDE: const-xs.inc
Etk_Bool
-etk_init(engine)
- const char * engine
+etk_init()
CODE:
- RETVAL = etk_init(engine);
+ RETVAL = etk_init(NULL, NULL);
__etk_perl_inheritance_init();
OUTPUT:
RETVAL
@@ -1257,6 +1184,31 @@
Etk_Combobox * combobox
Etk_Combobox_Item * item
+# void
+# etk_combobox_item_col_set(item, col, data)
+# Etk_Combobox_Item * item
+# int col
+# SV * data
+# CODE:
+# / if (SvPOK(data))
+# etk_combobox_item_col_set(item, col, SvPV_nolen(data));
+# / else
+# etk_combobox_item_col_set(item, col, SvEtkWidgetPtr(data));
+#
+# SV *
+# etk_combobox_item_col_get(item, col, type=0)
+# Etk_Combobox_Item * item
+# int col
+# int type
+# CODE:
+# void * data;
+# data = etk_combobox_item_col_get(item, col);
+# / if (type == 0)
+# RETVAL = sv_2mortal(newSVpv((char *)data, 0));
+# / else
+# RETVAL = sv_2mortal(newSVEtkWidgetPtr((Etk_Widget *)data));
+# OUTPUT:
+# RETVAL
MODULE = Etk::Container PACKAGE = Etk::Container PREFIX =
etk_container_
@@ -2651,166 +2603,6 @@
char * label
-MODULE = Etk PACKAGE = Etk
-
-
-
-Etk_Bool
-etk_property_default_value_set(property, default_value)
- Etk_Property * property
- Etk_Property_Value * default_value
-
-void
-etk_property_delete(property)
- Etk_Property * property
-
-Etk_Property *
-etk_property_new(name, property_id, type, flags, default_value)
- char * name
- int property_id
- Etk_Property_Type type
- Etk_Property_Flags flags
- Etk_Property_Value * default_value
-
-Etk_Property_Value *
-etk_property_value_bool(value)
- Etk_Bool value
-
-Etk_Bool
-etk_property_value_bool_get(value)
- Etk_Property_Value * value
-
-void
-etk_property_value_bool_set(property_value, value)
- Etk_Property_Value * property_value
- Etk_Bool value
-
-Etk_Property_Value *
-etk_property_value_char(value)
- char value
-
-char
-etk_property_value_char_get(value)
- Etk_Property_Value * value
-
-void
-etk_property_value_char_set(property_value, value)
- Etk_Property_Value * property_value
- char value
-
-Etk_Property_Value *
-etk_property_value_create(type, ...)
- Etk_Property_Type type
-
-void
-etk_property_value_delete(value)
- Etk_Property_Value * value
-
-Etk_Property_Value *
-etk_property_value_double(value)
- double value
-
-double
-etk_property_value_double_get(value)
- Etk_Property_Value * value
-
-void
-etk_property_value_double_set(property_value, value)
- Etk_Property_Value * property_value
- double value
-
-Etk_Property_Value *
-etk_property_value_float(value)
- float value
-
-float
-etk_property_value_float_get(value)
- Etk_Property_Value * value
-
-void
-etk_property_value_float_set(property_value, value)
- Etk_Property_Value * property_value
- float value
-
-void
-etk_property_value_get(value, type, value_location)
- Etk_Property_Value * value
- Etk_Property_Type type
- void * value_location
-
-Etk_Property_Value *
-etk_property_value_int(value)
- int value
-
-int
-etk_property_value_int_get(value)
- Etk_Property_Value * value
-
-void
-etk_property_value_int_set(property_value, value)
- Etk_Property_Value * property_value
- int value
-
-Etk_Property_Value *
-etk_property_value_long(value)
- long value
-
-long
-etk_property_value_long_get(value)
- Etk_Property_Value * value
-
-void
-etk_property_value_long_set(property_value, value)
- Etk_Property_Value * property_value
- long value
-
-Etk_Property_Value *
-etk_property_value_new()
-
-Etk_Property_Value *
-etk_property_value_pointer(value)
- void * value
-
-void *
-etk_property_value_pointer_get(value)
- Etk_Property_Value * value
-
-void
-etk_property_value_pointer_set(property_value, value)
- Etk_Property_Value * property_value
- void * value
-
-void
-etk_property_value_set(property_value, type, ...)
- Etk_Property_Value * property_value
- Etk_Property_Type type
-
-Etk_Property_Value *
-etk_property_value_short(value)
- short value
-
-short
-etk_property_value_short_get(value)
- Etk_Property_Value * value
-
-void
-etk_property_value_short_set(property_value, value)
- Etk_Property_Value * property_value
- short value
-
-Etk_Property_Value *
-etk_property_value_string(value)
- char * value
-
-const char *
-etk_property_value_string_get(value)
- Etk_Property_Value * value
-
-void
-etk_property_value_string_set(property_value, value)
- Etk_Property_Value * property_value
- char * value
-
MODULE = Etk::RadioButton PACKAGE = Etk::RadioButton PREFIX =
etk_radio_button_
Etk_Widget *
@@ -3138,8 +2930,16 @@
etk_text_view_textblock_get(text_view)
Etk_Text_View * text_view
+Etk_Textblock_Iter *
+etk_text_view_cursor_get(text_view)
+ Etk_Text_View *text_view
-MODULE = Etk::TextBlock PACKAGE = Etk::TextBlock PREFIX =
etk_textblock_
+Etk_Textblock_Iter *
+etk_text_view_selection_bound_get(text_view)
+ Etk_Text_View *text_view
+
+
+MODULE = Etk::TextBlock::Iter PACKAGE = Etk::TextBlock::Iter PREFIX =
etk_textblock_iter_
void
etk_textblock_iter_copy(iter, dest_iter)
@@ -3150,41 +2950,60 @@
etk_textblock_iter_free(iter)
Etk_Textblock_Iter * iter
+void
+etk_textblock_iter_gravity_set(iter, gravity)
+ Etk_Textblock_Iter *iter
+ Etk_Textblock_Gravity gravity
+
+Etk_Textblock_Gravity
+etk_textblock_iter_gravity_get(iter)
+ Etk_Textblock_Iter *iter
+
void
-etk_textblock_iter_goto_end(iter)
+etk_textblock_iter_forward_end(iter)
Etk_Textblock_Iter * iter
void
-etk_textblock_iter_goto_next_char(iter)
+etk_textblock_iter_backward_char(iter)
Etk_Textblock_Iter * iter
void
-etk_textblock_iter_goto_prev_char(iter)
+etk_textblock_iter_forward_char(iter)
Etk_Textblock_Iter * iter
void
-etk_textblock_iter_goto_start(iter)
+etk_textblock_iter_backward_start(iter)
Etk_Textblock_Iter * iter
+int
+etk_textblock_iter_compare(iter1, iter2)
+ Etk_Textblock_Iter *iter1
+ Etk_Textblock_Iter *iter2
+
Etk_Textblock_Iter *
-etk_textblock_iter_new(textblock)
+new(class, textblock)
+ SV * class
Etk_Textblock * textblock
+ CODE:
+ RETVAL = etk_textblock_iter_new(textblock);
+ OUTPUT:
+ RETVAL
-Etk_Textblock *
-etk_textblock_new()
+MODULE = Etk::TextBlock PACKAGE = Etk::TextBlock PREFIX =
etk_textblock_
-void
-etk_textblock_realize(textblock, evas)
- Etk_Textblock * textblock
- Evas * evas
+Etk_Textblock *
+new(class)
+ SV * class
+ CODE:
+ RETVAL = etk_textblock_new();
+ OUTPUT:
+ RETVAL
void
etk_textblock_text_set(textblock, text, markup)
Etk_Textblock * textblock
char * text
Etk_Bool markup
- CODE:
- etk_textblock_text_set(ETK_TEXTBLOCK(textblock), text, markup);
const char *
etk_textblock_text_get(tb, markup)
@@ -3199,6 +3018,60 @@
etk_textblock_unrealize(textblock)
Etk_Textblock * textblock
+const char *
+etk_textblock_range_text_get(tb, iter1, iter2, markup)
+ Etk_Textblock *tb
+ Etk_Textblock_Iter * iter1
+ Etk_Textblock_Iter * iter2
+ Etk_Bool markup
+ CODE:
+ RETVAL = etk_string_get(etk_textblock_range_text_get(tb, iter1, iter2,
markup));
+ OUTPUT:
+ RETVAL
+
+void
+etk_textblock_insert(tb, iter, txt)
+ Etk_Textblock *tb
+ Etk_Textblock_Iter *iter
+ SV * txt
+ CODE:
+ int length;
+ const char * text;
+ text = SvPV(txt, length);
+ etk_textblock_insert(tb, iter, text, length);
+
+void
+etk_textblock_insert_markup(tb, iter, txt)
+ Etk_Textblock *tb
+ Etk_Textblock_Iter *iter
+ SV * txt
+ CODE:
+ int length;
+ const char * text;
+ text = SvPV(txt, length);
+ etk_textblock_insert_markup(tb, iter, text, length);
+
+void
+etk_textblock_clear(tb)
+ Etk_Textblock *tb
+
+void
+etk_textblock_delete_before(tb, iter)
+ Etk_Textblock *tb
+ Etk_Textblock_Iter *iter
+
+void
+etk_textblock_delete_after(tb, iter)
+ Etk_Textblock *tb
+ Etk_Textblock_Iter *iter
+
+void
+etk_textblock_delete_range(tb, iter1, iter2)
+ Etk_Textblock *tb
+ Etk_Textblock_Iter *iter1
+ Etk_Textblock_Iter *iter2
+
+
MODULE = Etk::Theme PACKAGE = Etk::Theme PREFIX = etk_theme_
@@ -3977,81 +3850,6 @@
void
etk_tree_row_unselect(row)
Etk_Tree_Row * row
-
-
-
-MODULE = Etk PACKAGE = Etk
-
-void
-etk_type_delete(type)
- Etk_Type * type
-
-void
-etk_type_destructors_call(type, object)
- Etk_Type * type
- Etk_Object * object
-
-Etk_Bool
-etk_type_inherits_from(type, parent)
- Etk_Type * type
- Etk_Type * parent
-
-const char *
-etk_type_name_get(type)
- Etk_Type * type
-
-Etk_Type *
-etk_type_new(type_name, parent_type, type_size, arg3, arg4)
- char * type_name
- Etk_Type * parent_type
- int type_size
- Etk_Constructor arg3
- Etk_Destructor arg4
-
-void
-etk_type_object_construct(type, object)
- Etk_Type * type
- Etk_Object * object
-
-
-Etk_Property *
-etk_type_property_add(type, name, property_id, property_type, flags,
default_value)
- Etk_Type * type
- char * name
- int property_id
- Etk_Property_Type property_type
- Etk_Property_Flags flags
- Etk_Property_Value * default_value
-
-Etk_Bool
-etk_type_property_find(type, name, property_owner, property)
- Etk_Type * type
- char * name
- Etk_Type ** property_owner
- Etk_Property ** property
-
-void
-etk_type_property_list(type, properties)
- Etk_Type * type
- Evas_List ** properties
-
-void
-etk_type_shutdown()
-
-void
-etk_type_signal_add(type, signal)
- Etk_Type * type
- Etk_Signal * signal
-
-Etk_Signal *
-etk_type_signal_get(type, signal_name)
- Etk_Type * type
- char * signal_name
-
-void
-etk_type_signal_remove(type, signal)
- Etk_Type * type
- Etk_Signal * signal
MODULE = Etk::VBox PACKAGE = Etk::VBox PREFIX = etk_vbox_
===================================================================
RCS file: /cvs/e/e17/proto/etk-perl/EtkTypes.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- EtkTypes.c 4 Aug 2006 17:23:01 -0000 1.3
+++ EtkTypes.c 4 Aug 2006 23:23:53 -0000 1.4
@@ -53,6 +53,7 @@
av_push(get_av("Etk::"A"::ISA", TRUE), newSVpv("Etk::"B,
strlen("Etk::"B)));
__("TextBlock", "Object");
+ __("TextBlock::Iter", "TextBlock");
__("Tree::Col", "Object");
__("Widget", "Object");
@@ -223,6 +224,45 @@
return newRV((SV*)hv);
}
+Etk_Size * SvSizePtr(SV * size) {
+
+ Etk_Size * s;
+ s = malloc(sizeof(Etk_Size *));
+
+ if (SvROK(size) && SvTYPE(SvRV(size)) == SVt_PVHV)
+ {
+ HV * hash;
+ SV ** val;
+
+ hash = (HV*)SvRV(size);
+
+ val = hv_fetch(hash, "w", strlen("w"), 0);
+ s->w = val ? SvIV(*val) : 0;
+
+ val = hv_fetch(hash, "h", strlen("h"), 0);
+ s->h = val ? SvIV(*val) : 0;
+
+ }
+
+ return s;
+}
+
+
+
+SV * newSVSizePtr(Etk_Size *size) {
+ HV *hv;
+ SV * sv;
+
+ hv = (HV*)sv_2mortal((SV*)newHV());
+
+ sv = newSViv(size->w);
+ hv_store(hv, "w", strlen("w"), sv, 0);
+ sv = newSViv(size->h);
+ hv_store(hv, "h", strlen("h"), sv, 0);
+
+ return newRV((SV*)hv);
+}
+
Evas_List * SvEvasList(SV *sv) {
AV * av;
@@ -402,3 +442,94 @@
Etk_Menu_Item_Radio * SvEtkMenuItemRadioPtr(SV *data) { return SvObj(data,
"Etk::Menu::Item::Radio"); }
SV * newSVEtkMenuItemSeparatorPtr(Etk_Menu_Item_Separator *o) { return
newSVObj(o, "Etk::Menu::Item::Separator", 0); }
Etk_Menu_Item_Separator * SvEtkMenuItemSeparatorPtr(SV *data) { return
SvObj(data, "Etk::Menu::Item::Separator"); }
+
+
+#define S_STORE(A, B)\
+ if (B)\
+ hv_store(hv, A, strlen(A), newSVpv(B, 0), 0);\
+ else\
+ hv_store(hv, A, strlen(A), &PL_sv_undef, 0);
+
+#define I_STORE(A, B)\
+ hv_store(hv, A, strlen(A), B, 0);
+
+SV * newSVEventKeyUpDown(Etk_Event_Key_Up_Down *ev) {
+ HV * hv;
+ hv = (HV*)sv_2mortal((SV*)newHV());
+
+ S_STORE("keyname", ev->keyname)
+ S_STORE("key", ev->key)
+ S_STORE("string", ev->string)
+ I_STORE("timestamp", newSVuv(ev->timestamp))
+
+ return newRV((SV*)hv);
+}
+
+SV * newSVEventMouseWheel(Etk_Event_Mouse_Wheel *ev) {
+
+ HV * hv;
+ hv = (HV*)sv_2mortal((SV*)newHV());
+
+ I_STORE("direction", newSViv(ev->direction))
+ I_STORE("z", newSViv(ev->z))
+ I_STORE("canvas.x", newSViv(ev->canvas.x))
+ I_STORE("canvas.y", newSViv(ev->canvas.y))
+ I_STORE("widget.x", newSViv(ev->widget.x))
+ I_STORE("widget.y", newSViv(ev->widget.y))
+ I_STORE("timestamp", newSVuv(ev->timestamp))
+
+ return newRV((SV*)hv);
+}
+
+SV * newSVEventMouseMove(Etk_Event_Mouse_Move *ev) {
+
+ HV * hv;
+ hv = (HV*)sv_2mortal((SV*)newHV());
+
+ I_STORE("buttons", newSViv(ev->buttons))
+ I_STORE("cur.canvas.x", newSViv(ev->cur.canvas.x))
+ I_STORE("cur.canvas.y", newSViv(ev->cur.canvas.y))
+ I_STORE("cur.widget.x", newSViv(ev->cur.widget.x))
+ I_STORE("cur.widget.y", newSViv(ev->cur.widget.y))
+ I_STORE("prev.canvas.x", newSViv(ev->prev.canvas.x))
+ I_STORE("prev.canvas.y", newSViv(ev->prev.canvas.y))
+ I_STORE("prev.widget.x", newSViv(ev->prev.widget.x))
+ I_STORE("prev.widget.y", newSViv(ev->prev.widget.y))
+ I_STORE("timestamp", newSVuv(ev->timestamp))
+
+ return newRV((SV*)hv);
+}
+
+SV * newSVEventMouseUpDown(Etk_Event_Mouse_Up_Down *ev) {
+
+ HV * hv;
+ hv = (HV*)sv_2mortal((SV*)newHV());
+
+ I_STORE("button", newSViv(ev->button))
+ I_STORE("canvas.x", newSViv(ev->canvas.x))
+ I_STORE("canvas.y", newSViv(ev->canvas.y))
+ I_STORE("widget.x", newSViv(ev->widget.x))
+ I_STORE("widget.y", newSViv(ev->widget.y))
+ I_STORE("timestamp", newSVuv(ev->timestamp))
+
+ return newRV((SV*)hv);
+}
+
+SV * newSVEventMouseInOut(Etk_Event_Mouse_In_Out *ev) {
+
+ HV * hv;
+ hv = (HV*)sv_2mortal((SV*)newHV());
+
+ I_STORE("buttons", newSViv(ev->buttons))
+ I_STORE("canvas.x", newSViv(ev->canvas.x))
+ I_STORE("canvas.y", newSViv(ev->canvas.y))
+ I_STORE("widget.x", newSViv(ev->widget.x))
+ I_STORE("widget.y", newSViv(ev->widget.y))
+ I_STORE("timestamp", newSVuv(ev->timestamp))
+
+ return newRV((SV*)hv);
+}
+
+#undef S_STORE
+#undef I_STORE
+
===================================================================
RCS file: /cvs/e/e17/proto/etk-perl/EtkTypes.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- EtkTypes.h 4 Aug 2006 14:50:37 -0000 1.2
+++ EtkTypes.h 4 Aug 2006 23:23:53 -0000 1.3
@@ -22,6 +22,8 @@
Etk_Geometry SvGeometry(SV * geo);
SV * newSVGeometryPtr(Etk_Geometry * geo);
Etk_Geometry * SvGeometryPtr(SV * geo);
+SV * newSVSizePtr(Etk_Size * size);
+Etk_Size * SvSizePtr(SV * size);
Evas_List * SvEvasList(SV *sv);
SV * newSVEvasList(Evas_List *list);
@@ -151,6 +153,12 @@
Etk_Menu_Item_Radio * SvEtkMenuItemRadioPtr(SV *data);
SV * newSVEtkMenuItemSeparatorPtr(Etk_Menu_Item_Separator
*o);
Etk_Menu_Item_Separator *SvEtkMenuItemSeparatorPtr(SV *data);
+
+SV * newSVEventKeyUpDown(Etk_Event_Key_Up_Down *ev);
+SV * newSVEventMouseWheel(Etk_Event_Mouse_Wheel *ev);
+SV * newSVEventMouseMove(Etk_Event_Mouse_Move *ev);
+SV * newSVEventMouseUpDown(Etk_Event_Mouse_Up_Down *ev);
+SV * newSVEventMouseInOut(Etk_Event_Mouse_In_Out *ev);
#endif
===================================================================
RCS file: /cvs/e/e17/proto/etk-perl/README,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- README 30 Jul 2006 19:50:29 -0000 1.2
+++ README 4 Aug 2006 23:23:53 -0000 1.3
@@ -1,21 +1,24 @@
Etk version 0.02
================
-NOTE:
-=====
-THIS IS STILL UNDER DEV! NO AUTOFOO! NO DETECTION! THE API WILL BE CHANGING
-OVER THE NEXT FEW DAYS / WEEKS! LOOK AT test.pl OR test/ FOR EXAMPLES.
-
-The README is used to introduce the module and provide instructions on
-how to install the module, any machine dependencies it may have (for
-example C compilers and installed libraries) and any other information
-that should be provided before the module is installed.
-
-A README file is required for CPAN modules since CPAN extracts the
-README file from a module distribution so that people browsing the
-archive can use it get an idea of the modules uses. It is usually a
-good idea to provide version information here so that people can
-decide whether fixes for the module are worth downloading.
+These are the Etk bindings for the Enlightenment Toolkit (etk)
+This version is a direct almost 1-to-1 mapping of the C function
+calls into a Perl OO interface.
+
+In order to find out how the functions map, you need to remove
+the namespace from the function, ex:
+
+The C function call: etk_window_title_set(window, title);
+translates into: $window->title_set($title);
+where $window is an object of type Etk::Window
+
+Alternatively, there is another calling technique which
+removes underscores and uppercases the first letter of
+each word: $window->TitleSet($title);
+
+This calling technique is for now converted with a regular
+expression into the real function call, so it has its problems.
+
INSTALLATION
@@ -23,18 +26,16 @@
perl Makefile.PL
make
- make test
+ make test
make install
DEPENDENCIES
-This module requires these other modules and libraries:
-
- blah blah blah
+This module requires the etk library.
+You can get etk from the Enlightenment CVS repository:
+http://www.enlightenment.org/??/Get_Enlightenment/
COPYRIGHT AND LICENCE
-
-Put the correct copyright and licence information here.
Copyright (C) 2006 by Hisham Mardam Bey
===================================================================
RCS file: /cvs/e/e17/proto/etk-perl/TODO,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- TODO 30 Jul 2006 19:22:31 -0000 1.10
+++ TODO 4 Aug 2006 23:23:53 -0000 1.11
@@ -1,20 +1,9 @@
General TODO:
=============
-- finish porting etk_test from C to perl
-- callback system needs to convert structs to perl equivalents
+- callback system needs to convert event structs to perl equivalents
+- port evas key modifiers and locks
- finish signal callback functions
- perldoc everything
-- go over all enums and structs and port as needed
-- etk_property.h ?
-- etk_editable_text_object.h
-- etk_text_buffer.h
-- etk_text_iter.h
-- etk_text_view.h
-- etk_textblock.h
-- etk_type.h
-- etk_types.h
-- etk_utils.h
-- go over all list functions and check as necessary
- create Test cases
Done:
@@ -37,6 +26,17 @@
- finish up etk_widget.h [DONE]
- add some commonly used internal tree sorters to avoid the entire
perl -> c -> perl ... loop when sorting trees. [DONE]
+- etk_property.h [NOT NEEDED]
+- etk_types.h [DONE]
+- etk_type.h [NOT NEEDED]
+- etk_utils.h [NOT NEEDED]
+- go over all list functions and check as necessary [DONE]
+- go over all enums and structs and port as needed [DONE]
+- finish porting etk_test from C to perl [DONE]
+- etk_text_iter.h [DONE]
+- etk_text_view.h [DONE]
+- etk_textblock.h [DONE]
+- etk_editable_text_object.h [NOT NEEDED]
Pending:
========
===================================================================
RCS file: /cvs/e/e17/proto/etk-perl/typemap,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- typemap 4 Aug 2006 14:50:37 -0000 1.7
+++ typemap 4 Aug 2006 23:23:53 -0000 1.8
@@ -66,7 +66,7 @@
Etk_Signal * T_PTROBJ
Etk_Signal_Callback * T_PTROBJ
Etk_Signal_Callback_Function T_CALLBACK
-Etk_Size * T_PTROBJ
+Etk_Size * T_SIZE
Etk_Statusbar * T_PTROBJ_ETK
Etk_Separator * T_PTROBJ_ETK
Etk_HSeparator * T_PTROBJ_ETK
@@ -83,6 +83,7 @@
Etk_Text_View * T_PTROBJ_ETK
Etk_Textblock * T_PTROBJ_ETK
Etk_Textblock_Iter * T_PTROBJ_ETK
+Etk_Textblock_Gravity T_IV
Etk_Toggle_Button * T_PTROBJ_ETK
Etk_Toplevel_Widget * T_PTROBJ_ETK
Etk_Tree * T_PTROBJ_ETK
@@ -151,6 +152,11 @@
croak(\"$var is not of type ${ntype}\");
$var = SvGeometryPtr($arg);
+T_SIZE
+ if (!$arg || !SvOK($arg))
+ croak(\"$var is not of type ${ntype}\");
+ $var = SvSizePtr($arg);
+
T_TROBJ_EVAS_LIST
if (!$arg || !SvOK($arg))
croak(\"$var is not of type ${ntype}\");
@@ -181,7 +187,11 @@
do {
$arg = sv_2mortal(newSVGeometryPtr($var));
} while(0);
-
+T_SIZE
+ do {
+ $arg = sv_2mortal(newSVSizePtr($var));
+ } while(0);
+
T_PTROBJ_EVAS_LIST
do {
$arg = sv_2mortal(newSVEvasList($var));
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs