File: myx_gc.h

package info (click to toggle)
mysql-gui-tools 5.0r14%2BopenSUSE-2.1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 116,956 kB
  • ctags: 48,715
  • sloc: sql: 341,918; pascal: 276,698; ansic: 91,020; cpp: 90,451; objc: 33,236; sh: 29,481; yacc: 10,756; xml: 10,589; java: 10,079; php: 2,806; python: 2,092; makefile: 1,783; perl: 4
file content (105 lines) | stat: -rw-r--r-- 3,075 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
/* Copyright (C) 2004 MySQL AB

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */

/**
 * @file myx_gc.h 
 * @brief Base configuration header. Here most of the platform specific switches are kept.
 */

#ifndef __GC_H__
#define __GC_H__

#if defined(__WIN__) || defined(_WIN32) // _WIN32 also includes WIN64
  #ifndef _WINDOWS
    // Just to ease life. This way the symbol has not to be given during build.
    // __WIN__ and _WIN32 are implicitely defined on Windows, however _WINDOWS is not.
    #define _WINDOWS
  #endif

  #define  WIN32_LEAN_AND_MEAN
  #include <windows.h>
  #include <direct.h>
  #include <shlobj.h> // Font folder location
  #include <wingdi.h> // wglGetProcAddress
  #include "mmsystem.h" // OutputDebugStr

  // The export/import template macro is needed if any STL template is used across DLL boundaries.
  // The only exceptions are string and wstring, as they are already exported.
  // Make sure all particpating DLLs/apps are using the same shared library type (either debug or release)
  // and they must use a shared (dynamic) runtime instead of a statically linked one.
  #ifdef MAKEDLL
    #define GENERIC_CANVAS_API  __declspec(dllexport)
    #define EXPORT_IMPORT_TEMPLATE
  #else
    #define GENERIC_CANVAS_API  __declspec(dllimport)
    #define EXPORT_IMPORT_TEMPLATE extern
  #endif

  #pragma warning(disable: 4251) // Disable warning about DLL interface for template classes.

  #ifdef __BORLANDC__
    #define HIDESBASE __declspec(hidesbase)
  #endif

  #include <GL/gl.h>
  #include <GL/glu.h>
  #include "gc_glext.h"
#else // !WINDOWS
  #define GENERIC_CANVAS_API 
  #define __cdecl

  #include <stdlib.h>
  #define MAX_PATH PATH_MAX
  #define HIDESBASE

  #ifdef __APPLE__
    #define GL_GLEXT_LEGACY
    #include <OpenGL/gl.h>
    #include "gc_glext.h"
    #include <OpenGL/glu.h>
    #include <OpenGL/OpenGL.h>
  #else // !__APPLE__
    #include <X11/Xlib.h>

    #define HIDESBASE
    #define GL_GLEXT_LEGACY
    #include <GL/gl.h>
    #include "gc_glext.h"
    #include <GL/glu.h>
    #define GLX_GLXEXT_LEGACY
    #include <GL/glx.h>
    #include <GL/glxext.h>
  #endif
#endif // !_WINDOWS

#define _USE_MATH_DEFINES
#include <math.h>

#include <time.h>

// STL namespaces and templates.
#include <string>
#include <map>
#include <set>
#include <vector>
#include <algorithm>

using namespace std;

#include <errno.h>
#include <glib.h>

#endif // #ifndef __GC_H__