Path: blob/master/thirdparty/sdl/core/linux/SDL_ibus.h
10279 views
/*1Simple DirectMedia Layer2Copyright (C) 1997-2025 Sam Lantinga <[email protected]>34This software is provided 'as-is', without any express or implied5warranty. In no event will the authors be held liable for any damages6arising from the use of this software.78Permission is granted to anyone to use this software for any purpose,9including commercial applications, and to alter it and redistribute it10freely, subject to the following restrictions:11121. The origin of this software must not be misrepresented; you must not13claim that you wrote the original software. If you use this software14in a product, an acknowledgment in the product documentation would be15appreciated but is not required.162. Altered source versions must be plainly marked as such, and must not be17misrepresented as being the original software.183. This notice may not be removed or altered from any source distribution.19*/2021#include "SDL_internal.h"2223#ifndef SDL_ibus_h_24#define SDL_ibus_h_2526#ifdef HAVE_IBUS_IBUS_H27#define SDL_USE_IBUS 128#include <ibus.h>2930extern bool SDL_IBus_Init(void);31extern void SDL_IBus_Quit(void);3233// Lets the IBus server know about changes in window focus34extern void SDL_IBus_SetFocus(bool focused);3536// Closes the candidate list and resets any text currently being edited37extern void SDL_IBus_Reset(void);3839/* Sends a keypress event to IBus, returns true if IBus used this event to40update its candidate list or change input methods. PumpEvents should be41called some time after this, to receive the TextInput / TextEditing event back. */42extern bool SDL_IBus_ProcessKeyEvent(Uint32 keysym, Uint32 keycode, bool down);4344/* Update the position of IBus' candidate list. If rect is NULL then this will45just reposition it relative to the focused window's new position. */46extern void SDL_IBus_UpdateTextInputArea(SDL_Window *window);4748/* Checks DBus for new IBus events, and calls SDL_SendKeyboardText /49SDL_SendEditingText for each event it finds */50extern void SDL_IBus_PumpEvents(void);5152#endif // HAVE_IBUS_IBUS_H5354#endif // SDL_ibus_h_555657