Add type assertions near where objects are assumed to be text.
[geda-gaf/berndj.git] / TODO
blob1a360566027d981b6ecb111bfb93b531b0175e28
1 Use relative path for symbol names, not just basename.  Otherwise we get only
2 the first symbol with a name like resistor-1.sch.
4 Get rid of duplicated papersizes.h.
6 Replace random #define constants with enums.
8 Use object signalling to change colours on o_attrib_free().
10 Use object signalling to run s_conn_update_*(). Deleting the tile system
11 has introduced many new references to page_current.
13 Factor out
14   switch (o->type) {
15   case OBJ_BUS:
16   case OBJ_NET:
17   case OBJ_PIN:
18     /* Only these objects participate in connections. */
19     break;
20   }
22 Page iterator macros a la Freeciv.
24 Replace sqrt(x^2 + y^2) with hypot(x, y).
26 Add conn_foreach_func OBJECT method.
28 Disambiguate library references; COMPLEX objects should name the library to
29 use, instead of just picking the first symbol the component library finds
30 with a generic name like "resistor-1.sym".
32 Get rid of connected_to and keep pointers to single objects around for as long
33 as possible instead of smooshing them together into a single string.
35 Get Guile to provide a user_data variant of scm_c_define_gsubr().
37 Move s_menu.c to gschem.
39 Audit all guile-interacting code to see if any of it really needs SCM_SYMBOLP
40 to be true. I suspect things could be less magic by storing SCMs instead of
41 symbol->string strings, and by using non-string eval.
43 A grip cache to help s_basic_search_grips_exact and s_conn_update_object?
45 Update connection system only when adding an object to a page. Ideally in a
46 signal handler that gets attached to the object only when it is on a page.
48 Let individual objects report what file format version they require. Add
49 parameter to OBJECT::save() (to be done) that specifies permissible file
50 format version.
52 Run o_pin_update_whichend on each pin as we read it from file.
53  - No, the heuristic is to make the end closest to the bounding box active.
55 Replace g_list_append in loops with prepend / reverse.
57 Lots of f_open_flags doesn't belong in libgeda.
59 Sort out the f_open_flags malware vector: running arbitrary gafrc.
61 Use GtkBuilder instead of ad-hoc C code.
63 Turn event_state into a real object, with methods such as ::cancel. Better
64 yet, send it all off to scheme.
66 x_window_set_current_page should clear the place_list, otherwise o_drawbounding
67 (through o_place_rubberplace_xor) complains.
69 Check all uses of scm_is_true / scm_is_false: sometimes semantic truth is
70 the relevant test, and sometimes object identity compared to #t or #f is.
72 Tortoise and hare to detect COMPLEX prim_objs loops.
74 Run destroy_func only at dispose/finalize.
76 Don't close log window before confirming quit.
78 Attach to "changed" signal on selection_list.
80 Use G_DEFINE_TYPE_WITH_CODE instead of ad-hoc code.
82 Fix up the log window's w_current confusion - it's a singleton.
84 Don't call x_set_window_current so often. Maybe current-toplevel should be a
85 fluid that can be set temporarily while processing X events.
87 Move packagepins and vpads maps out of the components they control; the pin
88 swapping mechanism should also work in hierarchical schematics.
90 Slotting and pin swapping attributes should be floating attributes that may
91 exist on any page, in order to support multiply-referenced sub-schematics.
93 Replace all ad-hoc SCM_ASSERT type checking with scm_assert_smob_type.
95 Symbols need to get their UUID when placed, not only lazily when assigning
96 them to a slot. Otherwise s_slot_link will get way too complicated, having to
97 take multiple pages as arguments - one for each attribute that might get added.
99 Expose graph nature of hierarchy - it isn't just a tree. When editing or
100 viewing a schematic, the path used to reach that page matters. The path
101 determines slotting associations.
103 up_page won't be enough to support path-dependent hierarchy navigation. And
104 that is why page_current needs to mostly die: wherever we need to know the
105 current page, we really also need to know how we got there.
107 Object checkpointing mechanism, to use both as a generic undo facility, and to
108 revert objects to previous good state during editing.
110 Rename and move:
111   o_complex_get_refdes
113 Remake slotting links after pasting objects that may participate in slotting.
115 Audit all uses of OBJECT::sid. I suspect most sid comparisons could be
116 replaced by pointer comparisons.
118 Split copy_func into an allocator and an initializer when any libgeda client
119 extends any base type in a way that requires a greater memory allocation.
120 Gschem already adds behaviour to OBJ_TEXT, but it doesn't override how much
121 memory to allocate.
123 Get rid of ADDING_SEL since it doesn't seem really to be used anywhere.
125 gschem/src/o_move.c frees place_list - audit for OBJECT leaks.
127 Factor out place_list interface to deal with whether it holds copies, or the
128 on-page objects as during a move.
129   struct place_list_strategies {
130     void (*clear)();
131     void (*add)(GList *objects);
132   }
133 or just define away the problem: don't use place_list for moves.
135 Remove sel_func / select_func and use return value from o_find_object.