Changeset e557d8c0d9fdc3ceb2992a84cd0e875c4ba388e3

Show
Ignore:
Timestamp:
05/08/07 20:20:28 (1 year ago)
Author:
Antoine Cellerier <dionoea@videolan.org>
git-committer:
Antoine Cellerier <dionoea@videolan.org> 1178648428 +0000
git-parent:

[6d032d9e5b01c12d4edc5e2e241e17117973f7c3]

git-author:
Antoine Cellerier <dionoea@videolan.org> 1178648428 +0000
Message:

Add a hotkey to toggle wallpaper mode. Currently only works for directx of course :)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • include/vlc_keys.h

    rfc4af29 re557d8c  
    308308#define ACTIONID_RANDOM                81 
    309309#define ACTIONID_LOOP                  82 
     310#define ACTIONID_WALLPAPER             83 
  • modules/control/hotkeys.c

    r6d032d9 re557d8c  
    299299            } 
    300300        } 
     301        else if( i_action == ACTIONID_WALLPAPER ) 
     302        { 
     303            if( p_vout ) 
     304            { 
     305                var_Get( p_vout, "directx-wallpaper", &val ); 
     306                val.b_bool = !val.b_bool; 
     307                var_Set( p_vout, "directx-wallpaper", val ); 
     308            } 
     309            else 
     310            { 
     311                var_Get( p_playlist, "directx-wallpaper", &val ); 
     312                val.b_bool = !val.b_bool; 
     313                var_Set( p_playlist, "directx-wallpaper", val ); 
     314            } 
     315        } 
    301316        else if( i_action == ACTIONID_LOOP ) 
    302317        { 
  • src/libvlc-module.c

    r263c385 re557d8c  
    12091209#define UNCROP_RIGHT_KEY_LONGTEXT N_("Uncrop one pixel from the right of the video") 
    12101210 
     1211#define WALLPAPER_KEY_TEXT N_("Toggle wallpaper mode in video output") 
     1212#define WALLPAPER_KEY_LONGTEXT N_( \ 
     1213    "Toggle wallpaper mode in video output. Only works with the directx " \ 
     1214    "video output for the time being." ) 
    12111215 
    12121216const char vlc_usage[] = N_( 
     
    18861890#   define KEY_RECORD             KEY_MODIFIER_COMMAND|KEY_MODIFIER_SHIFT|'r' 
    18871891#   define KEY_DUMP               KEY_MODIFIER_COMMAND|KEY_MODIFIER_SHIFT|'d' 
     1892#   define KEY_WALLPAPER          KEY_MODIFIER_COMMAND|'w' 
    18881893 
    18891894#else 
     
    19711976#   define KEY_RECORD             KEY_MODIFIER_CTRL|'r' 
    19721977#   define KEY_DUMP               KEY_MODIFIER_CTRL|KEY_MODIFIER_SHIFT|'d' 
     1978#   define KEY_WALLPAPER          'w' 
    19731979#endif 
    19741980 
     
    20742080    add_key( "key-unzoom", KEY_UNZOOM, NULL, 
    20752081             UNZOOM_KEY_TEXT, UNZOOM_KEY_LONGTEXT, VLC_TRUE ); 
     2082    add_key( "key-wallpaper", KEY_WALLPAPER, NULL, WALLPAPER_KEY_TEXT, 
     2083             WALLPAPER_KEY_LONGTEXT, VLC_FALSE ); 
    20762084 
    20772085    add_key( "key-crop-top", KEY_CROP_TOP, NULL, 
     
    23402348    { "key-random", ACTIONID_RANDOM, 0, 0, 0, 0 }, 
    23412349    { "key-loop", ACTIONID_LOOP, 0, 0, 0, 0 }, 
     2350    { "key-wallpaper", ACTIONID_WALLPAPER, 0, 0, 0, 0 }, 
    23422351    { NULL, 0, 0, 0, 0, 0 } 
    23432352};