Source

pida-main / contrib / moo / moopaned.defs

Full commit
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
;; -*- scheme -*-

(define-object InternalBigPaned
  (in-module "Moo")
  (parent "GtkFrame")
  (c-name "MooInternalBigPaned")
  (gtype-id "MOO_TYPE_INTERNAL_BIG_PANED")
)

(define-object InternalPaned
  (in-module "Moo")
  (parent "GtkBin")
  (c-name "MooInternalPaned")
  (gtype-id "MOO_TYPE_INTERNAL_PANED")
  (fields
    '("GtkWidget*" "button_box")
  )
)

(define-object InternalPane
  (in-module "Moo")
  (parent "GtkObject")
  (c-name "MooInternalPane")
  (gtype-id "MOO_TYPE_INTERNAL_PANE")
)

(define-boxed InternalPaneLabel
  (in-module "Moo")
  (c-name "MooInternalPaneLabel")
  (gtype-id "MOO_TYPE_INTERNAL_PANE_LABEL")
  (copy-func "moo_pane_label_copy")
  (release-func "moo_pane_label_free")
  (docstring "PaneLabel(icon_stock_id=None, icon_pixbuf=None, icon_widget=None, label_text=None, window_title=None).")
)

(define-boxed InternalPaneParams
  (in-module "Moo")
  (c-name "MooInternalPaneParams")
  (gtype-id "MOO_TYPE_INTERNAL_PANE_PARAMS")
  (copy-func "moo_pane_params_copy")
  (release-func "moo_pane_params_free")
  (fields
    '("GdkRectangle" "window_position")
    '("gboolean" "detached")
    '("gboolean" "maximized")
    '("gboolean" "keep_on_top")
  )
  (docstring "PaneParams(window_position=None, detached=False, maximized=False, keep_on_top=False).\n"
             "\n"
             "window_position is a gdk.Rectangle instance or None; negative width or height in it\n"
             "means the position is not set.")
)

(define-enum InternalPanePosition
  (in-module "Moo")
  (c-name "MooInternalPanePosition")
  (gtype-id "MOO_TYPE_INTERNAL_PANE_POSITION")
)

;; From ./moo/mooutils/moobigpaned.h

(define-function moo_big_paned_new
  (c-name "moo_big_paned_new")
  (is-constructor-of "MooInternalBigPaned")
  (return-type "GtkWidget*")
)

(define-method find_pane
  (of-object "MooInternalBigPaned")
  (c-name "moo_big_paned_find_pane")
  (return-type "MooInternalPane*")
  (parameters
    '("GtkWidget*" "pane_widget")
    '("MooInternalPaned**" "child_paned")
  )
  (docstring "find_pane(pane_widget) -> (pane, paned) or None.")
)

; (define-method set_pane_order
;   (of-object "MooInternalBigPaned")
;   (c-name "moo_big_paned_set_pane_order")
;   (return-type "none")
;   (parameters
;     '("int*" "order")
;   )
; )

(define-method add_child
  (of-object "MooInternalBigPaned")
  (c-name "moo_big_paned_add_child")
  (return-type "none")
  (parameters
    '("GtkWidget*" "widget")
  )
  (docstring "add_child(widget) -> None.\n"
             "\n"
             "Analogous to gtk.Container.add(), adds widget as the main child of BigPaned widget.")
)

(define-method remove_child
  (of-object "MooInternalBigPaned")
  (c-name "moo_big_paned_remove_child")
  (return-type "none")
  (docstring "remove_child() -> None.\n"
             "\n"
             "Analogous to gtk.Container.remove(), removes the main child widget.")
)

(define-method get_child
  (of-object "MooInternalBigPaned")
  (c-name "moo_big_paned_get_child")
  (return-type "GtkWidget*")
  (docstring "get_child() -> gtk.Widget.\n"
             "\n"
             "Returns the main child widget.")
)

