本文整理汇总了Python中xformslib.library.convert_to_intc函数的典型用法代码示例。如果您正苦于以下问题:Python convert_to_intc函数的具体用法?Python convert_to_intc怎么用?Python convert_to_intc使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了convert_to_intc函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: fl_create_bitmap_cursor
def fl_create_bitmap_cursor(source, maskstr, width, height, hotx, hoty):
"""fl_create_bitmap_cursor(source, maskstr, width, height, hotx, hoty)
-> cursornum
Creates a bitmap cursor, using cursors other than those defined by
the standard cursor font.
Parameters
----------
source : str of ubytes
bitmap to be used as cursor.
maskstr : str of ubytes
bitmap defining the shape of the cursor. The pixels set to 1
define which source pixels are displayed. If it is empty ("") all
bits in source are displayed.
width : int
width of cursor
height : int
height of cursor
hotx : int
horizontal hotspot of the cursor (relative to the source origin)
hoty : int
vertical hotspot of the cursor (relative to the source origin)
Returns
-------
cursornum : int
cursor id
Examples
--------
>>> *todo*
Notes
-----
Status: NA-UTest + Doc + Demo = OK
"""
_fl_create_bitmap_cursor = library.cfuncproto(
library.load_so_libforms(), "fl_create_bitmap_cursor",
cty.c_int, [xfdata.STRING, xfdata.STRING, cty.c_int, cty.c_int,
cty.c_int, cty.c_int],
"""int fl_create_bitmap_cursor(const char * source,
const char * mask, int w, int h, int hotx, int hoty)""")
library.check_if_flinitialized()
s_source = library.convert_to_bytestrc(source)
if not maskstr: # if it is empty
s_maskstr = cty.cast(maskstr, cty.c_void_p)
else:
s_maskstr = library.convert_to_bytestrc(maskstr)
i_width = library.convert_to_intc(width)
i_height = library.convert_to_FL_Coord(height)
i_hotx = library.convert_to_intc(hotx)
i_hoty = library.convert_to_intc(hoty)
library.keep_elem_refs(source, maskstr, width, height, hotx, hoty, \
s_source, s_maskstr, i_width, i_height, i_hotx, i_hoty)
retval = _fl_create_bitmap_cursor(s_source, s_maskstr, i_width, \
i_height, i_hotx, i_hoty)
return retval
示例2: fl_set_pixmap_align
def fl_set_pixmap_align(ptr_flobject, align, xmargin, ymargin):
"""fl_set_pixmap_align(ptr_flobject, align, xmargin, ymargin)
Changes alignment of a pixmap. By default it is displayed centered
inside the bounding box; although you can place a pixmap outside of
the bounding box, it probably is not a good idea.
Parameters
----------
ptr_flobject : pointer to xfdata.FL_OBJECT
pixmap flobject
align : int
alignment of pixmap. Values (from xfdata.py)
- FL_ALIGN_CENTER (In the middle of the box, inside it),
- FL_ALIGN_TOP (To the top of the box, outside it),
- FL_ALIGN_BOTTOM (To the bottom of the box, outside it),
- FL_ALIGN_LEFT (To the left of the box, outside it),
- FL_ALIGN_RIGHT (To the right of the box, outside it),
- FL_ALIGN_LEFT_TOP (To the left and top of the box, outside it),
- FL_ALIGN_RIGHT_TOP (To the right and top of the box, outside it),
- FL_ALIGN_LEFT_BOTTOM (To the left and bottom of box, outside),
- FL_ALIGN_RIGHT_BOTTOM (To the right and bottom of box, outside),
- FL_ALIGN_INSIDE (places the text inside the box),
- FL_ALIGN_VERT (not functional yet).
Bitwise OR with FL_ALIGN_INSIDE is allowed.
xmargin : int
extra margin to leave in addition to the flobject border
width. By default it is 3.
ymargin : int
extra margin to leave in addition to the flobject border
height. By default it is 3.
Examples
--------
>>> fl_set_pixmap_align(xpmobj, xfdata.FL_ALIGN_CENTER, 10, 10)
Notes
-----
Status: UnitTest + Doc + Demo = OK
"""
_fl_set_pixmap_align = library.cfuncproto(
library.load_so_libforms(), "fl_set_pixmap_align",
None, [cty.POINTER(xfdata.FL_OBJECT), cty.c_int, cty.c_int,
cty.c_int],
"""void fl_set_pixmap_align(FL_OBJECT * ob, int align,
int xmargin, int ymargin)""")
library.check_if_flinitialized()
library.verify_flobjectptr_type(ptr_flobject)
library.checkfatal_allowed_value_in_list(align, xfdata.ALIGN_list)
i_align = library.convert_to_intc(align)
i_xmargin = library.convert_to_intc(xmargin)
i_ymargin = library.convert_to_intc(ymargin)
library.keep_elem_refs(ptr_flobject, align, xmargin, ymargin, \
i_align, i_xmargin, i_ymargin)
_fl_set_pixmap_align(ptr_flobject, i_align, i_xmargin, i_ymargin)
示例3: fl_set_chart_baseline
def fl_set_chart_baseline(ptr_flobject, yesno):
"""fl_set_chart_baseline(ptr_flobject, yesno)
Turns on or off the chart's baseline.
Parameters
----------
ptr_flobject : pointer to xfdata.FL_OBJECT
chart flobject
yesno : int
flag for baseline. Values 0 (if disabled) or 1 (if enabled)
Examples
--------
>>> fl_set_chart_baseline(pchrtobj, 1)
Notes
-----
Status: NA-UTest + Doc + NoDemo = Maybe
"""
_fl_set_chart_baseline = library.cfuncproto(
library.load_so_libforms(), "fl_set_chart_baseline",
None, [cty.POINTER(xfdata.FL_OBJECT), cty.c_int],
"""void fl_set_chart_baseline(FL_OBJECT * ob, int iYesNo)""")
library.check_if_flinitialized()
library.verify_flobjectptr_type(ptr_flobject)
i_yesno = library.convert_to_intc(yesno)
library.keep_elem_refs(ptr_flobject, yesno, i_yesno)
_fl_set_chart_baseline(ptr_flobject, i_yesno)
示例4: fl_set_input_scroll
def fl_set_input_scroll(ptr_flobject, yesno):
"""fl_set_input_scroll(ptr_flobject, yesno)
Turn on or off scrolling for an input field (for both multiline and
single line input field).
Parameters
----------
ptr_flobject : pointer to xfdata.FL_OBJECT
input flobject
yesno : int
flag to enable/disable scrolling. Values 0 (disabled) or 1
(enabled)
Examples
--------
>>> fl_set_input_scroll(pinpobj, 1)
Notes
-----
Status: NA-UTest + NoDoc + NoDemo = Maybe
"""
_fl_set_input_scroll = library.cfuncproto(
library.load_so_libforms(),
"fl_set_input_scroll",
None,
[cty.POINTER(xfdata.FL_OBJECT), cty.c_int],
"""void fl_set_input_scroll(FL_OBJECT * ob, int yes)""",
)
library.check_if_flinitialized()
library.verify_flobjectptr_type(ptr_flobject)
i_yesno = library.convert_to_intc(yesno)
library.keep_elem_refs(ptr_flobject, yesno, i_yesno)
_fl_set_input_scroll(ptr_flobject, i_yesno)
示例5: fl_set_chart_autosize
def fl_set_chart_autosize(ptr_flobject, yesno):
"""fl_set_chart_autosize(ptr_flobject, yesno)
Defines whether the chart should autosize along the x-axis. Normally
width of the bars and distance between the points in a line-chart are
normally scaled.
Parameters
----------
ptr_flobject : pointer to xfdata.FL_OBJECT
chart flobject
yesno : int
autosize flag. Values 1 (if enabled) or 0 (if disabled).
If it is set to 0 the width of the bars will be such that the
maximum number of items fits in the box.
Examples
--------
>>> fl_set_chart_autosize(pchrtobj, 1)
Notes
-----
Status: NA-UTest + Doc + Demo = OK
"""
_fl_set_chart_autosize = library.cfuncproto(
library.load_so_libforms(), "fl_set_chart_autosize",
None, [cty.POINTER(xfdata.FL_OBJECT), cty.c_int],
"""void fl_set_chart_autosize(FL_OBJECT * ob, int autosize)""")
library.check_if_flinitialized()
library.verify_flobjectptr_type(ptr_flobject)
i_yesno = library.convert_to_intc(yesno)
library.keep_elem_refs(ptr_flobject, yesno, i_yesno)
_fl_set_chart_autosize(ptr_flobject, i_yesno)
示例6: fl_set_timer_countup
def fl_set_timer_countup(ptr_flobject, yesno):
"""fl_set_timer_countup(ptr_flobject, yesno)
Changes timer behavior so the timer counts up and shows elapsed time.
By default, a timer counts down toward zero and the value shown (for
xfdata.FL_VALUE_TIMERs) is the time left until the timer expires.
Parameters
----------
ptr_flobject : pointer to xfdata.FL_OBJECT
timer flobject
yesno : int
flag to set count up or down. Values 0 (counts down and shows time
left) or 1 (counts up and shows elapsed time)
Examples
--------
>>> fl_set_timer_countup(ptimerobj, 1)
Notes
-----
Status: NA-UTest + Doc + Demo = OK
"""
_fl_set_timer_countup = library.cfuncproto(
library.load_so_libforms(), "fl_set_timer_countup",
None, [cty.POINTER(xfdata.FL_OBJECT), cty.c_int],
"""void fl_set_timer_countup(FL_OBJECT * ob, int yes)""")
library.check_if_flinitialized()
library.verify_flobjectptr_type(ptr_flobject)
i_yesno = library.convert_to_intc(yesno)
library.keep_elem_refs(ptr_flobject, yesno, i_yesno)
_fl_set_timer_countup(ptr_flobject, i_yesno)
示例7: fl_set_pixmapbutton_focus_outline
def fl_set_pixmapbutton_focus_outline(ptr_flobject, yesno):
"""fl_set_pixmapbutton_focus_outline(ptr_flobject, yesno)
Enables or disables the focus outline of the pixmap button.
Parameters
----------
ptr_flobject : pointer to xfdata.FL_OBJECT
button flobject
yesno : int
flag to enable (1) or disable (0) the focus outline
Examples
--------
>>> fl_set_pixmapbutton_focus_outline(pmapobj, 1)
Notes
-----
Status: NA-UTest + Doc + NoDemo = Maybe
"""
_fl_set_pixmapbutton_focus_outline = library.cfuncproto(
library.load_so_libforms(), "fl_set_pixmapbutton_focus_outline",
None, [cty.POINTER(xfdata.FL_OBJECT), cty.c_int],
"""void fl_set_pixmapbutton_focus_outline(FL_OBJECT * ob, int yes)""")
library.check_if_flinitialized()
library.verify_flobjectptr_type(ptr_flobject)
i_yesno = library.convert_to_intc(yesno)
library.keep_elem_refs(ptr_flobject, yesno, i_yesno)
_fl_set_pixmapbutton_focus_outline(ptr_flobject, i_yesno)
示例8: fl_set_folder_bynumber
def fl_set_folder_bynumber(ptr_flobject, seqnum):
"""fl_set_folder_bynumber(ptr_flobject, seqnum)
Defines which folder to show by its sequence number.
Parameters
----------
ptr_flobject : pointer to xfdata.FL_OBJECT
tabfolder flobject
seqnum : int
sequence number of folder to show. The first tab on the left
has a sequence number 1, the second 2 etc..
Examples
--------
>>> fl_set_floder_bynumber(ptbfobj, 2)
Notes
-----
Status: NA-UTest + Doc + Demo = OK
"""
_fl_set_folder_bynumber = library.cfuncproto(
library.load_so_libforms(), "fl_set_folder_bynumber",
None, [cty.POINTER(xfdata.FL_OBJECT), cty.c_int],
"""void fl_set_folder_bynumber(FL_OBJECT * ob, int num)""")
library.check_if_flinitialized()
library.verify_flobjectptr_type(ptr_flobject)
i_seqnum = library.convert_to_intc(seqnum)
library.keep_elem_refs(ptr_flobject, seqnum, i_seqnum)
_fl_set_folder_bynumber(ptr_flobject, i_seqnum)
示例9: fl_set_canvas_depth
def fl_set_canvas_depth(ptr_flobject, depth):
"""fl_set_canvas_depth(ptr_flobject, depth)
Defines the depth of canvas flobject. Changing depth does not generally
make sense once the canvas window is created (which happens when the
parent form is shown).
Parameters
----------
ptr_flobject : pointer to xfdata.FL_OBJECT
canvas flobject
depth : int
depth value of canvas. Values e.g. 8, 16, 24?, 32, ...
Examples
--------
>>> fl_set_canvas_depth(pcanvobj, 32)
Notes
-----
Status: NA-UTest + Doc + NoDemo = Maybe
"""
_fl_set_canvas_depth = library.cfuncproto(
library.load_so_libforms(), "fl_set_canvas_depth",
None, [cty.POINTER(xfdata.FL_OBJECT), cty.c_int],
"""void fl_set_canvas_depth(FL_OBJECT * obj, int depth)""")
library.check_if_flinitialized()
library.verify_flobjectptr_type(ptr_flobject)
i_depth = library.convert_to_intc(depth)
library.keep_elem_refs(ptr_flobject, depth, i_depth)
_fl_set_canvas_depth(ptr_flobject, i_depth)
示例10: fl_set_counter_min_repeat
def fl_set_counter_min_repeat(ptr_flobject, fdelay):
"""fl_set_counter_min_repeat(ptr_flobject, fdelay)
Defines the final delay of a counter. By default the counter value changes
first slowly and the rate of change then accelerates until a final speed
is reached. The default final delay is 50 ms.
Parameters
----------
ptr_flobject : pointer to xfdata.FL_OBJECT
counter flobject
fdelay : int
final delay in milliseconds
Examples
--------
>>> fl_set_counter_min_repeat(pcntrobj, 100)
Notes
-----
Status: NA-UTest + Doc + NoDemo = Maybe
"""
_fl_set_counter_min_repeat = library.cfuncproto(
library.load_so_libforms(), "fl_set_counter_min_repeat",
None, [cty.POINTER(xfdata.FL_OBJECT), cty.c_int],
"""void fl_set_counter_min_repeat(FL_OBJECT * ob, int millisec)""")
library.check_if_flinitialized()
library.verify_flobjectptr_type(ptr_flobject)
i_fdelay = library.convert_to_intc(fdelay)
library.keep_elem_refs(ptr_flobject, fdelay, i_fdelay)
_fl_set_counter_min_repeat(ptr_flobject, i_fdelay)
示例11: fl_set_counter_speedjump
def fl_set_counter_speedjump(ptr_flobject, yesno):
"""fl_set_counter_speedjump(ptr_flobject, yesno)
Makes only the first change of the counter has a different delay from all
the following ones. The delay for the first change of the counter value
will then be the one set by fl_set_counter_repeat() and the following
delays last as long as set by fl_set_counter_min_repeat().
Parameters
----------
ptr_flobject : pointer to xfdata.FL_OBJECT
counter flobject
yesno : int
flag. Values 1 (to set speedjump) or 0 (to unset speedjump)
Examples
--------
>>> fl_set_counter_speedjump(pcntrobj, 1)
Notes
-----
Status: NA-UTest + Doc + NoDemo = Maybe
"""
_fl_set_counter_speedjump = library.cfuncproto(
library.load_so_libforms(), "fl_set_counter_speedjump",
None, [cty.POINTER(xfdata.FL_OBJECT), cty.c_int],
"""void fl_set_counter_speedjump(FL_OBJECT * ob, int yes_no)""")
library.check_if_flinitialized()
library.verify_flobjectptr_type(ptr_flobject)
i_yesno = library.convert_to_intc(yesno)
library.keep_elem_refs(ptr_flobject, yesno, i_yesno)
_fl_set_counter_speedjump(ptr_flobject, i_yesno)
示例12: fl_set_input_cursor_visible
def fl_set_input_cursor_visible(ptr_flobject, yesno):
"""fl_set_input_cursor_visible(ptr_flobject, yesno)
Turns on or off the cursor of the input field.
Parameters
----------
ptr_flobject : pointer to xfdata.FL_OBJECT
input flobject
yesno : int
flag to set/unset cursor visibility. Values 1 (visible) or 0
(not visible)
Examples
--------
>>> fl_set_input_cursor_visible(pinpobj, 1)
Notes
-----
Status: NA-UTest + Doc + NoDemo = Maybe
"""
_fl_set_input_cursor_visible = library.cfuncproto(
library.load_so_libforms(),
"fl_set_input_cursor_visible",
None,
[cty.POINTER(xfdata.FL_OBJECT), cty.c_int],
"""void fl_set_input_cursor_visible(FL_OBJECT * ob, int visible)""",
)
library.check_if_flinitialized()
library.verify_flobjectptr_type(ptr_flobject)
i_yesno = library.convert_to_intc(yesno)
library.keep_elem_refs(ptr_flobject, yesno, i_yesno)
_fl_set_input_cursor_visible(ptr_flobject, i_yesno)
示例13: fl_set_counter_precision
def fl_set_counter_precision(ptr_flobject, precis):
"""fl_set_counter_precision(ptr_flobject, precis)
Defines the precision (number of digits after the dot) with which
the counter value is displayed.
Parameters
----------
ptr_flobject : pointer to xfdata.FL_OBJECT
counter flobject
precis : int
precision to be set
Examples
--------
>>> fl_set_counter_precision(pcntrobj, 2)
Notes
-----
Status: NA-UTest + Doc + Demo = OK
"""
_fl_set_counter_precision = library.cfuncproto(
library.load_so_libforms(), "fl_set_counter_precision",
None, [cty.POINTER(xfdata.FL_OBJECT), cty.c_int],
"""void fl_set_counter_precision(FL_OBJECT * ob, int prec)""")
library.check_if_flinitialized()
library.verify_flobjectptr_type(ptr_flobject)
i_precis = library.convert_to_intc(precis)
library.keep_elem_refs(ptr_flobject, precis, i_precis)
_fl_set_counter_precision(ptr_flobject, i_precis)
示例14: fl_set_input_xoffset
def fl_set_input_xoffset(ptr_flobject, offset):
"""fl_set_input_xoffset(ptr_flobject, offset)
Scrolls programmatically horizontally (to the left).
Parameters
----------
ptr_flobject : pointer to xfdata.FL_OBJECT
input flobject
offset : int
positive number of pixels to scroll to the left relative to the
nominal position of the text lines.
Examples
--------
>>> *todo*
Notes
-----
Status: NA-UTest + Doc + NoDemo = Maybe
"""
_fl_set_input_xoffset = library.cfuncproto(
library.load_so_libforms(),
"fl_set_input_xoffset",
None,
[cty.POINTER(xfdata.FL_OBJECT), cty.c_int],
"""void fl_set_input_xoffset(FL_OBJECT * ob, int xoff)""",
)
library.check_if_flinitialized()
library.verify_flobjectptr_type(ptr_flobject)
i_offset = library.convert_to_intc(offset)
library.keep_elem_refs(ptr_flobject, offset, i_offset)
_fl_set_input_xoffset(ptr_flobject, i_offset)
示例15: fl_set_input_topline
def fl_set_input_topline(ptr_flobject, linenum):
"""fl_set_input_topline(ptr_flobject, linenum)
Scrolls vertically an input flobject (for input fields of type
xfdata.FL_MULTILINE_INPUT only).
Parameters
----------
ptr_flobject : pointer to xfdata.FL_OBJECT
input flobject
linenum : int
the new top line id (starting from 1) in the input field.
Examples
--------
>>> fl_set_input_topline(ptr_flobject, 3)
Notes
-----
Status: NA-UTest + Doc + NoDemo = Maybe
"""
_fl_set_input_topline = library.cfuncproto(
library.load_so_libforms(),
"fl_set_input_topline",
None,
[cty.POINTER(xfdata.FL_OBJECT), cty.c_int],
"""void fl_set_input_topline(FL_OBJECT * ob, int top)""",
)
library.check_if_flinitialized()
library.verify_flobjectptr_type(ptr_flobject)
i_linenum = library.convert_to_intc(linenum)
library.keep_elem_refs(ptr_flobject, linenum, i_linenum)
_fl_set_input_topline(ptr_flobject, i_linenum)