If you really want to do "everything", you'll need at least four days. Maybe five.
There are a lot more rides in both Disneyland and California Adventure than you'd find in the WDW parks. Combined, the two Disneyland Resort theme parks have almost as many "rides" and attractions as the four WDW combined.
If you are a real Disney theme park fan, and visiting Disneyland for the first time, you may also want to try the excellent
Walk In Walt's Footsteps guided tour for one of the afternoon's of your visit. I would suggest taking the tour on the third or fourth day, after you've had a couple of days to get acquainted with Disneyland. Disneyland is the only theme park Walt ever worked on personally, walked in regularly, and lived in occasionally, and the Walk In Walt's Footsteps tour is an absolute must for anyone who admires what Walt created with Disneyland.
http://disneyland.disney.go.com/tours/
You'll want four days for everything in the off-season, including a Friday or Saturday night so you can catch Fantasmic!. Or perhaps five days in a busy season like Christmas or Easter Vacation to accomodate the larger crowds. That's my suggestion.