src/core/linux/SDL_ibus.h
author Sam Lantinga <slouken@libsdl.org>
Fri, 04 Jan 2019 22:01:14 -0800
changeset 12503 806492103856
parent 11811 5d94cb6b24d3
permissions -rw-r--r--
Updated copyright for 2019
alex@8889
     1
/*
alex@8889
     2
  Simple DirectMedia Layer
slouken@12503
     3
  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
alex@8889
     4
alex@8889
     5
  This software is provided 'as-is', without any express or implied
alex@8889
     6
  warranty.  In no event will the authors be held liable for any damages
alex@8889
     7
  arising from the use of this software.
alex@8889
     8
alex@8889
     9
  Permission is granted to anyone to use this software for any purpose,
alex@8889
    10
  including commercial applications, and to alter it and redistribute it
alex@8889
    11
  freely, subject to the following restrictions:
alex@8889
    12
alex@8889
    13
  1. The origin of this software must not be misrepresented; you must not
alex@8889
    14
     claim that you wrote the original software. If you use this software
alex@8889
    15
     in a product, an acknowledgment in the product documentation would be
alex@8889
    16
     appreciated but is not required.
alex@8889
    17
  2. Altered source versions must be plainly marked as such, and must not be
alex@8889
    18
     misrepresented as being the original software.
alex@8889
    19
  3. This notice may not be removed or altered from any source distribution.
alex@8889
    20
*/
alex@8889
    21
alex@8889
    22
#include "../../SDL_internal.h"
alex@8889
    23
slouken@10638
    24
#ifndef SDL_ibus_h_
slouken@10638
    25
#define SDL_ibus_h_
alex@8889
    26
alex@8889
    27
#ifdef HAVE_IBUS_IBUS_H
alex@8889
    28
#define SDL_USE_IBUS 1
alex@8889
    29
#include "SDL_stdinc.h"
alex@8889
    30
#include <ibus-1.0/ibus.h>
alex@8889
    31
alex@8889
    32
extern SDL_bool SDL_IBus_Init(void);
alex@8889
    33
extern void SDL_IBus_Quit(void);
alex@8889
    34
alex@8889
    35
/* Lets the IBus server know about changes in window focus */
alex@8889
    36
extern void SDL_IBus_SetFocus(SDL_bool focused);
alex@8889
    37
alex@8889
    38
/* Closes the candidate list and resets any text currently being edited */
alex@8889
    39
extern void SDL_IBus_Reset(void);
alex@8889
    40
alex@8889
    41
/* Sends a keypress event to IBus, returns SDL_TRUE if IBus used this event to
alex@8889
    42
   update its candidate list or change input methods. PumpEvents should be
alex@8889
    43
   called some time after this, to recieve the TextInput / TextEditing event back. */
alex@8889
    44
extern SDL_bool SDL_IBus_ProcessKeyEvent(Uint32 keysym, Uint32 keycode);
alex@8889
    45
alex@8889
    46
/* Update the position of IBus' candidate list. If rect is NULL then this will 
alex@8889
    47
   just reposition it relative to the focused window's new position. */
alex@8889
    48
extern void SDL_IBus_UpdateTextRect(SDL_Rect *window_relative_rect);
alex@8889
    49
alex@8889
    50
/* Checks DBus for new IBus events, and calls SDL_SendKeyboardText / 
alex@8889
    51
   SDL_SendEditingText for each event it finds */
slouken@10721
    52
extern void SDL_IBus_PumpEvents(void);
alex@8889
    53
alex@8889
    54
#endif /* HAVE_IBUS_IBUS_H */
alex@8889
    55
slouken@10638
    56
#endif /* SDL_ibus_h_ */
alex@8889
    57
alex@8889
    58
/* vi: set ts=4 sw=4 expandtab: */