summaryrefslogtreecommitdiffstats
path: root/docs/source/conf.py
blob: 55b2d42200517f67ea28fb274f111cefc773610a (plain) (blame)
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
# -*- coding: utf-8 -*-
#
# Sphinx RTD theme demo documentation build configuration file, created by
# sphinx-quickstart on Sun Nov  3 11:56:36 2013.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.

import sys, os

sys.path.insert(0, os.path.abspath('_ext'))

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.insert(0, os.path.abspath('.'))

# -- General configuration -----------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'

# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [
    'sphinx.ext.autodoc',
    'sphinx.ext.mathjax',
    'sphinx.ext.viewcode',
	'edit_on_github',
]

edit_on_github_project = 'mamedev/docs'
edit_on_github_branch = 'master/source'

# Math
mathjax_path = "http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# The suffix of source filenames.
source_suffix = '.rst'

# The encoding of source files.
#source_encoding = 'utf-8-sig'

# The master toctree document.
master_doc = 'index'

# General information about the project.
project = u'MAME Documentation'
copyright = u'2017, MAMEdev Team'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '0.174'
# The full version, including alpha/beta/rc tags.
release = '0.174'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = []

# The reST default role (used for this markup: `text`) to use for all documents.
#default_role = None

# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True

# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True

# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#show_authors = False

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'

# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []


# -- Options for HTML output ---------------------------------------------------

# The theme to use for HTML and HTML Help pages.  See the documentation for
# a list of builtin themes.
html_theme = 'sphinx_rtd_theme'

# Theme options are theme-specific and customize the look and feel of a theme
# further.  For a list of options available for each theme, see the
# documentation.
html_theme_options = {
    # 'sticky_navigation': True  # Set to False to disable the sticky nav while scrolling.
    # 'logo_only': True,  # if we have a html_logo below, this shows /only/ the logo with no title text
}

# Add any paths that contain custom themes here, relative to this directory.
html_theme_path = ["../themes/"]

# The name for this set of Sphinx documents.  If None, it defaults to
# "<project> v<release> documentation".
#html_title = None

# A shorter title for the navigation bar.  Default is the same as html_title.
#html_short_title = None

# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = None

# The name of an image file (within the static path) to use as favicon of the
# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
#html_static_path = ['_static']

# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'

# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True

# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}

# Additional templates that should be rendered to pages, maps page names to
# template names.
#html_additional_pages = {}

# If false, no module index is generated.
#html_domain_indices = True

# If false, no index is generated.
#html_use_index = True

# If true, the index is split into individual pages for each letter.
#html_split_index = False

# If true, links to the reST sources are added to the pages.
html_show_sourcelink = False

# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
#html_show_sphinx = True

# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
#html_show_copyright = True

# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it.  The value of this option must be the
# base URL from which the finished HTML is served.
#html_use_opensearch = ''

# This is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = None

# Output file base name for HTML help builder.
htmlhelp_basename = 'MAME'


# -- Options for LaTeX output --------------------------------------------------

latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
#'preamble': '',
}

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
  ('index', 'MAME.tex', u'MAME Documentation',
   u'MAMEdev Team', 'manual'),
]

# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None

# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#latex_use_parts = False

# If true, show page references after internal links.
#latex_show_pagerefs = False

# If true, show URL addresses after external links.
#latex_show_urls = False

# Documents to append as an appendix to all manuals.
#latex_appendices = []

# If false, no module index is generated.
#latex_domain_indices = True


# -- Options for manual page output --------------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
    ('index', 'MAME', u'MAME Documentation',
     [u'MAMEdev Team'], 1)
]

# If true, show URL addresses after external links.
#man_show_urls = False


# -- Options for Texinfo output ------------------------------------------------

# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
#  dir menu entry, description, category)
texinfo_documents = [
  ('index', 'MAME', u'MAME Documentation',
   u'MAMEdev Team', 'MAME', 'Multiple Arcade Machine Emulator',
   'Emulation'),
]

# Documents to append as an appendix to all manuals.
#texinfo_appendices = []

# If false, no module index is generated.
#texinfo_domain_indices = True

