diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-09-06 22:45:15 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-09-06 22:45:15 +0300 |
commit | a364d9456dfdfd8181904fca6308e9c36eefd10a (patch) | |
tree | f355ded227cf52053784b991f5d8441a5502e447 /src/lookup.c | |
parent | 52a1652536e4e27751ac121009f85113e72afe7d (diff) |
LookupWidget: Keyboard focus and cursor
Diffstat (limited to 'src/lookup.c')
-rw-r--r-- | src/lookup.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lookup.c b/src/lookup.c index 4f00a66a..6ad8d708 100644 --- a/src/lookup.c +++ b/src/lookup.c | |||
@@ -26,6 +26,7 @@ iDefineTypeConstruction(LookupResult) | |||
26 | 26 | ||
27 | void init_LookupResult(iLookupResult *d) { | 27 | void init_LookupResult(iLookupResult *d) { |
28 | d->type = none_LookupResultType; | 28 | d->type = none_LookupResultType; |
29 | d->relevance = 0; | ||
29 | init_String(&d->label); | 30 | init_String(&d->label); |
30 | init_String(&d->url); | 31 | init_String(&d->url); |
31 | init_String(&d->meta); | 32 | init_String(&d->meta); |
@@ -37,3 +38,13 @@ void deinit_LookupResult(iLookupResult *d) { | |||
37 | deinit_String(&d->url); | 38 | deinit_String(&d->url); |
38 | deinit_String(&d->label); | 39 | deinit_String(&d->label); |
39 | } | 40 | } |
41 | |||
42 | iLookupResult *copy_LookupResult(const iLookupResult *d) { | ||
43 | iLookupResult *copy = new_LookupResult(); | ||
44 | copy->type = d->type; | ||
45 | copy->relevance = d->relevance; | ||
46 | set_String(©->label, &d->label); | ||
47 | set_String(©->url, &d->url); | ||
48 | set_String(©->meta, &d->meta); | ||
49 | return copy; | ||
50 | } | ||