Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
c11c452a
Kaydet (Commit)
c11c452a
authored
Agu 17, 2011
tarafından
Michael Meeks
Kaydeden (comit)
Michael Meeks
Eki 25, 2011
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
remove conditionals, and split pieces into salnativewidgets
üst
4a7e3482
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
106 additions
and
122 deletions
+106
-122
svdata.hxx
vcl/inc/svdata.hxx
+1
-1
gtkgdi.hxx
vcl/inc/unx/gtk/gtkgdi.hxx
+1
-7
salnativewidgets-gtk.cxx
vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+9
-0
gtkframe.cxx
vcl/unx/gtk/window/gtkframe.cxx
+2
-114
gtk3salnativewidgets-gtk.cxx
vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
+93
-0
No files found.
vcl/inc/svdata.hxx
Dosyayı görüntüle @
c11c452a
...
@@ -306,7 +306,7 @@ struct ImplSVNWFData
...
@@ -306,7 +306,7 @@ struct ImplSVNWFData
// toolbox dropdown buttons
// toolbox dropdown buttons
int
mnMenuFormatExtraBorder
;
// inner popup menu border
int
mnMenuFormatExtraBorder
;
// inner popup menu border
bool
mbFlatMenu
;
// no popup 3D border
bool
mbFlatMenu
;
// no popup 3D border
Color
maMenuBarHighlightTextColor
;
// override higlight text color
::
Color
maMenuBarHighlightTextColor
;
// override higlight text color
// in menubar if not transparent
// in menubar if not transparent
bool
mbOpenMenuOnF10
;
// on gnome the first menu opens on F10
bool
mbOpenMenuOnF10
;
// on gnome the first menu opens on F10
bool
mbNoFocusRects
;
// on Aqua focus rects are not used
bool
mbNoFocusRects
;
// on Aqua focus rects are not used
...
...
vcl/inc/unx/gtk/gtkgdi.hxx
Dosyayı görüntüle @
c11c452a
...
@@ -41,9 +41,6 @@
...
@@ -41,9 +41,6 @@
#include <unx/headless/svpgdi.hxx>
#include <unx/headless/svpgdi.hxx>
// Disabled for gtk3 - use legacy theming code
#define GTK_GRAPHICS_DISABLED
class
GtkSalFrame
;
class
GtkSalFrame
;
class
GtkSalGraphics
:
public
SvpSalGraphics
class
GtkSalGraphics
:
public
SvpSalGraphics
{
{
...
@@ -65,10 +62,7 @@ class GtkSalGraphics : public X11SalGraphics
...
@@ -65,10 +62,7 @@ class GtkSalGraphics : public X11SalGraphics
Region
m_aClipRegion
;
Region
m_aClipRegion
;
public
:
public
:
GtkSalGraphics
(
GtkSalFrame
*
,
GtkWidget
*
window
)
GtkSalGraphics
(
GtkSalFrame
*
,
GtkWidget
*
window
);
:
m_pWindow
(
window
),
m_aClipRegion
(
REGION_NULL
)
{}
virtual
~
GtkSalGraphics
();
virtual
~
GtkSalGraphics
();
inline
GtkWidget
*
GetGtkWidget
()
const
{
return
m_pWindow
;
}
inline
GtkWidget
*
GetGtkWidget
()
const
{
return
m_pWindow
;
}
...
...
vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
Dosyayı görüntüle @
c11c452a
...
@@ -56,6 +56,15 @@ sal_Bool GtkSalGraphics::bGlobalNeedPixmapPaint = sal_False;
...
@@ -56,6 +56,15 @@ sal_Bool GtkSalGraphics::bGlobalNeedPixmapPaint = sal_False;
sal_Bool
GtkSalGraphics
::
bToolbarGripWorkaround
=
sal_False
;
sal_Bool
GtkSalGraphics
::
bToolbarGripWorkaround
=
sal_False
;
sal_Bool
GtkSalGraphics
::
bNeedButtonStyleAsEditBackgroundWorkaround
=
sal_False
;
sal_Bool
GtkSalGraphics
::
bNeedButtonStyleAsEditBackgroundWorkaround
=
sal_False
;
GtkSalGraphics
::
GtkSalGraphics
(
GtkSalFrame
*
pFrame
,
GtkWidget
*
pWindow
)
:
X11SalGraphics
(),
m_pWindow
(
pWindow
),
m_aClipRegion
(
REGION_NULL
)
{
Init
(
pFrame
,
GDK_WINDOW_XID
(
widget_get_window
(
pWindow
)
),
gdk_x11_screen_get_screen_number
(
gtk_widget_get_screen
(
pWindow
)
)
);
}
GtkSalGraphics
::~
GtkSalGraphics
()
GtkSalGraphics
::~
GtkSalGraphics
()
{
{
}
}
...
...
vcl/unx/gtk/window/gtkframe.cxx
Dosyayı görüntüle @
c11c452a
...
@@ -2570,9 +2570,7 @@ void GtkSalFrame::createNewWindow( XLIB_Window aNewParent, bool bXEmbed, int nSc
...
@@ -2570,9 +2570,7 @@ void GtkSalFrame::createNewWindow( XLIB_Window aNewParent, bool bXEmbed, int nSc
if
(
m_aGraphics
[
i
].
bInUse
)
if
(
m_aGraphics
[
i
].
bInUse
)
{
{
m_aGraphics
[
i
].
pGraphics
->
SetDrawable
(
GDK_WINDOW_XWINDOW
(
widget_get_window
(
m_pWindow
)),
m_nScreen
);
m_aGraphics
[
i
].
pGraphics
->
SetDrawable
(
GDK_WINDOW_XWINDOW
(
widget_get_window
(
m_pWindow
)),
m_nScreen
);
#ifndef GTK_GRAPHICS_DISABLED
m_aGraphics
[
i
].
pGraphics
->
SetWindow
(
m_pWindow
);
m_aGraphics
[
i
].
pGraphics
->
SetWindow
(
m_pWindow
);
#endif
}
}
}
}
#endif
#endif
...
@@ -3513,9 +3511,6 @@ void GtkSalFrame::signalStyleSet( GtkWidget*, GtkStyle* pPrevious, gpointer fram
...
@@ -3513,9 +3511,6 @@ void GtkSalFrame::signalStyleSet( GtkWidget*, GtkStyle* pPrevious, gpointer fram
aWin
,
aWin
,
pThis
->
m_hBackgroundPixmap
);
pThis
->
m_hBackgroundPixmap
);
}
}
#endif
#ifndef GTK_GRAPHICS_DISABLED
if
(
!
pThis
->
m_pParent
)
if
(
!
pThis
->
m_pParent
)
{
{
// signalize theme changed for NWF caches
// signalize theme changed for NWF caches
...
@@ -4140,115 +4135,6 @@ gboolean GtkSalFrame::IMHandler::signalIMDeleteSurrounding( GtkIMContext*, gint
...
@@ -4140,115 +4135,6 @@ gboolean GtkSalFrame::IMHandler::signalIMDeleteSurrounding( GtkIMContext*, gint
return
sal_False
;
return
sal_False
;
}
}
#ifdef GTK_GRAPHICS_DISABLED
void
GtkData
::
initNWF
()
{}
void
GtkData
::
deInitNWF
()
{}
#if !GTK_CHECK_VERSION(3,0,0)
GtkSalGraphics
::
GtkSalGraphics
(
GtkSalFrame
*
pFrame
,
GtkWidget
*
pWindow
)
:
X11SalGraphics
()
{
Init
(
pFrame
,
GDK_WINDOW_XID
(
widget_get_window
(
pWindow
)
),
gdk_x11_screen_get_screen_number
(
gtk_widget_get_screen
(
pWindow
)
)
);
}
#else
GtkSalGraphics
::
GtkSalGraphics
(
GtkSalFrame
*
pFrame
,
GtkWidget
*
pWindow
)
:
SvpSalGraphics
(),
mpFrame
(
pFrame
)
{
}
void
GtkSalGraphics
::
updateSettings
(
AllSettings
&
rSettings
)
{
g_warning
(
"unimplemented GtkSalGraphics update"
);
}
static
void
print_cairo_region
(
cairo_region_t
*
region
,
const
char
*
msg
)
{
if
(
!
region
)
{
fprintf
(
stderr
,
"%s - NULL
\n
"
,
msg
);
return
;
}
int
numrect
=
cairo_region_num_rectangles
(
region
);
fprintf
(
stderr
,
"%s - %d rects
\n
"
,
msg
,
numrect
);
for
(
int
i
=
0
;
i
<
numrect
;
i
++
)
{
cairo_rectangle_int_t
rect
;
cairo_region_get_rectangle
(
region
,
i
,
&
rect
);
fprintf
(
stderr
,
"
\t
%d -> %d,%d %dx%d
\n
"
,
i
,
rect
.
x
,
rect
.
y
,
rect
.
width
,
rect
.
height
);
}
}
static
void
print_update_area
(
GdkWindow
*
window
,
const
char
*
msg
)
{
print_cairo_region
(
gdk_window_get_update_area
(
window
),
msg
);
}
void
GtkSalGraphics
::
copyArea
(
long
nDestX
,
long
nDestY
,
long
nSrcX
,
long
nSrcY
,
long
nSrcWidth
,
long
nSrcHeight
,
sal_uInt16
nFlags
)
{
mpFrame
->
pushIgnoreDamage
();
SvpSalGraphics
::
copyArea
(
nDestX
,
nDestY
,
nSrcX
,
nSrcY
,
nSrcWidth
,
nSrcHeight
,
nFlags
);
mpFrame
->
popIgnoreDamage
();
cairo_rectangle_int_t
rect
=
{
(
int
)
nSrcX
,
(
int
)
nSrcY
,
(
int
)
nSrcWidth
,
(
int
)
nSrcHeight
};
cairo_region_t
*
region
=
cairo_region_create_rectangle
(
&
rect
);
print_update_area
(
gtk_widget_get_window
(
mpFrame
->
getWindow
()
),
"before copy area"
);
// print_cairo_region( mpFrame->m_pRegion, "extremely odd SalFrame: shape combine region! - ");
g_warning
(
"FIXME: copy area delta: %d %d needs clip intersect
\n
"
,
nDestX
-
nSrcX
,
nDestY
-
nSrcY
);
// get clip region and translate it in the opposite direction & intersect ...
cairo_region_t
*
clip_region
;
if
(
m_aClipRegion
.
GetRectCount
()
<=
0
)
{
basegfx
::
B2IVector
aSize
=
GetSize
();
cairo_rectangle_int_t
aCairoSize
=
{
0
,
0
,
aSize
.
getX
(),
aSize
.
getY
()
};
clip_region
=
cairo_region_create_rectangle
(
&
aCairoSize
);
}
else
{
clip_region
=
cairo_region_create
();
Rectangle
aClipRect
;
RegionHandle
aHnd
=
m_aClipRegion
.
BeginEnumRects
();
while
(
m_aClipRegion
.
GetNextEnumRect
(
aHnd
,
aClipRect
)
)
{
cairo_rectangle_int_t
aRect
=
{
aClipRect
.
Left
(),
aClipRect
.
Top
(),
aClipRect
.
Right
(),
aClipRect
.
Bottom
()
};
cairo_region_union_rectangle
(
clip_region
,
&
aRect
);
}
m_aClipRegion
.
EndEnumRects
(
aHnd
);
}
print_cairo_region
(
clip_region
,
"pristine clip region"
);
cairo_region_translate
(
clip_region
,
-
(
nDestX
-
nSrcX
),
-
(
nDestY
-
nSrcY
)
);
print_cairo_region
(
clip_region
,
"translated clip region"
);
cairo_region_intersect
(
region
,
clip_region
);
print_cairo_region
(
region
,
"reduced copy area region"
);
// FIXME: this will queue (duplicate) gtk+ re-rendering for the exposed area, c'est la vie
gdk_window_move_region
(
gtk_widget_get_window
(
mpFrame
->
getWindow
()
),
region
,
nDestX
-
nSrcX
,
nDestY
-
nSrcY
);
print_update_area
(
gtk_widget_get_window
(
mpFrame
->
getWindow
()
),
"after copy area"
);
cairo_region_destroy
(
clip_region
);
cairo_region_destroy
(
region
);
}
#endif
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Size
GtkSalDisplay
::
GetScreenSize
(
int
nScreen
)
Size
GtkSalDisplay
::
GetScreenSize
(
int
nScreen
)
{
{
GdkScreen
*
pScreen
=
gdk_display_get_screen
(
m_pGdkDisplay
,
nScreen
);
GdkScreen
*
pScreen
=
gdk_display_get_screen
(
m_pGdkDisplay
,
nScreen
);
...
@@ -4258,3 +4144,5 @@ Size GtkSalDisplay::GetScreenSize( int nScreen )
...
@@ -4258,3 +4144,5 @@ Size GtkSalDisplay::GetScreenSize( int nScreen )
return
Size
(
gdk_screen_get_width
(
pScreen
),
return
Size
(
gdk_screen_get_width
(
pScreen
),
gdk_screen_get_height
(
pScreen
)
);
gdk_screen_get_height
(
pScreen
)
);
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
Dosyayı görüntüle @
c11c452a
...
@@ -30,5 +30,98 @@
...
@@ -30,5 +30,98 @@
#include "../../headless/svpgdi.cxx"
#include "../../headless/svpgdi.cxx"
void
GtkData
::
initNWF
()
{}
void
GtkData
::
deInitNWF
()
{}
GtkSalGraphics
::
GtkSalGraphics
(
GtkSalFrame
*
pFrame
,
GtkWidget
*
pWindow
)
:
SvpSalGraphics
(),
mpFrame
(
pFrame
),
mpWindow
(
pWindow
),
mpButtonStyle
(
NULL
)
{
}
void
GtkSalGraphics
::
updateSettings
(
AllSettings
&
rSettings
)
{
g_warning
(
"unimplemented GtkSalGraphics update"
);
}
static
void
print_cairo_region
(
cairo_region_t
*
region
,
const
char
*
msg
)
{
if
(
!
region
)
{
fprintf
(
stderr
,
"%s - NULL
\n
"
,
msg
);
return
;
}
int
numrect
=
cairo_region_num_rectangles
(
region
);
fprintf
(
stderr
,
"%s - %d rects
\n
"
,
msg
,
numrect
);
for
(
int
i
=
0
;
i
<
numrect
;
i
++
)
{
cairo_rectangle_int_t
rect
;
cairo_region_get_rectangle
(
region
,
i
,
&
rect
);
fprintf
(
stderr
,
"
\t
%d -> %d,%d %dx%d
\n
"
,
i
,
rect
.
x
,
rect
.
y
,
rect
.
width
,
rect
.
height
);
}
}
static
void
print_update_area
(
GdkWindow
*
window
,
const
char
*
msg
)
{
print_cairo_region
(
gdk_window_get_update_area
(
window
),
msg
);
}
void
GtkSalGraphics
::
copyArea
(
long
nDestX
,
long
nDestY
,
long
nSrcX
,
long
nSrcY
,
long
nSrcWidth
,
long
nSrcHeight
,
sal_uInt16
nFlags
)
{
mpFrame
->
pushIgnoreDamage
();
SvpSalGraphics
::
copyArea
(
nDestX
,
nDestY
,
nSrcX
,
nSrcY
,
nSrcWidth
,
nSrcHeight
,
nFlags
);
mpFrame
->
popIgnoreDamage
();
cairo_rectangle_int_t
rect
=
{
(
int
)
nSrcX
,
(
int
)
nSrcY
,
(
int
)
nSrcWidth
,
(
int
)
nSrcHeight
};
cairo_region_t
*
region
=
cairo_region_create_rectangle
(
&
rect
);
print_update_area
(
gtk_widget_get_window
(
mpFrame
->
getWindow
()
),
"before copy area"
);
// print_cairo_region( mpFrame->m_pRegion, "extremely odd SalFrame: shape combine region! - ");
g_warning
(
"FIXME: copy area delta: %d %d needs clip intersect
\n
"
,
nDestX
-
nSrcX
,
nDestY
-
nSrcY
);
// get clip region and translate it in the opposite direction & intersect ...
cairo_region_t
*
clip_region
;
if
(
m_aClipRegion
.
GetRectCount
()
<=
0
)
{
basegfx
::
B2IVector
aSize
=
GetSize
();
cairo_rectangle_int_t
aCairoSize
=
{
0
,
0
,
aSize
.
getX
(),
aSize
.
getY
()
};
clip_region
=
cairo_region_create_rectangle
(
&
aCairoSize
);
}
else
{
clip_region
=
cairo_region_create
();
Rectangle
aClipRect
;
RegionHandle
aHnd
=
m_aClipRegion
.
BeginEnumRects
();
while
(
m_aClipRegion
.
GetNextEnumRect
(
aHnd
,
aClipRect
)
)
{
cairo_rectangle_int_t
aRect
=
{
aClipRect
.
Left
(),
aClipRect
.
Top
(),
aClipRect
.
Right
(),
aClipRect
.
Bottom
()
};
cairo_region_union_rectangle
(
clip_region
,
&
aRect
);
}
m_aClipRegion
.
EndEnumRects
(
aHnd
);
}
print_cairo_region
(
clip_region
,
"pristine clip region"
);
cairo_region_translate
(
clip_region
,
-
(
nDestX
-
nSrcX
),
-
(
nDestY
-
nSrcY
)
);
print_cairo_region
(
clip_region
,
"translated clip region"
);
cairo_region_intersect
(
region
,
clip_region
);
print_cairo_region
(
region
,
"reduced copy area region"
);
// FIXME: this will queue (duplicate) gtk+ re-rendering for the exposed area, c'est la vie
gdk_window_move_region
(
gtk_widget_get_window
(
mpFrame
->
getWindow
()
),
region
,
nDestX
-
nSrcX
,
nDestY
-
nSrcY
);
print_update_area
(
gtk_widget_get_window
(
mpFrame
->
getWindow
()
),
"after copy area"
);
cairo_region_destroy
(
clip_region
);
cairo_region_destroy
(
region
);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment