decompose.h (1807B)
1/* 2 * Licensed to the Apache Software Foundation (ASF) under one 3 * or more contributor license agreements. See the NOTICE file 4 * distributed with this work for additional information 5 * regarding copyright ownership. The ASF licenses this file 6 * to you under the Apache License, Version 2.0 (the 7 * "License"); you may not use this file except in compliance 8 * with the License. You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, 13 * software distributed under the License is distributed on an 14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 * KIND, either express or implied. See the License for the 16 * specific language governing permissions and limitations 17 * under the License. 18 */ 19 20#ifndef GUAC_RDP_DECOMPOSE_H 21#define GUAC_RDP_DECOMPOSE_H 22 23#include "config.h" 24#include "keyboard.h" 25 26/** 27 * Attempts to type the given keysym by decomposing the associated character 28 * into the dead key and base key pair which would be used to type that 29 * character on a keyboard which lacks the necessary dedicated key. The key 30 * events for the dead key and base key are sent only if the keyboard layout of 31 * the given keyboard defines those keys. 32 * 33 * For example, the keysym for "ò" (0x00F2) would decompose into a dead grave 34 * (`) and the base key "o". May it rest in peace. 35 * 36 * @param keyboard 37 * The guac_rdp_keyboard associated with the current RDP session. 38 * 39 * @param keysym 40 * The keysym being pressed. 41 * 42 * @return 43 * Zero if the keysym was successfully decomposed and sent to the RDP 44 * server as a pair of key events (the dead key and base key), non-zero 45 * otherwise. 46 */ 47int guac_rdp_decompose_keysym(guac_rdp_keyboard* keyboard, int keysym); 48 49#endif 50