Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 02f45748 in mainline


Ignore:
Timestamp:
2019-12-10T10:07:43Z (12 months ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master
Children:
23e86c6
Parents:
df1a019
git-author:
Jiri Svoboda <jiri@…> (2019-12-09 18:07:30)
git-committer:
Jiri Svoboda <jiri@…> (2019-12-10 10:07:43)
Message:

Source display server events from input server

Location:
uspace
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/init/init.c

    rdf1a019 r02f45748  
    451451                if (rc == EOK) {
    452452                        fibril_sleep(1);
    453                         gui_start("/app/gfxdemo");
     453                        gui_start("/app/terminal");
    454454                }
    455455        }
  • uspace/srv/hid/display/main.c

    rdf1a019 r02f45748  
    5050#include "display.h"
    5151#include "dsops.h"
     52#include "input.h"
    5253#include "main.h"
    5354#include "output.h"
     
    6162        .ev_pending = display_client_ev_pending
    6263};
    63 
    64 static void display_kbd_event(void *arg, kbd_event_t *event)
    65 {
    66         ds_display_t *disp = (ds_display_t *) arg;
    67 
    68         ds_display_post_kbd_event(disp, event);
    69 }
    70 
    71 static void display_pos_event(void *arg, pos_event_t *event)
    72 {
    73         ds_display_t *disp = (ds_display_t *) arg;
    74 
    75         ds_display_post_pos_event(disp, event);
    76 }
    7764
    7865static void display_client_ev_pending(void *arg)
     
    10289                goto error;
    10390
    104 #if 0
    10591        rc = ds_input_open(disp);
    10692        if (rc != EOK)
    10793                goto error;
    108 #endif
    109         rc = ds_output_create(display_kbd_event, (void *) disp,
    110             display_pos_event, (void *) disp, &output);
     94
     95        rc = ds_output_create(&output);
    11196        if (rc != EOK)
    11297                goto error;
  • uspace/srv/hid/display/meson.build

    rdf1a019 r02f45748  
    3434        'display.c',
    3535        'dsops.c',
     36        'input.c',
    3637        'main.c',
    3738        'output.c',
  • uspace/srv/hid/display/output.c

    rdf1a019 r02f45748  
    4444#include "ddev.h"
    4545#include "output.h"
    46 
    47 #if 0
    48 static void (*kbd_ev_handler)(void *, kbd_event_t *);
    49 static void *kbd_ev_arg;
    50 static void (*pos_ev_handler)(void *, pos_event_t *);
    51 static void *pos_ev_arg;
    52 
    53 static void on_keyboard_event(widget_t *widget, void *data)
    54 {
    55         printf("Keyboard event\n");
    56         kbd_ev_handler(kbd_ev_arg, (kbd_event_t *) data);
    57 }
    58 
    59 static void on_position_event(widget_t *widget, void *data)
    60 {
    61         pos_ev_handler(pos_ev_arg, (pos_event_t *) data);
    62 }
    63 #endif
    6446
    6547/** Check for new display devices.
     
    140122/** Create display server output.
    141123 *
    142  * @param kbd_event_handler
    143  * @param karg
    144  * @param pos_event_handler
    145  * @param parg
    146124 * @param routput Place to store pointer to display server output object.
    147125 * @return EOK on success or an error code
    148126 */
    149 errno_t ds_output_create(void (*kbd_event_handler)(void *, kbd_event_t *),
    150     void *karg, void (*pos_event_handler)(void *, pos_event_t *),
    151     void *parg, ds_output_t **routput)
     127errno_t ds_output_create(ds_output_t **routput)
    152128{
    153129        ds_output_t *output;
  • uspace/srv/hid/display/output.h

    rdf1a019 r02f45748  
    4242#include "types/display/output.h"
    4343
    44 extern errno_t ds_output_create(void (*)(void *, kbd_event_t *),
    45     void *, void (*)(void *, pos_event_t *), void *, ds_output_t **);
     44extern errno_t ds_output_create(ds_output_t **);
    4645extern errno_t ds_output_start_discovery(ds_output_t *);
    4746extern void ds_output_destroy(ds_output_t *);
Note: See TracChangeset for help on using the changeset viewer.