Compare commits
5 Commits
wip/carlos
...
gbsneto/cl
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0c4fdb2d31 | ||
|
|
4504a313f7 | ||
|
|
ed7fc825e1 | ||
|
|
43307c6b84 | ||
|
|
b4d55325d7 |
@@ -1,17 +1,9 @@
|
||||
image: registry.gitlab.gnome.org/gnome/mutter/master:v1
|
||||
|
||||
stages:
|
||||
- review
|
||||
- build
|
||||
- test
|
||||
|
||||
check-commit-log:
|
||||
stage: review
|
||||
script:
|
||||
- ./.gitlab-ci/check-commit-log.sh
|
||||
only:
|
||||
- merge_requests
|
||||
|
||||
build-mutter:
|
||||
stage: build
|
||||
script:
|
||||
@@ -22,9 +14,6 @@ build-mutter:
|
||||
expire_in: 1 day
|
||||
paths:
|
||||
- build
|
||||
only:
|
||||
- merge_requests
|
||||
- /^.*$/
|
||||
|
||||
test-mutter:
|
||||
stage: test
|
||||
@@ -39,6 +28,3 @@ test-mutter:
|
||||
- >
|
||||
dbus-run-session -- xvfb-run -s '+iglx -noreset'
|
||||
meson test -C build --no-rebuild -t 10 --verbose --no-stdsplit --wrap catchsegv
|
||||
only:
|
||||
- merge_requests
|
||||
- /^.*$/
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ -z "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" ]; then
|
||||
echo Cannot review non-merge request
|
||||
exit 1
|
||||
fi
|
||||
|
||||
git fetch $CI_MERGE_REQUEST_PROJECT_URL.git $CI_MERGE_REQUEST_TARGET_BRANCH_NAME
|
||||
|
||||
branch_point=$(git merge-base HEAD FETCH_HEAD)
|
||||
|
||||
commits=$(git log --format='format:%H' $branch_point..$CI_COMMIT_SHA)
|
||||
|
||||
if [ -z "$commits" ]; then
|
||||
echo Commit range empty
|
||||
exit 1
|
||||
fi
|
||||
|
||||
function commit_message_has_url() {
|
||||
commit=$1
|
||||
commit_message=$(git show -s --format='format:%b' $commit)
|
||||
echo "$commit_message" | grep -qe "\($CI_MERGE_REQUEST_PROJECT_URL/\(issues\|merge_requests\)/[0-9]\+\|https://bugzilla.gnome.org/show_bug.cgi?id=[0-9]\+\)"
|
||||
return $?
|
||||
}
|
||||
|
||||
for commit in $commits; do
|
||||
if ! commit_message_has_url $commit; then
|
||||
echo "Missing merge request or issue URL on commit $(echo $commit | cut -c -8)"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
14
README.md
14
README.md
@@ -22,20 +22,6 @@ by Gala, elementary OS's window manager. It can also be run standalone, using
|
||||
the command "mutter", but just running plain mutter is only intended for
|
||||
debugging purposes.
|
||||
|
||||
## Contributing
|
||||
|
||||
To contribute, open merge requests at https://gitlab.gnome.org/GNOME/mutter.
|
||||
|
||||
The coding style used is primarily the GNU flavor of the [GNOME coding
|
||||
style](https://developer.gnome.org/programming-guidelines/stable/c-coding-style.html.en)
|
||||
with some minor additions such as preferring `stdint.h` types over GLib
|
||||
fundamental types, and a soft 80 character line limit. However, in general,
|
||||
look at the file you're editing for inspiration.
|
||||
|
||||
Commit messages should follow the [GNOME commit message
|
||||
guidelines](https://wiki.gnome.org/Git/CommitMessages). We require an URL
|
||||
to either an issue or a merge request in each commit.
|
||||
|
||||
## License
|
||||
|
||||
Mutter is distributed under the terms of the GNU General Public License,
|
||||
|
||||
@@ -53,6 +53,9 @@
|
||||
#include "clutter-stage-window.h"
|
||||
#include "clutter-device-manager-private.h"
|
||||
|
||||
#define CLUTTER_DISABLE_DEPRECATION_WARNINGS
|
||||
#include "deprecated/clutter-backend.h"
|
||||
|
||||
#ifdef CLUTTER_HAS_WAYLAND_COMPOSITOR_SUPPORT
|
||||
#include "wayland/clutter-wayland-compositor.h"
|
||||
#endif
|
||||
@@ -900,6 +903,129 @@ clutter_get_default_backend (void)
|
||||
return clutter_context->backend;
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_backend_set_double_click_time:
|
||||
* @backend: a #ClutterBackend
|
||||
* @msec: milliseconds between two button press events
|
||||
*
|
||||
* Sets the maximum time between two button press events, used to
|
||||
* verify whether it's a double click event or not.
|
||||
*
|
||||
* Since: 0.4
|
||||
*
|
||||
* Deprecated: 1.4: Use #ClutterSettings:double-click-time instead
|
||||
*/
|
||||
void
|
||||
clutter_backend_set_double_click_time (ClutterBackend *backend,
|
||||
guint msec)
|
||||
{
|
||||
ClutterSettings *settings = clutter_settings_get_default ();
|
||||
|
||||
g_object_set (settings, "double-click-time", msec, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_backend_get_double_click_time:
|
||||
* @backend: a #ClutterBackend
|
||||
*
|
||||
* Gets the maximum time between two button press events, as set
|
||||
* by clutter_backend_set_double_click_time().
|
||||
*
|
||||
* Return value: a time in milliseconds
|
||||
*
|
||||
* Since: 0.4
|
||||
*
|
||||
* Deprecated: 1.4: Use #ClutterSettings:double-click-time instead
|
||||
*/
|
||||
guint
|
||||
clutter_backend_get_double_click_time (ClutterBackend *backend)
|
||||
{
|
||||
ClutterSettings *settings = clutter_settings_get_default ();
|
||||
gint retval;
|
||||
|
||||
g_object_get (settings, "double-click-time", &retval, NULL);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_backend_set_double_click_distance:
|
||||
* @backend: a #ClutterBackend
|
||||
* @distance: a distance, in pixels
|
||||
*
|
||||
* Sets the maximum distance used to verify a double click event.
|
||||
*
|
||||
* Since: 0.4
|
||||
*
|
||||
* Deprecated: 1.4: Use #ClutterSettings:double-click-distance instead
|
||||
*/
|
||||
void
|
||||
clutter_backend_set_double_click_distance (ClutterBackend *backend,
|
||||
guint distance)
|
||||
{
|
||||
ClutterSettings *settings = clutter_settings_get_default ();
|
||||
|
||||
g_object_set (settings, "double-click-distance", distance, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_backend_get_double_click_distance:
|
||||
* @backend: a #ClutterBackend
|
||||
*
|
||||
* Retrieves the distance used to verify a double click event
|
||||
*
|
||||
* Return value: a distance, in pixels.
|
||||
*
|
||||
* Since: 0.4
|
||||
*
|
||||
* Deprecated: 1.4: Use #ClutterSettings:double-click-distance instead
|
||||
*/
|
||||
guint
|
||||
clutter_backend_get_double_click_distance (ClutterBackend *backend)
|
||||
{
|
||||
ClutterSettings *settings = clutter_settings_get_default ();
|
||||
gint retval;
|
||||
|
||||
g_object_get (settings, "double-click-distance", &retval, NULL);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_backend_set_resolution:
|
||||
* @backend: a #ClutterBackend
|
||||
* @dpi: the resolution in "dots per inch" (Physical inches aren't
|
||||
* actually involved; the terminology is conventional).
|
||||
*
|
||||
* Sets the resolution for font handling on the screen. This is a
|
||||
* scale factor between points specified in a #PangoFontDescription
|
||||
* and cairo units. The default value is 96, meaning that a 10 point
|
||||
* font will be 13 units high. (10 * 96. / 72. = 13.3).
|
||||
*
|
||||
* Applications should never need to call this function.
|
||||
*
|
||||
* Since: 0.4
|
||||
*
|
||||
* Deprecated: 1.4: Use #ClutterSettings:font-dpi instead
|
||||
*/
|
||||
void
|
||||
clutter_backend_set_resolution (ClutterBackend *backend,
|
||||
gdouble dpi)
|
||||
{
|
||||
ClutterSettings *settings;
|
||||
gint resolution;
|
||||
|
||||
g_return_if_fail (CLUTTER_IS_BACKEND (backend));
|
||||
|
||||
if (dpi < 0)
|
||||
resolution = -1;
|
||||
else
|
||||
resolution = dpi * 1024;
|
||||
|
||||
settings = clutter_settings_get_default ();
|
||||
g_object_set (settings, "font-dpi", resolution, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_backend_get_resolution:
|
||||
* @backend: a #ClutterBackend
|
||||
@@ -1005,6 +1131,61 @@ clutter_backend_get_font_options (ClutterBackend *backend)
|
||||
return backend->font_options;
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_backend_set_font_name:
|
||||
* @backend: a #ClutterBackend
|
||||
* @font_name: the name of the font
|
||||
*
|
||||
* Sets the default font to be used by Clutter. The @font_name string
|
||||
* must either be %NULL, which means that the font name from the
|
||||
* default #ClutterBackend will be used; or be something that can
|
||||
* be parsed by the pango_font_description_from_string() function.
|
||||
*
|
||||
* Since: 1.0
|
||||
*
|
||||
* Deprecated: 1.4: Use #ClutterSettings:font-name instead
|
||||
*/
|
||||
void
|
||||
clutter_backend_set_font_name (ClutterBackend *backend,
|
||||
const gchar *font_name)
|
||||
{
|
||||
ClutterSettings *settings = clutter_settings_get_default ();
|
||||
|
||||
g_object_set (settings, "font-name", font_name, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_backend_get_font_name:
|
||||
* @backend: a #ClutterBackend
|
||||
*
|
||||
* Retrieves the default font name as set by
|
||||
* clutter_backend_set_font_name().
|
||||
*
|
||||
* Return value: the font name for the backend. The returned string is
|
||||
* owned by the #ClutterBackend and should never be modified or freed
|
||||
*
|
||||
* Since: 1.0
|
||||
*
|
||||
* Deprecated: 1.4: Use #ClutterSettings:font-name instead
|
||||
*/
|
||||
const gchar *
|
||||
clutter_backend_get_font_name (ClutterBackend *backend)
|
||||
{
|
||||
ClutterSettings *settings;
|
||||
|
||||
g_return_val_if_fail (CLUTTER_IS_BACKEND (backend), NULL);
|
||||
|
||||
settings = clutter_settings_get_default ();
|
||||
|
||||
/* XXX yuck. but we return a const pointer, so we need to
|
||||
* store it in the backend
|
||||
*/
|
||||
g_free (backend->font_name);
|
||||
g_object_get (settings, "font-name", &backend->font_name, NULL);
|
||||
|
||||
return backend->font_name;
|
||||
}
|
||||
|
||||
gint32
|
||||
_clutter_backend_get_units_serial (ClutterBackend *backend)
|
||||
{
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "deprecated/clutter-animatable.h"
|
||||
#include "deprecated/clutter-animation.h"
|
||||
#include "deprecated/clutter-animator.h"
|
||||
#include "deprecated/clutter-backend.h"
|
||||
#include "deprecated/clutter-behaviour.h"
|
||||
#include "deprecated/clutter-behaviour-depth.h"
|
||||
#include "deprecated/clutter-behaviour-ellipse.h"
|
||||
@@ -19,6 +20,7 @@
|
||||
#include "deprecated/clutter-box.h"
|
||||
#include "deprecated/clutter-cairo-texture.h"
|
||||
#include "deprecated/clutter-container.h"
|
||||
#include "deprecated/clutter-frame-source.h"
|
||||
#include "deprecated/clutter-group.h"
|
||||
#include "deprecated/clutter-input-device.h"
|
||||
#include "deprecated/clutter-keysyms.h"
|
||||
@@ -34,6 +36,8 @@
|
||||
#include "deprecated/clutter-table-layout.h"
|
||||
#include "deprecated/clutter-texture.h"
|
||||
#include "deprecated/clutter-timeline.h"
|
||||
#include "deprecated/clutter-timeout-pool.h"
|
||||
#include "deprecated/clutter-util.h"
|
||||
|
||||
#undef __CLUTTER_DEPRECATED_H_INSIDE__
|
||||
|
||||
|
||||
@@ -39,6 +39,29 @@
|
||||
#include "clutter-interval.h"
|
||||
#include "clutter-private.h"
|
||||
|
||||
#include "deprecated/clutter-util.h"
|
||||
|
||||
/**
|
||||
* clutter_util_next_p2:
|
||||
* @a: Value to get the next power
|
||||
*
|
||||
* Calculates the nearest power of two, greater than or equal to @a.
|
||||
*
|
||||
* Return value: The nearest power of two, greater or equal to @a.
|
||||
*
|
||||
* Deprecated: 1.2
|
||||
*/
|
||||
gint
|
||||
clutter_util_next_p2 (gint a)
|
||||
{
|
||||
int rval = 1;
|
||||
|
||||
while (rval < a)
|
||||
rval <<= 1;
|
||||
|
||||
return rval;
|
||||
}
|
||||
|
||||
/* Help macros to scale from OpenGL <-1,1> coordinates system to
|
||||
* window coordinates ranging [0,window-size]
|
||||
*/
|
||||
|
||||
64
clutter/clutter/deprecated/clutter-backend.h
Normal file
64
clutter/clutter/deprecated/clutter-backend.h
Normal file
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* Clutter.
|
||||
*
|
||||
* An OpenGL based 'interactive canvas' library.
|
||||
*
|
||||
* Authored By Matthew Allum <mallum@openedhand.com>
|
||||
*
|
||||
* Copyright (C) 2006, 2007, 2008 OpenedHand Ltd
|
||||
* Copyright (C) 2009, 2010 Intel Corp
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
|
||||
#error "Only <clutter/clutter.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __CLUTTER_BACKEND_DEPRECATED_H__
|
||||
#define __CLUTTER_BACKEND_DEPRECATED_H__
|
||||
|
||||
#include <clutter/clutter-types.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
CLUTTER_DEPRECATED_FOR(ClutterSettings:font_dpi)
|
||||
void clutter_backend_set_resolution (ClutterBackend *backend,
|
||||
gdouble dpi);
|
||||
|
||||
CLUTTER_DEPRECATED_FOR(ClutterSettings:double_click_time)
|
||||
void clutter_backend_set_double_click_time (ClutterBackend *backend,
|
||||
guint msec);
|
||||
|
||||
CLUTTER_DEPRECATED_FOR(ClutterSettings:double_click_time)
|
||||
guint clutter_backend_get_double_click_time (ClutterBackend *backend);
|
||||
|
||||
CLUTTER_DEPRECATED_FOR(ClutterSettings:double_click_distance)
|
||||
void clutter_backend_set_double_click_distance (ClutterBackend *backend,
|
||||
guint distance);
|
||||
|
||||
CLUTTER_DEPRECATED_FOR(ClutterSettings:double_click_distance)
|
||||
guint clutter_backend_get_double_click_distance (ClutterBackend *backend);
|
||||
|
||||
CLUTTER_DEPRECATED_FOR(ClutterSettings:font_name)
|
||||
void clutter_backend_set_font_name (ClutterBackend *backend,
|
||||
const gchar *font_name);
|
||||
|
||||
CLUTTER_DEPRECATED_FOR(ClutterSettings:font_name)
|
||||
const gchar * clutter_backend_get_font_name (ClutterBackend *backend);
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __CLUTTER_BACKEND_DEPRECATED_H__ */
|
||||
261
clutter/clutter/deprecated/clutter-frame-source.c
Normal file
261
clutter/clutter/deprecated/clutter-frame-source.c
Normal file
@@ -0,0 +1,261 @@
|
||||
/*
|
||||
* Clutter.
|
||||
*
|
||||
* An OpenGL based 'interactive canvas' library.
|
||||
*
|
||||
* Authored By Neil Roberts <neil@linux.intel.com>
|
||||
*
|
||||
* Copyright (C) 2008 OpenedHand
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#include "clutter-build-config.h"
|
||||
|
||||
#define CLUTTER_DISABLE_DEPRECATION_WARNINGS
|
||||
|
||||
#include "clutter-main.h"
|
||||
#include "clutter-private.h"
|
||||
|
||||
#include "deprecated/clutter-frame-source.h"
|
||||
#include "deprecated/clutter-timeout-interval.h"
|
||||
|
||||
typedef struct _ClutterFrameSource ClutterFrameSource;
|
||||
|
||||
struct _ClutterFrameSource
|
||||
{
|
||||
GSource source;
|
||||
|
||||
ClutterTimeoutInterval timeout;
|
||||
};
|
||||
|
||||
static gboolean clutter_frame_source_prepare (GSource *source,
|
||||
gint *timeout);
|
||||
static gboolean clutter_frame_source_check (GSource *source);
|
||||
static gboolean clutter_frame_source_dispatch (GSource *source,
|
||||
GSourceFunc callback,
|
||||
gpointer user_data);
|
||||
|
||||
static GSourceFuncs clutter_frame_source_funcs =
|
||||
{
|
||||
clutter_frame_source_prepare,
|
||||
clutter_frame_source_check,
|
||||
clutter_frame_source_dispatch,
|
||||
NULL
|
||||
};
|
||||
|
||||
/**
|
||||
* clutter_frame_source_add_full: (rename-to clutter_frame_source_add)
|
||||
* @priority: the priority of the frame source. Typically this will be in the
|
||||
* range between %G_PRIORITY_DEFAULT and %G_PRIORITY_HIGH.
|
||||
* @fps: the number of times per second to call the function
|
||||
* @func: function to call
|
||||
* @data: data to pass to the function
|
||||
* @notify: function to call when the timeout source is removed
|
||||
*
|
||||
* Sets a function to be called at regular intervals with the given
|
||||
* priority. The function is called repeatedly until it returns
|
||||
* %FALSE, at which point the timeout is automatically destroyed and
|
||||
* the function will not be called again. The @notify function is
|
||||
* called when the timeout is destroyed. The first call to the
|
||||
* function will be at the end of the first @interval.
|
||||
*
|
||||
* This function is similar to g_timeout_add_full() except that it
|
||||
* will try to compensate for delays. For example, if @func takes half
|
||||
* the interval time to execute then the function will be called again
|
||||
* half the interval time after it finished. In contrast
|
||||
* g_timeout_add_full() would not fire until a full interval after the
|
||||
* function completes so the delay between calls would be 1.0 / @fps *
|
||||
* 1.5. This function does not however try to invoke the function
|
||||
* multiple times to catch up missing frames if @func takes more than
|
||||
* @interval ms to execute.
|
||||
*
|
||||
* Return value: the ID (greater than 0) of the event source.
|
||||
*
|
||||
* Since: 0.8
|
||||
*
|
||||
* Deprecated: 1.6: There is no direct replacement for this API.
|
||||
*/
|
||||
guint
|
||||
clutter_frame_source_add_full (gint priority,
|
||||
guint fps,
|
||||
GSourceFunc func,
|
||||
gpointer data,
|
||||
GDestroyNotify notify)
|
||||
{
|
||||
guint ret;
|
||||
GSource *source = g_source_new (&clutter_frame_source_funcs,
|
||||
sizeof (ClutterFrameSource));
|
||||
ClutterFrameSource *frame_source = (ClutterFrameSource *) source;
|
||||
|
||||
_clutter_timeout_interval_init (&frame_source->timeout, fps);
|
||||
|
||||
if (priority != G_PRIORITY_DEFAULT)
|
||||
g_source_set_priority (source, priority);
|
||||
|
||||
g_source_set_name (source, "Clutter frame timeout");
|
||||
g_source_set_callback (source, func, data, notify);
|
||||
|
||||
ret = g_source_attach (source, NULL);
|
||||
|
||||
g_source_unref (source);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_frame_source_add: (skip)
|
||||
* @fps: the number of times per second to call the function
|
||||
* @func: function to call
|
||||
* @data: data to pass to the function
|
||||
*
|
||||
* Simple wrapper around clutter_frame_source_add_full().
|
||||
*
|
||||
* Return value: the ID (greater than 0) of the event source.
|
||||
*
|
||||
* Since: 0.8
|
||||
*
|
||||
* Deprecated: 1.6: There is no direct replacement for this API
|
||||
*/
|
||||
guint
|
||||
clutter_frame_source_add (guint fps,
|
||||
GSourceFunc func,
|
||||
gpointer data)
|
||||
{
|
||||
return clutter_frame_source_add_full (G_PRIORITY_DEFAULT,
|
||||
fps, func, data, NULL);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
clutter_frame_source_prepare (GSource *source,
|
||||
gint *delay)
|
||||
{
|
||||
ClutterFrameSource *frame_source = (ClutterFrameSource *) source;
|
||||
gint64 current_time;
|
||||
|
||||
#if GLIB_CHECK_VERSION (2, 27, 3)
|
||||
current_time = g_source_get_time (source) / 1000;
|
||||
#else
|
||||
{
|
||||
GTimeVal source_time;
|
||||
g_source_get_current_time (source, &source_time);
|
||||
current_time = source_time.tv_sec * 1000 + source_time.tv_usec / 1000;
|
||||
}
|
||||
#endif
|
||||
|
||||
return _clutter_timeout_interval_prepare (current_time,
|
||||
&frame_source->timeout,
|
||||
delay);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
clutter_frame_source_check (GSource *source)
|
||||
{
|
||||
return clutter_frame_source_prepare (source, NULL);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
clutter_frame_source_dispatch (GSource *source,
|
||||
GSourceFunc callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
ClutterFrameSource *frame_source = (ClutterFrameSource *) source;
|
||||
|
||||
return _clutter_timeout_interval_dispatch (&frame_source->timeout,
|
||||
callback, user_data);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_threads_add_frame_source_full: (rename-to clutter_threads_add_frame_source)
|
||||
* @priority: the priority of the frame source. Typically this will be in the
|
||||
* range between %G_PRIORITY_DEFAULT and %G_PRIORITY_HIGH.
|
||||
* @fps: the number of times per second to call the function
|
||||
* @func: function to call
|
||||
* @data: data to pass to the function
|
||||
* @notify: function to call when the timeout source is removed
|
||||
*
|
||||
* Sets a function to be called at regular intervals holding the Clutter
|
||||
* threads lock, with the given priority. The function is called repeatedly
|
||||
* until it returns %FALSE, at which point the timeout is automatically
|
||||
* removed and the function will not be called again. The @notify function
|
||||
* is called when the timeout is removed.
|
||||
*
|
||||
* This function is similar to clutter_threads_add_timeout_full()
|
||||
* except that it will try to compensate for delays. For example, if
|
||||
* @func takes half the interval time to execute then the function
|
||||
* will be called again half the interval time after it finished. In
|
||||
* contrast clutter_threads_add_timeout_full() would not fire until a
|
||||
* full interval after the function completes so the delay between
|
||||
* calls would be @interval * 1.5. This function does not however try
|
||||
* to invoke the function multiple times to catch up missing frames if
|
||||
* @func takes more than @interval ms to execute.
|
||||
*
|
||||
* See also clutter_threads_add_idle_full().
|
||||
*
|
||||
* Return value: the ID (greater than 0) of the event source.
|
||||
*
|
||||
* Since: 0.8
|
||||
*
|
||||
* Deprecated: 1.6: There is no direct replacement for this API
|
||||
*/
|
||||
guint
|
||||
clutter_threads_add_frame_source_full (gint priority,
|
||||
guint fps,
|
||||
GSourceFunc func,
|
||||
gpointer data,
|
||||
GDestroyNotify notify)
|
||||
{
|
||||
ClutterThreadsDispatch *dispatch;
|
||||
|
||||
g_return_val_if_fail (func != NULL, 0);
|
||||
|
||||
dispatch = g_slice_new (ClutterThreadsDispatch);
|
||||
dispatch->func = func;
|
||||
dispatch->data = data;
|
||||
dispatch->notify = notify;
|
||||
|
||||
return clutter_frame_source_add_full (priority,
|
||||
fps,
|
||||
_clutter_threads_dispatch, dispatch,
|
||||
_clutter_threads_dispatch_free);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_threads_add_frame_source: (skip)
|
||||
* @fps: the number of times per second to call the function
|
||||
* @func: function to call
|
||||
* @data: data to pass to the function
|
||||
*
|
||||
* Simple wrapper around clutter_threads_add_frame_source_full().
|
||||
*
|
||||
* Return value: the ID (greater than 0) of the event source.
|
||||
*
|
||||
* Since: 0.8
|
||||
*
|
||||
* Deprecated: 1.6: There is no direct replacement for this API
|
||||
*/
|
||||
guint
|
||||
clutter_threads_add_frame_source (guint fps,
|
||||
GSourceFunc func,
|
||||
gpointer data)
|
||||
{
|
||||
g_return_val_if_fail (func != NULL, 0);
|
||||
|
||||
return clutter_threads_add_frame_source_full (G_PRIORITY_DEFAULT,
|
||||
fps,
|
||||
func, data,
|
||||
NULL);
|
||||
}
|
||||
49
clutter/clutter/deprecated/clutter-frame-source.h
Normal file
49
clutter/clutter/deprecated/clutter-frame-source.h
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Clutter.
|
||||
*
|
||||
* An OpenGL based 'interactive canvas' library.
|
||||
*
|
||||
* Authored By Matthew Allum <mallum@openedhand.com>
|
||||
*
|
||||
* Copyright (C) 2008 OpenedHand
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
|
||||
#error "Only <clutter/clutter.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __CLUTTER_FRAME_SOURCE_H__
|
||||
#define __CLUTTER_FRAME_SOURCE_H__
|
||||
|
||||
#include <clutter/clutter-types.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
CLUTTER_DEPRECATED
|
||||
guint clutter_frame_source_add (guint fps,
|
||||
GSourceFunc func,
|
||||
gpointer data);
|
||||
|
||||
CLUTTER_DEPRECATED
|
||||
guint clutter_frame_source_add_full (gint priority,
|
||||
guint fps,
|
||||
GSourceFunc func,
|
||||
gpointer data,
|
||||
GDestroyNotify notify);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __CLUTTER_FRAME_SOURCE_H__ */
|
||||
@@ -40,6 +40,17 @@ void clutter_threads_enter (void);
|
||||
CLUTTER_DEPRECATED
|
||||
void clutter_threads_leave (void);
|
||||
|
||||
CLUTTER_DEPRECATED
|
||||
guint clutter_threads_add_frame_source (guint fps,
|
||||
GSourceFunc func,
|
||||
gpointer data);
|
||||
CLUTTER_DEPRECATED
|
||||
guint clutter_threads_add_frame_source_full (gint priority,
|
||||
guint fps,
|
||||
GSourceFunc func,
|
||||
gpointer data,
|
||||
GDestroyNotify notify);
|
||||
|
||||
CLUTTER_DEPRECATED_FOR(clutter_stage_set_motion_events_enabled)
|
||||
void clutter_set_motion_events_enabled (gboolean enable);
|
||||
|
||||
|
||||
@@ -66,6 +66,7 @@
|
||||
|
||||
#include "deprecated/clutter-shader.h"
|
||||
#include "deprecated/clutter-texture.h"
|
||||
#include "deprecated/clutter-util.h"
|
||||
|
||||
typedef struct _ClutterTextureAsyncData ClutterTextureAsyncData;
|
||||
|
||||
|
||||
498
clutter/clutter/deprecated/clutter-timeout-pool.c
Normal file
498
clutter/clutter/deprecated/clutter-timeout-pool.c
Normal file
@@ -0,0 +1,498 @@
|
||||
/*
|
||||
* Clutter.
|
||||
*
|
||||
* An OpenGL based 'interactive canvas' library.
|
||||
*
|
||||
* Authored By Matthew Allum <mallum@openedhand.com>
|
||||
*
|
||||
* Copyright (C) 2006 OpenedHand
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*
|
||||
*
|
||||
* ClutterTimeoutPool: pool of timeout functions using the same slice of
|
||||
* the GLib main loop
|
||||
*
|
||||
* Author: Emmanuele Bassi <ebassi@openedhand.com>
|
||||
*
|
||||
* Based on similar code by Tristan van Berkom
|
||||
*/
|
||||
|
||||
#include "clutter-build-config.h"
|
||||
|
||||
#define CLUTTER_DISABLE_DEPRECATION_WARNINGS
|
||||
#include "deprecated/clutter-main.h"
|
||||
|
||||
#include "clutter-timeout-pool.h"
|
||||
|
||||
#include "clutter-debug.h"
|
||||
#include "clutter-timeout-interval.h"
|
||||
|
||||
typedef struct _ClutterTimeout ClutterTimeout;
|
||||
typedef enum {
|
||||
CLUTTER_TIMEOUT_NONE = 0,
|
||||
CLUTTER_TIMEOUT_READY = 1 << 1
|
||||
} ClutterTimeoutFlags;
|
||||
|
||||
struct _ClutterTimeout
|
||||
{
|
||||
guint id;
|
||||
ClutterTimeoutFlags flags;
|
||||
gint refcount;
|
||||
|
||||
ClutterTimeoutInterval interval;
|
||||
|
||||
GSourceFunc func;
|
||||
gpointer data;
|
||||
GDestroyNotify notify;
|
||||
};
|
||||
|
||||
struct _ClutterTimeoutPool
|
||||
{
|
||||
GSource source;
|
||||
|
||||
guint next_id;
|
||||
|
||||
GList *timeouts;
|
||||
GList *dispatched_timeouts;
|
||||
|
||||
gint ready;
|
||||
|
||||
guint id;
|
||||
};
|
||||
|
||||
#define TIMEOUT_READY(timeout) (timeout->flags & CLUTTER_TIMEOUT_READY)
|
||||
|
||||
static gboolean clutter_timeout_pool_prepare (GSource *source,
|
||||
gint *next_timeout);
|
||||
static gboolean clutter_timeout_pool_check (GSource *source);
|
||||
static gboolean clutter_timeout_pool_dispatch (GSource *source,
|
||||
GSourceFunc callback,
|
||||
gpointer data);
|
||||
static void clutter_timeout_pool_finalize (GSource *source);
|
||||
|
||||
static GSourceFuncs clutter_timeout_pool_funcs =
|
||||
{
|
||||
clutter_timeout_pool_prepare,
|
||||
clutter_timeout_pool_check,
|
||||
clutter_timeout_pool_dispatch,
|
||||
clutter_timeout_pool_finalize
|
||||
};
|
||||
|
||||
static gint
|
||||
clutter_timeout_sort (gconstpointer a,
|
||||
gconstpointer b)
|
||||
{
|
||||
const ClutterTimeout *t_a = a;
|
||||
const ClutterTimeout *t_b = b;
|
||||
|
||||
/* Keep 'ready' timeouts at the front */
|
||||
if (TIMEOUT_READY (t_a))
|
||||
return -1;
|
||||
|
||||
if (TIMEOUT_READY (t_b))
|
||||
return 1;
|
||||
|
||||
return _clutter_timeout_interval_compare_expiration (&t_a->interval,
|
||||
&t_b->interval);
|
||||
}
|
||||
|
||||
static gint
|
||||
clutter_timeout_find_by_id (gconstpointer a,
|
||||
gconstpointer b)
|
||||
{
|
||||
const ClutterTimeout *t_a = a;
|
||||
|
||||
return t_a->id == GPOINTER_TO_UINT (b) ? 0 : 1;
|
||||
}
|
||||
|
||||
static ClutterTimeout *
|
||||
clutter_timeout_new (guint fps)
|
||||
{
|
||||
ClutterTimeout *timeout;
|
||||
|
||||
timeout = g_slice_new0 (ClutterTimeout);
|
||||
_clutter_timeout_interval_init (&timeout->interval, fps);
|
||||
timeout->flags = CLUTTER_TIMEOUT_NONE;
|
||||
timeout->refcount = 1;
|
||||
|
||||
return timeout;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
clutter_timeout_prepare (ClutterTimeoutPool *pool,
|
||||
ClutterTimeout *timeout,
|
||||
gint *next_timeout)
|
||||
{
|
||||
GSource *source = (GSource *) pool;
|
||||
gint64 now;
|
||||
|
||||
#if GLIB_CHECK_VERSION (2, 27, 3)
|
||||
now = g_source_get_time (source) / 1000;
|
||||
#else
|
||||
{
|
||||
GTimeVal source_time;
|
||||
g_source_get_current_time (source, &source_time);
|
||||
now = source_time.tv_sec * 1000 + source_time.tv_usec / 1000;
|
||||
}
|
||||
#endif
|
||||
|
||||
return _clutter_timeout_interval_prepare (now,
|
||||
&timeout->interval,
|
||||
next_timeout);
|
||||
}
|
||||
|
||||
/* ref and unref are always called under the main Clutter lock, so there
|
||||
* is not need for us to use g_atomic_int_* API.
|
||||
*/
|
||||
|
||||
static ClutterTimeout *
|
||||
clutter_timeout_ref (ClutterTimeout *timeout)
|
||||
{
|
||||
g_return_val_if_fail (timeout != NULL, timeout);
|
||||
g_return_val_if_fail (timeout->refcount > 0, timeout);
|
||||
|
||||
timeout->refcount += 1;
|
||||
|
||||
return timeout;
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_timeout_unref (ClutterTimeout *timeout)
|
||||
{
|
||||
g_return_if_fail (timeout != NULL);
|
||||
g_return_if_fail (timeout->refcount > 0);
|
||||
|
||||
timeout->refcount -= 1;
|
||||
|
||||
if (timeout->refcount == 0)
|
||||
{
|
||||
if (timeout->notify)
|
||||
timeout->notify (timeout->data);
|
||||
|
||||
g_slice_free (ClutterTimeout, timeout);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_timeout_free (ClutterTimeout *timeout)
|
||||
{
|
||||
if (G_LIKELY (timeout))
|
||||
{
|
||||
if (timeout->notify)
|
||||
timeout->notify (timeout->data);
|
||||
|
||||
g_slice_free (ClutterTimeout, timeout);
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
clutter_timeout_pool_prepare (GSource *source,
|
||||
gint *next_timeout)
|
||||
{
|
||||
ClutterTimeoutPool *pool = (ClutterTimeoutPool *) source;
|
||||
GList *l = pool->timeouts;
|
||||
|
||||
/* the pool is ready if the first timeout is ready */
|
||||
if (l && l->data)
|
||||
{
|
||||
ClutterTimeout *timeout = l->data;
|
||||
return clutter_timeout_prepare (pool, timeout, next_timeout);
|
||||
}
|
||||
else
|
||||
{
|
||||
*next_timeout = -1;
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
clutter_timeout_pool_check (GSource *source)
|
||||
{
|
||||
ClutterTimeoutPool *pool = (ClutterTimeoutPool *) source;
|
||||
GList *l;
|
||||
|
||||
clutter_threads_enter ();
|
||||
|
||||
for (l = pool->timeouts; l; l = l->next)
|
||||
{
|
||||
ClutterTimeout *timeout = l->data;
|
||||
|
||||
/* since the timeouts are sorted by expiration, as soon
|
||||
* as we get a check returning FALSE we know that the
|
||||
* following timeouts are not expiring, so we break as
|
||||
* soon as possible
|
||||
*/
|
||||
if (clutter_timeout_prepare (pool, timeout, NULL))
|
||||
{
|
||||
timeout->flags |= CLUTTER_TIMEOUT_READY;
|
||||
pool->ready += 1;
|
||||
}
|
||||
else
|
||||
break;
|
||||
}
|
||||
|
||||
clutter_threads_leave ();
|
||||
|
||||
return (pool->ready > 0);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
clutter_timeout_pool_dispatch (GSource *source,
|
||||
GSourceFunc func,
|
||||
gpointer data)
|
||||
{
|
||||
ClutterTimeoutPool *pool = (ClutterTimeoutPool *) source;
|
||||
GList *dispatched_timeouts;
|
||||
|
||||
/* the main loop might have predicted this, so we repeat the
|
||||
* check for ready timeouts.
|
||||
*/
|
||||
if (!pool->ready)
|
||||
clutter_timeout_pool_check (source);
|
||||
|
||||
clutter_threads_enter ();
|
||||
|
||||
/* Iterate by moving the actual start of the list along so that it
|
||||
* can cope with adds and removes while a timeout is being dispatched
|
||||
*/
|
||||
while (pool->timeouts && pool->timeouts->data && pool->ready-- > 0)
|
||||
{
|
||||
ClutterTimeout *timeout = pool->timeouts->data;
|
||||
GList *l;
|
||||
|
||||
/* One of the ready timeouts may have been removed during dispatch,
|
||||
* in which case pool->ready will be wrong, but the ready timeouts
|
||||
* are always kept at the start of the list so we can stop once
|
||||
* we've reached the first non-ready timeout
|
||||
*/
|
||||
if (!(TIMEOUT_READY (timeout)))
|
||||
break;
|
||||
|
||||
/* Add a reference to the timeout so it can't disappear
|
||||
* while it's being dispatched
|
||||
*/
|
||||
clutter_timeout_ref (timeout);
|
||||
|
||||
timeout->flags &= ~CLUTTER_TIMEOUT_READY;
|
||||
|
||||
/* Move the list node to a list of dispatched timeouts */
|
||||
l = pool->timeouts;
|
||||
if (l->next)
|
||||
l->next->prev = NULL;
|
||||
|
||||
pool->timeouts = l->next;
|
||||
|
||||
if (pool->dispatched_timeouts)
|
||||
pool->dispatched_timeouts->prev = l;
|
||||
|
||||
l->prev = NULL;
|
||||
l->next = pool->dispatched_timeouts;
|
||||
pool->dispatched_timeouts = l;
|
||||
|
||||
if (!_clutter_timeout_interval_dispatch (&timeout->interval,
|
||||
timeout->func, timeout->data))
|
||||
{
|
||||
/* The timeout may have already been removed, but nothing
|
||||
* can be added to the dispatched_timeout list except in this
|
||||
* function so it will always either be at the head of the
|
||||
* dispatched list or have been removed
|
||||
*/
|
||||
if (pool->dispatched_timeouts &&
|
||||
pool->dispatched_timeouts->data == timeout)
|
||||
{
|
||||
pool->dispatched_timeouts =
|
||||
g_list_delete_link (pool->dispatched_timeouts,
|
||||
pool->dispatched_timeouts);
|
||||
|
||||
/* Remove the reference that was held by it being in the list */
|
||||
clutter_timeout_unref (timeout);
|
||||
}
|
||||
}
|
||||
|
||||
clutter_timeout_unref (timeout);
|
||||
}
|
||||
|
||||
/* Re-insert the dispatched timeouts in sorted order */
|
||||
dispatched_timeouts = pool->dispatched_timeouts;
|
||||
while (dispatched_timeouts)
|
||||
{
|
||||
ClutterTimeout *timeout = dispatched_timeouts->data;
|
||||
GList *next = dispatched_timeouts->next;
|
||||
|
||||
if (timeout)
|
||||
pool->timeouts = g_list_insert_sorted (pool->timeouts, timeout,
|
||||
clutter_timeout_sort);
|
||||
|
||||
dispatched_timeouts = next;
|
||||
}
|
||||
|
||||
g_list_free (pool->dispatched_timeouts);
|
||||
pool->dispatched_timeouts = NULL;
|
||||
|
||||
pool->ready = 0;
|
||||
|
||||
clutter_threads_leave ();
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_timeout_pool_finalize (GSource *source)
|
||||
{
|
||||
ClutterTimeoutPool *pool = (ClutterTimeoutPool *) source;
|
||||
|
||||
/* force destruction */
|
||||
g_list_foreach (pool->timeouts, (GFunc) clutter_timeout_free, NULL);
|
||||
g_list_free (pool->timeouts);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_timeout_pool_new:
|
||||
* @priority: the priority of the timeout pool. Typically this will
|
||||
* be #G_PRIORITY_DEFAULT
|
||||
*
|
||||
* Creates a new timeout pool source. A timeout pool should be used when
|
||||
* multiple timeout functions, running at the same priority, are needed and
|
||||
* the g_timeout_add() API might lead to starvation of the time slice of
|
||||
* the main loop. A timeout pool allocates a single time slice of the main
|
||||
* loop and runs every timeout function inside it. The timeout pool is
|
||||
* always sorted, so that the extraction of the next timeout function is
|
||||
* a constant time operation.
|
||||
*
|
||||
* Return value: the newly created #ClutterTimeoutPool. The created pool
|
||||
* is owned by the GLib default context and will be automatically
|
||||
* destroyed when the context is destroyed. It is possible to force
|
||||
* the destruction of the timeout pool using g_source_destroy()
|
||||
*
|
||||
* Since: 0.4
|
||||
*
|
||||
* Deprecated: 1.6: There is no direct replacement for this API
|
||||
*/
|
||||
ClutterTimeoutPool *
|
||||
clutter_timeout_pool_new (gint priority)
|
||||
{
|
||||
ClutterTimeoutPool *pool;
|
||||
GSource *source;
|
||||
|
||||
source = g_source_new (&clutter_timeout_pool_funcs,
|
||||
sizeof (ClutterTimeoutPool));
|
||||
if (!source)
|
||||
return NULL;
|
||||
|
||||
g_source_set_name (source, "Clutter timeout pool");
|
||||
|
||||
if (priority != G_PRIORITY_DEFAULT)
|
||||
g_source_set_priority (source, priority);
|
||||
|
||||
pool = (ClutterTimeoutPool *) source;
|
||||
pool->next_id = 1;
|
||||
pool->id = g_source_attach (source, NULL);
|
||||
|
||||
/* let the default GLib context manage the pool */
|
||||
g_source_unref (source);
|
||||
|
||||
return pool;
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_timeout_pool_add:
|
||||
* @pool: a #ClutterTimeoutPool
|
||||
* @fps: the time between calls to the function, in frames per second
|
||||
* @func: function to call
|
||||
* @data: (closure): data to pass to the function, or %NULL
|
||||
* @notify: function to call when the timeout is removed, or %NULL
|
||||
*
|
||||
* Sets a function to be called at regular intervals, and puts it inside
|
||||
* the @pool. The function is repeatedly called until it returns %FALSE,
|
||||
* at which point the timeout is automatically destroyed and the function
|
||||
* won't be called again. If @notify is not %NULL, the @notify function
|
||||
* will be called. The first call to @func will be at the end of @interval.
|
||||
*
|
||||
* Since Clutter 0.8 this will try to compensate for delays. For
|
||||
* example, if @func takes half the interval time to execute then the
|
||||
* function will be called again half the interval time after it
|
||||
* finished. Before version 0.8 it would not fire until a full
|
||||
* interval after the function completes so the delay between calls
|
||||
* would be @interval * 1.5. This function does not however try to
|
||||
* invoke the function multiple times to catch up missing frames if
|
||||
* @func takes more than @interval ms to execute.
|
||||
*
|
||||
* Return value: the ID (greater than 0) of the timeout inside the pool.
|
||||
* Use clutter_timeout_pool_remove() to stop the timeout.
|
||||
*
|
||||
* Since: 0.4
|
||||
*
|
||||
* Deprecated: 1.6: There is no direct replacement for this API
|
||||
*/
|
||||
guint
|
||||
clutter_timeout_pool_add (ClutterTimeoutPool *pool,
|
||||
guint fps,
|
||||
GSourceFunc func,
|
||||
gpointer data,
|
||||
GDestroyNotify notify)
|
||||
{
|
||||
ClutterTimeout *timeout;
|
||||
guint retval = 0;
|
||||
|
||||
timeout = clutter_timeout_new (fps);
|
||||
|
||||
retval = timeout->id = pool->next_id++;
|
||||
|
||||
timeout->func = func;
|
||||
timeout->data = data;
|
||||
timeout->notify = notify;
|
||||
|
||||
pool->timeouts = g_list_insert_sorted (pool->timeouts, timeout,
|
||||
clutter_timeout_sort);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_timeout_pool_remove:
|
||||
* @pool: a #ClutterTimeoutPool
|
||||
* @id_: the id of the timeout to remove
|
||||
*
|
||||
* Removes a timeout function with @id_ from the timeout pool. The id
|
||||
* is the same returned when adding a function to the timeout pool with
|
||||
* clutter_timeout_pool_add().
|
||||
*
|
||||
* Since: 0.4
|
||||
*
|
||||
* Deprecated: 1.6: There is no direct replacement for this API
|
||||
*/
|
||||
void
|
||||
clutter_timeout_pool_remove (ClutterTimeoutPool *pool,
|
||||
guint id_)
|
||||
{
|
||||
GList *l;
|
||||
|
||||
if ((l = g_list_find_custom (pool->timeouts, GUINT_TO_POINTER (id_),
|
||||
clutter_timeout_find_by_id)))
|
||||
{
|
||||
clutter_timeout_unref (l->data);
|
||||
pool->timeouts = g_list_delete_link (pool->timeouts, l);
|
||||
}
|
||||
else if ((l = g_list_find_custom (pool->dispatched_timeouts,
|
||||
GUINT_TO_POINTER (id_),
|
||||
clutter_timeout_find_by_id)))
|
||||
{
|
||||
clutter_timeout_unref (l->data);
|
||||
|
||||
pool->dispatched_timeouts =
|
||||
g_list_delete_link (pool->dispatched_timeouts, l);
|
||||
}
|
||||
}
|
||||
69
clutter/clutter/deprecated/clutter-timeout-pool.h
Normal file
69
clutter/clutter/deprecated/clutter-timeout-pool.h
Normal file
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* Clutter.
|
||||
*
|
||||
* An OpenGL based 'interactive canvas' library.
|
||||
*
|
||||
* Authored By Matthew Allum <mallum@openedhand.com>
|
||||
*
|
||||
* Copyright (C) 2006 OpenedHand
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* ClutterTimeoutPool: pool of timeout functions using the same slice of
|
||||
* the GLib main loop
|
||||
*
|
||||
* Author: Emmanuele Bassi <ebassi@openedhand.com>
|
||||
*
|
||||
* Based on similar code by Tristan van Berkom
|
||||
*/
|
||||
|
||||
#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
|
||||
#error "Only <clutter/clutter.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __CLUTTER_TIMEOUT_POOL_H__
|
||||
#define __CLUTTER_TIMEOUT_POOL_H__
|
||||
|
||||
#include <clutter/clutter-types.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/**
|
||||
* ClutterTimeoutPool: (skip)
|
||||
*
|
||||
* #ClutterTimeoutPool is an opaque structure
|
||||
* whose members cannot be directly accessed.
|
||||
*
|
||||
* Since: 0.6
|
||||
*
|
||||
* Deprecated: 1.6
|
||||
*/
|
||||
typedef struct _ClutterTimeoutPool ClutterTimeoutPool;
|
||||
|
||||
CLUTTER_DEPRECATED
|
||||
ClutterTimeoutPool *clutter_timeout_pool_new (gint priority);
|
||||
|
||||
CLUTTER_DEPRECATED
|
||||
guint clutter_timeout_pool_add (ClutterTimeoutPool *pool,
|
||||
guint fps,
|
||||
GSourceFunc func,
|
||||
gpointer data,
|
||||
GDestroyNotify notify);
|
||||
CLUTTER_DEPRECATED
|
||||
void clutter_timeout_pool_remove (ClutterTimeoutPool *pool,
|
||||
guint id_);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __CLUTTER_TIMEOUT_POOL_H__ */
|
||||
40
clutter/clutter/deprecated/clutter-util.h
Normal file
40
clutter/clutter/deprecated/clutter-util.h
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Clutter.
|
||||
*
|
||||
* An OpenGL based 'interactive canvas' library.
|
||||
*
|
||||
* Authored By Matthew Allum <mallum@openedhand.com>
|
||||
*
|
||||
* Copyright (C) 2006 OpenedHand
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
|
||||
#error "Only <clutter/clutter.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __CLUTTER_UTIL_H__
|
||||
#define __CLUTTER_UTIL_H__
|
||||
|
||||
#include <clutter/clutter-types.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
CLUTTER_DEPRECATED
|
||||
gint clutter_util_next_p2 (gint a);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __CLUTTER_UTIL_H__ */
|
||||
@@ -221,6 +221,7 @@ clutter_deprecated_headers = [
|
||||
'deprecated/clutter-animatable.h',
|
||||
'deprecated/clutter-animation.h',
|
||||
'deprecated/clutter-animator.h',
|
||||
'deprecated/clutter-backend.h',
|
||||
'deprecated/clutter-behaviour.h',
|
||||
'deprecated/clutter-behaviour-depth.h',
|
||||
'deprecated/clutter-behaviour-ellipse.h',
|
||||
@@ -232,6 +233,7 @@ clutter_deprecated_headers = [
|
||||
'deprecated/clutter-box.h',
|
||||
'deprecated/clutter-cairo-texture.h',
|
||||
'deprecated/clutter-container.h',
|
||||
'deprecated/clutter-frame-source.h',
|
||||
'deprecated/clutter-group.h',
|
||||
'deprecated/clutter-input-device.h',
|
||||
'deprecated/clutter-keysyms.h',
|
||||
@@ -247,6 +249,8 @@ clutter_deprecated_headers = [
|
||||
'deprecated/clutter-table-layout.h',
|
||||
'deprecated/clutter-texture.h',
|
||||
'deprecated/clutter-timeline.h',
|
||||
'deprecated/clutter-timeout-pool.h',
|
||||
'deprecated/clutter-util.h',
|
||||
]
|
||||
|
||||
clutter_deprecated_sources = [
|
||||
@@ -263,6 +267,7 @@ clutter_deprecated_sources = [
|
||||
'deprecated/clutter-behaviour-scale.c',
|
||||
'deprecated/clutter-box.c',
|
||||
'deprecated/clutter-cairo-texture.c',
|
||||
'deprecated/clutter-frame-source.c',
|
||||
'deprecated/clutter-group.c',
|
||||
'deprecated/clutter-input-device-deprecated.c',
|
||||
'deprecated/clutter-layout-manager-deprecated.c',
|
||||
@@ -274,6 +279,7 @@ clutter_deprecated_sources = [
|
||||
'deprecated/clutter-state.c',
|
||||
'deprecated/clutter-table-layout.c',
|
||||
'deprecated/clutter-texture.c',
|
||||
'deprecated/clutter-timeout-pool.c',
|
||||
]
|
||||
|
||||
clutter_deprecated_private_headers = [
|
||||
|
||||
@@ -678,8 +678,8 @@ static gboolean
|
||||
check_onscreen_template (CoglRenderer *renderer,
|
||||
CoglSwapChain *swap_chain,
|
||||
CoglOnscreenTemplate *onscreen_template,
|
||||
gboolean enable_argb,
|
||||
gboolean enable_stereo,
|
||||
CoglBool enable_argb,
|
||||
CoglBool enable_stereo,
|
||||
GError **error)
|
||||
{
|
||||
GError *internal_error = NULL;
|
||||
|
||||
@@ -47,7 +47,7 @@ typedef struct _CoglPangoDisplayListRectangle CoglPangoDisplayListRectangle;
|
||||
|
||||
struct _CoglPangoDisplayList
|
||||
{
|
||||
gboolean color_override;
|
||||
CoglBool color_override;
|
||||
CoglColor color;
|
||||
GSList *nodes;
|
||||
GSList *last_node;
|
||||
@@ -65,7 +65,7 @@ struct _CoglPangoDisplayListNode
|
||||
{
|
||||
CoglPangoDisplayListNodeType type;
|
||||
|
||||
gboolean color_override;
|
||||
CoglBool color_override;
|
||||
CoglColor color;
|
||||
|
||||
CoglPipeline *pipeline;
|
||||
@@ -273,7 +273,7 @@ emit_vertex_buffer_geometry (CoglFramebuffer *fb,
|
||||
CoglAttributeBuffer *buffer;
|
||||
CoglVertexP2T2 *verts, *v;
|
||||
int n_verts;
|
||||
gboolean allocated = FALSE;
|
||||
CoglBool allocated = FALSE;
|
||||
CoglAttribute *attributes[2];
|
||||
CoglPrimitive *prim;
|
||||
int i;
|
||||
|
||||
@@ -153,7 +153,7 @@ cogl_pango_font_map_clear_glyph_cache (CoglPangoFontMap *fm)
|
||||
|
||||
void
|
||||
cogl_pango_font_map_set_use_mipmapping (CoglPangoFontMap *fm,
|
||||
gboolean value)
|
||||
CoglBool value)
|
||||
{
|
||||
PangoRenderer *renderer = _cogl_pango_font_map_get_renderer (fm);
|
||||
|
||||
@@ -161,7 +161,7 @@ cogl_pango_font_map_set_use_mipmapping (CoglPangoFontMap *fm,
|
||||
value);
|
||||
}
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_pango_font_map_get_use_mipmapping (CoglPangoFontMap *fm)
|
||||
{
|
||||
PangoRenderer *renderer = _cogl_pango_font_map_get_renderer (fm);
|
||||
|
||||
@@ -54,16 +54,16 @@ struct _CoglPangoGlyphCache
|
||||
/* TRUE if we've ever stored a texture in the global atlas. This is
|
||||
used to make sure we only register one callback to listen for
|
||||
global atlas reorganizations */
|
||||
gboolean using_global_atlas;
|
||||
CoglBool using_global_atlas;
|
||||
|
||||
/* True if some of the glyphs are dirty. This is used as an
|
||||
optimization in _cogl_pango_glyph_cache_set_dirty_glyphs to avoid
|
||||
iterating the hash table if we know none of them are dirty */
|
||||
gboolean has_dirty_glyphs;
|
||||
CoglBool has_dirty_glyphs;
|
||||
|
||||
/* Whether mipmapping is being used for this cache. This only
|
||||
affects whether we decide to put the glyph in the global atlas */
|
||||
gboolean use_mipmapping;
|
||||
CoglBool use_mipmapping;
|
||||
};
|
||||
|
||||
struct _CoglPangoGlyphCacheKey
|
||||
@@ -100,7 +100,7 @@ cogl_pango_glyph_cache_hash_func (const void *key)
|
||||
return GPOINTER_TO_UINT (cache_key->font) ^ cache_key->glyph;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
cogl_pango_glyph_cache_equal_func (const void *a, const void *b)
|
||||
{
|
||||
const CoglPangoGlyphCacheKey *key_a
|
||||
@@ -117,7 +117,7 @@ cogl_pango_glyph_cache_equal_func (const void *a, const void *b)
|
||||
|
||||
CoglPangoGlyphCache *
|
||||
cogl_pango_glyph_cache_new (CoglContext *ctx,
|
||||
gboolean use_mipmapping)
|
||||
CoglBool use_mipmapping)
|
||||
{
|
||||
CoglPangoGlyphCache *cache;
|
||||
|
||||
@@ -210,7 +210,7 @@ cogl_pango_glyph_cache_update_position_cb (void *user_data,
|
||||
value->dirty = TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
cogl_pango_glyph_cache_add_to_global_atlas (CoglPangoGlyphCache *cache,
|
||||
PangoFont *font,
|
||||
PangoGlyph glyph,
|
||||
@@ -259,7 +259,7 @@ cogl_pango_glyph_cache_add_to_global_atlas (CoglPangoGlyphCache *cache,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
cogl_pango_glyph_cache_add_to_local_atlas (CoglPangoGlyphCache *cache,
|
||||
PangoFont *font,
|
||||
PangoGlyph glyph,
|
||||
@@ -309,7 +309,7 @@ cogl_pango_glyph_cache_add_to_local_atlas (CoglPangoGlyphCache *cache,
|
||||
|
||||
CoglPangoGlyphCacheValue *
|
||||
cogl_pango_glyph_cache_lookup (CoglPangoGlyphCache *cache,
|
||||
gboolean create,
|
||||
CoglBool create,
|
||||
PangoFont *font,
|
||||
PangoGlyph glyph)
|
||||
{
|
||||
|
||||
@@ -58,7 +58,7 @@ struct _CoglPangoGlyphCacheValue
|
||||
|
||||
/* This will be set to TRUE when the glyph atlas is reorganized
|
||||
which means the glyph will need to be redrawn */
|
||||
gboolean dirty;
|
||||
CoglBool dirty;
|
||||
};
|
||||
|
||||
typedef void (* CoglPangoGlyphCacheDirtyFunc) (PangoFont *font,
|
||||
@@ -67,14 +67,14 @@ typedef void (* CoglPangoGlyphCacheDirtyFunc) (PangoFont *font,
|
||||
|
||||
CoglPangoGlyphCache *
|
||||
cogl_pango_glyph_cache_new (CoglContext *ctx,
|
||||
gboolean use_mipmapping);
|
||||
CoglBool use_mipmapping);
|
||||
|
||||
void
|
||||
cogl_pango_glyph_cache_free (CoglPangoGlyphCache *cache);
|
||||
|
||||
CoglPangoGlyphCacheValue *
|
||||
cogl_pango_glyph_cache_lookup (CoglPangoGlyphCache *cache,
|
||||
gboolean create,
|
||||
CoglBool create,
|
||||
PangoFont *font,
|
||||
PangoGlyph glyph);
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ _cogl_pango_pipeline_cache_value_destroy (void *data)
|
||||
|
||||
CoglPangoPipelineCache *
|
||||
_cogl_pango_pipeline_cache_new (CoglContext *ctx,
|
||||
gboolean use_mipmapping)
|
||||
CoglBool use_mipmapping)
|
||||
{
|
||||
CoglPangoPipelineCache *cache = g_new (CoglPangoPipelineCache, 1);
|
||||
|
||||
|
||||
@@ -49,13 +49,13 @@ typedef struct _CoglPangoPipelineCache
|
||||
CoglPipeline *base_texture_alpha_pipeline;
|
||||
CoglPipeline *base_texture_rgba_pipeline;
|
||||
|
||||
gboolean use_mipmapping;
|
||||
CoglBool use_mipmapping;
|
||||
} CoglPangoPipelineCache;
|
||||
|
||||
|
||||
CoglPangoPipelineCache *
|
||||
_cogl_pango_pipeline_cache_new (CoglContext *ctx,
|
||||
gboolean use_mipmapping);
|
||||
CoglBool use_mipmapping);
|
||||
|
||||
/* Returns a pipeline that can be used to render glyphs in the given
|
||||
texture. The pipeline has a new reference so it is up to the caller
|
||||
|
||||
@@ -48,8 +48,8 @@ _cogl_pango_renderer_clear_glyph_cache (CoglPangoRenderer *renderer);
|
||||
|
||||
void
|
||||
_cogl_pango_renderer_set_use_mipmapping (CoglPangoRenderer *renderer,
|
||||
gboolean value);
|
||||
gboolean
|
||||
CoglBool value);
|
||||
CoglBool
|
||||
_cogl_pango_renderer_get_use_mipmapping (CoglPangoRenderer *renderer);
|
||||
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ struct _CoglPangoRenderer
|
||||
CoglPangoRendererCaches no_mipmap_caches;
|
||||
CoglPangoRendererCaches mipmap_caches;
|
||||
|
||||
gboolean use_mipmapping;
|
||||
CoglBool use_mipmapping;
|
||||
|
||||
/* The current display list that is being built */
|
||||
CoglPangoDisplayList *display_list;
|
||||
@@ -102,7 +102,7 @@ struct _CoglPangoLayoutQdata
|
||||
/* Whether mipmapping was previously used to render this layout. We
|
||||
need to regenerate the display list if the mipmapping value is
|
||||
changed because it will be using a different set of textures */
|
||||
gboolean mipmapping_used;
|
||||
CoglBool mipmapping_used;
|
||||
};
|
||||
|
||||
static void
|
||||
@@ -534,12 +534,12 @@ _cogl_pango_renderer_clear_glyph_cache (CoglPangoRenderer *renderer)
|
||||
|
||||
void
|
||||
_cogl_pango_renderer_set_use_mipmapping (CoglPangoRenderer *renderer,
|
||||
gboolean value)
|
||||
CoglBool value)
|
||||
{
|
||||
renderer->use_mipmapping = value;
|
||||
}
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
_cogl_pango_renderer_get_use_mipmapping (CoglPangoRenderer *renderer)
|
||||
{
|
||||
return renderer->use_mipmapping;
|
||||
@@ -547,7 +547,7 @@ _cogl_pango_renderer_get_use_mipmapping (CoglPangoRenderer *renderer)
|
||||
|
||||
static CoglPangoGlyphCacheValue *
|
||||
cogl_pango_renderer_get_cached_glyph (PangoRenderer *renderer,
|
||||
gboolean create,
|
||||
CoglBool create,
|
||||
PangoFont *font,
|
||||
PangoGlyph glyph)
|
||||
{
|
||||
|
||||
@@ -144,7 +144,7 @@ cogl_pango_ensure_glyph_cache_for_layout (PangoLayout *layout);
|
||||
*/
|
||||
void
|
||||
cogl_pango_font_map_set_use_mipmapping (CoglPangoFontMap *font_map,
|
||||
gboolean value);
|
||||
CoglBool value);
|
||||
|
||||
/**
|
||||
* cogl_pango_font_map_get_use_mipmapping:
|
||||
@@ -157,7 +157,7 @@ cogl_pango_font_map_set_use_mipmapping (CoglPangoFontMap *font_map,
|
||||
*
|
||||
* Since: 1.0
|
||||
*/
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_pango_font_map_get_use_mipmapping (CoglPangoFontMap *font_map);
|
||||
|
||||
/**
|
||||
|
||||
@@ -96,7 +96,7 @@ cogl_path_copy (CoglPath *path);
|
||||
*
|
||||
* Since: 2.0
|
||||
*/
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_is_path (void *object);
|
||||
|
||||
#define cogl_path_move_to cogl2_path_move_to
|
||||
|
||||
@@ -105,13 +105,13 @@ struct _CoglPathData
|
||||
case and divert to the journal or a rectangle clip. If it is TRUE
|
||||
then the entire path can be described by calling
|
||||
_cogl_path_get_bounds */
|
||||
gboolean is_rectangle;
|
||||
CoglBool is_rectangle;
|
||||
};
|
||||
|
||||
void
|
||||
_cogl_add_path_to_stencil_buffer (CoglPath *path,
|
||||
gboolean merge,
|
||||
gboolean need_clear);
|
||||
CoglBool merge,
|
||||
CoglBool need_clear);
|
||||
|
||||
void
|
||||
_cogl_path_get_bounds (CoglPath *path,
|
||||
@@ -120,7 +120,7 @@ _cogl_path_get_bounds (CoglPath *path,
|
||||
float *max_x,
|
||||
float *max_y);
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
_cogl_path_is_rectangle (CoglPath *path);
|
||||
|
||||
#endif /* __COGL_PATH_PRIVATE_H */
|
||||
|
||||
@@ -169,7 +169,7 @@ cogl2_path_get_fill_rule (CoglPath *path)
|
||||
|
||||
static void
|
||||
_cogl_path_add_node (CoglPath *path,
|
||||
gboolean new_sub_path,
|
||||
CoglBool new_sub_path,
|
||||
float x,
|
||||
float y)
|
||||
{
|
||||
@@ -299,7 +299,7 @@ _cogl_path_fill_nodes_with_clipped_rectangle (CoglPath *path,
|
||||
/* We need at least three stencil bits to combine clips */
|
||||
if (_cogl_framebuffer_get_stencil_bits (framebuffer) >= 3)
|
||||
{
|
||||
static gboolean seen_warning = FALSE;
|
||||
static CoglBool seen_warning = FALSE;
|
||||
|
||||
if (!seen_warning)
|
||||
{
|
||||
@@ -320,10 +320,10 @@ _cogl_path_fill_nodes_with_clipped_rectangle (CoglPath *path,
|
||||
cogl_framebuffer_pop_clip (framebuffer);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
validate_layer_cb (CoglPipelineLayer *layer, void *user_data)
|
||||
{
|
||||
gboolean *needs_fallback = user_data;
|
||||
CoglBool *needs_fallback = user_data;
|
||||
CoglTexture *texture = _cogl_pipeline_layer_get_texture (layer);
|
||||
|
||||
/* If any of the layers of the current pipeline contain sliced
|
||||
@@ -365,7 +365,7 @@ _cogl_path_fill_nodes (CoglPath *path,
|
||||
}
|
||||
else
|
||||
{
|
||||
gboolean needs_fallback = FALSE;
|
||||
CoglBool needs_fallback = FALSE;
|
||||
CoglPrimitive *primitive;
|
||||
|
||||
_cogl_pipeline_foreach_layer_internal (pipeline,
|
||||
@@ -538,7 +538,7 @@ cogl2_path_rectangle (CoglPath *path,
|
||||
float x_2,
|
||||
float y_2)
|
||||
{
|
||||
gboolean is_rectangle;
|
||||
CoglBool is_rectangle;
|
||||
|
||||
/* If the path was previously empty and the rectangle isn't mirrored
|
||||
then we'll record that this is a simple rectangle path so that we
|
||||
@@ -556,7 +556,7 @@ cogl2_path_rectangle (CoglPath *path,
|
||||
path->data->is_rectangle = is_rectangle;
|
||||
}
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
_cogl_path_is_rectangle (CoglPath *path)
|
||||
{
|
||||
return path->data->is_rectangle;
|
||||
|
||||
@@ -63,7 +63,7 @@ struct _CoglAtlasTexture
|
||||
|
||||
CoglAtlasTexture *
|
||||
_cogl_atlas_texture_new_from_bitmap (CoglBitmap *bmp,
|
||||
gboolean can_convert_in_place);
|
||||
CoglBool can_convert_in_place);
|
||||
|
||||
void
|
||||
_cogl_atlas_texture_add_reorganize_callback (CoglContext *ctx,
|
||||
@@ -75,7 +75,7 @@ _cogl_atlas_texture_remove_reorganize_callback (CoglContext *ctx,
|
||||
GHookFunc callback,
|
||||
void *user_data);
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
_cogl_is_atlas_texture (void *object);
|
||||
|
||||
#endif /* _COGL_ATLAS_TEXTURE_PRIVATE_H_ */
|
||||
|
||||
@@ -299,7 +299,7 @@ _cogl_atlas_texture_get_max_waste (CoglTexture *tex)
|
||||
return cogl_texture_get_max_waste (atlas_tex->sub_texture);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
_cogl_atlas_texture_is_sliced (CoglTexture *tex)
|
||||
{
|
||||
CoglAtlasTexture *atlas_tex = COGL_ATLAS_TEXTURE (tex);
|
||||
@@ -308,7 +308,7 @@ _cogl_atlas_texture_is_sliced (CoglTexture *tex)
|
||||
return cogl_texture_is_sliced (atlas_tex->sub_texture);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
_cogl_atlas_texture_can_hardware_repeat (CoglTexture *tex)
|
||||
{
|
||||
CoglAtlasTexture *atlas_tex = COGL_ATLAS_TEXTURE (tex);
|
||||
@@ -339,7 +339,7 @@ _cogl_atlas_texture_transform_quad_coords_to_gl (CoglTexture *tex,
|
||||
coords);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
_cogl_atlas_texture_get_gl_texture (CoglTexture *tex,
|
||||
GLuint *out_gl_handle,
|
||||
GLenum *out_gl_target)
|
||||
@@ -444,7 +444,7 @@ _cogl_atlas_texture_ensure_non_quad_rendering (CoglTexture *tex)
|
||||
_cogl_texture_ensure_non_quad_rendering (atlas_tex->sub_texture);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
_cogl_atlas_texture_set_region_with_border (CoglAtlasTexture *atlas_tex,
|
||||
int src_x,
|
||||
int src_y,
|
||||
@@ -523,7 +523,7 @@ static CoglBitmap *
|
||||
_cogl_atlas_texture_convert_bitmap_for_upload (CoglAtlasTexture *atlas_tex,
|
||||
CoglBitmap *bmp,
|
||||
CoglPixelFormat internal_format,
|
||||
gboolean can_convert_in_place,
|
||||
CoglBool can_convert_in_place,
|
||||
CoglError **error)
|
||||
{
|
||||
CoglBitmap *upload_bmp;
|
||||
@@ -564,7 +564,7 @@ _cogl_atlas_texture_convert_bitmap_for_upload (CoglAtlasTexture *atlas_tex,
|
||||
return override_bmp;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
_cogl_atlas_texture_set_region (CoglTexture *tex,
|
||||
int src_x,
|
||||
int src_y,
|
||||
@@ -585,7 +585,7 @@ _cogl_atlas_texture_set_region (CoglTexture *tex,
|
||||
pixels to the border */
|
||||
if (atlas_tex->atlas)
|
||||
{
|
||||
gboolean ret;
|
||||
CoglBool ret;
|
||||
CoglBitmap *upload_bmp =
|
||||
_cogl_atlas_texture_convert_bitmap_for_upload (atlas_tex,
|
||||
bmp,
|
||||
@@ -639,7 +639,7 @@ _cogl_atlas_texture_get_gl_format (CoglTexture *tex)
|
||||
return _cogl_texture_gl_get_format (atlas_tex->sub_texture);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
_cogl_atlas_texture_can_use_format (CoglPixelFormat format)
|
||||
{
|
||||
/* We don't care about the ordering or the premult status and we can
|
||||
@@ -706,7 +706,7 @@ cogl_atlas_texture_new_with_size (CoglContext *ctx,
|
||||
loader);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
allocate_space (CoglAtlasTexture *atlas_tex,
|
||||
int width,
|
||||
int height,
|
||||
@@ -792,7 +792,7 @@ allocate_space (CoglAtlasTexture *atlas_tex,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
allocate_with_size (CoglAtlasTexture *atlas_tex,
|
||||
CoglTextureLoader *loader,
|
||||
CoglError **error)
|
||||
@@ -817,7 +817,7 @@ allocate_with_size (CoglAtlasTexture *atlas_tex,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
allocate_from_bitmap (CoglAtlasTexture *atlas_tex,
|
||||
CoglTextureLoader *loader,
|
||||
CoglError **error)
|
||||
@@ -827,7 +827,7 @@ allocate_from_bitmap (CoglAtlasTexture *atlas_tex,
|
||||
CoglPixelFormat bmp_format = cogl_bitmap_get_format (bmp);
|
||||
int width = cogl_bitmap_get_width (bmp);
|
||||
int height = cogl_bitmap_get_height (bmp);
|
||||
gboolean can_convert_in_place = loader->src.bitmap.can_convert_in_place;
|
||||
CoglBool can_convert_in_place = loader->src.bitmap.can_convert_in_place;
|
||||
CoglPixelFormat internal_format;
|
||||
CoglBitmap *upload_bmp;
|
||||
|
||||
@@ -878,7 +878,7 @@ allocate_from_bitmap (CoglAtlasTexture *atlas_tex,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
_cogl_atlas_texture_allocate (CoglTexture *tex,
|
||||
CoglError **error)
|
||||
{
|
||||
@@ -902,7 +902,7 @@ _cogl_atlas_texture_allocate (CoglTexture *tex,
|
||||
|
||||
CoglAtlasTexture *
|
||||
_cogl_atlas_texture_new_from_bitmap (CoglBitmap *bmp,
|
||||
gboolean can_convert_in_place)
|
||||
CoglBool can_convert_in_place)
|
||||
{
|
||||
CoglTextureLoader *loader;
|
||||
|
||||
|
||||
@@ -246,7 +246,7 @@ cogl_atlas_texture_new_from_bitmap (CoglBitmap *bmp);
|
||||
* Since: 1.16
|
||||
* Stability: Unstable
|
||||
*/
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_is_atlas_texture (void *object);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
@@ -362,7 +362,7 @@ _cogl_atlas_notify_post_reorganize (CoglAtlas *atlas)
|
||||
g_hook_list_invoke (&atlas->post_reorganize_callbacks, FALSE);
|
||||
}
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
_cogl_atlas_reserve_space (CoglAtlas *atlas,
|
||||
unsigned int width,
|
||||
unsigned int height,
|
||||
@@ -372,7 +372,7 @@ _cogl_atlas_reserve_space (CoglAtlas *atlas,
|
||||
CoglRectangleMap *new_map;
|
||||
CoglTexture2D *new_tex;
|
||||
unsigned int map_width = 0, map_height = 0;
|
||||
gboolean ret;
|
||||
CoglBool ret;
|
||||
CoglRectangleMapEntry new_position;
|
||||
|
||||
/* Check if we can fit the rectangle into the existing map */
|
||||
|
||||
@@ -69,7 +69,7 @@ _cogl_atlas_new (CoglPixelFormat texture_format,
|
||||
CoglAtlasFlags flags,
|
||||
CoglAtlasUpdatePositionCallback update_position_cb);
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
_cogl_atlas_reserve_space (CoglAtlas *atlas,
|
||||
unsigned int width,
|
||||
unsigned int height,
|
||||
@@ -99,7 +99,7 @@ _cogl_atlas_remove_reorganize_callback (CoglAtlas *atlas,
|
||||
GHookFunc post_callback,
|
||||
void *user_data);
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
_cogl_is_atlas (void *object);
|
||||
|
||||
#endif /* __COGL_ATLAS_H */
|
||||
|
||||
@@ -139,7 +139,7 @@ cogl_attribute_buffer_new (CoglContext *context,
|
||||
* Since: 1.4
|
||||
* Stability: Unstable
|
||||
*/
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_is_attribute_buffer (void *object);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
@@ -55,7 +55,7 @@ typedef struct _CoglAttributeNameState
|
||||
const char *name;
|
||||
CoglAttributeNameID name_id;
|
||||
int name_index;
|
||||
gboolean normalized_default;
|
||||
CoglBool normalized_default;
|
||||
int layer_number;
|
||||
} CoglAttributeNameState;
|
||||
|
||||
@@ -64,9 +64,9 @@ struct _CoglAttribute
|
||||
CoglObject _parent;
|
||||
|
||||
const CoglAttributeNameState *name_state;
|
||||
gboolean normalized;
|
||||
CoglBool normalized;
|
||||
|
||||
gboolean is_buffered;
|
||||
CoglBool is_buffered;
|
||||
|
||||
union {
|
||||
struct {
|
||||
|
||||
@@ -65,11 +65,11 @@ static void _cogl_attribute_free (CoglAttribute *attribute);
|
||||
COGL_OBJECT_DEFINE (Attribute, attribute);
|
||||
COGL_GTYPE_DEFINE_CLASS (Attribute, attribute);
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
validate_cogl_attribute_name (const char *name,
|
||||
const char **real_attribute_name,
|
||||
CoglAttributeNameID *name_id,
|
||||
gboolean *normalized,
|
||||
CoglBool *normalized,
|
||||
int *layer_number)
|
||||
{
|
||||
name = name + 5; /* skip "cogl_" */
|
||||
@@ -166,7 +166,7 @@ error:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
validate_n_components (const CoglAttributeNameState *name_state,
|
||||
int n_components)
|
||||
{
|
||||
@@ -271,7 +271,7 @@ _cogl_attribute_new_const (CoglContext *context,
|
||||
const char *name,
|
||||
int n_components,
|
||||
int n_columns,
|
||||
gboolean transpose,
|
||||
CoglBool transpose,
|
||||
const float *value)
|
||||
{
|
||||
CoglAttribute *attribute = g_slice_new (CoglAttribute);
|
||||
@@ -428,7 +428,7 @@ CoglAttribute *
|
||||
cogl_attribute_new_const_2x2fv (CoglContext *context,
|
||||
const char *name,
|
||||
const float *matrix2x2,
|
||||
gboolean transpose)
|
||||
CoglBool transpose)
|
||||
{
|
||||
return _cogl_attribute_new_const (context,
|
||||
name,
|
||||
@@ -442,7 +442,7 @@ CoglAttribute *
|
||||
cogl_attribute_new_const_3x3fv (CoglContext *context,
|
||||
const char *name,
|
||||
const float *matrix3x3,
|
||||
gboolean transpose)
|
||||
CoglBool transpose)
|
||||
{
|
||||
return _cogl_attribute_new_const (context,
|
||||
name,
|
||||
@@ -456,7 +456,7 @@ CoglAttribute *
|
||||
cogl_attribute_new_const_4x4fv (CoglContext *context,
|
||||
const char *name,
|
||||
const float *matrix4x4,
|
||||
gboolean transpose)
|
||||
CoglBool transpose)
|
||||
{
|
||||
return _cogl_attribute_new_const (context,
|
||||
name,
|
||||
@@ -466,7 +466,7 @@ cogl_attribute_new_const_4x4fv (CoglContext *context,
|
||||
matrix4x4);
|
||||
}
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_attribute_get_normalized (CoglAttribute *attribute)
|
||||
{
|
||||
_COGL_RETURN_VAL_IF_FAIL (cogl_is_attribute (attribute), FALSE);
|
||||
@@ -477,7 +477,7 @@ cogl_attribute_get_normalized (CoglAttribute *attribute)
|
||||
static void
|
||||
warn_about_midscene_changes (void)
|
||||
{
|
||||
static gboolean seen = FALSE;
|
||||
static CoglBool seen = FALSE;
|
||||
if (!seen)
|
||||
{
|
||||
g_warning ("Mid-scene modification of attributes has "
|
||||
@@ -488,7 +488,7 @@ warn_about_midscene_changes (void)
|
||||
|
||||
void
|
||||
cogl_attribute_set_normalized (CoglAttribute *attribute,
|
||||
gboolean normalized)
|
||||
CoglBool normalized)
|
||||
{
|
||||
_COGL_RETURN_IF_FAIL (cogl_is_attribute (attribute));
|
||||
|
||||
@@ -558,7 +558,7 @@ _cogl_attribute_free (CoglAttribute *attribute)
|
||||
g_slice_free (CoglAttribute, attribute);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
validate_layer_cb (CoglPipeline *pipeline,
|
||||
int layer_index,
|
||||
void *user_data)
|
||||
@@ -566,7 +566,7 @@ validate_layer_cb (CoglPipeline *pipeline,
|
||||
CoglTexture *texture =
|
||||
cogl_pipeline_get_layer_texture (pipeline, layer_index);
|
||||
CoglFlushLayerState *state = user_data;
|
||||
gboolean status = TRUE;
|
||||
CoglBool status = TRUE;
|
||||
|
||||
/* invalid textures will be handled correctly in
|
||||
* _cogl_pipeline_flush_layers_gl_state */
|
||||
|
||||
@@ -402,7 +402,7 @@ CoglAttribute *
|
||||
cogl_attribute_new_const_2x2fv (CoglContext *context,
|
||||
const char *name,
|
||||
const float *matrix2x2,
|
||||
gboolean transpose);
|
||||
CoglBool transpose);
|
||||
|
||||
/**
|
||||
* cogl_attribute_new_const_3x3fv:
|
||||
@@ -437,7 +437,7 @@ CoglAttribute *
|
||||
cogl_attribute_new_const_3x3fv (CoglContext *context,
|
||||
const char *name,
|
||||
const float *matrix3x3,
|
||||
gboolean transpose);
|
||||
CoglBool transpose);
|
||||
|
||||
/**
|
||||
* cogl_attribute_new_const_4x4fv:
|
||||
@@ -472,7 +472,7 @@ CoglAttribute *
|
||||
cogl_attribute_new_const_4x4fv (CoglContext *context,
|
||||
const char *name,
|
||||
const float *matrix4x4,
|
||||
gboolean transpose);
|
||||
CoglBool transpose);
|
||||
|
||||
/**
|
||||
* cogl_attribute_set_normalized:
|
||||
@@ -494,7 +494,7 @@ cogl_attribute_new_const_4x4fv (CoglContext *context,
|
||||
*/
|
||||
void
|
||||
cogl_attribute_set_normalized (CoglAttribute *attribute,
|
||||
gboolean normalized);
|
||||
CoglBool normalized);
|
||||
|
||||
/**
|
||||
* cogl_attribute_get_normalized:
|
||||
@@ -506,7 +506,7 @@ cogl_attribute_set_normalized (CoglAttribute *attribute,
|
||||
* Stability: unstable
|
||||
* Since: 1.10
|
||||
*/
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_attribute_get_normalized (CoglAttribute *attribute);
|
||||
|
||||
/**
|
||||
@@ -545,7 +545,7 @@ cogl_attribute_set_buffer (CoglAttribute *attribute,
|
||||
* Return value: %TRUE if the @object references a #CoglAttribute,
|
||||
* %FALSE otherwise
|
||||
*/
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_is_attribute (void *object);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
@@ -289,7 +289,7 @@ _cogl_bitmap_premult_unpacked_span_16 (uint16_t *data,
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
_cogl_bitmap_can_fast_premult (CoglPixelFormat format)
|
||||
{
|
||||
switch (format & ~COGL_PREMULT_BIT)
|
||||
@@ -305,7 +305,7 @@ _cogl_bitmap_can_fast_premult (CoglPixelFormat format)
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
_cogl_bitmap_needs_short_temp_buffer (CoglPixelFormat format)
|
||||
{
|
||||
/* If the format is using more than 8 bits per component then we'll
|
||||
@@ -358,7 +358,7 @@ _cogl_bitmap_needs_short_temp_buffer (CoglPixelFormat format)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
_cogl_bitmap_convert_into_bitmap (CoglBitmap *src_bmp,
|
||||
CoglBitmap *dst_bmp,
|
||||
CoglError **error)
|
||||
@@ -374,8 +374,8 @@ _cogl_bitmap_convert_into_bitmap (CoglBitmap *src_bmp,
|
||||
int width, height;
|
||||
CoglPixelFormat src_format;
|
||||
CoglPixelFormat dst_format;
|
||||
gboolean use_16;
|
||||
gboolean need_premult;
|
||||
CoglBool use_16;
|
||||
CoglBool need_premult;
|
||||
|
||||
src_format = cogl_bitmap_get_format (src_bmp);
|
||||
src_rowstride = cogl_bitmap_get_rowstride (src_bmp);
|
||||
@@ -514,7 +514,7 @@ _cogl_bitmap_convert (CoglBitmap *src_bmp,
|
||||
return dst_bmp;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
driver_can_convert (CoglContext *ctx,
|
||||
CoglPixelFormat src_format,
|
||||
CoglPixelFormat internal_format)
|
||||
@@ -546,7 +546,7 @@ driver_can_convert (CoglContext *ctx,
|
||||
CoglBitmap *
|
||||
_cogl_bitmap_convert_for_upload (CoglBitmap *src_bmp,
|
||||
CoglPixelFormat internal_format,
|
||||
gboolean can_convert_in_place,
|
||||
CoglBool can_convert_in_place,
|
||||
CoglError **error)
|
||||
{
|
||||
CoglContext *ctx = _cogl_bitmap_get_context (src_bmp);
|
||||
@@ -614,7 +614,7 @@ _cogl_bitmap_convert_for_upload (CoglBitmap *src_bmp,
|
||||
return dst_bmp;
|
||||
}
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
_cogl_bitmap_unpremult (CoglBitmap *bmp,
|
||||
CoglError **error)
|
||||
{
|
||||
@@ -682,7 +682,7 @@ _cogl_bitmap_unpremult (CoglBitmap *bmp,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
_cogl_bitmap_premult (CoglBitmap *bmp,
|
||||
CoglError **error)
|
||||
{
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
_cogl_bitmap_get_size_from_file (const char *filename,
|
||||
int *width,
|
||||
int *height)
|
||||
@@ -60,7 +60,7 @@ _cogl_bitmap_from_file (CoglContext *ctx,
|
||||
{
|
||||
static CoglUserDataKey pixbuf_key;
|
||||
GdkPixbuf *pixbuf;
|
||||
gboolean has_alpha;
|
||||
CoglBool has_alpha;
|
||||
GdkColorspace color_space;
|
||||
CoglPixelFormat pixel_format;
|
||||
int width;
|
||||
|
||||
@@ -51,8 +51,8 @@ struct _CoglBitmap
|
||||
|
||||
uint8_t *data;
|
||||
|
||||
gboolean mapped;
|
||||
gboolean bound;
|
||||
CoglBool mapped;
|
||||
CoglBool bound;
|
||||
|
||||
/* If this is non-null then 'data' is ignored and instead it is
|
||||
fetched from this shared bitmap. */
|
||||
@@ -109,10 +109,10 @@ _cogl_bitmap_convert (CoglBitmap *bmp,
|
||||
CoglBitmap *
|
||||
_cogl_bitmap_convert_for_upload (CoglBitmap *src_bmp,
|
||||
CoglPixelFormat internal_format,
|
||||
gboolean can_convert_in_place,
|
||||
CoglBool can_convert_in_place,
|
||||
CoglError **error);
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
_cogl_bitmap_convert_into_bitmap (CoglBitmap *src_bmp,
|
||||
CoglBitmap *dst_bmp,
|
||||
CoglError **error);
|
||||
@@ -122,20 +122,20 @@ _cogl_bitmap_from_file (CoglContext *ctx,
|
||||
const char *filename,
|
||||
CoglError **error);
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
_cogl_bitmap_unpremult (CoglBitmap *dst_bmp,
|
||||
CoglError **error);
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
_cogl_bitmap_premult (CoglBitmap *dst_bmp,
|
||||
CoglError **error);
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
_cogl_bitmap_convert_premult_status (CoglBitmap *bmp,
|
||||
CoglPixelFormat dst_format,
|
||||
CoglError **error);
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
_cogl_bitmap_copy_subregion (CoglBitmap *src,
|
||||
CoglBitmap *dst,
|
||||
int src_x,
|
||||
@@ -151,7 +151,7 @@ CoglBitmap *
|
||||
_cogl_bitmap_copy (CoglBitmap *src_bmp,
|
||||
CoglError **error);
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
_cogl_bitmap_get_size_from_file (const char *filename,
|
||||
int *width,
|
||||
int *height);
|
||||
|
||||
@@ -63,7 +63,7 @@ _cogl_bitmap_free (CoglBitmap *bmp)
|
||||
g_slice_free (CoglBitmap, bmp);
|
||||
}
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
_cogl_bitmap_convert_premult_status (CoglBitmap *bmp,
|
||||
CoglPixelFormat dst_format,
|
||||
CoglError **error)
|
||||
@@ -115,7 +115,7 @@ _cogl_bitmap_copy (CoglBitmap *src_bmp,
|
||||
return dst_bmp;
|
||||
}
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
_cogl_bitmap_copy_subregion (CoglBitmap *src,
|
||||
CoglBitmap *dst,
|
||||
int src_x,
|
||||
@@ -130,7 +130,7 @@ _cogl_bitmap_copy_subregion (CoglBitmap *src,
|
||||
uint8_t *dstdata;
|
||||
int bpp;
|
||||
int line;
|
||||
gboolean succeeded = FALSE;
|
||||
CoglBool succeeded = FALSE;
|
||||
|
||||
/* Intended only for fast copies when format is equal! */
|
||||
_COGL_RETURN_VAL_IF_FAIL ((src->format & ~COGL_PREMULT_BIT) ==
|
||||
@@ -165,7 +165,7 @@ _cogl_bitmap_copy_subregion (CoglBitmap *src,
|
||||
return succeeded;
|
||||
}
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_bitmap_get_size_from_file (const char *filename,
|
||||
int *width,
|
||||
int *height)
|
||||
|
||||
@@ -246,7 +246,7 @@ cogl_bitmap_get_buffer (CoglBitmap *bitmap);
|
||||
*
|
||||
* Since: 1.0
|
||||
*/
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_bitmap_get_size_from_file (const char *filename,
|
||||
int *width,
|
||||
int *height);
|
||||
@@ -262,7 +262,7 @@ cogl_bitmap_get_size_from_file (const char *filename,
|
||||
*
|
||||
* Since: 1.0
|
||||
*/
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_is_bitmap (void *object);
|
||||
|
||||
/**
|
||||
|
||||
@@ -56,7 +56,7 @@ _COGL_STATIC_ASSERT (sizeof (unsigned long) <= sizeof (void *),
|
||||
#define BIT_MASK(bit_num) \
|
||||
(1UL << BIT_INDEX (bit_num))
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
_cogl_bitmask_get_from_array (const CoglBitmask *bitmask,
|
||||
unsigned int bit_num)
|
||||
{
|
||||
@@ -90,7 +90,7 @@ _cogl_bitmask_convert_to_array (CoglBitmask *bitmask)
|
||||
void
|
||||
_cogl_bitmask_set_in_array (CoglBitmask *bitmask,
|
||||
unsigned int bit_num,
|
||||
gboolean value)
|
||||
CoglBool value)
|
||||
{
|
||||
GArray *array;
|
||||
unsigned int array_index;
|
||||
@@ -154,7 +154,7 @@ _cogl_bitmask_set_bits (CoglBitmask *dst,
|
||||
void
|
||||
_cogl_bitmask_set_range_in_array (CoglBitmask *bitmask,
|
||||
unsigned int n_bits,
|
||||
gboolean value)
|
||||
CoglBool value)
|
||||
{
|
||||
GArray *array;
|
||||
unsigned int array_index, bit_index;
|
||||
@@ -326,7 +326,7 @@ typedef struct
|
||||
int *bits;
|
||||
} CheckData;
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
check_bit (int bit_num, void *user_data)
|
||||
{
|
||||
CheckData *data = user_data;
|
||||
|
||||
@@ -90,19 +90,19 @@ typedef struct _CoglBitmaskImaginaryType *CoglBitmask;
|
||||
#define _cogl_bitmask_init(bitmask) \
|
||||
G_STMT_START { *(bitmask) = _cogl_bitmask_from_bits (0); } G_STMT_END
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
_cogl_bitmask_get_from_array (const CoglBitmask *bitmask,
|
||||
unsigned int bit_num);
|
||||
|
||||
void
|
||||
_cogl_bitmask_set_in_array (CoglBitmask *bitmask,
|
||||
unsigned int bit_num,
|
||||
gboolean value);
|
||||
CoglBool value);
|
||||
|
||||
void
|
||||
_cogl_bitmask_set_range_in_array (CoglBitmask *bitmask,
|
||||
unsigned int n_bits,
|
||||
gboolean value);
|
||||
CoglBool value);
|
||||
|
||||
void
|
||||
_cogl_bitmask_clear_all_in_array (CoglBitmask *bitmask);
|
||||
@@ -143,7 +143,7 @@ _cogl_bitmask_xor_bits (CoglBitmask *dst,
|
||||
const CoglBitmask *src);
|
||||
|
||||
/* The foreach function can return FALSE to stop iteration */
|
||||
typedef gboolean (* CoglBitmaskForeachFunc) (int bit_num, void *user_data);
|
||||
typedef CoglBool (* CoglBitmaskForeachFunc) (int bit_num, void *user_data);
|
||||
|
||||
/*
|
||||
* cogl_bitmask_foreach:
|
||||
@@ -165,7 +165,7 @@ _cogl_bitmask_foreach (const CoglBitmask *bitmask,
|
||||
*
|
||||
* Return value: whether bit number @bit_num is set in @bitmask
|
||||
*/
|
||||
static inline gboolean
|
||||
static inline CoglBool
|
||||
_cogl_bitmask_get (const CoglBitmask *bitmask, unsigned int bit_num)
|
||||
{
|
||||
if (_cogl_bitmask_has_array (bitmask))
|
||||
@@ -185,7 +185,7 @@ _cogl_bitmask_get (const CoglBitmask *bitmask, unsigned int bit_num)
|
||||
* Sets or resets a bit number @bit_num in @bitmask according to @value.
|
||||
*/
|
||||
static inline void
|
||||
_cogl_bitmask_set (CoglBitmask *bitmask, unsigned int bit_num, gboolean value)
|
||||
_cogl_bitmask_set (CoglBitmask *bitmask, unsigned int bit_num, CoglBool value)
|
||||
{
|
||||
if (_cogl_bitmask_has_array (bitmask) ||
|
||||
bit_num >= COGL_BITMASK_MAX_DIRECT_BITS)
|
||||
@@ -209,7 +209,7 @@ _cogl_bitmask_set (CoglBitmask *bitmask, unsigned int bit_num, gboolean value)
|
||||
static inline void
|
||||
_cogl_bitmask_set_range (CoglBitmask *bitmask,
|
||||
unsigned int n_bits,
|
||||
gboolean value)
|
||||
CoglBool value)
|
||||
{
|
||||
if (_cogl_bitmask_has_array (bitmask) ||
|
||||
n_bits > COGL_BITMASK_MAX_DIRECT_BITS)
|
||||
|
||||
@@ -163,7 +163,7 @@ _cogl_blend_string_split_rgba_statement (CoglBlendStringStatement *statement,
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
validate_tex_combine_statements (CoglBlendStringStatement *statements,
|
||||
int n_statements,
|
||||
CoglError **error)
|
||||
@@ -209,7 +209,7 @@ error:
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
validate_blend_statements (CoglBlendStringStatement *statements,
|
||||
int n_statements,
|
||||
CoglError **error)
|
||||
@@ -273,7 +273,7 @@ error:
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
validate_statements_for_context (CoglBlendStringStatement *statements,
|
||||
int n_statements,
|
||||
CoglBlendStringContext context,
|
||||
@@ -445,19 +445,19 @@ get_color_src_info (const char *mark,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
is_symbol_char (const char c)
|
||||
{
|
||||
return (g_ascii_isalpha (c) || c == '_') ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
is_alphanum_char (const char c)
|
||||
{
|
||||
return (g_ascii_isalnum (c) || c == '_') ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
parse_argument (const char *string, /* original user string */
|
||||
const char **ret_p, /* start of argument IN:OUT */
|
||||
const CoglBlendStringStatement *statement,
|
||||
@@ -470,8 +470,8 @@ parse_argument (const char *string, /* original user string */
|
||||
const char *mark = NULL;
|
||||
const char *error_string = NULL;
|
||||
ParserArgState state = PARSER_ARG_STATE_START;
|
||||
gboolean parsing_factor = FALSE;
|
||||
gboolean implicit_factor_brace = FALSE;
|
||||
CoglBool parsing_factor = FALSE;
|
||||
CoglBool implicit_factor_brace = FALSE;
|
||||
|
||||
arg->source.is_zero = FALSE;
|
||||
arg->source.info = NULL;
|
||||
|
||||
@@ -77,18 +77,18 @@ typedef struct _CoglBlendStringColorSourceInfo
|
||||
|
||||
typedef struct _CoglBlendStringColorSource
|
||||
{
|
||||
gboolean is_zero;
|
||||
CoglBool is_zero;
|
||||
const CoglBlendStringColorSourceInfo *info;
|
||||
int texture; /* for the TEXTURE_N color source */
|
||||
gboolean one_minus;
|
||||
CoglBool one_minus;
|
||||
CoglBlendStringChannelMask mask;
|
||||
} CoglBlendStringColorSource;
|
||||
|
||||
typedef struct _CoglBlendStringFactor
|
||||
{
|
||||
gboolean is_one;
|
||||
gboolean is_src_alpha_saturate;
|
||||
gboolean is_color;
|
||||
CoglBool is_one;
|
||||
CoglBool is_src_alpha_saturate;
|
||||
CoglBool is_color;
|
||||
CoglBlendStringColorSource source;
|
||||
} CoglBlendStringFactor;
|
||||
|
||||
@@ -129,7 +129,7 @@ typedef struct _CoglBlendStringStatement
|
||||
} CoglBlendStringStatement;
|
||||
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
_cogl_blend_string_compile (const char *string,
|
||||
CoglBlendStringContext context,
|
||||
CoglBlendStringStatement *statements,
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
static const CoglBlitMode *_cogl_blit_default_mode = NULL;
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
_cogl_blit_texture_render_begin (CoglBlitData *data)
|
||||
{
|
||||
CoglContext *ctx = data->src_tex->context;
|
||||
@@ -144,7 +144,7 @@ _cogl_blit_texture_render_end (CoglBlitData *data)
|
||||
cogl_object_unref (data->dest_fb);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
_cogl_blit_framebuffer_begin (CoglBlitData *data)
|
||||
{
|
||||
CoglContext *ctx = data->src_tex->context;
|
||||
@@ -219,7 +219,7 @@ _cogl_blit_framebuffer_end (CoglBlitData *data)
|
||||
cogl_object_unref (data->dest_fb);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
_cogl_blit_copy_tex_sub_image_begin (CoglBlitData *data)
|
||||
{
|
||||
CoglOffscreen *offscreen;
|
||||
@@ -269,7 +269,7 @@ _cogl_blit_copy_tex_sub_image_end (CoglBlitData *data)
|
||||
cogl_object_unref (data->src_fb);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
_cogl_blit_get_tex_data_begin (CoglBlitData *data)
|
||||
{
|
||||
data->format = _cogl_texture_get_format (data->src_tex);
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
typedef struct _CoglBlitData CoglBlitData;
|
||||
|
||||
typedef gboolean (* CoglBlitBeginFunc) (CoglBlitData *data);
|
||||
typedef CoglBool (* CoglBlitBeginFunc) (CoglBlitData *data);
|
||||
typedef void (* CoglBlitEndFunc) (CoglBlitData *data);
|
||||
|
||||
typedef void (* CoglBlitFunc) (CoglBlitData *data,
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#include "cogl-context-private.h"
|
||||
#include "driver/gl/cogl-util-gl-private.h"
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
_cogl_boxed_value_equal (const CoglBoxedValue *bva,
|
||||
const CoglBoxedValue *bvb)
|
||||
{
|
||||
@@ -134,7 +134,7 @@ _cogl_boxed_value_set_x (CoglBoxedValue *bv,
|
||||
CoglBoxedType type,
|
||||
size_t value_size,
|
||||
const void *value,
|
||||
gboolean transpose)
|
||||
CoglBool transpose)
|
||||
{
|
||||
if (count == 1)
|
||||
{
|
||||
@@ -229,7 +229,7 @@ void
|
||||
_cogl_boxed_value_set_matrix (CoglBoxedValue *bv,
|
||||
int dimensions,
|
||||
int count,
|
||||
gboolean transpose,
|
||||
CoglBool transpose,
|
||||
const float *value)
|
||||
{
|
||||
_cogl_boxed_value_set_x (bv,
|
||||
|
||||
@@ -64,7 +64,7 @@ typedef struct _CoglBoxedValue
|
||||
_bv->count = 1; \
|
||||
} G_STMT_END
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
_cogl_boxed_value_equal (const CoglBoxedValue *bva,
|
||||
const CoglBoxedValue *bvb);
|
||||
|
||||
@@ -92,7 +92,7 @@ void
|
||||
_cogl_boxed_value_set_matrix (CoglBoxedValue *bv,
|
||||
int dimensions,
|
||||
int count,
|
||||
gboolean transpose,
|
||||
CoglBool transpose,
|
||||
const float *value);
|
||||
|
||||
/*
|
||||
|
||||
@@ -57,7 +57,7 @@ struct _CoglBufferVtable
|
||||
|
||||
void (* unmap) (CoglBuffer *buffer);
|
||||
|
||||
gboolean (* set_data) (CoglBuffer *buffer,
|
||||
CoglBool (* set_data) (CoglBuffer *buffer,
|
||||
unsigned int offset,
|
||||
const void *data,
|
||||
unsigned int size,
|
||||
@@ -146,7 +146,7 @@ _cogl_buffer_immutable_ref (CoglBuffer *buffer);
|
||||
void
|
||||
_cogl_buffer_immutable_unref (CoglBuffer *buffer);
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
_cogl_buffer_set_data (CoglBuffer *buffer,
|
||||
size_t offset,
|
||||
const void *data,
|
||||
|
||||
@@ -62,7 +62,7 @@ _cogl_buffer_register_buffer_type (const CoglObjectClass *klass)
|
||||
_cogl_buffer_types = g_slist_prepend (_cogl_buffer_types, (void *) klass);
|
||||
}
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_is_buffer (void *object)
|
||||
{
|
||||
const CoglObject *obj = object;
|
||||
@@ -100,7 +100,7 @@ malloc_unmap (CoglBuffer *buffer)
|
||||
buffer->flags &= ~COGL_BUFFER_FLAG_MAPPED;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
malloc_set_data (CoglBuffer *buffer,
|
||||
unsigned int offset,
|
||||
const void *data,
|
||||
@@ -119,7 +119,7 @@ _cogl_buffer_initialize (CoglBuffer *buffer,
|
||||
CoglBufferUsageHint usage_hint,
|
||||
CoglBufferUpdateHint update_hint)
|
||||
{
|
||||
gboolean use_malloc = FALSE;
|
||||
CoglBool use_malloc = FALSE;
|
||||
|
||||
buffer->context = ctx;
|
||||
buffer->flags = COGL_BUFFER_FLAG_NONE;
|
||||
@@ -210,7 +210,7 @@ cogl_buffer_get_update_hint (CoglBuffer *buffer)
|
||||
static void
|
||||
warn_about_midscene_changes (void)
|
||||
{
|
||||
static gboolean seen = FALSE;
|
||||
static CoglBool seen = FALSE;
|
||||
if (!seen)
|
||||
{
|
||||
g_warning ("Mid-scene modification of buffers has "
|
||||
@@ -359,7 +359,7 @@ _cogl_buffer_unmap_for_fill_or_fallback (CoglBuffer *buffer)
|
||||
cogl_buffer_unmap (buffer);
|
||||
}
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
_cogl_buffer_set_data (CoglBuffer *buffer,
|
||||
size_t offset,
|
||||
const void *data,
|
||||
@@ -375,14 +375,14 @@ _cogl_buffer_set_data (CoglBuffer *buffer,
|
||||
return buffer->vtable.set_data (buffer, offset, data, size, error);
|
||||
}
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_buffer_set_data (CoglBuffer *buffer,
|
||||
size_t offset,
|
||||
const void *data,
|
||||
size_t size)
|
||||
{
|
||||
CoglError *ignore_error = NULL;
|
||||
gboolean status =
|
||||
CoglBool status =
|
||||
_cogl_buffer_set_data (buffer, offset, data, size, &ignore_error);
|
||||
if (!status)
|
||||
cogl_error_free (ignore_error);
|
||||
|
||||
@@ -107,7 +107,7 @@ _cogl_buffer_error_domain (void);
|
||||
* Since: 1.2
|
||||
* Stability: unstable
|
||||
*/
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_is_buffer (void *object);
|
||||
|
||||
/**
|
||||
@@ -314,7 +314,7 @@ cogl_buffer_unmap (CoglBuffer *buffer);
|
||||
* Since: 1.2
|
||||
* Stability: unstable
|
||||
*/
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_buffer_set_data (CoglBuffer *buffer,
|
||||
size_t offset,
|
||||
const void *data,
|
||||
|
||||
@@ -136,7 +136,7 @@ struct _CoglClipStackRect
|
||||
modelview matrix is that same as when a rectangle is added to the
|
||||
journal. In that case we can use the original clip coordinates
|
||||
and modify the rectangle instead. */
|
||||
gboolean can_be_scissor;
|
||||
CoglBool can_be_scissor;
|
||||
};
|
||||
|
||||
struct _CoglClipStackWindowRect
|
||||
|
||||
@@ -300,7 +300,7 @@ cogl_color_unpremultiply (CoglColor *color)
|
||||
}
|
||||
}
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_color_equal (const void *v1, const void *v2)
|
||||
{
|
||||
const uint32_t *c1 = v1, *c2 = v2;
|
||||
|
||||
@@ -554,7 +554,7 @@ cogl_color_unpremultiply (CoglColor *color);
|
||||
*
|
||||
* Since: 1.0
|
||||
*/
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_color_equal (const void *v1, const void *v2);
|
||||
|
||||
/**
|
||||
|
||||
@@ -99,7 +99,7 @@ _cogl_config_read (void)
|
||||
GKeyFile *key_file = g_key_file_new ();
|
||||
const char * const *system_dirs = g_get_system_config_dirs ();
|
||||
char *filename;
|
||||
gboolean status = FALSE;
|
||||
CoglBool status = FALSE;
|
||||
int i;
|
||||
|
||||
for (i = 0; system_dirs[i]; i++)
|
||||
|
||||
@@ -103,7 +103,7 @@ struct _CoglContext
|
||||
unsigned long private_features
|
||||
[COGL_FLAGS_N_LONGS_FOR_SIZE (COGL_N_PRIVATE_FEATURES)];
|
||||
|
||||
gboolean needs_viewport_scissor_workaround;
|
||||
CoglBool needs_viewport_scissor_workaround;
|
||||
CoglFramebuffer *viewport_scissor_workaround_framebuffer;
|
||||
|
||||
CoglPipeline *default_pipeline;
|
||||
@@ -127,7 +127,7 @@ struct _CoglContext
|
||||
CoglBitmask enable_custom_attributes_tmp;
|
||||
CoglBitmask changed_bits_tmp;
|
||||
|
||||
gboolean legacy_backface_culling_enabled;
|
||||
CoglBool legacy_backface_culling_enabled;
|
||||
|
||||
/* A few handy matrix constants */
|
||||
CoglMatrix identity_matrix;
|
||||
@@ -185,19 +185,19 @@ struct _CoglContext
|
||||
/* Some simple caching, to minimize state changes... */
|
||||
CoglPipeline *current_pipeline;
|
||||
unsigned long current_pipeline_changes_since_flush;
|
||||
gboolean current_pipeline_with_color_attrib;
|
||||
gboolean current_pipeline_unknown_color_alpha;
|
||||
CoglBool current_pipeline_with_color_attrib;
|
||||
CoglBool current_pipeline_unknown_color_alpha;
|
||||
unsigned long current_pipeline_age;
|
||||
|
||||
gboolean gl_blend_enable_cache;
|
||||
CoglBool gl_blend_enable_cache;
|
||||
|
||||
gboolean depth_test_enabled_cache;
|
||||
CoglBool depth_test_enabled_cache;
|
||||
CoglDepthTestFunction depth_test_function_cache;
|
||||
gboolean depth_writing_enabled_cache;
|
||||
CoglBool depth_writing_enabled_cache;
|
||||
float depth_range_near_cache;
|
||||
float depth_range_far_cache;
|
||||
|
||||
gboolean legacy_depth_test_enabled;
|
||||
CoglBool legacy_depth_test_enabled;
|
||||
|
||||
CoglBuffer *current_buffer[COGL_BUFFER_BIND_TARGET_COUNT];
|
||||
|
||||
@@ -225,7 +225,7 @@ struct _CoglContext
|
||||
/* This becomes TRUE the first time the context is bound to an
|
||||
* onscreen buffer. This is used by cogl-framebuffer-gl to determine
|
||||
* when to initialise the glDrawBuffer state */
|
||||
gboolean was_bound_to_onscreen;
|
||||
CoglBool was_bound_to_onscreen;
|
||||
|
||||
/* Primitives */
|
||||
CoglPath *current_path;
|
||||
@@ -241,7 +241,7 @@ struct _CoglContext
|
||||
CoglIndices *rectangle_short_indices;
|
||||
int rectangle_short_indices_len;
|
||||
|
||||
gboolean in_begin_gl_block;
|
||||
CoglBool in_begin_gl_block;
|
||||
|
||||
CoglPipeline *texture_download_pipeline;
|
||||
CoglPipeline *blit_texture_pipeline;
|
||||
@@ -268,7 +268,7 @@ struct _CoglContext
|
||||
CoglPipelineProgramType current_vertex_program_type;
|
||||
GLuint current_gl_program;
|
||||
|
||||
gboolean current_gl_dither_enabled;
|
||||
CoglBool current_gl_dither_enabled;
|
||||
CoglColorMask current_gl_color_mask;
|
||||
GLenum current_gl_draw_buffer;
|
||||
|
||||
@@ -280,7 +280,7 @@ struct _CoglContext
|
||||
doesn't need to be a valid pointer. We can't just use NULL in
|
||||
current_clip_stack to mark a dirty state because NULL is a valid
|
||||
stack (meaning no clipping) */
|
||||
gboolean current_clip_stack_valid;
|
||||
CoglBool current_clip_stack_valid;
|
||||
/* The clip state that was flushed. This isn't intended to be used
|
||||
as a stack to push and pop new entries. Instead the current stack
|
||||
that the user wants is part of the framebuffer state. This is
|
||||
@@ -292,13 +292,13 @@ struct _CoglContext
|
||||
state. If TRUE then any further use of the stencil buffer (such
|
||||
as for drawing paths) would need to be merged with the existing
|
||||
stencil buffer */
|
||||
gboolean current_clip_stack_uses_stencil;
|
||||
CoglBool current_clip_stack_uses_stencil;
|
||||
|
||||
/* This is used as a temporary buffer to fill a CoglBuffer when
|
||||
cogl_buffer_map fails and we only want to map to fill it with new
|
||||
data */
|
||||
GByteArray *buffer_map_fallback_array;
|
||||
gboolean buffer_map_fallback_in_use;
|
||||
CoglBool buffer_map_fallback_in_use;
|
||||
size_t buffer_map_fallback_offset;
|
||||
|
||||
CoglWinsysRectangleState rectangle_state;
|
||||
@@ -371,7 +371,7 @@ _cogl_context_get_winsys (CoglContext *context);
|
||||
* to know when to re-query the GL extensions. The backend should also
|
||||
* check whether the GL context is supported by Cogl. If not it should
|
||||
* return FALSE and set @error */
|
||||
gboolean
|
||||
CoglBool
|
||||
_cogl_context_update_features (CoglContext *context,
|
||||
CoglError **error);
|
||||
|
||||
|
||||
@@ -645,7 +645,7 @@ cogl_context_get_renderer (CoglContext *context)
|
||||
return context->display->renderer;
|
||||
}
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
_cogl_context_update_features (CoglContext *context,
|
||||
CoglError **error)
|
||||
{
|
||||
|
||||
@@ -166,7 +166,7 @@ cogl_context_get_renderer (CoglContext *context);
|
||||
* Since: 1.10
|
||||
* Stability: Unstable
|
||||
*/
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_is_context (void *object);
|
||||
|
||||
/* XXX: not guarded by the EXPERIMENTAL_API defines to avoid
|
||||
@@ -285,7 +285,7 @@ typedef enum _CoglFeatureID
|
||||
* Since: 1.10
|
||||
* Stability: unstable
|
||||
*/
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_has_feature (CoglContext *context, CoglFeatureID feature);
|
||||
|
||||
/**
|
||||
@@ -305,7 +305,7 @@ cogl_has_feature (CoglContext *context, CoglFeatureID feature);
|
||||
* Since: 1.10
|
||||
* Stability: unstable
|
||||
*/
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_has_features (CoglContext *context, ...);
|
||||
|
||||
/**
|
||||
|
||||
@@ -93,7 +93,7 @@ GHashTable *_cogl_debug_instances;
|
||||
|
||||
static void
|
||||
_cogl_parse_debug_string_for_keys (const char *value,
|
||||
gboolean enable,
|
||||
CoglBool enable,
|
||||
const GDebugKey *keys,
|
||||
unsigned int nkeys)
|
||||
{
|
||||
@@ -151,8 +151,8 @@ _cogl_parse_debug_string_for_keys (const char *value,
|
||||
|
||||
void
|
||||
_cogl_parse_debug_string (const char *value,
|
||||
gboolean enable,
|
||||
gboolean ignore_help)
|
||||
CoglBool enable,
|
||||
CoglBool ignore_help)
|
||||
{
|
||||
if (ignore_help && strcmp (value, "help") == 0)
|
||||
return;
|
||||
@@ -210,7 +210,7 @@ _cogl_parse_debug_string (const char *value,
|
||||
}
|
||||
|
||||
#ifdef COGL_ENABLE_DEBUG
|
||||
static gboolean
|
||||
static CoglBool
|
||||
cogl_arg_debug_cb (const char *key,
|
||||
const char *value,
|
||||
void *user_data)
|
||||
@@ -221,7 +221,7 @@ cogl_arg_debug_cb (const char *key,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
cogl_arg_no_debug_cb (const char *key,
|
||||
const char *value,
|
||||
void *user_data)
|
||||
@@ -267,7 +267,7 @@ _cogl_debug_check_environment (void)
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
pre_parse_hook (GOptionContext *context,
|
||||
GOptionGroup *group,
|
||||
void *data,
|
||||
|
||||
@@ -112,8 +112,8 @@ _cogl_debug_check_environment (void);
|
||||
|
||||
void
|
||||
_cogl_parse_debug_string (const char *value,
|
||||
gboolean enable,
|
||||
gboolean ignore_help);
|
||||
CoglBool enable,
|
||||
CoglBool ignore_help);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
||||
@@ -50,13 +50,13 @@ cogl_depth_state_init (CoglDepthState *state)
|
||||
|
||||
void
|
||||
cogl_depth_state_set_test_enabled (CoglDepthState *state,
|
||||
gboolean enabled)
|
||||
CoglBool enabled)
|
||||
{
|
||||
_COGL_RETURN_IF_FAIL (state->magic == COGL_DEPTH_STATE_MAGIC);
|
||||
state->test_enabled = enabled;
|
||||
}
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_depth_state_get_test_enabled (CoglDepthState *state)
|
||||
{
|
||||
_COGL_RETURN_VAL_IF_FAIL (state->magic == COGL_DEPTH_STATE_MAGIC, FALSE);
|
||||
@@ -65,13 +65,13 @@ cogl_depth_state_get_test_enabled (CoglDepthState *state)
|
||||
|
||||
void
|
||||
cogl_depth_state_set_write_enabled (CoglDepthState *state,
|
||||
gboolean enabled)
|
||||
CoglBool enabled)
|
||||
{
|
||||
_COGL_RETURN_IF_FAIL (state->magic == COGL_DEPTH_STATE_MAGIC);
|
||||
state->write_enabled = enabled;
|
||||
}
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_depth_state_get_write_enabled (CoglDepthState *state)
|
||||
{
|
||||
_COGL_RETURN_VAL_IF_FAIL (state->magic == COGL_DEPTH_STATE_MAGIC, FALSE);
|
||||
|
||||
@@ -54,9 +54,9 @@ typedef struct {
|
||||
/*< private >*/
|
||||
uint32_t COGL_PRIVATE (magic);
|
||||
|
||||
gboolean COGL_PRIVATE (test_enabled);
|
||||
CoglBool COGL_PRIVATE (test_enabled);
|
||||
CoglDepthTestFunction COGL_PRIVATE (test_function);
|
||||
gboolean COGL_PRIVATE (write_enabled);
|
||||
CoglBool COGL_PRIVATE (write_enabled);
|
||||
float COGL_PRIVATE (range_near);
|
||||
float COGL_PRIVATE (range_far);
|
||||
|
||||
@@ -114,7 +114,7 @@ cogl_depth_state_init (CoglDepthState *state);
|
||||
*/
|
||||
void
|
||||
cogl_depth_state_set_test_enabled (CoglDepthState *state,
|
||||
gboolean enable);
|
||||
CoglBool enable);
|
||||
|
||||
/**
|
||||
* cogl_depth_state_get_test_enabled:
|
||||
@@ -127,7 +127,7 @@ cogl_depth_state_set_test_enabled (CoglDepthState *state,
|
||||
* Since: 2.0
|
||||
* Stability: Unstable
|
||||
*/
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_depth_state_get_test_enabled (CoglDepthState *state);
|
||||
|
||||
/**
|
||||
@@ -152,7 +152,7 @@ cogl_depth_state_get_test_enabled (CoglDepthState *state);
|
||||
*/
|
||||
void
|
||||
cogl_depth_state_set_write_enabled (CoglDepthState *state,
|
||||
gboolean enable);
|
||||
CoglBool enable);
|
||||
|
||||
/**
|
||||
* cogl_depth_state_get_write_enabled:
|
||||
@@ -165,7 +165,7 @@ cogl_depth_state_set_write_enabled (CoglDepthState *state,
|
||||
* Since: 2.0
|
||||
* Stability: Unstable
|
||||
*/
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_depth_state_get_write_enabled (CoglDepthState *state);
|
||||
|
||||
/**
|
||||
|
||||
@@ -40,7 +40,7 @@ struct _CoglDisplay
|
||||
{
|
||||
CoglObject _parent;
|
||||
|
||||
gboolean setup;
|
||||
CoglBool setup;
|
||||
CoglRenderer *renderer;
|
||||
CoglOnscreenTemplate *onscreen_template;
|
||||
|
||||
|
||||
@@ -135,7 +135,7 @@ cogl_display_set_onscreen_template (CoglDisplay *display,
|
||||
display->onscreen_template = cogl_onscreen_template_new (NULL);
|
||||
}
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_display_setup (CoglDisplay *display,
|
||||
CoglError **error)
|
||||
{
|
||||
|
||||
@@ -186,7 +186,7 @@ cogl_display_set_onscreen_template (CoglDisplay *display,
|
||||
* Since: 1.10
|
||||
* Stability: unstable
|
||||
*/
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_display_setup (CoglDisplay *display,
|
||||
CoglError **error);
|
||||
|
||||
@@ -201,7 +201,7 @@ cogl_display_setup (CoglDisplay *display,
|
||||
* Since: 1.10
|
||||
* Stability: unstable
|
||||
*/
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_is_display (void *object);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
@@ -42,7 +42,7 @@ struct _CoglDriverVtable
|
||||
{
|
||||
/* TODO: factor this out since this is OpenGL specific and
|
||||
* so can be ignored by non-OpenGL drivers. */
|
||||
gboolean
|
||||
CoglBool
|
||||
(* pixel_format_from_gl_internal) (CoglContext *context,
|
||||
GLenum gl_int_format,
|
||||
CoglPixelFormat *out_format);
|
||||
@@ -63,11 +63,11 @@ struct _CoglDriverVtable
|
||||
GLenum *out_glformat,
|
||||
GLenum *out_gltype);
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
(* update_features) (CoglContext *context,
|
||||
CoglError **error);
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
(* offscreen_allocate) (CoglOffscreen *offscreen,
|
||||
CoglError **error);
|
||||
|
||||
@@ -119,7 +119,7 @@ struct _CoglDriverVtable
|
||||
int n_attributes,
|
||||
CoglDrawFlags flags);
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
(* framebuffer_read_pixels_into_bitmap) (CoglFramebuffer *framebuffer,
|
||||
int x,
|
||||
int y,
|
||||
@@ -135,7 +135,7 @@ struct _CoglDriverVtable
|
||||
/* Returns TRUE if the driver can support creating a 2D texture with
|
||||
* the given geometry and specified internal format.
|
||||
*/
|
||||
gboolean
|
||||
CoglBool
|
||||
(* texture_2d_can_create) (CoglContext *ctx,
|
||||
int width,
|
||||
int height,
|
||||
@@ -151,7 +151,7 @@ struct _CoglDriverVtable
|
||||
|
||||
/* Allocates (uninitialized) storage for the given texture according
|
||||
* to the configured size and format of the texture */
|
||||
gboolean
|
||||
CoglBool
|
||||
(* texture_2d_allocate) (CoglTexture *tex,
|
||||
CoglError **error);
|
||||
|
||||
@@ -187,7 +187,7 @@ struct _CoglDriverVtable
|
||||
* Since this may need to create the underlying storage first
|
||||
* it may throw a NO_MEMORY error.
|
||||
*/
|
||||
gboolean
|
||||
CoglBool
|
||||
(* texture_2d_copy_from_bitmap) (CoglTexture2D *tex_2d,
|
||||
int src_x,
|
||||
int src_y,
|
||||
@@ -199,7 +199,7 @@ struct _CoglDriverVtable
|
||||
int level,
|
||||
CoglError **error);
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
(* texture_2d_is_get_data_supported) (CoglTexture2D *tex_2d);
|
||||
|
||||
/* Reads back the full contents of the given texture and write it to
|
||||
@@ -254,7 +254,7 @@ struct _CoglDriverVtable
|
||||
|
||||
/* Uploads data to the buffer without needing to map it necessarily
|
||||
*/
|
||||
gboolean
|
||||
CoglBool
|
||||
(* buffer_set_data) (CoglBuffer *buffer,
|
||||
unsigned int offset,
|
||||
const void *data,
|
||||
|
||||
@@ -49,7 +49,7 @@ cogl_error_copy (CoglError *error)
|
||||
return (CoglError *)g_error_copy ((GError *)error);
|
||||
}
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_error_matches (CoglError *error,
|
||||
uint32_t domain,
|
||||
int code)
|
||||
|
||||
@@ -147,7 +147,7 @@ cogl_error_copy (CoglError *error);
|
||||
* Return value: whether the @error corresponds to the given @domain
|
||||
* and @code.
|
||||
*/
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_error_matches (CoglError *error,
|
||||
uint32_t domain,
|
||||
int code);
|
||||
|
||||
@@ -158,7 +158,7 @@ cogl_euler_init_from_matrix (CoglEuler *euler,
|
||||
euler->roll = R;
|
||||
}
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_euler_equal (const void *v1, const void *v2)
|
||||
{
|
||||
const CoglEuler *a = v1;
|
||||
|
||||
@@ -230,7 +230,7 @@ cogl_euler_init_from_quaternion (CoglEuler *euler,
|
||||
* Returns: %TRUE if @v1 and @v2 are equal else %FALSE.
|
||||
* Since: 2.0
|
||||
*/
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_euler_equal (const void *v1, const void *v2);
|
||||
|
||||
/**
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
#include "cogl-renderer-private.h"
|
||||
#include "cogl-private.h"
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
_cogl_feature_check (CoglRenderer *renderer,
|
||||
const char *driver_prefix,
|
||||
const CoglFeatureData *data,
|
||||
@@ -52,7 +52,7 @@ _cogl_feature_check (CoglRenderer *renderer,
|
||||
const char *suffix = NULL;
|
||||
int func_num;
|
||||
CoglExtGlesAvailability gles_availability = 0;
|
||||
gboolean in_core;
|
||||
CoglBool in_core;
|
||||
|
||||
switch (driver)
|
||||
{
|
||||
|
||||
@@ -89,7 +89,7 @@ struct _CoglFeatureData
|
||||
const CoglFeatureFunction *functions;
|
||||
};
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
_cogl_feature_check (CoglRenderer *renderer,
|
||||
const char *driver_prefix,
|
||||
const CoglFeatureData *data,
|
||||
|
||||
@@ -50,7 +50,7 @@ _cogl_fence_check (CoglFenceClosure *fence)
|
||||
if (fence->type == FENCE_TYPE_WINSYS)
|
||||
{
|
||||
const CoglWinsysVtable *winsys = _cogl_context_get_winsys (context);
|
||||
gboolean ret;
|
||||
CoglBool ret;
|
||||
|
||||
ret = winsys->fence_is_complete (context, fence->fence_obj);
|
||||
if (!ret)
|
||||
|
||||
@@ -66,7 +66,7 @@ GType cogl_frame_info_get_gtype (void);
|
||||
* Since: 2.0
|
||||
* Stability: unstable
|
||||
*/
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_is_frame_info (void *object);
|
||||
|
||||
/**
|
||||
|
||||
@@ -57,10 +57,10 @@ typedef enum _CoglFramebufferType {
|
||||
typedef struct
|
||||
{
|
||||
CoglSwapChain *swap_chain;
|
||||
gboolean need_stencil;
|
||||
CoglBool need_stencil;
|
||||
int samples_per_pixel;
|
||||
gboolean depth_texture_enabled;
|
||||
gboolean stereo_enabled;
|
||||
CoglBool depth_texture_enabled;
|
||||
CoglBool stereo_enabled;
|
||||
} CoglFramebufferConfig;
|
||||
|
||||
/* Flags to pass to _cogl_offscreen_new_with_texture_full */
|
||||
@@ -140,7 +140,7 @@ struct _CoglFramebuffer
|
||||
/* Format of the pixels in the framebuffer (including the expected
|
||||
premult state) */
|
||||
CoglPixelFormat internal_format;
|
||||
gboolean allocated;
|
||||
CoglBool allocated;
|
||||
|
||||
CoglMatrixStack *modelview_stack;
|
||||
CoglMatrixStack *projection_stack;
|
||||
@@ -153,8 +153,8 @@ struct _CoglFramebuffer
|
||||
|
||||
CoglClipStack *clip_stack;
|
||||
|
||||
gboolean dither_enabled;
|
||||
gboolean depth_writing_enabled;
|
||||
CoglBool dither_enabled;
|
||||
CoglBool depth_writing_enabled;
|
||||
CoglColorMask color_mask;
|
||||
CoglStereoMode stereo_mode;
|
||||
|
||||
@@ -181,14 +181,14 @@ struct _CoglFramebuffer
|
||||
int clear_clip_y0;
|
||||
int clear_clip_x1;
|
||||
int clear_clip_y1;
|
||||
gboolean clear_clip_dirty;
|
||||
CoglBool clear_clip_dirty;
|
||||
|
||||
/* Whether something has been drawn to the buffer since the last
|
||||
* swap buffers or swap region. */
|
||||
gboolean mid_scene;
|
||||
CoglBool mid_scene;
|
||||
|
||||
/* driver specific */
|
||||
gboolean dirty_bitmasks;
|
||||
CoglBool dirty_bitmasks;
|
||||
CoglFramebufferBits bits;
|
||||
|
||||
int samples_per_pixel;
|
||||
@@ -196,7 +196,7 @@ struct _CoglFramebuffer
|
||||
/* Whether the depth buffer was enabled for this framebuffer,
|
||||
* usually means it needs to be cleared before being reused next.
|
||||
*/
|
||||
gboolean depth_buffer_clear_needed;
|
||||
CoglBool depth_buffer_clear_needed;
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
@@ -493,7 +493,7 @@ _cogl_framebuffer_get_projection_entry (CoglFramebuffer *framebuffer)
|
||||
return projection_stack->last_entry;
|
||||
}
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
_cogl_framebuffer_read_pixels_into_bitmap (CoglFramebuffer *framebuffer,
|
||||
int x,
|
||||
int y,
|
||||
|
||||
@@ -83,7 +83,7 @@ cogl_framebuffer_error_quark (void)
|
||||
return g_quark_from_static_string ("cogl-framebuffer-error-quark");
|
||||
}
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_is_framebuffer (void *object)
|
||||
{
|
||||
CoglObject *obj = object;
|
||||
@@ -224,7 +224,7 @@ _cogl_framebuffer_clear_without_flush4f (CoglFramebuffer *framebuffer,
|
||||
|
||||
if (!buffers)
|
||||
{
|
||||
static gboolean shown = FALSE;
|
||||
static CoglBool shown = FALSE;
|
||||
|
||||
if (!shown)
|
||||
{
|
||||
@@ -266,7 +266,7 @@ cogl_framebuffer_clear4f (CoglFramebuffer *framebuffer,
|
||||
int scissor_y0;
|
||||
int scissor_x1;
|
||||
int scissor_y1;
|
||||
gboolean saved_viewport_scissor_workaround;
|
||||
CoglBool saved_viewport_scissor_workaround;
|
||||
|
||||
if (!framebuffer->depth_buffer_clear_needed &&
|
||||
(buffers & COGL_BUFFER_BIT_DEPTH))
|
||||
@@ -741,7 +741,7 @@ _cogl_offscreen_free (CoglOffscreen *offscreen)
|
||||
g_free (offscreen);
|
||||
}
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_framebuffer_allocate (CoglFramebuffer *framebuffer,
|
||||
CoglError **error)
|
||||
{
|
||||
@@ -1126,7 +1126,7 @@ cogl_framebuffer_set_stereo_mode (CoglFramebuffer *framebuffer,
|
||||
COGL_FRAMEBUFFER_STATE_STEREO_MODE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_framebuffer_get_depth_write_enabled (CoglFramebuffer *framebuffer)
|
||||
{
|
||||
return framebuffer->depth_writing_enabled;
|
||||
@@ -1134,7 +1134,7 @@ cogl_framebuffer_get_depth_write_enabled (CoglFramebuffer *framebuffer)
|
||||
|
||||
void
|
||||
cogl_framebuffer_set_depth_write_enabled (CoglFramebuffer *framebuffer,
|
||||
gboolean depth_write_enabled)
|
||||
CoglBool depth_write_enabled)
|
||||
{
|
||||
if (framebuffer->depth_writing_enabled == depth_write_enabled)
|
||||
return;
|
||||
@@ -1149,7 +1149,7 @@ cogl_framebuffer_set_depth_write_enabled (CoglFramebuffer *framebuffer,
|
||||
COGL_FRAMEBUFFER_STATE_DEPTH_WRITE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_framebuffer_get_dither_enabled (CoglFramebuffer *framebuffer)
|
||||
{
|
||||
return framebuffer->dither_enabled;
|
||||
@@ -1157,7 +1157,7 @@ cogl_framebuffer_get_dither_enabled (CoglFramebuffer *framebuffer)
|
||||
|
||||
void
|
||||
cogl_framebuffer_set_dither_enabled (CoglFramebuffer *framebuffer,
|
||||
gboolean dither_enabled)
|
||||
CoglBool dither_enabled)
|
||||
{
|
||||
if (framebuffer->dither_enabled == dither_enabled)
|
||||
return;
|
||||
@@ -1172,14 +1172,14 @@ cogl_framebuffer_set_dither_enabled (CoglFramebuffer *framebuffer,
|
||||
|
||||
void
|
||||
cogl_framebuffer_set_depth_texture_enabled (CoglFramebuffer *framebuffer,
|
||||
gboolean enabled)
|
||||
CoglBool enabled)
|
||||
{
|
||||
_COGL_RETURN_IF_FAIL (!framebuffer->allocated);
|
||||
|
||||
framebuffer->config.depth_texture_enabled = enabled;
|
||||
}
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_framebuffer_get_depth_texture_enabled (CoglFramebuffer *framebuffer)
|
||||
{
|
||||
return framebuffer->config.depth_texture_enabled;
|
||||
@@ -1268,14 +1268,14 @@ cogl_framebuffer_get_context (CoglFramebuffer *framebuffer)
|
||||
return framebuffer->context;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
_cogl_framebuffer_try_fast_read_pixel (CoglFramebuffer *framebuffer,
|
||||
int x,
|
||||
int y,
|
||||
CoglReadPixelsFlags source,
|
||||
CoglBitmap *bitmap)
|
||||
{
|
||||
gboolean found_intersection;
|
||||
CoglBool found_intersection;
|
||||
CoglPixelFormat format;
|
||||
|
||||
if (G_UNLIKELY (COGL_DEBUG_ENABLED (COGL_DEBUG_DISABLE_FAST_READ_PIXEL)))
|
||||
@@ -1347,7 +1347,7 @@ _cogl_framebuffer_try_fast_read_pixel (CoglFramebuffer *framebuffer,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
_cogl_framebuffer_read_pixels_into_bitmap (CoglFramebuffer *framebuffer,
|
||||
int x,
|
||||
int y,
|
||||
@@ -1397,7 +1397,7 @@ _cogl_framebuffer_read_pixels_into_bitmap (CoglFramebuffer *framebuffer,
|
||||
error);
|
||||
}
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_framebuffer_read_pixels_into_bitmap (CoglFramebuffer *framebuffer,
|
||||
int x,
|
||||
int y,
|
||||
@@ -1405,7 +1405,7 @@ cogl_framebuffer_read_pixels_into_bitmap (CoglFramebuffer *framebuffer,
|
||||
CoglBitmap *bitmap)
|
||||
{
|
||||
CoglError *ignore_error = NULL;
|
||||
gboolean status =
|
||||
CoglBool status =
|
||||
_cogl_framebuffer_read_pixels_into_bitmap (framebuffer,
|
||||
x, y, source, bitmap,
|
||||
&ignore_error);
|
||||
@@ -1414,7 +1414,7 @@ cogl_framebuffer_read_pixels_into_bitmap (CoglFramebuffer *framebuffer,
|
||||
return status;
|
||||
}
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_framebuffer_read_pixels (CoglFramebuffer *framebuffer,
|
||||
int x,
|
||||
int y,
|
||||
@@ -1425,7 +1425,7 @@ cogl_framebuffer_read_pixels (CoglFramebuffer *framebuffer,
|
||||
{
|
||||
int bpp = _cogl_pixel_format_get_bytes_per_pixel (format);
|
||||
CoglBitmap *bitmap;
|
||||
gboolean ret;
|
||||
CoglBool ret;
|
||||
|
||||
bitmap = cogl_bitmap_new_for_data (framebuffer->context,
|
||||
width, height,
|
||||
@@ -2097,7 +2097,7 @@ get_wire_line_indices (CoglContext *ctx,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
remove_layer_cb (CoglPipeline *pipeline,
|
||||
int layer_index,
|
||||
void *user_data)
|
||||
|
||||
@@ -123,7 +123,7 @@ GType cogl_framebuffer_get_gtype (void);
|
||||
* Since: 1.8
|
||||
* Stability: unstable
|
||||
*/
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_framebuffer_allocate (CoglFramebuffer *framebuffer,
|
||||
CoglError **error);
|
||||
|
||||
@@ -736,7 +736,7 @@ cogl_framebuffer_get_depth_bits (CoglFramebuffer *framebuffer);
|
||||
* Since: 1.20
|
||||
* Stability: unstable
|
||||
*/
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_framebuffer_get_is_stereo (CoglFramebuffer *framebuffer);
|
||||
|
||||
/**
|
||||
@@ -754,7 +754,7 @@ cogl_framebuffer_get_is_stereo (CoglFramebuffer *framebuffer);
|
||||
* Since: 1.8
|
||||
* Stability: unstable
|
||||
*/
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_framebuffer_get_dither_enabled (CoglFramebuffer *framebuffer);
|
||||
|
||||
/**
|
||||
@@ -781,7 +781,7 @@ cogl_framebuffer_get_dither_enabled (CoglFramebuffer *framebuffer);
|
||||
*/
|
||||
void
|
||||
cogl_framebuffer_set_dither_enabled (CoglFramebuffer *framebuffer,
|
||||
gboolean dither_enabled);
|
||||
CoglBool dither_enabled);
|
||||
|
||||
/**
|
||||
* cogl_framebuffer_get_depth_write_enabled:
|
||||
@@ -794,7 +794,7 @@ cogl_framebuffer_set_dither_enabled (CoglFramebuffer *framebuffer,
|
||||
* Since: 1.18
|
||||
* Stability: unstable
|
||||
*/
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_framebuffer_get_depth_write_enabled (CoglFramebuffer *framebuffer);
|
||||
|
||||
/**
|
||||
@@ -814,7 +814,7 @@ cogl_framebuffer_get_depth_write_enabled (CoglFramebuffer *framebuffer);
|
||||
*/
|
||||
void
|
||||
cogl_framebuffer_set_depth_write_enabled (CoglFramebuffer *framebuffer,
|
||||
gboolean depth_write_enabled);
|
||||
CoglBool depth_write_enabled);
|
||||
|
||||
/**
|
||||
* cogl_framebuffer_get_color_mask:
|
||||
@@ -904,7 +904,7 @@ cogl_framebuffer_set_stereo_mode (CoglFramebuffer *framebuffer,
|
||||
*/
|
||||
void
|
||||
cogl_framebuffer_set_depth_texture_enabled (CoglFramebuffer *framebuffer,
|
||||
gboolean enabled);
|
||||
CoglBool enabled);
|
||||
|
||||
/**
|
||||
* cogl_framebuffer_get_depth_texture_enabled:
|
||||
@@ -919,7 +919,7 @@ cogl_framebuffer_set_depth_texture_enabled (CoglFramebuffer *framebuffer,
|
||||
* Since: 1.14
|
||||
* Stability: unstable
|
||||
*/
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_framebuffer_get_depth_texture_enabled (CoglFramebuffer *framebuffer);
|
||||
|
||||
/**
|
||||
@@ -1749,7 +1749,7 @@ cogl_framebuffer_finish (CoglFramebuffer *framebuffer);
|
||||
* Since: 1.10
|
||||
* Stability: unstable
|
||||
*/
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_framebuffer_read_pixels_into_bitmap (CoglFramebuffer *framebuffer,
|
||||
int x,
|
||||
int y,
|
||||
@@ -1795,7 +1795,7 @@ cogl_framebuffer_read_pixels_into_bitmap (CoglFramebuffer *framebuffer,
|
||||
* Since: 1.10
|
||||
* Stability: unstable
|
||||
*/
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_framebuffer_read_pixels (CoglFramebuffer *framebuffer,
|
||||
int x,
|
||||
int y,
|
||||
@@ -1842,7 +1842,7 @@ typedef enum { /*< prefix=COGL_FRAMEBUFFER_ERROR >*/
|
||||
* Since: 1.10
|
||||
* Stability: unstable
|
||||
*/
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_is_framebuffer (void *object);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
@@ -67,7 +67,7 @@ typedef struct
|
||||
/* Set once this object has had glDeleteShader called on it. We need
|
||||
* to keep track of this so we don't deref the data twice if the
|
||||
* application calls glDeleteShader multiple times */
|
||||
gboolean deleted;
|
||||
CoglBool deleted;
|
||||
} CoglGLES2ShaderData;
|
||||
|
||||
typedef enum
|
||||
@@ -96,7 +96,7 @@ typedef struct
|
||||
/* Set once this object has had glDeleteProgram called on it. We need
|
||||
* to keep track of this so we don't deref the data twice if the
|
||||
* application calls glDeleteProgram multiple times */
|
||||
gboolean deleted;
|
||||
CoglBool deleted;
|
||||
|
||||
GLuint flip_vector_location;
|
||||
|
||||
@@ -136,7 +136,7 @@ struct _CoglGLES2Context
|
||||
/* This is set to FALSE until the first time the GLES2 context is
|
||||
* bound to something. We need to keep track of this so we can set
|
||||
* the viewport and scissor the first time it is bound. */
|
||||
gboolean has_been_bound;
|
||||
CoglBool has_been_bound;
|
||||
|
||||
CoglFramebuffer *read_buffer;
|
||||
CoglGLES2Offscreen *gles2_read_buffer;
|
||||
@@ -172,11 +172,11 @@ struct _CoglGLES2Context
|
||||
/* The following state is tracked separately from the GL context
|
||||
* because we need to modify it depending on whether we are flipping
|
||||
* the geometry. */
|
||||
gboolean viewport_dirty;
|
||||
CoglBool viewport_dirty;
|
||||
int viewport[4];
|
||||
gboolean scissor_dirty;
|
||||
CoglBool scissor_dirty;
|
||||
int scissor[4];
|
||||
gboolean front_face_dirty;
|
||||
CoglBool front_face_dirty;
|
||||
GLenum front_face;
|
||||
|
||||
/* We need to keep track of the pack alignment so we can flip the
|
||||
|
||||
@@ -139,7 +139,7 @@ detach_shader (CoglGLES2ProgramData *program_data,
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
is_symbol_character (char ch)
|
||||
{
|
||||
return g_ascii_isalnum (ch) || ch == '_';
|
||||
@@ -1775,7 +1775,7 @@ _cogl_gles2_offscreen_allocate (CoglOffscreen *offscreen,
|
||||
return gles2_offscreen;
|
||||
}
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_push_gles2_context (CoglContext *ctx,
|
||||
CoglGLES2Context *gles2_ctx,
|
||||
CoglFramebuffer *read_buffer,
|
||||
@@ -1955,7 +1955,7 @@ cogl_gles2_texture_2d_new_from_handle (CoglContext *ctx,
|
||||
format);
|
||||
}
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_gles2_texture_get_handle (CoglTexture *texture,
|
||||
unsigned int *handle,
|
||||
unsigned int *target)
|
||||
|
||||
@@ -266,7 +266,7 @@ cogl_gles2_context_get_vtable (CoglGLES2Context *gles2_ctx);
|
||||
* otherwise and @error will be updated.
|
||||
* Stability: unstable
|
||||
*/
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_push_gles2_context (CoglContext *ctx,
|
||||
CoglGLES2Context *gles2_ctx,
|
||||
CoglFramebuffer *read_buffer,
|
||||
@@ -378,7 +378,7 @@ cogl_gles2_texture_2d_new_from_handle (CoglContext *ctx,
|
||||
* Since: 2.0
|
||||
* Stability: unstable
|
||||
*/
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_gles2_texture_get_handle (CoglTexture *texture,
|
||||
unsigned int *handle,
|
||||
unsigned int *target);
|
||||
@@ -394,7 +394,7 @@ cogl_gles2_texture_get_handle (CoglTexture *texture,
|
||||
* Since: 2.0
|
||||
* Stability: unstable
|
||||
*/
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_is_gles2_context (void *object);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
@@ -45,7 +45,7 @@ typedef struct _CoglGLibSource
|
||||
int64_t expiration_time;
|
||||
} CoglGLibSource;
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
cogl_glib_source_prepare (GSource *source, int *timeout)
|
||||
{
|
||||
CoglGLibSource *cogl_source = (CoglGLibSource *) source;
|
||||
@@ -109,7 +109,7 @@ cogl_glib_source_prepare (GSource *source, int *timeout)
|
||||
return *timeout == 0;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
cogl_glib_source_check (GSource *source)
|
||||
{
|
||||
CoglGLibSource *cogl_source = (CoglGLibSource *) source;
|
||||
@@ -129,7 +129,7 @@ cogl_glib_source_check (GSource *source)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
cogl_glib_source_dispatch (GSource *source,
|
||||
GSourceFunc callback,
|
||||
void *user_data)
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
add_layer_vertex_boilerplate_cb (CoglPipelineLayer *layer,
|
||||
void *user_data)
|
||||
{
|
||||
@@ -61,7 +61,7 @@ add_layer_vertex_boilerplate_cb (CoglPipelineLayer *layer,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
add_layer_fragment_boilerplate_cb (CoglPipelineLayer *layer,
|
||||
void *user_data)
|
||||
{
|
||||
|
||||
@@ -37,10 +37,10 @@ typedef struct _CoglGLXCachedConfig
|
||||
{
|
||||
/* This will be -1 if there is no cached config in this slot */
|
||||
int depth;
|
||||
gboolean found;
|
||||
CoglBool found;
|
||||
GLXFBConfig fb_config;
|
||||
gboolean stereo;
|
||||
gboolean can_mipmap;
|
||||
CoglBool stereo;
|
||||
CoglBool can_mipmap;
|
||||
} CoglGLXCachedConfig;
|
||||
|
||||
#define COGL_GLX_N_CACHED_CONFIGS 6
|
||||
@@ -49,11 +49,11 @@ typedef struct _CoglGLXDisplay
|
||||
{
|
||||
CoglGLXCachedConfig glx_cached_configs[COGL_GLX_N_CACHED_CONFIGS];
|
||||
|
||||
gboolean found_fbconfig;
|
||||
gboolean fbconfig_has_rgba_visual;
|
||||
gboolean is_direct;
|
||||
gboolean have_vblank_counter;
|
||||
gboolean can_vblank_wait;
|
||||
CoglBool found_fbconfig;
|
||||
CoglBool fbconfig_has_rgba_visual;
|
||||
CoglBool is_direct;
|
||||
CoglBool have_vblank_counter;
|
||||
CoglBool can_vblank_wait;
|
||||
GLXFBConfig fbconfig;
|
||||
|
||||
/* Single context for all wins */
|
||||
|
||||
@@ -51,7 +51,7 @@ typedef struct CoglGpuInfoArchitectureDescription
|
||||
CoglGpuInfoArchitecture architecture;
|
||||
const char *name;
|
||||
CoglGpuInfoArchitectureFlag flags;
|
||||
gboolean (* check_function) (const CoglGpuInfoStrings *strings);
|
||||
CoglBool (* check_function) (const CoglGpuInfoStrings *strings);
|
||||
|
||||
} CoglGpuInfoArchitectureDescription;
|
||||
|
||||
@@ -59,7 +59,7 @@ typedef struct
|
||||
{
|
||||
CoglGpuInfoVendor vendor;
|
||||
const char *name;
|
||||
gboolean (* check_function) (const CoglGpuInfoStrings *strings);
|
||||
CoglBool (* check_function) (const CoglGpuInfoStrings *strings);
|
||||
const CoglGpuInfoArchitectureDescription *architectures;
|
||||
|
||||
} CoglGpuInfoVendorDescription;
|
||||
@@ -68,11 +68,11 @@ typedef struct
|
||||
{
|
||||
CoglGpuInfoDriverPackage driver_package;
|
||||
const char *name;
|
||||
gboolean (* check_function) (const CoglGpuInfoStrings *strings,
|
||||
CoglBool (* check_function) (const CoglGpuInfoStrings *strings,
|
||||
int *version_out);
|
||||
} CoglGpuInfoDriverPackageDescription;
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
_cogl_gpu_info_parse_version_string (const char *version_string,
|
||||
int n_components,
|
||||
const char **tail,
|
||||
@@ -111,7 +111,7 @@ _cogl_gpu_info_parse_version_string (const char *version_string,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
match_phrase (const char *string, const char *phrase)
|
||||
{
|
||||
const char *part = strstr (string, phrase);
|
||||
@@ -134,13 +134,13 @@ match_phrase (const char *string, const char *phrase)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
check_intel_vendor (const CoglGpuInfoStrings *strings)
|
||||
{
|
||||
return match_phrase (strings->renderer_string, "Intel(R)");
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
check_imagination_technologies_vendor (const CoglGpuInfoStrings *strings)
|
||||
{
|
||||
if (strcmp (strings->vendor_string, "Imagination Technologies") != 0)
|
||||
@@ -148,7 +148,7 @@ check_imagination_technologies_vendor (const CoglGpuInfoStrings *strings)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
check_arm_vendor (const CoglGpuInfoStrings *strings)
|
||||
{
|
||||
if (strcmp (strings->vendor_string, "ARM") != 0)
|
||||
@@ -156,7 +156,7 @@ check_arm_vendor (const CoglGpuInfoStrings *strings)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
check_qualcomm_vendor (const CoglGpuInfoStrings *strings)
|
||||
{
|
||||
if (strcmp (strings->vendor_string, "Qualcomm") != 0)
|
||||
@@ -164,7 +164,7 @@ check_qualcomm_vendor (const CoglGpuInfoStrings *strings)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
check_nvidia_vendor (const CoglGpuInfoStrings *strings)
|
||||
{
|
||||
if (strcmp (strings->vendor_string, "NVIDIA") != 0 &&
|
||||
@@ -174,7 +174,7 @@ check_nvidia_vendor (const CoglGpuInfoStrings *strings)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
check_ati_vendor (const CoglGpuInfoStrings *strings)
|
||||
{
|
||||
if (strcmp (strings->vendor_string, "ATI") != 0)
|
||||
@@ -183,7 +183,7 @@ check_ati_vendor (const CoglGpuInfoStrings *strings)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
check_mesa_vendor (const CoglGpuInfoStrings *strings)
|
||||
{
|
||||
if (strcmp (strings->vendor_string, "Tungsten Graphics, Inc") == 0)
|
||||
@@ -196,39 +196,39 @@ check_mesa_vendor (const CoglGpuInfoStrings *strings)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
check_true (const CoglGpuInfoStrings *strings)
|
||||
{
|
||||
/* This is a last resort so it always matches */
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
check_sandybridge_architecture (const CoglGpuInfoStrings *strings)
|
||||
{
|
||||
return match_phrase (strings->renderer_string, "Sandybridge");
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
check_llvmpipe_architecture (const CoglGpuInfoStrings *strings)
|
||||
{
|
||||
return match_phrase (strings->renderer_string, "llvmpipe");
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
check_softpipe_architecture (const CoglGpuInfoStrings *strings)
|
||||
{
|
||||
return match_phrase (strings->renderer_string, "softpipe");
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
check_swrast_architecture (const CoglGpuInfoStrings *strings)
|
||||
{
|
||||
return match_phrase (strings->renderer_string, "software rasterizer") ||
|
||||
match_phrase (strings->renderer_string, "Software Rasterizer");
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
check_sgx_architecture (const CoglGpuInfoStrings *strings)
|
||||
{
|
||||
if (strncmp (strings->renderer_string, "PowerVR SGX", 12) != 0)
|
||||
@@ -237,7 +237,7 @@ check_sgx_architecture (const CoglGpuInfoStrings *strings)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
check_mali_architecture (const CoglGpuInfoStrings *strings)
|
||||
{
|
||||
if (strncmp (strings->renderer_string, "Mali-", 5) != 0)
|
||||
@@ -408,7 +408,7 @@ _cogl_gpu_info_vendors[] =
|
||||
}
|
||||
};
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
check_mesa_driver_package (const CoglGpuInfoStrings *strings,
|
||||
int *version_ret)
|
||||
{
|
||||
@@ -480,7 +480,7 @@ UNIT_TEST (check_mesa_driver_package_parser,
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
check_unknown_driver_package (const CoglGpuInfoStrings *strings,
|
||||
int *version_out)
|
||||
{
|
||||
|
||||
@@ -94,7 +94,7 @@ cogl_index_buffer_new (CoglContext *context,
|
||||
* Since: 1.4
|
||||
* Stability: Unstable
|
||||
*/
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_is_index_buffer (void *object);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
@@ -136,7 +136,7 @@ cogl_indices_get_offset (CoglIndices *indices)
|
||||
static void
|
||||
warn_about_midscene_changes (void)
|
||||
{
|
||||
static gboolean seen = FALSE;
|
||||
static CoglBool seen = FALSE;
|
||||
if (!seen)
|
||||
{
|
||||
g_warning ("Mid-scene modification of indices has "
|
||||
|
||||
@@ -152,7 +152,7 @@ cogl_get_rectangle_indices (CoglContext *context, int n_rectangles);
|
||||
* Since: 1.10
|
||||
* Stability: unstable
|
||||
*/
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_is_indices (void *object);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
@@ -101,21 +101,21 @@ _cogl_journal_flush (CoglJournal *journal);
|
||||
void
|
||||
_cogl_journal_discard (CoglJournal *journal);
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
_cogl_journal_all_entries_within_bounds (CoglJournal *journal,
|
||||
float clip_x0,
|
||||
float clip_y0,
|
||||
float clip_x1,
|
||||
float clip_y1);
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
_cogl_journal_try_read_pixel (CoglJournal *journal,
|
||||
int x,
|
||||
int y,
|
||||
CoglBitmap *bitmap,
|
||||
gboolean *found_intersection);
|
||||
CoglBool *found_intersection);
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
_cogl_is_journal (void *object);
|
||||
|
||||
#endif /* __COGL_JOURNAL_PRIVATE_H */
|
||||
|
||||
@@ -119,7 +119,7 @@ typedef struct _CoglJournalFlushState
|
||||
typedef void (*CoglJournalBatchCallback) (CoglJournalEntry *start,
|
||||
int n_entries,
|
||||
void *data);
|
||||
typedef gboolean (*CoglJournalBatchTest) (CoglJournalEntry *entry0,
|
||||
typedef CoglBool (*CoglJournalBatchTest) (CoglJournalEntry *entry0,
|
||||
CoglJournalEntry *entry1);
|
||||
|
||||
static void _cogl_journal_free (CoglJournal *journal);
|
||||
@@ -403,7 +403,7 @@ _cogl_journal_flush_modelview_and_entries (CoglJournalEntry *batch_start,
|
||||
COGL_TIMER_STOP (_cogl_uprof_context, time_flush_modelview_and_entries);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
compare_entry_modelviews (CoglJournalEntry *entry0,
|
||||
CoglJournalEntry *entry1)
|
||||
{
|
||||
@@ -448,7 +448,7 @@ _cogl_journal_flush_pipeline_and_entries (CoglJournalEntry *batch_start,
|
||||
COGL_TIMER_STOP (_cogl_uprof_context, time_flush_pipeline_entries);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
compare_entry_pipelines (CoglJournalEntry *entry0, CoglJournalEntry *entry1)
|
||||
{
|
||||
/* batch rectangles using compatible pipelines */
|
||||
@@ -470,7 +470,7 @@ typedef struct _CreateAttributeState
|
||||
CoglJournalFlushState *flush_state;
|
||||
} CreateAttributeState;
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
create_attribute_cb (CoglPipeline *pipeline,
|
||||
int layer_number,
|
||||
void *user_data)
|
||||
@@ -568,7 +568,7 @@ _cogl_journal_flush_texcoord_vbo_offsets_and_entries (
|
||||
COGL_TIMER_STOP (_cogl_uprof_context, time_flush_texcoord_pipeline_entries);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
compare_entry_layer_numbers (CoglJournalEntry *entry0, CoglJournalEntry *entry1)
|
||||
{
|
||||
if (_cogl_pipeline_layer_numbers_equal (entry0->pipeline, entry1->pipeline))
|
||||
@@ -683,7 +683,7 @@ _cogl_journal_flush_vbo_offsets_and_entries (CoglJournalEntry *batch_start,
|
||||
time_flush_vbo_texcoord_pipeline_entries);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
compare_entry_strides (CoglJournalEntry *entry0, CoglJournalEntry *entry1)
|
||||
{
|
||||
/* Currently the only thing that affects the stride for our vertex arrays
|
||||
@@ -763,7 +763,7 @@ typedef struct
|
||||
float x_2, y_2;
|
||||
} ClipBounds;
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
can_software_clip_entry (CoglJournalEntry *journal_entry,
|
||||
CoglJournalEntry *prev_journal_entry,
|
||||
CoglClipStack *clip_stack,
|
||||
@@ -1038,7 +1038,7 @@ _cogl_journal_maybe_software_clip_entries (CoglJournalEntry *batch_start,
|
||||
time_check_software_clip);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
compare_entry_clip_stacks (CoglJournalEntry *entry0, CoglJournalEntry *entry1)
|
||||
{
|
||||
return entry0->clip_stack == entry1->clip_stack;
|
||||
@@ -1209,7 +1209,7 @@ _cogl_journal_discard (CoglJournal *journal)
|
||||
|
||||
/* Note: A return value of FALSE doesn't mean 'no' it means
|
||||
* 'unknown' */
|
||||
gboolean
|
||||
CoglBool
|
||||
_cogl_journal_all_entries_within_bounds (CoglJournal *journal,
|
||||
float clip_x0,
|
||||
float clip_y0,
|
||||
@@ -1254,7 +1254,7 @@ _cogl_journal_all_entries_within_bounds (CoglJournal *journal,
|
||||
*/
|
||||
for (i = 1; i < journal->entries->len; i++)
|
||||
{
|
||||
gboolean found_reference = FALSE;
|
||||
CoglBool found_reference = FALSE;
|
||||
entry = &g_array_index (journal->entries, CoglJournalEntry, i);
|
||||
|
||||
for (clip_entry = entry->clip_stack;
|
||||
@@ -1416,7 +1416,7 @@ _cogl_journal_flush (CoglJournal *journal)
|
||||
COGL_TIMER_STOP (_cogl_uprof_context, flush_timer);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
add_framebuffer_deps_cb (CoglPipelineLayer *layer, void *user_data)
|
||||
{
|
||||
CoglFramebuffer *framebuffer = user_data;
|
||||
@@ -1664,16 +1664,16 @@ entry_to_screen_polygon (CoglFramebuffer *framebuffer,
|
||||
#undef VIEWPORT_TRANSFORM_Y
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
try_checking_point_hits_entry_after_clipping (CoglFramebuffer *framebuffer,
|
||||
CoglJournalEntry *entry,
|
||||
float *vertices,
|
||||
float x,
|
||||
float y,
|
||||
gboolean *hit)
|
||||
CoglBool *hit)
|
||||
{
|
||||
gboolean can_software_clip = TRUE;
|
||||
gboolean needs_software_clip = FALSE;
|
||||
CoglBool can_software_clip = TRUE;
|
||||
CoglBool needs_software_clip = FALSE;
|
||||
CoglClipStack *clip_entry;
|
||||
|
||||
*hit = TRUE;
|
||||
@@ -1737,12 +1737,12 @@ try_checking_point_hits_entry_after_clipping (CoglFramebuffer *framebuffer,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
_cogl_journal_try_read_pixel (CoglJournal *journal,
|
||||
int x,
|
||||
int y,
|
||||
CoglBitmap *bitmap,
|
||||
gboolean *found_intersection)
|
||||
CoglBool *found_intersection)
|
||||
{
|
||||
CoglContext *ctx;
|
||||
CoglPixelFormat format;
|
||||
@@ -1795,7 +1795,7 @@ _cogl_journal_try_read_pixel (CoglJournal *journal,
|
||||
|
||||
if (entry->clip_stack)
|
||||
{
|
||||
gboolean hit;
|
||||
CoglBool hit;
|
||||
|
||||
if (!try_checking_point_hits_entry_after_clipping (framebuffer,
|
||||
entry,
|
||||
|
||||
@@ -137,7 +137,7 @@ typedef struct _CoglMatrixEntrySave
|
||||
CoglMatrixEntry _parent_data;
|
||||
|
||||
CoglMatrix *cache;
|
||||
gboolean cache_valid;
|
||||
CoglBool cache_valid;
|
||||
|
||||
} CoglMatrixEntrySave;
|
||||
|
||||
@@ -166,8 +166,8 @@ struct _CoglMatrixStack
|
||||
typedef struct _CoglMatrixEntryCache
|
||||
{
|
||||
CoglMatrixEntry *entry;
|
||||
gboolean flushed_identity;
|
||||
gboolean flipped;
|
||||
CoglBool flushed_identity;
|
||||
CoglBool flipped;
|
||||
} CoglMatrixEntryCache;
|
||||
|
||||
void
|
||||
@@ -184,15 +184,15 @@ _cogl_matrix_entry_flush_to_gl_builtins (CoglContext *ctx,
|
||||
CoglMatrixEntry *entry,
|
||||
CoglMatrixMode mode,
|
||||
CoglFramebuffer *framebuffer,
|
||||
gboolean disable_flip);
|
||||
CoglBool disable_flip);
|
||||
|
||||
void
|
||||
_cogl_matrix_entry_cache_init (CoglMatrixEntryCache *cache);
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
_cogl_matrix_entry_cache_maybe_update (CoglMatrixEntryCache *cache,
|
||||
CoglMatrixEntry *entry,
|
||||
gboolean flip);
|
||||
CoglBool flip);
|
||||
|
||||
void
|
||||
_cogl_matrix_entry_cache_destroy (CoglMatrixEntryCache *cache);
|
||||
|
||||
@@ -427,7 +427,7 @@ cogl_matrix_stack_pop (CoglMatrixStack *stack)
|
||||
stack->last_entry = new_top;
|
||||
}
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_matrix_stack_get_inverse (CoglMatrixStack *stack,
|
||||
CoglMatrix *inverse)
|
||||
{
|
||||
@@ -686,7 +686,7 @@ _cogl_matrix_entry_skip_saves (CoglMatrixEntry *entry)
|
||||
return entry;
|
||||
}
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_matrix_entry_calculate_translation (CoglMatrixEntry *entry0,
|
||||
CoglMatrixEntry *entry1,
|
||||
float *x,
|
||||
@@ -813,7 +813,7 @@ cogl_matrix_entry_calculate_translation (CoglMatrixEntry *entry0,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_matrix_entry_is_identity (CoglMatrixEntry *entry)
|
||||
{
|
||||
return entry ? entry->op == COGL_MATRIX_OP_LOAD_IDENTITY : FALSE;
|
||||
@@ -821,7 +821,7 @@ cogl_matrix_entry_is_identity (CoglMatrixEntry *entry)
|
||||
|
||||
static void
|
||||
_cogl_matrix_flush_to_gl_builtin (CoglContext *ctx,
|
||||
gboolean is_identity,
|
||||
CoglBool is_identity,
|
||||
CoglMatrix *matrix,
|
||||
CoglMatrixMode mode)
|
||||
{
|
||||
@@ -863,13 +863,13 @@ _cogl_matrix_entry_flush_to_gl_builtins (CoglContext *ctx,
|
||||
CoglMatrixEntry *entry,
|
||||
CoglMatrixMode mode,
|
||||
CoglFramebuffer *framebuffer,
|
||||
gboolean disable_flip)
|
||||
CoglBool disable_flip)
|
||||
{
|
||||
g_assert (_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_GL_FIXED));
|
||||
|
||||
#ifdef HAVE_COGL_GL
|
||||
{
|
||||
gboolean needs_flip;
|
||||
CoglBool needs_flip;
|
||||
CoglMatrixEntryCache *cache;
|
||||
|
||||
if (mode == COGL_MATRIX_PROJECTION)
|
||||
@@ -901,7 +901,7 @@ _cogl_matrix_entry_flush_to_gl_builtins (CoglContext *ctx,
|
||||
if (!cache ||
|
||||
_cogl_matrix_entry_cache_maybe_update (cache, entry, needs_flip))
|
||||
{
|
||||
gboolean is_identity;
|
||||
CoglBool is_identity;
|
||||
CoglMatrix matrix;
|
||||
|
||||
if (entry->op == COGL_MATRIX_OP_LOAD_IDENTITY)
|
||||
@@ -940,7 +940,7 @@ _cogl_matrix_entry_flush_to_gl_builtins (CoglContext *ctx,
|
||||
#endif
|
||||
}
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_matrix_entry_equal (CoglMatrixEntry *entry0,
|
||||
CoglMatrixEntry *entry1)
|
||||
{
|
||||
@@ -1162,13 +1162,13 @@ _cogl_matrix_entry_cache_init (CoglMatrixEntryCache *cache)
|
||||
|
||||
/* NB: This function can report false negatives since it never does a
|
||||
* deep comparison of the stack matrices. */
|
||||
gboolean
|
||||
CoglBool
|
||||
_cogl_matrix_entry_cache_maybe_update (CoglMatrixEntryCache *cache,
|
||||
CoglMatrixEntry *entry,
|
||||
gboolean flip)
|
||||
CoglBool flip)
|
||||
{
|
||||
gboolean is_identity;
|
||||
gboolean updated = FALSE;
|
||||
CoglBool is_identity;
|
||||
CoglBool updated = FALSE;
|
||||
|
||||
if (cache->flipped != flip)
|
||||
{
|
||||
|
||||
@@ -429,7 +429,7 @@ cogl_matrix_stack_orthographic (CoglMatrixStack *stack,
|
||||
* for degenerate transformations that can't be inverted (in this case the
|
||||
* @inverse matrix will simply be initialized with the identity matrix)
|
||||
*/
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_matrix_stack_get_inverse (CoglMatrixStack *stack,
|
||||
CoglMatrix *inverse);
|
||||
|
||||
@@ -538,7 +538,7 @@ cogl_matrix_stack_set (CoglMatrixStack *stack,
|
||||
* Return value: %TRUE if @object is a #CoglMatrixStack, otherwise
|
||||
* %FALSE.
|
||||
*/
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_is_matrix_stack (void *object);
|
||||
|
||||
/**
|
||||
@@ -560,7 +560,7 @@ cogl_is_matrix_stack (void *object);
|
||||
* @entry0 and the transform of @entry1 is a translation,
|
||||
* otherwise %FALSE.
|
||||
*/
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_matrix_entry_calculate_translation (CoglMatrixEntry *entry0,
|
||||
CoglMatrixEntry *entry1,
|
||||
float *x,
|
||||
@@ -581,7 +581,7 @@ cogl_matrix_entry_calculate_translation (CoglMatrixEntry *entry0,
|
||||
* Return value: %TRUE if @entry is definitely an identity transform,
|
||||
* otherwise %FALSE.
|
||||
*/
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_matrix_entry_is_identity (CoglMatrixEntry *entry);
|
||||
|
||||
/**
|
||||
@@ -599,7 +599,7 @@ cogl_matrix_entry_is_identity (CoglMatrixEntry *entry);
|
||||
* Return value: %TRUE if @entry0 represents the same transform as
|
||||
* @entry1, otherwise %FALSE.
|
||||
*/
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_matrix_entry_equal (CoglMatrixEntry *entry0,
|
||||
CoglMatrixEntry *entry1);
|
||||
|
||||
|
||||
@@ -442,7 +442,7 @@ cogl_debug_matrix_print (const CoglMatrix *matrix)
|
||||
* with partial pivoting followed by back/substitution with the loops manually
|
||||
* unrolled.
|
||||
*/
|
||||
static gboolean
|
||||
static CoglBool
|
||||
invert_matrix_general (CoglMatrix *matrix)
|
||||
{
|
||||
const float *m = (float *)matrix;
|
||||
@@ -581,7 +581,7 @@ invert_matrix_general (CoglMatrix *matrix)
|
||||
* element. Finally deals with the translation part by transforming the
|
||||
* original translation vector using by the calculated submatrix inverse.
|
||||
*/
|
||||
static gboolean
|
||||
static CoglBool
|
||||
invert_matrix_3d_general (CoglMatrix *matrix)
|
||||
{
|
||||
const float *in = (float *)matrix;
|
||||
@@ -663,7 +663,7 @@ invert_matrix_3d_general (CoglMatrix *matrix)
|
||||
* the inverse matrix analyzing and inverting each of the scaling, rotation and
|
||||
* translation parts.
|
||||
*/
|
||||
static gboolean
|
||||
static CoglBool
|
||||
invert_matrix_3d (CoglMatrix *matrix)
|
||||
{
|
||||
const float *in = (float *)matrix;
|
||||
@@ -748,7 +748,7 @@ invert_matrix_3d (CoglMatrix *matrix)
|
||||
*
|
||||
* Simply copies identity into CoglMatrix::inv.
|
||||
*/
|
||||
static gboolean
|
||||
static CoglBool
|
||||
invert_matrix_identity (CoglMatrix *matrix)
|
||||
{
|
||||
memcpy (matrix->inv, identity, 16 * sizeof (float));
|
||||
@@ -765,7 +765,7 @@ invert_matrix_identity (CoglMatrix *matrix)
|
||||
*
|
||||
* Calculates the
|
||||
*/
|
||||
static gboolean
|
||||
static CoglBool
|
||||
invert_matrix_3d_no_rotation (CoglMatrix *matrix)
|
||||
{
|
||||
const float *in = (float *)matrix;
|
||||
@@ -800,7 +800,7 @@ invert_matrix_3d_no_rotation (CoglMatrix *matrix)
|
||||
* Calculates the inverse matrix by applying the inverse scaling and
|
||||
* translation to the identity matrix.
|
||||
*/
|
||||
static gboolean
|
||||
static CoglBool
|
||||
invert_matrix_2d_no_rotation (CoglMatrix *matrix)
|
||||
{
|
||||
const float *in = (float *)matrix;
|
||||
@@ -824,7 +824,7 @@ invert_matrix_2d_no_rotation (CoglMatrix *matrix)
|
||||
|
||||
#if 0
|
||||
/* broken */
|
||||
static gboolean
|
||||
static CoglBool
|
||||
invert_matrix_perspective (CoglMatrix *matrix)
|
||||
{
|
||||
const float *in = matrix;
|
||||
@@ -854,7 +854,7 @@ invert_matrix_perspective (CoglMatrix *matrix)
|
||||
/*
|
||||
* Matrix inversion function pointer type.
|
||||
*/
|
||||
typedef gboolean (*inv_mat_func)(CoglMatrix *matrix);
|
||||
typedef CoglBool (*inv_mat_func)(CoglMatrix *matrix);
|
||||
|
||||
/*
|
||||
* Table of the matrix inversion functions according to the matrix type.
|
||||
@@ -1112,7 +1112,7 @@ _cogl_matrix_update_type_and_flags (CoglMatrix *matrix)
|
||||
* given matrix type. In case of failure, updates the MAT_FLAG_SINGULAR flag,
|
||||
* and copies the identity matrix into CoglMatrix::inv.
|
||||
*/
|
||||
static gboolean
|
||||
static CoglBool
|
||||
_cogl_matrix_update_inverse (CoglMatrix *matrix)
|
||||
{
|
||||
if (matrix->flags & MAT_DIRTY_FLAGS ||
|
||||
@@ -1137,7 +1137,7 @@ _cogl_matrix_update_inverse (CoglMatrix *matrix)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_matrix_get_inverse (const CoglMatrix *matrix, CoglMatrix *inverse)
|
||||
{
|
||||
if (_cogl_matrix_update_inverse ((CoglMatrix *)matrix))
|
||||
@@ -1169,7 +1169,7 @@ _cogl_matrix_rotate (CoglMatrix *matrix,
|
||||
{
|
||||
float xx, yy, zz, xy, yz, zx, xs, ys, zs, one_c, s, c;
|
||||
float m[16];
|
||||
gboolean optimized;
|
||||
CoglBool optimized;
|
||||
|
||||
s = sinf (angle * DEG2RAD);
|
||||
c = cosf (angle * DEG2RAD);
|
||||
@@ -1667,7 +1667,7 @@ cogl_matrix_init_translation (CoglMatrix *matrix,
|
||||
/*
|
||||
* Test if the given matrix preserves vector lengths.
|
||||
*/
|
||||
static gboolean
|
||||
static CoglBool
|
||||
_cogl_matrix_is_length_preserving (const CoglMatrix *m)
|
||||
{
|
||||
return TEST_MAT_FLAGS (m, MAT_FLAGS_LENGTH_PRESERVING);
|
||||
@@ -1677,7 +1677,7 @@ _cogl_matrix_is_length_preserving (const CoglMatrix *m)
|
||||
* Test if the given matrix does any rotation.
|
||||
* (or perhaps if the upper-left 3x3 is non-identity)
|
||||
*/
|
||||
static gboolean
|
||||
static CoglBool
|
||||
_cogl_matrix_has_rotation (const CoglMatrix *matrix)
|
||||
{
|
||||
if (matrix->flags & (MAT_FLAG_GENERAL |
|
||||
@@ -1689,13 +1689,13 @@ _cogl_matrix_has_rotation (const CoglMatrix *matrix)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
_cogl_matrix_is_general_scale (const CoglMatrix *matrix)
|
||||
{
|
||||
return (matrix->flags & MAT_FLAG_GENERAL_SCALE) ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
_cogl_matrix_is_dirty (const CoglMatrix *matrix)
|
||||
{
|
||||
return (matrix->flags & MAT_DIRTY_ALL) ? TRUE : FALSE;
|
||||
@@ -1936,7 +1936,7 @@ cogl_matrix_view_2d_in_perspective (CoglMatrix *matrix,
|
||||
height_2d);
|
||||
}
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_matrix_equal (const void *v1, const void *v2)
|
||||
{
|
||||
const CoglMatrix *a = v1;
|
||||
@@ -2215,7 +2215,7 @@ cogl_matrix_project_points (const CoglMatrix *matrix,
|
||||
}
|
||||
}
|
||||
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_matrix_is_identity (const CoglMatrix *matrix)
|
||||
{
|
||||
if (!(matrix->flags & MAT_DIRTY_TYPE) &&
|
||||
|
||||
@@ -549,7 +549,7 @@ cogl_matrix_init_from_euler (CoglMatrix *matrix,
|
||||
*
|
||||
* Since: 1.4
|
||||
*/
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_matrix_equal (const void *v1, const void *v2);
|
||||
|
||||
/**
|
||||
@@ -599,7 +599,7 @@ cogl_matrix_free (CoglMatrix *matrix);
|
||||
*
|
||||
* Since: 1.2
|
||||
*/
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_matrix_get_inverse (const CoglMatrix *matrix,
|
||||
CoglMatrix *inverse);
|
||||
|
||||
@@ -747,7 +747,7 @@ cogl_matrix_project_points (const CoglMatrix *matrix,
|
||||
* Returns: %TRUE if @matrix is an identity matrix else %FALSE
|
||||
* Since: 1.8
|
||||
*/
|
||||
gboolean
|
||||
CoglBool
|
||||
cogl_matrix_is_identity (const CoglMatrix *matrix);
|
||||
|
||||
/**
|
||||
|
||||
@@ -227,8 +227,8 @@ typedef struct _ClampData
|
||||
{
|
||||
float start;
|
||||
float end;
|
||||
gboolean s_flipped;
|
||||
gboolean t_flipped;
|
||||
CoglBool s_flipped;
|
||||
CoglBool t_flipped;
|
||||
CoglMetaTextureCallback callback;
|
||||
void *user_data;
|
||||
} ClampData;
|
||||
@@ -277,7 +277,7 @@ clamp_t_cb (CoglTexture *sub_texture,
|
||||
clamp_data->user_data);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static CoglBool
|
||||
foreach_clamped_region (CoglMetaTexture *meta_texture,
|
||||
float *tx_1,
|
||||
float *ty_1,
|
||||
@@ -517,7 +517,7 @@ cogl_meta_texture_foreach_in_region (CoglMetaTexture *meta_texture,
|
||||
if (wrap_s == COGL_PIPELINE_WRAP_MODE_CLAMP_TO_EDGE ||
|
||||
wrap_t == COGL_PIPELINE_WRAP_MODE_CLAMP_TO_EDGE)
|
||||
{
|
||||
gboolean finished = foreach_clamped_region (meta_texture,
|
||||
CoglBool finished = foreach_clamped_region (meta_texture,
|
||||
&tx_1, &ty_1, &tx_2, &ty_2,
|
||||
wrap_s, wrap_t,
|
||||
callback,
|
||||
|
||||
@@ -60,7 +60,7 @@ struct _CoglNode
|
||||
|
||||
/* TRUE if the node took a strong reference on its parent. Weak
|
||||
* pipelines for instance don't take a reference on their parent. */
|
||||
gboolean has_parent_reference;
|
||||
CoglBool has_parent_reference;
|
||||
};
|
||||
|
||||
#define COGL_NODE(X) ((CoglNode *)(X))
|
||||
@@ -74,12 +74,12 @@ void
|
||||
_cogl_pipeline_node_set_parent_real (CoglNode *node,
|
||||
CoglNode *parent,
|
||||
CoglNodeUnparentVFunc unparent,
|
||||
gboolean take_strong_reference);
|
||||
CoglBool take_strong_reference);
|
||||
|
||||
void
|
||||
_cogl_pipeline_node_unparent_real (CoglNode *node);
|
||||
|
||||
typedef gboolean (*CoglNodeChildCallback) (CoglNode *child, void *user_data);
|
||||
typedef CoglBool (*CoglNodeChildCallback) (CoglNode *child, void *user_data);
|
||||
|
||||
void
|
||||
_cogl_pipeline_node_foreach_child (CoglNode *node,
|
||||
|
||||
@@ -47,7 +47,7 @@ void
|
||||
_cogl_pipeline_node_set_parent_real (CoglNode *node,
|
||||
CoglNode *parent,
|
||||
CoglNodeUnparentVFunc unparent,
|
||||
gboolean take_strong_reference)
|
||||
CoglBool take_strong_reference)
|
||||
{
|
||||
/* NB: the old parent may indirectly be keeping the new parent alive
|
||||
* so we have to ref the new parent before unrefing the old.
|
||||
|
||||
@@ -202,7 +202,7 @@ COGL_OBJECT_COMMON_DEFINE_WITH_CODE(TypeName, \
|
||||
do { code; } while (0); \
|
||||
_COGL_GTYPE_INIT_CLASS (type_name)) \
|
||||
\
|
||||
gboolean \
|
||||
CoglBool \
|
||||
cogl_is_##type_name (void *object) \
|
||||
{ \
|
||||
CoglObject *obj = object; \
|
||||
@@ -217,7 +217,7 @@ cogl_is_##type_name (void *object) \
|
||||
\
|
||||
COGL_OBJECT_COMMON_DEFINE_WITH_CODE(TypeName, type_name, code) \
|
||||
\
|
||||
gboolean \
|
||||
CoglBool \
|
||||
cogl_is_##type_name (void *object) \
|
||||
{ \
|
||||
CoglObject *obj = object; \
|
||||
@@ -232,7 +232,7 @@ cogl_is_##type_name (void *object) \
|
||||
\
|
||||
COGL_OBJECT_COMMON_DEFINE_WITH_CODE(TypeName, type_name, code) \
|
||||
\
|
||||
gboolean \
|
||||
CoglBool \
|
||||
_cogl_is_##type_name (void *object) \
|
||||
{ \
|
||||
CoglObject *obj = object; \
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user