Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(232)

Side by Side Diff: src/ibushotkey.c

Issue 1702015: Support engine specific hotkey. (Closed) Base URL: ssh://git@chromiumos-git/ibus.git
Patch Set: Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/ibushotkey.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « src/ibushotkey.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698