예제 #1
0
static int gnoclOptOnResize( Tcl_Interp *interp, GnoclOption *opt, 
      GObject *obj, Tcl_Obj **ret )
{
   assert( strcmp( opt->optName, "-onResize" ) == 0 );
   return gnoclConnectOptCmd( interp, obj, "size-allocate",
         G_CALLBACK( doOnResize ), opt, NULL, ret );
}
예제 #2
0
static int configure( Tcl_Interp *interp, GnomeClient *client, 
      GnoclOption options[] )
{
   gnoclConnectOptCmd( interp, G_OBJECT( client ), "connect",
         G_CALLBACK( onConnect ), options + onConnectIdx, NULL, NULL );
   gnoclConnectOptCmd( interp, G_OBJECT( client ), "die",
         G_CALLBACK( onOneArg ), options + onDieIdx, NULL, NULL );
   gnoclConnectOptCmd( interp, G_OBJECT( client ), "disconnect",
         G_CALLBACK( onOneArg ), options + onDisconnectIdx, NULL, NULL );
   gnoclConnectOptCmd( interp, G_OBJECT( client ), "save-complete",
         G_CALLBACK( onOneArg ), options + onSaveCompleteIdx, NULL, NULL );
   gnoclConnectOptCmd( interp, G_OBJECT( client ), "save-yourself",
         G_CALLBACK( onSaveYourself ), 
         options + onSaveYourselfIdx, NULL, NULL );

   if( options[currentDirectoryIdx].status == GNOCL_STATUS_CHANGED )
      gnome_client_set_current_directory( client, 
            options[currentDirectoryIdx].val.str );

   return TCL_OK;
}
예제 #3
0
파일: notebook.c 프로젝트: zdia/gnocl
/**
\brief
    Description yet to be added.
**/
static int configure ( Tcl_Interp *interp, GtkNotebook *notebook, GnoclOption options[] )
{
	if ( options[childrenIdx].status == GNOCL_STATUS_CHANGED )
	{
		int ret = addChildren ( notebook, interp, options[childrenIdx].val.obj, 1 );

		if ( ret != TCL_OK )
		{
			return ret;
		}
	}

	if ( gnoclConnectOptCmd ( interp, G_OBJECT ( notebook ), "switch-page",
							  G_CALLBACK ( switchPageFunc ), options + onSwitchPageIdx, NULL,
							  NULL ) != TCL_OK )
	{
		return TCL_ERROR;
	}

	return TCL_OK;
}