(define-method get_paned
  (of-object "MooInternalBigPaned")
  (c-name "moo_big_paned_get_paned")
  (return-type "MooInternalPaned*")
  (parameters
    '("MooInternalPanePosition" "position")
  )
  (docstring "get_paned(pos) -> Paned.\n"
             "\n"
             "Returns the paned widget at position pos.")
)

(define-method insert_pane
  (of-object "MooInternalBigPaned")
  (c-name "moo_big_paned_insert_pane")
  (return-type "MooInternalPane*")
  (parameters
    '("GtkWidget*" "pane_widget")
    '("const-char*" "pane_id" (null-ok))
    '("MooInternalPaneLabel*" "pane_label")
    '("MooInternalPanePosition" "position")
    '("int" "index_")
  )
  (docstring "insert_pane(pane_widget, pane_id, pane_label, position, index) -> Pane.\n"
             "\n"
             "Returns newly created pane object.")
)

(define-method remove_pane
  (of-object "MooInternalBigPaned")
  (c-name "moo_big_paned_remove_pane")
  (return-type "gboolean")
  (parameters
    '("GtkWidget*" "pane_widget")
  )
  (docstring "remove_pane(pane_widget) -> bool.\n"
             "\n"
             "Returns True if pane_widget was removed.")
)

(define-method lookup_pane
  (of-object "MooInternalBigPaned")
  (c-name "moo_big_paned_lookup_pane")
  (return-type "MooInternalPane*")
  (parameters
    '("const-char*" "pane_id")
  )
  (docstring "lookup_pane(pane_id) -> Pane.\n"
             "\n"
             "Finds the pane by its id.")
)

(define-method set_config
  (of-object "MooInternalBigPaned")
  (c-name "moo_big_paned_set_config")
  (parameters
    '("const-char*" "config")
  )
  (docstring "set_config(config) -> None.\n"
             "\n"
             "Loads config from a string returned by get_config.\n"
             "NOTE: you may not call this after you added a pane;\n"
             "call it once, after you created the paned widget.")
)

(define-method get_config
  (of-object "MooInternalBigPaned")
  (c-name "moo_big_paned_get_config")
  (return-type "char*")
  (docstring "get_config(config) -> str.\n"
             "\n"
             "Saves paned config in a plain text, one-line string\n"
             "suitable for storing in configuration files.")
)

(define-method get_pane
  (of-object "MooInternalBigPaned")
  (c-name "moo_big_paned_get_pane")
  (return-type "GtkWidget*")
  (parameters
    '("MooInternalPanePosition" "position")
    '("int" "index_")
  )
  (docstring "get_pane(position, index) -> gtk.Widget.")
)

(define-method open_pane
  (of-object "MooInternalBigPaned")
  (c-name "moo_big_paned_open_pane")
  (return-type "none")
  (parameters
    '("GtkWidget*" "pane_widget")
  )
  (docstring "open_pane(pane_widget) -> None.")
)

(define-method hide_pane
  (of-object "MooInternalBigPaned")
  (c-name "moo_big_paned_hide_pane")
  (return-type "none")
  (parameters
    '("GtkWidget*" "pane_widget")
  )
  (docstring "hide_pane(pane_widget) -> None.")
)

(define-method present_pane
  (of-object "MooInternalBigPaned")
  (c-name "moo_big_paned_present_pane")
  (return-type "none")
  (parameters
    '("GtkWidget*" "pane_widget")
  )
  (docstring "present_pane(pane_widget) -> None.\n"
             "\n"
             "Opens the pane or presents the pane window if it's detached.")
)

(define-method attach_pane
  (of-object "MooInternalBigPaned")
  (c-name "moo_big_paned_attach_pane")
  (return-type "none")
  (parameters
    '("GtkWidget*" "pane_widget")
  )
  (docstring "attach_pane(pane_widget) -> None.")
)

