Add getter and setter methods of orientation.
authorPeng Huang <shawn.p.huang@gmail.com>
Fri, 1 Jan 2010 08:16:37 +0000 (16:16 +0800)
committerPeng Huang <shawn.p.huang@gmail.com>
Fri, 1 Jan 2010 08:16:37 +0000 (16:16 +0800)
src/ibuslookuptable.c
src/ibuslookuptable.h

index a237485978c98b30f04c097ef0d55ce3d0a90786..615450e7555aa7348826bc2b9ae21c5f4ae2ab27 100644 (file)
@@ -466,6 +466,27 @@ ibus_lookup_table_is_round (IBusLookupTable *table)
     return table->round;
 }
 
+void
+ibus_lookup_table_set_orientation (IBusLookupTable *table,
+                                   gint             orientation)
+{
+    g_assert (IBUS_IS_LOOKUP_TABLE (table));
+    g_assert (orientation == IBUS_ORIENTATION_HORIZONTAL ||
+              orientation == IBUS_ORIENTATION_VERTICAL ||
+              orientation == IBUS_ORIENTATION_SYSTEM);
+
+    table->orientation = orientation;
+}
+
+gint
+ibus_lookup_table_get_orientation (IBusLookupTable *table)
+{
+    g_assert (IBUS_IS_LOOKUP_TABLE (table));
+
+    return table->orientation;
+}
+
+
 gboolean
 ibus_lookup_table_page_up (IBusLookupTable *table)
 {
index e1bfd1e0caea6903cd7f21e63223fec63db7977f..d5247b63bda2864ad10af8981269fc69dd5e1660 100644 (file)
@@ -261,6 +261,26 @@ void                 ibus_lookup_table_set_round
  */
 gboolean             ibus_lookup_table_is_round (IBusLookupTable    *table);
 
+/**
+ * ibus_lookup_table_set_orientation:
+ * @table: An IBusLookupTable.
+ * @orientation: .
+ *
+ * Set the orientation.
+ */
+void                 ibus_lookup_table_set_orientation
+                                                (IBusLookupTable    *table,
+                                                 gint                orientation);
+
+/**
+ * ibus_lookup_table_get_orientation:
+ * @table: An IBusLookupTable.
+ * @returns: The orientation of the @table.
+ *
+ * Returns the orientation of the IBusLookupTable.
+ */
+gint                 ibus_lookup_table_get_orientation
+                                                (IBusLookupTable    *table);
 
 
 /**