libxfcecombo API reference

edscott wilson garcia edscott at xfce.org
Sat Jan 10 19:55:11 CET 2004


On Sat, 2004-01-10 at 03:05, Jasper Huijsmans wrote:
> Thanks, it starts to make a bit more sense to me now. 
> 
> One thing you can easily do is have the module_init() function fill in
> the function pointers, instead of looking up every single symbol
> manually.

A definite must do. I'll try to get it done tonite (tomorrow morning
Europe time). I don't think it will be very difficult to implement.

> 
> I'll get back to you with other suggestions later ;-)

Right. Maybe put the test for modules in a library like xfce4gui? That
might simplify things (instead of duplicating code all over the
place...)

Edscott

> 
> 	Jasper
> 
> Op za 10-01-2004, om 00:30 schreef edscott wilson garcia:
> > To avoid spaguetti loading, the combo module can be plainly linked to
> > the panel and plugins as any normal dynamic library like libxfce4gui
> > would. This would require configure to fail is xfce4-modules not
> > installed. Anyways, that's Jasper's call. 
> > 
> > This is a short api for the module/library:
> > gboolean xfc_is_in_history(char *path2dbh_file,char *path2find);
> > 
> > // Tests whether the string path2find is in the history
> > 
> > gboolean xfc_set_combo(xfc_combo_info_t *combo_info, char *token);
> > 
> > // Sets the combo list of related items to the most visited dozen
> > // elements that begin with the string token.
> > 
> > void xfc_set_blank(xfc_combo_info_t *combo_info);
> > 
> > // Clears the entry of the combo box. This is normally set
> > // to the last visited item.
> > 
> > void xfc_set_entry(xfc_combo_info_t *combo_info,char *entry_string);
> > 
> > // Sets the entry of the combo box to the string entry_string. The
> > // entry is normally set to the last visited item.
> > 
> > void xfc_save_to_history(char *path2dbh_file,char *path2save);
> > 
> > // Opens/creates the history file and saves the string path2save. If
> > // the string is already in history file, increments the visit count.
> > 
> > void xfc_remove_from_history(char *path2dbh_file,char *path2remove);
> > 
> > // Eliminates path2remove from history file, if file exists and is
> > // writeable.
> > 
> > void xfc_read_history(xfc_combo_info_t *combo_info, gchar
> > *path2dbh_file);
> > 
> > // Reads history file. I think this function should no longer be
> > // exported... note to myself :-\
> > 
> > void xfc_clear_history(xfc_combo_info_t *combo_info);
> > 
> > // Erases the history file, I suppose, and reinitialises the data in
> > // the combo_info object.
> > 
> > xfc_combo_info_t xfc_init_combo(GtkCombo *combo);
> > 
> > // Initialises pointers and allocates memory for the combo object
> > // of type xfc_combo_info_t
> > 
> > xfc_combo_info_t xfc_destroy_combo(xfc_combo_info_t *combo_info);
> > 
> > // Frees memory used by combo object. Probably should be called before
> > // unloading module. Should check if the unload function uses this
> > // function.
> > 
> > The following are functions that can be imported and used by the module:
> > 
> > int extra_key_completion(gpointer extra_key_data);
> > 
> > // Any additional callbacks to perform while doing completion (like
> > // toggling the state of checkbuttons. 
> >    
> > 
> > I think that's it. Everything else in the module is static.
> > 
> > 
> > 
> > On Fri, 2004-01-09 at 16:52, Danny Milosavljevic wrote:
> > > hi, 
> > > Am Fre, den 09.01.2004 schrieb Danny Milosavljevic um 23:30:
> > > > Am Fre, den 09.01.2004 schrieb Danny Milosavljevic um 22:00:
> > > > > Hey Jasper,
> > > > > 
> > > > > what about adding a function to the panel which
> > > > > - is made available to the plugins, for use in create_options
> > > > > - receives:
> > > > >     Control * ?
> > > > >     an optional GtkSizeGroup
> > > > > - creates:
> > > > >     some boxes, eventboxes, whatever,
> > > > >     the command entry or the combo if applicable, 
> > > > >     the openbutton, 
> > > > >     the opendialog,
> > > > >     the "exec in terminal" checkbutton
> > > > >     the "use startup notification" checkbutton
> > > > > - returns:
> > > > >     the (outermost) GtkWidget *, to be used in packing
> > > > >     a GtkEntry *
> > > > >     an optional GtkCombo *
> > > > >     the two checkbuttons
> > > > >   [best all in a g_new'ed struct since additions are easier]
> > > > > 
> > > > > ? :)
> > > > 
> > > > attached... yet untested ;)
> > > 
> > > attached and tested, working.
> > > 
> > > 
> > > ______________________________________________________________________
> > > _______________________________________________
> > > Xfce4-dev mailing list
> > > Xfce4-dev at xfce.org
> > > http://lunar-linux.org/mailman/listinfo/xfce4-dev
> > 
> > _______________________________________________
> > Xfce4-dev mailing list
> > Xfce4-dev at xfce.org
> > http://lunar-linux.org/mailman/listinfo/xfce4-dev
> 
> _______________________________________________
> Xfce4-dev mailing list
> Xfce4-dev at xfce.org
> http://lunar-linux.org/mailman/listinfo/xfce4-dev
> 




More information about the Xfce4-dev mailing list