summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2023-12-21 14:03:04 +0100
committerAlbrecht Schlosser <albrechts.fltk@online.de>2023-12-21 14:03:04 +0100
commit76a2c95f0715845432dab89984bb28a5dbfa3ebc (patch)
tree33292a5a81c3d51dbed86b3facd344c859b19421 /src
parent39846392702607ec014cb2dd450c3c6ba86827a6 (diff)
Fix a typo, trailing whitespace, and dependencies
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Image_Surface.cxx10
-rw-r--r--src/Fl_Shared_Image.cxx4
-rw-r--r--src/drivers/GDI/Fl_GDI_Image_Surface_Driver.cxx12
-rw-r--r--src/drivers/Quartz/Fl_Quartz_Image_Surface_Driver.cxx4
-rw-r--r--src/drivers/Wayland/Fl_Wayland_Image_Surface_Driver.cxx2
-rw-r--r--src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx2
-rw-r--r--src/drivers/X11/Fl_X11_Gl_Window_Driver.cxx6
-rw-r--r--src/drivers/Xlib/Fl_Xlib_Image_Surface_Driver.cxx2
-rw-r--r--src/makedepend8
9 files changed, 23 insertions, 27 deletions
diff --git a/src/Fl_Image_Surface.cxx b/src/Fl_Image_Surface.cxx
index 11fb12048..38cda73d9 100644
--- a/src/Fl_Image_Surface.cxx
+++ b/src/Fl_Image_Surface.cxx
@@ -96,7 +96,7 @@ void Fl_Image_Surface_Driver::copy_with_mask(Fl_RGB_Image* mask, uchar *dib_dst,
bool bottom_to_top) {
int w = mask->data_w(), h = mask->data_h();
for (int i = 0; i < h; i++) {
- const uchar* alpha = (const uchar*)mask->array +
+ const uchar* alpha = (const uchar*)mask->array +
(bottom_to_top ? (h-i-1) : i) * w;
uchar *src = dib_src + i * line_size;
uchar *dst = dib_dst + i * line_size;
@@ -145,7 +145,7 @@ Fl_RGB_Image *Fl_Image_Surface_Driver::RGB3_to_RGB1(const Fl_RGB_Image *rgb3, in
/** Returns a depth-3 image made of all drawings sent to the Fl_Image_Surface object.
The returned object contains its own copy of the RGB data;
the caller is responsible for deleting it.
-
+
\see Fl_Image_Surface::mask(Fl_RGB_Image*)
*/
Fl_RGB_Image *Fl_Image_Surface::image() {
@@ -212,19 +212,19 @@ void Fl_Image_Surface::rescale() {
foreground and background pixels; mask pixels closer in color to white produce image pixels
closer to the image surface pixel, those closer to black produce image pixels closer to what the
image surface pixel was before the call to mask().
-
+
The mask is easily constructed using an Fl_Image_Surface object,
drawing white areas on a black background there, and calling Fl_Image_Surface::image().
\param mask A depth-3 image determining the drawable areas of the image surface.
The \p mask object is not used after return from this member function.
- \note
+ \note
- The image surface must not be the current drawing surface when this function
gets called.
- The mask can have any size but is best when it has the size of the image surface.
- It's possible to use several masks in succession on the same image surface provided
member function Fl_Image_Surface::image() is called between successive calls to
Fl_Image_Surface::mask(const Fl_RGB_Image*).
-
+
Example of procedure to construct a masked image:
\code
int W = …, H = …; // width and height of the image under construction
diff --git a/src/Fl_Shared_Image.cxx b/src/Fl_Shared_Image.cxx
index de1b2cefd..62c06079a 100644
--- a/src/Fl_Shared_Image.cxx
+++ b/src/Fl_Shared_Image.cxx
@@ -72,11 +72,11 @@ int Fl_Shared_Image::num_images() {
Binary search in a sorted array works only if we search for the same
parameters that were also used for sorting. No special cases are possible
here.
-
+
Fl_Shared_Image::find() requires a search for an element with a matching name
and the original_ flags set. This is not implemented via binary search, but
by a simple run of the array inside Fl_Shared_Image::find().
-
+
\returns Whether the images match or their relative sort order (see text).
\retval 0 the images match
\retval <0 Image \p i0 is \e less than image \p i1
diff --git a/src/drivers/GDI/Fl_GDI_Image_Surface_Driver.cxx b/src/drivers/GDI/Fl_GDI_Image_Surface_Driver.cxx
index 7e1c2f24e..a14524ee2 100644
--- a/src/drivers/GDI/Fl_GDI_Image_Surface_Driver.cxx
+++ b/src/drivers/GDI/Fl_GDI_Image_Surface_Driver.cxx
@@ -96,7 +96,7 @@ Fl_RGB_Image* Fl_GDI_Image_Surface_Driver::image()
bmi.bmiHeader.biBitCount = 24;
GetDIBits(gc, (HBITMAP)offscreen, 0, H,
dib_src, &bmi, DIB_RGB_COLORS);
-
+
// draw above the secondary offscreen the main offscreen masked by shape_data_->mask
GdiFlush();
Fl_Image_Surface_Driver::copy_with_mask(shape_data_->mask, shape_data_->vBits, dib_src, ((3*W+3)/4) * 4, true);
@@ -141,9 +141,9 @@ void Fl_GDI_Image_Surface_Driver::mask(const Fl_RGB_Image *mask) {
GetDIBits(gc, (HBITMAP)offscreen, 0, 0, NULL, &bmi, DIB_RGB_COLORS);
int W = bmi.bmiHeader.biWidth;
int H = bmi.bmiHeader.biHeight;
-
+
shape_data_->mask = Fl_Image_Surface_Driver::RGB3_to_RGB1(mask, W, H);
-
+
// duplicate current offscreen content to new offscreen
int line_size = ((3*W+3)/4) * 4;
uchar *dib = new uchar[line_size * H]; // create temporary buffer to read DIB
@@ -151,11 +151,11 @@ void Fl_GDI_Image_Surface_Driver::mask(const Fl_RGB_Image *mask) {
bmi.bmiHeader.biHeight = H;
bmi.bmiHeader.biCompression = BI_RGB;
bmi.bmiHeader.biBitCount = 24;
-
+
GetDIBits(gc, (HBITMAP)offscreen, 0, H, dib, &bmi, DIB_RGB_COLORS);
-
+
HDC background_gc = CreateCompatibleDC(gc);
- shape_data_->background =
+ shape_data_->background =
CreateDIBSection(background_gc, &bmi, DIB_RGB_COLORS,
(void**)&shape_data_->vBits, NULL, 0);
if (!shape_data_->background) {
diff --git a/src/drivers/Quartz/Fl_Quartz_Image_Surface_Driver.cxx b/src/drivers/Quartz/Fl_Quartz_Image_Surface_Driver.cxx
index fb522745a..00fc63150 100644
--- a/src/drivers/Quartz/Fl_Quartz_Image_Surface_Driver.cxx
+++ b/src/drivers/Quartz/Fl_Quartz_Image_Surface_Driver.cxx
@@ -65,7 +65,7 @@ Fl_Quartz_Image_Surface_Driver::~Fl_Quartz_Image_Surface_Driver() {
}
delete driver();
}
-
+
void Fl_Quartz_Image_Surface_Driver::set_current() {
Fl_Surface_Device::set_current();
@@ -155,7 +155,7 @@ void Fl_Quartz_Image_Surface_Driver::mask(const Fl_RGB_Image *img) {
img = copy;
using_copy = true;
}
-
+
int i, d = img->d(), w = img->data_w(), h = img->data_h();
// reverse top and bottom and convert to gray scale if img->d() == 3 and complement bits
int bytes_per_row = (img->ld() ? img->ld() : w * d);
diff --git a/src/drivers/Wayland/Fl_Wayland_Image_Surface_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Image_Surface_Driver.cxx
index f25fe025d..de72e175a 100644
--- a/src/drivers/Wayland/Fl_Wayland_Image_Surface_Driver.cxx
+++ b/src/drivers/Wayland/Fl_Wayland_Image_Surface_Driver.cxx
@@ -132,7 +132,7 @@ Fl_RGB_Image* Fl_Wayland_Image_Surface_Driver::image() {
free(shape_data_);
shape_data_ = NULL;
}
-
+
// Convert depth-4 image in draw_buffer to a depth-3 image while exchanging R and B colors
struct Fl_Wayland_Graphics_Driver::draw_buffer *off_buf =
Fl_Wayland_Graphics_Driver::offscreen_buffer(offscreen);
diff --git a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
index eb6b6c396..6507b0b41 100644
--- a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
+++ b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
@@ -275,7 +275,7 @@ static void pointer_button(void *data,
(struct Fl_Wayland_Screen_Driver::seat*)data;
if (gtk_shell_surface && state == WL_POINTER_BUTTON_STATE_PRESSED &&
button == BTN_MIDDLE) {
- struct gtk_surface1 *gtk_surface = gtk_shell1_get_gtk_surface(gtk_shell,
+ struct gtk_surface1 *gtk_surface = gtk_shell1_get_gtk_surface(gtk_shell,
gtk_shell_surface);
gtk_surface1_titlebar_gesture(gtk_surface, serial, seat->wl_seat,
GTK_SURFACE1_GESTURE_MIDDLE_CLICK);
diff --git a/src/drivers/X11/Fl_X11_Gl_Window_Driver.cxx b/src/drivers/X11/Fl_X11_Gl_Window_Driver.cxx
index 000c522ac..985978c1f 100644
--- a/src/drivers/X11/Fl_X11_Gl_Window_Driver.cxx
+++ b/src/drivers/X11/Fl_X11_Gl_Window_Driver.cxx
@@ -445,11 +445,11 @@ void Fl_X11_Gl_Window_Driver::swap_interval(int interval) {
if (fl_glXSwapInterval.EXT)
fl_glXSwapInterval.EXT(fl_display, fl_xid(pWindow), interval);
break;
- case 2:
+ case 2:
if (fl_glXSwapInterval.MESA)
fl_glXSwapInterval.MESA((unsigned int)interval);
break;
- case 3:
+ case 3:
if (fl_glXSwapInterval.SGI)
fl_glXSwapInterval.SGI(interval);
break;
@@ -468,7 +468,7 @@ int Fl_X11_Gl_Window_Driver::swap_interval() const {
glXQueryDrawable(fl_display, fl_xid(pWindow), 0x20F1 /*GLX_SWAP_INTERVAL_EXT*/, &val);
interval = (int)val;
break; }
- case 2:
+ case 2:
if (fl_glXGetSwapIntervalMESA)
interval = fl_glXGetSwapIntervalMESA();
break;
diff --git a/src/drivers/Xlib/Fl_Xlib_Image_Surface_Driver.cxx b/src/drivers/Xlib/Fl_Xlib_Image_Surface_Driver.cxx
index 87e55b417..2660dcda7 100644
--- a/src/drivers/Xlib/Fl_Xlib_Image_Surface_Driver.cxx
+++ b/src/drivers/Xlib/Fl_Xlib_Image_Surface_Driver.cxx
@@ -137,7 +137,7 @@ Fl_RGB_Image* Fl_Xlib_Image_Surface_Driver::image()
fl_window = shape_data_->background; // temporary change
Fl_RGB_Image *img_background = Fl::screen_driver()->read_win_rectangle(0, 0, w, h, 0);
fl_window = offscreen;
- Fl_Image_Surface_Driver::copy_with_mask(shape_data_->mask,
+ Fl_Image_Surface_Driver::copy_with_mask(shape_data_->mask,
(uchar*)img_background->array,
(uchar*)img_main->array,
3 * shape_data_->mask->w(), false);
diff --git a/src/makedepend b/src/makedepend
index a7cf18d19..2aef1deff 100644
--- a/src/makedepend
+++ b/src/makedepend
@@ -2391,10 +2391,8 @@ fl_images_core.o: ../FL/fl_utf8.h
fl_images_core.o: ../FL/Fl_Widget.H
fl_images_core.o: ../FL/platform_types.h
fl_images_core.o: flstring.h
-Fl_Image_Reader.o: ../FL/fl_attr.h
Fl_Image_Reader.o: ../FL/Fl_Export.H
Fl_Image_Reader.o: ../FL/fl_string_functions.h
-Fl_Image_Reader.o: ../FL/fl_types.h
Fl_Image_Reader.o: ../FL/fl_utf8.h
Fl_Image_Reader.o: Fl_Image_Reader.h
Fl_Image_Surface.o: ../FL/Enumerations.H
@@ -2637,14 +2635,12 @@ Fl_Menu_.o: ../FL/platform_types.h
Fl_Menu_.o: flstring.h
Fl_Menu_add.o: ../config.h
Fl_Menu_add.o: ../FL/Fl.H
-Fl_Menu_add.o: ../FL/fl_attr.h
Fl_Menu_add.o: ../FL/fl_config.h
Fl_Menu_add.o: ../FL/Fl_Export.H
Fl_Menu_add.o: ../FL/Fl_Image.H
Fl_Menu_add.o: ../FL/Fl_Menu_.H
Fl_Menu_add.o: ../FL/Fl_Menu_Item.H
Fl_Menu_add.o: ../FL/fl_string_functions.h
-Fl_Menu_add.o: ../FL/fl_types.h
Fl_Menu_add.o: ../FL/Fl_Widget.H
Fl_Menu_add.o: ../FL/platform_types.h
Fl_Menu_add.o: flstring.h
@@ -3465,7 +3461,9 @@ Fl_Screen_Driver.o: ../FL/Fl_Valuator.H
Fl_Screen_Driver.o: ../FL/Fl_Widget.H
Fl_Screen_Driver.o: ../FL/Fl_Widget_Surface.H
Fl_Screen_Driver.o: ../FL/Fl_Window.H
+Fl_Screen_Driver.o: ../FL/platform.H
Fl_Screen_Driver.o: ../FL/platform_types.h
+Fl_Screen_Driver.o: ../FL/x11.H
Fl_Screen_Driver.o: Fl_Screen_Driver.H
Fl_Screen_Driver.o: Fl_Window_Driver.H
Fl_Scroll.o: ../FL/Enumerations.H
@@ -4458,14 +4456,12 @@ Fl_Wizard.o: ../FL/Fl_Window.H
Fl_Wizard.o: ../FL/Fl_Wizard.H
Fl_Wizard.o: ../FL/platform_types.h
fl_write_png.o: ../config.h
-fl_write_png.o: ../FL/fl_attr.h
fl_write_png.o: ../FL/fl_config.h
fl_write_png.o: ../FL/Fl_Export.H
fl_write_png.o: ../FL/Fl_Image.H
fl_write_png.o: ../FL/Fl_PNG_Image.H
fl_write_png.o: ../FL/Fl_RGB_Image.H
fl_write_png.o: ../FL/fl_string_functions.h
-fl_write_png.o: ../FL/fl_types.h
fl_write_png.o: ../FL/fl_utf8.h
Fl_x.o: ../config.h
Fl_x.o: ../FL/Enumerations.H