/*****************************************************************************
* preferences.cpp : WinCE gui plugin for VLC
*****************************************************************************
- * Copyright (C) 2000-2004 VideoLAN (Centrale Réseaux) and its contributors
+ * Copyright (C) 2000-2004 the VideoLAN team
* $Id$
*
* Authors: Marodon Cedric <cedric_marodon@yahoo.fr>
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
-#include <stdlib.h> /* malloc(), free() */
-#include <string.h> /* strerror() */
-#include <stdio.h>
#include <vlc/vlc.h>
-#include <vlc/intf.h>
+#include <vlc_interface.h>
#include "wince.h"
/*void CleanChanges();*/
void OnSelectTreeItem( LPNM_TREEVIEW pnmtv, HWND parent, HINSTANCE hInst );
-
+
ConfigTreeData *FindModuleConfig( ConfigTreeData *config_data );
HWND hwndTV;
/***********************************************************************
-FUNCTION:
+FUNCTION:
WndProc
-PURPOSE:
+PURPOSE:
Processes messages sent to the main window.
***********************************************************************/
// Get the client area rect to put the panels in
GetClientRect(hwnd, &rcClient);
- /* Create the buttons */
+ /* Create the buttons */
advanced_checkbox =
CreateWindow( _T("BUTTON"), _T("Advanced options"),
WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX,
TVITEM tvi = {0};
tvi.mask = TVIF_PARAM;
tvi.hItem = TreeView_GetSelection( prefs_tree->hwndTV );
- if( !tvi.hItem ) break;
+ if( !tvi.hItem ) break;
if( !TreeView_GetItem( prefs_tree->hwndTV, &tvi ) ) break;
ConfigTreeData *config_data =
prefs_tree->FindModuleConfig( (ConfigTreeData *)tvi.lParam );
- if( config_data && hwnd == config_data->panel->config_window )
+ if( config_data && hwnd == config_data->panel->config_window )
{
int dy;
RECT rc;
GetWindowRect( hwnd, &rc);
int newvalue = config_data->panel->oldvalue;
- switch ( GET_WM_VSCROLL_CODE(wp,lp) )
+ switch ( GET_WM_VSCROLL_CODE(wp,lp) )
{
case SB_BOTTOM : newvalue = 0; break;
case SB_TOP : newvalue = config_data->panel->maxvalue; break;
case SB_LINEDOWN : newvalue += 10; break;
- case SB_PAGEDOWN : newvalue += rc.bottom - rc.top - 25; break; // faux ! une page c'est la longueur réelle de notebook
+ case SB_PAGEDOWN : newvalue += rc.bottom - rc.top - 25; break; // wrong! one page is notebook actual length
case SB_LINEUP : newvalue -= 10; break;
case SB_PAGEUP : newvalue -= rc.bottom - rc.top - 25; break;
case SB_THUMBPOSITION:
ScrollWindowEx( hwnd, 0, dy, NULL, NULL, NULL, NULL, SW_SCROLLCHILDREN );
UpdateWindow ( hwnd);
- config_data->panel->oldvalue = newvalue;
+ config_data->panel->oldvalue = newvalue;
}
break;
}
INITCOMMONCONTROLSEX iccex;
RECT rcClient;
- TVITEM tvi = {0};
- TVINSERTSTRUCT tvins = {0};
+ TVITEM tvi = {0};
+ TVINSERTSTRUCT tvins = {0};
HTREEITEM hPrev;
size_t i_capability_count = 0;
config_data->i_object_id = p_module->i_object_id;
/* Add the category to the tree */
- // Set the text of the item.
- tvi.pszText = _FROMMB(p_item->psz_text);
+ // Set the text of the item.
+ tvi.pszText = _FROMMB(p_item->psz_text);
tvi.cchTextMax = _tcslen(tvi.pszText);
tvi.lParam = (long)config_data;
tvins.item = tvi;
- tvins.hInsertAfter = hPrev;
+ tvins.hInsertAfter = hPrev;
tvins.hParent = general_item; //level 3
-
- // Add the item to the tree-view control.
+
+ // Add the item to the tree-view control.
hPrev = (HTREEITEM)TreeView_InsertItem( hwndTV, &tvins );
break;
TreeView_SortChildren( hwndTV, general_item, 0 );
}
-
+
/*
* Build a tree of all the plugins
*/
tvi.cchTextMax = _tcslen(tvi.pszText);
tvi.lParam = (long)config_data;
tvins.item = tvi;
- tvins.hInsertAfter = plugins_item;
+ tvins.hInsertAfter = plugins_item;
tvins.hParent = plugins_item;// level 3
- // Add the item to the tree-view control.
+ // Add the item to the tree-view control.
capability_item = (HTREEITEM) TreeView_InsertItem( hwndTV, &tvins);
i_capability_count++;
tvi.cchTextMax = _tcslen(tvi.pszText);
tvi.lParam = (long)config_data;
tvins.item = tvi;
- tvins.hInsertAfter = capability_item;
+ tvins.hInsertAfter = capability_item;
tvins.hParent = capability_item;// level 4
- // Add the item to the tree-view control.
+ // Add the item to the tree-view control.
TreeView_InsertItem( hwndTV, &tvins );
}
{
HTREEITEM item2 = TreeView_GetChild( hwndTV, item );
while( item2 != 0 )
- {
+ {
TVITEM tvi = {0};
tvi.mask = TVIF_PARAM;
tvi.hItem = item2;
{
HTREEITEM item2 = TreeView_GetChild( hwndTV, item );
while( item2 != 0 )
- {
+ {
TVITEM tvi = {0};
tvi.mask = TVIF_PARAM;
tvi.hItem = item2;
config_array.push_back( control );
}
while( p_item->i_type != CONFIG_HINT_END && p_item++ );
-
+
GetWindowRect( config_window, &rc);
maxvalue = y_pos - (rc.bottom - rc.top) + 5;
oldvalue = 0;
case CONFIG_ITEM_KEY:
/* So you don't need to restart to have the changes take effect */
val.i_int = control->GetIntValue();
- var_Set( p_intf->p_vlc, control->GetName(), val );
+ var_Set( p_intf->p_libvlc, control->GetName(), val );
case CONFIG_ITEM_INTEGER:
case CONFIG_ITEM_BOOL:
config_PutInt( p_intf, control->GetName(),