History

input: remove mp prefix for static functions

This makes it easy to eyeball check the call hierarchy between public and private functions.

nanahi committed 2 years ago

Commit 3cbb34f1 parent ce4294b1 file · +11 −11Browse files

Showing the changes to input/input.c (1 of 1 file). Show all

Unified · Split

input/input.c+11−11
@@ -703,7 +703,7 @@ static bool process_wheel(struct input_ctx *ictx, int code, double *scale, · 702 unmodified lines
703703 return true;
704704 }
705705
706−static void mp_input_feed_key(struct input_ctx *ictx, int code, double scale,
706+static void feed_key(struct input_ctx *ictx, int code, double scale,
707707 bool force_mouse)
708708 {
709709 struct input_opts *opts = ictx->opts;
@@ -758,7 +758,7 @@ static void mp_input_feed_key(struct input_ctx *ictx, int code, double scale, · 48 unmodified lines
758758 void mp_input_put_key(struct input_ctx *ictx, int code)
759759 {
760760 input_lock(ictx);
761− mp_input_feed_key(ictx, code, 1, false);
761+ feed_key(ictx, code, 1, false);
762762 input_unlock(ictx);
763763 }
764764
@@ -767,7 +767,7 @@ void mp_input_put_key_artificial(struct input_ctx *ictx, int code, double value) · 2 unmodified lines
767767 if (value == 0.0)
768768 return;
769769 input_lock(ictx);
770− mp_input_feed_key(ictx, code, value, true);
770+ feed_key(ictx, code, value, true);
771771 input_unlock(ictx);
772772 }
773773
@@ -786,7 +786,7 @@ void mp_input_put_wheel(struct input_ctx *ictx, int direction, double value) · 12 unmodified lines
786786 if (value == 0.0)
787787 return;
788788 input_lock(ictx);
789− mp_input_feed_key(ictx, direction, value, false);
789+ feed_key(ictx, direction, value, false);
790790 input_unlock(ictx);
791791 }
792792
@@ -1557,7 +1557,7 @@ struct mp_input_src_internal { · 764 unmodified lines
15571557 bool drop;
15581558 };
15591559
1560−static struct mp_input_src *mp_input_add_src(struct input_ctx *ictx)
1560+static struct mp_input_src *input_add_src(struct input_ctx *ictx)
15611561 {
15621562 input_lock(ictx);
15631563 if (ictx->num_sources == MP_MAX_SOURCES) {
@@ -1581,7 +1581,7 @@ static struct mp_input_src *mp_input_add_src(struct input_ctx *ictx) · 17 unmodified lines
15811581 return src;
15821582 }
15831583
1584−static void mp_input_src_kill(struct mp_input_src *src);
1584+static void input_src_kill(struct mp_input_src *src);
15851585
15861586 static void close_input_sources(struct input_ctx *ictx)
15871587 {
@@ -1593,11 +1593,11 @@ static void close_input_sources(struct input_ctx *ictx) · 5 unmodified lines
15931593 input_unlock(ictx);
15941594 if (!src)
15951595 break;
1596− mp_input_src_kill(src);
1596+ input_src_kill(src);
15971597 }
15981598 }
15991599
1600−static void mp_input_src_kill(struct mp_input_src *src)
1600+static void input_src_kill(struct mp_input_src *src)
16011601 {
16021602 if (!src)
16031603 return;
@@ -1651,17 +1651,17 @@ static MP_THREAD_VOID input_src_thread(void *ptr) · 47 unmodified lines
16511651 int mp_input_add_thread_src(struct input_ctx *ictx, void *ctx,
16521652 void (*loop_fn)(struct mp_input_src *src, void *ctx))
16531653 {
1654− struct mp_input_src *src = mp_input_add_src(ictx);
1654+ struct mp_input_src *src = input_add_src(ictx);
16551655 if (!src)
16561656 return -1;
16571657
16581658 void *args[] = {src, loop_fn, ctx};
16591659 if (mp_thread_create(&src->in->thread, input_src_thread, args)) {
1660− mp_input_src_kill(src);
1660+ input_src_kill(src);
16611661 return -1;
16621662 }
16631663 if (mp_rendezvous(&src->in->init_done, 0) < 0) {
1664− mp_input_src_kill(src);
1664+ input_src_kill(src);
16651665 return -1;
16661666 }
16671667 return 0;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t