src/video/directfb/SDL_DirectFB_window.h
author Sam Lantinga <slouken@libsdl.org>
Sun, 02 Feb 2014 00:53:27 -0800
changeset 8149 681eb46b8ac4
parent 7678 286c42d7c5ed
child 9619 b94b6d0bff0f
permissions -rw-r--r--
Fixed bug 2374 - Update copyright for 2014...

Is it that time already??
slouken@2737
     1
/*
slouken@5535
     2
  Simple DirectMedia Layer
slouken@8149
     3
  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
slouken@2737
     4
slouken@5535
     5
  This software is provided 'as-is', without any express or implied
slouken@5535
     6
  warranty.  In no event will the authors be held liable for any damages
slouken@5535
     7
  arising from the use of this software.
slouken@2737
     8
slouken@5535
     9
  Permission is granted to anyone to use this software for any purpose,
slouken@5535
    10
  including commercial applications, and to alter it and redistribute it
slouken@5535
    11
  freely, subject to the following restrictions:
slouken@2737
    12
slouken@5535
    13
  1. The origin of this software must not be misrepresented; you must not
slouken@5535
    14
     claim that you wrote the original software. If you use this software
slouken@5535
    15
     in a product, an acknowledgment in the product documentation would be
slouken@5535
    16
     appreciated but is not required.
slouken@5535
    17
  2. Altered source versions must be plainly marked as such, and must not be
slouken@5535
    18
     misrepresented as being the original software.
slouken@5535
    19
  3. This notice may not be removed or altered from any source distribution.
slouken@2737
    20
*/
slouken@2737
    21
slouken@2737
    22
#ifndef _SDL_directfb_window_h
slouken@2737
    23
#define _SDL_directfb_window_h
slouken@2737
    24
slouken@5199
    25
#include "SDL_DirectFB_video.h"
couriersud@3023
    26
#include "SDL_DirectFB_WM.h"
couriersud@3023
    27
slouken@2737
    28
#define SDL_DFB_WINDOWDATA(win)  DFB_WindowData *windata = ((win) ? (DFB_WindowData *) ((win)->driverdata) : NULL)
slouken@2737
    29
slouken@2737
    30
typedef struct _DFB_WindowData DFB_WindowData;
slouken@2737
    31
struct _DFB_WindowData
slouken@2737
    32
{
slouken@7191
    33
    IDirectFBSurface        *window_surface;    /* window surface */
slouken@7191
    34
    IDirectFBSurface        *surface;           /* client drawing surface */
slouken@7191
    35
    IDirectFBWindow         *dfbwin;
slouken@7191
    36
    IDirectFBEventBuffer    *eventbuffer;
gabomdq@7678
    37
    /* SDL_Window                *sdlwin; */
slouken@7191
    38
    SDL_Window              *next;
slouken@7191
    39
    Uint8                   opacity;
slouken@7191
    40
    DFBRectangle            client;
slouken@7191
    41
    DFBDimension            size;
slouken@7191
    42
    DFBRectangle            restore;
slouken@5199
    43
couriersud@3023
    44
    /* WM extras */
slouken@7191
    45
    int                     is_managed;
slouken@7191
    46
    int                     wm_needs_redraw;
slouken@7191
    47
    IDirectFBSurface        *icon;
slouken@7191
    48
    IDirectFBFont           *font;
slouken@7191
    49
    DFB_Theme               theme;
slouken@5199
    50
slouken@5199
    51
    /* WM moving and sizing */
slouken@7191
    52
    int                     wm_grab;
slouken@7191
    53
    int                     wm_lastx;
slouken@7191
    54
    int                     wm_lasty;
slouken@2737
    55
};
slouken@2737
    56
slouken@2737
    57
extern int DirectFB_CreateWindow(_THIS, SDL_Window * window);
slouken@2737
    58
extern int DirectFB_CreateWindowFrom(_THIS, SDL_Window * window,
slouken@2737
    59
                                     const void *data);
slouken@2737
    60
extern void DirectFB_SetWindowTitle(_THIS, SDL_Window * window);
couriersud@3023
    61
extern void DirectFB_SetWindowIcon(_THIS, SDL_Window * window,
couriersud@3023
    62
                                   SDL_Surface * icon);
couriersud@3023
    63
slouken@2737
    64
extern void DirectFB_SetWindowPosition(_THIS, SDL_Window * window);
slouken@2737
    65
extern void DirectFB_SetWindowSize(_THIS, SDL_Window * window);
slouken@2737
    66
extern void DirectFB_ShowWindow(_THIS, SDL_Window * window);
slouken@2737
    67
extern void DirectFB_HideWindow(_THIS, SDL_Window * window);
slouken@2737
    68
extern void DirectFB_RaiseWindow(_THIS, SDL_Window * window);
slouken@2737
    69
extern void DirectFB_MaximizeWindow(_THIS, SDL_Window * window);
slouken@2737
    70
extern void DirectFB_MinimizeWindow(_THIS, SDL_Window * window);
slouken@2737
    71
extern void DirectFB_RestoreWindow(_THIS, SDL_Window * window);
slouken@6986
    72
extern void DirectFB_SetWindowGrab(_THIS, SDL_Window * window, SDL_bool grabbed);
slouken@2737
    73
extern void DirectFB_DestroyWindow(_THIS, SDL_Window * window);
slouken@2737
    74
extern SDL_bool DirectFB_GetWindowWMInfo(_THIS, SDL_Window * window,
slouken@2737
    75
                                         struct SDL_SysWMinfo *info);
slouken@2737
    76
slouken@5199
    77
extern void DirectFB_AdjustWindowSurface(SDL_Window * window);
couriersud@3023
    78
slouken@2737
    79
#endif /* _SDL_directfb_window_h */
slouken@2737
    80
slouken@2737
    81
/* vi: set ts=4 sw=4 expandtab: */