diff options
| author | frosty <gabriel@bwaaa.monster> | 2026-04-14 18:13:55 -0400 |
|---|---|---|
| committer | frosty <gabriel@bwaaa.monster> | 2026-04-14 18:13:55 -0400 |
| commit | 6738ab0eac3363c33ff74b99dd945444943e3f72 (patch) | |
| tree | 881b89780b2e1474c2193e9999bac6a86f8c168a /src/Routes | |
| parent | 3a99a37b0c1232cf7310f5a5314466839001fec9 (diff) | |
| download | omnisearch-6738ab0eac3363c33ff74b99dd945444943e3f72.tar.gz | |
feat: added colour code preview infobox
Diffstat (limited to 'src/Routes')
| -rw-r--r-- | src/Routes/Search.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Routes/Search.c b/src/Routes/Search.c index f51fc5f..b580c10 100644 --- a/src/Routes/Search.c +++ b/src/Routes/Search.c @@ -1,6 +1,7 @@ #include "Search.h" #include "../Cache/Cache.h" #include "../Infobox/Calculator.h" +#include "../Infobox/ColourCode.h" #include "../Infobox/CurrencyConversion.h" #include "../Infobox/Dictionary.h" #include "../Infobox/UnitConversion.h" @@ -216,11 +217,16 @@ static int is_calculator_query(const char *query) { return 0; } +static InfoBox fetch_colour_wrapper(char *query) { + return fetch_colour_data(query); +} + static InfoBoxHandler handlers[] = { {is_dictionary_query, fetch_dict_wrapper, NULL}, {is_calculator_query, fetch_calc_wrapper, NULL}, {is_unit_conv_query, fetch_unit_wrapper, NULL}, {is_currency_query, fetch_currency_wrapper, NULL}, + {is_colour_code_query, fetch_colour_wrapper, NULL}, {always_true, fetch_wiki_wrapper, construct_wiki_url}, }; enum { HANDLER_COUNT = sizeof(handlers) / sizeof(handlers[0]) }; |