(define-method detach_pane
  (of-object "MooInternalBigPaned")
  (c-name "moo_big_paned_detach_pane")
  (return-type "none")
  (parameters
    '("GtkWidget*" "pane_widget")
  )
  (docstring "detach_pane(pane_widget) -> None.")
)


;; From ./moo/mooutils/moopaned.h

(ifndef pygtk-2.6
(define-function moo_paned_new
  (c-name "moo_paned_new")
  (is-constructor-of "MooInternalPaned")
  (return-type "GtkWidget*")
  (properties
    '("pane_position" (optional))
  )
)
)

(define-method insert_pane
  (of-object "MooInternalPaned")
  (c-name "moo_paned_insert_pane")
  (return-type "MooInternalPane*")
  (parameters
    '("GtkWidget*" "pane_widget")
    '("MooInternalPaneLabel*" "pane_label")
    '("int" "position")
  )
)

(define-method remove_pane
  (of-object "MooInternalPaned")
  (c-name "moo_paned_remove_pane")
  (return-type "gboolean")
  (parameters
    '("GtkWidget*" "pane_widget")
  )
)

(define-method n_panes
  (of-object "MooInternalPaned")
  (c-name "moo_paned_n_panes")
  (return-type "guint")
)

(define-method list_panes
  (of-object "MooInternalPaned")
  (c-name "moo_paned_list_panes")
  (return-type "no-ref-object-slist")
)

(define-method get_nth_pane
  (of-object "MooInternalPaned")
  (c-name "moo_paned_get_nth_pane")
  (return-type "MooInternalPane*")
  (parameters
    '("guint" "n")
  )
)

(define-method get_pane_num
  (of-object "MooInternalPaned")
  (c-name "moo_paned_get_pane_num")
  (return-type "int")
  (parameters
    '("GtkWidget*" "widget")
  )
)

(define-method set_sticky_pane
  (of-object "MooInternalPaned")
  (c-name "moo_paned_set_sticky_pane")
  (return-type "none")
  (parameters
    '("gboolean" "sticky")
  )
)

(define-method set_pane_size
  (of-object "MooInternalPaned")
  (c-name "moo_paned_set_pane_size")
  (return-type "none")
  (parameters
    '("int" "size")
  )
)

(define-method get_pane_size
  (of-object "MooInternalPaned")
  (c-name "moo_paned_get_pane_size")
  (return-type "int")
)

(define-method get_button_box_size
  (of-object "MooInternalPaned")
  (c-name "moo_paned_get_button_box_size")
  (return-type "int")
)

(define-method get_open_pane
  (of-object "MooInternalPaned")
  (c-name "moo_paned_get_open_pane")
  (return-type "MooInternalPane*")
)

(define-method is_open
  (of-object "MooInternalPaned")
  (c-name "moo_paned_is_open")
  (return-type "gboolean")
)

(define-method open_pane
  (of-object "MooInternalPaned")
  (c-name "moo_paned_open_pane")
  (return-type "none")
  (parameters
    '("MooInternalPane*" "pane")
  )
)

(define-method present_pane
  (of-object "MooInternalPaned")
  (c-name "moo_paned_present_pane")
  (return-type "none")
  (parameters
    '("MooInternalPane*" "pane")
  )
)

(define-method hide_pane
  (of-object "MooInternalPaned")
  (c-name "moo_paned_hide_pane")
  (return-type "none")
)

(define-method detach_pane
  (of-object "MooInternalPaned")
  (c-name "moo_paned_detach_pane")
  (return-type "none")
  (parameters
    '("MooInternalPane*" "pane")
  )
)

(define-method attach_pane
  (of-object "MooInternalPaned")
  (c-name "moo_paned_attach_pane")
  (return-type "none")
  (parameters
    '("MooInternalPane*" "pane")
  )
)

