pike.git / src / post_modules / GTK2 / source / gtkassistant.pre

version» Context lines:

pike.git/src/post_modules/GTK2/source/gtkassistant.pre:14:   //! Style properties:   //! <p>   //! int content-padding   //! int header-padding      signal apply;   signal cancel;   signal close;   signal prepare;    + %{ + int pgtk2_assistant_callback(gint cur_page, struct signal_data *d) { +  int res; +  push_svalue(&d->args); +  apply_svalue(&d->cb,2); +  res=Pike_sp[-1].u.integer; +  pop_stack(); +  return res; + } +  + %} +    //! A GTK2.Assistant is a widget used to represent a generally complex   //! operation splitted in several steps, guiding the user through its pages   //! and controlling the page flow to collect the necessary data.      void create(?mapping(string:mixed) props)   //! Create a new assistant.   {    pgtk2_verify_not_inited();    pgtk2_verify_setup();    if (args) {
pike.git/src/post_modules/GTK2/source/gtkassistant.pre:108:   //! Forces the assistant to recompute the buttons state.   //! <p>   //! GTK+ automatically takes care of this in most situations, e.g. when the   //! user goes to a different page, or when the visibility or completeness   //! of a page changes.   //! <p>   //! One situation where it can be necessary to call this function is when   //! changing a value on the current page affects the future page flow of the   //! assistant.    + void set_forward_page_func(function f, mixed data) + //! Set the forward page function. + { +  struct svalue *sv1,*sv2; +  struct signal_data *sd; +  +  get_all_args("set_forward_page_func",args,"%*%*",&sv1,&sv2); +  sd=(struct signal_data *)g_malloc(sizeof(struct signal_data)); +  if (sd==NULL) +  SIMPLE_OUT_OF_MEMORY_ERROR("set_forward_page_func",sizeof(struct signal_data)); +  assign_svalue_no_free(&sd->cb,sv1); +  assign_svalue_no_free(&sd->args,sv2); +  gtk_assistant_set_forward_page_func(GTK_ASSISTANT(THIS->obj),pgtk2_assistant_callback,sd,(GtkDestroyNotify)pgtk2_free_signal_data); +  RETURN_THIS(); + } +  +    endrequire;