| 1 |
/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ |
| 2 |
/* vim:set et sts=4: */ |
| 3 |
/* ibus - The Input Bus |
| 4 |
* Copyright (C) 2023 Takao Fujiwara <[email protected]> |
| 5 |
* Copyright (C) 2023 Red Hat, Inc. |
| 6 |
* |
| 7 |
* This library is free software; you can redistribute it and/or |
| 8 |
* modify it under the terms of the GNU Lesser General Public License |
| 9 |
* as published by the Free Software Foundation; either version 2.1 of |
| 10 |
* the License, or (at your option) any later version. |
| 11 |
* |
| 12 |
* This library is distributed in the hope that it will be useful, but |
| 13 |
* WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 15 |
* Lesser General Public License for more details. |
| 16 |
* |
| 17 |
* You should have received a copy of the GNU Lesser General Public |
| 18 |
* License along with this library; if not, write to the Free Software |
| 19 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
| 20 |
* 02110-1301 USA. |
| 21 |
*/ |
| 22 |
|
| 23 |
#ifndef __IBUS_WAYLAND_IM_H_ |
| 24 |
#define __IBUS_WAYLAND_IM_H_ |
| 25 |
|
| 26 |
/** |
| 27 |
* SECTION: ibuswaylandim |
| 28 |
* @short_description: IBus Wayland input method protocol |
| 29 |
* @stability: Unstable |
| 30 |
* |
| 31 |
* An IBus Wayland IM Object. |
| 32 |
*/ |
| 33 |
|
| 34 |
#include <glib.h> |
| 35 |
#include <gio/gio.h> |
| 36 |
#include <ibus.h> |
| 37 |
|
| 38 |
#define IBUS_TYPE_WAYLAND_IM \ |
| 39 |
(ibus_wayland_im_get_type ()) |
| 40 |
#define IBUS_WAYLAND_IM(obj) \ |
| 41 |
(G_TYPE_CHECK_INSTANCE_CAST ((obj), IBUS_TYPE_WAYLAND_IM, IBusWaylandIM)) |
| 42 |
#define IBUS_IS_WAYLAND_IM(obj) \ |
| 43 |
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), IBUS_TYPE_WAYLAND_IM)) |
| 44 |
|
| 45 |
G_BEGIN_DECLS |
| 46 |
|
| 47 |
typedef struct _IBusWaylandIM IBusWaylandIM; |
| 48 |
typedef struct _IBusWaylandIMClass IBusWaylandIMClass; |
| 49 |
|
| 50 |
/** |
| 51 |
* IBusWaylandIM: |
| 52 |
* |
| 53 |
* An IBus Wayland IM Object. |
| 54 |
*/ |
| 55 |
struct _IBusWaylandIM { |
| 56 |
/*< private >*/ |
| 57 |
IBusObject parent; |
| 58 |
}; |
| 59 |
|
| 60 |
struct _IBusWaylandIMClass { |
| 61 |
/*< private >*/ |
| 62 |
IBusObjectClass parent; |
| 63 |
|
| 64 |
/* padding */ |
| 65 |
gpointer pdummy[5]; |
| 66 |
}; |
| 67 |
|
| 68 |
|
| 69 |
GType ibus_wayland_im_get_type (void); |
| 70 |
|
| 71 |
/** |
| 72 |
* ibus_wayland_im_new: |
| 73 |
* @first_property_name: Name of the first property. |
| 74 |
* @...: the NULL-terminated arguments of the properties and values. |
| 75 |
* |
| 76 |
* Creates a new #IBusWaylandIM. |
| 77 |
* ibus_wayland_im_new() supports the va_list format. |
| 78 |
* name property is required. e.g. |
| 79 |
* ibus_wayland_im_new("bus", bus, "wl_display", display, NULL) |
| 80 |
* |
| 81 |
* Returns: A newly allocated #IBusWaylandIM. |
| 82 |
*/ |
| 83 |
IBusWaylandIM *ibus_wayland_im_new (const gchar |
| 84 |
*first_property_name, |
| 85 |
...); |
| 86 |
|
| 87 |
/** |
| 88 |
* ibus_wayland_im_set_surface: |
| 89 |
* @wlim: An #IBusWaylandIM. |
| 90 |
* @surface: A struct wl_surface. |
| 91 |
* |
| 92 |
* Set wl_surface to #IBusWaylandIM and return %TRUE if |
| 93 |
* set_overlay_panel() can be called, otherwise %FALSE. |
| 94 |
*/ |
| 95 |
gboolean ibus_wayland_im_set_surface (IBusWaylandIM *wlim, |
| 96 |
gpointer surface); |
| 97 |
|
| 98 |
G_END_DECLS |
| 99 |
#endif |