X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire-selector.h;h=6fff5d4269da20286062e0f8c36def77374f1fa5;hb=b5c82cc9aabe7e641011130240ae1b2e84348e23;hp=f5ca4e9a94f76663a9f9be020193452d90b5a2b3;hpb=43b1296aafe7582e7dbe6c2b6a8b478d7d9b0fcf;p=pspp-builds.git diff --git a/src/ui/gui/psppire-selector.h b/src/ui/gui/psppire-selector.h index f5ca4e9a..6fff5d42 100644 --- a/src/ui/gui/psppire-selector.h +++ b/src/ui/gui/psppire-selector.h @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -45,7 +46,11 @@ typedef struct _PsppireSelectorClass PsppireSelectorClass; /* Function for appending selected items to the destination widget */ typedef void SelectItemsFunc (GtkTreeIter iter, GtkWidget *dest, - GtkTreeModel *source_model); + GtkTreeModel *source_model, + gpointer data); + +/* Function to determine if items may be selected */ +typedef gboolean AllowSelectionFunc (GtkWidget *src, GtkWidget *dest); /* Function to determine whether an item in MODEL, pointed to by ITER @@ -70,6 +75,7 @@ struct _PsppireSelector /* */ GtkWidget *arrow; + GtkAction *action; enum psppire_selector_dir direction; GtkWidget *source; @@ -86,7 +92,11 @@ struct _PsppireSelector GtkTreeModelFilter *filtered_source; SelectItemsFunc *select_items; + gpointer select_user_data; + FilterItemsFunc *filter; + + AllowSelectionFunc *allow_selection; }; struct _PsppireSelectorClass @@ -104,7 +114,11 @@ void psppire_selector_set_subjects (PsppireSelector *, GtkWidget *, GtkWidget *, SelectItemsFunc *, - FilterItemsFunc * ); + FilterItemsFunc *, + gpointer ); + +void psppire_selector_set_allow (PsppireSelector *, AllowSelectionFunc *); + GType psppire_selector_orientation_get_type (void) G_GNUC_CONST; @@ -116,7 +130,7 @@ typedef enum { PSPPIRE_SELECT_SOURCE_BELOW_DEST } PsppireSelectorOrientation; -#define G_TYPE_PSPPIRE_SELECTOR_ORIENTATION \ +#define PSPPIRE_TYPE_SELECTOR_ORIENTATION \ (psppire_selector_orientation_get_type())