Re: timj's API todo



On 1 Apr 2001, Havoc Pennington wrote:

> 
> Tim Janik <timj gtk org> writes: 
> > void       gtk_window_showraise          (GtkWidget             *widget);
> > 
> > convenience function for showing a GtkWindow and then raising its window.
> > probably superceeded by gtk_window_present(), however that doesn't also
> > raise the window (especially for not _NET compliant window managers).
> 
> If your intended use for showraise is to call on dialogs to present to
> the user, then that's where present is called, so maybe present (or
> gdk_window_focus() even) should just do a raise. We shouldn't have two
> functions that do the same thing in a slightly different
> way. gdk_window_focus raises on _NET wm's I guess so should emulate
> that for noncompliant wm's.

ok, i added raising to window_focus for the _NET case.

> Or is showraise for some other use case?
> 
> > void       gtk_widget_make_sensitive     (GtkWidget             *widget);
> > void       gtk_widget_make_insensitive   (GtkWidget             *widget);
> > sensitivity setters suitable for signal connections (quite frequently needed
> > in config dialogs).
> 
> I think these "callback convenience functions" (along the lines of
> gtk_widget_destroyed) could really use some special naming
> convention, maybe _callback. Otherwise app developers get confused
> about how they are different from e.g. gtk_widget_set_sensitive().
> Also, lang bindings need to filter these functions out, they are just
> C convenience.

hm, i think that's a good point, but i'd prefer handler
instead of callback, e.g.

void       gtk_widget_handler_make_sensitive     (GtkWidget             *widget);
void       gtk_widget_handler_make_insensitive   (GtkWidget             *widget);
void       gtk_handler_nullify_pointer           (gpointer              *pointer_loc);
#ifndef GTK_DISABLE_DEPRECATED
void       gtk_widget_destroyed           (GtkWidget           *widget,
                                           GtkWidget          **widget_pointer);
#endif

> 
> Havoc
> 
> 

---
ciaoTJ





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]