"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/scrot_selection.h" between
scrot-1.7.tar.bz2 and scrot-1.8.tar.gz

About: scrot (SCReenshOT) is a simple command line screen capture utility using imlib2 to grab and save images.

scrot_selection.h  (scrot-1.7.tar.bz2):scrot_selection.h  (scrot-1.8)
/* scrot_selection.h /* scrot_selection.h
Copyright 2020-2021 Daniel T. Borelli <danieltborelli@gmail.com> Copyright 2020-2021 Daniel T. Borelli <danieltborelli@gmail.com>
Copyright 2021-2023 Guilherme Janczak <guilherme.janczak@yandex.com>
Copyright 2021 Martin C <martincation@protonmail.com> Copyright 2021 Martin C <martincation@protonmail.com>
Copyright 2021 Peter Wu <peterwu@hotmail.com> Copyright 2021 Peter Wu <peterwu@hotmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions: furnished to do so, subject to the following conditions:
skipping to change at line 30 skipping to change at line 31
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
/* /*
This file is part of the scrot project. This file is part of the scrot project.
Part of the code comes from the main.c file and maintains its authorship. Part of the code comes from the scrot.c file and maintains its authorship.
*/ */
#pragma once #pragma once
#include <X11/Xresource.h>
#include <X11/extensions/Xfixes.h>
#include <X11/extensions/shape.h>
#include <X11/keysym.h>
#include <X11/cursorfont.h>
#include <Imlib2.h>
#include <stdbool.h> #include <stdbool.h>
#include <assert.h>
#include <Imlib2.h>
#include <X11/Xlib.h>
/* S: string, L: len */ /* S: string, L: len */
#define LINE_MODE_S_CLASSIC "classic" #define LINE_MODE_S_CLASSIC "classic"
#define LINE_MODE_L_CLASSIC 7 #define LINE_MODE_L_CLASSIC 7
#define LINE_MODE_S_EDGE "edge" #define LINE_MODE_S_EDGE "edge"
#define LINE_MODE_L_EDGE 4 #define LINE_MODE_L_EDGE 4
#define SELECTION_MODE_S_CAPTURE "capture" #define SELECTION_MODE_S_CAPTURE "capture"
#define SELECTION_MODE_L_CAPTURE 7 #define SELECTION_MODE_L_CAPTURE 7
#define SELECTION_MODE_S_HIDE "hide" #define SELECTION_MODE_S_HIDE "hide"
#define SELECTION_MODE_L_HIDE 4 #define SELECTION_MODE_L_HIDE 4
skipping to change at line 74 skipping to change at line 71
SELECTION_MODE_ANY = (SELECTION_MODE_CAPTURE | SELECTION_MODE_HIDE | SELECTI ON_MODE_HOLE | SELECTION_MODE_BLUR), SELECTION_MODE_ANY = (SELECTION_MODE_CAPTURE | SELECTION_MODE_HIDE | SELECTI ON_MODE_HOLE | SELECTION_MODE_BLUR),
SELECTION_MODE_NOT_CAPTURE = (SELECTION_MODE_ANY & ~SELECTION_MODE_CAPTURE), SELECTION_MODE_NOT_CAPTURE = (SELECTION_MODE_ANY & ~SELECTION_MODE_CAPTURE),
SELECTION_MODE_NEED_PARAM = (SELECTION_MODE_HIDE | SELECTION_MODE_BLUR), SELECTION_MODE_NEED_PARAM = (SELECTION_MODE_HIDE | SELECTION_MODE_BLUR),
SELECTION_MODE_NOT_NEED_PARAM = (~SELECTION_MODE_NEED_PARAM), SELECTION_MODE_NOT_NEED_PARAM = (~SELECTION_MODE_NEED_PARAM),
SELECTION_MODE_BLUR_MIN= 1, SELECTION_MODE_BLUR_MIN= 1,
SELECTION_MODE_BLUR_MAX= 30, SELECTION_MODE_BLUR_MAX= 30,
SELECTION_MODE_BLUR_DEFAULT = 18, SELECTION_MODE_BLUR_DEFAULT = 18,
SELECTION_OPACITY_MIN = 0, SELECTION_OPACITY_MIN = 0,
SELECTION_OPACITY_MAX = 255, SELECTION_OPACITY_MAX = 255,
SELECTION_OPACITY_DEFAULT = 100, SELECTION_OPACITY_DEFAULT = 100,
SELECTION_EDGE_OPACITY_MIN = 10,
SELECTION_EDGE_OPACITY_MAX = 100,
}; };
struct SelectionRect { struct SelectionRect {
int x, y, w, h; int x, y, w, h;
}; };
typedef struct SelectionMode { typedef struct SelectionMode {
unsigned int mode; unsigned int mode;
int paramNum; int paramNum;
char* paramStr; char *paramStr;
} SelectionMode; } SelectionMode;
struct SelectionClassic; struct SelectionClassic;
struct SelectionEdge; struct SelectionEdge;
struct Selection { struct Selection {
Cursor curCross, curAngleNW, curAngleNE, curAngleSW, curAngleSE; Cursor curCross, curAngleNW, curAngleNE, curAngleSW, curAngleSE;
struct SelectionRect rect; struct SelectionRect rect;
struct SelectionClassic* classic; struct SelectionClassic *classic;
struct SelectionEdge* edge; struct SelectionEdge *edge;
void (*create)(void); void (*create)(void);
void (*destroy)(void); void (*destroy)(void);
void (*draw)(void); void (*draw)(void);
void (*motionDraw)(int, int, int, int); void (*motionDraw)(int, int, int, int);
}; };
struct Selection **selectionGet(void);
void selectionCalculateRect(int, int, int, int);
void scrotSelectionCreate(void); void scrotSelectionCreate(void);
void scrotSelectionDestroy(void); void scrotSelectionDestroy(void);
void scrotSelectionDraw(void); void scrotSelectionDraw(void);
void scrotSelectionMotionDraw(int, int, int, int); void scrotSelectionMotionDraw(int, int, int, int);
struct SelectionRect* scrotSelectionGetRect(void); struct SelectionRect *scrotSelectionGetRect(void);
void scrotSelectionGetLineColor(XColor*); void scrotSelectionGetLineColor(XColor *);
Status scrotSelectionCreateNamedColor(char const*, XColor*); Status scrotSelectionCreateNamedColor(const char *, XColor *);
void scrotSelectionSetDefaultColorLine(void); void scrotSelectionSetDefaultColorLine(void);
bool scrotSelectionGetUserSel(struct SelectionRect*); bool scrotSelectionGetUserSel(struct SelectionRect *);
Imlib_Image scrotSelectionSelectMode(void); Imlib_Image scrotSelectionSelectMode(void);
 End of changes. 10 change blocks. 
17 lines changed or deleted 14 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)