Does a framework allow you to abstract generic code - but not in a complete way (Ex: Abstract a network connection - but not what you actually do with the data), and does not solve any particular common requirement whereas a toolkit has solutions to generic problems(Ex: Dialog box widget)?
Real world Example: Prototype is a "framework", but Dojo is a "toolkit".
So my question is, what is the criteria to call something a framework vs calling it a toolkit?
Framework enforces some design pattern on the developer and give some tools for code generation. This sits well with my first sentence, as it generates code in a certain style/pattern.
Library gives you functionality for you to use as you wish. Like the stdio functions of C,
Console of C#, The "built in" functions of PHP etc
You can regard a library as a kind of API