Gtk Todo

Todo

When working on a separate .defs file, need to be able to infer the hierarchy from the standard Gtk hierarchy.
  • Add the class fields to the names() result so that user's see it.
    Add it as a getSlots("class"). Perhaps put this in the inheritance hierarchy as the value of the leaves in the tree.
    The generated constructors should take the show = and the .flush arguments.
    Perhaps a ... or the union of the arguments. See cons.S
    Fix the gtk_html_get_object_by_id.
    Call is correct but when we get into the routine, it is all wrong! Same with the gtk_html_set_base.
    Finish off the return values for the callback marshalling.
    All the drawing routines.
    Access to fonts, etc. for GtkText.
    Also the HTML widget
    Treat the colormap as a vector (or named vector if possible) and access GdkColor objects.
    Provide a manually created version of the gtkToolbar{Append,Insert,Prepend}Item function so that we can specify callbacks, etc. and get the class right.
    Add the RadioMenuItem entries to the defs files.
    Needs support for GList*
  • Function for handling appending and inserting to clist which checks the lengths of the character vector against the number of columns.
  • Add the names of the flag elements when returning it.
    i.e. the equivalent of attr(val, "elements") <- c("show-week-numbers", "week-start-monday") at the C level in S_checkFlag().

    Can do this in S now that we have an xor.

  • Handle conversion to a GList *
    No append or insert items into a list.
    No GList needed unless we add these routines.
  • Event loop for idle and timed tasks.

  • Some of the toolbar methods are not included in the gnome.defs files.
    Also the list appending, etc. functions.
    Do a grep ';.*define-func' *.defs in AutoGen. 115 or so of these. And then the others that don't have a define-func!
  • Deal with _newv style constructors.
  • Manual Tasks

  • Tests
    notebookRaw.S, buttonRaw.S, testgtkRaw.S
    testgtk.S almost finished.
  • Override Gtk error handling.
  • Manually add flag converter for GtkSignalRunType used in RgtkReflectance for the signal info.
  • Register the C routines that we call.
  • Generate documentation for the functions.
    • Group constructors - with no arguments, with a label, and others.
    • The different functions by class.
    • Enums
    • Flags.
  • Implement checkFlag for integer case.
  • Incorporate the original manual code.
  • worksheet, GtkWidgets, foo, treeDir
  • Function for mapping from local names to real names and vice-versa for the different enumeration values. And flags.
    Easy now that there are .Gtk... variables with the real names.

  • Done

  • gnome, gnome app, gtk-extra, libraries.
  • Check for NULL values before doing the cast to the particular object.
    See gtk_scrolled_window_new
  • Cast to specific widget in the C call.
    e.g. GTK_NOTEBOOK(w). Is this necessary? For validation! Can do this when converting the S value to its C form in the coercion code.
    Not essential. Done now.
  • Also fix the GTK_<TYPE> cast/access in the field accessor code.
    Will validate an object.
    Fix up the [[.GtkObject for properties or Get methods.
    And add integer indexing for children.
    Seems ok now.
    S function to remove and suspend a callback.
    Done.
          gtkInit()
          x11()
          dev.off()
    
    seems to cause an infinite loop in removing the handler.
  • DnD: gtk_drag_source_set() not in gtkdnd.defs file!
    gtk_drag_dest_set(), gtk_selection_data_set()
    gtk_drag_begin() Not very robust at all.
    GtkCombo
    Needs GList support.
    See testgtk.S.
    Timers, idle tasks, etc.
    Needed for tooltips.
  • Support for pixmaps, etc.
          gtkRcLoadImage(gdkColormapGetSystem(), filename="foo.xpm")
    
    works fine.
    Names of functions such as GtkRcParse should be uncapitalized!
  • Emit function for generating events.
  • Interface for GtkArg vals, i.e. access to reading and writing properties.
    Get the names of the available values and their types. And of course, ask for their values either entirely or by name.
  • How can we specify user data to parameterize an R function callback. Need to do this.
    See the delete event in the testgtkRaw.S Added a data argument to gtkAddCallback().
    See the RgtkCallbacks.c and the general marshalling function. Need to look at the different types of arguments being passed to the callbacks (e.g. events, widgets, etc.) Can look some of this up from the signal information via gtk_signal_query() and the GtkSignalQuery structure. Look at the rulers example in testgtk.{S,py}
    Get the info for all signals using the gtkLoadTypes(), gtkTypeSignalGet() gtkSignalGetInfo. Check all the parameters and enumerate the different routines that we need.
  • gtk_clist_append not in .defs.
    Added, with support for string[]. And also gtk_clist_insert(). And gtk_clist_new_with_titles(). Need to get the correct number of elements in the vector to match the number of columns.
  • No set_cursor method in the .defs files.
    Need converter from a GdkWindow to a
    Added the method. Now make it work by having the return value of gtkWidgetGetParentWindow have the appropriate class.
    Add the class to the object created from toRPointer() using the name of the type passed to it.
  • Test the enums and the flags.
    Use the calendar gtkCalendarDisplayOptions("show-week-numbers" | "week-start-monday")
  • Handle the expansion of values for flags in the conversion of flags in getDefs().
    i.e 2^val not simply val.
  • Create R package. Done

    Making this into a bundle would improve the readability and make it easier to find things.
  • Callback code has to use R_ToplevelExec to trap errors.
  • Fix up the nameToS() so that it handles paired capitalized letters properly. Actuall this is in the mis-named undotName now renamed to "toCapPhraseName"!
          "gtkClistOptimalColumnWidth" "gtkClistSetColumnWidth"    
          
  • Fix the time_t in the accessors.
    And the other types ulong, etc. that arise as warnings in Accessors.c
  • Query the information about the signals of a class.
    gtk_signal_query() is close, but we need a list of names or a list of IDs.
    Can get this now.
  • Field accessors for classes.
  • Merged and extended the functions in container.S
    children and parent.
  • How do we substitute values in a loop so that a callback gets the correct one.
    See the buttons example in testgtkRaw.s This is a bit weird but a feature of loops and environments in R.
  • Use the GtkType information to infer the specific information about a widget.
    Add the class hierarchy information as an object to the package for dynamic lookup
    e.g. when resolving a generic widget and wanting to put a class on it.

    Use getClassList() and getClassHierarchy() from pyGen.R.
    Not needed now that we can get the type information dynamically via R_getObjectTypeHierarchy in Rgtk.c.

  • Add a PACKAGE argument to .GtkCall() and .Call()
  • Add OOP facilities. Done, but with a slow and inelegant fix in gtkMethods.S
    e.g. w$setTitle for GtkWindow classes.
    Have to handle inheritance. E.g. HBox methods from Box methods; add for GtkContainer.
  • Collapse multiple constructors into a single function with appropriate defaults.
          e.g.  GtkButton <- function(label = NULL) {
           if(missing(label))
             gtkButtonNew()
           else
             gtkButtonNewWithLabel(label)
          }
    
    See collapseConstructors() in cons.S and the relevant code at the bottom of genCode.S.
  • Get the names for some class constructors.
    VBox, etc. Where capitalization is an issue.
  • Catch errors in callback setting.
    Now return a CallbackID object with the id and name of the handler.
  • Handle the default values for flags
    Just look for | symbol and then quote the other symbols.
    flagToStringValue does this. Look in getDefaultSArgs().
  • Add a .GtkCall() to replace the .Call() and define it with a .flush = TRUE default argument. If this is true, we call gdkFlush() after the .Call(). Then define each function (not enum or flag mapping function) with a .flush argument which is passed to .GtkCall.
    Have to handle the .PACKAGE argument correctly.
  • Eliminate the warnings in the compilation due to missing declarations.
    Done by include the two g{d,t}kEnum.h files in gtkUtils.h This kind of hard codes them but we do that elsewhere (e.g. Makefiles).
  • Honor the show argument in the constructors
    Okay.
  • Default values for R functions
    Including putting in the first value of an enum if that is the type.
  • Enums that have an explicit value in the definition that isn't 0.
    I.e. get the right values. See the error enum. See the getDefs() conversion for enums.
  • Bring the existing code into the same external reference framework.
    I.e. with the R_MakeExternalPtr.
  • Map returned enums/flags to S types properly
    e.g. GdkEventMask
    See the code that generates the return value in convertToR().
  • gdk.defs in java-gnome/src/defs
  • Atoms:
    gdk_atom_intern() GdkAtom in getCType()
    Manually fixed. See gtkUtils.{c,h}
  • Enum and flag mapping functions now return if their argument is an object of the appropriate class.
  • Put a class on the toRPointer() result at the R level.
  • Missing Functions
    gtk_table_set_border_width()!
    Not missing, just in a different class. Actually gtk_container_set_border_width.

  • Duncan Temple Lang <duncan@research.bell-labs.com>
    Last modified: Mon Sep 2 04:59:59 EDT 2002