mirror of
https://git.familie-radermacher.ch/linux/ptouch-print.git
synced 2025-11-20 20:32:05 +00:00
prepare support for printers with other resolution than 180dpi
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
/*
|
||||
ptouch-print - Print labels with images or text on a Brother P-Touch
|
||||
|
||||
|
||||
Copyright (C) 2015-2019 Dominic Radermacher <blip@mockmoon-cybernetics.ch>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License version 3 as
|
||||
published by the Free Software Foundation
|
||||
|
||||
|
||||
This program 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 General Public License for more details.
|
||||
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
@@ -23,19 +23,21 @@
|
||||
struct _pt_tape_info {
|
||||
uint8_t mm; /* Tape width in mm */
|
||||
uint8_t px; /* Printing area in px */
|
||||
double margins; /* default tape margins in mm */
|
||||
};
|
||||
|
||||
#define FLAG_NONE (0x00)
|
||||
#define FLAG_UNSUP_RASTER (0x01)
|
||||
#define FLAG_RASTER_PACKBITS (0x02)
|
||||
#define FLAG_PLITE (0x04)
|
||||
#define FLAG_P700_INIT (0x08)
|
||||
#define FLAG_NONE (0)
|
||||
#define FLAG_UNSUP_RASTER (1 << 0)
|
||||
#define FLAG_RASTER_PACKBITS (1 << 1)
|
||||
#define FLAG_PLITE (1 << 2)
|
||||
#define FLAG_P700_INIT (1 << 3)
|
||||
|
||||
struct _pt_dev_info {
|
||||
int vid; /* USB vendor ID */
|
||||
int pid; /* USB product ID */
|
||||
char *name;
|
||||
int max_px; /* Maximum pixel width that can be printed */
|
||||
int dpi; /* Dots per inch of the printhead */
|
||||
int flags;
|
||||
};
|
||||
typedef struct _pt_dev_info *pt_dev_info;
|
||||
@@ -73,7 +75,7 @@ struct _ptouch_dev {
|
||||
libusb_device_handle *h;
|
||||
pt_dev_info devinfo;
|
||||
pt_dev_stat status;
|
||||
uint8_t tape_width_px;
|
||||
uint16_t tape_width_px;
|
||||
};
|
||||
typedef struct _ptouch_dev *ptouch_dev;
|
||||
|
||||
@@ -83,6 +85,9 @@ int ptouch_send(ptouch_dev ptdev, uint8_t *data, size_t len);
|
||||
int ptouch_init(ptouch_dev ptdev);
|
||||
int ptouch_lf(ptouch_dev ptdev);
|
||||
int ptouch_ff(ptouch_dev ptdev);
|
||||
size_t ptouch_get_max_pixel_width(ptouch_dev ptdev);
|
||||
int ptouch_get_tape_pixel_width(ptouch_dev ptdev);
|
||||
int ptouch_page_flags(ptouch_dev ptdev, uint8_t page_flags);
|
||||
int ptouch_eject(ptouch_dev ptdev);
|
||||
int ptouch_getstatus(ptouch_dev ptdev);
|
||||
int ptouch_getmaxwidth(ptouch_dev ptdev);
|
||||
|
||||
Reference in New Issue
Block a user