Introduce bundles::kItemTypeMost constant

This commit is contained in:
Allan Odgaard
2014-03-02 13:13:04 +07:00
parent e71be609e0
commit 4609378cdc
3 changed files with 4 additions and 1 deletions

View File

@@ -9,6 +9,7 @@
namespace bundles
{
int kItemTypeMenuTypes = kItemTypeCommand|kItemTypeMacro|kItemTypeSnippet|kItemTypeProxy;
int kItemTypeMost = ~(kItemTypeSettings|kItemTypeBundle|kItemTypeMenu|kItemTypeMenuItemSeparator|kItemTypeUnknown);
int kItemTypeAny = -1;
std::string const kFieldUUID = "uuid";

View File

@@ -10,7 +10,9 @@ namespace fs { struct node_t; }
namespace bundles
{
enum kind_t { kItemTypeCommand = 1, kItemTypeDragCommand = 2, kItemTypeGrammar = 4, kItemTypeMacro = 8, kItemTypeSettings = 16, kItemTypeSnippet = 32, kItemTypeProxy = 64, kItemTypeTheme = 128, kItemTypeBundle = 256, kItemTypeMenu = 512, kItemTypeMenuItemSeparator = 1024, kItemTypeUnknown = 2048 };
PUBLIC extern int kItemTypeMenuTypes;
PUBLIC extern int kItemTypeMost;
PUBLIC extern int kItemTypeAny;
PUBLIC extern std::string const kFieldName;

View File

@@ -20,7 +20,7 @@ namespace bundles
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> query (std::string const& field, std::string const& value, scope::context_t const& scope = scope::wildcard, int kind = kItemTypeMost, 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);
PUBLIC std::string name_with_selection (item_ptr const& item, bool hasSelection);