| 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) 2025 Takao Fujiwara <[email protected]> |
| 5 |
* Copyright (C) 2025 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 |
| 9 |
* License as published by the Free Software Foundation; either |
| 10 |
* version 2.1 of the License, or (at your option) any later version. |
| 11 |
* |
| 12 |
* This library is distributed in the hope that it will be useful, |
| 13 |
* but 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 02110-1301 |
| 20 |
* USA |
| 21 |
*/ |
| 22 |
|
| 23 |
#include <gtk/gtk.h> |
| 24 |
#include <ibus.h> |
| 25 |
|
| 26 |
#ifndef __IBUS_THEMED_RGBA_H_ |
| 27 |
#define __IBUS_THEMED_RGBA_H_ |
| 28 |
|
| 29 |
#define IBUS_TYPE_THEMED_RGBA \ |
| 30 |
(ibus_themed_rgba_get_type ()) |
| 31 |
#define IBUS_THEMED_RGBA(obj) \ |
| 32 |
(G_TYPE_CHECK_INSTANCE_CAST ((obj), IBUS_TYPE_THEMED_RGBA, IBusThemedRGBA)) |
| 33 |
#define IBUS_THEMED_RGBA_CLASS(klass) \ |
| 34 |
(G_TYPE_CHECK_CLASS_CAST ((klass), \ |
| 35 |
IBUS_TYPE_THEMED_RGBA, \ |
| 36 |
IBusThemedRGBAClass)) |
| 37 |
#define IBUS_IS_THEMED_RGBA(obj) \ |
| 38 |
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), IBUS_TYPE_THEMED_RGBA)) |
| 39 |
#define IBUS_IS_THEMED_RGBA_CLASS(klass) \ |
| 40 |
(G_TYPE_CHECK_CLASS_TYPE ((klass), IBUS_TYPE_THEMED_RGBA)) |
| 41 |
#define IBUS_THEMED_RGBA_GET_CLASS(obj) \ |
| 42 |
(G_TYPE_INSTANCE_GET_CLASS ((obj), \ |
| 43 |
IBUS_TYPE_THEMED_RGBA, \ |
| 44 |
IBusThemedRGBAClass)) |
| 45 |
|
| 46 |
typedef struct _IBusThemedRGBA IBusThemedRGBA; |
| 47 |
typedef struct _IBusThemedRGBAClass IBusThemedRGBAClass; |
| 48 |
|
| 49 |
struct _IBusThemedRGBA { |
| 50 |
IBusObject parent; |
| 51 |
/* instance members */ |
| 52 |
IBusRGBA *normal_fg; |
| 53 |
IBusRGBA *normal_bg; |
| 54 |
IBusRGBA *selected_fg; |
| 55 |
IBusRGBA *selected_bg; |
| 56 |
}; |
| 57 |
|
| 58 |
struct _IBusThemedRGBAClass { |
| 59 |
IBusObjectClass parent; |
| 60 |
}; |
| 61 |
|
| 62 |
GType ibus_themed_rgba_get_type (void); |
| 63 |
#if GTK_CHECK_VERSION (2, 91, 0) |
| 64 |
IBusThemedRGBA *ibus_themed_rgba_new (GtkStyleContext *style_context); |
| 65 |
#else |
| 66 |
IBusThemedRGBA *ibus_themed_rgba_new (GtkStyle *style); |
| 67 |
#endif |
| 68 |
void ibus_themed_rgba_get_colors (IBusThemedRGBA *rgba); |
| 69 |
|
| 70 |
#endif |