diff options
author | Jonathan Maw <jonathan.maw@codethink.co.uk> | 2015-02-03 16:29:25 +0000 |
---|---|---|
committer | Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp> | 2015-02-23 10:09:14 +0900 |
commit | 8c4bd3cf5f8e2241b2e24abad81dd0f8b811c20d (patch) | |
tree | cca8bd6b7a98e6ebd33775bfd8292124e7f147ec /ivi-layermanagement-examples | |
parent | bac7fc24bb94e37e33f447b58ec74240bb248841 (diff) | |
download | wayland-ivi-extension-8c4bd3cf5f8e2241b2e24abad81dd0f8b811c20d.tar.gz |
ilmClient: Remove ilm_UpdateInputEventAcceptanceOn
This function is being removed because it will be replaced
by a more general "input acceptance" API.
Signed-off-by: James Thomas <james.thomas@codethink.co.uk>
Diffstat (limited to 'ivi-layermanagement-examples')
9 files changed, 3 insertions, 85 deletions
diff --git a/ivi-layermanagement-examples/EGLWLInputEventExample/src/WLSurface.cpp b/ivi-layermanagement-examples/EGLWLInputEventExample/src/WLSurface.cpp index 1961777..2a0572e 100644 --- a/ivi-layermanagement-examples/EGLWLInputEventExample/src/WLSurface.cpp +++ b/ivi-layermanagement-examples/EGLWLInputEventExample/src/WLSurface.cpp @@ -84,11 +84,7 @@ WLSurface::CreateIlmSurface(t_ilm_surface* surfaceId, rtnv = ilm_surfaceSetVisibility(*surfaceId, ILM_TRUE); rtnv = ilm_surfaceSetOpacity(*surfaceId, 1.0f); - rtnv = ilm_UpdateInputEventAcceptanceOn(*surfaceId, - ILM_INPUT_DEVICE_POINTER | - ILM_INPUT_DEVICE_TOUCH | - ILM_INPUT_DEVICE_KEYBOARD, - ILM_TRUE); + /* TODO: Set input acceptance using new API */ rtnv = ilm_SetKeyboardFocusOn(*surfaceId); rtnv = ilm_commitChanges(); @@ -102,11 +98,7 @@ void WLSurface::DestroyIlmSurface() { if (m_ilmSurfaceId > 0){ - ilm_UpdateInputEventAcceptanceOn(m_ilmSurfaceId, - ILM_INPUT_DEVICE_POINTER | - ILM_INPUT_DEVICE_TOUCH | - ILM_INPUT_DEVICE_KEYBOARD, - ILM_FALSE); + /* TODO: Set input acceptance using new API */ ilm_SetKeyboardFocusOn(m_ilmSurfaceId); ilm_commitChanges(); ilm_surfaceRemove(m_ilmSurfaceId); diff --git a/ivi-layermanagement-examples/EGLWLInputEventExample/src/main.cpp b/ivi-layermanagement-examples/EGLWLInputEventExample/src/main.cpp index 685f8f0..9976e69 100644 --- a/ivi-layermanagement-examples/EGLWLInputEventExample/src/main.cpp +++ b/ivi-layermanagement-examples/EGLWLInputEventExample/src/main.cpp @@ -110,9 +110,7 @@ int main(int argc, char **argv) TerminateRenderer(); ilm_surfaceRemove(surfaceId); - ilm_UpdateInputEventAcceptanceOn(surfaceId, - ILM_INPUT_DEVICE_POINTER | ILM_INPUT_DEVICE_TOUCH, - ILM_FALSE); + /* TODO: Update input acceptance to new API */ ilm_commitChanges(); eglSurface->DestroyIlmSurface(); ilm_commitChanges(); diff --git a/ivi-layermanagement-examples/LayerManagerControl/include/LMControl.h b/ivi-layermanagement-examples/LayerManagerControl/include/LMControl.h index 6ac2254..ce0b974 100644 --- a/ivi-layermanagement-examples/LayerManagerControl/include/LMControl.h +++ b/ivi-layermanagement-examples/LayerManagerControl/include/LMControl.h @@ -253,7 +253,6 @@ void printScene(); void getCommunicatorPerformance(); void setSurfaceKeyboardFocus(t_ilm_surface surface); void getKeyboardFocus(); -void setSurfaceAcceptsInput(t_ilm_surface surfaceId, string kbdPointerTouch, t_ilm_bool acceptance); void testNotificationLayer(t_ilm_layer layerid); void watchLayer(unsigned int* layerids, unsigned int layeridCount); void watchSurface(unsigned int* surfaceids, unsigned int surfaceidCount); diff --git a/ivi-layermanagement-examples/LayerManagerControl/include/SceneStore.h b/ivi-layermanagement-examples/LayerManagerControl/include/SceneStore.h index d2978fe..99b8359 100644 --- a/ivi-layermanagement-examples/LayerManagerControl/include/SceneStore.h +++ b/ivi-layermanagement-examples/LayerManagerControl/include/SceneStore.h @@ -574,7 +574,6 @@ OBJECT(IlmSurface) PROPERTY(t_ilm_uint, updateCounter) PROPERTY(t_ilm_uint, pixelformat) PROPERTY(t_ilm_uint, nativeSurface) - PROPERTY(ilmInputDevice, inputDevicesAcceptance) /***/ OBJECTEND diff --git a/ivi-layermanagement-examples/LayerManagerControl/src/commands.cpp b/ivi-layermanagement-examples/LayerManagerControl/src/commands.cpp index 61a6de8..641b1ea 100644 --- a/ivi-layermanagement-examples/LayerManagerControl/src/commands.cpp +++ b/ivi-layermanagement-examples/LayerManagerControl/src/commands.cpp @@ -668,17 +668,6 @@ COMMAND("get keyboard focus") } //============================================================================= -COMMAND("set surface <surfaceid> accept <acceptance> input events from devices <kbd:pointer:touch>") -//============================================================================= -{ - t_ilm_surface surfaceId = input->getUint("surfaceid"); - t_ilm_bool acceptance = input->getBool("acceptance"); - string kbdPointerTouch = input->getString("kbd:pointer:touch"); - - setSurfaceAcceptsInput(surfaceId, kbdPointerTouch, acceptance); -} - -//============================================================================= COMMAND("test notification layer <layerid>") //============================================================================= { diff --git a/ivi-layermanagement-examples/LayerManagerControl/src/control.cpp b/ivi-layermanagement-examples/LayerManagerControl/src/control.cpp index f8fd7d4..48ae5f6 100644 --- a/ivi-layermanagement-examples/LayerManagerControl/src/control.cpp +++ b/ivi-layermanagement-examples/LayerManagerControl/src/control.cpp @@ -111,52 +111,6 @@ void getKeyboardFocus() } } -void setSurfaceAcceptsInput(t_ilm_surface surfaceId, string kbdPointerTouch, t_ilm_bool acceptance) -{ - char* str; - char* tok; - - ilmInputDevice devices = (ilmInputDevice)0; - - str = new char [kbdPointerTouch.size()+1]; - strcpy(str, kbdPointerTouch.c_str()); - tok = strtok(str, ":"); - while (tok != NULL) - { - if (!strcmp(tok, "kbd")) - { - devices |= ILM_INPUT_DEVICE_KEYBOARD; - } - else if (!strcmp(tok, "pointer")) - { - devices |= ILM_INPUT_DEVICE_POINTER; - } - else if (!strcmp(tok, "touch")) - { - devices |= ILM_INPUT_DEVICE_TOUCH; - } - else - { - cerr << "Unknown devices specified." << endl; - } - - tok = strtok(NULL, ":"); - } - - ilmErrorTypes callResult = ilm_UpdateInputEventAcceptanceOn(surfaceId, devices, acceptance); - if (ILM_SUCCESS != callResult) - { - cout << "LayerManagerService returned: " << ILM_ERROR_STRING(callResult) << "\n"; - cout << "Failed to update input event acceptance on surface with ID " << surfaceId << "\n"; - delete[] str; - return; - } - - ilm_commitChanges(); - - delete[] str; -} - void layerNotificationCallback(t_ilm_layer layer, struct ilmLayerProperties* properties, t_ilm_notification_mask mask) { cout << "\nNotification: layer " << layer << " updated properties:\n"; diff --git a/ivi-layermanagement-examples/LayerManagerControl/src/print.cpp b/ivi-layermanagement-examples/LayerManagerControl/src/print.cpp index c3e617e..b5b8451 100644 --- a/ivi-layermanagement-examples/LayerManagerControl/src/print.cpp +++ b/ivi-layermanagement-examples/LayerManagerControl/src/print.cpp @@ -317,12 +317,6 @@ void printSurfaceProperties(unsigned int surfaceid, const char* prefix) cout << prefix << "- native surface: " << p.nativeSurface << "\n"; - cout << prefix << "- accepts input from: " - << (p.inputDevicesAcceptance & ILM_INPUT_DEVICE_KEYBOARD ? "keyboard " : "") - << (p.inputDevicesAcceptance & ILM_INPUT_DEVICE_POINTER ? "mouse " : "") - << (p.inputDevicesAcceptance & ILM_INPUT_DEVICE_TOUCH ? "touch " : "") - << "\n"; - t_ilm_surface keyboardFocusSurfaceId; callResult = ilm_GetKeyboardFocusSurfaceId(&keyboardFocusSurfaceId); if (ILM_SUCCESS != callResult) diff --git a/ivi-layermanagement-examples/LayerManagerControl/src/scatter.cpp b/ivi-layermanagement-examples/LayerManagerControl/src/scatter.cpp index be12458..0247f55 100644 --- a/ivi-layermanagement-examples/LayerManagerControl/src/scatter.cpp +++ b/ivi-layermanagement-examples/LayerManagerControl/src/scatter.cpp @@ -244,10 +244,6 @@ void scatterHandleUserInput(t_scene_data* pOriginalScene, t_scene_data* pScatter pixelFormats[ILM_PIXELFORMAT_RGBA_4444] = "RGBA_4444"; pixelFormats[ILM_PIXEL_FORMAT_UNKNOWN] = "FORMAT_UNKNOWN"; - string inputDeviceAcceptance = (surfaceProperties.inputDevicesAcceptance & ILM_INPUT_DEVICE_KEYBOARD ? "Keyboard " : ""); - inputDeviceAcceptance +=(surfaceProperties.inputDevicesAcceptance & ILM_INPUT_DEVICE_POINTER ? "Pointer " : ""); - inputDeviceAcceptance += (surfaceProperties.inputDevicesAcceptance & ILM_INPUT_DEVICE_TOUCH ? "Touch " : ""); - stringstream tempStream; char fillChar = '-'; int width = 20; @@ -258,7 +254,6 @@ void scatterHandleUserInput(t_scene_data* pOriginalScene, t_scene_data* pScatter tempStream << std::setw(width) << std::left << std::setfill(fillChar) << "Original Dimensions" << ":" << "[w:" << surfaceProperties.origSourceWidth << ", h:" << surfaceProperties.origSourceHeight << "]\n"; tempStream << std::setw(width) << std::left << std::setfill(fillChar) << "Opacity" << ":" << surfaceProperties.opacity << "\n"; tempStream << std::setw(width) << std::left << std::setfill(fillChar) << "Visibility" << ":" << surfaceProperties.visibility << "\n"; - tempStream << std::setw(width) << std::left << std::setfill(fillChar) << "Input Devices" << ":" << surfaceProperties.inputDevicesAcceptance << " [" << inputDeviceAcceptance << "]\n"; tempStream << std::setw(width) << std::left << std::setfill(fillChar) << "Native Surface" << ":" << surfaceProperties.nativeSurface << "\n"; tempStream << std::setw(width) << std::left << std::setfill(fillChar) << "Orientation" << ":" << surfaceProperties.orientation << " [" << orientations[surfaceProperties.orientation] << "]\n"; tempStream << std::setw(width) << std::left << std::setfill(fillChar) << "Pixel Format" << ":" << surfaceProperties.pixelformat << " [" << pixelFormats[surfaceProperties.pixelformat] << "]\n"; diff --git a/ivi-layermanagement-examples/LayerManagerControl/src/sceneio.cpp b/ivi-layermanagement-examples/LayerManagerControl/src/sceneio.cpp index 7c15998..e7160fe 100644 --- a/ivi-layermanagement-examples/LayerManagerControl/src/sceneio.cpp +++ b/ivi-layermanagement-examples/LayerManagerControl/src/sceneio.cpp @@ -52,7 +52,6 @@ void captureSceneDataHelper(t_ilm_surface surfaceId, t_scene_data* pSceneData, I pSurface->set("destY", props.destY); pSurface->set("drawCounter", props.drawCounter); pSurface->set("frameCounter", props.frameCounter); - pSurface->set("inputDevicesAcceptance", props.inputDevicesAcceptance); pSurface->set("nativeSurface", props.nativeSurface); pSurface->set("opacity", props.opacity); pSurface->set("orientation", props.orientation); @@ -314,7 +313,6 @@ ilmSurfaceProperties getSurfaceProperties(IlmSurface* pIlmsurface) pIlmsurface->get("destY", &(props.destY)); pIlmsurface->get("drawCounter", &(props.drawCounter)); pIlmsurface->get("frameCounter", &(props.frameCounter)); - pIlmsurface->get("inputDevicesAcceptance", &(props.inputDevicesAcceptance)); pIlmsurface->get("nativeSurface", &(props.nativeSurface)); pIlmsurface->get("opacity", &(props.opacity)); pIlmsurface->get("orientation", &(props.orientation)); |