]> git.sesse.net Git - vlc/blob - modules/gui/skins/os_api.h
modules/gui/wxwindows/iteminfo.cpp:
[vlc] / modules / gui / skins / os_api.h
1 /*****************************************************************************
2  * os_api.h: Wrapper for some os-specific functions
3  *****************************************************************************
4  * Copyright (C) 2003 VideoLAN
5  * $Id: os_api.h,v 1.3 2003/04/21 21:51:16 asmax Exp $
6  *
7  * Authors: Olivier Teulière <ipkiss@via.ecp.fr>
8  *          Emmanuel Puig    <karibu@via.ecp.fr>
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111,
23  * USA.
24  *****************************************************************************/
25
26
27 #ifndef VLC_SKIN_API
28 #define VLC_SKIN_API
29
30 #if defined( WIN32 )
31     #define DIRECTORY_SEPARATOR '\\'
32 #else
33     #define DIRECTORY_SEPARATOR '/'
34 #endif
35
36
37 //--- GENERAL ---------------------------------------------------------------
38 #include <string>
39 using namespace std;
40
41 //---------------------------------------------------------------------------
42 class SkinWindow;
43
44 //---------------------------------------------------------------------------
45 // Event API
46 //---------------------------------------------------------------------------
47 // This functions send a message to the interface message stack
48 // First argument is the destination window (NULL is broadcasting)
49 // Second argument is the name of the message (see event.h)
50 // Other parameters are the arguments of message
51 // Send message is supposed to treat the message directly and should not be
52 // used if possible
53 void OSAPI_SendMessage( SkinWindow *win, unsigned int message, unsigned int param1,
54                         long param2 );
55 void OSAPI_PostMessage( SkinWindow *win, unsigned int message, unsigned int param1,
56                         long param2 );
57
58 //---------------------------------------------------------------------------
59 // Graphic API
60 //---------------------------------------------------------------------------
61 // This function get a color and return the correspounding color regarding
62 // color resolution. If it is black, it should return the nearest non black
63 // color
64 int  OSAPI_GetNonTransparentColor( int c );
65
66 // This function get the size in pixel of the screen
67 void OSAPI_GetScreenSize( int &w, int &h );
68
69 //---------------------------------------------------------------------------
70 // General
71 //---------------------------------------------------------------------------
72 // This function get the position in pixel of the mouse cursor position
73 void OSAPI_GetMousePos( int &x, int &y );
74
75 // This function returns the Title of the specified window
76 string OSAPI_GetWindowTitle( SkinWindow *win );
77
78 // This functions removes a directory and all its contents
79 bool OSAPI_RmDir( string Path );
80
81 // This function returns a time in millisecond whose reference should be fixed
82 int  OSAPI_GetTime();
83
84 //---------------------------------------------------------------------------
85
86 #endif