mirror of
https://github.com/textmate/textmate.git
synced 2026-01-22 05:07:54 -05:00
Move some bundles code from index.h to query.h
This commit is contained in:
committed by
Allan Odgaard
parent
80327f7bb7
commit
97199ad0a6
@@ -113,18 +113,6 @@ namespace bundles
|
||||
std::vector<required_executable_t> _required_executables;
|
||||
};
|
||||
|
||||
struct PUBLIC callback_t
|
||||
{
|
||||
virtual ~callback_t () { }
|
||||
virtual void bundles_will_change () { }
|
||||
virtual void bundles_did_change () { }
|
||||
};
|
||||
|
||||
PUBLIC void add_callback (callback_t* cb);
|
||||
PUBLIC void remove_callback (callback_t* cb);
|
||||
PUBLIC void add_item (item_ptr item);
|
||||
PUBLIC void remove_item (item_ptr item);
|
||||
|
||||
} /* bundles */
|
||||
|
||||
#endif /* end of include guard: BUNDLES_INDEX_H_H2GEVOXK */
|
||||
|
||||
@@ -8,6 +8,18 @@ namespace bundles
|
||||
PUBLIC bool set_index (std::vector<item_ptr> const& items, std::map< oak::uuid_t, std::vector<oak::uuid_t> > const& menus);
|
||||
inline bool set_index (std::vector<item_ptr> const& items) { return set_index(items, std::map< oak::uuid_t, std::vector<oak::uuid_t> >()); }
|
||||
|
||||
struct PUBLIC callback_t
|
||||
{
|
||||
virtual ~callback_t () { }
|
||||
virtual void bundles_will_change () { }
|
||||
virtual void bundles_did_change () { }
|
||||
};
|
||||
|
||||
PUBLIC void add_callback (callback_t* cb);
|
||||
PUBLIC void remove_callback (callback_t* cb);
|
||||
PUBLIC void add_item (item_ptr item);
|
||||
PUBLIC void remove_item (item_ptr item);
|
||||
|
||||
PUBLIC std::vector<item_ptr> query (std::string const& field, std::string const& value, scope::context_t const& scope = scope::wildcard, int kind = kItemTypeCommand|kItemTypeDragCommand|kItemTypeGrammar|kItemTypeMacro|kItemTypeSnippet|kItemTypeProxy|kItemTypeTheme, oak::uuid_t const& bundle = oak::uuid_t(), bool filter = true, bool includeDisabledItems = false);
|
||||
PUBLIC std::vector<item_ptr> items_for_proxy (item_ptr proxyItem, scope::context_t const& scope = scope::wildcard, int kind = kItemTypeCommand|kItemTypeDragCommand|kItemTypeGrammar|kItemTypeMacro|kItemTypeSnippet|kItemTypeProxy|kItemTypeTheme, oak::uuid_t const& bundle = oak::uuid_t(), bool filter = true, bool includeDisabledItems = false);
|
||||
PUBLIC item_ptr lookup (oak::uuid_t const& uuid);
|
||||
|
||||
Reference in New Issue
Block a user