OLD | NEW |
1 /* vim:set et sts=4: */ | 1 /* vim:set et sts=4: */ |
2 /* IBus - The Input Bus | 2 /* IBus - The Input Bus |
3 * Copyright (C) 2008-2010 Peng Huang <shawn.p.huang@gmail.com> | 3 * Copyright (C) 2008-2010 Peng Huang <shawn.p.huang@gmail.com> |
4 * Copyright (C) 2008-2010 Red Hat, Inc. | 4 * Copyright (C) 2008-2010 Red Hat, Inc. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Lesser General Public | 7 * modify it under the terms of the GNU Lesser General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
495 } | 495 } |
496 | 496 |
497 GQuark event = (GQuark) GPOINTER_TO_UINT (g_tree_lookup (priv->hotkeys, &hot
key)); | 497 GQuark event = (GQuark) GPOINTER_TO_UINT (g_tree_lookup (priv->hotkeys, &hot
key)); |
498 | 498 |
499 if (event != 0) { | 499 if (event != 0) { |
500 g_signal_emit (profile, profile_signals[TRIGGER], event, user_data); | 500 g_signal_emit (profile, profile_signals[TRIGGER], event, user_data); |
501 } | 501 } |
502 | 502 |
503 return event; | 503 return event; |
504 } | 504 } |
| 505 |
| 506 GQuark |
| 507 ibus_hotkey_profile_lookup_hotkey (IBusHotkeyProfile *profile, |
| 508 guint keyval, |
| 509 guint modifiers) |
| 510 { |
| 511 IBusHotkeyProfilePrivate *priv; |
| 512 priv = IBUS_HOTKEY_PROFILE_GET_PRIVATE (profile); |
| 513 |
| 514 IBusHotkey hotkey = { |
| 515 .keyval = keyval, |
| 516 .modifiers = modifiers & priv->mask, |
| 517 }; |
| 518 |
| 519 return (GQuark) GPOINTER_TO_UINT (g_tree_lookup (priv->hotkeys, &hotkey)); |
| 520 } |
OLD | NEW |