(ProtobufCMessageInit) scf_ecomponent__init,
NULL,NULL,NULL /* reserved[123] */
};
-static const ProtobufCFieldDescriptor scf_efunction__field_descriptors[3] =
+static const ProtobufCFieldDescriptor scf_efunction__field_descriptors[7] =
{
{
"name",
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
+ {
+ "x",
+ 4,
+ PROTOBUF_C_LABEL_REQUIRED,
+ PROTOBUF_C_TYPE_UINT32,
+ 0, /* quantifier_offset */
+ offsetof(ScfEfunction, x),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "y",
+ 5,
+ PROTOBUF_C_LABEL_REQUIRED,
+ PROTOBUF_C_TYPE_UINT32,
+ 0, /* quantifier_offset */
+ offsetof(ScfEfunction, y),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "w",
+ 6,
+ PROTOBUF_C_LABEL_REQUIRED,
+ PROTOBUF_C_TYPE_UINT32,
+ 0, /* quantifier_offset */
+ offsetof(ScfEfunction, w),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "h",
+ 7,
+ PROTOBUF_C_LABEL_REQUIRED,
+ PROTOBUF_C_TYPE_UINT32,
+ 0, /* quantifier_offset */
+ offsetof(ScfEfunction, h),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0,NULL,NULL /* reserved1,reserved2, etc */
+ },
};
static const unsigned scf_efunction__field_indices_by_name[] = {
1, /* field[1] = components */
2, /* field[2] = elines */
+ 6, /* field[6] = h */
0, /* field[0] = name */
+ 5, /* field[5] = w */
+ 3, /* field[3] = x */
+ 4, /* field[4] = y */
};
static const ProtobufCIntRange scf_efunction__number_ranges[1 + 1] =
{
{ 1, 0 },
- { 0, 3 }
+ { 0, 7 }
};
const ProtobufCMessageDescriptor scf_efunction__descriptor =
{
"ScfEfunction",
"",
sizeof(ScfEfunction),
- 3,
+ 7,
scf_efunction__field_descriptors,
scf_efunction__field_indices_by_name,
1, scf_efunction__number_ranges,
ScfEcomponent **components;
size_t n_elines;
ScfEline **elines;
+ uint32_t x;
+ uint32_t y;
+ uint32_t w;
+ uint32_t h;
};
#define SCF_EFUNCTION__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&scf_efunction__descriptor) \
- , NULL, 0,NULL, 0,NULL }
+ , NULL, 0,NULL, 0,NULL, 0, 0, 0, 0 }
struct _ScfEboard
const ScfEline* el0 = *(const ScfEline**)v0;
const ScfEline* el1 = *(const ScfEline**)v1;
- if (el0->n_conns < el1->n_conns)
+ if (el0->n_pins < el1->n_pins)
return 1;
- if (el0->n_conns > el1->n_conns)
+ if (el0->n_pins > el1->n_pins)
return -1;
- if (el0->n_pins < el1->n_pins)
+ if (el0->n_conns < el1->n_conns)
return 1;
- if (el0->n_pins > el1->n_pins)
+ if (el0->n_conns > el1->n_conns)
return -1;
return 0;
return 0;
}
+int ses_layout_function(ScfEfunction* f, uint32_t d, uint32_t bx, uint32_t by, uint32_t bw, uint32_t bh)
+{
+ ScfEline* el;
+ ScfEconn* ec;
+
+ size_t i;
+ size_t j;
+
+ for (i = 0; i < f->n_elines; i++) {
+ el = f->elines[i];
+
+ }
+
+ return 0;
+}
+
int ses_layout_draw()
{
cairo_surface_t *surface;
return 0;
}
-int ses_layout_board(ScfEboard* b, int x, int y, int w, int h)
+int ses_layout_board(ScfEboard* b, uint32_t x, uint32_t y, uint32_t w, uint32_t h)
{
ScfEcomponent* c;
ScfEfunction* f;