652d073d62
Note: this breaks the plugin API for document functions, document signal callbacks, msgwin_msg_add() and navqueue_goto_line(). Make all DocumentFuncs use a GeanyDocument* instead of an integer index, so there's no need to access the documents array or use DOC_IDX_VALID() - usually just check for non-NULL. Pass a document pointer to the callbacks of all document-* signals. Add GeanyDocument::index field for use with the documents array. Remove DocumentFuncs::get_cur_idx() - use get_current() instead. Replace DocumentFuncs::get_n_idx() with get_from_page(). Rename DocumentFuncs::find_by_realpath() to find_by_real_path(). Replace DocumentFuncs::remove() with remove_page(). Add 'changed' argument for DocumentFuncs::set_text_changed(). Make NavQueueFuncs and MsgWinFuncs use a GeanyDocument* instead of an integer index. Add DOC_VALID() macro. Add deprecated DOC_IDX() macro to get the document index from a possibly NULL pointer; deprecate macro DOC_IDX_VALID. These macros can make porting outside plugins easier; of course, it is better to rewrite the code to use document pointers. Use document pointer instead of an index to the documents array everywhere in the core code. Rename utils_check_disk_status() in document_check_disk_status() and move it into document.c. Adjust plugins to work with these changes. Add dox for document_set_filetype(). Rename debugging function doc() doc_at() to avoid conflicts. Update plugin signals dox. git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2705 ea778897-0a13-0410-b9d1-a72fbfd435f5