libxfcecombo API reference
edscott wilson garcia
edscott at xfce.org
Sat Jan 10 00:30:52 CET 2004
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
void xfc_read_history(xfc_combo_info_t *combo_info, gchar
// 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
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:
> 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
More information about the Xfce4-dev