[vlc-devel] Re: creating a window positioning module

Sigmund Augdal sigmunau at stud.ntnu.no
Tue Mar 16 13:09:33 CET 2004


So you should try to set the x and y parameters of that call to the value
found by var_Get() after the var_Create() call

Sigmund

On Tue, Mar 16, 2004 at 02:02:47PM +0100, Hornsby Adrian wrote:
> 
> Okay, here is the function that define everything :
>       CreateWindow Function
> 
> ----------------------------------------------------------------------------
> ----
> 
> 
> The CreateWindow function creates an overlapped, pop-up, or child window. It
> specifies the window class, window title, window style, and (optionally) the
> initial position and size of the window. The function also specifies the
> window's parent or owner, if any, and the window's menu.
> 
> To use extended window styles in addition to the styles supported by
> CreateWindow, use the CreateWindowEx function.
> 
> 
> Syntax
> 
> HWND CreateWindow(          LPCTSTR lpClassName,
>     LPCTSTR lpWindowName,
>     DWORD dwStyle,
>     int x,
>     int y,
>     int nWidth,
>     int nHeight,
>     HWND hWndParent,
>     HMENU hMenu,
>     HINSTANCE hInstance,
>     LPVOID lpParam
> );Parameters
> 
>     lpClassName
>     [in] Pointer to a null-terminated string or a class atom created by a
> previous call to the RegisterClass or RegisterClassEx function. The atom
> must be in the low-order word of lpClassName; the high-order word must be
> zero. If lpClassName is a string, it specifies the window class name. The
> class name can be any name registered with RegisterClass or RegisterClassEx,
> provided that the module that registers the class is also the module that
> creates the window. The class name can also be any of the predefined system
> class names. For a list of system class names, see the Remarks section.
>     lpWindowName
>     [in] Pointer to a null-terminated string that specifies the window name.
> If the window style specifies a title bar, the window title pointed to by
> lpWindowName is displayed in the title bar. When using CreateWindow to
> create controls, such as buttons, check boxes, and static controls, use
> lpWindowName to specify the text of the control. When creating a static
> control with the SS_ICON style, use lpWindowName to specify the icon name or
> identifier. To specify an identifier, use the syntax "#num".
>     dwStyle
>     [in] Specifies the style of the window being created. This parameter can
> be a combination of window styles, plus the control styles indicated in the
> Remarks section.
>     x
>     [in] Specifies the initial horizontal position of the window. For an
> overlapped or pop-up window, the x parameter is the initial x-coordinate of
> the window's upper-left corner, in screen coordinates. For a child window, x
> is the x-coordinate of the upper-left corner of the window relative to the
> upper-left corner of the parent window's client area. If this parameter is
> set to CW_USEDEFAULT, the system selects the default position for the
> window's upper-left corner and ignores the y parameter. CW_USEDEFAULT is
> valid only for overlapped windows; if it is specified for a pop-up or child
> window, the x and y parameters are set to zero.
>     y
>     [in] Specifies the initial vertical position of the window. For an
> overlapped or pop-up window, the y parameter is the initial y-coordinate of
> the window's upper-left corner, in screen coordinates. For a child window, y
> is the initial y-coordinate of the upper-left corner of the child window
> relative to the upper-left corner of the parent window's client area. For a
> list box, y is the initial y-coordinate of the upper-left corner of the list
> box's client area relative to the upper-left corner of the parent window's
> client area. If an overlapped window is created with the WS_VISIBLE style
> bit set and the x parameter is set to CW_USEDEFAULT, the system ignores the
> y parameter.
>     nWidth
>     [in] Specifies the width, in device units, of the window. For overlapped
> windows, nWidth is either the window's width, in screen coordinates, or
> CW_USEDEFAULT. If nWidth is CW_USEDEFAULT, the system selects a default
> width and height for the window; the default width extends from the initial
> x-coordinate to the right edge of the screen, and the default height extends
> from the initial y-coordinate to the top of the icon area. CW_USEDEFAULT is
> valid only for overlapped windows; if CW_USEDEFAULT is specified for a
> pop-up or child window, nWidth and nHeight are set to zero.
>     nHeight
>     [in] Specifies the height, in device units, of the window. For
> overlapped windows, nHeight is the window's height, in screen coordinates.
> If nWidth is set to CW_USEDEFAULT, the system ignores nHeight.
>     hWndParent
>     [in] Handle to the parent or owner window of the window being created.
> To create a child window or an owned window, supply a valid window handle.
> This parameter is optional for pop-up windows.
>     Windows 2000/XP: To create a message-only window, supply HWND_MESSAGE or
> a handle to an existing message-only window.
> 
>     hMenu
>     [in] Handle to a menu, or specifies a child-window identifier depending
> on the window style. For an overlapped or pop-up window, hMenu identifies
> the menu to be used with the window; it can be NULL if the class menu is to
> be used. For a child window, hMenu specifies the child-window identifier, an
> integer value used by a dialog box control to notify its parent about
> events. The application determines the child-window identifier; it must be
> unique for all child windows with the same parent window.
>     hInstance
>     [in] Windows 95/98/Me: Handle to the instance of the module to be
> associated with the window.
>     Windows NT/2000/XP: This value is ignored.
> 
>     lpParam
>     [in] Pointer to a value to be passed to the window through the
> CREATESTRUCT structure passed in the lpParam parameter the WM_CREATE
> message. If an application calls CreateWindow to create a multiple-document
> interface (MDI) client window, lpParam must point to a CLIENTCREATESTRUCT
> structure.
> 
> 
> > This is what you need to figure out. If that part was allready done, then
> > you wouldn't be doing what you do. I think a good thing is to try to
> locate
> > the directx call that creates the video window in the directx module, and
> > try to figure out if it has some parameters that can be set to position
> it.
> >
> > Sigmund
> >
> > On Tue, Mar 16, 2004 at 01:39:44PM +0100, Hornsby Adrian wrote:
> > > Okay, i'm trying to make positionning for windows at the moment.
> > > How can I use this positionning value as the
> > > position when creating the video window. ?
> > >
> > >
> > >
> > > Subject: Re: creating a window positioning module
> > >
> > >
> > > > Vlc creates the video output window in each of the video output
> modules.
> > > On
> > > > windows the primary modules is the directx one, on linux it is the
> xvideo
> > > one.
> > > > directx is in modules/video_output/directx/*
> > > > xvideo is in modules/video_output/x11/*
> > > > other vout modules are also available in modules/video_output/*.
> > > > On macos x the vout is in modules/gui/macosx for some strange reasone.
> > > >
> > > > I think the video windows in general are created in the Open()
> function of
> > > > the module.
> > > >
> > > > Sigmund
> > > >
> > > >
> > > > On Tue, Mar 16, 2004 at 01:22:39PM +0100, Hornsby Adrian wrote:
> > > > > >> where does vlc create a new video window ? Is it in the
> > > video_output.c in
> > > > > the function vout_Create ??
> > > > > how can I use the positionning value there ??
> > > > >
> > > > > Sent: Tuesday, March 16, 2004 10:45 AM
> > > > > Subject: Re: creating a window positioning module
> > > > >
> > > > >
> > > > > >
> > > > > > Okay,
> > > > > >
> > > > > > I've been starting to modify the code in order to create a window
> > > > > > positioning function.  I read the note you gave to the guy who
> tried.
> > > > > >
> > > > > > 1: create two config options "video-x" and "video-y" by
> add_integer at
> > > the
> > > > > > right place in src/libvlc.h
> > > > > >
> > > > > > >>>> I added those variables in :
> > > > > > /*video option*/
> > > > > > add_integer ("video_x", 0, NULL, VIDEO_X_TEXT, VIDEO_X_LONGTEXT,
> > > > > VLC_TRUE);
> > > > > > add_integer ("video_y", 0, NULL, VIDEO_Y_TEXT, VIDEO_Y_LONGTEXT,
> > > > > VLC_TRUE);
> > > > > >
> > > > > > 2: modify the vout you will use to read the value of "video-x" and
> > > > > "video-y"
> > > > > > using var_Create( p_vout, "video-x",
> > > VLC_VAR_INTEGER|VLC_VAR_DOINHERIT );
> > > > > > followed by var_Get( p_vout, "video-x", &val );
> > > > > >
> > > > > > >>> i also added  var_Create( p_vout, "video-x",
> > > > > > VLC_VAR_INTEGER|VLC_VAR_DOINHERIT );
> > > > > > but where should I add the var_Get( p_vout, "video-x", &val );
> > > > > >
> > > > > > And use this value as the
> > > > > > position when creating the video window.
> > > > > >
> > > > > > >>> How ? where ?
> > > > > >
> > > > > >
> > > > > >
> > > > > > Subject: Re: creating a window positioning module
> > > > > >
> > > > > >
> > > > > > > Talke a look a this thread:
> > > > > > > http://www.via.ecp.fr/via/ml/vlc-devel/200403/msg00013.html
> > > > > > >
> > > > > > > haven't heard from that guy since then, so it could be he gave
> up.
> > > > > > >
> > > > > > > Sigmund
> > > > > > >
> > > > > > >
> > > > > > > On Tue, Mar 09, 2004 at 02:44:40PM +0100, Hornsby Adrian wrote:
> > > > > > > > hi,
> > > > > > > > I would like to modify or create a window positioning module
> as I
> > > > > would
> > > > > > need to be able to set up the position of the VLC player trough
> > > command
> > > > > > line. Can anybody tell me if somebody is already working on it or
> if
> > > not,
> > > > > we
> > > > > > should I start ?
> > > > > > > >
> > > > > > > > adrian
> > > > > > > >
> > > > > > > > ************************************************************
> > > > > > > > HORNSBY Adrian
> > > > > > > > Technical University of Tampere
> > > > > > > > Department of Signal Processing
> > > > > > > > B.P -  F 314
> > > > > > > > Tampere
> > > > > > > > FINLAND
> > > > > > > >
> > > > > > > > #Tel :+358 (0)456376712
> > > > > > > > ************************************************************
> > > > > > >
> > > > > > > -- 
> > > > > > > This is the vlc-devel mailing-list, see
> http://www.videolan.org/vlc/
> > > > > > > To unsubscribe, please read
> > > http://developers.videolan.org/lists.html
> > > > > > > If you are in trouble, please contact <postmaster at videolan.org>
> > > > > >
> > > > > > -- 
> > > > > > This is the vlc-devel mailing-list, see
> http://www.videolan.org/vlc/
> > > > > > To unsubscribe, please read
> http://developers.videolan.org/lists.html
> > > > > > If you are in trouble, please contact <postmaster at videolan.org>
> > > > >
> > > > > -- 
> > > > > This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
> > > > > To unsubscribe, please read
> http://developers.videolan.org/lists.html
> > > > > If you are in trouble, please contact <postmaster at videolan.org>
> > > >
> > > > -- 
> > > > This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
> > > > To unsubscribe, please read http://developers.videolan.org/lists.html
> > > > If you are in trouble, please contact <postmaster at videolan.org>
> > >
> > > -- 
> > > This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
> > > To unsubscribe, please read http://developers.videolan.org/lists.html
> > > If you are in trouble, please contact <postmaster at videolan.org>
> >
> > -- 
> > This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
> > To unsubscribe, please read http://developers.videolan.org/lists.html
> > If you are in trouble, please contact <postmaster at videolan.org>
> 
> -- 
> This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
> To unsubscribe, please read http://developers.videolan.org/lists.html
> If you are in trouble, please contact <postmaster at videolan.org>

-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html
If you are in trouble, please contact <postmaster at videolan.org>



More information about the vlc-devel mailing list