1. daonix
  2. haikuml

Commits

daonix  committed 3e69a4c

Partially working "Hello, World".

  • Participants
  • Parent commits cb118fc
  • Branches default

Comments (0)

Files changed (10)

File BButtonML.cpp

View file
 	((BButtonML*)v_self)->setMouseDown(v_cb);
 	CAMLreturn(Val_unit);
 }
-CAMLprim value bbuttonDraw(value v_self, value v_updateRect)
+CAMLprim value bbutton_Draw(value v_self, value v_updateRect)
 {
 	CAMLparam2(v_self, v_updateRect);
 	((BButton*)v_self)->Draw(*((BRect*)v_updateRect));
 	CAMLreturn(Val_unit);
 }
-CAMLprim value bbuttonGetPreferredSize(value v_self, value v_width, value v_height)
+CAMLprim value bbutton_GetPreferredSize(value v_self, value v_width, value v_height)
 {
 	CAMLparam3(v_self, v_width, v_height);
 	((BButton*)v_self)->GetPreferredSize((float*)v_width, (float*)v_height);
 	CAMLreturn(Val_unit);
 }
-CAMLprim value bbuttonIsDefault(value v_self)
+CAMLprim value bbutton_IsDefault(value v_self)
 {
 	CAMLparam1(v_self);
 	bool res = ((BButton*)v_self)->IsDefault();
 	CAMLreturn(Val_bool(res));
 }
-CAMLprim value bbuttonSetLabel(value v_self, value v_string)
+CAMLprim value bbutton_SetLabel(value v_self, value v_string)
 {
 	CAMLparam2(v_self, v_string);
 	((BButton*)v_self)->SetLabel(String_val(v_string));

File BMessageML.cpp

View file
 	BMessageML *res = new BMessageML();
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageAddData_native(value v_self, value v_name, value v_type, value v_data, value v_numBytes, value v_fixedSize, value v_numItems)
+CAMLprim value bmessage_AddData_native(value v_self, value v_name, value v_type, value v_data, value v_numBytes, value v_fixedSize, value v_numItems)
 {
 	CAMLparam5(v_self, v_name, v_type, v_data, v_numBytes);
 	CAMLxparam2(v_fixedSize, v_numItems);
 	status_t res = ((BMessage*)v_self)->AddData(String_val(v_name), (type_code)v_type, (void*)v_data, (ssize_t)v_numBytes, Bool_val(v_fixedSize), Int_val(v_numItems));
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageAddData_bytecode(value* argv, int argn)
+CAMLprim value bmessage_AddData_bytecode(value* argv, int argn)
 {
-	return bmessageAddData_native(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]);
+	return bmessage_AddData_native(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]);
 }