# How to display URL addresses: 'footnote', 'no', or 'inline'.
#texinfo_show_urls = 'footnote'
lass="kt">int pitch; /**< Read-only */ void *pixels; /**< Read-write */ /** Application data associated with the surface */ void *userdata; /**< Read-write */ /** information needed for surfaces requiring locks */ int locked; /**< Read-only */ void *lock_data; /**< Read-only */ /** clipping information */ SDL_Rect clip_rect; /**< Read-only */ /** info for fast blit mapping to other surfaces */ struct SDL_BlitMap *map; /**< Private */ /** Reference count -- used when freeing surface */ int refcount; /**< Read-mostly */ } SDL_Surface; /** * \brief The type of function used for surface blitting functions. */ typedef int (*SDL_blit) (struct SDL_Surface * src, SDL_Rect * srcrect, struct SDL_Surface * dst, SDL_Rect * dstrect); /** * Allocate and free an RGB surface. * * If the depth is 4 or 8 bits, an empty palette is allocated for the surface. * If the depth is greater than 8 bits, the pixel format is set using the * flags '[RGB]mask'. * * If the function runs out of memory, it will return NULL. * * \param flags The \c flags are obsolete and should be set to 0. * \param width The width in pixels of the surface to create. * \param height The height in pixels of the surface to create. * \param depth The depth in bits of the surface to create. * \param Rmask The red mask of the surface to create. * \param Gmask The green mask of the surface to create. * \param Bmask The blue mask of the surface to create. * \param Amask The alpha mask of the surface to create. */ extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurface (Uint32 flags, int width, int height, int depth, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask); extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceWithFormat (Uint32 flags, int width, int height, int depth, Uint32 format); extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceFrom(void *pixels, int width, int height, int depth, int pitch, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask); extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceWithFormatFrom (void *pixels, int width, int height, int depth, int pitch, Uint32 format); extern DECLSPEC void SDLCALL SDL_FreeSurface(SDL_Surface * surface); /** * \brief Set the palette used by a surface. * * \return 0, or -1 if the surface format doesn't use a palette. * * \note A single palette can be shared with many surfaces. */ extern DECLSPEC int SDLCALL SDL_SetSurfacePalette(SDL_Surface * surface, SDL_Palette * palette); /** * \brief Sets up a surface for directly accessing the pixels. * * Between calls to SDL_LockSurface() / SDL_UnlockSurface(), you can write * to and read from \c surface->pixels, using the pixel format stored in * \c surface->format. Once you are done accessing the surface, you should * use SDL_UnlockSurface() to release it. * * Not all surfaces require locking. If SDL_MUSTLOCK(surface) evaluates * to 0, then you can read and write to the surface at any time, and the * pixel format of the surface will not change. * * No operating system or library calls should be made between lock/unlock * pairs, as critical system locks may be held during this time. * * SDL_LockSurface() returns 0, or -1 if the surface couldn't be locked. * * \sa SDL_UnlockSurface() */ extern DECLSPEC int SDLCALL SDL_LockSurface(SDL_Surface * surface); /** \sa SDL_LockSurface() */ extern DECLSPEC void SDLCALL SDL_UnlockSurface(SDL_Surface * surface); /** * Load a surface from a seekable SDL data stream (memory or file). * * If \c freesrc is non-zero, the stream will be closed after being read. * * The new surface should be freed with SDL_FreeSurface(). * * \return the new surface, or NULL if there was an error. */ extern DECLSPEC SDL_Surface *SDLCALL SDL_LoadBMP_RW(SDL_RWops * src, int freesrc); /** * Load a surface from a file. * * Convenience macro. */ #define SDL_LoadBMP(file) SDL_LoadBMP_RW(SDL_RWFromFile(file, "rb"), 1) /** * Save a surface to a seekable SDL data stream (memory or file). * * Surfaces with a 24-bit, 32-bit and paletted 8-bit format get saved in the * BMP directly. Other RGB formats with 8-bit or higher get converted to a * 24-bit surface or, if they have an alpha mask or a colorkey, to a 32-bit * surface before they are saved. YUV and paletted 1-bit and 4-bit formats are * not supported. * * If \c freedst is non-zero, the stream will be closed after being written. * * \return 0 if successful or -1 if there was an error. */ extern DECLSPEC int SDLCALL SDL_SaveBMP_RW (SDL_Surface * surface, SDL_RWops * dst, int freedst); /** * Save a surface to a file. * * Convenience macro. */ #define SDL_SaveBMP(surface, file) \ SDL_SaveBMP_RW(surface, SDL_RWFromFile(file, "wb"), 1) /** * \brief Sets the RLE acceleration hint for a surface. * * \return 0 on success, or -1 if the surface is not valid * * \note If RLE is enabled, colorkey and alpha blending blits are much faster, * but the surface must be locked before directly accessing the pixels. */ extern DECLSPEC int SDLCALL SDL_SetSurfaceRLE(SDL_Surface * surface, int flag); /** * \brief Sets the color key (transparent pixel) in a blittable surface. * * \param surface The surface to update * \param flag Non-zero to enable colorkey and 0 to disable colorkey * \param key The transparent pixel in the native surface format * * \return 0 on success, or -1 if the surface is not valid * * You can pass SDL_RLEACCEL to enable RLE accelerated blits. */ extern DECLSPEC int SDLCALL SDL_SetColorKey(SDL_Surface * surface, int flag, Uint32 key); /** * \brief Gets the color key (transparent pixel) in a blittable surface. * * \param surface The surface to update * \param key A pointer filled in with the transparent pixel in the native * surface format * * \return 0 on success, or -1 if the surface is not valid or colorkey is not * enabled. */ extern DECLSPEC int SDLCALL SDL_GetColorKey(SDL_Surface * surface, Uint32 * key); /** * \brief Set an additional color value used in blit operations. * * \param surface The surface to update. * \param r The red color value multiplied into blit operations. * \param g The green color value multiplied into blit operations. * \param b The blue color value multiplied into blit operations. * * \return 0 on success, or -1 if the surface is not valid. * * \sa SDL_GetSurfaceColorMod() */ extern DECLSPEC int SDLCALL SDL_SetSurfaceColorMod(SDL_Surface * surface, Uint8 r, Uint8 g, Uint8 b); /** * \brief Get the additional color value used in blit operations. * * \param surface The surface to query. * \param r A pointer filled in with the current red color value. * \param g A pointer filled in with the current green color value. * \param b A pointer filled in with the current blue color value. * * \return 0 on success, or -1 if the surface is not valid. * * \sa SDL_SetSurfaceColorMod() */ extern DECLSPEC int SDLCALL SDL_GetSurfaceColorMod(SDL_Surface * surface, Uint8 * r, Uint8 * g, Uint8 * b); /** * \brief Set an additional alpha value used in blit operations. * * \param surface The surface to update. * \param alpha The alpha value multiplied into blit operations. * * \return 0 on success, or -1 if the surface is not valid. * * \sa SDL_GetSurfaceAlphaMod() */ extern DECLSPEC int SDLCALL SDL_SetSurfaceAlphaMod(SDL_Surface * surface, Uint8 alpha); /** * \brief Get the additional alpha value used in blit operations. * * \param surface The surface to query. * \param alpha A pointer filled in with the current alpha value. * * \return 0 on success, or -1 if the surface is not valid. * * \sa SDL_SetSurfaceAlphaMod() */ extern DECLSPEC int SDLCALL SDL_GetSurfaceAlphaMod(SDL_Surface * surface, Uint8 * alpha); /** * \brief Set the blend mode used for blit operations. * * \param surface The surface to update. * \param blendMode ::SDL_BlendMode to use for blit blending. * * \return 0 on success, or -1 if the parameters are not valid. * * \sa SDL_GetSurfaceBlendMode() */ extern DECLSPEC int SDLCALL SDL_SetSurfaceBlendMode(SDL_Surface * surface, SDL_BlendMode blendMode); /** * \brief Get the blend mode used for blit operations. * * \param surface The surface to query. * \param blendMode A pointer filled in with the current blend mode. * * \return 0 on success, or -1 if the surface is not valid. * * \sa SDL_SetSurfaceBlendMode() */ extern DECLSPEC int SDLCALL SDL_GetSurfaceBlendMode(SDL_Surface * surface, SDL_BlendMode *blendMode); /** * Sets the clipping rectangle for the destination surface in a blit. * * If the clip rectangle is NULL, clipping will be disabled. * * If the clip rectangle doesn't intersect the surface, the function will * return SDL_FALSE and blits will be completely clipped. Otherwise the * function returns SDL_TRUE and blits to the surface will be clipped to * the intersection of the surface area and the clipping rectangle. * * Note that blits are automatically clipped to the edges of the source * and destination surfaces. */ extern DECLSPEC SDL_bool SDLCALL SDL_SetClipRect(SDL_Surface * surface, const SDL_Rect * rect); /** * Gets the clipping rectangle for the destination surface in a blit. * * \c rect must be a pointer to a valid rectangle which will be filled * with the correct values. */ extern DECLSPEC void SDLCALL SDL_GetClipRect(SDL_Surface * surface, SDL_Rect * rect); /** * Creates a new surface of the specified format, and then copies and maps * the given surface to it so the blit of the converted surface will be as * fast as possible. If this function fails, it returns NULL. * * The \c flags parameter is passed to SDL_CreateRGBSurface() and has those * semantics. You can also pass ::SDL_RLEACCEL in the flags parameter and * SDL will try to RLE accelerate colorkey and alpha blits in the resulting * surface. */ extern DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurface (SDL_Surface * src, const SDL_PixelFormat * fmt, Uint32 flags); extern DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurfaceFormat (SDL_Surface * src, Uint32 pixel_format, Uint32 flags); /** * \brief Copy a block of pixels of one format to another format * * \return 0 on success, or -1 if there was an error */ extern DECLSPEC int SDLCALL SDL_ConvertPixels(int width, int height, Uint32 src_format, const void * src, int src_pitch, Uint32 dst_format, void * dst, int dst_pitch); /** * Performs a fast fill of the given rectangle with \c color. * * If \c rect is NULL, the whole surface will be filled with \c color. * * The color should be a pixel of the format used by the surface, and * can be generated by the SDL_MapRGB() function. * * \return 0 on success, or -1 on error. */ extern DECLSPEC int SDLCALL SDL_FillRect (SDL_Surface * dst, const SDL_Rect * rect, Uint32 color); extern DECLSPEC int SDLCALL SDL_FillRects (SDL_Surface * dst, const SDL_Rect * rects, int count, Uint32 color); /** * Performs a fast blit from the source surface to the destination surface. * * This assumes that the source and destination rectangles are * the same size. If either \c srcrect or \c dstrect are NULL, the entire * surface (\c src or \c dst) is copied. The final blit rectangles are saved * in \c srcrect and \c dstrect after all clipping is performed. * * \return If the blit is successful, it returns 0, otherwise it returns -1. * * The blit function should not be called on a locked surface. * * The blit semantics for surfaces with and without blending and colorkey * are defined as follows: * \verbatim RGBA->RGB: Source surface blend mode set to SDL_BLENDMODE_BLEND: alpha-blend (using the source alpha-channel and per-surface alpha) SDL_SRCCOLORKEY ignored. Source surface blend mode set to SDL_BLENDMODE_NONE: copy RGB. if SDL_SRCCOLORKEY set, only copy the pixels matching the RGB values of the source color key, ignoring alpha in the comparison. RGB->RGBA: Source surface blend mode set to SDL_BLENDMODE_BLEND: alpha-blend (using the source per-surface alpha) Source surface blend mode set to SDL_BLENDMODE_NONE: copy RGB, set destination alpha to source per-surface alpha value. both: if SDL_SRCCOLORKEY set, only copy the pixels matching the source color key. RGBA->RGBA: Source surface blend mode set to SDL_BLENDMODE_BLEND: alpha-blend (using the source alpha-channel and per-surface alpha) SDL_SRCCOLORKEY ignored. Source surface blend mode set to SDL_BLENDMODE_NONE: copy all of RGBA to the destination. if SDL_SRCCOLORKEY set, only copy the pixels matching the RGB values of the source color key, ignoring alpha in the comparison. RGB->RGB: Source surface blend mode set to SDL_BLENDMODE_BLEND: alpha-blend (using the source per-surface alpha) Source surface blend mode set to SDL_BLENDMODE_NONE: copy RGB. both: if SDL_SRCCOLORKEY set, only copy the pixels matching the source color key. \endverbatim * * You should call SDL_BlitSurface() unless you know exactly how SDL * blitting works internally and how to use the other blit functions. */ #define SDL_BlitSurface SDL_UpperBlit /** * This is the public blit function, SDL_BlitSurface(), and it performs * rectangle validation and clipping before passing it to SDL_LowerBlit() */ extern DECLSPEC int SDLCALL SDL_UpperBlit (SDL_Surface * src, const SDL_Rect * srcrect, SDL_Surface * dst, SDL_Rect * dstrect); /** * This is a semi-private blit function and it performs low-level surface * blitting only. */ extern DECLSPEC int SDLCALL SDL_LowerBlit (SDL_Surface * src, SDL_Rect * srcrect, SDL_Surface * dst, SDL_Rect * dstrect); /** * \brief Perform a fast, low quality, stretch blit between two surfaces of the * same pixel format. * * \note This function uses a static buffer, and is not thread-safe. */ extern DECLSPEC int SDLCALL SDL_SoftStretch(SDL_Surface * src, const SDL_Rect * srcrect, SDL_Surface * dst, const SDL_Rect * dstrect); #define SDL_BlitScaled SDL_UpperBlitScaled /** * This is the public scaled blit function, SDL_BlitScaled(), and it performs * rectangle validation and clipping before passing it to SDL_LowerBlitScaled() */ extern DECLSPEC int SDLCALL SDL_UpperBlitScaled (SDL_Surface * src, const SDL_Rect * srcrect, SDL_Surface * dst, SDL_Rect * dstrect); /** * This is a semi-private blit function and it performs low-level surface * scaled blitting only. */ extern DECLSPEC int SDLCALL SDL_LowerBlitScaled (SDL_Surface * src, SDL_Rect * srcrect, SDL_Surface * dst, SDL_Rect * dstrect); /* Ends C function definitions when using C++ */ #ifdef __cplusplus } #endif #include "close_code.h" #endif /* _SDL_surface_h */ /* vi: set ts=4 sw=4 expandtab: */