SCIMBridge  0.4.x
scim-bridge-attribute.h
Go to the documentation of this file.
1 /*
2  * SCIM Bridge
3  *
4  * Copyright (c) 2006 Ryo Dairiki <ryo-dairiki@users.sourceforge.net>
5  *
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 and
10  * appearing in the file LICENSE.LGPL included in the package of this file.
11  * You can also redistribute it and/or modify it under the terms of
12  * the GNU General Public License as published by the Free Software Foundation and
13  * appearing in the file LICENSE.GPL included in the package of this file.
14  *
15  * This library is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18  */
19 
30 #ifndef SCIMBRIDGEATTRIBUTE_H_
31 #define SCIMBRIDGEATTRIBUTE_H_
32 
33 #include "scim-bridge.h"
34 
35 enum _scim_bridge_attribute_type_t
36 {
37  ATTRIBUTE_NONE,
38  ATTRIBUTE_DECORATE,
39  ATTRIBUTE_FOREGROUND,
40  ATTRIBUTE_BACKGROUND
41 };
42 
46 typedef enum _scim_bridge_attribute_type_t scim_bridge_attribute_type_t;
47 
51 typedef unsigned int scim_bridge_attribute_value_t;
52 
57 
62 
67 
72 
77 
78 #ifdef __cplusplus
79 extern "C"
80 {
81 #endif
82 
88  ScimBridgeAttribute *scim_bridge_alloc_attribute ();
89 
96  void scim_bridge_free_attribute (ScimBridgeAttribute *attribute);
97 
104  void scim_bridge_copy_attribute (ScimBridgeAttribute *dst, const ScimBridgeAttribute *src);
105 
113  boolean scim_bridge_attribute_equals (const ScimBridgeAttribute *atr1, const ScimBridgeAttribute *atr2);
114 
121  scim_bridge_attribute_type_t scim_bridge_attribute_get_type (const ScimBridgeAttribute *attribute);
122 
128  void scim_bridge_attribute_set_type (ScimBridgeAttribute *attribute, scim_bridge_attribute_type_t type);
129 
136  size_t scim_bridge_attribute_get_begin (const ScimBridgeAttribute *attribute);
137 
144  void scim_bridge_attribute_set_begin (ScimBridgeAttribute *attribute, size_t begin);
145 
152  size_t scim_bridge_attribute_get_end (const ScimBridgeAttribute *attribute);
153 
160  void scim_bridge_attribute_set_end (ScimBridgeAttribute *attribute, size_t end);
161 
168  scim_bridge_attribute_type_t scim_bridge_attribute_get_type (const ScimBridgeAttribute *attribute);
169 
176  void scim_bridge_attribute_set_type (ScimBridgeAttribute *attribute, scim_bridge_attribute_type_t type);
177 
186  scim_bridge_attribute_value_t scim_bridge_attribute_get_value (const ScimBridgeAttribute *attribute);
187 
196  void scim_bridge_attribute_set_value (ScimBridgeAttribute *attribute, scim_bridge_attribute_value_t value);
197 
208  void scim_bridge_attribute_set_color (ScimBridgeAttribute *attribute, unsigned int red, unsigned int green, unsigned int blue);
209 
218  unsigned int scim_bridge_attribute_get_red (const ScimBridgeAttribute *attribute);
219 
228  void scim_bridge_attribute_set_red (ScimBridgeAttribute *attribute, unsigned int red);
229 
238  unsigned int scim_bridge_attribute_get_green (const ScimBridgeAttribute *attribute);
239 
248  void scim_bridge_attribute_set_green (ScimBridgeAttribute *attribute, unsigned int green);
249 
258  unsigned int scim_bridge_attribute_get_blue (const ScimBridgeAttribute *attribute);
259 
268  void scim_bridge_attribute_set_blue (ScimBridgeAttribute *attribute, unsigned int blue);
269 
270 #ifdef __cplusplus
271 }
272 #endif
273 #endif /*SCIMBRIDGEATTRIBUTE_H_*/