-CAMLprim value bmessageAddBool(value v_self, value v_name, value v_aBool)
+CAMLprim value bmessage_AddBool(value v_self, value v_name, value v_aBool)
 {
 	CAMLparam3(v_self, v_name, v_aBool);
 	status_t res = ((BMessage*)v_self)->AddBool(String_val(v_name), Bool_val(v_aBool));
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageAddInt8(value v_self, value v_name, value v_anInt8)
+CAMLprim value bmessage_AddInt8(value v_self, value v_name, value v_anInt8)
 {
 	CAMLparam3(v_self, v_name, v_anInt8);
 	status_t res = ((BMessage*)v_self)->AddInt8(String_val(v_name), (int8)v_anInt8);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageAddInt16(value v_self, value v_name, value v_anInt16)
+CAMLprim value bmessage_AddInt16(value v_self, value v_name, value v_anInt16)
 {
 	CAMLparam3(v_self, v_name, v_anInt16);
 	status_t res = ((BMessage*)v_self)->AddInt16(String_val(v_name), (int16)v_anInt16);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageAddInt32(value v_self, value v_name, value v_anInt32)
+CAMLprim value bmessage_AddInt32(value v_self, value v_name, value v_anInt32)
 {
 	CAMLparam3(v_self, v_name, v_anInt32);
 	status_t res = ((BMessage*)v_self)->AddInt32(String_val(v_name), Int_val(v_anInt32));
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageAddInt64(value v_self, value v_name, value v_anInt64)
+CAMLprim value bmessage_AddInt64(value v_self, value v_name, value v_anInt64)
 {
 	CAMLparam3(v_self, v_name, v_anInt64);
 	status_t res = ((BMessage*)v_self)->AddInt64(String_val(v_name), (int64)v_anInt64);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageAddFloat(value v_self, value v_name, value v_aFloat)
+CAMLprim value bmessage_AddFloat(value v_self, value v_name, value v_aFloat)
 {
 	CAMLparam3(v_self, v_name, v_aFloat);
 	status_t res = ((BMessage*)v_self)->AddFloat(String_val(v_name), Double_val(v_aFloat));
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageAddDouble(value v_self, value v_name, value v_aDouble)
+CAMLprim value bmessage_AddDouble(value v_self, value v_name, value v_aDouble)
 {
 	CAMLparam3(v_self, v_name, v_aDouble);
 	status_t res = ((BMessage*)v_self)->AddDouble(String_val(v_name), (double)v_aDouble);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageAddString_1(value v_self, value v_name, value v_string)
+CAMLprim value bmessage_AddString_1(value v_self, value v_name, value v_string)
 {
 	CAMLparam3(v_self, v_name, v_string);
 	status_t res = ((BMessage*)v_self)->AddString(String_val(v_name), String_val(v_string));
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageAddString_2(value v_self, value v_name, value v_string)
+CAMLprim value bmessage_AddString_2(value v_self, value v_name, value v_string)
 {
 	CAMLparam3(v_self, v_name, v_string);
 	status_t res = ((BMessage*)v_self)->AddString(String_val(v_name), *(BString*)v_string);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageAddPoint(value v_self, value v_name, value v_point)
+CAMLprim value bmessage_AddPoint(value v_self, value v_name, value v_point)
 {
 	CAMLparam3(v_self, v_name, v_point);
 	status_t res = ((BMessage*)v_self)->AddPoint(String_val(v_name), *((BPoint*)v_point));
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageAddRect(value v_self, value v_name, value v_rect)
+CAMLprim value bmessage_AddRect(value v_self, value v_name, value v_rect)
 {
 	CAMLparam3(v_self, v_name, v_rect);
 	status_t res = ((BMessage*)v_self)->AddRect(String_val(v_name), *((BRect*)v_rect));
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageAddRef(value v_self, value v_name, value v_ref)
+CAMLprim value bmessage_AddRef(value v_self, value v_name, value v_ref)
 {
 	CAMLparam3(v_self, v_name, v_ref);
 	status_t res = ((BMessage*)v_self)->AddRef(String_val(v_name), (entry_ref*)v_ref);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageAddMessage(value v_self, value v_name, value v_message)
+CAMLprim value bmessage_AddMessage(value v_self, value v_name, value v_message)
 {
 	CAMLparam3(v_self, v_name, v_message);
 	status_t res = ((BMessage*)v_self)->AddMessage(String_val(v_name), (BMessage*)v_message);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageAddMessenger(value v_self, value v_name, value v_messenger)
+CAMLprim value bmessage_AddMessenger(value v_self, value v_name, value v_messenger)
 {
 	CAMLparam3(v_self, v_name, v_messenger);
 	status_t res = ((BMessage*)v_self)->AddMessenger(String_val(v_name), *(BMessenger*)v_messenger);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageAddPointer(value v_self, value v_name, value v_pointer)
+CAMLprim value bmessage_AddPointer(value v_self, value v_name, value v_pointer)
 {
 	CAMLparam3(v_self, v_name, v_pointer);
 	status_t res = ((BMessage*)v_self)->AddPointer(String_val(v_name), (void*)v_pointer);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageAddFlat(value v_self, value v_name, value v_object, value v_numItems)
+CAMLprim value bmessage_AddFlat(value v_self, value v_name, value v_object, value v_numItems)
 {
 	CAMLparam4(v_self, v_name, v_object, v_numItems);
 	status_t res = ((BMessage*)v_self)->AddFlat(String_val(v_name), (BFlattenable*)v_object, Int_val(v_numItems));
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageAddSpecifier_1(value v_self, value v_message)
+CAMLprim value bmessage_AddSpecifier_1(value v_self, value v_message)
 {
 	CAMLparam2(v_self, v_message);
 	status_t res = ((BMessage*)v_self)->AddSpecifier((BMessage*)v_message);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageAddSpecifier_2(value v_self, value v_property)
+CAMLprim value bmessage_AddSpecifier_2(value v_self, value v_property)
 {
 	CAMLparam2(v_self, v_property);
 	status_t res = ((BMessage*)v_self)->AddSpecifier(String_val(v_property));
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageAddSpecifier_3(value v_self, value v_property, value v_index)
+CAMLprim value bmessage_AddSpecifier_3(value v_self, value v_property, value v_index)
 {
 	CAMLparam3(v_self, v_property, v_index);
 	status_t res = ((BMessage*)v_self)->AddSpecifier(String_val(v_property), Int_val(v_index));
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageAddSpecifier_4(value v_self, value v_property, value v_index, value v_range)
+CAMLprim value bmessage_AddSpecifier_4(value v_self, value v_property, value v_index, value v_range)
 {
 	CAMLparam4(v_self, v_property, v_index, v_range);
 	status_t res = ((BMessage*)v_self)->AddSpecifier(String_val(v_property), Int_val(v_index), Int_val(v_range));
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageAddSpecifier_5(value v_self, value v_property, value v_name)
+CAMLprim value bmessage_AddSpecifier_5(value v_self, value v_property, value v_name)
 {
 	CAMLparam3(v_self, v_property, v_name);
 	status_t res = ((BMessage*)v_self)->AddSpecifier(String_val(v_property), String_val(v_name));
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageCountNames(value v_self, value v_type)
+CAMLprim value bmessage_CountNames(value v_self, value v_type)
 {
 	CAMLparam2(v_self, v_type);
 	int res = ((BMessage*)v_self)->CountNames((type_code)v_type);
 	CAMLreturn(Val_int(res));
 }
-CAMLprim value bmessageFindData_1_native(value v_self, value v_name, value v_type, value v_index, value v_data, value v_numBytes)
+CAMLprim value bmessage_FindData_1_native(value v_self, value v_name, value v_type, value v_index, value v_data, value v_numBytes)
 {
 	CAMLparam5(v_self, v_name, v_type, v_index, v_data);
 	CAMLxparam1(v_numBytes);
 	status_t res = ((BMessage*)v_self)->FindData(String_val(v_name), (type_code)v_type, Int_val(v_index), (const void**)v_data, (ssize_t*)v_numBytes);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageFindData_1_bytecode(value* argv, int argn)
+CAMLprim value bmessage_FindData_1_bytecode(value* argv, int argn)
 {
-	return bmessageFindData_1_native(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]);
+	return bmessage_FindData_1_native(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]);
 }
-CAMLprim value bmessageFindData_2(value v_self, value v_name, value v_type, value v_data, value v_numBytes)
+CAMLprim value bmessage_FindData_2(value v_self, value v_name, value v_type, value v_data, value v_numBytes)
 {
 	CAMLparam5(v_self, v_name, v_type, v_data, v_numBytes);
 	status_t res = ((BMessage*)v_self)->FindData(String_val(v_name), (type_code)v_type, (const void**)v_data, (ssize_t*)v_numBytes);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageFindBool_1(value v_self, value v_name, value v_index, value v_aBool)
+CAMLprim value bmessage_FindBool_1(value v_self, value v_name, value v_index, value v_aBool)
 {
 	CAMLparam4(v_self, v_name, v_index, v_aBool);
 	status_t res = ((BMessage*)v_self)->FindBool(String_val(v_name), Int_val(v_index), (bool*)v_aBool);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageFindBool_2(value v_self, value v_name, value v_aBool)
+CAMLprim value bmessage_FindBool_2(value v_self, value v_name, value v_aBool)
 {
 	CAMLparam3(v_self, v_name, v_aBool);
 	status_t res = ((BMessage*)v_self)->FindBool(String_val(v_name), (bool*)v_aBool);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageFindInt8_1(value v_self, value v_name, value v_index, value v_anInt8)
+CAMLprim value bmessage_FindInt8_1(value v_self, value v_name, value v_index, value v_anInt8)
 {
 	CAMLparam4(v_self, v_name, v_index, v_anInt8);
 	status_t res = ((BMessage*)v_self)->FindInt8(String_val(v_name), Int_val(v_index), (int8*)v_anInt8);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageFindInt8_2(value v_self, value v_name, value v_anInt8)
+CAMLprim value bmessage_FindInt8_2(value v_self, value v_name, value v_anInt8)
 {
 	CAMLparam3(v_self, v_name, v_anInt8);
 	status_t res = ((BMessage*)v_self)->FindInt8(String_val(v_name), (int8*)v_anInt8);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageFindInt16_1(value v_self, value v_name, value v_index, value v_anInt16)
+CAMLprim value bmessage_FindInt16_1(value v_self, value v_name, value v_index, value v_anInt16)
 {
 	CAMLparam4(v_self, v_name, v_index, v_anInt16);
 	status_t res = ((BMessage*)v_self)->FindInt16(String_val(v_name), Int_val(v_index), (int16*)v_anInt16);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageFindInt16_2(value v_self, value v_name, value v_anInt16)
+CAMLprim value bmessage_FindInt16_2(value v_self, value v_name, value v_anInt16)
 {
 	CAMLparam3(v_self, v_name, v_anInt16);
 	status_t res = ((BMessage*)v_self)->FindInt16(String_val(v_name), (int16*)v_anInt16);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageFindInt32_1(value v_self, value v_name, value v_index, value v_anInt32)
+CAMLprim value bmessage_FindInt32_1(value v_self, value v_name, value v_index, value v_anInt32)
 {
 	CAMLparam4(v_self, v_name, v_index, v_anInt32);
 	status_t res = ((BMessage*)v_self)->FindInt32(String_val(v_name), Int_val(v_index), (int32*)v_anInt32);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageFindInt32_2(value v_self, value v_name, value v_anInt32)
+CAMLprim value bmessage_FindInt32_2(value v_self, value v_name, value v_anInt32)
 {
 	CAMLparam3(v_self, v_name, v_anInt32);
 	status_t res = ((BMessage*)v_self)->FindInt32(String_val(v_name), (int32*)v_anInt32);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageFindInt64_1(value v_self, value v_name, value v_index, value v_anInt64)
+CAMLprim value bmessage_FindInt64_1(value v_self, value v_name, value v_index, value v_anInt64)
 {
 	CAMLparam4(v_self, v_name, v_index, v_anInt64);
 	status_t res = ((BMessage*)v_self)->FindInt64(String_val(v_name), Int_val(v_index), (int64*)v_anInt64);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageFindInt64_2(value v_self, value v_name, value v_anInt64)
+CAMLprim value bmessage_FindInt64_2(value v_self, value v_name, value v_anInt64)
 {
 	CAMLparam3(v_self, v_name, v_anInt64);
 	status_t res = ((BMessage*)v_self)->FindInt64(String_val(v_name), (int64*)v_anInt64);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageFindFloat_1(value v_self, value v_name, value v_index, value v_aFloat)
+CAMLprim value bmessage_FindFloat_1(value v_self, value v_name, value v_index, value v_aFloat)
 {
 	CAMLparam4(v_self, v_name, v_index, v_aFloat);
 	status_t res = ((BMessage*)v_self)->FindFloat(String_val(v_name), Int_val(v_index), (float*)v_aFloat);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageFindFloat_2(value v_self, value v_name, value v_aFloat)
+CAMLprim value bmessage_FindFloat_2(value v_self, value v_name, value v_aFloat)
 {
 	CAMLparam3(v_self, v_name, v_aFloat);
 	status_t res = ((BMessage*)v_self)->FindFloat(String_val(v_name), (float*)v_aFloat);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageFindDouble_1(value v_self, value v_name, value v_index, value v_aDouble)
+CAMLprim value bmessage_FindDouble_1(value v_self, value v_name, value v_index, value v_aDouble)
 {
 	CAMLparam4(v_self, v_name, v_index, v_aDouble);
 	status_t res = ((BMessage*)v_self)->FindDouble(String_val(v_name), Int_val(v_index), (double*)v_aDouble);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageFindDouble_2(value v_self, value v_name, value v_aDouble)
+CAMLprim value bmessage_FindDouble_2(value v_self, value v_name, value v_aDouble)
 {
 	CAMLparam3(v_self, v_name, v_aDouble);
 	status_t res = ((BMessage*)v_self)->FindDouble(String_val(v_name), (double*)v_aDouble);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageFindString_1(value v_self, value v_name, value v_index, value v_string)
+CAMLprim value bmessage_FindString_1(value v_self, value v_name, value v_index, value v_string)
 {
 	CAMLparam4(v_self, v_name, v_index, v_string);
 	status_t res = ((BMessage*)v_self)->FindString(String_val(v_name), Int_val(v_index), (const char**)v_string);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageFindString_2(value v_self, value v_name, value v_string)
+CAMLprim value bmessage_FindString_2(value v_self, value v_name, value v_string)
 {
 	CAMLparam3(v_self, v_name, v_string);
 	status_t res = ((BMessage*)v_self)->FindString(String_val(v_name), (const char**)v_string);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageFindString_3(value v_self, value v_name, value v_index, value v_string)
+CAMLprim value bmessage_FindString_3(value v_self, value v_name, value v_index, value v_string)
 {
 	CAMLparam4(v_self, v_name, v_index, v_string);
 	status_t res = ((BMessage*)v_self)->FindString(String_val(v_name), Int_val(v_index), (BString*)v_string);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageFindString_4(value v_self, value v_name, value v_string)
+CAMLprim value bmessage_FindString_4(value v_self, value v_name, value v_string)
 {
 	CAMLparam3(v_self, v_name, v_string);
 	status_t res = ((BMessage*)v_self)->FindString(String_val(v_name), (BString*)v_string);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageFindPoint_1(value v_self, value v_name, value v_index, value v_point)
+CAMLprim value bmessage_FindPoint_1(value v_self, value v_name, value v_index, value v_point)
 {
 	CAMLparam4(v_self, v_name, v_index, v_point);
 	status_t res = ((BMessage*)v_self)->FindPoint(String_val(v_name), Int_val(v_index), (BPoint*)v_point);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageFindPoint_2(value v_self, value v_name, value v_point)
+CAMLprim value bmessage_FindPoint_2(value v_self, value v_name, value v_point)
 {
 	CAMLparam3(v_self, v_name, v_point);
 	status_t res = ((BMessage*)v_self)->FindPoint(String_val(v_name), (BPoint*)v_point);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageFindRect_1(value v_self, value v_name, value v_index, value v_rect)
+CAMLprim value bmessage_FindRect_1(value v_self, value v_name, value v_index, value v_rect)
 {
 	CAMLparam4(v_self, v_name, v_index, v_rect);
 	status_t res = ((BMessage*)v_self)->FindRect(String_val(v_name), Int_val(v_index), (BRect*)v_rect);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageFindRect_2(value v_self, value v_name, value v_rect)
+CAMLprim value bmessage_FindRect_2(value v_self, value v_name, value v_rect)
 {
 	CAMLparam3(v_self, v_name, v_rect);
 	status_t res = ((BMessage*)v_self)->FindRect(String_val(v_name), (BRect*)v_rect);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageFindRef_1(value v_self, value v_name, value v_index, value v_ref)
+CAMLprim value bmessage_FindRef_1(value v_self, value v_name, value v_index, value v_ref)
 {
 	CAMLparam4(v_self, v_name, v_index, v_ref);
 	status_t res = ((BMessage*)v_self)->FindRef(String_val(v_name), Int_val(v_index), (entry_ref*)v_ref);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageFindRef_2(value v_self, value v_name, value v_ref)
+CAMLprim value bmessage_FindRef_2(value v_self, value v_name, value v_ref)
 {
 	CAMLparam3(v_self, v_name, v_ref);
 	status_t res = ((BMessage*)v_self)->FindRef(String_val(v_name), (entry_ref*)v_ref);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageFindMessage_1(value v_self, value v_name, value v_index, value v_message)
+CAMLprim value bmessage_FindMessage_1(value v_self, value v_name, value v_index, value v_message)
 {
 	CAMLparam4(v_self, v_name, v_index, v_message);
 	status_t res = ((BMessage*)v_self)->FindMessage(String_val(v_name), Int_val(v_index), (BMessage*)v_message);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageFindMessage_2(value v_self, value v_name, value v_message)
+CAMLprim value bmessage_FindMessage_2(value v_self, value v_name, value v_message)
 {
 	CAMLparam3(v_self, v_name, v_message);
 	status_t res = ((BMessage*)v_self)->FindMessage(String_val(v_name), (BMessage*)v_message);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageFindMessenger_1(value v_self, value v_name, value v_index, value v_messenger)
+CAMLprim value bmessage_FindMessenger_1(value v_self, value v_name, value v_index, value v_messenger)
 {
 	CAMLparam4(v_self, v_name, v_index, v_messenger);
 	status_t res = ((BMessage*)v_self)->FindMessenger(String_val(v_name), Int_val(v_index), (BMessenger*)v_messenger);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageFindMessenger_2(value v_self, value v_name, value v_messenger)
+CAMLprim value bmessage_FindMessenger_2(value v_self, value v_name, value v_messenger)
 {
 	CAMLparam3(v_self, v_name, v_messenger);
 	status_t res = ((BMessage*)v_self)->FindMessenger(String_val(v_name), (BMessenger*)v_messenger);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageFindPointer_1(value v_self, value v_name, value v_index, value v_pointer)
+CAMLprim value bmessage_FindPointer_1(value v_self, value v_name, value v_index, value v_pointer)
 {
 	CAMLparam4(v_self, v_name, v_index, v_pointer);
 	status_t res = ((BMessage*)v_self)->FindPointer(String_val(v_name), Int_val(v_index), (void**)v_pointer);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageFindPointer_2(value v_self, value v_name, value v_pointer)
+CAMLprim value bmessage_FindPointer_2(value v_self, value v_name, value v_pointer)
 {
 	CAMLparam3(v_self, v_name, v_pointer);
 	status_t res = ((BMessage*)v_self)->FindPointer(String_val(v_name), (void**)v_pointer);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageFindFlat_1(value v_self, value v_name, value v_index, value v_object)
+CAMLprim value bmessage_FindFlat_1(value v_self, value v_name, value v_index, value v_object)
 {
 	CAMLparam4(v_self, v_name, v_index, v_object);
 	status_t res = ((BMessage*)v_self)->FindFlat(String_val(v_name), Int_val(v_index), (BFlattenable*)v_object);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageFindFlat_2(value v_self, value v_name, value v_object)
+CAMLprim value bmessage_FindFlat_2(value v_self, value v_name, value v_object)
 {
 	CAMLparam3(v_self, v_name, v_object);
 	status_t res = ((BMessage*)v_self)->FindFlat(String_val(v_name), (BFlattenable*)v_object);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageFlatten_1(value v_self, value v_object, value v_numBytes)
+CAMLprim value bmessage_Flatten_1(value v_self, value v_object, value v_numBytes)
 {
 	CAMLparam3(v_self, v_object, v_numBytes);
 	status_t res = ((BMessage*)v_self)->Flatten((BDataIO*)v_object, (ssize_t*)v_numBytes);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageFlatten_2(value v_self, value v_address, value v_numBytes)
+CAMLprim value bmessage_Flatten_2(value v_self, value v_address, value v_numBytes)
 {
 	CAMLparam3(v_self, v_address, v_numBytes);
 	status_t res = ((BMessage*)v_self)->Flatten(String_val(v_address), (ssize_t)v_numBytes);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageUnflatten_1(value v_self, value v_object)
+CAMLprim value bmessage_Unflatten_1(value v_self, value v_object)
 {
 	CAMLparam2(v_self, v_object);
 	status_t res = ((BMessage*)v_self)->Unflatten((BDataIO*)v_object);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageUnflatten_2(value v_self, value v_address)
+CAMLprim value bmessage_Unflatten_2(value v_self, value v_address)
 {
 	CAMLparam2(v_self, v_address);
 	status_t res = ((BMessage*)v_self)->Unflatten(String_val(v_address));
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageFlattenedSize(value v_self)
+CAMLprim value bmessage_FlattenedSize(value v_self)
 {
 	CAMLparam1(v_self);
 	ssize_t res = ((BMessage*)v_self)->FlattenedSize();
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageGetCurrentSpecifier(value v_self, value v_index, value v_specifier, value v_what, value v_property)
+CAMLprim value bmessage_GetCurrentSpecifier(value v_self, value v_index, value v_specifier, value v_what, value v_property)
 {
 	CAMLparam5(v_self, v_index, v_specifier, v_what, v_property);
 	status_t res = ((BMessage*)v_self)->GetCurrentSpecifier((int32*)v_index, (BMessage*)v_specifier, (int32*)v_what, (const char**)v_property);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessagePopSpecifier(value v_self)
+CAMLprim value bmessage_PopSpecifier(value v_self)
 {
 	CAMLparam1(v_self);
 	status_t res = ((BMessage*)v_self)->PopSpecifier();
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageGetInfo_1(value v_self, value v_name, value v_typeFound, value v_countFound)
+CAMLprim value bmessage_GetInfo_1(value v_self, value v_name, value v_typeFound, value v_countFound)
 {
 	CAMLparam4(v_self, v_name, v_typeFound, v_countFound);
 	status_t res = ((BMessage*)v_self)->GetInfo(String_val(v_name), (type_code*)v_typeFound, (int32*)v_countFound);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageGetInfo_2(value v_self, value v_name, value v_typeFound, value v_fixedSize)
+CAMLprim value bmessage_GetInfo_2(value v_self, value v_name, value v_typeFound, value v_fixedSize)
 {
 	CAMLparam4(v_self, v_name, v_typeFound, v_fixedSize);
 	status_t res = ((BMessage*)v_self)->GetInfo(String_val(v_name), (type_code*)v_typeFound, (bool*)v_fixedSize);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageGetInfo_3_native(value v_self, value v_type, value v_index, value v_nameFound, value v_typeFound, value v_countFound)
+CAMLprim value bmessage_GetInfo_3_native(value v_self, value v_type, value v_index, value v_nameFound, value v_typeFound, value v_countFound)
 {
 	CAMLparam5(v_self, v_type, v_index, v_nameFound, v_typeFound);
 	CAMLxparam1(v_countFound);
 	status_t res = ((BMessage*)v_self)->GetInfo((type_code)v_type, Int_val(v_index), (char**)v_nameFound, (type_code*)v_typeFound, (int32*)v_countFound);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageGetInfo_3_bytecode(value* argv, int argn)
+CAMLprim value bmessage_GetInfo_3_bytecode(value* argv, int argn)
 {
-	return bmessageGetInfo_3_native(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]);
+	return bmessage_GetInfo_3_native(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]);
 }
-CAMLprim value bmessageHasSpecifiers(value v_self)
+CAMLprim value bmessage_HasSpecifiers(value v_self)
 {
 	CAMLparam1(v_self);
 	bool res = ((BMessage*)v_self)->HasSpecifiers();
 	CAMLreturn(Val_bool(res));
 }
-CAMLprim value bmessageIsSystem(value v_self)
+CAMLprim value bmessage_IsSystem(value v_self)
 {
 	CAMLparam1(v_self);
 	bool res = ((BMessage*)v_self)->IsSystem();
 	CAMLreturn(Val_bool(res));
 }
-CAMLprim value bmessageMakeEmpty(value v_self)
+CAMLprim value bmessage_MakeEmpty(value v_self)
 {
 	CAMLparam1(v_self);
 	status_t res = ((BMessage*)v_self)->MakeEmpty();
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageIsEmpty(value v_self)
+CAMLprim value bmessage_IsEmpty(value v_self)
 {
 	CAMLparam1(v_self);
 	bool res = ((BMessage*)v_self)->IsEmpty();
 	CAMLreturn(Val_bool(res));
 }
-CAMLprim value bmessagePrintToStream(value v_self)
+CAMLprim value bmessage_PrintToStream(value v_self)
 {
 	CAMLparam1(v_self);
 	((BMessage*)v_self)->PrintToStream();
 	CAMLreturn(Val_unit);
 }
-CAMLprim value bmessageRemoveName(value v_self, value v_name)
+CAMLprim value bmessage_RemoveName(value v_self, value v_name)
 {
 	CAMLparam2(v_self, v_name);
 	status_t res = ((BMessage*)v_self)->RemoveName(String_val(v_name));
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageRemoveData(value v_self, value v_name, value v_index)
+CAMLprim value bmessage_RemoveData(value v_self, value v_name, value v_index)
 {
 	CAMLparam3(v_self, v_name, v_index);
 	status_t res = ((BMessage*)v_self)->RemoveData(String_val(v_name), Int_val(v_index));
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageReplaceData_1(value v_self, value v_name, value v_type, value v_data, value v_numBytes)
+CAMLprim value bmessage_ReplaceData_1(value v_self, value v_name, value v_type, value v_data, value v_numBytes)
 {
 	CAMLparam5(v_self, v_name, v_type, v_data, v_numBytes);
 	status_t res = ((BMessage*)v_self)->ReplaceData(String_val(v_name), (type_code)v_type, (void*)v_data, (ssize_t)v_numBytes);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageReplaceData_2_native(value v_self, value v_name, value v_type, value v_index, value v_data, value v_numBytes)
+CAMLprim value bmessage_ReplaceData_2_native(value v_self, value v_name, value v_type, value v_index, value v_data, value v_numBytes)
 {
 	CAMLparam5(v_self, v_name, v_type, v_index, v_data);
 	CAMLxparam1(v_numBytes);
 	status_t res = ((BMessage*)v_self)->ReplaceData(String_val(v_name), (type_code)v_type, Int_val(v_index), (void*)v_data, (ssize_t)v_numBytes);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageReplaceData_2_bytecode(value* argv, int argn)
+CAMLprim value bmessage_ReplaceData_2_bytecode(value* argv, int argn)
 {
-	return bmessageReplaceData_2_native(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]);
+	return bmessage_ReplaceData_2_native(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]);
 }
-CAMLprim value bmessageReplaceBool_1(value v_self, value v_name, value v_aBool)
+CAMLprim value bmessage_ReplaceBool_1(value v_self, value v_name, value v_aBool)
 {
 	CAMLparam3(v_self, v_name, v_aBool);
 	status_t res = ((BMessage*)v_self)->ReplaceBool(String_val(v_name), Bool_val(v_aBool));
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageReplaceBool_2(value v_self, value v_name, value v_index, value v_aBool)
+CAMLprim value bmessage_ReplaceBool_2(value v_self, value v_name, value v_index, value v_aBool)
 {
 	CAMLparam4(v_self, v_name, v_index, v_aBool);
 	status_t res = ((BMessage*)v_self)->ReplaceBool(String_val(v_name), Int_val(v_index), Bool_val(v_aBool));
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageReplaceInt8_1(value v_self, value v_name, value v_anInt8)
+CAMLprim value bmessage_ReplaceInt8_1(value v_self, value v_name, value v_anInt8)
 {
 	CAMLparam3(v_self, v_name, v_anInt8);
 	status_t res = ((BMessage*)v_self)->ReplaceInt8(String_val(v_name), (int8)v_anInt8);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageReplaceInt8_2(value v_self, value v_name, value v_index, value v_anInt8)
+CAMLprim value bmessage_ReplaceInt8_2(value v_self, value v_name, value v_index, value v_anInt8)
 {
 	CAMLparam4(v_self, v_name, v_index, v_anInt8);
 	status_t res = ((BMessage*)v_self)->ReplaceInt8(String_val(v_name), Int_val(v_index), (int8)v_anInt8);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageReplaceInt16_1(value v_self, value v_name, value v_anInt16)
+CAMLprim value bmessage_ReplaceInt16_1(value v_self, value v_name, value v_anInt16)
 {
 	CAMLparam3(v_self, v_name, v_anInt16);
 	status_t res = ((BMessage*)v_self)->ReplaceInt16(String_val(v_name), (int16)v_anInt16);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageReplaceInt16_2(value v_self, value v_name, value v_index, value v_anInt16)
+CAMLprim value bmessage_ReplaceInt16_2(value v_self, value v_name, value v_index, value v_anInt16)
 {
 	CAMLparam4(v_self, v_name, v_index, v_anInt16);
 	status_t res = ((BMessage*)v_self)->ReplaceInt16(String_val(v_name), Int_val(v_index), (int16)v_anInt16);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageReplaceInt32_1(value v_self, value v_name, value v_anInt32)
+CAMLprim value bmessage_ReplaceInt32_1(value v_self, value v_name, value v_anInt32)
 {
 	CAMLparam3(v_self, v_name, v_anInt32);
 	status_t res = ((BMessage*)v_self)->ReplaceInt32(String_val(v_name), Int_val(v_anInt32));
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageReplaceInt32_2(value v_self, value v_name, value v_index, value v_anInt32)
+CAMLprim value bmessage_ReplaceInt32_2(value v_self, value v_name, value v_index, value v_anInt32)
 {
 	CAMLparam4(v_self, v_name, v_index, v_anInt32);
 	status_t res = ((BMessage*)v_self)->ReplaceInt32(String_val(v_name), Int_val(v_index), Int_val(v_anInt32));
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageReplaceInt64_1(value v_self, value v_name, value v_anInt64)
+CAMLprim value bmessage_ReplaceInt64_1(value v_self, value v_name, value v_anInt64)
 {
 	CAMLparam3(v_self, v_name, v_anInt64);
 	status_t res = ((BMessage*)v_self)->ReplaceInt64(String_val(v_name), (int64)v_anInt64);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageReplaceInt64_2(value v_self, value v_name, value v_index, value v_anInt64)
+CAMLprim value bmessage_ReplaceInt64_2(value v_self, value v_name, value v_index, value v_anInt64)
 {
 	CAMLparam4(v_self, v_name, v_index, v_anInt64);
 	status_t res = ((BMessage*)v_self)->ReplaceInt64(String_val(v_name), Int_val(v_index), (int64)v_anInt64);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageReplaceFloat_1(value v_self, value v_name, value v_aFloat)
+CAMLprim value bmessage_ReplaceFloat_1(value v_self, value v_name, value v_aFloat)
 {
 	CAMLparam3(v_self, v_name, v_aFloat);
 	status_t res = ((BMessage*)v_self)->ReplaceFloat(String_val(v_name), Double_val(v_aFloat));
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageReplaceFloat_2(value v_self, value v_name, value v_index, value v_aFloat)
+CAMLprim value bmessage_ReplaceFloat_2(value v_self, value v_name, value v_index, value v_aFloat)
 {
 	CAMLparam4(v_self, v_name, v_index, v_aFloat);
 	status_t res = ((BMessage*)v_self)->ReplaceFloat(String_val(v_name), Int_val(v_index), Double_val(v_aFloat));
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageReplaceDouble_1(value v_self, value v_name, value v_aDouble)
+CAMLprim value bmessage_ReplaceDouble_1(value v_self, value v_name, value v_aDouble)
 {
 	CAMLparam3(v_self, v_name, v_aDouble);
 	status_t res = ((BMessage*)v_self)->ReplaceDouble(String_val(v_name), (double)v_aDouble);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageReplaceDouble_2(value v_self, value v_name, value v_index, value v_aDouble)
+CAMLprim value bmessage_ReplaceDouble_2(value v_self, value v_name, value v_index, value v_aDouble)
 {
 	CAMLparam4(v_self, v_name, v_index, v_aDouble);
 	status_t res = ((BMessage*)v_self)->ReplaceDouble(String_val(v_name), Int_val(v_index), (double)v_aDouble);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageReplaceString_1(value v_self, value v_name, value v_aString)
+CAMLprim value bmessage_ReplaceString_1(value v_self, value v_name, value v_aString)
 {
 	CAMLparam3(v_self, v_name, v_aString);
 	status_t res = ((BMessage*)v_self)->ReplaceString(String_val(v_name), String_val(v_aString));
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageReplaceString_2(value v_self, value v_name, value v_index, value v_aString)
+CAMLprim value bmessage_ReplaceString_2(value v_self, value v_name, value v_index, value v_aString)
 {
 	CAMLparam4(v_self, v_name, v_index, v_aString);
 	status_t res = ((BMessage*)v_self)->ReplaceString(String_val(v_name), Int_val(v_index), String_val(v_aString));
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageReplacePoint_1(value v_self, value v_name, value v_point)
+CAMLprim value bmessage_ReplacePoint_1(value v_self, value v_name, value v_point)
 {
 	CAMLparam3(v_self, v_name, v_point);
 	status_t res = ((BMessage*)v_self)->ReplacePoint(String_val(v_name), *((BPoint*)v_point));
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageReplacePoint_2(value v_self, value v_name, value v_index, value v_point)
+CAMLprim value bmessage_ReplacePoint_2(value v_self, value v_name, value v_index, value v_point)
 {
 	CAMLparam4(v_self, v_name, v_index, v_point);
 	status_t res = ((BMessage*)v_self)->ReplacePoint(String_val(v_name), Int_val(v_index), *((BPoint*)v_point));
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageReplaceRect_1(value v_self, value v_name, value v_rect)
+CAMLprim value bmessage_ReplaceRect_1(value v_self, value v_name, value v_rect)
 {
 	CAMLparam3(v_self, v_name, v_rect);
 	status_t res = ((BMessage*)v_self)->ReplaceRect(String_val(v_name), *((BRect*)v_rect));
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageReplaceRect_2(value v_self, value v_name, value v_index, value v_rect)
+CAMLprim value bmessage_ReplaceRect_2(value v_self, value v_name, value v_index, value v_rect)
 {
 	CAMLparam4(v_self, v_name, v_index, v_rect);
 	status_t res = ((BMessage*)v_self)->ReplaceRect(String_val(v_name), Int_val(v_index), *((BRect*)v_rect));
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageReplaceRef_1(value v_self, value v_name, value v_ref)
+CAMLprim value bmessage_ReplaceRef_1(value v_self, value v_name, value v_ref)
 {
 	CAMLparam3(v_self, v_name, v_ref);
 	status_t res = ((BMessage*)v_self)->ReplaceRef(String_val(v_name), (entry_ref*)v_ref);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageReplaceRef_2(value v_self, value v_name, value v_index, value v_ref)
+CAMLprim value bmessage_ReplaceRef_2(value v_self, value v_name, value v_index, value v_ref)
 {
 	CAMLparam4(v_self, v_name, v_index, v_ref);
 	status_t res = ((BMessage*)v_self)->ReplaceRef(String_val(v_name), Int_val(v_index), (entry_ref*)v_ref);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageReplaceMessage_1(value v_self, value v_name, value v_message)
+CAMLprim value bmessage_ReplaceMessage_1(value v_self, value v_name, value v_message)
 {
 	CAMLparam3(v_self, v_name, v_message);
 	status_t res = ((BMessage*)v_self)->ReplaceMessage(String_val(v_name), (BMessage*)v_message);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageReplaceMessage_2(value v_self, value v_name, value v_index, value v_message)
+CAMLprim value bmessage_ReplaceMessage_2(value v_self, value v_name, value v_index, value v_message)
 {
 	CAMLparam4(v_self, v_name, v_index, v_message);
 	status_t res = ((BMessage*)v_self)->ReplaceMessage(String_val(v_name), Int_val(v_index), (BMessage*)v_message);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageReplaceMessenger_1(value v_self, value v_name, value v_messenger)
+CAMLprim value bmessage_ReplaceMessenger_1(value v_self, value v_name, value v_messenger)
 {
 	CAMLparam3(v_self, v_name, v_messenger);
 	status_t res = ((BMessage*)v_self)->ReplaceMessenger(String_val(v_name), *(BMessenger*)v_messenger);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageReplaceMessenger_2(value v_self, value v_name, value v_index, value v_messenger)
+CAMLprim value bmessage_ReplaceMessenger_2(value v_self, value v_name, value v_index, value v_messenger)
 {
 	CAMLparam4(v_self, v_name, v_index, v_messenger);
 	status_t res = ((BMessage*)v_self)->ReplaceMessenger(String_val(v_name), Int_val(v_index), *(BMessenger*)v_messenger);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageReplacePointer_1(value v_self, value v_name, value v_pointer)
+CAMLprim value bmessage_ReplacePointer_1(value v_self, value v_name, value v_pointer)
 {
 	CAMLparam3(v_self, v_name, v_pointer);
 	status_t res = ((BMessage*)v_self)->ReplacePointer(String_val(v_name), (void*)v_pointer);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageReplacePointer_2(value v_self, value v_name, value v_index, value v_pointer)
+CAMLprim value bmessage_ReplacePointer_2(value v_self, value v_name, value v_index, value v_pointer)
 {
 	CAMLparam4(v_self, v_name, v_index, v_pointer);
 	status_t res = ((BMessage*)v_self)->ReplacePointer(String_val(v_name), Int_val(v_index), (void*)v_pointer);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageReplaceFlat_1(value v_self, value v_name, value v_object)
+CAMLprim value bmessage_ReplaceFlat_1(value v_self, value v_name, value v_object)
 {
 	CAMLparam3(v_self, v_name, v_object);
 	status_t res = ((BMessage*)v_self)->ReplaceFlat(String_val(v_name), (BFlattenable*)v_object);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageReplaceFlat_2(value v_self, value v_name, value v_index, value v_object)
+CAMLprim value bmessage_ReplaceFlat_2(value v_self, value v_name, value v_index, value v_object)
 {
 	CAMLparam4(v_self, v_name, v_index, v_object);
 	status_t res = ((BMessage*)v_self)->ReplaceFlat(String_val(v_name), Int_val(v_index), (BFlattenable*)v_object);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageReturnAddress(value v_self)
+CAMLprim value bmessage_ReturnAddress(value v_self)
 {
 	CAMLparam1(v_self);
 	BMessenger res = ((BMessage*)v_self)->ReturnAddress();
 	CAMLreturn((value)&res);
 }
-CAMLprim value bmessageSendReply_1(value v_self, value v_message, value v_reply, value v_sendTimeout, value v_replyTimeout)
+CAMLprim value bmessage_SendReply_1(value v_self, value v_message, value v_reply, value v_sendTimeout, value v_replyTimeout)
 {
 	CAMLparam5(v_self, v_message, v_reply, v_sendTimeout, v_replyTimeout);
 	status_t res = ((BMessage*)v_self)->SendReply((BMessage*)v_message, (BMessage*)v_reply, (bigtime_t)v_sendTimeout, (bigtime_t)v_replyTimeout);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageSendReply_2(value v_self, value v_message, value v_replyHandler, value v_sendTimeout)
+CAMLprim value bmessage_SendReply_2(value v_self, value v_message, value v_replyHandler, value v_sendTimeout)
 {
 	CAMLparam4(v_self, v_message, v_replyHandler, v_sendTimeout);
 	status_t res = ((BMessage*)v_self)->SendReply((BMessage*)v_message, (BHandler*)v_replyHandler, (bigtime_t)v_sendTimeout);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageSendReply_3(value v_self, value v_command, value v_reply)
+CAMLprim value bmessage_SendReply_3(value v_self, value v_command, value v_reply)
 {
 	CAMLparam3(v_self, v_command, v_reply);
 	status_t res = ((BMessage*)v_self)->SendReply(Int_val(v_command), (BMessage*)v_reply);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageSendReply_4(value v_self, value v_command, value v_replyHandler)
+CAMLprim value bmessage_SendReply_4(value v_self, value v_command, value v_replyHandler)
 {
 	CAMLparam3(v_self, v_command, v_replyHandler);
 	status_t res = ((BMessage*)v_self)->SendReply(Int_val(v_command), (BHandler*)v_replyHandler);
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageWasDelivered(value v_self)
+CAMLprim value bmessage_WasDelivered(value v_self)
 {
 	CAMLparam1(v_self);
 	bool res = ((BMessage*)v_self)->WasDelivered();
 	CAMLreturn(Val_bool(res));
 }
-CAMLprim value bmessageIsSourceRemote(value v_self)
+CAMLprim value bmessage_IsSourceRemote(value v_self)
 {
 	CAMLparam1(v_self);
 	bool res = ((BMessage*)v_self)->IsSourceRemote();
 	CAMLreturn(Val_bool(res));
 }
-CAMLprim value bmessageIsSourceWaiting(value v_self)
+CAMLprim value bmessage_IsSourceWaiting(value v_self)
 {
 	CAMLparam1(v_self);
 	bool res = ((BMessage*)v_self)->IsSourceWaiting();
 	CAMLreturn(Val_bool(res));
 }
-CAMLprim value bmessageIsReply(value v_self)
+CAMLprim value bmessage_IsReply(value v_self)
 {
 	CAMLparam1(v_self);
 	bool res = ((BMessage*)v_self)->IsReply();
 	CAMLreturn(Val_bool(res));
 }
-CAMLprim value bmessagePrevious(value v_self)
+CAMLprim value bmessage_Previous(value v_self)
 {
 	CAMLparam1(v_self);
 	const BMessage* res = ((BMessage*)v_self)->Previous();
 	CAMLreturn((value)res);
 }
-CAMLprim value bmessageWasDropped(value v_self)
+CAMLprim value bmessage_WasDropped(value v_self)
 {
 	CAMLparam1(v_self);
 	bool res = ((BMessage*)v_self)->WasDropped();
 	CAMLreturn(Val_bool(res));
 }
-CAMLprim value bmessageDropPoint(value v_self, value v_offset)
+CAMLprim value bmessage_DropPoint(value v_self, value v_offset)
 {
 	CAMLparam2(v_self, v_offset);
 	BPoint res = ((BMessage*)v_self)->DropPoint((BPoint*)v_offset);

File BViewML.cpp

View file
 	closure_WindowActivated = cb_WindowActivated;
 }
 extern "C" {
+CAMLprim value bview_null()
+{
+	CAMLparam0();
+	CAMLreturn((value)0);
+}
 CAMLprim value bview_constructor_1(value v_frame, value v_name, value v_resizingMode, value v_flags)
 {
 	CAMLparam4(v_frame, v_name, v_resizingMode, v_flags);
 	((BViewML*)v_self)->setWindowActivated(v_cb);
 	CAMLreturn(Val_unit);
 }
+CAMLprim value bview_Bounds(value v_self)
+{
+	CAMLparam1(v_self);
+	BRect res = ((BView*)v_self)->Bounds();
+	CAMLreturn((value)&res);
 }
+CAMLprim value bview_AddChild(value v_self, value v_aView, value v_sibling)
+{
+	CAMLparam3(v_self, v_aView, v_sibling);
+	((BView*)v_self)->AddChild((BView*)v_aView, (BView*)v_sibling);
+	CAMLreturn(Val_unit);
+}
+}

File BWindowML.cpp

View file
 #include "BWindowML.hpp"
+#include <stdio.h>
 BWindowML::BWindowML(BRect frame, const char * title, window_type type, int flags, int workspaces)
 	:BWindow(frame, title, type, flags, workspaces)
 {
 void
 BWindowML::FrameResized(float width, float height)
 {
+	printf("BWindow -> FrameResized");
 	if (closure_FrameResized)
 	{
 		value arglist [] = { (value)width, (value)height };

File Makefile

View file
 	ocamlmklib -o bWindow bWindow.cmx
 
 hello_world : all
-	ocamlopt -I . -cclib -lbe bWindow.cmxa bView.cmxa bRect.cmxa bButton.cmxa bMessage.cmxa bApplication.cmxa caller.ml -o caller.opt
+	ocamlopt -I . -cclib -lstdc++ -cclib -lbe bWindow.cmxa bView.cmxa bRect.cmxa bButton.cmxa bMessage.cmxa bApplication.cmxa beapi.cmxa caller.ml -o caller.opt

File bButton.ml

View file
 		match archive, frame, label, resizingMode, message, flags, name with
 		| None, Some frame, Some label, Some resizingMode, Some message, Some flags, Some name -> bbutton_constructor_1 frame name label message resizingMode flags
 		| Some archive, None, None, None, None, None, None -> bbutton_constructor_2 archive
-		| None, None, None, None, None, None, None -> invalid_arg "Wrong arg in BButton.constructor"
+		| _, _, _, _, _, _, _ -> invalid_arg "Wrong arg in BButton.constructor"
 
 
 	let setAttachedToWindow ~self ~cb () =

File bMessage.ml

View file
 	Beapi.bmessage -> Beapi.type_code -> int =
 	"bmessage_CountNames"
 external bmessage_FindData_1 :
-	string -> Beapi.type_code -> int -> Beapi.pointer list -> Beapi.ssize_t -> Beapi.status_t =
-	"bmessage_FindData_1"
+	Beapi.bmessage -> string -> Beapi.type_code -> int -> Beapi.pointer list -> Beapi.ssize_t -> Beapi.status_t =
+	"bmessage_FindData_1_native"
+	"bmessage_FindData_1_bytecode"
 external bmessage_FindData_2 :
-	string -> Beapi.type_code -> Beapi.pointer list -> Beapi.ssize_t -> Beapi.status_t =
+	Beapi.bmessage -> string -> Beapi.type_code -> Beapi.pointer list -> Beapi.ssize_t -> Beapi.status_t =
 	"bmessage_FindData_2"
 external bmessage_FindBool_1 :
 	string -> int -> bool -> Beapi.status_t =
 	Beapi.bmessage -> Beapi.status_t =
 	"bmessage_PopSpecifier"
 external bmessage_GetInfo_1 :
-	string -> Beapi.type_code -> int32 -> Beapi.status_t =
+	Beapi.bmessage -> string -> Beapi.type_code -> int32 -> Beapi.status_t =
 	"bmessage_GetInfo_1"
 external bmessage_GetInfo_2 :
-	string -> Beapi.type_code -> bool -> Beapi.status_t =
+	Beapi.bmessage -> string -> Beapi.type_code -> bool -> Beapi.status_t =
 	"bmessage_GetInfo_2"
 external bmessage_GetInfo_3 :
-	Beapi.type_code -> int -> char -> Beapi.type_code -> int32 -> Beapi.status_t =
-	"bmessage_GetInfo_3"
+	Beapi.bmessage -> Beapi.type_code -> int -> char -> Beapi.type_code -> int32 -> Beapi.status_t =
+	"bmessage_GetInfo_3_native"
+	"bmessage_GetInfo_3_bytecode"
 external bmessage_HasSpecifiers :
 	Beapi.bmessage -> bool =
 	"bmessage_HasSpecifiers"
 	Beapi.bmessage -> string -> int -> Beapi.status_t =
 	"bmessage_RemoveData"
 external bmessage_ReplaceData_1 :
-	string -> Beapi.type_code -> Beapi.pointer -> Beapi.ssize_t -> Beapi.status_t =
+	Beapi.bmessage -> string -> Beapi.type_code -> Beapi.pointer -> Beapi.ssize_t -> Beapi.status_t =
 	"bmessage_ReplaceData_1"
 external bmessage_ReplaceData_2 :
-	string -> Beapi.type_code -> int -> Beapi.pointer -> Beapi.ssize_t -> Beapi.status_t =
-	"bmessage_ReplaceData_2"
+	Beapi.bmessage -> string -> Beapi.type_code -> int -> Beapi.pointer -> Beapi.ssize_t -> Beapi.status_t =
+	"bmessage_ReplaceData_2_native"
+	"bmessage_ReplaceData_2_bytecode"
 external bmessage_ReplaceBool_1 :
 	string -> bool -> Beapi.status_t =
 	"bmessage_ReplaceBool_1"
 	let count_names ~self ~data_type () =
 		bmessage_CountNames self data_type
 
-	let find_data ?data ?numBytes ?data_type ?index ?name () =
+	let find_data ~self ?data ?numBytes ?data_type ?index ?name () =
 		match data, numBytes, data_type, index, name with
-		| Some data, Some numBytes, Some data_type, Some index, Some name -> bmessage_FindData_1 name data_type index data numBytes
-		| Some data, Some numBytes, Some data_type, None, Some name -> bmessage_FindData_2 name data_type data numBytes
+		| Some data, Some numBytes, Some data_type, Some index, Some name -> bmessage_FindData_1 self name data_type index data numBytes
+		| Some data, Some numBytes, Some data_type, None, Some name -> bmessage_FindData_2 self name data_type data numBytes
 		| None, None, None, None, None -> invalid_arg "Wrong arg in BMessage.FindData"
 
 
 	let pop_specifier ~self () =
 		bmessage_PopSpecifier self
 
-	let get_info ?countFound ?nameFound ?fixedSize ?data_type ?index ?typeFound ?name () =
+	let get_info ~self ?countFound ?nameFound ?fixedSize ?data_type ?index ?typeFound ?name () =
 		match countFound, nameFound, fixedSize, data_type, index, typeFound, name with
-		| Some countFound, None, None, None, None, Some typeFound, Some name -> bmessage_GetInfo_1 name typeFound countFound
-		| None, None, Some fixedSize, None, None, Some typeFound, Some name -> bmessage_GetInfo_2 name typeFound fixedSize
-		| Some countFound, Some nameFound, None, Some data_type, Some index, Some typeFound, None -> bmessage_GetInfo_3 data_type index nameFound typeFound countFound
+		| Some countFound, None, None, None, None, Some typeFound, Some name -> bmessage_GetInfo_1 self name typeFound countFound
+		| None, None, Some fixedSize, None, None, Some typeFound, Some name -> bmessage_GetInfo_2 self name typeFound fixedSize
+		| Some countFound, Some nameFound, None, Some data_type, Some index, Some typeFound, None -> bmessage_GetInfo_3 self data_type index nameFound typeFound countFound
 		| None, None, None, None, None, None, None -> invalid_arg "Wrong arg in BMessage.GetInfo"
 
 
 	let remove_data ~self ~name ~index () =
 		bmessage_RemoveData self name index
 
-	let replace_data ?data ?data_type ?index ?numBytes ?name () =
+	let replace_data ~self ?data ?data_type ?index ?numBytes ?name () =
 		match data, data_type, index, numBytes, name with
-		| Some data, Some data_type, None, Some numBytes, Some name -> bmessage_ReplaceData_1 name data_type data numBytes
-		| Some data, Some data_type, Some index, Some numBytes, Some name -> bmessage_ReplaceData_2 name data_type index data numBytes
+		| Some data, Some data_type, None, Some numBytes, Some name -> bmessage_ReplaceData_1 self name data_type data numBytes
+		| Some data, Some data_type, Some index, Some numBytes, Some name -> bmessage_ReplaceData_2  self name data_type index data numBytes
 		| None, None, None, None, None -> invalid_arg "Wrong arg in BMessage.ReplaceData"
 
 

File bView.ml

View file
+external null :
+	unit -> Beapi.bview =
+	"bview_null"
+
+
 external bview_constructor_1 :
 	Beapi.brect -> string -> int -> int -> Beapi.bview =
 	"bview_constructor_1"
 external bview_setWindowActivated :
 	Beapi.bview -> 'a -> unit =
 	"bview_setWindowActivated"
+external bview_Bounds :
+	Beapi.bview -> Beapi.brect =
+	"bview_Bounds"
+external bview_AddChild :
+	Beapi.bview -> Beapi.bview -> Beapi.bview -> unit =
+	"bview_AddChild"
 
 
 
 	let setWindowActivated ~self ~cb () =
 		bview_setWindowActivated self cb
 
+let bounds ~self () = bview_Bounds self
+
+let add_child ~self ~aView ~sibling () = bview_AddChild self aView sibling

File beapi.ml

View file
 	| B_FLOATTING_WINDOW
 	| B_BORDERED_WINDOW
 	| B_UNTYPED_WINDOW
+
+let b_FOLLOW_ALL_SIDES = 4660
+let b_WILL_DRAW = 536870912
+
+external bview_of_bbutton :
+	bbutton -> bview =
+	"bview_of_bbutton"

File caller.ml

View file
         ~window_type:Beapi.B_UNTYPED_WINDOW ~flags:0 ~workspaces:0 ()
     val quit_requested = fun () -> 1
     val message_received = fun message -> message
-	method bounds = BWindow.bounds ~self:object_pointer ()
+    method bounds = BWindow.bounds ~self:object_pointer ()
+    method add_child ~aView ~sibling =
+      BWindow.add_child ~self:object_pointer ~aView:aView ~sibling:sibling ()
     method show = BWindow.show ~self:object_pointer ()
 	initializer
-	  let view = BView.bview self#bounds
-	    BView.null Beapi.b_FOLLOW_ALL_SIDES Beapi.b_WILL_DRAW in
+	  let view = BView.bview ~frame:self#bounds
+	    ~name:"Hello, Gaiku" ~resizingMode:Beapi.b_FOLLOW_ALL_SIDES
+            ~flags:Beapi.b_WILL_DRAW () in
 	  self#add_child ~aView:view ~sibling:(BView.null ()) ;
-	  let button = BButton.bbutton (BView.bounds ~self:view ())
-	    "Hello" "Hello" (BMessage.bmessage 1 ()) in
-	  BView.add_child ~aView:(Beapi.bview_of_bbutton button)
-	    ~sibling:(BView.null ())
+(*	  let button = BButton.bbutton ~frame:(BView.bounds ~self:view ())
+	    ~name:"Hello" ~label:"Hello" ~message:(BMessage.bmessage ~command:1 ()) ~resizingMode:Beapi.b_FOLLOW_ALL_SIDES ~flags:Beapi.b_WILL_DRAW () in
+	  BView.add_child ~self:view ~aView:(Beapi.bview_of_bbutton button)
+	    ~sibling:(BView.null ()) ()*)
   end
 
 class hello_haiku =