1wofi-widget-builder(3)     Library Functions Manual     wofi-widget-builder(3)
2
3
4

NAME

6       wofi - Widget builder API functions
7
8

DESCRIPTION

10       The functions documented here are used for building custom widgets with
11       more power and flexibility than previously allowed. They are defined in
12       wofi_widget_builder_api.h
13
14
15       struct   widget_builder*  wofi_widget_builder_init(struct  mode*  mode,
16       size_t actions)
17              Creates multiple widget builders. The number of builders created
18              is specified by actions and is returned as an array.
19
20              struct mode* mode - The struct mode* given to your mode's init()
21              function.
22
23              size_t actions - The number of builders to create
24
25
26       void     wofi_widget_builder_set_search_text(struct     widget_builder*
27       builder, char* search_text)
28              Sets the search text for the widget specified by the builder
29
30              struct  widget_builder*  builder - The builder that contains the
31              widget to set the search text for
32
33              char* search_text - The text to set as the search text
34
35
36       void  wofi_widget_builder_set_action(struct  widget_builder*   builder,
37       char* action)
38              Sets the action for the widget specified by the builder
39
40              struct  widget_builder*  builder - The builder that contains the
41              widget to set the action for
42
43              char* action - The text to set as the action
44
45
46       void  wofi_widget_builder_insert_text(struct  widget_builder*  builder,
47       char* text, ...)
48              Inserts text into the widget specified by the builder
49
50              struct  widget_builder*  builder - The builder that contains the
51              widget to add the text to
52
53              char* text - The text to add to the widget
54
55              ...  - The names of the CSS classes for  this  text.  The  class
56              that  will be assigned is .mode_name-css_name where mode_name is
57              the name of the mode, i.e. drun etc. This  should  have  a  NULL
58              sentinel
59
60
61       void  wofi_widget_builder_insert_image(struct  widget_builder* builder,
62       GdkPixbuf* pixbuf, char* css_name)
63              Inserts an image into the widget specified by the builder
64
65              struct widget_builder* builder - The builder that  contains  the
66              widget to add the image to
67
68              GdkPixbuf* pixbuf - The image to add to the widget
69
70              ...   -  The  names of the CSS classes for this image. The class
71              that will be assigned is .mode_name-css_name where mode_name  is
72              the  name  of  the  mode, i.e. drun etc. This should have a NULL
73              sentinel
74
75
76       struct    widget_builder*    wofi_widget_builder_get_idx(struct    wid‐
77       get_builder* builder, size_t idx)
78              Gets the widget_builder at the provided index in the array
79
80              struct  widget_builder*  builder  - The array of builders to get
81              the builder from
82
83              size_t idx - The index in the array to get
84
85
86       struct  widget*  wofi_widget_builder_get_widget(struct  widget_builder*
87       builder)
88              Constructs  a  new widget from the specified builder, the widget
89              can be returned by struct widget* get_widget(void)
90
91              struct widget_builder* builder - The builder to construct a wid‐
92              get for
93
94
95       void wofi_widget_builder_free(struct widget_builder* builder)
96              Frees the specified builder
97
98              struct widget_builder* builder - The builder to free
99
100
101
102                                                        wofi-widget-builder(3)
Impressum