|
| 1 | +/* RetroArch - A frontend for libretro. |
| 2 | + * Copyright (C) 2018-2019 - Stuart Carnie |
| 3 | + * Copyright (C) 2011-2017 - Daniel De Matteis |
| 4 | + * |
| 5 | + * RetroArch is free software: you can redistribute it and/or modify it under the terms |
| 6 | + * of the GNU General Public License as published by the Free Software Found- |
| 7 | + * ation, either version 3 of the License, or (at your option) any later version. |
| 8 | + * |
| 9 | + * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; |
| 10 | + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR |
| 11 | + * PURPOSE. See the GNU General Public License for more details. |
| 12 | + * |
| 13 | + * You should have received a copy of the GNU General Public License along with RetroArch. |
| 14 | + * If not, see <http://www.gnu.org/licenses/>. |
| 15 | + */ |
| 16 | + |
| 17 | +/* MetalView is the MTKView subclass owned by the Metal driver |
| 18 | + * (gfx/drivers/metal.m). Its full @implementation lives there. |
| 19 | + * |
| 20 | + * This header exists because the @interface needs to be visible to: |
| 21 | + * - gfx/drivers/metal.m (the file that defines it) |
| 22 | + * - ui/drivers/ui_cocoa.m (instantiates it as the render view) |
| 23 | + * - ui/drivers/ui_cocoatouch.m (ditto, plus calls setDrawableSize:) |
| 24 | + * |
| 25 | + * On Apple platforms all three of those .m files end up in a single |
| 26 | + * translation unit via griffin/griffin_objc.m, so a sharable header |
| 27 | + * with include guards is the only way to declare MetalView once |
| 28 | + * without an Obj-C duplicate-class error. Keep this file minimal -- |
| 29 | + * the bulk of what used to live in gfx/common/metal_common.h is now |
| 30 | + * inlined into metal.m where it belongs. */ |
| 31 | + |
| 32 | +#ifndef METAL_VIEW_H__ |
| 33 | +#define METAL_VIEW_H__ |
| 34 | + |
| 35 | +#import <MetalKit/MetalKit.h> |
| 36 | + |
| 37 | +@interface MetalView : MTKView |
| 38 | +@end |
| 39 | + |
| 40 | +#endif |
0 commit comments