/[pcsx2_0.9.7]/trunk/common/include/Pcsx2Api.h
ViewVC logotype

Contents of /trunk/common/include/Pcsx2Api.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 62 - (show annotations) (download)
Tue Sep 7 11:08:22 2010 UTC (9 years, 11 months ago) by william
File MIME type: text/plain
File size: 2757 byte(s)
Auto Commited Import of: pcsx2-0.9.7-r3738-debug in ./trunk
1 /* PCSX2 - PS2 Emulator for PCs
2 * Copyright (C) 2002-2010 PCSX2 Dev Team
3 *
4 * PCSX2 is free software: you can redistribute it and/or modify it under the terms
5 * of the GNU Lesser General Public License as published by the Free Software Found-
6 * ation, either version 3 of the License, or (at your option) any later version.
7 *
8 * PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
9 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
10 * PURPOSE. See the GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License along with PCSX2.
13 * If not, see <http://www.gnu.org/licenses/>.
14 */
15
16
17 #ifndef __PCSX2API_H__
18 #define __PCSX2API_H__
19
20 // Note; this header is experimental, and will be a shifting target. Only use this if you are willing to repeatedly fix breakage.
21
22 /*
23 * Based on PS2E Definitions by
24 linuzappz@hotmail.com,
25 * shadowpcsx2@yahoo.gr,
26 * and florinsasu@hotmail.com
27 */
28
29 #include "Pcsx2Types.h"
30 #include "Pcsx2Defs.h"
31
32 // Indicate to use the new versions.
33 #define NEW_PLUGIN_APIS
34
35 #ifdef _MSC_VER
36 #define EXPORT_C(type) extern "C" __declspec(dllexport) type CALLBACK
37 #else
38 #define EXPORT_C(type) extern "C" __attribute__((externally_visible,visibility("default"))) type
39 #endif
40
41 EXPORT_C(u32) PS2EgetLibType(void);
42 EXPORT_C(u32) PS2EgetLibVersion2(u32 type);
43 EXPORT_C(char*) PS2EgetLibName(void);
44
45 // Extended functions.
46
47 // allows the plugin to see the whole configuration when started up.
48 // Intended for them to get the ini and plugin paths, but could allow for other things as well.
49 EXPORT_C_(void) PS2EpassConfig(PcsxConfig Config);
50
51 // Alternately, this function serves the same purpose, but would work for emulators outside
52 // of pcsx2.
53 EXPORT_C_(void) PS2EpassIniPath(const char *path);
54
55 // PS2EgetLibType returns (may be OR'd)
56 enum {
57 PS2E_LT_GS = 0x01,
58 PS2E_LT_PAD = 0x02, // -=[ OBSOLETE ]=-
59 PS2E_LT_SPU2 = 0x04,
60 PS2E_LT_CDVD = 0x08,
61 PS2E_LT_DEV9 = 0x10,
62 PS2E_LT_USB = 0x20,
63 PS2E_LT_FW = 0x40,
64 PS2E_LT_SIO = 0x80
65 } PluginLibType;
66
67 // PS2EgetLibVersion2 (high 16 bits)
68 enum {
69 PS2E_GS_VERSION = 0x0006,
70 PS2E_PAD_VERSION = 0x0002, // -=[ OBSOLETE ]=-
71 PS2E_SPU2_VERSION = 0x0005,
72 PS2E_CDVD_VERSION = 0x0005,
73 PS2E_DEV9_VERSION = 0x0003,
74 PS2E_USB_VERSION = 0x0003,
75 PS2E_FW_VERSION = 0x0002,
76 PS2E_SIO_VERSION = 0x0001
77 } PluginLibVersion;
78
79 // freeze modes:
80 enum {
81 FREEZE_LOAD = 0,
82 FREEZE_SAVE = 1,
83 FREEZE_SIZE = 2
84 } FreezeModes;
85
86 typedef struct _GSdriverInfo {
87 char name[8];
88 void *common;
89 } GSdriverInfo;
90
91 #ifdef _MSC_VER
92 typedef struct _winInfo { // unsupported values must be set to zero
93 HWND hWnd;
94 HMENU hMenu;
95 HWND hStatusWnd;
96 } winInfo;
97 #endif
98
99 #endif // __PCSX2API_H__

  ViewVC Help
Powered by ViewVC 1.1.22