Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
GNOME
gtk
Commits
be698675
Commit
be698675
authored
Nov 13, 2000
by
Alexander Larsson
Browse files
Cleanup and reindent of GtkFB.
Added some serial mouse support. Updates to latest Gtk+/pango
parent
b664be5f
Changes
28
Expand all
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
be698675
2000-11-13 Alexander Larsson <alexl@redhat.com>
* gdk/linux-fb/*.[ch]:
Massive reindent to gtk+ standard. My hands hurt.
* gdk/linux-fb/gdkcolor-fb.c:
Move GdkColorPrivateFB from inherited to windowing_data
* gdk/linux-fb/gdkcursor-fb.c:
_gdk_cursor_new_from_pixmap made static
* gdk/linux-fb/gdkdnd-fb.c:
GdkDragContextPrivate moved to windowing_data
* gdk/linux-fb/gdkdrawable-fb2.c:
Removed endian.h, use glib endianness macros instead
Some cleanups in the usage of GDK_DRAWABLE_FBDATA
and GDK_DRAWABLE_IMPL_FBDATA
* gdk/linux-fb/gdkfont-fb.c:
Add empty gdk_font_load(). Needed for linking of Gtk+.
* gdk/linux-fb/gdkimage-fb.c:
Removed endian.h, use glib endianness macros instead
Moved GdkImagePrivateFB to windowing_data
gdk_image_new_bitmap didn't always allocate enough
memory.
* gdk/linux-fb/gdkinput-ps2.c:
Added semi-working support for MS serial mice.
* gdk/linux-fb/gdkprivate-fb.h:
s/GdkWindowPrivate/GdkWindowObject/
Removed GdkWindowPrivate typedef
s/GDK_DRAWABLE_P/GDK_DRAWABLE_FBDATA/
Removed GDK_DRAWABLE_P
Move GdkColorPrivateFB from inherited to windowing_data
Moved GdkImagePrivateFB to windowing_data
* gdk/linux-fb/gdkvisual-fb.c:
Removed some unused debug code.
* gdk/linux-fb/gdkwindow-fb.c:
Use stock cursors instead of including X headers.
s/GdkWindowPrivate/GdkWindowObject/
* gdk/linux-fb/mitypes.h:
Removed unused types.
* modules/linux-fb/basic.c:
Use the pango fribidi wrappers.
2000-11-13 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* gdk/linux-fb/gdkcolor-fb.c, gdk/nanox/gdkmain-nanox.c,
...
...
ChangeLog.pre-2-0
View file @
be698675
2000-11-13 Alexander Larsson <alexl@redhat.com>
* gdk/linux-fb/*.[ch]:
Massive reindent to gtk+ standard. My hands hurt.
* gdk/linux-fb/gdkcolor-fb.c:
Move GdkColorPrivateFB from inherited to windowing_data
* gdk/linux-fb/gdkcursor-fb.c:
_gdk_cursor_new_from_pixmap made static
* gdk/linux-fb/gdkdnd-fb.c:
GdkDragContextPrivate moved to windowing_data
* gdk/linux-fb/gdkdrawable-fb2.c:
Removed endian.h, use glib endianness macros instead
Some cleanups in the usage of GDK_DRAWABLE_FBDATA
and GDK_DRAWABLE_IMPL_FBDATA
* gdk/linux-fb/gdkfont-fb.c:
Add empty gdk_font_load(). Needed for linking of Gtk+.
* gdk/linux-fb/gdkimage-fb.c:
Removed endian.h, use glib endianness macros instead
Moved GdkImagePrivateFB to windowing_data
gdk_image_new_bitmap didn't always allocate enough
memory.
* gdk/linux-fb/gdkinput-ps2.c:
Added semi-working support for MS serial mice.
* gdk/linux-fb/gdkprivate-fb.h:
s/GdkWindowPrivate/GdkWindowObject/
Removed GdkWindowPrivate typedef
s/GDK_DRAWABLE_P/GDK_DRAWABLE_FBDATA/
Removed GDK_DRAWABLE_P
Move GdkColorPrivateFB from inherited to windowing_data
Moved GdkImagePrivateFB to windowing_data
* gdk/linux-fb/gdkvisual-fb.c:
Removed some unused debug code.
* gdk/linux-fb/gdkwindow-fb.c:
Use stock cursors instead of including X headers.
s/GdkWindowPrivate/GdkWindowObject/
* gdk/linux-fb/mitypes.h:
Removed unused types.
* modules/linux-fb/basic.c:
Use the pango fribidi wrappers.
2000-11-13 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* gdk/linux-fb/gdkcolor-fb.c, gdk/nanox/gdkmain-nanox.c,
...
...
ChangeLog.pre-2-10
View file @
be698675
2000-11-13 Alexander Larsson <alexl@redhat.com>
* gdk/linux-fb/*.[ch]:
Massive reindent to gtk+ standard. My hands hurt.
* gdk/linux-fb/gdkcolor-fb.c:
Move GdkColorPrivateFB from inherited to windowing_data
* gdk/linux-fb/gdkcursor-fb.c:
_gdk_cursor_new_from_pixmap made static
* gdk/linux-fb/gdkdnd-fb.c:
GdkDragContextPrivate moved to windowing_data
* gdk/linux-fb/gdkdrawable-fb2.c:
Removed endian.h, use glib endianness macros instead
Some cleanups in the usage of GDK_DRAWABLE_FBDATA
and GDK_DRAWABLE_IMPL_FBDATA
* gdk/linux-fb/gdkfont-fb.c:
Add empty gdk_font_load(). Needed for linking of Gtk+.
* gdk/linux-fb/gdkimage-fb.c:
Removed endian.h, use glib endianness macros instead
Moved GdkImagePrivateFB to windowing_data
gdk_image_new_bitmap didn't always allocate enough
memory.
* gdk/linux-fb/gdkinput-ps2.c:
Added semi-working support for MS serial mice.
* gdk/linux-fb/gdkprivate-fb.h:
s/GdkWindowPrivate/GdkWindowObject/
Removed GdkWindowPrivate typedef
s/GDK_DRAWABLE_P/GDK_DRAWABLE_FBDATA/
Removed GDK_DRAWABLE_P
Move GdkColorPrivateFB from inherited to windowing_data
Moved GdkImagePrivateFB to windowing_data
* gdk/linux-fb/gdkvisual-fb.c:
Removed some unused debug code.
* gdk/linux-fb/gdkwindow-fb.c:
Use stock cursors instead of including X headers.
s/GdkWindowPrivate/GdkWindowObject/
* gdk/linux-fb/mitypes.h:
Removed unused types.
* modules/linux-fb/basic.c:
Use the pango fribidi wrappers.
2000-11-13 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* gdk/linux-fb/gdkcolor-fb.c, gdk/nanox/gdkmain-nanox.c,
...
...
ChangeLog.pre-2-2
View file @
be698675
2000-11-13 Alexander Larsson <alexl@redhat.com>
* gdk/linux-fb/*.[ch]:
Massive reindent to gtk+ standard. My hands hurt.
* gdk/linux-fb/gdkcolor-fb.c:
Move GdkColorPrivateFB from inherited to windowing_data
* gdk/linux-fb/gdkcursor-fb.c:
_gdk_cursor_new_from_pixmap made static
* gdk/linux-fb/gdkdnd-fb.c:
GdkDragContextPrivate moved to windowing_data
* gdk/linux-fb/gdkdrawable-fb2.c:
Removed endian.h, use glib endianness macros instead
Some cleanups in the usage of GDK_DRAWABLE_FBDATA
and GDK_DRAWABLE_IMPL_FBDATA
* gdk/linux-fb/gdkfont-fb.c:
Add empty gdk_font_load(). Needed for linking of Gtk+.
* gdk/linux-fb/gdkimage-fb.c:
Removed endian.h, use glib endianness macros instead
Moved GdkImagePrivateFB to windowing_data
gdk_image_new_bitmap didn't always allocate enough
memory.
* gdk/linux-fb/gdkinput-ps2.c:
Added semi-working support for MS serial mice.
* gdk/linux-fb/gdkprivate-fb.h:
s/GdkWindowPrivate/GdkWindowObject/
Removed GdkWindowPrivate typedef
s/GDK_DRAWABLE_P/GDK_DRAWABLE_FBDATA/
Removed GDK_DRAWABLE_P
Move GdkColorPrivateFB from inherited to windowing_data
Moved GdkImagePrivateFB to windowing_data
* gdk/linux-fb/gdkvisual-fb.c:
Removed some unused debug code.
* gdk/linux-fb/gdkwindow-fb.c:
Use stock cursors instead of including X headers.
s/GdkWindowPrivate/GdkWindowObject/
* gdk/linux-fb/mitypes.h:
Removed unused types.
* modules/linux-fb/basic.c:
Use the pango fribidi wrappers.
2000-11-13 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* gdk/linux-fb/gdkcolor-fb.c, gdk/nanox/gdkmain-nanox.c,
...
...
ChangeLog.pre-2-4
View file @
be698675
2000-11-13 Alexander Larsson <alexl@redhat.com>
* gdk/linux-fb/*.[ch]:
Massive reindent to gtk+ standard. My hands hurt.
* gdk/linux-fb/gdkcolor-fb.c:
Move GdkColorPrivateFB from inherited to windowing_data
* gdk/linux-fb/gdkcursor-fb.c:
_gdk_cursor_new_from_pixmap made static
* gdk/linux-fb/gdkdnd-fb.c:
GdkDragContextPrivate moved to windowing_data
* gdk/linux-fb/gdkdrawable-fb2.c:
Removed endian.h, use glib endianness macros instead
Some cleanups in the usage of GDK_DRAWABLE_FBDATA
and GDK_DRAWABLE_IMPL_FBDATA
* gdk/linux-fb/gdkfont-fb.c:
Add empty gdk_font_load(). Needed for linking of Gtk+.
* gdk/linux-fb/gdkimage-fb.c:
Removed endian.h, use glib endianness macros instead
Moved GdkImagePrivateFB to windowing_data
gdk_image_new_bitmap didn't always allocate enough
memory.
* gdk/linux-fb/gdkinput-ps2.c:
Added semi-working support for MS serial mice.
* gdk/linux-fb/gdkprivate-fb.h:
s/GdkWindowPrivate/GdkWindowObject/
Removed GdkWindowPrivate typedef
s/GDK_DRAWABLE_P/GDK_DRAWABLE_FBDATA/
Removed GDK_DRAWABLE_P
Move GdkColorPrivateFB from inherited to windowing_data
Moved GdkImagePrivateFB to windowing_data
* gdk/linux-fb/gdkvisual-fb.c:
Removed some unused debug code.
* gdk/linux-fb/gdkwindow-fb.c:
Use stock cursors instead of including X headers.
s/GdkWindowPrivate/GdkWindowObject/
* gdk/linux-fb/mitypes.h:
Removed unused types.
* modules/linux-fb/basic.c:
Use the pango fribidi wrappers.
2000-11-13 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* gdk/linux-fb/gdkcolor-fb.c, gdk/nanox/gdkmain-nanox.c,
...
...
ChangeLog.pre-2-6
View file @
be698675
2000-11-13 Alexander Larsson <alexl@redhat.com>
* gdk/linux-fb/*.[ch]:
Massive reindent to gtk+ standard. My hands hurt.
* gdk/linux-fb/gdkcolor-fb.c:
Move GdkColorPrivateFB from inherited to windowing_data
* gdk/linux-fb/gdkcursor-fb.c:
_gdk_cursor_new_from_pixmap made static
* gdk/linux-fb/gdkdnd-fb.c:
GdkDragContextPrivate moved to windowing_data
* gdk/linux-fb/gdkdrawable-fb2.c:
Removed endian.h, use glib endianness macros instead
Some cleanups in the usage of GDK_DRAWABLE_FBDATA
and GDK_DRAWABLE_IMPL_FBDATA
* gdk/linux-fb/gdkfont-fb.c:
Add empty gdk_font_load(). Needed for linking of Gtk+.
* gdk/linux-fb/gdkimage-fb.c:
Removed endian.h, use glib endianness macros instead
Moved GdkImagePrivateFB to windowing_data
gdk_image_new_bitmap didn't always allocate enough
memory.
* gdk/linux-fb/gdkinput-ps2.c:
Added semi-working support for MS serial mice.
* gdk/linux-fb/gdkprivate-fb.h:
s/GdkWindowPrivate/GdkWindowObject/
Removed GdkWindowPrivate typedef
s/GDK_DRAWABLE_P/GDK_DRAWABLE_FBDATA/
Removed GDK_DRAWABLE_P
Move GdkColorPrivateFB from inherited to windowing_data
Moved GdkImagePrivateFB to windowing_data
* gdk/linux-fb/gdkvisual-fb.c:
Removed some unused debug code.
* gdk/linux-fb/gdkwindow-fb.c:
Use stock cursors instead of including X headers.
s/GdkWindowPrivate/GdkWindowObject/
* gdk/linux-fb/mitypes.h:
Removed unused types.
* modules/linux-fb/basic.c:
Use the pango fribidi wrappers.
2000-11-13 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* gdk/linux-fb/gdkcolor-fb.c, gdk/nanox/gdkmain-nanox.c,
...
...
ChangeLog.pre-2-8
View file @
be698675
2000-11-13 Alexander Larsson <alexl@redhat.com>
* gdk/linux-fb/*.[ch]:
Massive reindent to gtk+ standard. My hands hurt.
* gdk/linux-fb/gdkcolor-fb.c:
Move GdkColorPrivateFB from inherited to windowing_data
* gdk/linux-fb/gdkcursor-fb.c:
_gdk_cursor_new_from_pixmap made static
* gdk/linux-fb/gdkdnd-fb.c:
GdkDragContextPrivate moved to windowing_data
* gdk/linux-fb/gdkdrawable-fb2.c:
Removed endian.h, use glib endianness macros instead
Some cleanups in the usage of GDK_DRAWABLE_FBDATA
and GDK_DRAWABLE_IMPL_FBDATA
* gdk/linux-fb/gdkfont-fb.c:
Add empty gdk_font_load(). Needed for linking of Gtk+.
* gdk/linux-fb/gdkimage-fb.c:
Removed endian.h, use glib endianness macros instead
Moved GdkImagePrivateFB to windowing_data
gdk_image_new_bitmap didn't always allocate enough
memory.
* gdk/linux-fb/gdkinput-ps2.c:
Added semi-working support for MS serial mice.
* gdk/linux-fb/gdkprivate-fb.h:
s/GdkWindowPrivate/GdkWindowObject/
Removed GdkWindowPrivate typedef
s/GDK_DRAWABLE_P/GDK_DRAWABLE_FBDATA/
Removed GDK_DRAWABLE_P
Move GdkColorPrivateFB from inherited to windowing_data
Moved GdkImagePrivateFB to windowing_data
* gdk/linux-fb/gdkvisual-fb.c:
Removed some unused debug code.
* gdk/linux-fb/gdkwindow-fb.c:
Use stock cursors instead of including X headers.
s/GdkWindowPrivate/GdkWindowObject/
* gdk/linux-fb/mitypes.h:
Removed unused types.
* modules/linux-fb/basic.c:
Use the pango fribidi wrappers.
2000-11-13 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* gdk/linux-fb/gdkcolor-fb.c, gdk/nanox/gdkmain-nanox.c,
...
...
gdk/linux-fb/gdkcc-fb.c
View file @
be698675
...
...
@@ -127,7 +127,7 @@ my_x_query_colors (GdkColormap *colormap,
for
(
i
=
0
;
i
<
ncolors
;
i
++
)
{
pixel
=
colors
[
i
].
pixel
;
switch
(
colormap
->
visual
->
depth
)
switch
(
colormap
->
visual
->
depth
)
{
case
8
:
colors
[
i
]
=
colormap
->
colors
[
pixel
];
...
...
@@ -143,7 +143,7 @@ my_x_query_colors (GdkColormap *colormap,
<<
(
16
-
colormap
->
visual
->
blue_prec
-
colormap
->
visual
->
blue_shift
);
break
;
default:
g_assert_not_reached
();
g_assert_not_reached
();
break
;
}
}
...
...
@@ -243,10 +243,10 @@ init_gray (GdkColorContext *cc)
{
GdkColor
colr
;
gdk_color_white
(
cc
->
colormap
,
&
colr
);
gdk_color_white
(
cc
->
colormap
,
&
colr
);
cc
->
white_pixel
=
colr
.
pixel
;
gdk_color_black
(
cc
->
colormap
,
&
colr
);
gdk_color_black
(
cc
->
colormap
,
&
colr
);
cc
->
black_pixel
=
colr
.
pixel
;
}
...
...
@@ -277,9 +277,9 @@ init_color (GdkColorContext *cc)
ccp
->
blue_mult
=
1
;
ccp
->
base_pixel
=
0
;
gdk_color_white
(
cc
->
colormap
,
&
colr
);
gdk_color_white
(
cc
->
colormap
,
&
colr
);
cc
->
white_pixel
=
colr
.
pixel
;
gdk_color_black
(
cc
->
colormap
,
&
colr
);
gdk_color_black
(
cc
->
colormap
,
&
colr
);
cc
->
black_pixel
=
colr
.
pixel
;
cc
->
num_colors
=
cc
->
visual
->
colormap_size
;
...
...
@@ -1503,7 +1503,7 @@ gdk_color_context_add_palette (GdkColorContext *cc,
/* copy incoming palette */
cc
->
palette
=
g_new0
(
GdkColor
,
num_palette
);
cc
->
palette
=
g_new0
(
GdkColor
,
num_palette
);
j
=
0
;
...
...
gdk/linux-fb/gdkcolor-fb.c
View file @
be698675
...
...
@@ -32,6 +32,8 @@
#include
"gdkcolor.h"
#include
"gdkprivate-fb.h"
#define GDK_COLORMAP_PRIVATE_DATA(cmap) ((GdkColormapPrivateFB *) GDK_COLORMAP (cmap)->windowing_data)
static
gint
gdk_colormap_match_color
(
GdkColormap
*
cmap
,
GdkColor
*
color
,
const
gchar
*
available
);
...
...
@@ -41,8 +43,8 @@ static gpointer parent_class;
static
void
gdk_colormap_finalize
(
GObject
*
object
)
{
GdkColormap
*
colormap
=
GDK_COLORMAP
(
object
);
GdkColormapPrivateFB
*
private
=
(
GdkColormapPrivateFB
*
)
colormap
;
GdkColormap
*
colormap
=
GDK_COLORMAP
(
object
);
GdkColormapPrivateFB
*
private
=
GDK_COLORMAP_PRIVATE_DATA
(
colormap
)
;
if
(
private
->
hash
)
g_hash_table_destroy
(
private
->
hash
);
...
...
@@ -50,13 +52,17 @@ gdk_colormap_finalize (GObject *object)
g_free
(
private
->
info
);
g_free
(
colormap
->
colors
);
G_OBJECT_CLASS
(
parent_class
)
->
finalize
(
object
);
G_OBJECT_CLASS
(
parent_class
)
->
finalize
(
object
);
}
static
void
gdk_colormap_init
(
GdkColormap
*
colormap
)
{
colormap
->
windowing_data
=
NULL
;
GdkColormapPrivateFB
*
private
;
private
=
g_new
(
GdkColormapPrivateFB
,
1
);
colormap
->
windowing_data
=
private
;
colormap
->
size
=
0
;
colormap
->
colors
=
NULL
;
...
...
@@ -81,13 +87,13 @@ gdk_colormap_get_type (void)
{
static
const
GTypeInfo
object_info
=
{
sizeof
(
GdkColormap
FB
Class
),
sizeof
(
GdkColormapClass
),
(
GBaseInitFunc
)
NULL
,
(
GBaseFinalizeFunc
)
NULL
,
(
GClassInitFunc
)
gdk_colormap_class_init
,
NULL
,
/* class_finalize */
NULL
,
/* class_data */
sizeof
(
GdkColormap
PrivateFB
),
sizeof
(
GdkColormap
),
0
,
/* n_preallocs */
(
GInstanceInitFunc
)
gdk_colormap_init
,
};
...
...
@@ -101,7 +107,7 @@ gdk_colormap_get_type (void)
return
object_type
;
}
GdkColormap
*
GdkColormap
*
gdk_colormap_new
(
GdkVisual
*
visual
,
gint
private_cmap
)
{
...
...
@@ -112,10 +118,10 @@ gdk_colormap_new (GdkVisual *visual,
g_return_val_if_fail
(
visual
!=
NULL
,
NULL
);
private
=
(
GdkColormapPrivateFB
*
)
g_object_new
(
gdk_colormap_get_type
(),
NULL
);
colormap
=
(
GdkColormap
*
)
private
;
colormap
=
g_object_new
(
gdk_colormap_get_type
(),
NULL
);
private
=
GDK_COLORMAP_PRIVATE_DATA
(
colormap
)
;
private
->
base
.
visual
=
visual
;
colormap
->
visual
=
visual
;
fbd
=
gdk_display
;
private
->
hash
=
NULL
;
...
...
@@ -144,7 +150,7 @@ gdk_colormap_new (GdkVisual *visual,
fbc
.
green
=
green
;
fbc
.
blue
=
blue
;
if
(
ioctl
(
fbd
->
fd
,
FBIOGETCMAP
,
&
fbc
))
if
(
ioctl
(
fbd
->
fd
,
FBIOGETCMAP
,
&
fbc
))
g_error
(
"ioctl(FBIOGETCMAP) failed"
);
for
(
i
=
0
;
i
<
colormap
->
size
;
i
++
)
...
...
@@ -181,7 +187,7 @@ gdk_colormap_new (GdkVisual *visual,
break
;
default:
g_assert_not_reached
();
g_assert_not_reached
();
case
GDK_VISUAL_TRUE_COLOR
:
break
;
...
...
@@ -209,9 +215,9 @@ gdk_colormap_get_system (void)
guint16
red
[
256
],
green
[
256
],
blue
[
256
];
struct
fb_cmap
fbc
=
{
0
,
256
};
int
i
,
r
,
g
,
b
;
GdkVisual
*
visual
=
gdk_visual_get_system
();
GdkVisual
*
visual
=
gdk_visual_get_system
();
if
(
visual
->
type
==
GDK_VISUAL_GRAYSCALE
if
(
visual
->
type
==
GDK_VISUAL_GRAYSCALE
||
visual
->
type
==
GDK_VISUAL_PSEUDO_COLOR
)
{
fbc
.
red
=
red
;
...
...
@@ -236,7 +242,7 @@ gdk_colormap_get_system (void)
blue
[
i
]
=
b
*
65535
/
5
;
i
++
;
}
g_assert
(
i
==
216
);
g_assert
(
i
==
216
);
/* Fill in remaining space with grays */
for
(
i
=
216
;
i
<
256
;
i
++
)
...
...
@@ -251,10 +257,10 @@ gdk_colormap_get_system (void)
break
;
}
ioctl
(
gdk_display
->
fd
,
FBIOPUTCMAP
,
&
fbc
);
ioctl
(
gdk_display
->
fd
,
FBIOPUTCMAP
,
&
fbc
);
}
colormap
=
gdk_colormap_new
(
visual
,
TRUE
);
colormap
=
gdk_colormap_new
(
visual
,
TRUE
);
}
return
colormap
;
...
...
@@ -281,8 +287,8 @@ gdk_colormap_change (GdkColormap *colormap,
fbc
.
green
=
green
;
fbc
.
blue
=
blue
;
private
=
(
GdkColormapPrivateFB
*
)
colormap
;
switch
(
private
->
base
.
visual
->
type
)
private
=
GDK_COLORMAP_PRIVATE_DATA
(
colormap
)
;
switch
(
colormap
->
visual
->
type
)
{
case
GDK_VISUAL_GRAYSCALE
:
for
(
i
=
0
;
i
<
ncolors
;
i
++
)
...
...
@@ -292,7 +298,7 @@ gdk_colormap_change (GdkColormap *colormap,
colormap
->
colors
[
i
].
green
+
colormap
->
colors
[
i
].
blue
)
/
3
;
}
ioctl
(
gdk_display
->
fd
,
FBIOPUTCMAP
,
&
fbc
);
ioctl
(
gdk_display
->
fd
,
FBIOPUTCMAP
,
&
fbc
);
break
;
case
GDK_VISUAL_PSEUDO_COLOR
:
...
...
@@ -302,7 +308,7 @@ gdk_colormap_change (GdkColormap *colormap,
green
[
i
]
=
colormap
->
colors
[
i
].
green
;
blue
[
i
]
=
colormap
->
colors
[
i
].
blue
;
}
ioctl
(
gdk_display
->
fd
,
FBIOPUTCMAP
,
&
fbc
);
ioctl
(
gdk_display
->
fd
,
FBIOPUTCMAP
,
&
fbc
);
break
;
default:
...
...
@@ -320,34 +326,34 @@ gdk_color_parse (const gchar *spec,
g_return_val_if_fail
(
spec
,
FALSE
);
g_return_val_if_fail
(
color
,
FALSE
);
if
(
spec
[
0
]
==
'#'
)
if
(
spec
[
0
]
==
'#'
)
{
if
(
strlen
(
spec
)
==
7
)
if
(
strlen
(
spec
)
==
7
)
{
guint
num
;
sscanf
(
spec
+
1
,
"%x"
,
&
num
);
sscanf
(
spec
+
1
,
"%x"
,
&
num
);
color
->
red
=
(
num
&
0xFF0000
)
>>
8
;
color
->
green
=
(
num
&
0xFF00
);
color
->
blue
=
(
num
&
0xFF
)
<<
8
;
}
else
if
(
strlen
(
spec
)
==
13
)
else
if
(
strlen
(
spec
)
==
13
)
{
char
s1
[
5
],
s2
[
5
],
s3
[
5
];
g_snprintf
(
s1
,
sizeof
(
s1
),
spec
+
1
);
g_snprintf
(
s2
,
sizeof
(
s2
),
spec
+
5
);
g_snprintf
(
s3
,
sizeof
(
s3
),
spec
+
9
);
if
(
!
sscanf
(
s1
,
"%hx"
,
&
color
->
red
))
g_error
(
"sscanf failed"
);
if
(
!
sscanf
(
s2
,
"%hx"
,
&
color
->
green
))
g_error
(
"sscanf failed"
);
if
(
!
sscanf
(
s3
,
"%hx"
,
&
color
->
blue
))
g_error
(
"sscanf failed"
);
g_snprintf
(
s1
,
sizeof
(
s1
),
spec
+
1
);
g_snprintf
(
s2
,
sizeof
(
s2
),
spec
+
5
);
g_snprintf
(
s3
,
sizeof
(
s3
),
spec
+
9
);
if
(
!
sscanf
(
s1
,
"%hx"
,
&
color
->
red
))
g_error
(
"sscanf failed"
);
if
(
!
sscanf
(
s2
,
"%hx"
,
&
color
->
green
))
g_error
(
"sscanf failed"
);
if
(
!
sscanf
(
s3
,
"%hx"
,
&
color
->
blue
))
g_error
(
"sscanf failed"
);
}
else
{