(define-function moo_pane_params_new
  (c-name "moo_pane_params_new")
  (is-constructor-of "MooInternalPaneParams")
  (return-type "MooInternalPaneParams*")
  (parameters
    '("GdkRectangle*" "window_position" (null-ok) (default "NULL"))
    '("gboolean" "detached" (null-ok) (default "FALSE"))
    '("gboolean" "maximized" (null-ok) (default "FALSE"))
    '("gboolean" "keep_on_top" (null-ok) (default "FALSE"))
  )
)

(define-method copy
  (of-object "MooInternalPaneParams")
  (c-name "moo_pane_params_copy")
  (return-type "MooInternalPaneParams*")
)

(define-function moo_pane_label_new
  (c-name "moo_pane_label_new")
  (is-constructor-of "MooInternalPaneLabel")
  (return-type "MooInternalPaneLabel*")
  (parameters
    '("const-char*" "icon_name" (null-ok) (default "NULL"))
    '("GdkPixbuf*" "icon_pixbuf" (null-ok) (default "NULL"))
    '("const-char*" "label_text" (null-ok) (default "NULL"))
    '("const-char*" "window_title" (null-ok) (default "NULL"))
  )
)

(define-method copy
  (of-object "MooInternalPaneLabel")
  (c-name "moo_pane_label_copy")
  (return-type "MooInternalPaneLabel*")
)

(define-method free
  (of-object "MooInternalPaneLabel")
  (c-name "moo_pane_label_free")
  (return-type "none")
)

;; From /home/muntyan/projects/moo/moo/mooutils/moopane.h

(define-method set_label
  (of-object "MooInternalPane")
  (c-name "moo_pane_set_label")
  (return-type "none")
  (parameters
    '("MooInternalPaneLabel*" "label")
  )
)

(define-method get_label
  (of-object "MooInternalPane")
  (c-name "moo_pane_get_label")
  (return-type "MooInternalPaneLabel*")
)

(define-method set_frame_markup
  (of-object "MooInternalPane")
  (c-name "moo_pane_set_frame_markup")
  (return-type "none")
  (parameters
    '("const-char*" "markup" (null-ok))
  )
)

(define-method set_frame_text
  (of-object "MooInternalPane")
  (c-name "moo_pane_set_frame_text")
  (return-type "none")
  (parameters
    '("const-char*" "text" (null-ok))
  )
)

(define-method set_params
  (of-object "MooInternalPane")
  (c-name "moo_pane_set_params")
  (return-type "none")
  (parameters
    '("MooInternalPaneParams*" "params")
  )
)

(define-method get_params
  (of-object "MooInternalPane")
  (c-name "moo_pane_get_params")
  (return-type "MooInternalPaneParams*")
)

(define-method set_detachable
  (of-object "MooInternalPane")
  (c-name "moo_pane_set_detachable")
  (return-type "none")
  (parameters
    '("gboolean" "detachable")
  )
)

(define-method get_detachable
  (of-object "MooInternalPane")
  (c-name "moo_pane_get_detachable")
  (return-type "gboolean")
)

(define-method set_removable
  (of-object "MooInternalPane")
  (c-name "moo_pane_set_removable")
  (return-type "none")
  (parameters
    '("gboolean" "removable")
  )
)

(define-method get_removable
  (of-object "MooInternalPane")
  (c-name "moo_pane_get_removable")
  (return-type "gboolean")
)

(define-method get_child
  (of-object "MooInternalPane")
  (c-name "moo_pane_get_child")
  (return-type "GtkWidget*")
)

(define-method get_index
  (of-object "MooInternalPane")
  (c-name "moo_pane_get_index")
  (return-type "int")
)

(define-method open
  (of-object "MooInternalPane")
  (c-name "moo_pane_open")
  (return-type "none")
)

(define-method present
  (of-object "MooInternalPane")
  (c-name "moo_pane_present")
  (return-type "none")
)

(define-method attach
  (of-object "MooInternalPane")
  (c-name "moo_pane_attach")
  (return-type "none")
)

(define-method detach
  (of-object "MooInternalPane")
  (c-name "moo_pane_detach")
  (return-type "none")
)