text: Add support for control keys to the protocol
[profile/ivi/weston.git] / tests / test-text-client.c
index 828f3a0..897909a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright © 2012 Openismus GmbH
+ * Copyright © 2012 Intel Corporation
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -60,6 +60,14 @@ text_model_preedit_string(void *data,
 }
 
 static void
+text_model_delete_surrounding_text(void *data,
+                                  struct text_model *text_model,
+                                  int32_t index,
+                                  uint32_t length)
+{
+}
+
+static void
 text_model_preedit_styling(void *data,
                           struct text_model *text_model)
 {
@@ -67,10 +75,12 @@ text_model_preedit_styling(void *data,
 
 static void 
 text_model_key(void *data,
-              struct text_model *text_model)
+              struct text_model *text_model,
+              uint32_t key,
+              uint32_t state)
 {
 }
-       
+
 static void
 text_model_selection_replacement(void *data,
                                 struct text_model *text_model)
@@ -112,6 +122,7 @@ text_model_deactivated(void *data,
 static const struct text_model_listener text_model_listener = {
        text_model_commit_string,
        text_model_preedit_string,
+       text_model_delete_surrounding_text,
        text_model_preedit_styling,
        text_model_key,
        text_model_selection_replacement,
@@ -160,7 +171,7 @@ create_text_model(int fd, struct display *display)
        char buf[64];
        int len;
 
-       display->text_model = text_model_factory_create_text_model(display->factory, display->surface);
+       display->text_model = text_model_factory_create_text_model(display->factory);
        text_model_add_listener(display->text_model, &text_model_listener, display);
        wl_display_flush(display->display);