mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 09:30:45 -05:00
2006-12-27 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-color.h: * clutter/clutter-color.c: Add clutter_color_to_string(), which creates a hex-encoded color string from a ClutterColor.
This commit is contained in:
parent
17ba56b2fa
commit
89de2fa269
@ -1,3 +1,9 @@
|
|||||||
|
2006-12-27 Emmanuele Bassi <ebassi@openedhand.com>
|
||||||
|
|
||||||
|
* clutter/clutter-color.h:
|
||||||
|
* clutter/clutter-color.c: Add clutter_color_to_string(),
|
||||||
|
which creates a hex-encoded color string from a ClutterColor.
|
||||||
|
|
||||||
2006-12-20 Matthew Allum <mallum@openedhand.com>
|
2006-12-20 Matthew Allum <mallum@openedhand.com>
|
||||||
|
|
||||||
* NEWS:
|
* NEWS:
|
||||||
|
@ -416,6 +416,32 @@ clutter_color_parse (const gchar *color,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* clutter_color_to_string:
|
||||||
|
* @color: a #ClutterColor
|
||||||
|
*
|
||||||
|
* Returns a textual specification of @color in the hexadecimal form
|
||||||
|
* <literal>#rrrrggggbbbbaaaa</literal>, where <literal>r</literal>,
|
||||||
|
* <literal>g</literal>, <literal>b</literal> and <literal>a</literal> are
|
||||||
|
* hex digits representing the red, green, blue and alpha components
|
||||||
|
* respectively.
|
||||||
|
*
|
||||||
|
* Return value: a newly-allocated text string
|
||||||
|
*
|
||||||
|
* Since: 0.2
|
||||||
|
*/
|
||||||
|
gchar *
|
||||||
|
clutter_color_to_string (const ClutterColor *color)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (color != NULL, NULL);
|
||||||
|
|
||||||
|
return g_strdup_printf ("#%04x%04x%04x%04x",
|
||||||
|
color->red,
|
||||||
|
color->green,
|
||||||
|
color->blue,
|
||||||
|
color->alpha);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* clutter_color_equal:
|
* clutter_color_equal:
|
||||||
* @a: a #ClutterColor
|
* @a: a #ClutterColor
|
||||||
|
@ -49,6 +49,7 @@ gboolean clutter_color_parse (const gchar *color,
|
|||||||
ClutterColor *dest);
|
ClutterColor *dest);
|
||||||
gboolean clutter_color_equal (const ClutterColor *a,
|
gboolean clutter_color_equal (const ClutterColor *a,
|
||||||
const ClutterColor *b);
|
const ClutterColor *b);
|
||||||
|
gchar * clutter_color_to_string (const ClutterColor *color);
|
||||||
|
|
||||||
GType clutter_color_get_type (void) G_GNUC_CONST;
|
GType clutter_color_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
|
@ -50,7 +50,8 @@ typedef enum
|
|||||||
CLUTTER_MOTION,
|
CLUTTER_MOTION,
|
||||||
CLUTTER_BUTTON_PRESS,
|
CLUTTER_BUTTON_PRESS,
|
||||||
CLUTTER_2BUTTON_PRESS, /* Double click */
|
CLUTTER_2BUTTON_PRESS, /* Double click */
|
||||||
CLUTTER_BUTTON_RELEASE
|
CLUTTER_BUTTON_RELEASE,
|
||||||
|
CLUTTER_DELETE_EVENT
|
||||||
} ClutterEventType;
|
} ClutterEventType;
|
||||||
|
|
||||||
#define CLUTTER_TYPE_EVENT (clutter_event_get_type ())
|
#define CLUTTER_TYPE_EVENT (clutter_event_get_type ())
|
||||||
@ -64,6 +65,7 @@ typedef struct _ClutterMotionEvent ClutterMotionEvent;
|
|||||||
|
|
||||||
typedef struct _ClutterInputDevice ClutterInputDevice;
|
typedef struct _ClutterInputDevice ClutterInputDevice;
|
||||||
|
|
||||||
|
|
||||||
struct _ClutterAnyEvent
|
struct _ClutterAnyEvent
|
||||||
{
|
{
|
||||||
ClutterEventType type;
|
ClutterEventType type;
|
||||||
|
@ -92,6 +92,7 @@ enum
|
|||||||
KEY_PRESS_EVENT,
|
KEY_PRESS_EVENT,
|
||||||
KEY_RELEASE_EVENT,
|
KEY_RELEASE_EVENT,
|
||||||
MOTION_EVENT,
|
MOTION_EVENT,
|
||||||
|
DELETE_EVENT,
|
||||||
|
|
||||||
LAST_SIGNAL
|
LAST_SIGNAL
|
||||||
};
|
};
|
||||||
@ -832,7 +833,16 @@ clutter_stage_class_init (ClutterStageClass *klass)
|
|||||||
clutter_marshal_VOID__BOXED,
|
clutter_marshal_VOID__BOXED,
|
||||||
G_TYPE_NONE, 1,
|
G_TYPE_NONE, 1,
|
||||||
CLUTTER_TYPE_EVENT);
|
CLUTTER_TYPE_EVENT);
|
||||||
|
stage_signals[DELETE_EVENT] =
|
||||||
|
g_signal_new ("delete-event",
|
||||||
|
G_TYPE_FROM_CLASS (gobject_class),
|
||||||
|
G_SIGNAL_RUN_LAST,
|
||||||
|
G_STRUCT_OFFSET (ClutterStageClass, delete_event),
|
||||||
|
NULL, NULL,
|
||||||
|
clutter_marshal_VOID__BOXED,
|
||||||
|
G_TYPE_NONE, 1,
|
||||||
|
CLUTTER_TYPE_EVENT);
|
||||||
|
|
||||||
g_type_class_add_private (gobject_class, sizeof (ClutterStagePrivate));
|
g_type_class_add_private (gobject_class, sizeof (ClutterStagePrivate));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,6 +97,8 @@ struct _ClutterStageClass
|
|||||||
ClutterKeyEvent *event);
|
ClutterKeyEvent *event);
|
||||||
void (*motion_event) (ClutterStage *stage,
|
void (*motion_event) (ClutterStage *stage,
|
||||||
ClutterMotionEvent *event);
|
ClutterMotionEvent *event);
|
||||||
|
void (*delete_event) (ClutterStage *stage,
|
||||||
|
ClutterEvent *event);
|
||||||
|
|
||||||
/* padding for future expansion */
|
/* padding for future expansion */
|
||||||
void (*_clutter_stage1) (void);
|
void (*_clutter_stage1) (void);
|
||||||
|
@ -1,3 +1,28 @@
|
|||||||
|
/*
|
||||||
|
* 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, write to the
|
||||||
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
* Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef __CLUTTER_VERSION_H__
|
#ifndef __CLUTTER_VERSION_H__
|
||||||
#define __CLUTTER_VERSION_H__
|
#define __CLUTTER_VERSION_H__
|
||||||
|
|
||||||
|
@ -1,3 +1,28 @@
|
|||||||
|
/*
|
||||||
|
* 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, write to the
|
||||||
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
* Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef _HAVE_CLUTTER_H
|
#ifndef _HAVE_CLUTTER_H
|
||||||
#define _HAVE_CLUTTER_H
|
#define _HAVE_CLUTTER_H
|
||||||
|
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
# An odd micro number indicates in-progress development, (eg. from CVS)
|
# An odd micro number indicates in-progress development, (eg. from CVS)
|
||||||
# An even micro number indicates a released version.
|
# An even micro number indicates a released version.
|
||||||
m4_define([clutter_major_version], [0])
|
m4_define([clutter_major_version], [0])
|
||||||
m4_define([clutter_minor_version], [1])
|
m4_define([clutter_minor_version], [2])
|
||||||
m4_define([clutter_micro_version], [1])
|
m4_define([clutter_micro_version], [0])
|
||||||
|
|
||||||
m4_define([clutter_version],
|
m4_define([clutter_version],
|
||||||
[clutter_major_version.clutter_minor_version.clutter_micro_version])
|
[clutter_major_version.clutter_minor_version.clutter_micro_version])
|
||||||
|
@ -469,6 +469,8 @@ ClutterColor
|
|||||||
clutter_color_copy
|
clutter_color_copy
|
||||||
clutter_color_free
|
clutter_color_free
|
||||||
clutter_color_parse
|
clutter_color_parse
|
||||||
|
clutter_color_from_hls
|
||||||
|
clutter_color_from_pixel
|
||||||
clutter_color_add
|
clutter_color_add
|
||||||
clutter_color_subtract
|
clutter_color_subtract
|
||||||
clutter_color_equal
|
clutter_color_equal
|
||||||
@ -476,9 +478,8 @@ clutter_color_lighten
|
|||||||
clutter_color_darken
|
clutter_color_darken
|
||||||
clutter_color_shade
|
clutter_color_shade
|
||||||
clutter_color_to_hls
|
clutter_color_to_hls
|
||||||
clutter_color_from_hls
|
|
||||||
clutter_color_to_pixel
|
clutter_color_to_pixel
|
||||||
clutter_color_from_pixel
|
clutter_color_to_string
|
||||||
<SUBSECTION Standard>
|
<SUBSECTION Standard>
|
||||||
CLUTTER_TYPE_COLOR
|
CLUTTER_TYPE_COLOR
|
||||||
<SUBSECTION Private>
|
<SUBSECTION Private>
|
||||||
|
@ -54,6 +54,26 @@ clutter-color
|
|||||||
@Returns:
|
@Returns:
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ##### FUNCTION clutter_color_from_hls ##### -->
|
||||||
|
<para>
|
||||||
|
|
||||||
|
</para>
|
||||||
|
|
||||||
|
@dest:
|
||||||
|
@hue:
|
||||||
|
@luminance:
|
||||||
|
@saturation:
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ##### FUNCTION clutter_color_from_pixel ##### -->
|
||||||
|
<para>
|
||||||
|
|
||||||
|
</para>
|
||||||
|
|
||||||
|
@dest:
|
||||||
|
@pixel:
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### FUNCTION clutter_color_add ##### -->
|
<!-- ##### FUNCTION clutter_color_add ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
@ -123,17 +143,6 @@ clutter-color
|
|||||||
@saturation:
|
@saturation:
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### FUNCTION clutter_color_from_hls ##### -->
|
|
||||||
<para>
|
|
||||||
|
|
||||||
</para>
|
|
||||||
|
|
||||||
@dest:
|
|
||||||
@hue:
|
|
||||||
@luminance:
|
|
||||||
@saturation:
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### FUNCTION clutter_color_to_pixel ##### -->
|
<!-- ##### FUNCTION clutter_color_to_pixel ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
@ -143,12 +152,12 @@ clutter-color
|
|||||||
@Returns:
|
@Returns:
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### FUNCTION clutter_color_from_pixel ##### -->
|
<!-- ##### FUNCTION clutter_color_to_string ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@dest:
|
@color:
|
||||||
@pixel:
|
@Returns:
|
||||||
|
|
||||||
|
|
||||||
|
@ -29,6 +29,7 @@ Windowing events handled by Clutter.
|
|||||||
@CLUTTER_BUTTON_PRESS:
|
@CLUTTER_BUTTON_PRESS:
|
||||||
@CLUTTER_2BUTTON_PRESS:
|
@CLUTTER_2BUTTON_PRESS:
|
||||||
@CLUTTER_BUTTON_RELEASE:
|
@CLUTTER_BUTTON_RELEASE:
|
||||||
|
@CLUTTER_DELETE_EVENT:
|
||||||
|
|
||||||
<!-- ##### STRUCT ClutterAnyEvent ##### -->
|
<!-- ##### STRUCT ClutterAnyEvent ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
@ -53,6 +53,14 @@ Macro evaluating to the height of the #ClutterStage
|
|||||||
@clutterstage: the object which received the signal.
|
@clutterstage: the object which received the signal.
|
||||||
@arg1:
|
@arg1:
|
||||||
|
|
||||||
|
<!-- ##### SIGNAL ClutterStage::delete-event ##### -->
|
||||||
|
<para>
|
||||||
|
|
||||||
|
</para>
|
||||||
|
|
||||||
|
@clutterstage: the object which received the signal.
|
||||||
|
@arg1:
|
||||||
|
|
||||||
<!-- ##### SIGNAL ClutterStage::input-event ##### -->
|
<!-- ##### SIGNAL ClutterStage::input-event ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
@ -117,6 +125,7 @@ Macro evaluating to the height of the #ClutterStage
|
|||||||
@key_press_event:
|
@key_press_event:
|
||||||
@key_release_event:
|
@key_release_event:
|
||||||
@motion_event:
|
@motion_event:
|
||||||
|
@delete_event:
|
||||||
@_clutter_stage1:
|
@_clutter_stage1:
|
||||||
@_clutter_stage2:
|
@_clutter_stage2:
|
||||||
@_clutter_stage3:
|
@_clutter_stage3:
|
||||||
|
Loading…
Reference in New Issue
Block a user