| 1 | /* |
| 2 | * Copyright (c) 2012 Jérôme Guelfucci <[email protected]> |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or modify |
| 5 | * it under the terms of the GNU General Public License as published by |
| 6 | * the Free Software Foundation; either version 2 of the License, or (at |
| 7 | * your option) any later version. |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, but |
| 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 12 | * General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU General Public License |
| 15 | * along with this program; if not, write to the Free Software |
| 16 | * Foundation, Inc., Inc., 51 Franklin Street, Fifth Floor, Boston, |
| 17 | * MA 02110-1301, USA. |
| 18 | */ |
| 19 | |
| 20 | #ifdef HAVE_CONFIG_Hcxx . . $ `<built-in>:411:9`! |
| 21 | #include "config.h"cxx . . $ `<file>/config.h`/ |
| 22 | #endif |
| 23 | |
| 24 | #include <libxfce4util/libxfce4util.h> |
| 25 | |
| 26 | #include "xfce-shortcuts-xfwm4.h"cxx . . $ `<file>/libxfce4kbd-private/xfce-shortcuts-xfwm4.h`/ |
| 27 | |
| 28 | typedef struct _ShortcutTemplatecxx . . $ _ShortcutTemplate# ShortcutTemplatecxx . . $ ShortcutTemplate#; |
| 29 | |
| 30 | struct _ShortcutTemplatecxx . . $ _ShortcutTemplate# |
| 31 | { |
| 32 | const gcharcxx . . $ gchar# *namecxx . . $ _ShortcutTemplate#name.; |
| 33 | const gcharcxx . . $ gchar# *featurecxx . . $ _ShortcutTemplate#feature.; |
| 34 | }; |
| 35 | |
| 36 | const ShortcutTemplatecxx . . $ ShortcutTemplate# xfwm4_shortcut_valuescxx . . $ xfwm4_shortcut_values.[] = { |
| 37 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Window operations menu"), "popup_menu_key" }, |
| 38 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Up"), "up_key" }, |
| 39 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Down"), "down_key" }, |
| 40 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Left"), "left_key" }, |
| 41 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Right"), "right_key" }, |
| 42 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Cancel"), "cancel_key" }, |
| 43 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Cycle windows"), "cycle_windows_key" }, |
| 44 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Cycle windows (Reverse)"), "cycle_reverse_windows_key" }, |
| 45 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Switch window for same application"), "switch_window_key" }, |
| 46 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Switch application"), "switch_application_key" }, |
| 47 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Close window"), "close_window_key" }, |
| 48 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Maximize window horizontally"), "maximize_horiz_key" }, |
| 49 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Maximize window vertically"), "maximize_vert_key" }, |
| 50 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Maximize window"), "maximize_window_key" }, |
| 51 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Hide window"), "hide_window_key" }, |
| 52 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Move window"), "move_window_key" }, |
| 53 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Resize window"), "resize_window_key" }, |
| 54 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Shade window"), "shade_window_key" }, |
| 55 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Stick window"), "stick_window_key" }, |
| 56 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Raise window"), "raise_window_key" }, |
| 57 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Lower window"), "lower_window_key" }, |
| 58 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Raise or lower window"), "raiselower_window_key" }, |
| 59 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Fill window"), "fill_window_key" }, |
| 60 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Fill window horizontally"), "fill_horiz_key" }, |
| 61 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Fill window vertically"), "fill_vert_key" }, |
| 62 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Toggle above"), "above_key" }, |
| 63 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Toggle fullscreen"), "fullscreen_key" }, |
| 64 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Move window to lower monitor"), "move_window_to_monitor_down_key" }, |
| 65 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Move window to left monitor"), "move_window_to_monitor_left_key" }, |
| 66 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Move window to right monitor"), "move_window_to_monitor_right_key" }, |
| 67 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Move window to upper monitor"), "move_window_to_monitor_up_key" }, |
| 68 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Move window to upper workspace"), "move_window_up_workspace_key" }, |
| 69 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Move window to bottom workspace"), "move_window_down_workspace_key" }, |
| 70 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Move window to left workspace"), "move_window_left_workspace_key" }, |
| 71 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Move window to right workspace"), "move_window_right_workspace_key" }, |
| 72 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Move window to previous workspace"), "move_window_prev_workspace_key" }, |
| 73 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Move window to next workspace"), "move_window_next_workspace_key" }, |
| 74 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Move window to workspace 1"), "move_window_workspace_1_key" }, |
| 75 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Move window to workspace 2"), "move_window_workspace_2_key" }, |
| 76 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Move window to workspace 3"), "move_window_workspace_3_key" }, |
| 77 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Move window to workspace 4"), "move_window_workspace_4_key" }, |
| 78 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Move window to workspace 5"), "move_window_workspace_5_key" }, |
| 79 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Move window to workspace 6"), "move_window_workspace_6_key" }, |
| 80 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Move window to workspace 7"), "move_window_workspace_7_key" }, |
| 81 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Move window to workspace 8"), "move_window_workspace_8_key" }, |
| 82 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Move window to workspace 9"), "move_window_workspace_9_key" }, |
| 83 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Move window to workspace 10"), "move_window_workspace_10_key" }, |
| 84 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Move window to workspace 11"), "move_window_workspace_11_key" }, |
| 85 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Move window to workspace 12"), "move_window_workspace_12_key" }, |
| 86 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Tile window to the top"), "tile_up_key" }, |
| 87 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Tile window to the bottom"), "tile_down_key" }, |
| 88 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Tile window to the left"), "tile_left_key" }, |
| 89 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Tile window to the right"), "tile_right_key" }, |
| 90 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Tile window to the top-left"), "tile_up_left_key" }, |
| 91 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Tile window to the top-right"), "tile_up_right_key" }, |
| 92 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Tile window to the bottom-left"), "tile_down_left_key" }, |
| 93 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Tile window to the bottom-right"), "tile_down_right_key" }, |
| 94 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Show desktop"), "show_desktop_key" }, |
| 95 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Upper workspace"), "up_workspace_key" }, |
| 96 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Bottom workspace"), "down_workspace_key" }, |
| 97 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Left workspace"), "left_workspace_key" }, |
| 98 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Right workspace"), "right_workspace_key" }, |
| 99 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Previous workspace"), "prev_workspace_key" }, |
| 100 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Next workspace"), "next_workspace_key" }, |
| 101 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Workspace 1"), "workspace_1_key" }, |
| 102 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Workspace 2"), "workspace_2_key" }, |
| 103 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Workspace 3"), "workspace_3_key" }, |
| 104 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Workspace 4"), "workspace_4_key" }, |
| 105 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Workspace 5"), "workspace_5_key" }, |
| 106 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Workspace 6"), "workspace_6_key" }, |
| 107 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Workspace 7"), "workspace_7_key" }, |
| 108 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Workspace 8"), "workspace_8_key" }, |
| 109 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Workspace 9"), "workspace_9_key" }, |
| 110 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Workspace 10"), "workspace_10_key" }, |
| 111 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Workspace 11"), "workspace_11_key" }, |
| 112 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Workspace 12"), "workspace_12_key" }, |
| 113 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Add workspace"), "add_workspace_key" }, |
| 114 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Add adjacent workspace"), "add_adjacent_workspace_key" }, |
| 115 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Delete last workspace"), "del_workspace_key" }, |
| 116 | { N_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:34:9`! ("Delete active workspace"), "del_active_workspace_key" }, |
| 117 | { NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! } |
| 118 | }; |
| 119 | |
| 120 | |
| 121 | |
| 122 | const gcharcxx . . $ gchar# * |
| 123 | xfce_shortcuts_xfwm4_get_feature_namecxx . . $ xfce_shortcuts_xfwm4_get_feature_name(fb58d2e09a2a1ce6). (const gcharcxx . . $ gchar# *feature) |
| 124 | { |
| 125 | guintcxx . . $ guint# i; |
| 126 | |
| 127 | /* Make sure to use the translations from libxfce4ui */ |
| 128 | bindtextdomaincxx . . $ bindtextdomain(a713fe7b9a57cf96). (GETTEXT_PACKAGEcxx . . $ `config.h:27:9`!, PACKAGE_LOCALE_DIRcxx . . $ `<built-in>:414:9`!); |
| 129 | #ifdef HAVE_BIND_TEXTDOMAIN_CODESETcxx . . $ `config.h:39:9`! |
| 130 | bind_textdomain_codesetcxx . . $ bind_textdomain_codeset(a713fe7b9a57cf96). (GETTEXT_PACKAGEcxx . . $ `config.h:27:9`!, "UTF-8"); |
| 131 | #endif |
| 132 | |
| 133 | /* We need to get the human readable string of the action name */ |
| 134 | for (i = 0; xfwm4_shortcut_valuescxx . . $ xfwm4_shortcut_values.[i].namecxx . . $ _ShortcutTemplate#name. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; ++i) |
| 135 | { |
| 136 | if (G_UNLIKELYcxx . . $ `<external>/12741050725406041920/gmacros.h:1285:9`! (g_str_equalcxx . . $ `<external>/7714589265505779806/ghash.h:175:9`! (xfwm4_shortcut_values[i].feature, feature))) |
| 137 | { |
| 138 | return _cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:32:10`!(xfwm4_shortcut_values[i].name); |
| 139 | } |
| 140 | } |
| 141 | |
| 142 | /* Not a valid feature */ |
| 143 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 144 | } |
| 145 | |
| 146 | GListcxx . . $ GList# * |
| 147 | xfce_shortcuts_xfwm4_get_feature_listcxx . . $ xfce_shortcuts_xfwm4_get_feature_list(56e46de9ce394279). (void) |
| 148 | { |
| 149 | GListcxx . . $ GList# *list; |
| 150 | guintcxx . . $ guint# i; |
| 151 | |
| 152 | list = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 153 | |
| 154 | for (i = 0; xfwm4_shortcut_valuescxx . . $ xfwm4_shortcut_values.[i].namecxx . . $ _ShortcutTemplate#name. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; ++i) |
| 155 | list = g_list_prependcxx . . $ g_list_prepend(35007086a6b2ba1c). (list, (gpointercxx . . $ gpointer#) xfwm4_shortcut_valuescxx . . $ xfwm4_shortcut_values.[i].featurecxx . . $ _ShortcutTemplate#feature.); |
| 156 | |
| 157 | return g_list_reversecxx . . $ g_list_reverse(e31b64636014b719). (list); |
| 158 | } |